diff --git a/.gitignore b/.gitignore index adcb4ce..f29144e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,14 +25,5 @@ typings/ # Cli configs nomo_cli.config.js -# Manifest -out/nomo_manifest.json - -# Webon Files -out/nomo.tar.gz - -# Out Dir -out/ - # Cached WebOn Files cache/ \ No newline at end of file diff --git a/README.md b/README.md index 34101a6..91ff57c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Add `nomo-webon-cli` to your dev-dependencies: `npm install --save-dev nomo-webon-cli` -Alternatively, you can run it via npx: +For Windows, you can run it via npx: `npx nomo-webon-cli --help` diff --git a/src/build-webon/build-webon.ts b/src/build-webon/build-webon.ts index a3a7120..b5b99dd 100644 --- a/src/build-webon/build-webon.ts +++ b/src/build-webon/build-webon.ts @@ -43,13 +43,13 @@ export async function buildWebOn(args: { assetDir: string }): Promise { const outDirPath = isOutDir ? assetDir : path.resolve(assetDir, "..", "out"); checkDir(assetDir); - renameAssetDir(assetDir); + //renameAssetDir(assetDir); - if (!isOutDir) { - console.log("Directories are already named correctly, no need to rename."); - } + // if (!isOutDir) { + // console.log("Directories are already named correctly, no need to rename."); + // } - createOutDir(outDirPath); + // createOutDir(outDirPath); const missingFiles = checkRequiredFiles(outDirPath); diff --git a/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_buildManifest.js b/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_buildManifest.js new file mode 100644 index 0000000..2e8e3c1 --- /dev/null +++ b/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST={__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-e6359318fe16f140.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_ssgManifest.js b/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_ssgManifest.js new file mode 100644 index 0000000..5b3ff59 --- /dev/null +++ b/test_assets/out/_next/static/ZOHPeUwV7uSB5hZIag4hi/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/139-17ed572570f5a2bf.js b/test_assets/out/_next/static/chunks/139-17ed572570f5a2bf.js new file mode 100644 index 0000000..bf97cf7 --- /dev/null +++ b/test_assets/out/_next/static/chunks/139-17ed572570f5a2bf.js @@ -0,0 +1,25 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[139],{3644: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},{})})},325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return o}});let n=r(3391),u=r(7503);function o(e,t){return(0,u.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)},3817:function(e,t){"use strict";function r(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 u=document.createElement("script");if(n)for(let e in n)"children"!==e&&u.setAttribute(e,n[e]);r?(u.src=r,u.onload=()=>e(),u.onerror=t):n&&(u.innerHTML=n.children,setTimeout(e)),document.head.appendChild(u)}))},Promise.resolve()).then(()=>{r()}).catch(e=>{console.error(e),r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return r}}),window.next={version:"13.4.3",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)},5834:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return u}});let n=r(7858);async function u(e,t){let r=(0,n.getServerActionDispatcher)();if(!r)throw Error("Invariant: missing action dispatcher.");return new Promise((n,u)=>{r({actionId:e,actionArgs:t,resolve:n,reject: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)},8487:function(e,t,r){"use strict";let n,u;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return A}});let o=r(6927),a=r(5909);r(3644);let l=o._(r(3194)),i=a._(r(6006)),c=r(3814),s=r(508);r(6996);let f=o._(r(8670)),d=r(5834),p=r(4315),h=r(7375),y=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),r=0;r{if((0,p.isNextRouterError)(e.error)){e.preventDefault();return}});let _=r.u,b={};r.u=e=>encodeURI(b[e]||_(e)),self.__next_require__=r,self.__next_chunk_load__=e=>{if(!e)return Promise.resolve();let[t,n]=e.split(":");return b[t]=n,r.e(t)};let v=document,m=()=>{let{pathname:e,search:t}=location;return e+t},g=new TextEncoder,O=!1,P=!1;function E(e){if(0===e[0])n=[];else{if(!n)throw Error("Unexpected server data: missing bootstrap script.");u?u.enqueue(g.encode(e[1])):n.push(e[1])}}let R=function(){u&&!P&&(u.close(),P=!0,n=void 0),O=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",R,!1):R();let j=self.__next_f=self.__next_f||[];j.forEach(E),j.push=E;let S=new Map;function T(e){let{cacheKey:t}=e;i.default.useEffect(()=>{S.delete(t)});let r=function(e){let t=S.get(e);if(t)return t;let r=new ReadableStream({start(e){n&&(n.forEach(t=>{e.enqueue(g.encode(t))}),O&&!P&&(e.close(),P=!0,n=void 0)),u=e}}),o=(0,c.createFromReadableStream)(r,{callServer:d.callServer});return S.set(e,o),o}(t),o=(0,i.use)(r);return o}let M=i.default.Fragment;function w(e){let{children:t}=e;return i.default.useEffect(()=>{},[]),t}function C(e){let t=m();return i.default.createElement(T,{...e,cacheKey:t})}function A(){let e=i.default.createElement(M,null,i.default.createElement(s.HeadManagerContext.Provider,{value:{appDir:!0}},i.default.createElement(w,null,i.default.createElement(C,null)))),t={onRecoverableError:f.default},r="__next_error__"===document.documentElement.id,n=r?l.default.createRoot(v,t):i.default.startTransition(()=>l.default.hydrateRoot(v,e,t));r&&n.render(e),(0,h.linkGc)()}("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)},7375:function(e,t){"use strict";function r(){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"linkGc",{enumerable:!0,get:function(){return 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)},7732:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(3817);(0,n.appBootstrap)(()=>{r(7858),r(9544);let{hydrate:e}=r(8487);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)},4938:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AppRouterAnnouncer",{enumerable:!0,get:function(){return a}});let n=r(6006),u=r(8431),o="next-route-announcer";function a(e){let{tree:t}=e,[r,a]=(0,n.useState)(null);(0,n.useEffect)(()=>{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.setAttribute("aria-live","assertive"),t.setAttribute("id","__next-route-announcer__"),t.setAttribute("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 a(e),()=>{let e=document.getElementsByTagName(o)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}},[]);let[l,i]=(0,n.useState)(""),c=(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!==c.current&&i(e),c.current=e},[t]),r?(0,u.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)},1943: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 u},NEXT_ROUTER_PREFETCH:function(){return o},NEXT_URL:function(){return a},FETCH_CACHE_HEADER:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return i},RSC_VARY_HEADER:function(){return c},FLIGHT_PARAMETERS:function(){return s}});let r="RSC",n="Next-Action",u="Next-Router-State-Tree",o="Next-Router-Prefetch",a="Next-Url",l="x-vercel-sc-headers",i="text/x-component",c=r+", "+u+", "+o,s=[[r],[u],[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)},7858: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 P},urlToUrlWithoutFlightMarker:function(){return E},default:function(){return T}});let n=r(5909),u=n._(r(6006)),o=r(6996),a=r(520),l=r(245),i=r(1439),c=r(9297),s=r(128),f=r(3055),d=r(839),p=r(2823),h=r(325),y=r(4938),_=r(2348),b=r(6287),v=r(9366),m=r(6148),g=new Map,O=null;function P(){return O}function E(e){let t=new URL(e,location.origin);return t}function R(e){return e.origin!==window.location.origin}function j(e){let{tree:t,pushRef:r,canonicalUrl:n,sync:o}=e;return u.default.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}function S(e){let{initialHead:t,initialTree:r,initialCanonicalUrl:n,children:i,assetPrefix:f,notFound:P,notFoundStyles:E,asNotFound:S}=e,T=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({children:i,initialCanonicalUrl:n,initialTree:r,initialParallelRoutes:g,isServer:!1,location:window.location,initialHead:t}),[i,n,r,t]),[{tree:M,cache:w,prefetchCache:C,pushRef:A,focusAndScrollRef:x,canonicalUrl:I,nextUrl:N},D,F]=(0,s.useReducerWithReduxDevtools)(a.reducer,T);(0,u.useEffect)(()=>{g=null},[]);let{searchParams:k,pathname:L}=(0,u.useMemo)(()=>{let e=new URL(I,window.location.href);return{searchParams:e.searchParams,pathname:e.pathname}},[I]),U=(0,u.useCallback)((e,t,r)=>{u.default.startTransition(()=>{D({type:l.ACTION_SERVER_PATCH,flightData:t,previousTree:e,overrideCanonicalUrl:r,cache:{status:o.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},mutable:{}})})},[D]),H=(0,u.useCallback)((e,t,r)=>{let n=new URL((0,h.addBasePath)(e),location.origin);return D({type:l.ACTION_NAVIGATE,url:n,isExternalUrl:R(n),locationSearch:location.search,forceOptimisticNavigation:r,navigateType:t,cache:{status:o.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},mutable:{}})},[D]),$=(0,u.useCallback)(e=>{u.default.startTransition(()=>{D({...e,type:l.ACTION_SERVER_ACTION,mutable:{},navigate:H,changeByServerResponse:U})})},[U,D,H]);O=$;let B=(0,u.useMemo)(()=>{let e={back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{if((0,p.isBot)(window.navigator.userAgent))return;let r=new URL((0,h.addBasePath)(e),location.origin);R(r)||u.default.startTransition(()=>{var e;D({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={}),u.default.startTransition(()=>{H(e,"replace",!!t.forceOptimisticNavigation)})},push:(e,t)=>{void 0===t&&(t={}),u.default.startTransition(()=>{H(e,"push",!!t.forceOptimisticNavigation)})},refresh:()=>{u.default.startTransition(()=>{D({type:l.ACTION_REFRESH,cache:{status:o.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},mutable:{},origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}};return e},[D,H]);if(window.nd={router:B,cache:w,prefetchCache:C,tree:M},A.mpaNavigation){let e=window.location;A.pendingPush?e.assign(I):e.replace(I),(0,u.use)((0,m.createInfinitePromise)())}let W=(0,u.useCallback)(e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}u.default.startTransition(()=>{D({type:l.ACTION_RESTORE,url:new URL(window.location.href),tree:t.tree})})}},[D]);(0,u.useEffect)(()=>(window.addEventListener("popstate",W),()=>{window.removeEventListener("popstate",W)}),[W]);let Y=(0,u.useMemo)(()=>(0,v.findHeadInCache)(w,M[1]),[w,M]),V=u.default.createElement(b.NotFoundBoundary,{notFound:P,notFoundStyles:E,asNotFound:S},u.default.createElement(_.RedirectBoundary,null,Y,w.subTreeData,u.default.createElement(y.AppRouterAnnouncer,{tree:M})));return u.default.createElement(u.default.Fragment,null,u.default.createElement(j,{tree:M,pushRef:A,canonicalUrl:I,sync:F}),u.default.createElement(c.PathnameContext.Provider,{value:L},u.default.createElement(c.SearchParamsContext.Provider,{value:k},u.default.createElement(o.GlobalLayoutRouterContext.Provider,{value:{changeByServerResponse:U,tree:M,focusAndScrollRef:x,nextUrl:N}},u.default.createElement(o.AppRouterContext.Provider,{value:B},u.default.createElement(o.LayoutRouterContext.Provider,{value:{childNodes:w.parallelRoutes,tree:M,url:I}},V))))))}function T(e){let{globalErrorComponent:t,...r}=e;return u.default.createElement(f.ErrorBoundary,{errorComponent:t},u.default.createElement(S,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)},5425:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return n}});class r{disable(){throw Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available")}getStore(){}run(){throw Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available")}exit(){throw Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available")}enterWith(){throw Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available")}}function n(){return globalThis.AsyncLocalStorage?new globalThis.AsyncLocalStorage:new 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)},3642:function(e,t,r){"use strict";function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return n}}),r(6927),r(6006),("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)},3055: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 l},default:function(){return i},ErrorBoundary:function(){return c}});let n=r(6927),u=n._(r(6006)),o=r(167),a={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:{textAlign:"left"},text:{fontSize:"14px",fontWeight:400,lineHeight:"3em",margin:0}};class l extends u.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?u.default.createElement(u.default.Fragment,null,this.props.errorStyles,u.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 i(e){let{error:t}=e;return u.default.createElement("html",null,u.default.createElement("head",null),u.default.createElement("body",null,u.default.createElement("div",{style:a.error},u.default.createElement("div",{style:a.desc},u.default.createElement("h2",{style:a.text},"Application error: a client-side exception has occurred (see the browser console for more information)."),(null==t?void 0:t.digest)&&u.default.createElement("p",{style:a.text},"Digest: "+t.digest)))))}function c(e){let{errorComponent:t,errorStyles:r,children:n}=e,a=(0,o.usePathname)();return t?u.default.createElement(l,{pathname:a,errorComponent:t,errorStyles:r},n):u.default.createElement(u.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)},7759: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 n}});let r="DYNAMIC_SERVER_USAGE";class n 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)},6148:function(e,t){"use strict";let r;function n(){return r||(r=new Promise(()=>{})),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInfinitePromise",{enumerable:!0,get:function(){return 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)},4315:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return o}});let n=r(7476),u=r(5580);function o(e){return e&&e.digest&&((0,u.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)},9544:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});let n=r(6927),u=r(5909),o=u._(r(6006)),a=n._(r(8431)),l=r(6996),i=r(406),c=r(6148),s=r(3055),f=r(7450),d=r(7412),p=r(2348),h=r(6287),y=r(468),_=r(93),b=["bottom","height","left","right","top","width","x","y"];function v(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}class m 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,f.matchSegment)(t,e[r]))))return;let n=null,u=e.hashFragment;if(u&&(n="top"===u?document.body:null!=(r=document.getElementById(u))?r:document.getElementsByName(u)[0]),n||(n=a.default.findDOMNode(this)),!(n instanceof Element))return;for(;!(n instanceof HTMLElement)||function(e){let t=e.getBoundingClientRect();return b.every(e=>0===t[e])}(n);){if(null===n.nextElementSibling)return;n=n.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,d.handleSmoothScroll)(()=>{if(u){window.scrollTo(0,n.offsetTop);return}let e=document.documentElement,t=e.clientHeight;!v(n,t)&&(e.scrollTop=0,v(n,t)||n.scrollIntoView())},{dontForceLayout:!0}),n.focus()}}}}function g(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(m,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef},r)}function O(e){let{parallelRouterKey:t,url:r,childNodes:n,childProp:u,segmentPath:a,tree:s,cacheKey:d}=e,p=(0,o.useContext)(l.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{changeByServerResponse:h,tree:y}=p,_=n.get(d);if(u&&null!==u.current&&(_?_.status===l.CacheStates.LAZY_INITIALIZED&&(_.status=l.CacheStates.READY,_.subTreeData=u.current):(n.set(d,{status:l.CacheStates.READY,data:null,subTreeData:u.current,parallelRoutes:new Map}),_=n.get(d))),!_||_.status===l.CacheStates.LAZY_INITIALIZED){let e=function e(t,r){if(t){let[n,u]=t,o=2===t.length;if((0,f.matchSegment)(r[0],n)&&r[1].hasOwnProperty(u)){if(o){let t=e(void 0,r[1][u]);return[r[0],{...r[1],[u]:[t[0],t[1],t[2],"refetch"]}]}return[r[0],{...r[1],[u]:e(t.slice(2),r[1][u])}]}}return r}(["",...a],y);n.set(d,{status:l.CacheStates.DATA_FETCH,data:(0,i.fetchServerResponse)(new URL(r,location.origin),e,p.nextUrl),subTreeData:null,head:_&&_.status===l.CacheStates.LAZY_INITIALIZED?_.head:void 0,parallelRoutes:_&&_.status===l.CacheStates.LAZY_INITIALIZED?_.parallelRoutes:new Map}),_=n.get(d)}if(!_)throw Error("Child node should always exist");if(_.subTreeData&&_.data)throw Error("Child node should not have both subTreeData and data");if(_.data){let[e,t]=(0,o.use)(_.data);if("string"==typeof e)return window.location.href=r,null;_.data=null,setTimeout(()=>{o.default.startTransition(()=>{h(y,e,t)})}),(0,o.use)((0,c.createInfinitePromise)())}_.subTreeData||(0,o.use)((0,c.createInfinitePromise)());let b=o.default.createElement(l.LayoutRouterContext.Provider,{value:{tree:s[1][t],childNodes:_.parallelRoutes,url:r}},_.subTreeData);return b}function P(e){let{children:t,loading:r,loadingStyles:n,hasLoading:u}=e;return u?o.default.createElement(o.default.Suspense,{fallback:o.default.createElement(o.default.Fragment,null,n,r)},t):o.default.createElement(o.default.Fragment,null,t)}function E(e){let{parallelRouterKey:t,segmentPath:r,childProp:n,error:u,errorStyles:a,templateStyles:i,loading:c,loadingStyles:d,hasLoading:b,template:v,notFound:m,notFoundStyles:E,asNotFound:R,styles:j}=e,S=(0,o.useContext)(l.LayoutRouterContext);if(!S)throw Error("invariant expected layout router to be mounted");let{childNodes:T,tree:M,url:w}=S,C=T.get(t);C||(T.set(t,new Map),C=T.get(t));let A=M[1][t][0],x=n.segment,I=(0,y.getSegmentValue)(A);return o.default.createElement(o.default.Fragment,null,j,[A].map(e=>{let j=(0,f.matchSegment)(e,x),S=(0,y.getSegmentValue)(e),T=(0,_.createRouterCacheKey)(e);return o.default.createElement(l.TemplateContext.Provider,{key:(0,_.createRouterCacheKey)(e,!0),value:o.default.createElement(g,{segmentPath:r},o.default.createElement(s.ErrorBoundary,{errorComponent:u,errorStyles:a},o.default.createElement(P,{hasLoading:b,loading:c,loadingStyles:d},o.default.createElement(h.NotFoundBoundary,{notFound:m,notFoundStyles:E,asNotFound:R},o.default.createElement(p.RedirectBoundary,null,o.default.createElement(O,{parallelRouterKey:t,url:w,tree:M,childNodes:C,childProp:j?n:null,segmentPath:r,cacheKey:T,isActive:I===S}))))))},o.default.createElement(o.default.Fragment,null,i,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)},7450: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 u},canSegmentBeOverridden:function(){return o}});let n=r(4778),u=(e,t)=>"string"==typeof e&&"string"==typeof t?e===t:!!(Array.isArray(e)&&Array.isArray(t))&&e[0]===t[0]&&e[1]===t[1],o=(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)},167: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 p},useSearchParams:function(){return h},usePathname:function(){return y},ServerInsertedHTMLContext:function(){return i.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return i.useServerInsertedHTML},useRouter:function(){return _},useParams:function(){return b},useSelectedLayoutSegments:function(){return v},useSelectedLayoutSegment:function(){return m},redirect:function(){return c.redirect},notFound:function(){return s.notFound}});let n=r(6006),u=r(6996),o=r(9297),a=r(3642),l=r(468),i=r(190),c=r(5580),s=r(7476),f=Symbol("internal for urlsearchparams readonly");function d(){return Error("ReadonlyURLSearchParams cannot be modified")}class p{[Symbol.iterator](){return this[f][Symbol.iterator]()}append(){throw d()}delete(){throw d()}set(){throw d()}sort(){throw d()}constructor(e){this[f]=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)}}function h(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,n.useContext)(o.SearchParamsContext),t=(0,n.useMemo)(()=>e?new p(e):null,[e]);return t}function y(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,n.useContext)(o.PathnameContext)}function _(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,n.useContext)(u.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function b(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,n.useContext)(u.GlobalLayoutRouterContext);return e?function e(t,r){void 0===r&&(r={});let n=t[1];for(let t of Object.values(n)){let n=t[0],u=Array.isArray(n),o=u?n[1]:n;!o||o.startsWith("__PAGE__")||(u&&(r[n[0]]=n[1]),r=e(t,r))}return r}(e.tree):null}function v(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,n.useContext)(u.LayoutRouterContext);return function e(t,r,n,u){let o;if(void 0===n&&(n=!0),void 0===u&&(u=[]),n)o=t[1][r];else{var a;let e=t[1];o=null!=(a=e.children)?a:Object.values(e)[0]}if(!o)return u;let i=o[0],c=(0,l.getSegmentValue)(i);return!c||c.startsWith("__PAGE__")?u:(u.push(c),e(o,r,!1,u))}(t,e)}function m(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=v(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)},6287:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return l}});let n=r(6927),u=n._(r(6006)),o=r(167);class a extends u.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?u.default.createElement(u.default.Fragment,null,u.default.createElement("meta",{name:"robots",content:"noindex"}),this.props.notFoundStyles,this.props.notFound):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function l(e){let{notFound:t,notFoundStyles:r,asNotFound:n,children:l}=e,i=(0,o.usePathname)();return t?u.default.createElement(a,{pathname:i,notFound:t,notFoundStyles:r,asNotFound:n},l):u.default.createElement(u.default.Fragment,null,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)},7476: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 n},isNotFoundError:function(){return u}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function u(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)},2348: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 i},RedirectBoundary:function(){return c}});let n=r(5909),u=n._(r(6006)),o=r(167),a=r(5580);function l(e){let{redirect:t,reset:r,redirectType:n}=e,l=(0,o.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{n===a.RedirectType.push?l.push(t,{}):l.replace(t,{}),r()})},[t,n,r,l]),null}class i extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e)){let t=(0,a.getURLFromRedirectError)(e),r=(0,a.getRedirectTypeFromError)(e);return{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?u.default.createElement(l,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function c(e){let{children:t}=e,r=(0,o.useRouter)();return u.default.createElement(i,{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)},5580:function(e,t,r){"use strict";var n,u;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 l},redirect:function(){return i},isRedirectError:function(){return c},getURLFromRedirectError:function(){return s},getRedirectTypeFromError:function(){return f}});let o=r(8168),a="NEXT_REDIRECT";function l(e,t){let r=Error(a);r.digest=a+";"+t+";"+e;let n=o.requestAsyncStorage.getStore();return n&&(r.mutableCookies=n.mutableCookies),r}function i(e,t){throw void 0===t&&(t="replace"),l(e,t)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,r,n]=e.digest.split(";",3);return t===a&&("replace"===r||"push"===r)&&"string"==typeof n}function s(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(u=n||(n={})).push="push",u.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)},99:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(5909),u=n._(r(6006)),o=r(6996);function a(){let e=(0,u.useContext)(o.TemplateContext);return u.default.createElement(u.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)},9668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return a}});let n=r(6996),u=r(2594),o=r(9543);function a(e,t,r,a){void 0===a&&(a=!1);let[l,i,c]=r.slice(-3);return null!==i&&(3===r.length?(t.status=n.CacheStates.READY,t.subTreeData=i,(0,u.fillLazyItemsTillLeafWithHead)(t,e,l,c,a)):(t.status=n.CacheStates.READY,t.subTreeData=e.subTreeData,t.parallelRoutes=new Map(e.parallelRoutes),(0,o.fillCacheWithNewSubTreeData)(t,e,r,a)),!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)},3713:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,r,o){let a;let[l,i,,,c]=r;if(1===t.length){let e=u(r,o);return e}let[s,f]=t;if(!(0,n.matchSegment)(s,l))return null;let d=2===t.length;if(d)a=u(i[f],o);else if(null===(a=e(t.slice(2),i[f],o)))return null;let p=[t[0],{...i,[f]:a}];return c&&(p[4]=!0),p}}});let n=r(7450);function u(e,t){let[r,o]=e,[a,l]=t;if("__DEFAULT__"===a&&"__DEFAULT__"!==r)return e;if((0,n.matchSegment)(r,a)){let t={};for(let e in o){let r=void 0!==l[e];r?t[e]=u(o[e],l[e]):t[e]=o[e]}for(let e in l)t[e]||(t[e]=l[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)},2648: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 l},computeChangedPath:function(){return i}});let n=r(7399),u=r(7450),o=e=>"string"==typeof e?e:e[1];function a(e){return e.split("/").reduce((e,t)=>""===t||t.startsWith("(")&&t.endsWith(")")?e:e+"/"+t,"")||"/"}function l(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 u=[r],o=null!=(t=e[1])?t:{},i=o.children?l(o.children):void 0;if(void 0!==i)u.push(i);else for(let[e,t]of Object.entries(o)){if("children"===e)continue;let r=l(t);void 0!==r&&u.push(r)}return a(u.join("/"))}function i(e,t){let r=function e(t,r){let[a,i]=t,[c,s]=r,f=o(a),d=o(c);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(a,c)){var p;return null!=(p=l(r))?p:""}for(let t in i)if(s[t]){let r=e(i[t],s[t]);if(null!==r)return o(c)+"/"+r}return null}(e,t);return null==r||"/"===r?r:a(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)},1439:function(e,t){"use strict";function r(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 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,"createInitialRouterState",{enumerable:!0,get:function(){return l}});let n=r(6996),u=r(1439),o=r(2594),a=r(2648);function l(e){var t;let{initialTree:r,children:l,initialCanonicalUrl:i,initialParallelRoutes:c,isServer:s,location:f,initialHead:d}=e,p={status:n.CacheStates.READY,data:null,subTreeData:l,parallelRoutes:s?new Map:c};return(null===c||0===c.size)&&(0,o.fillLazyItemsTillLeafWithHead)(p,void 0,r,d),{tree:r,cache:p,prefetchCache:new Map,pushRef:{pendingPush:!1,mpaNavigation:!1},focusAndScrollRef:{apply:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:f?(0,u.createHrefFromUrl)(f):i,nextUrl:null!=(t=(0,a.extractPathFromFlightRouterState)(r)||(null==f?void 0:f.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)},593:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createOptimisticTree",{enumerable:!0,get:function(){return function e(t,r,u){let o;let[a,l,i,c,s]=r||[null,{}],f=t[0],d=1===t.length,p=null!==a&&(0,n.matchSegment)(a,f),h=Object.keys(l).length>1,y=!r||!p||h,_={};if(null!==a&&p&&(_=l),!d&&!h){let r=e(t.slice(1),_?_.children:null,u||y);o=r}let b=[f,{..._,...o?{children:o}:{}}];return i&&(b[2]=i),!u&&y?b[3]="refetch":p&&c&&(b[3]=c),p&&s&&(b[4]=s),b}}});let n=r(7450);("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)},3239:function(e,t){"use strict";function r(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.value=t)}),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRecordFromThenable",{enumerable:!0,get:function(){return 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)},93:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=!1),Array.isArray(e)?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith("__PAGE__")?"__PAGE__":e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return 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)},406:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return i}});let n=r(3814),u=r(1943),o=r(7858),a=r(5834),l=r(245);async function i(e,t,r,i){let c={[u.RSC]:"1",[u.NEXT_ROUTER_STATE_TREE]:JSON.stringify(t)};i===l.PrefetchKind.AUTO&&(c[u.NEXT_ROUTER_PREFETCH]="1"),r&&(c[u.NEXT_URL]=r);try{let t=e;(t=new URL(e)).pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt";let r=await fetch(t,{credentials:"same-origin",headers:c}),l=r.redirected?(0,o.urlToUrlWithoutFlightMarker)(r.url):void 0,i=r.headers.get("content-type")||"",s=i===u.RSC_CONTENT_TYPE_HEADER;if(s||(s=i.startsWith("text/plain")),!s)return[r.url,void 0];let f=await (0,n.createFromFetch)(Promise.resolve(r),{callServer:a.callServer});return[f,l]}catch(t){return console.error("Failed to fetch RSC payload. 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)},4811:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function e(t,r,o,a,l){void 0===l&&(l=!1);let i=o.length<=2,[c,s]=o,f=(0,u.createRouterCacheKey)(s),d=r.parallelRoutes.get(c);if(!d||l&&r.parallelRoutes.size>1)return{bailOptimistic:!0};let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){y&&y.data&&y!==h||p.set(f,{status:n.CacheStates.DATA_FETCH,data:a(),subTreeData:null,parallelRoutes:new Map});return}if(!y||!h){y||p.set(f,{status:n.CacheStates.DATA_FETCH,data:a(),subTreeData:null,parallelRoutes:new Map});return}return y===h&&(y={status:y.status,data:y.data,subTreeData:y.subTreeData,parallelRoutes:new Map(y.parallelRoutes)},p.set(f,y)),e(y,h,o.slice(2),a)}}});let n=r(6996),u=r(93);("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)},9543:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,r,l,i){let c=l.length<=5,[s,f]=l,d=(0,a.createRouterCacheKey)(f),p=r.parallelRoutes.get(s);if(!p)return;let h=t.parallelRoutes.get(s);h&&h!==p||(h=new Map(p),t.parallelRoutes.set(s,h));let y=p.get(d),_=h.get(d);if(c){_&&_.data&&_!==y||(_={status:n.CacheStates.READY,data:null,subTreeData:l[3],parallelRoutes:y?new Map(y.parallelRoutes):new Map},y&&(0,u.invalidateCacheByRouterState)(_,y,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(_,y,l[2],l[4],i),h.set(d,_));return}_&&y&&(_===y&&(_={status:_.status,data:_.data,subTreeData:_.subTreeData,parallelRoutes:new Map(_.parallelRoutes)},h.set(d,_)),e(_,y,l.slice(2),i))}}});let n=r(6996),u=r(2395),o=r(2594),a=r(93);("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)},2594:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,r,o,a,l){let i=0===Object.keys(o[1]).length;if(i){t.head=a;return}for(let i in o[1]){let c=o[1][i],s=c[0],f=(0,u.createRouterCacheKey)(s);if(r){let u=r.parallelRoutes.get(i);if(u){let r=new Map(u),o=r.get(f),s=l&&o?{status:o.status,data:o.data,subTreeData:o.subTreeData,parallelRoutes:new Map(o.parallelRoutes)}:{status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map(null==o?void 0:o.parallelRoutes)};r.set(f,s),e(s,o,c,a,l),t.parallelRoutes.set(i,r);continue}}let d={status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},p=t.parallelRoutes.get(i);p?p.set(f,d):t.parallelRoutes.set(i,new Map([[f,d]])),e(d,void 0,c,a,l)}}}});let n=r(6996),u=r(93);("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)},299:function(e,t){"use strict";var r,n;function u(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(),p=(0,c.fillCacheWithDataProperty)(i,e.cache,d,()=>f,!0);if(!(null==p?void 0:p.bailOptimistic))return R.previousTree=e.tree,R.patchedTree=a,R.pendingPush=w,R.hashFragment=T,R.scrollableSegments=[],R.cache=i,R.canonicalUrl=M,e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),{data:Promise.resolve(f),kind:h.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:Date.now()}),(0,y.handleMutable)(e,R)}if(!A){let t=(0,o.createRecordFromThenable)((0,u.fetchServerResponse)(r,e.tree,e.nextUrl)),n={data:Promise.resolve(t),kind:h.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:null};e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),n),A=n}let x=(0,b.getPrefetchEntryCacheStatus)(A),{treeAtTimeOfPrefetch:I,data:N}=A,[D,F]=(0,a.readRecordValue)(N);if(A.lastUsedTime=Date.now(),"string"==typeof D)return m(e,R,D,w);let k=e.tree,L=e.cache,U=[];for(let t of D){let o=t.slice(0,-4),[a]=t.slice(-3),l=(0,f.applyRouterStatePatchToTree)(["",...o],k,a);if(null===l&&(l=(0,f.applyRouterStatePatchToTree)(["",...o],I,a)),null!==l){if((0,p.isNavigatingToNewRootLayout)(k,l))return m(e,R,M,w);let s=(0,_.applyFlightData)(L,E,t,"auto"===A.kind&&x===b.PrefetchCacheEntryStatus.reusable);s||x!==b.PrefetchCacheEntryStatus.stale||(s=function(e,t,r,u,o){let a=!1;e.status=n.CacheStates.READY,e.subTreeData=t.subTreeData,e.parallelRoutes=new Map(t.parallelRoutes);let l=g(u).map(e=>[...r,...e]);for(let r of l){let n=(0,c.fillCacheWithDataProperty)(e,t,r,o);(null==n?void 0:n.bailOptimistic)||(a=!0)}return a}(E,L,o,a,()=>(0,u.fetchServerResponse)(r,k,e.nextUrl)));let f=(0,d.shouldHardNavigate)(["",...o],k);for(let e of(f?(E.status=n.CacheStates.READY,E.subTreeData=L.subTreeData,(0,i.invalidateCacheBelowFlightSegmentPath)(E,L,o),R.cache=E):s&&(R.cache=E),L=E,k=l,g(a))){let t=[...o,...e];"__DEFAULT__"!==t[t.length-1]&&U.push(t)}}}return R.previousTree=e.tree,R.patchedTree=k,R.scrollableSegments=U,R.canonicalUrl=F?(0,l.createHrefFromUrl)(F):M,R.pendingPush=w,R.hashFragment=T,(0,y.handleMutable)(e,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)},8478:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prefetchReducer",{enumerable:!0,get:function(){return i}});let n=r(1439),u=r(406),o=r(245),a=r(3239),l=r(5387);function i(e,t){(0,l.prunePrefetchCache)(e.prefetchCache);let{url:r}=t,i=(0,n.createHrefFromUrl)(r,!1),c=e.prefetchCache.get(i);if(c&&(c.kind===o.PrefetchKind.TEMPORARY&&e.prefetchCache.set(i,{...c,kind:t.kind}),!(c.kind===o.PrefetchKind.AUTO&&t.kind===o.PrefetchKind.FULL)))return e;let s=(0,a.createRecordFromThenable)((0,u.fetchServerResponse)(r,e.tree,e.nextUrl,t.kind));return e.prefetchCache.set(i,{treeAtTimeOfPrefetch:e.tree,data:s,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)},5387:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prunePrefetchCache",{enumerable:!0,get:function(){return u}});let n=r(299);function u(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)},8777:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return p}});let n=r(406),u=r(3239),o=r(5320),a=r(1439),l=r(3713),i=r(439),c=r(566),s=r(9318),f=r(6996),d=r(2594);function p(e,t){let{cache:r,mutable:p,origin:h}=t,y=e.canonicalUrl,_=JSON.stringify(p.previousTree)===JSON.stringify(e.tree);if(_)return(0,s.handleMutable)(e,p);r.data||(r.data=(0,u.createRecordFromThenable)((0,n.fetchServerResponse)(new URL(y,h),[e.tree[0],e.tree[1],e.tree[2],"refetch"],e.nextUrl)));let[b,v]=(0,o.readRecordValue)(r.data);if("string"==typeof b)return(0,c.handleExternalUrl)(e,p,b,e.pushRef.pendingPush);r.data=null;let m=e.tree;for(let t of b){if(3!==t.length)return console.log("REFRESH FAILED"),e;let[n]=t,u=(0,l.applyRouterStatePatchToTree)([""],m,n);if(null===u)throw Error("SEGMENT MISMATCH");if((0,i.isNavigatingToNewRootLayout)(m,u))return(0,c.handleExternalUrl)(e,p,y,e.pushRef.pendingPush);let o=v?(0,a.createHrefFromUrl)(v):void 0;v&&(p.canonicalUrl=o);let[s,h]=t.slice(-2);null!==s&&(r.status=f.CacheStates.READY,r.subTreeData=s,(0,d.fillLazyItemsTillLeafWithHead)(r,void 0,n,h),p.cache=r,p.prefetchCache=new Map),p.previousTree=m,p.patchedTree=u,p.canonicalUrl=y,m=u}return(0,s.handleMutable)(e,p)}("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)},9201:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let n=r(1439);function u(e,t){let{url:r,tree:u}=t,o=(0,n.createHrefFromUrl)(r);return{canonicalUrl:o,pushRef:e.pushRef,focusAndScrollRef:e.focusAndScrollRef,cache:e.cache,prefetchCache:e.prefetchCache,tree:u,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)},4449:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return p}});let n=r(5834),u=r(1943),o=r(3239),a=r(5320),l=r(3814),i=r(245),c=r(325),s=r(1439),f=r(5580);async function d(e,t){let{actionId:r,actionArgs:o}=t,a=await (0,l.encodeReply)(o),i=await fetch("",{method:"POST",headers:{Accept:u.RSC_CONTENT_TYPE_HEADER,"Next-Action":r,[u.NEXT_ROUTER_STATE_TREE]:JSON.stringify(e.tree),...e.nextUrl?{[u.NEXT_URL]:e.nextUrl}:{}},body:a}),s=i.headers.get("x-action-redirect"),f=s?new URL((0,c.addBasePath)(s),window.location.origin):void 0;if(i.headers.get("content-type")===u.RSC_CONTENT_TYPE_HEADER){let e=await (0,l.createFromFetch)(Promise.resolve(i),{callServer:n.callServer});if(s)return{actionFlightData:e,redirectLocation:f};{let[t,r]=null!=e?e:[];return{actionResult:t,actionFlightData:r,redirectLocation:f}}}return{redirectLocation:f}}function p(e,t){if(t.mutable.serverActionApplied)return e;t.mutable.inFlightServerAction||(t.mutable.previousTree=e.tree,t.mutable.previousUrl=e.canonicalUrl,t.mutable.inFlightServerAction=(0,o.createRecordFromThenable)(d(e,t)));try{var r,n;let{actionResult:u,actionFlightData:l,redirectLocation:c}=(0,a.readRecordValue)(t.mutable.inFlightServerAction);if(c){if(l){let n=(0,s.createHrefFromUrl)(c,!1),u=e.prefetchCache.get(n);e.prefetchCache.set(n,{data:(0,o.createRecordFromThenable)(Promise.resolve([l,void 0])),kind:null!=(r=null==u?void 0:u.kind)?r:i.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:t.mutable.previousTree,lastUsedTime:null})}t.reject((0,f.getRedirectError)(c.toString(),f.RedirectType.push))}else{if(l){let r=(0,s.createHrefFromUrl)(new URL(t.mutable.previousUrl,window.location.origin),!1),u=e.prefetchCache.get(r);e.prefetchCache.set((0,s.createHrefFromUrl)(new URL(t.mutable.previousUrl,window.location.origin),!1),{data:(0,o.createRecordFromThenable)(Promise.resolve([l,void 0])),kind:null!=(n=null==u?void 0:u.kind)?n:i.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:t.mutable.previousTree,lastUsedTime:null}),setTimeout(()=>{t.changeByServerResponse(t.mutable.previousTree,l,void 0)})}t.resolve(u)}}catch(e){if("rejected"===e.status)t.reject(e.value);else throw e}return t.mutable.serverActionApplied=!0,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)},3548:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return c}});let n=r(1439),u=r(3713),o=r(439),a=r(566),l=r(9668),i=r(9318);function c(e,t){let{flightData:r,previousTree:c,overrideCanonicalUrl:s,cache:f,mutable:d}=t,p=JSON.stringify(c)===JSON.stringify(e.tree);if(!p)return console.log("TREE MISMATCH"),e;if(d.previousTree)return(0,i.handleMutable)(e,d);if("string"==typeof r)return(0,a.handleExternalUrl)(e,d,r,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let t of r){let r=t.slice(0,-4),[i]=t.slice(-3,-2),c=(0,u.applyRouterStatePatchToTree)(["",...r],h,i);if(null===c)throw Error("SEGMENT MISMATCH");if((0,o.isNavigatingToNewRootLayout)(h,c))return(0,a.handleExternalUrl)(e,d,e.canonicalUrl,e.pushRef.pendingPush);let p=s?(0,n.createHrefFromUrl)(s):void 0;p&&(d.canonicalUrl=p),(0,l.applyFlightData)(y,f,t),d.previousTree=h,d.patchedTree=c,d.cache=f,y=f,h=c}return(0,i.handleMutable)(e,d)}("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)},245: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 u},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return c},ACTION_SERVER_ACTION:function(){return s}});let u="refresh",o="navigate",a="restore",l="server-patch",i="prefetch",c="fast-refresh",s="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)},520:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let n=r(245),u=r(566),o=r(3548),a=r(9201),l=r(8777),i=r(8478),c=r(5782),s=r(4449),f=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,u.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,o.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,a.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,l.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,s.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)},6572:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,r){let[u,o]=r,[a,l]=t;if(!(0,n.matchSegment)(a,u))return!!Array.isArray(a);let i=t.length<=2;return!i&&e(t.slice(2),o[l])}}});let n=r(7450);("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)},9009:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return u}});let n=r(4864);function u(){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)},4864:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationBailout",{enumerable:!0,get:function(){return a}});let n=r(7759),u=r(6583);class o extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}}let a=(e,t)=>{let r=u.staticGenerationAsyncStorage.getStore();if(null==r?void 0:r.forceStatic)return!0;if(null==r?void 0:r.dynamicShouldError){let{dynamic:r="error",link:n}=t||{};throw new o('Page with `dynamic = "'+r+"\"` couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:""))}if(r&&(r.revalidate=0),null==r?void 0:r.isStaticGeneration){let t=new n.DynamicServerError(e);throw r.dynamicUsageDescription=e,r.dynamicUsageStack=t.stack,t}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)},9457:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(6927),u=n._(r(6006)),o=r(9009);function a(e){let{Component:t,propsForComponent:r}=e,n=(0,o.createSearchParamsBailoutProxy)();return u.default.createElement(t,{searchParams:n,...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)},128:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useReducerWithReduxDevtools",{enumerable:!0,get:function(){return o}});let n=r(6006);function u(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]=u(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]=u(n)}return t}return Array.isArray(e)?e.map(u):e}let o=function(e,t){let r=(0,n.useRef)(),o=(0,n.useRef)();(0,n.useEffect)(()=>{if(!r.current&&!1!==o.current){if(void 0===o.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){o.current=!1;return}return r.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),r.current&&r.current.init(u(t)),()=>{r.current=void 0}}},[t]);let[a,l]=(0,n.useReducer)((t,n)=>{let o=e(t,n);return r.current&&r.current.send(n,u(o)),o},t),i=(0,n.useCallback)(()=>{r.current&&r.current.send({type:"RENDER_SYNC"},u(a))},[a]);return[a,l,i]};("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)},7503:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return o}});let n=r(7420),u=r(6980),o=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:o}=(0,u.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)},8670:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=r(8131);function u(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)},6996:function(e,t,r){"use strict";var n,u;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 c},TemplateContext:function(){return s}});let o=r(6927),a=o._(r(6006));(u=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY";let l=a.default.createContext(null),i=a.default.createContext(null),c=a.default.createContext(null),s=a.default.createContext(null)},508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return o}});let n=r(6927),u=n._(r(6006)),o=u.default.createContext({})},9297: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,{SearchParamsContext:function(){return u},PathnameContext:function(){return o}});let n=r(6006),u=(0,n.createContext)(null),o=(0,n.createContext)(null)},8131:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return r}});let r="DYNAMIC_SERVER_USAGE"},5383:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},3391:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return u}});let n=r(6980);function u(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:u,hash:o}=(0,n.parsePath)(e);return""+t+r+u+o}},2622: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,{normalizeAppPath:function(){return u},normalizeRscPath:function(){return o}});let n=r(5383);function u(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||t.startsWith("(")&&t.endsWith(")")||t.startsWith("@")||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function o(e,t){return t?e.replace(/\.rsc($|\?)/,"$1"):e}},7412:function(e,t){"use strict";function r(e,t){void 0===t&&(t={});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 r}})},2823:function(e,t){"use strict";function r(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 r}})},6980:function(e,t){"use strict";function r(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 r}})},7420:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},190: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 a}});let n=r(5909),u=n._(r(6006)),o=u.default.createContext(null);function a(e){let t=(0,u.useContext)(o);t&&t(e)}},8168:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return u}});let n=r(5425),u=(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)},6583:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return u}});let n=r(5425),u=(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)},3194:function(e,t,r){"use strict";var n=r(8431);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},8431:function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(2614)},2672: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(8431),u=r(6006),o={stream:!0},a=new Map,l=new Map;function i(){}var c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,s=Symbol.for("react.element"),f=Symbol.for("react.lazy"),d=Symbol.for("react.default_value"),p=Symbol.iterator,h=Array.isArray,y=new WeakMap;function _(e,t,r,n){var u=1,o=0,a=null;e=JSON.stringify(e,function e(l,i){if(null===i)return null;if("object"==typeof i){if("function"==typeof i.then){null===a&&(a=new FormData),o++;var c,s,f=u++;return i.then(function(n){n=JSON.stringify(n,e);var u=a;u.append(t+f,n),0==--o&&r(u)},function(e){n(e)}),"$@"+f.toString(16)}if(i instanceof FormData){null===a&&(a=new FormData);var d=a,_=t+(l=u++)+"_";return i.forEach(function(e,t){d.append(_+t,e)}),"$K"+l.toString(16)}return!h(i)&&(null===(s=i)||"object"!=typeof s?null:"function"==typeof(s=p&&s[p]||s["@@iterator"])?s:null)?Array.from(i):i}if("string"==typeof i)return"Z"===i[i.length-1]&&this[l]instanceof Date?"$D"+i:i="$"===i[0]?"$"+i:i;if("boolean"==typeof i)return i;if("number"==typeof i)return Number.isFinite(c=i)?0===c&&-1/0==1/c?"$-0":c:1/0===c?"$Infinity":-1/0===c?"$-Infinity":"$NaN";if(void 0===i)return"$undefined";if("function"==typeof i){if(void 0!==(i=y.get(i)))return i=JSON.stringify(i,e),null===a&&(a=new FormData),l=u++,a.set(t+l,i),"$F"+l.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.")}if("symbol"==typeof i){if(Symbol.for(l=i.description)!==i)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+i.description+") cannot be found among global symbols.");return"$S"+l}if("bigint"==typeof i)return"$n"+i.toString(10);throw Error("Type "+typeof i+" is not supported as an argument to a Server Function.")}),null===a?r(e):(a.set(t+"0",e),0===o&&r(a))}var b=new WeakMap;function v(e){var t=y.get(this);if(!t)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var r=null;if(null!==t.bound){if((r=b.get(t))||(n=t,a=new Promise(function(e,t){u=e,o=t}),_(n,"",function(e){if("string"==typeof e){var t=new FormData;t.append("0",e),e=t}a.status="fulfilled",a.value=e,u(e)},function(e){a.status="rejected",a.reason=e,o(e)}),r=a,b.set(t,r)),"rejected"===r.status)throw r.reason;if("fulfilled"!==r.status)throw r;t=r.value;var n,u,o,a,l=new FormData;t.forEach(function(t,r){l.append("$ACTION_"+e+":"+r,t)}),r=l,t="$ACTION_REF_"+e}else t="$ACTION_ID_"+t.id;return{name:t,method:"POST",encType:"multipart/form-data",data:r}}var m=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function g(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function O(e){switch(e.status){case"resolved_model":M(e);break;case"resolved_module":w(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":throw e;default:throw e.reason}}function P(e,t){for(var r=0;r>>1,u=e[n];if(0>>1;no(i,r))co(s,i)?(e[n]=s,e[c]=r,n=c):(e[n]=i,e[l]=r,n=l);else if(co(s,r))e[n]=s,e[c]=r,n=c;else break e}}return t}function o(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 a,l=performance;t.unstable_now=function(){return l.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,b=!1,v="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function O(e){for(var t=n(f);null!==t;){if(null===t.callback)u(f);else if(t.startTime<=e)u(f),t.sortIndex=t.expirationTime,r(s,t);else break;t=n(f)}}function P(e){if(b=!1,O(e),!_){if(null!==n(s))_=!0,I(E);else{var t=n(f);null!==t&&N(P,t.startTime-e)}}}function E(e,r){_=!1,b&&(b=!1,m(S),S=-1),y=!0;var o=h;try{e:{for(O(r),p=n(s);null!==p&&(!(p.expirationTime>r)||e&&!w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var l=a(p.expirationTime<=r);if(r=t.unstable_now(),"function"==typeof l){p.callback=l,O(r);var i=!0;break e}p===n(s)&&u(s),O(r)}else u(s);p=n(s)}if(null!==p)i=!0;else{var c=n(f);null!==c&&N(P,c.startTime-r),i=!1}}return i}finally{p=null,h=o,y=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var R=!1,j=null,S=-1,T=5,M=-1;function w(){return!(t.unstable_now()-Me||125a?(e.sortIndex=o,r(f,e),null===n(s)&&e===n(f)&&(b?(m(S),S=-1):b=!0,N(P,o-a))):(e.sortIndex=l,r(s,e),_||y||(_=!0,I(E))),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},6183:function(e,t,r){"use strict";e.exports=r(4248)},4778:function(e,t){"use strict";function r(e){return 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}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return r}})},7399: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 u},isInterceptionRouteAppPath:function(){return o},extractInterceptionRouteInformation:function(){return a}});let n=r(2622),u=["(..)(..)","(.)","(..)","(...)"];function o(e){return void 0!==e.split("/").find(e=>u.find(t=>e.startsWith(t)))}function a(e){let t,r,o;for(let n of e.split("/"))if(r=u.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 a=t.split("/");if(a.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=a.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},6927:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},5909:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var u={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(u,a,l):u[a]=e[a]}return u.default=e,r&&r.set(e,u),u}r.r(t),r.d(t,{_:function(){return u},_interop_require_wildcard:function(){return u}})}}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/2443530c-0a6f94e70d430d82.js b/test_assets/out/_next/static/chunks/2443530c-0a6f94e70d430d82.js new file mode 100644 index 0000000..cfcb8bb --- /dev/null +++ b/test_assets/out/_next/static/chunks/2443530c-0a6f94e70d430d82.js @@ -0,0 +1,9 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[667],{2614:function(e,t,n){/** + * @license React + * react-dom.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 r,l=n(6006),a=n(6183),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nf||(e.current=c[f],c[f]=null,f--)}function h(e,t){c[++f]=e.current,e.current=t}var m=Symbol.for("react.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),w=Symbol.for("react.context"),S=Symbol.for("react.server_context"),E=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),N=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var _=Symbol.for("react.offscreen"),L=Symbol.for("react.legacy_hidden"),T=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var M=Symbol.for("react.default_value"),F=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=F&&e[F]||e["@@iterator"])?e:null}var R=d(null),O=d(null),A=d(null);function I(e,t){switch(h(A,t),h(O,e),h(R,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?sb(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=sk(e=sb(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}p(R),h(R,t)}function U(){p(R),p(O),p(A)}function B(e){var t=R.current,n=sk(t,e.type);t!==n&&(h(O,e),h(R,n))}function V(e){O.current===e&&(p(R),p(O))}var Q=a.unstable_scheduleCallback,$=a.unstable_cancelCallback,W=a.unstable_shouldYield,j=a.unstable_requestPaint,H=a.unstable_now,q=a.unstable_getCurrentPriorityLevel,K=a.unstable_ImmediatePriority,Y=a.unstable_UserBlockingPriority,X=a.unstable_NormalPriority,G=a.unstable_LowPriority,Z=a.unstable_IdlePriority,J=null,ee=null,et=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(en(e)/er|0)|0},en=Math.log,er=Math.LN2,el=128,ea=8388608;function eo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:return 8388480&e;case 8388608:case 16777216:case 33554432:case 67108864:return 125829120&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ei(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var i=o&~l;0!==i?r=eo(i):0!=(a&=o)&&(r=eo(a))}else 0!=(o=n&~l)?r=eo(o):0!==a&&(r=eo(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(a=t&-t)||32===l&&0!=(8388480&a)))return t;if(0!=(8&r)&&(r|=32&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ed(e,t){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0)}function ep(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),l=1<--i||l[o]!==a[i]){var u="\n"+l[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=i);break}}}finally{ej=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eW(e):""}function eq(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function eK(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function eY(e){e._valueTracker||(e._valueTracker=function(e){var t=eK(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function eX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=eK(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function eG(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var eZ=/[\n"\\]/g;function eJ(e){return e.replace(eZ,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e0(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+eq(t)):e.value!==""+eq(t)&&(e.value=""+eq(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?e2(e,o,eq(t)):null!=n?e2(e,o,eq(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&!!l!==e.checked&&(e.checked=l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+eq(i):e.removeAttribute("name")}function e1(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+eq(n):"",t=null!=t?""+eq(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,i||(e.checked=!!r),e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function e2(e,t,n){"number"===t&&eG(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var e3=Array.isArray;function e4(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=ig.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var e7=e5;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(e7=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return e5(e,t)})});var e9=e7;function te(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var tt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tn(e,t){if(null!=t&&"object"!=typeof t)throw Error(i(62));for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=t[n],l=0===n.indexOf("--");null==r||"boolean"==typeof r||""===r?l?e.setProperty(n,""):"float"===n?e.cssFloat="":e[n]="":l?e.setProperty(n,r):"number"!=typeof r||0===r||tt.has(n)?"float"===n?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}}function tr(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tl=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ta=null;function to(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ti=null,tu=null;function ts(e){var t=eN(e);if(t&&(e=t.stateNode)){var n=eL(e);e:switch(e=t.stateNode,t.type){case"input":if(e0(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+eJ(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,tR=1<<32-et(t)+l|n<m?(g=f,f=null):g=f.sibling;var y=p(l,f,i[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,m),null===c?s=y:c.sibling=y,c=y,f=g}if(m===i.length)return n(l,f),t$&&tA(l,m),s;if(null===f){for(;mg?(y=m,m=null):y=m.sibling;var b=p(l,m,v.value,s);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(l,m),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return n(l,m),t$&&tA(l,g),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return t$&&tA(l,g),c}for(m=r(l,m);!v.done;g++,v=u.next())null!==(v=h(m,l,g,v.value,s))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(l,e)}),t$&&tA(l,g),c}(c,f,v,b);if("function"==typeof v.then)return s(c,f,nx(v),b);if(v.$$typeof===w||v.$$typeof===S)return s(c,f,l$(c,v,b),b);nz(c,v)}return"string"==typeof v&&""!==v||"number"==typeof v?(v=""+v,null!==f&&6===f.tag?(n(c,f.sibling),(f=l(f,v)).return=c,c=f):(n(c,f),(f=o3(v,c.mode,b)).return=c,c=f),o(c)):n(c,f)}(s,c,f,v),nS=null,s}}var n_=nN(!0),nL=nN(!1),nT=d(null),nM=d(0);function nF(e,t){h(nM,e=a5),h(nT,t),a5=e|t.baseLanes}function nD(){h(nM,a5),h(nT,nT.current)}function nR(){a5=nM.current,p(nT),p(nM)}var nO=d(null),nA=null;function nI(e){var t=e.alternate;h(nQ,1&nQ.current),h(nO,e),null===nA&&(null===t||null!==nT.current?nA=e:null!==t.memoizedState&&(nA=e))}function nU(e){if(22===e.tag){if(h(nQ,nQ.current),h(nO,e),null===nA){var t=e.alternate;null!==t&&null!==t.memoizedState&&(nA=e)}}else nB(e)}function nB(){h(nQ,nQ.current),h(nO,nO.current)}function nV(e){p(nO),nA===e&&(nA=null),p(nQ)}var nQ=d(0);function n$(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nW=[];function nj(){for(var e=0;ea?a:8;var o=n8.transition;n8.transition=null,rY(e,t,n),n8.transition={};try{rY(e,t,r),l()}catch(e){throw e}finally{eh=a,n8.transition=o}}function rj(){return rg().memoizedState}function rH(){return rg().memoizedState}function rq(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=ov(t);e=no(n);var r=ni(t,e,n);null!==r&&(ob(r,t,n),nu(r,t,n)),t={cache:lY()},e.payload=t;return}t=t.return}}function rK(e,t,n){var r=ov(e);n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},rX(e)?rG(t,n):(t9(e,t,n,r),null!==(n=nn(e))&&(ob(n,e,r),rZ(n,t,r)))}function rY(e,t,n){var r=ov(e),l={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(rX(e))rG(t,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=a(o,n);if(l.hasEagerState=!0,l.eagerState=i,tP(i,o)){t9(e,t,l,0),null===a1&&t7();return}}catch(e){}finally{}t9(e,t,l,r),null!==(n=nn(e))&&(ob(n,e,r),rZ(n,t,r))}}function rX(e){var t=e.alternate;return e===n5||null!==t&&t===n5}function rG(e,t){rt=re=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rZ(e,t,n){if(0!=(8388480&n)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ep(e,n)}}iy=function(){return{lastEffect:null,events:null,stores:null}};var rJ={readContext:lQ,use:rv,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri};rJ.useCacheRefresh=ri;var r0={readContext:lQ,use:rv,useCallback:function(e,t){return rm().memoizedState=[e,void 0===t?null:t],e},useContext:lQ,useEffect:rD,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,rM(4194308,4,rI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rM(4194308,4,e,t)},useInsertionEffect:function(e,t){rM(4,2,e,t)},useMemo:function(e,t){var n=rm();return t=void 0===t?null:t,rn&&e(),e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rm();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=rK.bind(null,n5,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rm().memoizedState=e},useState:function(e){var t=(e=r_(e)).queue,n=rY.bind(null,n5,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:rB,useDeferredValue:function(e){return rm().memoizedState=e},useTransition:function(){var e=r_(!1);return e=rW.bind(null,n5,e.queue,!0,!1),rm().memoizedState=e,[!1,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=n5,l=rm();if(t$){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===a1)throw Error(i(349));0!=(60&n6)||rx(r,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,rD(rz.bind(null,r,a,e),[e]),r.flags|=2048,rL(9,rC.bind(null,r,a,n,t),{destroy:void 0},null),n},useId:function(){var e=rm(),t=a1.identifierPrefix;if(t$){var n=tO,r=tR;t=":"+t+"R"+(n=(r&~(1<<32-et(r)-1)).toString(32)+n),0<(n=rr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ro++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return rm().memoizedState=rq.bind(null,n5)}},r1={readContext:lQ,use:rv,useCallback:rV,useContext:lQ,useEffect:rR,useImperativeHandle:rU,useInsertionEffect:rO,useLayoutEffect:rA,useMemo:rQ,useReducer:rk,useRef:rT,useState:function(){return rk(rb)},useDebugValue:rB,useDeferredValue:function(e){return r$(rg(),n7.memoizedState,e)},useTransition:function(){var e=rk(rb)[0],t=rg().memoizedState;return["boolean"==typeof e?e:ry(e),t]},useMutableSource:rS,useSyncExternalStore:rE,useId:rj};r1.useCacheRefresh=rH;var r2={readContext:lQ,use:rv,useCallback:rV,useContext:lQ,useEffect:rR,useImperativeHandle:rU,useInsertionEffect:rO,useLayoutEffect:rA,useMemo:rQ,useReducer:rw,useRef:rT,useState:function(){return rw(rb)},useDebugValue:rB,useDeferredValue:function(e){var t=rg();return null===n7?t.memoizedState=e:r$(t,n7.memoizedState,e)},useTransition:function(){var e=rw(rb)[0],t=rg().memoizedState;return["boolean"==typeof e?e:ry(e),t]},useMutableSource:rS,useSyncExternalStore:rE,useId:rj};function r3(e,t){if(e&&e.defaultProps)for(var n in t=u({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function r4(e,t,n,r){t=e.memoizedState,n=null==(n=n(r,t))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}r2.useCacheRefresh=rH;var r8={isMounted:function(e){return!!(e=e._reactInternals)&&td(e)===e},enqueueSetState:function(e,t,n){var r=ov(e=e._reactInternals),l=no(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=ni(e,l,r))&&(ob(t,e,r),nu(t,e,r))},enqueueReplaceState:function(e,t,n){var r=ov(e=e._reactInternals),l=no(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=ni(e,l,r))&&(ob(t,e,r),nu(t,e,r))},enqueueForceUpdate:function(e,t){var n=ov(e=e._reactInternals),r=no(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ni(e,r,n))&&(ob(t,e,n),nu(t,e,n))}};function r6(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||!np(n,r)||!np(l,a)}function r5(e,t,n){var r=!1,l=tg,a=t.contextType;return"object"==typeof a&&null!==a?a=lQ(a):(l=tw(t)?tb:ty.current,a=(r=null!=(r=t.contextTypes))?tk(e,l):tg),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=r8,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=a),t}function r7(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&r8.enqueueReplaceState(t,t.state,null)}function r9(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},nl(e);var a=t.contextType;"object"==typeof a&&null!==a?l.context=lQ(a):(a=tw(t)?tb:ty.current,l.context=tk(e,a)),l.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(r4(e,t,a,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&r8.enqueueReplaceState(l,l.state,null),nc(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.flags|=4194308)}function le(e,t){try{var n="",r=t;do n+=function(e){switch(e.tag){case 26:case 27:case 5:return eW(e.type);case 16:return eW("Lazy");case 13:return eW("Suspense");case 19:return eW("SuspenseList");case 0:case 2:case 15:return e=eH(e.type,!1);case 11:return e=eH(e.type.render,!1);case 1:return e=eH(e.type,!0);default:return""}}(r),r=r.return;while(r);var l=n}catch(e){l="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:l,digest:null}}function lt(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ln(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function lr(e,t,n){(n=no(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ou||(ou=!0,os=r),ln(e,t)},n}function ll(e,t,n){(n=no(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ln(e,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ln(e,t),"function"!=typeof r&&(null===oc?oc=new Set([this]):oc.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function la(e,t,n,r,l){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=no(2)).tag=2,ni(n,t,2))),n.lanes|=2),e):(e.flags|=65536,e.lanes=l,e)}var lo=s.ReactCurrentOwner,li=Error(i(461)),lu=!1;function ls(e,t,n,r){t.child=null===e?nL(t,null,n,r):n_(t,e.child,n,r)}function lc(e,t,n,r,l){n=n.render;var a=t.ref;return(lV(t,l),r=rs(e,t,n,r,a,l),n=rd(),null===e||lu)?(t$&&n&&tU(t),t.flags|=1,ls(e,t,r,l),t.child):(rp(e,t,l),lT(e,t,l))}function lf(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||oG(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=o0(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ld(e,t,a,r,l))}if(a=e.child,0==(e.lanes&l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:np)(o,r)&&e.ref===t.ref)return lT(e,t,l)}return t.flags|=1,(e=oZ(a,r)).ref=t.ref,e.return=t,t.child=e}function ld(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(np(a,r)&&e.ref===t.ref){if(lu=!1,t.pendingProps=r=a,0==(e.lanes&l))return t.lanes=e.lanes,lT(e,t,l);0!=(131072&e.flags)&&(lu=!0)}}return lg(e,t,n,r,l)}function lp(e,t,n){var r=t.pendingProps,l=r.children,a=0!=(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(lm(e,t),"hidden"===r.mode||a){if(0!=(128&t.flags)){if(n=null!==o?o.baseLanes|n:n,null!==e){for(l=0,r=t.child=e.child;null!==r;)l=l|r.lanes|r.childLanes,r=r.sibling;t.childLanes=l&~n}else t.childLanes=0,t.child=null;return lh(e,t,n)}if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},null!==e&&l0(t,null),nD(),nU(t);else{if(0==(1073741824&n))return t.lanes=t.childLanes=1073741824,lh(e,t,null!==o?o.baseLanes|n:n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&l0(t,null!==o?o.cachePool:null),null!==o?nF(t,o):nD(),nU(t)}}else null!==o?(l0(t,o.cachePool),nF(t,o),nB(t),t.memoizedState=null):(null!==e&&l0(t,null),nD(),nB(t));return ls(e,t,l,n),t.child}function lh(e,t,n){var r=lJ();return r=null===r?null:{parent:lK._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},null!==e&&l0(t,null),nD(),nU(t),null}function lm(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lg(e,t,n,r,l){var a=tw(n)?tb:ty.current;return(a=tk(t,a),lV(t,l),n=rs(e,t,n,r,a,l),r=rd(),null===e||lu)?(t$&&r&&tU(t),t.flags|=1,ls(e,t,n,l),t.child):(rp(e,t,l),lT(e,t,l))}function ly(e,t,n,r,l,a){return(lV(t,a),n=rf(t,r,n,l),rc(),r=rd(),null===e||lu)?(t$&&r&&tU(t),t.flags|=1,ls(e,t,n,a),t.child):(rp(e,t,a),lT(e,t,a))}function lv(e,t,n,r,l){if(tw(n)){var a=!0;tC(t)}else a=!1;if(lV(t,l),null===t.stateNode)lL(e,t),r5(t,n,r),r9(t,n,r,l),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;s="object"==typeof s&&null!==s?lQ(s):tk(t,s=tw(n)?tb:ty.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&r7(t,o,r,s),nr=!1;var d=t.memoizedState;o.state=d,nc(t,r,o,l),u=t.memoizedState,i!==r||d!==u||tv.current||nr?("function"==typeof c&&(r4(t,n,c,r),u=t.memoizedState),(i=nr||r6(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,na(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:r3(t.type,i),o.props=s,f=t.pendingProps,d=o.context,u="object"==typeof(u=n.contextType)&&null!==u?lQ(u):tk(t,u=tw(n)?tb:ty.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&r7(t,o,r,u),nr=!1,d=t.memoizedState,o.state=d,nc(t,r,o,l);var h=t.memoizedState;i!==f||d!==h||tv.current||nr?("function"==typeof p&&(r4(t,n,p,r),h=t.memoizedState),(s=nr||r6(t,n,s,r,d,h,u)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return lb(e,t,n,r,a,l)}function lb(e,t,n,r,l,a){lm(e,t);var o=0!=(128&t.flags);if(!r&&!o)return l&&tz(t,n,!1),lT(e,t,a);r=t.stateNode,lo.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=n_(t,e.child,null,a),t.child=n_(t,null,i,a)):ls(e,t,i,a),t.memoizedState=r.state,l&&tz(t,n,!0),t.child}function lk(e){var t=e.stateNode;t.pendingContext?tE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tE(e,t.context,!1),I(e,t.containerInfo)}function lw(e,t,n,r,l){return t3(),t4(l),t.flags|=256,ls(e,t,n,r),t.child}var lS={dehydrated:null,treeContext:null,retryLane:0};function lE(e){return{baseLanes:e,cachePool:l1()}}function lx(e,t,n){var r,l=t.pendingProps,a=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&nQ.current)),r&&(a=!0,t.flags&=-129),null===e){if(t$){if(a?nI(t):nB(t),t$&&((o=e=tQ)?tX(t,o)||(tG(t)&&tZ(),tQ=sL(o.nextSibling),r=tV,tQ&&tX(t,tQ)?tH(r,o):(tq(tV,t),t$=!1,tV=t,tQ=e)):(tG(t)&&tZ(),tq(tV,t),t$=!1,tV=t,tQ=e)),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated))return 0==(1&t.mode)?t.lanes=2:"$!"===e.data?t.lanes=16:t.lanes=1073741824,null;nV(t)}return(o=l.children,e=l.fallback,a)?(nB(t),l=t.mode,a=t.child,o={mode:"hidden",children:o},0==(1&l)&&null!==a?(a.childLanes=0,a.pendingProps=o):a=o2(o,l,0,null),e=o1(e,l,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=lE(n),t.memoizedState=lS,e):(nI(t),lC(t,o))}if(null!==(r=e.memoizedState)){var u=r.dehydrated;if(null!==u)return function(e,t,n,r,l,a,o){if(n)return 256&t.flags?(nI(t),t.flags&=-257,lz(e,t,o,r=lt(Error(i(422))))):null!==t.memoizedState?(nB(t),t.child=e.child,t.flags|=128,null):(nB(t),a=r.fallback,l=t.mode,r=o2({mode:"visible",children:r.children},l,0,null),a=o1(a,l,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&n_(t,e.child,null,o),t.child.memoizedState=lE(o),t.memoizedState=lS,a);if(nI(t),0==(1&t.mode))return lz(e,t,o,null);if("$!"===l.data){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;return r=u,(a=Error(i(419))).digest=r,r=lt(a,r,void 0),lz(e,t,o,r)}if(u=0!=(o&e.childLanes),lu||u){if(null!==(r=a1)){switch(o&-o){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=64;break;case 536870912:l=268435456;break;default:l=0}if(0!==(l=0!=(l&(r.suspendedLanes|o))?0:l)&&l!==a.retryLane)throw a.retryLane=l,ne(e,l),ob(r,e,l),li}return oF(),lz(e,t,o,null)}return"$?"===l.data?(t.flags|=128,t.child=e.child,t=oq.bind(null,e),l._reactRetry=t,null):(e=a.treeContext,tQ=sL(l.nextSibling),tV=t,t$=!0,tW=null,tj=!1,null!==e&&(tM[tF++]=tR,tM[tF++]=tO,tM[tF++]=tD,tR=e.id,tO=e.overflow,tD=t),t=lC(t,r.children),t.flags|=4096,t)}(e,t,o,l,u,r,n)}if(a){nB(t),a=l.fallback,o=t.mode,u=(r=e.child).sibling;var s={mode:"hidden",children:l.children};return 0==(1&o)&&t.child!==r?((l=t.child).childLanes=0,l.pendingProps=s,t.deletions=null):(l=oZ(r,s)).subtreeFlags=31457280&r.subtreeFlags,null!==u?a=oZ(u,a):(a=o1(a,o,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,l=a,a=t.child,null===(o=e.child.memoizedState)?o=lE(n):(null!==(r=o.cachePool)?(u=lK._currentValue,r=r.parent!==u?{parent:u,pool:u}:r):r=l1(),o={baseLanes:o.baseLanes|n,cachePool:r}),a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=lS,l}return nI(t),e=(a=e.child).sibling,l=oZ(a,{mode:"visible",children:l.children}),0==(1&t.mode)&&(l.lanes=n),l.return=t,l.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=l,t.memoizedState=null,l}function lC(e,t){return(t=o2({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function lz(e,t,n,r){return null!==r&&t4(r),n_(t,e.child,null,n),e=lC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lP(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),lU(e.return,t,n)}function lN(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function l_(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(ls(e,t,r.children,n),0!=(2&(r=nQ.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&lP(e,n,t);else if(19===e.tag)lP(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(h(nQ,r),0==(1&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(l=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===n$(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lN(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===n$(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lN(t,!0,n,null,a);break;case"together":lN(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lL(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function lT(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),oe|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=oZ(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=oZ(e,e.pendingProps)).return=t;n.sibling=null}return t.child}var lM=d(null),lF=null,lD=null,lR=null;function lO(){lR=lD=lF=null}function lA(e,t,n){h(lM,t._currentValue),t._currentValue=n}function lI(e){var t=lM.current;e._currentValue=t===M?e._defaultValue:t,p(lM)}function lU(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function lB(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var l=r.dependencies;if(null!==l)for(var a=r.child,o=l.firstContext;null!==o;){if(o.context===t){if(1===r.tag){(o=no(n&-n)).tag=2;var u=r.updateQueue;if(null!==u){var s=(u=u.shared).pending;null===s?o.next=o:(o.next=s.next,s.next=o),u.pending=o}}r.lanes|=n,null!==(o=r.alternate)&&(o.lanes|=n),lU(r.return,n,e),l.lanes|=n;break}o=o.next}else if(10===r.tag)a=r.type===e.type?null:r.child;else if(18===r.tag){if(null===(a=r.return))throw Error(i(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),lU(a,n,e),a=r.sibling}else a=r.child;if(null!==a)a.return=r;else for(a=r;null!==a;){if(a===e){a=null;break}if(null!==(r=a.sibling)){r.return=a.return,a=r;break}a=a.return}r=a}}function lV(e,t){lF=e,lR=lD=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(lu=!0),e.firstContext=null)}function lQ(e){return lW(lF,e)}function l$(e,t,n){return null===lF&&lV(e,n),lW(e,t)}function lW(e,t){var n=t._currentValue;if(lR!==t){if(t={context:t,memoizedValue:n,next:null},null===lD){if(null===e)throw Error(i(308));lD=t,e.dependencies={lanes:0,firstContext:t}}else lD=lD.next=t}return n}var lj="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},lH=a.unstable_scheduleCallback,lq=a.unstable_NormalPriority,lK={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function lY(){return{controller:new lj,data:new Map,refCount:0}}function lX(e){e.refCount--,0===e.refCount&&lH(lq,function(){e.controller.abort()})}var lG=s.ReactCurrentBatchConfig,lZ=d(null);function lJ(){var e=lZ.current;return null!==e?e:a1.pooledCache}function l0(e,t){null===t?h(lZ,lZ.current):h(lZ,t.pool)}function l1(){var e=lJ();return null===e?null:{parent:lK._currentValue,pool:e}}function l2(e){e.flags|=4}function l3(e){e.flags|=2097664}function l4(e,t,n,r){if((e=e.memoizedProps)!==r){n=null;var l,a,o=null;for(l in e)if(!r.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l]){if("style"===l){var i=e[l];for(a in i)i.hasOwnProperty(a)&&(o||(o={}),o[a]="")}else(n=n||[]).push(l,null)}for(l in r){i=r[l];var u=null!=e?e[l]:void 0;if(r.hasOwnProperty(l)&&i!==u&&(null!=i||null!=u)){if("style"===l){if(u){for(a in u)!u.hasOwnProperty(a)||i&&i.hasOwnProperty(a)||(o||(o={}),o[a]="");for(a in i)i.hasOwnProperty(a)&&u[a]!==i[a]&&(o||(o={}),o[a]=i[a])}else o||(n||(n=[]),n.push(l,o)),o=i}else(n=n||[]).push(l,i)}}o&&(n=n||[]).push("style",o),r=n,(t.updateQueue=r)&&l2(t)}}function l8(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,0==(42&a3)&&!(t="stylesheet"!==t.type||0!=(3&t.state.loading))){if(oL())e.flags|=8192;else throw nk=ng,nm}}function l6(e,t){null!==t?e.flags|=4:16384&e.flags&&(t=22!==e.tag?ec():1073741824,e.lanes|=t)}function l5(e,t){if(!t$)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function l7(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=31457280&l.subtreeFlags,r|=31457280&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function l9(e,t){switch(tB(t),t.tag){case 1:null!=(e=t.type.childContextTypes)&&tS();break;case 3:lI(lK),U(),p(tv),p(ty),nj();break;case 26:case 27:case 5:V(t);break;case 4:U();break;case 13:nV(t);break;case 19:p(nQ);break;case 10:lI(t.type._context);break;case 22:case 23:nV(t),nR(),null!==e&&p(lZ);break;case 24:lI(lK)}}function ae(e,t,n){var r=Array.prototype.slice.call(arguments,3);try{t.apply(n,r)}catch(e){this.onError(e)}}var at=!1,an=null,ar=!1,al=null,aa={onError:function(e){at=!0,an=e}};function ao(e,t,n,r,l,a,o,i,u){at=!1,an=null,ae.apply(aa,arguments)}var ai=!1,au=!1,as="function"==typeof WeakSet?WeakSet:Set,ac=null;function af(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var l=r;break;default:l=r}"function"==typeof n?e.refCleanup=n(l):n.current=l}}catch(n){o$(e,t,n)}}function ad(e,t){var n=e.ref,r=e.refCleanup;if(null!==n){if("function"==typeof r)try{r()}catch(n){o$(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){o$(e,t,n)}else n.current=null}}function ap(e,t,n){try{n()}catch(n){o$(e,t,n)}}var ah=!1;function am(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var l=r=r.next;do{if((l.tag&e)===e){var a=l.inst,o=a.destroy;void 0!==o&&(a.destroy=void 0,ap(t,n,o))}l=l.next}while(l!==r)}}function ag(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create,l=n.inst;r=r(),l.destroy=r}n=n.next}while(n!==t)}}function ay(e,t){try{ag(t,e)}catch(t){o$(e,e.return,t)}}function av(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{nd(t,n)}catch(t){o$(e,e.return,t)}}}function ab(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src&&(r.src=n.src)}}catch(t){o$(e,e.return,t)}}function ak(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:aD(e,n),4&r&&ay(n,5);break;case 1:if(aD(e,n),4&r){if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){o$(n,n.return,e)}else{var l=n.elementType===n.type?t.memoizedProps:r3(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){o$(n,n.return,e)}}}64&r&&av(n),512&r&&af(n,n.return);break;case 3:if(aD(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{nd(r,e)}catch(e){o$(n,n.return,e)}}break;case 26:aD(e,n),512&r&&af(n,n.return);break;case 27:case 5:aD(e,n),null===t&&4&r&&ab(n),512&r&&af(n,n.return);break;case 12:default:aD(e,n);break;case 13:aD(e,n),4&r&&aN(e,n);break;case 22:if(0!=(1&n.mode)){if(!(l=null!==n.memoizedState||ai)){t=null!==t&&null!==t.memoizedState||au;var a=ai,o=au;ai=l,(au=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var l=n.alternate,a=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(a,o,r),ay(o,4);break;case 1:if(e(a,o,r),"function"==typeof(a=o.stateNode).componentDidMount)try{a.componentDidMount()}catch(e){o$(o,o.return,e)}if(null!==(l=o.updateQueue)){var u=l.shared.hiddenCallbacks;if(null!==u)for(l.shared.hiddenCallbacks=null,l=0;l title"))),sh(l,n,r),l[ev]=e,eM(l),n=l;break e;case"link":var a=sq("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[ev]=t,e[eb]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=e;e:switch(sh(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&l2(t)}null!==t.ref&&l3(t)}return l7(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&l2(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=A.current,t1(t)){e:{if(e=t.stateNode,r=t.memoizedProps,e[ev]=t,(n=e.nodeValue!==r)&&null!==(l=tV))switch(l.tag){case 3:if(l=0!=(1&l.mode),sc(e.nodeValue,r,l),l){e=!1;break e}break;case 27:case 5:if(a=0!=(1&l.mode),!0!==l.memoizedProps.suppressHydrationWarning&&sc(e.nodeValue,r,a),a){e=!1;break e}}e=n}e&&l2(t)}else(e=sv(e).createTextNode(r))[ev]=t,t.stateNode=e}return l7(t),null;case 13:if(nV(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(t$&&null!==tQ&&0!=(1&t.mode)&&0==(128&t.flags))t2(),t3(),t.flags|=384,l=!1;else if(l=t1(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[ev]=t}else t3(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;l7(t),l=!1}else null!==tW&&(oS(tW),tW=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return r=null!==r,e=null!==e&&null!==e.memoizedState,r&&(n=t.child,l=null,null!==n.alternate&&null!==n.alternate.memoizedState&&null!==n.alternate.memoizedState.cachePool&&(l=n.alternate.memoizedState.cachePool.pool),a=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(a=n.memoizedState.cachePool.pool),a!==l&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),l6(t,t.updateQueue),l7(t),null;case 4:return U(),null===e&&se(t.stateNode.containerInfo),l7(t),null;case 10:return lI(t.type._context),l7(t),null;case 19:if(p(nQ),null===(l=t.memoizedState))return l7(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)l5(l,!1);else{if(0!==a7||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=n$(e))){for(t.flags|=128,l5(l,!1),e=a.updateQueue,t.updateQueue=e,l6(t,e),t.subtreeFlags=0,e=n,r=t.child;null!==r;)oJ(r,e),r=r.sibling;return h(nQ,1&nQ.current|2),t.child}e=e.sibling}null!==l.tail&&H()>oo&&(t.flags|=128,r=!0,l5(l,!1),t.lanes=8388608)}}else{if(!r){if(null!==(e=n$(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,l6(t,e),l5(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!t$)return l7(t),null}else 2*H()-l.renderingStartTime>oo&&1073741824!==n&&(t.flags|=128,r=!0,l5(l,!1),t.lanes=8388608)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=H(),t.sibling=null,e=nQ.current,h(nQ,r?1&e|2:1&e),t;return l7(t),null;case 22:case 23:return nV(t),nR(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&n)&&0==(128&t.flags)&&(l7(t),6&t.subtreeFlags&&(t.flags|=8192)):l7(t),null!==(r=t.updateQueue)&&l6(t,r.retryQueue),r=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),n=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),null!==e&&p(lZ),null;case 24:return r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),lI(lK),l7(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,a5);if(null!==n){a2=n;return}if(null!==(t=t.sibling)){a2=t;return}a2=t=e}while(null!==t);0===a7&&(a7=5)}function oU(e,t,n){var r=eh,l=aJ.transition;try{aJ.transition=null,eh=2,function(e,t,n,r){do oV();while(null!==od);if(0!=(6&a0))throw Error(i(327));var l=e.finishedWork,a=e.finishedLanes;if(null!==l){if(e.finishedWork=null,e.finishedLanes=0,l===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var o=l.lanes|l.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,t=e.entanglements;var r=e.expirationTimes;for(e=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=uD(n,a);var o=uD(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=aJ.transition;var l=eh;try{if(aJ.transition=null,eh=r,null===od)var a=!1;else{r=om,om=null;var o=od,u=op;if(od=null,op=0,0!=(6&a0))throw Error(i(331));var s=a0;if(a0|=4,aH(o.current),aU(o,o.current,u,r),a0=s,nJ(!1),ee&&"function"==typeof ee.onPostCommitFiberRoot)try{ee.onPostCommitFiberRoot(J,o)}catch(e){}a=!0}return a}finally{eh=l,aJ.transition=n,oB(e,t)}}return!1}function oQ(e,t,n){t=le(n,t),t=lr(e,t,2),null!==(e=ni(e,t,2))&&(ed(e,2),nZ(e))}function o$(e,t,n){if(3===e.tag)oQ(e,e,n);else for(;null!==t;){if(3===t.tag){oQ(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oc||!oc.has(r))){e=le(n,e),e=ll(t,e,2),null!==(t=ni(t,e,2))&&(ed(t,2),nZ(t));break}}t=t.return}}function oW(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new aY;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(a6=!0,l.add(n),e=oj.bind(null,e,t,n),t.then(e,e))}function oj(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,a1===e&&(a3&n)===n&&(4===a7||3===a7&&(125829120&a3)===a3&&500>H()-oa?0==(2&a0)&&oN(e,0):on|=n),nZ(e)}function oH(e,t){0===t&&(t=0==(1&e.mode)?2:ec()),null!==(e=ne(e,t))&&(ed(e,t),nZ(e))}function oq(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),oH(e,n)}function oK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),oH(e,n)}function oY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oX(e,t,n,r){return new oY(e,t,n,r)}function oG(e){return!(!(e=e.prototype)||!e.isReactComponent)}function oZ(e,t){var n=e.alternate;return null===n?((n=oX(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function oJ(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function o0(e,t,n,r,l,a){var o=2;if(r=e,"function"==typeof e)oG(e)&&(o=1);else if("string"==typeof e)o=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(!0===t.async&&!t.onLoad&&!t.onError&&"string"==typeof t.src&&t.src)return!0}return!1}(e,n,R.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case y:return o1(n.children,l,a,t);case v:o=8,0!=(1&(l|=8))&&(l|=16);break;case b:return(e=oX(12,n,t,2|l)).elementType=b,e.lanes=a,e;case x:return(e=oX(13,n,t,l)).elementType=x,e.lanes=a,e;case C:return(e=oX(19,n,t,l)).elementType=C,e.lanes=a,e;case _:return o2(n,l,a,t);case L:case N:case T:return(e=oX(24,n,t,l)).elementType=T,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case k:o=10;break e;case w:o=9;break e;case E:o=11;break e;case z:o=14;break e;case P:o=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=oX(o,n,t,l)).elementType=e,t.type=r,t.lanes=a,t}function o1(e,t,n,r){return(e=oX(7,e,r,t)).lanes=n,e}function o2(e,t,n,r){(e=oX(22,e,r,t)).elementType=_,e.lanes=n;var l={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0==(2&l._pendingVisibility)){var t=ne(e,2);null!==t&&(l._pendingVisibility|=2,ob(t,e,2))}},attach:function(){var e=l._current;if(null===e)throw Error(i(456));if(0!=(2&l._pendingVisibility)){var t=ne(e,2);null!==t&&(l._pendingVisibility&=-3,ob(t,e,2))}}};return e.stateNode=l,e}function o3(e,t,n){return(e=oX(6,e,null,t)).lanes=n,e}function o4(e,t,n){return(t=oX(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o8(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ef(-1),this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ef(0),this.hiddenUpdates=ef(null),this.identifierPrefix=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.mutableSourceEagerHydrationData=null,this.incompleteTransitions=new Map}function o6(e,t,n,r,l,a,o,i,u){return e=new o8(e,t,n,i,u),1===t?(t=1,!0===a&&(t|=24)):t=0,a=oX(3,null,null,t),e.current=a,a.stateNode=e,t=lY(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},nl(a),e}function o5(e){if(!e)return tg;e=e._reactInternals;e:{if(td(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tw(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(tw(n))return tx(e,n,t)}return t}function o7(e,t,n,r,l,a,o,i,u){return(e=o6(n,r,!0,e,l,a,o,i,u)).context=o5(null),(l=no(r=ov(n=e.current))).callback=null!=t?t:null,ni(n,l,r),e.current.lanes=r,ed(e,r),nZ(e),e}function o9(e,t,n,r){var l=t.current,a=ov(l);return n=o5(n),null===t.context?t.context=n:t.pendingContext=n,(t=no(a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ni(l,t,a))&&(ob(e,l,a),nu(e,l,a)),a}function ie(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function it(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n=us),ud=!1;function up(e,t){switch(e){case"keyup":return -1!==ui.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uh(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var um=!1,ug={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ug[e.type]:"textarea"===t}function uv(e,t,n,r){tc(r),0<(t=sl(t,"onChange")).length&&(n=new iE("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ub=null,uk=null;function uw(e){u6(e,0)}function uS(e){if(eX(e_(e)))return e}function uE(e,t){if("change"===e)return t}var ux=!1;if(eA){if(eA){var uC="oninput"in document;if(!uC){var uz=document.createElement("div");uz.setAttribute("oninput","return;"),uC="function"==typeof uz.oninput}r=uC}else r=!1;ux=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=uF(r)}}function uR(){for(var e=window,t=eG();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=eG(e.document)}return t}function uO(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var uA=eA&&"documentMode"in document&&11>=document.documentMode,uI=null,uU=null,uB=null,uV=!1;function uQ(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;uV||null==uI||uI!==eG(r)||(r="selectionStart"in(r=uI)&&uO(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},uB&&np(uB,r)||(uB=r,0<(r=sl(uU,"onSelect")).length&&(t=new iE("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=uI)))}function u$(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var uW={animationend:u$("Animation","AnimationEnd"),animationiteration:u$("Animation","AnimationIteration"),animationstart:u$("Animation","AnimationStart"),transitionend:u$("Transition","TransitionEnd")},uj={},uH={};function uq(e){if(uj[e])return uj[e];if(!uW[e])return e;var t,n=uW[e];for(t in n)if(n.hasOwnProperty(t)&&t in uH)return uj[e]=n[t];return e}eA&&(uH=document.createElement("div").style,"AnimationEvent"in window||(delete uW.animationend.animation,delete uW.animationiteration.animation,delete uW.animationstart.animation),"TransitionEvent"in window||delete uW.transitionend.transition);var uK=uq("animationend"),uY=uq("animationiteration"),uX=uq("animationstart"),uG=uq("transitionend"),uZ=new Map,uJ="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function u0(e,t){uZ.set(e,t),eR(t,[e])}for(var u1=0;u1 title"):null)}var sY=null;function sX(){}function sG(){if(this.count--,0===this.count){if(this.stylesheets)sJ(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sZ=null;function sJ(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sZ=new Map,t.forEach(s0,e),sZ=null,sG.call(e))}function s0(e,t){if(!(4&t.state.loading)){var n=sZ.get(e);if(n)var r=n.get("last");else{n=new Map,sZ.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a{}).then(()=>{if(t.parentElement&&t.isConnected){if("blur"===r&&o(!0),null==n?void 0:n.current){let e=new Event("load");Object.defineProperty(e,"target",{writable:!1,value:t});let r=!1,i=!1;n.current({...e,nativeEvent:e,currentTarget:t,target:t,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,e.preventDefault()},stopPropagation:()=>{i=!0,e.stopPropagation()}})}(null==i?void 0:i.current)&&i.current(t)}})}function m(t){let[e,r]=o.version.split("."),n=parseInt(e,10),i=parseInt(r,10);return n>18||18===n&&i>=3?{fetchPriority:t}:{fetchpriority:t}}let g=(0,o.forwardRef)((t,e)=>{let{imgAttributes:r,heightInt:n,widthInt:i,qualityInt:s,className:a,imgStyle:u,blurStyle:l,isLazy:h,fetchPriority:c,fill:d,placeholder:f,loading:g,srcString:v,config:y,unoptimized:b,loader:w,onLoadRef:A,onLoadingCompleteRef:E,setBlurComplete:x,setShowAltText:k,onLoad:_,onError:S,...M}=t;return g=h?"lazy":g,o.default.createElement("img",{...M,...m(c),loading:g,width:i,height:n,decoding:"async","data-nimg":d?"fill":"1",className:a,style:{...u,...l},...r,ref:(0,o.useCallback)(t=>{e&&("function"==typeof e?e(t):"object"==typeof e&&(e.current=t)),t&&(S&&(t.src=t.src),t.complete&&p(t,v,f,A,E,x,b))},[v,f,A,E,x,S,b,e]),onLoad:t=>{let e=t.currentTarget;p(e,v,f,A,E,x,b)},onError:t=>{k(!0),"blur"===f&&x(!0),S&&S(t)}})}),v=(0,o.forwardRef)((t,e)=>{var r;let n,i,{src:p,sizes:v,unoptimized:y=!1,priority:b=!1,loading:w,className:A,quality:E,width:x,height:k,fill:_,style:S,onLoad:M,onLoadingComplete:C,placeholder:P="empty",blurDataURL:I,fetchPriority:B,layout:R,objectFit:T,objectPosition:N,lazyBoundary:O,lazyRoot:D,...L}=t,F=(0,o.useContext)(l.ImageConfigContext),U=(0,o.useMemo)(()=>{let t=c||F||u.imageConfigDefault,e=[...t.deviceSizes,...t.imageSizes].sort((t,e)=>t-e),r=t.deviceSizes.sort((t,e)=>t-e);return{...t,allSizes:e,deviceSizes:r}},[F]),H=L.loader||h.default;delete L.loader;let G="__next_img_default"in H;if(G){if("custom"===U.loader)throw Error('Image with src "'+p+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let t=H;H=e=>{let{config:r,...n}=e;return t(n)}}if(R){"fill"===R&&(_=!0);let t={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[R];t&&(S={...S,...t});let e={responsive:"100vw",fill:"100vw"}[R];e&&!v&&(v=e)}let j="",z=f(x),q=f(k);if("object"==typeof(r=p)&&(d(r)||void 0!==r.src)){let t=d(p)?p.default:p;if(!t.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(t));if(!t.height||!t.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(t));if(n=t.blurWidth,i=t.blurHeight,I=I||t.blurDataURL,j=t.src,!_){if(z||q){if(z&&!q){let e=z/t.width;q=Math.round(t.height*e)}else if(!z&&q){let e=q/t.height;z=Math.round(t.width*e)}}else z=t.width,q=t.height}}let K=!b&&("lazy"===w||void 0===w);(!(p="string"==typeof p?p:j)||p.startsWith("data:")||p.startsWith("blob:"))&&(y=!0,K=!1),U.unoptimized&&(y=!0),G&&p.endsWith(".svg")&&!U.dangerouslyAllowSVG&&(y=!0),b&&(B="high");let[Q,Y]=(0,o.useState)(!1),[Z,V]=(0,o.useState)(!1),J=f(E),W=Object.assign(_?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:T,objectPosition:N}:{},Z?{}:{color:"transparent"},S),X="blur"===P&&I&&!Q?{backgroundSize:W.objectFit||"cover",backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,a.getImageBlurSvg)({widthInt:z,heightInt:q,blurWidth:n,blurHeight:i,blurDataURL:I,objectFit:W.objectFit})+'")'}:{},$=function(t){let{config:e,src:r,unoptimized:n,width:i,quality:o,sizes:s,loader:a}=t;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:u,kind:l}=function(t,e,r){let{deviceSizes:n,allSizes:i}=t;if(r){let t=/(^|\s)(1?\d?\d)vw/g,e=[];for(let n;n=t.exec(r);n)e.push(parseInt(n[2]));if(e.length){let t=.01*Math.min(...e);return{widths:i.filter(e=>e>=n[0]*t),kind:"w"}}return{widths:i,kind:"w"}}if("number"!=typeof e)return{widths:n,kind:"w"};let o=[...new Set([e,2*e].map(t=>i.find(e=>e>=t)||i[i.length-1]))];return{widths:o,kind:"x"}}(e,i,s),h=u.length-1;return{sizes:s||"w"!==l?s:"100vw",srcSet:u.map((t,n)=>a({config:e,src:r,quality:o,width:t})+" "+("w"===l?t:n+1)+l).join(", "),src:a({config:e,src:r,quality:o,width:u[h]})}}({config:U,src:p,unoptimized:y,width:z,quality:J,sizes:v,loader:H}),tt=p,te=(0,o.useRef)(M);(0,o.useEffect)(()=>{te.current=M},[M]);let tr=(0,o.useRef)(C);(0,o.useEffect)(()=>{tr.current=C},[C]);let tn={isLazy:K,imgAttributes:$,heightInt:q,widthInt:z,qualityInt:J,className:A,imgStyle:W,blurStyle:X,loading:w,config:U,fetchPriority:B,fill:_,unoptimized:y,placeholder:P,loader:H,srcString:tt,onLoadRef:te,onLoadingCompleteRef:tr,setBlurComplete:Y,setShowAltText:V,...L};return o.default.createElement(o.default.Fragment,null,o.default.createElement(g,{...tn,ref:e}),b?o.default.createElement(s.default,null,o.default.createElement("link",{key:"__nimg-"+$.src+$.srcSet+$.sizes,rel:"preload",as:"image",href:$.srcSet?void 0:$.src,imageSrcSet:$.srcSet,imageSizes:$.sizes,crossOrigin:L.crossOrigin,referrerPolicy:L.referrerPolicy,...m(B)})):null)}),y=v;("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},4920:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AmpStateContext",{enumerable:!0,get:function(){return o}});let n=r(6927),i=n._(r(6006)),o=i.default.createContext({})},5224:function(t,e){"use strict";function r(t){let{ampFirst:e=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===t?{}:t;return e||r&&n}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isInAmpMode",{enumerable:!0,get:function(){return r}})},9619:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}(e,{defaultHead:function(){return h},default:function(){return p}});let n=r(6927),i=r(5909),o=i._(r(6006)),s=n._(r(2776)),a=r(4920),u=r(508),l=r(5224);function h(t){void 0===t&&(t=!1);let e=[o.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function c(t,e){return"string"==typeof e||"number"==typeof e?t:e.type===o.default.Fragment?t.concat(o.default.Children.toArray(e.props.children).reduce((t,e)=>"string"==typeof e||"number"==typeof e?t:t.concat(e),[])):t.concat(e)}r(4169);let d=["name","httpEquiv","charSet","itemProp"];function f(t,e){let{inAmpMode:r}=e;return t.reduce(c,[]).reverse().concat(h(r).reverse()).filter(function(){let t=new Set,e=new Set,r=new Set,n={};return i=>{let o=!0,s=!1;if(i.key&&"number"!=typeof i.key&&i.key.indexOf("$")>0){s=!0;let e=i.key.slice(i.key.indexOf("$")+1);t.has(e)?o=!1:t.add(e)}switch(i.type){case"title":case"base":e.has(i.type)?o=!1:e.add(i.type);break;case"meta":for(let t=0,e=d.length;t{let n=t.key||e;if(!r&&"link"===t.type&&t.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(e=>t.props.href.startsWith(e))){let e={...t.props||{}};return e["data-href"]=e.href,e.href=void 0,e["data-optimized-fonts"]=!0,o.default.cloneElement(t,e)}return o.default.cloneElement(t,{key:n})})}let p=function(t){let{children:e}=t,r=(0,o.useContext)(a.AmpStateContext),n=(0,o.useContext)(u.HeadManagerContext);return o.default.createElement(s.default,{reduceComponentsToState:f,headManager:n,inAmpMode:(0,l.isInAmpMode)(r)},e)};("function"==typeof e.default||"object"==typeof e.default&&null!==e.default)&&void 0===e.default.__esModule&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),t.exports=e.default)},9080:function(t,e){"use strict";function r(t){let{widthInt:e,heightInt:r,blurWidth:n,blurHeight:i,blurDataURL:o,objectFit:s}=t,a=n||e,u=i||r,l=o.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return a&&u?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+a+" "+u+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(n&&i?"1":"20")+"'/%3E"+l+"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='"+o+"'/%3E%3C/svg%3E":"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='"+("contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none")+"' x='0' y='0' height='100%25' width='100%25' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},5934:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let n=r(6927),i=n._(r(6006)),o=r(9600),s=i.default.createContext(o.imageConfigDefault)},9600:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var r in e)Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}(e,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={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}},8697:function(t,e){"use strict";function r(t){let{config:e,src:r,width:n,quality:i}=t;return e.path+"?url="+encodeURIComponent(r)+"&w="+n+"&q="+(i||75)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}}),r.__next_img_default=!0;let n=r},2776:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});let n=r(5909),i=n._(r(6006)),o=i.useLayoutEffect,s=i.useEffect;function a(t){let{headManager:e,reduceComponentsToState:r}=t;function n(){if(e&&e.mountedInstances){let n=i.Children.toArray(Array.from(e.mountedInstances).filter(Boolean));e.updateHead(r(n,t))}}return o(()=>{var r;return null==e||null==(r=e.mountedInstances)||r.add(t.children),()=>{var r;null==e||null==(r=e.mountedInstances)||r.delete(t.children)}}),o(()=>(e&&(e._pendingUpdate=n),()=>{e&&(e._pendingUpdate=n)})),s(()=>(e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null),()=>{e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null)})),null}},4169:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"warnOnce",{enumerable:!0,get:function(){return r}});let r=t=>{}},1083:function(t){!function(){var e={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],l=new i((s+a)*3/4-a),h=0,c=a>0?s-4:s;for(r=0;r>16&255,l[h++]=e>>8&255,l[h++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[h++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[h++]=e>>8&255,l[h++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(t,e,r){"use strict";/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!a.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(P(t,ArrayBuffer)||t&&P(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(P(t,SharedArrayBuffer)||t&&P(t.buffer,SharedArrayBuffer)))return function(t,e,r){var n;if(e<0||t.byteLength=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||P(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return _(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return M(t).length;default:if(i)return n?-1:_(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){var i,o,s=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var c=!0,d=0;d239?4:l>223?3:l>191?2:1;if(i+c<=r)switch(c){case 1:l<128&&(h=l);break;case 2:(192&(o=t[i+1]))==128&&(u=(31&l)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],(192&o)==128&&(192&s)==128&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function w(t,e,r,n,i,o){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function A(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function E(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function x(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(l(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},a.allocUnsafe=function(t){return h(t)},a.allocUnsafeSlow=function(t){return h(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(P(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),P(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);ir&&(t+=" ... "),""},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if(P(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),l=this.slice(n,i),h=t.slice(e,r),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,l,h,c,d,f,p,m,g=this.length-e;if((void 0===r||r>g)&&(r=g),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var v=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s>8,i.push(r%256),i.push(n);return i}(t,this.length-p),this,p,m);default:if(v)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),v=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||b(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return(t>>>=0,e||b(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||b(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||b(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||b(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||b(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||w(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return E(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return E(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function S(t){for(var e=[],r=0;r=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function P(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var I=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},783:function(t,e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,h=-7,c=r?i-1:0,d=r?-1:1,f=t[e+c];for(c+=d,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=d,h-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,n),o-=l}return(f?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,l=8*o-i-1,h=(1<>1,d=23===i?5960464477539062e-23:0,f=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+c>=1?e+=d/u:e+=d*Math.pow(2,1-c),e*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+f]=255&a,f+=p,a/=256,i-=8);for(s=s<0;t[r+f]=255&s,f+=p,s/=256,l-=8);t[r+f-p]|=128*m}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},s=!0;try{e[t](o,o.exports,n),s=!1}finally{s&&delete r[t]}return o.exports}n.ab="//";var i=n(72);t.exports=i}()},8326:function(t){!function(){"use strict";var e={864:function(t){var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&"function"==typeof t.on&&m(t,"error",i,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var i,o,s,l=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,console&&console.warn&&console.warn(l)}return t}function h(){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 c(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else for(var l=u.length,h=p(u,l),r=0;r=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},s=!0;try{e[t](o,o.exports,n),s=!1}finally{s&&delete r[t]}return o.exports}n.ab="//";var i=n(864);t.exports=i}()},6003:function(t){!function(){var e={229:function(t){var e,r,n,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u=[],l=!1,h=-1;function c(){l&&n&&(l=!1,n.length?u=n.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=a(c);l=!0;for(var e=u.length;e;){for(n=u,u=[];++h1)for(var r=1;rnull)}),r=null,o=null,s=null;return t&&t.baseFeePerGas&&(r=t.baseFeePerGas,s=n.O$.from("1500000000"),o=t.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:e}},new(r||(r=Promise))(function(n,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?n(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((o=o.apply(t,e||[])).next())})}addListener(t,e){return this.on(t,e)}removeListener(t,e){return this.off(t,e)}static isProvider(t){return!!(t&&t._isProvider)}}},4344:function(t,e,r){"use strict";r.d(e,{E:function(){return l}});var n=r(4336),i=r(5601),o=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let s=new i.Yd("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],u=[i.Yd.errors.INSUFFICIENT_FUNDS,i.Yd.errors.NONCE_EXPIRED,i.Yd.errors.REPLACEMENT_UNDERPRICED];class l{constructor(){s.checkAbstract(new.target,l),(0,n.zG)(this,"_isSigner",!0)}getBalance(t){return o(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)})}getTransactionCount(t){return o(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)})}estimateGas(t){return o(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let e=yield(0,n.mE)(this.checkTransaction(t));return yield this.provider.estimateGas(e)})}call(t,e){return o(this,void 0,void 0,function*(){this._checkProvider("call");let r=yield(0,n.mE)(this.checkTransaction(t));return yield this.provider.call(r,e)})}sendTransaction(t){return o(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let e=yield this.populateTransaction(t),r=yield this.signTransaction(e);return yield this.provider.sendTransaction(r)})}getChainId(){return o(this,void 0,void 0,function*(){this._checkProvider("getChainId");let t=yield this.provider.getNetwork();return t.chainId})}getGasPrice(){return o(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return o(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(t){return o(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)})}checkTransaction(t){for(let e in t)-1===a.indexOf(e)&&s.throwArgumentError("invalid transaction key: "+e,"transaction",t);let e=(0,n.DC)(t);return null==e.from?e.from=this.getAddress():e.from=Promise.all([Promise.resolve(e.from),this.getAddress()]).then(e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",t),e[0])),e}populateTransaction(t){return o(this,void 0,void 0,function*(){let e=yield(0,n.mE)(this.checkTransaction(t));null!=e.to&&(e.to=Promise.resolve(e.to).then(t=>o(this,void 0,void 0,function*(){if(null==t)return null;let e=yield this.resolveName(t);return null==e&&s.throwArgumentError("provided ENS name resolves to null","tx.to",t),e})),e.to.catch(t=>{}));let r=null!=e.maxFeePerGas||null!=e.maxPriorityFeePerGas;if(null!=e.gasPrice&&(2===e.type||r)?s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t):(0===e.type||1===e.type)&&r&&s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t),(2===e.type||null==e.type)&&null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)e.type=2;else if(0===e.type||1===e.type)null==e.gasPrice&&(e.gasPrice=this.getGasPrice());else{let t=yield this.getFeeData();if(null==e.type){if(null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas){if(e.type=2,null!=e.gasPrice){let t=e.gasPrice;delete e.gasPrice,e.maxFeePerGas=t,e.maxPriorityFeePerGas=t}else null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas)}else null!=t.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==e.gasPrice&&(e.gasPrice=t.gasPrice),e.type=0):s.throwError("failed to get consistent fee data",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}else 2===e.type&&(null==e.maxFeePerGas&&(e.maxFeePerGas=t.maxFeePerGas),null==e.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas))}return null==e.nonce&&(e.nonce=this.getTransactionCount("pending")),null==e.gasLimit&&(e.gasLimit=this.estimateGas(e).catch(t=>{if(u.indexOf(t.code)>=0)throw t;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,tx:e})})),null==e.chainId?e.chainId=this.getChainId():e.chainId=Promise.all([Promise.resolve(e.chainId),this.getChainId()]).then(e=>(0!==e[1]&&e[0]!==e[1]&&s.throwArgumentError("chainId address mismatch","transaction",t),e[0])),yield(0,n.mE)(e)})}_checkProvider(t){this.provider||s.throwError("missing provider",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!!(t&&t._isSigner)}}},8568:function(t,e,r){"use strict";r.d(e,{Kn:function(){return d},CR:function(){return f}});var n=r(5591),i=r(661),o=r(2998),s=r(4319),a=r(5601);let u=new a.Yd("address/5.7.0");function l(t){(0,n.A7)(t,20)||u.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let t=0;t<40;t++)r[t]=e[t].charCodeAt(0);let i=(0,n.lE)((0,o.w)(r));for(let t=0;t<40;t+=2)i[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&i[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return"0x"+e.join("")}let h={};for(let t=0;t<10;t++)h[String(t)]=String(t);for(let t=0;t<26;t++)h[String.fromCharCode(65+t)]=String(10+t);let c=Math.floor(Math.log10?Math.log10(9007199254740991):Math.log(9007199254740991)/Math.LN10);function d(t){let e=null;if("string"!=typeof t&&u.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=l(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&u.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==function(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(t=>h[t]).join("");for(;e.length>=c;){let t=e.substring(0,c);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}(t)&&u.throwArgumentError("bad icap checksum","address",t),e=(0,i.g$)(t.substring(4));e.length<40;)e="0"+e;e=l("0x"+e)}else u.throwArgumentError("invalid address","address",t);return e}function f(t){let e=null;try{e=d(t.from)}catch(e){u.throwArgumentError("missing from address","transaction",t)}let r=(0,n.G1)((0,n.lE)(i.O$.from(t.nonce).toHexString()));return d((0,n.p3)((0,o.w)((0,s.c)([e,r])),12))}},3504:function(t,e,r){"use strict";r.d(e,{eU:function(){return s}});var n=r(5591),i=r(4336);class o{constructor(t){(0,i.zG)(this,"alphabet",t),(0,i.zG)(this,"base",t.length),(0,i.zG)(this,"_alphabetMap",{}),(0,i.zG)(this,"_leader",t.charAt(0));for(let e=0;e0;)r.push(n%this.base),n=n/this.base|0}let i="";for(let t=0;0===e[t]&&t=0;--t)i+=this.alphabet[r[t]];return i}decode(t){if("string"!=typeof t)throw TypeError("Expected String");let e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(let r=0;r>=8;for(;i>0;)e.push(255&i),i>>=8}for(let r=0;t[r]===this._leader&&r0&&(10===arguments[0]?d||(d=!0,l.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?l.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Yd.errors.UNEXPECTED_ARGUMENT,{}):l.throwError("BigNumber.toString does not accept parameters",s.Yd.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof f)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new f(h,p(t)):t.match(/^-?[0-9]+$/)?new f(h,p(new u(t))):l.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&v("overflow","BigNumber.from",t),f.from(String(t));if("bigint"==typeof t)return f.from(t.toString());if((0,o._t)(t))return f.from((0,o.Dv)(t));if(t){if(t.toHexString){let e=t.toHexString();if("string"==typeof e)return f.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.A7)(e)||"-"===e[0]&&(0,o.A7)(e.substring(1))))return f.from(e)}}return l.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function p(t){if("string"!=typeof t)return p(t.toString(16));if("-"===t[0])return("-"===(t=t.substring(1))[0]&&l.throwArgumentError("invalid hex","value",t),"0x00"===(t=p(t)))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function m(t){return f.from(p(t))}function g(t){let e=f.from(t).toHexString();return"-"===e[0]?new u("-"+e.substring(3),16):new u(e.substring(2),16)}function v(t,e,r){let n={fault:t,operation:e};return null!=r&&(n.value=r),l.throwError(t,s.Yd.errors.NUMERIC_FAULT,n)}function y(t){return new u(t,36).toString(16)}},5591:function(t,e,r){"use strict";r.d(e,{lE:function(){return h},zo:function(){return c},xs:function(){return y},E1:function(){return g},p3:function(){return v},$P:function(){return b},$m:function(){return w},Dv:function(){return m},_t:function(){return l},Zq:function(){return a},A7:function(){return f},gV:function(){return E},N:function(){return A},G1:function(){return d}});var n=r(5601);let i=new n.Yd("bytes/5.7.0");function o(t){return!!t.toHexString}function s(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return f(t)&&!(t.length%2)||l(t)}function u(t){return"number"==typeof t&&t==t&&t%1==0}function l(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!u(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function h(t,e){if(e||(e={}),"number"==typeof t){i.checkSafeUint53(t,"invalid arrayify value");let e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),s(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t)&&(t=t.toHexString()),f(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":i.throwArgumentError("hex data is odd-length","value",t));let n=[];for(let t=0;th(t)),r=e.reduce((t,e)=>t+e.length,0),n=new Uint8Array(r);return e.reduce((t,e)=>(n.set(e,t),t+e.length),0),s(n)}function d(t){let e=h(t);if(0===e.length)return e;let r=0;for(;r>4]+p[15&n]}return e}return i.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!=typeof t)t=m(t);else if(!f(t)||t.length%2)return null;return(t.length-2)/2}function v(t,e,r){return("string"!=typeof t?t=m(t):(!f(t)||t.length%2)&&i.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r)?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function y(t){let e="0x";return t.forEach(t=>{e+=m(t).substring(2)}),e}function b(t){let e=function(t){"string"!=typeof t&&(t=m(t)),f(t)||i.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&i.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function A(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){let r=h(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=m(r.slice(0,32)),e.s=m(r.slice(32,64))):65===r.length?(e.r=m(r.slice(0,32)),e.s=m(r.slice(32,64)),e.v=r[64]):i.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:i.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=m(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){let r=function(t,e){(t=h(t)).length>e&&i.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),s(r)}(h(e._vs),32);e._vs=m(r);let n=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=n:e.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;let o=m(r);null==e.s?e.s=o:e.s!==o&&i.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?i.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{let r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&f(e.r)?e.r=w(e.r,32):i.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&f(e.s)?e.s=w(e.s,32):i.throwArgumentError("signature missing or invalid s","signature",t);let r=h(e.s);r[0]>=128&&i.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let n=m(r);e._vs&&(f(e._vs)||i.throwArgumentError("signature invalid _vs","signature",t),e._vs=w(e._vs,32)),null==e._vs?e._vs=n:e._vs!==n&&i.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function E(t){return m(c([(t=A(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},7526:function(t,e,r){"use strict";r.d(e,{i:function(){return n}});let n="hash/5.7.0"},9401:function(t,e,r){"use strict";r.d(e,{id:function(){return o}});var n=r(2998),i=r(1632);function o(t){return(0,n.w)((0,i.Y0)(t))}},9817:function(t,e,r){"use strict";r.d(e,{E:function(){return _}});var n=r(8568),i=r(661),o=r(5591),s=r(2998),a=r(4336),u=r(5601),l=r(7526),h=r(9401);let c=new u.Yd(l.i),d=new Uint8Array(32);d.fill(0);let f=i.O$.from(-1),p=i.O$.from(0),m=i.O$.from(1),g=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),v=(0,o.$m)(m.toHexString(),32),y=(0,o.$m)(p.toHexString(),32),b={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},w=["name","version","chainId","verifyingContract","salt"];function A(t){return function(e){return"string"!=typeof e&&c.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}let E={name:A("name"),version:A("version"),chainId:function(t){try{return i.O$.from(t).toString()}catch(t){}return c.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,n.Kn)(t).toLowerCase()}catch(t){}return c.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{let e=(0,o.lE)(t);if(32!==e.length)throw Error("bad length");return(0,o.Dv)(e)}catch(t){}return c.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function x(t){{let e=t.match(/^(u?)int(\d*)$/);if(e){let r=""===e[1],n=parseInt(e[2]||"256");(n%8!=0||n>256||e[2]&&e[2]!==String(n))&&c.throwArgumentError("invalid numeric width","type",t);let s=g.mask(r?n-1:n),a=r?s.add(m).mul(f):p;return function(e){let r=i.O$.from(e);return(r.lt(a)||r.gt(s))&&c.throwArgumentError(`value out-of-bounds for ${t}`,"value",e),(0,o.$m)(r.toTwos(256).toHexString(),32)}}}{let e=t.match(/^bytes(\d+)$/);if(e){let r=parseInt(e[1]);return(0===r||r>32||e[1]!==String(r))&&c.throwArgumentError("invalid bytes width","type",t),function(e){let n=(0,o.lE)(e);return n.length!==r&&c.throwArgumentError(`invalid length for ${t}`,"value",e),function(t){let e=(0,o.lE)(t),r=e.length%32;return r?(0,o.xs)([e,d.slice(r)]):(0,o.Dv)(e)}(e)}}}switch(t){case"address":return function(t){return(0,o.$m)((0,n.Kn)(t),32)};case"bool":return function(t){return t?v:y};case"bytes":return function(t){return(0,s.w)(t)};case"string":return function(t){return(0,h.id)(t)}}return null}function k(t,e){return`${t}(${e.map(({name:t,type:e})=>e+" "+t).join(",")})`}class _{constructor(t){(0,a.zG)(this,"types",Object.freeze((0,a.p$)(t))),(0,a.zG)(this,"_encoderCache",{}),(0,a.zG)(this,"_types",{});let e={},r={},n={};for(let i in Object.keys(t).forEach(t=>{e[t]={},r[t]=[],n[t]={}}),t){let n={};t[i].forEach(o=>{n[o.name]&&c.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(i)}`,"types",t),n[o.name]=!0;let s=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===i&&c.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t);let a=x(s);a||(r[s]||c.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),r[s].push(i),e[i][s]=!0)})}let i=Object.keys(r).filter(t=>0===r[t].length);for(let o in 0===i.length?c.throwArgumentError("missing primary type","types",t):i.length>1&&c.throwArgumentError(`ambiguous primary types or unused types: ${i.map(t=>JSON.stringify(t)).join(", ")}`,"types",t),(0,a.zG)(this,"primaryType",i[0]),!function i(o,s){s[o]&&c.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t),s[o]=!0,Object.keys(e[o]).forEach(t=>{r[t]&&(i(t,s),Object.keys(s).forEach(e=>{n[e][t]=!0}))}),delete s[o]}(this.primaryType,{}),n){let e=Object.keys(n[o]);e.sort(),this._types[o]=k(o,t[o])+e.map(e=>k(e,t[e])).join("")}}getEncoder(t){let e=this._encoderCache[t];return e||(e=this._encoderCache[t]=this._getEncoder(t)),e}_getEncoder(t){{let e=x(t);if(e)return e}let e=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(e){let t=e[1],r=this.getEncoder(t),n=parseInt(e[3]);return e=>{n>=0&&e.length!==n&&c.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);let i=e.map(r);return this._types[t]&&(i=i.map(s.w)),(0,s.w)((0,o.xs)(i))}}let r=this.types[t];if(r){let e=(0,h.id)(this._types[t]);return t=>{let n=r.map(({name:e,type:r})=>{let n=this.getEncoder(r)(t[e]);return this._types[r]?(0,s.w)(n):n});return n.unshift(e),(0,o.xs)(n)}}return c.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){let e=this._types[t];return e||c.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return(0,s.w)(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){{let n=x(t);if(n)return r(t,e)}let n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){let t=n[1],i=parseInt(n[3]);return i>=0&&e.length!==i&&c.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e),e.map(e=>this._visit(t,e,r))}let i=this.types[t];return i?i.reduce((t,{name:n,type:i})=>(t[n]=this._visit(i,e[n],r),t),{}):c.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new _(t)}static getPrimaryType(t){return _.from(t).primaryType}static hashStruct(t,e,r){return _.from(e).hashStruct(t,r)}static hashDomain(t){let e=[];for(let r in t){let n=b[r];n||c.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:n})}return e.sort((t,e)=>w.indexOf(t.name)-w.indexOf(e.name)),_.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return(0,o.xs)(["0x1901",_.hashDomain(t),_.from(e).hash(r)])}static hash(t,e,r){return(0,s.w)(_.encode(t,e,r))}static resolveNames(t,e,r,n){var i,s,u,l;return i=this,s=void 0,u=void 0,l=function*(){t=(0,a.DC)(t);let i={};t.verifyingContract&&!(0,o.A7)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");let s=_.from(e);for(let t in s.visit(r,(t,e)=>("address"!==t||(0,o.A7)(e,20)||(i[e]="0x"),e)),i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),{domain:t,value:r=s.visit(r,(t,e)=>"address"===t&&i[e]?i[e]:e)}},new(u||(u=Promise))(function(t,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function n(t){try{o(l.throw(t))}catch(t){e(t)}}function o(e){var i;e.done?t(e.value):((i=e.value)instanceof u?i:new u(function(t){t(i)})).then(r,n)}o((l=l.apply(i,s||[])).next())})}static getPayload(t,e,r){_.hashDomain(t);let n={},s=[];w.forEach(e=>{let r=t[e];null!=r&&(n[e]=E[e](r),s.push({name:e,type:b[e]}))});let u=_.from(e),l=(0,a.DC)(e);return l.EIP712Domain?c.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",e):l.EIP712Domain=s,u.encode(r),{types:l,domain:n,primaryType:u.primaryType,message:u.visit(r,(t,e)=>{if(t.match(/^bytes(\d*)/))return(0,o.Dv)((0,o.lE)(e));if(t.match(/^u?int/))return i.O$.from(e).toString();switch(t){case"address":return e.toLowerCase();case"bool":return!!e;case"string":return"string"!=typeof e&&c.throwArgumentError("invalid string","value",e),e}return c.throwArgumentError("unsupported type","type",t)})}}}},2998:function(t,e,r){"use strict";r.d(e,{w:function(){return s}});var n=r(5807),i=r.n(n),o=r(5591);function s(t){return"0x"+i().keccak_256((0,o.lE)(t))}},5601:function(t,e,r){"use strict";var n,i,o,s;r.d(e,{Yd:function(){return p}});let a=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},h=l.default,c=null,d=function(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw Error("bad normalize")}catch(r){t.push(e)}}),t.length)throw Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED",s.ACTION_REJECTED="ACTION_REJECTED";let f="0123456789abcdef";class p{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){let r=t.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",t),h>l[r]||console.log.apply(console,e)}debug(...t){this._log(p.levels.DEBUG,t)}info(...t){this._log(p.levels.INFO,t)}warn(...t){this._log(p.levels.WARNING,t)}makeError(t,e,r){if(u)return this.makeError("censored error",e,{});e||(e=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(t=>{let e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4]+f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(e){n.push(t+"="+JSON.stringify(r[t].toString()))}}),n.push(`code=${e}`),n.push(`version=${this.version}`);let o=t,s="";switch(e){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");let a=Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach(function(t){a[t]=r[t]}),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,p.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),d&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:d})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||null==t)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||null==t)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return c||(c=new p("logger/5.7.0")),c}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!t)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!t,a=!!e}static setLogLevel(t){let e=l[t.toLowerCase()];if(null==e){p.globalLogger().warn("invalid log level - "+t);return}h=e}static from(t){return new p(t)}}p.errors=i,p.levels=n},4336:function(t,e,r){"use strict";r.d(e,{dk:function(){return d},uj:function(){return u},p$:function(){return c},zG:function(){return o},tu:function(){return s},mE:function(){return a},DC:function(){return l}});var n=r(5601);let i=new n.Yd("properties/5.7.0");function o(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function s(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function a(t){var e,r,n,i;return e=this,r=void 0,n=void 0,i=function*(){let e=Object.keys(t).map(e=>{let r=t[e];return Promise.resolve(r).then(t=>({key:e,value:t}))}),r=yield Promise.all(e);return r.reduce((t,e)=>(t[e.key]=e.value,t),{})},new(n||(n=Promise))(function(t,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(e){var r;e.done?t(e.value):((r=e.value)instanceof n?r:new n(function(t){t(r)})).then(s,a)}u((i=i.apply(e,r||[])).next())})}function u(t,e){t&&"object"==typeof t||i.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function l(t){let e={};for(let r in t)e[r]=t[r];return e}let h={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function c(t){return function(t){if(function t(e){if(null==e||h[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;let r=Object.keys(e);for(let n=0;nc(t)));if("object"==typeof t){let e={};for(let r in t){let n=t[r];void 0!==n&&o(e,r,c(n))}return e}return i.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(t)}class d{constructor(t){for(let e in t)this[e]=c(t[e])}}},1725:function(t,e,r){"use strict";let n,i;r.d(e,{r:function(){return tD}});var o,s=r(4344),a=r(661),u=r(5591),l=r(9817),h=r(4336),c=r(1632),d=r(1801);function f(t){t=atob(t);let e=[];for(let r=0;r{setTimeout(e,t)})}function y(t,e){if(null==t)return null;if("string"==typeof t)return t;if((0,u.Zq)(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return(0,c.ZN)(t)}catch(t){}return(0,u.Dv)(t)}return t}function b(t,e,r){let n=(t,e)=>{let n=null;if(null!=t)try{n=JSON.parse((0,c.ZN)(t))}catch(e){g.throwError("invalid JSON",m.Yd.errors.SERVER_ERROR,{body:t,error:e})}return r&&(n=r(n,e)),n},i=null;if(null!=e){i=(0,c.Y0)(e);let r="string"==typeof t?{url:t}:(0,h.DC)(t);if(r.headers){let t=0!==Object.keys(r.headers).filter(t=>"content-type"===t.toLowerCase()).length;t||(r.headers=(0,h.DC)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};t=r}return function(t,e,r){let n="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;g.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);let i="object"==typeof t?t.throttleCallback:null,o="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;g.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);let s="object"==typeof t&&!!t.errorPassThrough,a={},l=null,d={method:"GET"},b=!1,w=12e4;if("string"==typeof t)l=t;else if("object"==typeof t){if((null==t||null==t.url)&&g.throwArgumentError("missing URL","connection.url",t),l=t.url,"number"==typeof t.timeout&&t.timeout>0&&(w=t.timeout),t.headers)for(let e in t.headers)a[e.toLowerCase()]={key:e,value:String(t.headers[e])},["if-none-match","if-modified-since"].indexOf(e.toLowerCase())>=0&&(b=!0);if(d.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==l.substring(0,6)&&!0!==t.allowInsecureAuthentication&&g.throwError("basic authentication requires a secure https url",m.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});let e=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+p((0,c.Y0)(e))}}null!=t.skipFetchSetup&&(d.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(d.fetchOptions=(0,h.DC)(t.fetchOptions))}let A=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=l?l.match(A):null;if(E)try{var x;let t={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?f(E[3]):(x=E[3],(0,c.Y0)(x.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16)))))},e=t.body;return r&&(e=r(t.body,t)),Promise.resolve(e)}catch(t){g.throwError("processing response error",m.Yd.errors.SERVER_ERROR,{body:y(E[1],E[2]),error:t,requestBody:null,requestMethod:"GET",url:l})}e&&(d.method="POST",d.body=e,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));let k={};Object.keys(a).forEach(t=>{let e=a[t];k[e.key]=e.value}),d.headers=k;let _=function(){let t=null,e=new Promise(function(e,r){w&&(t=setTimeout(()=>{null!=t&&(t=null,r(g.makeError("timeout",m.Yd.errors.TIMEOUT,{requestBody:y(d.body,k["content-type"]),requestMethod:d.method,timeout:w,url:l})))},w))});return{promise:e,cancel:function(){null!=t&&(clearTimeout(t),t=null)}}}(),S=function(){var t,e,a,h;return t=this,e=void 0,a=void 0,h=function*(){for(let t=0;t{o[e.toLowerCase()]=t}):n.headers.keys().forEach(t=>{o[t.toLowerCase()]=n.headers.get(t)}),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:(0,u.lE)(new Uint8Array(i))}},new(i||(i=Promise))(function(t,e){function s(t){try{u(o.next(t))}catch(t){e(t)}}function a(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):((r=e.value)instanceof i?r:new i(function(t){t(r)})).then(s,a)}u((o=o.apply(r,n||[])).next())})}(l,d),t=300)&&(_.cancel(),g.throwError("bad response",m.Yd.errors.SERVER_ERROR,{status:e.statusCode,headers:e.headers,body:y(a,e.headers?e.headers["content-type"]:null),requestBody:y(d.body,k["content-type"]),requestMethod:d.method,url:l})),r)try{let t=yield r(a,e);return _.cancel(),t}catch(r){if(r.throttleRetry&&t!o&&(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&n(Error("timeout"))},e.timeout));let a=e.retryLimit,u=0;!function i(){return t().then(function(t){if(void 0!==t)s()&&r(t);else if(e.oncePoll)e.oncePoll.once("poll",i);else if(e.onceBlock)e.onceBlock.once("block",i);else if(!o){if(++u>a){s()&&n(Error("retry limit reached"));return}let t=e.interval*parseInt(String(Math.random()*Math.pow(2,u)));te.ceiling&&(t=e.ceiling),setTimeout(i,t)}return null},function(t){s()&&n(t)})}()})}let A="providers/5.7.2";var E=r(3844),x=r(3504),k=r(2998),_=r(7526);function S(t,e){null==e&&(e=1);let r=[],n=r.forEach,i=function(t,e){n.call(t,function(t){e>0&&Array.isArray(t)?i(t,e-1):r.push(t)})};return i(t,e),r}function M(t,e){let r=Array(t);for(let n=0,i=-1;ne[t]):r}function P(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;i>1:n>>1}return r})(t,r).forEach((t,e)=>n[e].push(t));return n}let I=(o=function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let t=1;t>--u&1}let c=0;for(let t=0;t<31;t++)c=c<<1|h();let d=[],f=0,p=2147483648;for(;;){let t=Math.floor(((c-f+1)*i-1)/p),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t{switch(e-m){case 3:return m+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return m+256+(t[a++]<<8|t[a++]);case 1:return m+t[a++];default:return e-1}})}(f("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")),i=0,()=>o[i++]),B=new Set(C(I)),R=new Set(C(I)),T=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(function(t,e){let r=1+e(),n=e(),i=function(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return S(P(i.length,1+t,e).map((t,e)=>{let o=t[0],s=t.slice(1);return Array(i[e]).fill(void 0).map((t,e)=>{let i=e*n;return[o+e*r,s.map(t=>t+i)]})}))}(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(P(1+t(),1+r,t).map(t=>[t[0],t.slice(1)]))}return function(t){let e={};for(let r=0;rt-e),function t(){let e=[];for(;;){let r=C(I,n);if(0==r.length)break;e.push({set:new Set(r),node:t()})}e.sort((t,e)=>e.set.size-t.set.size);let r=I();return{branches:e,valid:r%3,fe0f:!!(1&(r=r/3|0)),save:1==(r>>=1),check:2==r}}());function O(t){return t.filter(t=>65039!=t)}function D(t){for(let r of t.split(".")){var e;let t=(e=r,(0,c.XL)(e));try{for(let e=t.lastIndexOf(95)-1;e>=0;e--)if(95!==t[e])throw Error("underscore only allowed at start");if(t.length>=4&&t.every(t=>t<128)&&45===t[2]&&45===t[3])throw Error("invalid label extension")}catch(t){throw Error(`Invalid label "${r}": ${t.message}`)}}return t}let L=new m.Yd(_.i),F=new Uint8Array(32);function U(t){if(0===t.length)throw Error("invalid ENS name; empty component");return t}function H(t){let e=(0,c.Y0)(D(function(t,e){let r=(0,c.XL)(t).reverse(),n=[];for(;r.length;){let t=function(t,e){var r;let n,i;let o=N,s=[],a=t.length;for(e&&(e.length=0);a;){let u=t[--a];if(!(o=null===(r=o.branches.find(t=>t.set.has(u)))||void 0===r?void 0:r.node))break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),o.fe0f&&(s.push(65039),a>0&&65039==t[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return n}(r);if(t){n.push(...e(t));continue}let i=r.pop();if(B.has(i)){n.push(i);continue}if(R.has(i))continue;let o=T[i];if(o){n.push(...o);continue}throw Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return D(String.fromCodePoint(...n).normalize("NFC"))}(t,O))),r=[];if(0===t.length)return r;let n=0;for(let t=0;t=e.length)throw Error("invalid ENS name; empty component");return r.push(U(e.slice(n))),r}function G(t){"string"!=typeof t&&L.throwArgumentError("invalid ENS name; not a string","name",t);let e=F,r=H(t);for(;r.length;)e=(0,k.w)((0,u.zo)([e,(0,k.w)(r.pop())]));return(0,u.Dv)(e)}F.fill(0);let j=new m.Yd("networks/5.7.1");function z(t){let e=function(e,r){null==r&&(r={});let n=[];if(e.InfuraProvider&&"-"!==r.infura)try{n.push(new e.InfuraProvider(t,r.infura))}catch(t){}if(e.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new e.EtherscanProvider(t,r.etherscan))}catch(t){}if(e.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new e.AlchemyProvider(t,r.alchemy))}catch(t){}if(e.PocketProvider&&"-"!==r.pocket)try{let i=new e.PocketProvider(t,r.pocket);i.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(i.network.name)&&n.push(i)}catch(t){}if(e.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new e.CloudflareProvider(t))}catch(t){}if(e.AnkrProvider&&"-"!==r.ankr)try{let i=new e.AnkrProvider(t,r.ankr);i.network&&-1===["ropsten"].indexOf(i.network.name)&&n.push(i)}catch(t){}if(0===n.length)return null;if(e.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===t&&(i=2),new e.FallbackProvider(n,i)}return n[0]};return e.renetwork=function(t){return z(t)},e}function q(t,e){let r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null};return r.renetwork=function(e){return q(t,e)},r}let K={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:z("homestead")},Q={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:z("ropsten")},Y={chainId:63,name:"classicMordor",_defaultProvider:q("https://www.ethercluster.com/mordor","classicMordor")},Z={unspecified:{chainId:0,name:"unspecified"},homestead:K,mainnet:K,morden:{chainId:2,name:"morden"},ropsten:Q,testnet:Q,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:z("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:z("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:z("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:z("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:q("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Y,classicTestnet:Y,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:q("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:z("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:z("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"}};var V=r(840),J=r(1084),W=r.n(J),X=r(8568);let $=new m.Yd(A);class tt{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let t={},e=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),u=this.type.bind(this),l=t=>this.data(t,!0);return t.transaction={hash:o,type:u,accessList:tt.allowNull(this.accessList.bind(this),null),blockHash:tt.allowNull(o,null),blockNumber:tt.allowNull(a,null),transactionIndex:tt.allowNull(a,null),confirmations:tt.allowNull(a,null),from:e,gasPrice:tt.allowNull(r),maxPriorityFeePerGas:tt.allowNull(r),maxFeePerGas:tt.allowNull(r),gasLimit:r,to:tt.allowNull(e,null),value:r,nonce:a,data:i,r:tt.allowNull(this.uint256),s:tt.allowNull(this.uint256),v:tt.allowNull(a),creates:tt.allowNull(e,null),raw:tt.allowNull(i)},t.transactionRequest={from:tt.allowNull(e),nonce:tt.allowNull(a),gasLimit:tt.allowNull(r),gasPrice:tt.allowNull(r),maxPriorityFeePerGas:tt.allowNull(r),maxFeePerGas:tt.allowNull(r),to:tt.allowNull(e),value:tt.allowNull(r),data:tt.allowNull(l),type:tt.allowNull(a),accessList:tt.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:o,address:e,topics:tt.arrayOf(o),data:i,logIndex:a,blockHash:o},t.receipt={to:tt.allowNull(this.address,null),from:tt.allowNull(this.address,null),contractAddress:tt.allowNull(e,null),transactionIndex:a,root:tt.allowNull(s),gasUsed:r,logsBloom:tt.allowNull(i),blockHash:o,transactionHash:o,logs:tt.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:tt.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:tt.allowNull(r),status:tt.allowNull(a),type:u},t.block={hash:tt.allowNull(o),parentHash:o,number:a,timestamp:a,nonce:tt.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:tt.allowNull(e),extraData:i,transactions:tt.allowNull(tt.arrayOf(o)),baseFeePerGas:tt.allowNull(r)},t.blockWithTransactions=(0,h.DC)(t.block),t.blockWithTransactions.transactions=tt.allowNull(tt.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:tt.allowNull(n,void 0),toBlock:tt.allowNull(n,void 0),blockHash:tt.allowNull(o,void 0),address:tt.allowNull(e,void 0),topics:tt.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:tt.allowNull(a),blockHash:tt.allowNull(o),transactionIndex:a,removed:tt.allowNull(this.boolean.bind(this)),address:e,data:tt.allowFalsish(i,"0x"),topics:tt.arrayOf(o),transactionHash:o,logIndex:a},t}accessList(t){return(0,d.z7)(t||[])}number(t){return"0x"===t?0:a.O$.from(t).toNumber()}type(t){return"0x"===t||null==t?0:a.O$.from(t).toNumber()}bigNumber(t){return a.O$.from(t)}boolean(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1}throw Error("invalid boolean - "+t)}hex(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),(0,u.A7)(t))?t.toLowerCase():$.throwArgumentError("invalid hash","value",t)}data(t,e){let r=this.hex(t,e);if(r.length%2!=0)throw Error("invalid data; odd-length - "+t);return r}address(t){return(0,X.Kn)(t)}callAddress(t){if(!(0,u.A7)(t,32))return null;let e=(0,X.Kn)((0,u.p3)(t,12));return"0x0000000000000000000000000000000000000000"===e?null:e}contractAddress(t){return(0,X.CR)(t)}blockTag(t){if(null==t)return"latest";if("earliest"===t)return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if("number"==typeof t||(0,u.A7)(t))return(0,u.$P)(t);throw Error("invalid blockTag")}hash(t,e){let r=this.hex(t,e);return 32!==(0,u.E1)(r)?$.throwArgumentError("invalid hash","value",t):r}difficulty(t){if(null==t)return null;let e=a.O$.from(t);try{return e.toNumber()}catch(t){}return null}uint256(t){if(!(0,u.A7)(t))throw Error("invalid uint256");return(0,u.$m)(t,32)}_block(t,e){null!=t.author&&null==t.miner&&(t.miner=t.author);let r=null!=t._difficulty?t._difficulty:t.difficulty,n=tt.check(e,t);return n._difficulty=null==r?null:a.O$.from(r),n}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return tt.check(this.formats.transactionRequest,t)}transactionResponse(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&a.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),(1===t.type||2===t.type)&&null==t.accessList&&(t.accessList=[]);let e=tt.check(this.formats.transaction,t);if(null!=t.chainId){let r=t.chainId;(0,u.A7)(r)&&(r=a.O$.from(r).toNumber()),e.chainId=r}else{let r=t.networkId;null==r&&null==e.v&&(r=t.chainId),(0,u.A7)(r)&&(r=a.O$.from(r).toNumber()),"number"!=typeof r&&null!=e.v&&((r=(e.v-35)/2)<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),e.chainId=r}return e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}transaction(t){return(0,d.Qc)(t)}receiptLog(t){return tt.check(this.formats.receiptLog,t)}receipt(t){let e=tt.check(this.formats.receipt,t);if(null!=e.root){if(e.root.length<=4){let t=a.O$.from(e.root).toNumber();0===t||1===t?(null!=e.status&&e.status!==t&&$.throwArgumentError("alt-root-status/status mismatch","value",{root:e.root,status:e.status}),e.status=t,delete e.root):$.throwArgumentError("invalid alt-root-status","value.root",e.root)}else 66!==e.root.length&&$.throwArgumentError("invalid root hash","value.root",e.root)}return null!=e.status&&(e.byzantium=!0),e}topics(t){return Array.isArray(t)?t.map(t=>this.topics(t)):null!=t?this.hash(t,!0):null}filter(t){return tt.check(this.formats.filter,t)}filterLog(t){return tt.check(this.formats.filterLog,t)}static check(t,e){let r={};for(let n in t)try{let i=t[n](e[n]);void 0!==i&&(r[n]=i)}catch(t){throw t.checkKey=n,t.checkValue=e[n],t}return r}static allowNull(t,e){return function(r){return null==r?e:t(r)}}static allowFalsish(t,e){return function(r){return r?t(r):e}}static arrayOf(t){return function(e){if(!Array.isArray(e))throw Error("not an array");let r=[];return e.forEach(function(e){r.push(t(e))}),r}}}var te=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let tr=new m.Yd(A);function tn(t){return null==t?"null":(32!==(0,u.E1)(t)&&tr.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function ti(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(t=>{if(!Array.isArray(t))return tn(t);{let e={};t.forEach(t=>{e[tn(t)]=!0});let r=Object.keys(e);return r.sort(),r.join("|")}}).join("&")}function to(t){if("string"==typeof t){if(t=t.toLowerCase(),32===(0,u.E1)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else if(Array.isArray(t))return"filter:*:"+ti(t);else if(E.Sg.isForkEvent(t))throw tr.warn("not implemented"),Error("not implemented");else if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+ti(t.topics||[]);throw Error("invalid event - "+t)}function ts(){return new Date().getTime()}function ta(t){return new Promise(e=>{setTimeout(e,t)})}let tu=["block","network","pending","poll"];class tl{constructor(t,e,r){(0,h.zG)(this,"tag",t),(0,h.zG)(this,"listener",e),(0,h.zG)(this,"once",r),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 t=this.tag.split(":");return"tx"!==t[0]?null:t[1]}get filter(){var t;let e=this.tag.split(":");if("filter"!==e[0])return null;let r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map(t=>{if(""===t)return[];let e=t.split("|").map(t=>"null"===t?null:t);return 1===e.length?e[0]:e}),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}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 tc(t){return(0,u.$m)(a.O$.from(t).toHexString(),32)}function td(t){return x.eU.encode((0,u.zo)([t,(0,u.p3)((0,V.JQ)((0,V.JQ)(t)),0,4)]))}let tf=RegExp("^(ipfs)://(.*)$","i"),tp=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),tf,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function tm(t,e){try{return(0,c.ZN)(tg(t,e))}catch(t){}return null}function tg(t,e){if("0x"===t)return null;let r=a.O$.from((0,u.p3)(t,e,e+32)).toNumber(),n=a.O$.from((0,u.p3)(t,r,r+32)).toNumber();return(0,u.p3)(t,r+32,r+32+n)}function tv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):tr.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function ty(t){let e=(0,u.lE)(t);if(e.length>32)throw Error("internal; should not happen");let r=new Uint8Array(32);return r.set(e,32-e.length),r}function tb(t){let e=[],r=0;for(let n=0;na.O$.from(t).eq(1)).catch(t=>{if(t.code===m.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t})),this._supportsEip2544}_fetch(t,e){return te(this,void 0,void 0,function*(){let r={to:this.address,ccipReadEnabled:!0,data:(0,u.xs)([t,G(this.name),e||"0x"])},n=!1;if(yield this.supportsWildcard()){var i;n=!0,r.data=(0,u.xs)(["0x9061b923",tb([(i=this.name,(0,u.Dv)((0,u.zo)(H(i).map(t=>{if(t.length>63)throw Error("invalid DNS encoded entry; length exceeds 63 bytes");let e=new Uint8Array(t.length+1);return e.set(t,1),e[0]=e.length-1,e})))+"00"),r.data])])}try{let t=yield this.provider.call(r);return(0,u.lE)(t).length%32==4&&tr.throwError("resolver threw error",m.Yd.errors.CALL_EXCEPTION,{transaction:r,data:t}),n&&(t=tg(t,0)),t}catch(t){if(t.code===m.Yd.errors.CALL_EXCEPTION)return null;throw t}})}_fetchBytes(t,e){return te(this,void 0,void 0,function*(){let r=yield this._fetch(t,e);return null!=r?tg(r,0):null})}_getAddress(t,e){let r=th[String(t)];if(null==r&&tr.throwError(`unsupported coin type: ${t}`,m.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),"eth"===r.ilk)return this.provider.formatter.address(e);let n=(0,u.lE)(e);if(null!=r.p2pkh){let t=e.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(t){let e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return td((0,u.zo)([[r.p2pkh],"0x"+t[2]]))}}if(null!=r.p2sh){let t=e.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(t){let e=parseInt(t[1],16);if(t[2].length===2*e&&e>=1&&e<=75)return td((0,u.zo)([[r.p2sh],"0x"+t[2]]))}}if(null!=r.prefix){let t=n[1],e=n[0];if(0===e?20!==t&&32!==t&&(e=-1):e=-1,e>=0&&n.length===2+t&&t>=1&&t<=75){let t=W().toWords(n.slice(2));return t.unshift(e),W().encode(r.prefix,t)}}return null}getAddress(t){return te(this,void 0,void 0,function*(){if(null==t&&(t=60),60===t)try{let t=yield this._fetch("0x3b3b57de");if("0x"===t||"0x0000000000000000000000000000000000000000000000000000000000000000"===t)return null;return this.provider.formatter.callAddress(t)}catch(t){if(t.code===m.Yd.errors.CALL_EXCEPTION)return null;throw t}let e=yield this._fetchBytes("0xf1cb7e06",tc(t));if(null==e||"0x"===e)return null;let r=this._getAddress(t,e);return null==r&&tr.throwError("invalid or unsupported coin data",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:e}),r})}getAvatar(){return te(this,void 0,void 0,function*(){let t=[{type:"name",content:this.name}];try{let e=yield this.getText("avatar");if(null==e)return null;for(let r=0;rt[e]);return"sia://"+e}return tr.throwError("invalid or unsupported content hash data",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})})}getText(t){return te(this,void 0,void 0,function*(){let e=(0,c.Y0)(t);(e=(0,u.zo)([tc(64),tc(e.length),e])).length%32!=0&&(e=(0,u.zo)([e,(0,u.$m)("0x",32-t.length%32)]));let r=yield this._fetchBytes("0x59d1d43c",(0,u.Dv)(e));return null==r||"0x"===r?null:(0,c.ZN)(r)})}}let tA=null,tE=1;class tx extends E.zt{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,h.zG)(this,"anyNetwork","any"===t),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch(t=>{}),this._ready().catch(t=>{});else{let e=(0,h.tu)(new.target,"getNetwork")(t);e?((0,h.zG)(this,"_network",e),this.emit("network",e,null)):tr.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return te(this,void 0,void 0,function*(){if(null==this._network){let t=null;if(this._networkPromise)try{t=yield this._networkPromise}catch(t){}null==t&&(t=yield this.detectNetwork()),t||tr.throwError("no network detected",m.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,h.zG)(this,"_network",t),this.emit("network",t,null))}return this._network})}get ready(){return w(()=>this._ready().then(t=>t,t=>{if(t.code!==m.Yd.errors.NETWORK_ERROR||"noNetwork"!==t.event)throw t}))}static getFormatter(){return null==tA&&(tA=new tt),tA}static getNetwork(t){return function(t){if(null==t)return null;if("number"==typeof t){for(let e in Z){let r=Z[e];if(r.chainId===t)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){let e=Z[t];return null==e?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}let e=Z[t.name];if(!e)return"number"!=typeof t.chainId&&j.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&j.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;if(null==r&&e._defaultProvider){var n;r=(n=e._defaultProvider)&&"function"==typeof n.renetwork?e._defaultProvider.renetwork(t):e._defaultProvider}return{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}(null==t?"homestead":t)}ccipReadFetch(t,e,r){return te(this,void 0,void 0,function*(){if(this.disableCcipRead||0===r.length)return null;let n=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let t=0;t=0?null:JSON.stringify({data:i,sender:n}),u=yield b({url:s,errorPassThrough:!0},a,(t,e)=>(t.status=e.statusCode,t));if(u.data)return u.data;let l=u.message||"unknown error";if(u.status>=400&&u.status<500)return tr.throwError(`response not found during CCIP fetch: ${l}`,m.Yd.errors.SERVER_ERROR,{url:e,errorMessage:l});o.push(l)}return tr.throwError(`error encountered during CCIP fetch: ${o.map(t=>JSON.stringify(t)).join(", ")}`,m.Yd.errors.SERVER_ERROR,{urls:r,errorMessages:o})})}_getInternalBlockNumber(t){return te(this,void 0,void 0,function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){let e=this._internalBlockNumber;try{let r=yield e;if(ts()-r.respTime<=t)return r.blockNumber;break}catch(t){if(this._internalBlockNumber===e)break}}let e=ts(),r=(0,h.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(t=>null,t=>t)}).then(({blockNumber:t,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;let i=ts();return(t=a.O$.from(t).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return te(this,void 0,void 0,function*(){let t=tE++,e=[],r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(t){this.emit("error",t);return}if(this._setFastBlockNumber(r),this.emit("poll",t,r),r===this._lastBlockNumber){this.emit("didPoll",t);return}if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)tr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",tr.makeError("network block skew detected",m.Yd.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let t=this._emitted.block+1;t<=r;t++)this.emit("block",t);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(t=>{if("block"===t)return;let e=this._emitted[t];"pending"!==e&&r-e>12&&delete this._emitted[t]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(t=>{switch(t.type){case"tx":{let r=t.hash,n=this.getTransactionReceipt(r).then(t=>(t&&null!=t.blockNumber&&(this._emitted["t:"+r]=t.blockNumber,this.emit(r,t)),null)).catch(t=>{this.emit("error",t)});e.push(n);break}case"filter":if(!t._inflight){t._inflight=!0,-2===t._lastBlockNumber&&(t._lastBlockNumber=r-1);let n=t.filter;n.fromBlock=t._lastBlockNumber+1,n.toBlock=r;let i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);let o=this.getLogs(n).then(e=>{t._inflight=!1,0!==e.length&&e.forEach(e=>{e.blockNumber>t._lastBlockNumber&&(t._lastBlockNumber=e.blockNumber),this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(n,e)})}).catch(e=>{this.emit("error",e),t._inflight=!1});e.push(o)}}}),this._lastBlockNumber=r,Promise.all(e).then(()=>{this.emit("didPoll",t)}).catch(t=>{this.emit("error",t)})})}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return te(this,void 0,void 0,function*(){return tr.throwError("provider does not support network detection",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return te(this,void 0,void 0,function*(){let t=yield this._ready(),e=yield this.detectNetwork();if(t.chainId!==e.chainId){if(this.anyNetwork)return this._network=e,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",e,t),yield ta(0),this._network;let r=tr.makeError("underlying network changed",m.Yd.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:e});throw this.emit("error",r),r}return t})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(t=>{this._setFastBlockNumber(t)},t=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(t){t&&!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))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let t=ts();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(t){(null==this._fastBlockNumber||!(tthis._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,e,r){return te(this,void 0,void 0,function*(){return this._waitForTransaction(t,null==e?1:e,r||0,null)})}_waitForTransaction(t,e,r,n){return te(this,void 0,void 0,function*(){let i=yield this.getTransactionReceipt(t);return(i?i.confirmations:0)>=e?i:new Promise((i,o)=>{let s=[],a=!1,u=function(){return!!a||(a=!0,s.forEach(t=>{t()}),!1)},l=t=>{t.confirmations{this.removeListener(t,l)}),n){let r=n.startBlock,i=null,l=s=>te(this,void 0,void 0,function*(){a||(yield ta(1e3),this.getTransactionCount(n.from).then(h=>te(this,void 0,void 0,function*(){if(!a){if(h<=n.nonce)r=s;else{{let e=yield this.getTransaction(t);if(e&&null!=e.blockNumber)return}for(null==i&&(i=r-3){a||this.once("block",l)}))});if(a)return;this.once("block",l),s.push(()=>{this.removeListener("block",l)})}if("number"==typeof r&&r>0){let t=setTimeout(()=>{u()||o(tr.makeError("timeout exceeded",m.Yd.errors.TIMEOUT,{timeout:r}))},r);t.unref&&t.unref(),s.push(()=>{clearTimeout(t)})}})})}getBlockNumber(){return te(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return te(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield this.perform("getGasPrice",{});try{return a.O$.from(t)}catch(e){return tr.throwError("bad result from backend",m.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e})}})}getBalance(t,e){return te(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.mE)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getBalance",r);try{return a.O$.from(n)}catch(t){return tr.throwError("bad result from backend",m.Yd.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:t})}})}getTransactionCount(t,e){return te(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.mE)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getTransactionCount",r);try{return a.O$.from(n).toNumber()}catch(t){return tr.throwError("bad result from backend",m.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:t})}})}getCode(t,e){return te(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.mE)({address:this._getAddress(t),blockTag:this._getBlockTag(e)}),n=yield this.perform("getCode",r);try{return(0,u.Dv)(n)}catch(t){return tr.throwError("bad result from backend",m.Yd.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:t})}})}getStorageAt(t,e,r){return te(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield(0,h.mE)({address:this._getAddress(t),blockTag:this._getBlockTag(r),position:Promise.resolve(e).then(t=>(0,u.$P)(t))}),i=yield this.perform("getStorageAt",n);try{return(0,u.Dv)(i)}catch(t){return tr.throwError("bad result from backend",m.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:t})}})}_wrapTransaction(t,e,r){if(null!=e&&32!==(0,u.E1)(e))throw Error("invalid response - sendTransaction");let n=t;return null!=e&&t.hash!==e&&tr.throwError("Transaction hash mismatch from Provider.sendTransaction.",m.Yd.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=(e,n)=>te(this,void 0,void 0,function*(){let i;null==e&&(e=1),null==n&&(n=0),0!==e&&null!=r&&(i={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:r});let o=yield this._waitForTransaction(t.hash,e,n,i);return null==o&&0===e?null:(this._emitted["t:"+t.hash]=o.blockNumber,0===o.status&&tr.throwError("transaction failed",m.Yd.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:o}),o)}),n}sendTransaction(t){return te(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield Promise.resolve(t).then(t=>(0,u.Dv)(t)),r=this.formatter.transaction(t);null==r.confirmations&&(r.confirmations=0);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let t=yield this.perform("sendTransaction",{signedTransaction:e});return this._wrapTransaction(r,t,n)}catch(t){throw t.transaction=r,t.transactionHash=r.hash,t}})}_getTransactionRequest(t){return te(this,void 0,void 0,function*(){let e=yield t,r={};return["from","to"].forEach(t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then(t=>t?this._getAddress(t):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then(t=>t?a.O$.from(t):null))}),["type"].forEach(t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then(t=>null!=t?t:null))}),e.accessList&&(r.accessList=this.formatter.accessList(e.accessList)),["data"].forEach(t=>{null!=e[t]&&(r[t]=Promise.resolve(e[t]).then(t=>t?(0,u.Dv)(t):null))}),this.formatter.transactionRequest((yield(0,h.mE)(r)))})}_getFilter(t){return te(this,void 0,void 0,function*(){t=yield t;let e={};return null!=t.address&&(e.address=this._getAddress(t.address)),["blockHash","topics"].forEach(r=>{null!=t[r]&&(e[r]=t[r])}),["fromBlock","toBlock"].forEach(r=>{null!=t[r]&&(e[r]=this._getBlockTag(t[r]))}),this.formatter.filter((yield(0,h.mE)(e)))})}_call(t,e,r){return te(this,void 0,void 0,function*(){r>=10&&tr.throwError("CCIP read exceeded maximum redirections",m.Yd.errors.SERVER_ERROR,{redirects:r,transaction:t});let n=t.to,i=yield this.perform("call",{transaction:t,blockTag:e});if(r>=0&&"latest"===e&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,u.E1)(i)%32==4)try{let o=(0,u.p3)(i,4),s=(0,u.p3)(o,0,32);a.O$.from(s).eq(n)||tr.throwError("CCIP Read sender did not match",m.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:i});let l=[],h=a.O$.from((0,u.p3)(o,32,64)).toNumber(),c=a.O$.from((0,u.p3)(o,h,h+32)).toNumber(),d=(0,u.p3)(o,h+32);for(let e=0;ete(this,void 0,void 0,function*(){let t=yield this.perform("getBlock",n);if(null==t)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(e){let e=null;for(let r=0;rthis._wrapTransaction(t)),r}return this.formatter.block(t)}),{oncePoll:this})})}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return te(this,void 0,void 0,function*(){yield this.getNetwork(),t=yield t;let e={transactionHash:this.formatter.hash(t,!0)};return w(()=>te(this,void 0,void 0,function*(){let r=yield this.perform("getTransaction",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;let n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval),e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}),{oncePoll:this})})}getTransactionReceipt(t){return te(this,void 0,void 0,function*(){yield this.getNetwork(),t=yield t;let e={transactionHash:this.formatter.hash(t,!0)};return w(()=>te(this,void 0,void 0,function*(){let r=yield this.perform("getTransactionReceipt",e);if(null==r)return null==this._emitted["t:"+t]?null:void 0;if(null==r.blockHash)return;let n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval),e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}),{oncePoll:this})})}getLogs(t){return te(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield(0,h.mE)({filter:this._getFilter(t)}),r=yield this.perform("getLogs",e);return r.forEach(t=>{null==t.removed&&(t.removed=!1)}),tt.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return te(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(t){return te(this,void 0,void 0,function*(){if("number"==typeof(t=yield t)&&t<0){t%1&&tr.throwArgumentError("invalid BlockTag","blockTag",t);let e=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return(e+=t)<0&&(e=0),this.formatter.blockTag(e)}return this.formatter.blockTag(t)})}getResolver(t){return te(this,void 0,void 0,function*(){let e=t;for(;;){if(""===e||"."===e||"eth"!==t&&"eth"===e)return null;let r=yield this._getResolver(e,"getResolver");if(null!=r){let n=new tw(this,r,t);if(e!==t&&!(yield n.supportsWildcard()))return null;return n}e=e.split(".").slice(1).join(".")}})}_getResolver(t,e){return te(this,void 0,void 0,function*(){null==e&&(e="ENS");let r=yield this.getNetwork();r.ensAddress||tr.throwError("network does not support ENS",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:e,network:r.name});try{let e=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+G(t).substring(2)});return this.formatter.callAddress(e)}catch(t){}return null})}resolveName(t){return te(this,void 0,void 0,function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(e){if((0,u.A7)(t))throw e}"string"!=typeof t&&tr.throwArgumentError("invalid ENS name","name",t);let e=yield this.getResolver(t);return e?yield e.getAddress():null})}lookupAddress(t){return te(this,void 0,void 0,function*(){t=yield t,t=this.formatter.address(t);let e=t.substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(e,"lookupAddress");if(null==r)return null;let n=tm((yield this.call({to:r,data:"0x691f3431"+G(e).substring(2)})),0),i=yield this.resolveName(n);return i!=t?null:n})}getAvatar(t){return te(this,void 0,void 0,function*(){let e=null;if((0,u.A7)(t)){let r=this.formatter.address(t),n=r.substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(n,"getAvatar");if(!i)return null;e=new tw(this,i,n);try{let t=yield e.getAvatar();if(t)return t.url}catch(t){if(t.code!==m.Yd.errors.CALL_EXCEPTION)throw t}try{let t=tm((yield this.call({to:i,data:"0x691f3431"+G(n).substring(2)})),0);e=yield this.getResolver(t)}catch(t){if(t.code!==m.Yd.errors.CALL_EXCEPTION)throw t;return null}}else if(!(e=yield this.getResolver(t)))return null;let r=yield e.getAvatar();return null==r?null:r.url})}perform(t,e){return tr.throwError(t+" not implemented",m.Yd.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(t){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(t,e,r){let n=new tl(to(t),e,r);return this._events.push(n),this._startEvent(n),this}on(t,e){return this._addEventListener(t,e,!1)}once(t,e){return this._addEventListener(t,e,!0)}emit(t,...e){let r=!1,n=[],i=to(t);return this._events=this._events.filter(t=>t.tag!==i||(setTimeout(()=>{t.listener.apply(this,e)},0),r=!0,!t.once||(n.push(t),!1))),n.forEach(t=>{this._stopEvent(t)}),r}listenerCount(t){if(!t)return this._events.length;let e=to(t);return this._events.filter(t=>t.tag===e).length}listeners(t){if(null==t)return this._events.map(t=>t.listener);let e=to(t);return this._events.filter(t=>t.tag===e).map(t=>t.listener)}off(t,e){if(null==e)return this.removeAllListeners(t);let r=[],n=!1,i=to(t);return this._events=this._events.filter(t=>t.tag!==i||t.listener!=e||!!n||(n=!0,r.push(t),!1)),r.forEach(t=>{this._stopEvent(t)}),this}removeAllListeners(t){let e=[];if(null==t)e=this._events,this._events=[];else{let r=to(t);this._events=this._events.filter(t=>t.tag!==r||(e.push(t),!1))}return e.forEach(t=>{this._stopEvent(t)}),this}}var tk=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let t_=new m.Yd(A),tS=["call","estimateGas"];function tM(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){let r=(0,u.A7)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"==typeof t){for(let r in t){let n=tM(t[r],e);if(n)return n}return null}if("string"==typeof t)try{return tM(JSON.parse(t),e)}catch(t){}return null}function tC(t,e,r){let n=r.transaction||r.signedTransaction;if("call"===t){let t=tM(e,!0);if(t)return t.data;t_.throwError("missing revert data in call exception; Transaction reverted without a reason string",m.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if("estimateGas"===t){let r=tM(e.body,!1);null==r&&(r=tM(e,!1)),r&&t_.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",m.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===m.Yd.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?i=e.error.message:"string"==typeof e.body?i=e.body:"string"==typeof e.responseText&&(i=e.responseText),(i=(i||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&t_.throwError("insufficient funds for intrinsic transaction cost",m.Yd.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&t_.throwError("nonce has already been used",m.Yd.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&t_.throwError("replacement fee too low",m.Yd.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&t_.throwError("legacy pre-eip-155 transactions not supported",m.Yd.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),tS.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&t_.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",m.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function tP(t){return new Promise(function(e){setTimeout(e,t)})}function tI(t){if(t.error){let e=Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function tB(t){return t?t.toLowerCase():t}let tR={};class tT extends s.E{constructor(t,e,r){if(super(),t!==tR)throw Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,h.zG)(this,"provider",e),null==r&&(r=0),"string"==typeof r?((0,h.zG)(this,"_address",this.provider.formatter.address(r)),(0,h.zG)(this,"_index",null)):"number"==typeof r?((0,h.zG)(this,"_index",r),(0,h.zG)(this,"_address",null)):t_.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(t){return t_.throwError("cannot alter JSON-RPC Signer connection",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new tN(tR,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(t=>(t.length<=this._index&&t_.throwError("unknown account #"+this._index,m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index])))}sendUncheckedTransaction(t){t=(0,h.DC)(t);let e=this.getAddress().then(t=>(t&&(t=t.toLowerCase()),t));if(null==t.gasLimit){let r=(0,h.DC)(t);r.from=e,t.gasLimit=this.provider.estimateGas(r)}return null!=t.to&&(t.to=Promise.resolve(t.to).then(t=>tk(this,void 0,void 0,function*(){if(null==t)return null;let e=yield this.provider.resolveName(t);return null==e&&t_.throwArgumentError("provided ENS name resolves to null","tx.to",t),e}))),(0,h.mE)({tx:(0,h.mE)(t),sender:e}).then(({tx:e,sender:r})=>{null!=e.from?e.from.toLowerCase()!==r&&t_.throwArgumentError("from address mismatch","transaction",t):e.from=r;let n=this.provider.constructor.hexlifyTransaction(e,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then(t=>t,t=>("string"==typeof t.message&&t.message.match(/user denied/i)&&t_.throwError("user rejected transaction",m.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:e}),tC("sendTransaction",t,n)))})}signTransaction(t){return t_.throwError("signing transactions is unsupported",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return tk(this,void 0,void 0,function*(){let e=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(t);try{return yield w(()=>tk(this,void 0,void 0,function*(){let t=yield this.provider.getTransaction(r);if(null!==t)return this.provider._wrapTransaction(t,r,e)}),{oncePoll:this.provider})}catch(t){throw t.transactionHash=r,t}})}signMessage(t){return tk(this,void 0,void 0,function*(){let e="string"==typeof t?(0,c.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,u.Dv)(e),r.toLowerCase()])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&t_.throwError("user rejected signing",m.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:t}),e}})}_legacySignMessage(t){return tk(this,void 0,void 0,function*(){let e="string"==typeof t?(0,c.Y0)(t):t,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,u.Dv)(e)])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&t_.throwError("user rejected signing",m.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:t}),e}})}_signTypedData(t,e,r){return tk(this,void 0,void 0,function*(){let n=yield l.E.resolveNames(t,e,r,t=>this.provider.resolveName(t)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(l.E.getPayload(n.domain,e,n.value))])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&t_.throwError("user rejected signing",m.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:e,value:n.value}}),t}})}unlock(t){return tk(this,void 0,void 0,function*(){let e=this.provider,r=yield this.getAddress();return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])})}}class tN extends tT{sendTransaction(t){return this.sendUncheckedTransaction(t).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(t,e)}))}}let tO={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class tD extends tx{constructor(t,e){let r=e;null==r&&(r=new Promise((t,e)=>{setTimeout(()=>{this.detectNetwork().then(e=>{t(e)},t=>{e(t)})},0)})),super(r),t||(t=(0,h.tu)(this.constructor,"defaultUrl")()),"string"==typeof t?(0,h.zG)(this,"connection",Object.freeze({url:t})):(0,h.zG)(this,"connection",Object.freeze((0,h.DC)(t))),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 tk(this,void 0,void 0,function*(){yield tP(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch(e){try{t=yield this.send("net_version",[])}catch(t){}}if(null!=t){let e=(0,h.tu)(this.constructor,"getNetwork");try{return e(a.O$.from(t).toNumber())}catch(e){return t_.throwError("could not detect network",m.Yd.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return t_.throwError("could not detect network",m.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(t){return new tT(tR,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(t=>t.map(t=>this.formatter.address(t)))}send(t,e){let r={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,h.p$)(r),provider:this});let n=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(n&&this._cache[t])return this._cache[t];let i=b(this.connection,JSON.stringify(r),tI).then(t=>(this.emit("debug",{action:"response",request:r,response:t,provider:this}),t),t=>{throw this.emit("debug",{action:"response",error:t,request:r,provider:this}),t});return n&&(this._cache[t]=i,setTimeout(()=>{this._cache[t]=null},0)),i}prepareRequest(t,e){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[tB(e.address),e.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[tB(e.address),e.blockTag]];case"getCode":return["eth_getCode",[tB(e.address),e.blockTag]];case"getStorageAt":return["eth_getStorageAt",[tB(e.address),(0,u.$m)(e.position,32),e.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[e.signedTransaction]];case"getBlock":if(e.blockTag)return["eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]];if(e.blockHash)return["eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]];break;case"getTransaction":return["eth_getTransactionByHash",[e.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[e.transactionHash]];case"call":{let t=(0,h.tu)(this.constructor,"hexlifyTransaction");return["eth_call",[t(e.transaction,{from:!0}),e.blockTag]]}case"estimateGas":{let t=(0,h.tu)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[t(e.transaction,{from:!0})]]}case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=tB(e.filter.address)),["eth_getLogs",[e.filter]]}return null}perform(t,e){return tk(this,void 0,void 0,function*(){if("call"===t||"estimateGas"===t){let t=e.transaction;if(t&&null!=t.type&&a.O$.from(t.type).isZero()&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){let r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((e=(0,h.DC)(e)).transaction=(0,h.DC)(t),delete e.transaction.type)}}let r=this.prepareRequest(t,e);null==r&&t_.throwError(t+" not implemented",m.Yd.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(r[0],r[1])}catch(r){return tC(t,r,e)}})}_startEvent(t){"pending"===t.tag&&this._startPending(),super._startEvent(t)}_startPending(){if(null!=this._pendingFilter)return;let t=this,e=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=e,e.then(function(r){return function n(){t.send("eth_getFilterChanges",[r]).then(function(r){if(t._pendingFilter!=e)return null;let n=Promise.resolve();return r.forEach(function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then(function(){return t.getTransaction(e).then(function(e){return t.emit("pending",e),null})})}),n.then(function(){return tP(1e3)})}).then(function(){if(t._pendingFilter!=e){t.send("eth_uninstallFilter",[r]);return}return setTimeout(function(){n()},0),null}).catch(t=>{})}(),r}).catch(t=>{})}_stopEvent(t){"pending"===t.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,e){let r=(0,h.DC)(tO);if(e)for(let t in e)e[t]&&(r[t]=!0);(0,h.uj)(t,r);let n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(e){if(null==t[e])return;let r=(0,u.$P)(a.O$.from(t[e]));"gasLimit"===e&&(e="gas"),n[e]=r}),["from","to","data"].forEach(function(e){null!=t[e]&&(n[e]=(0,u.Dv)(t[e]))}),t.accessList&&(n.accessList=(0,d.z7)(t.accessList)),n}}},4319:function(t,e,r){"use strict";r.d(e,{J:function(){return c},c:function(){return u}});var n=r(5591),i=r(5601);let o=new i.Yd("rlp/5.7.0");function s(t){let e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function a(t,e,r){let n=0;for(let i=0;ie+1+n&&o.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function h(t,e){if(0===t.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),t[e]>=248){let r=t[e]-247;e+1+r>t.length&&o.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});let n=a(t,e+1,r);return e+1+r+n>t.length&&o.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(t,e,e+1+r,r+n)}if(t[e]>=192){let r=t[e]-192;return e+1+r>t.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),l(t,e,e+1,r)}if(t[e]>=184){let r=t[e]-183;e+1+r>t.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let s=a(t,e+1,r);e+1+r+s>t.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});let u=(0,n.Dv)(t.slice(e+1+r,e+1+r+s));return{consumed:1+r+s,result:u}}if(t[e]>=128){let r=t[e]-128;e+1+r>t.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{});let s=(0,n.Dv)(t.slice(e+1,e+1+r));return{consumed:1+r,result:s}}return{consumed:1,result:(0,n.Dv)(t[e])}}function c(t){let e=(0,n.lE)(t),r=h(e,0);return r.consumed!==e.length&&o.throwArgumentError("invalid rlp data","data",t),r.result}},840:function(t,e,r){"use strict";r.d(e,{Gy:function(){return c},bP:function(){return l},JQ:function(){return h}});var n=r(8059),i=r.n(n),o=r(5591),s=r(3059),a=r(5601);let u=new a.Yd("sha2/5.7.0");function l(t){return"0x"+i().ripemd160().update((0,o.lE)(t)).digest("hex")}function h(t){return"0x"+i().sha256().update((0,o.lE)(t)).digest("hex")}function c(t,e,r){return s.p[t]||u.throwError("unsupported algorithm "+t,a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+i().hmac(i()[t],(0,o.lE)(e)).update((0,o.lE)(r)).digest("hex")}},3059:function(t,e,r){"use strict";var n,i;r.d(e,{p:function(){return n}}),(i=n||(n={})).sha256="sha256",i.sha512="sha512"},4135:function(t,e,r){"use strict";r.d(e,{Et:function(){return z},VW:function(){return K},LO:function(){return q}});var n=r(8577),i=r.n(n),o=r(8059),s=r.n(o);function a(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t,null==e?r.path:e)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var u=l;function l(t,e){if(!t)throw Error(e||"Assertion failed")}l.equal=function(t,e,r){if(t!=e)throw Error(r||"Assertion failed: "+t+" != "+e)};var h=a(function(t,e){var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}}),c=a(function(t,e){var r=e;r.assert=u,r.toArray=h.toArray,r.zero2=h.zero2,r.toHex=h.toHex,r.encode=h.encode,r.getNAF=function(t,e,r){var n=Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,s,a,u=t.andln(3)+n&3,l=e.andln(3)+i&3;3===u&&(u=-1),3===l&&(l=-1),s=(1&u)==0?0:(3==(o=t.andln(7)+n&7)||5===o)&&2===l?-u:u,r[0].push(s),a=(1&l)==0?0:(3==(o=e.andln(7)+i&7)||5===o)&&2===u?-l:l,r[1].push(a),2*n===s+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},r.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new(i())(t,"hex","le")}}),d=c.getNAF,f=c.getJSF,p=c.assert;function m(t,e){this.type=t,this.p=new(i())(e.p,16),this.red=e.prime?i().red(e.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=e.n&&new(i())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function g(t,e){this.curve=t,this.type=e,this.precomputed=null}m.prototype.point=function(){throw Error("Not implemented")},m.prototype.validate=function(){throw Error("Not implemented")},m.prototype._fixedNafMul=function(t,e){p(t.precomputed);var r,n,i=t._getDoubles(),o=d(e,1,this._bitLength),s=(1<=r;u--)n=(n<<1)+o[u];a.push(n)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=s;c>0;c--){for(r=0;r=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var l=o[a];p(0!==l),s="affine"===t.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===t.type?s.toP():s},m.prototype._wnafMulAdd=function(t,e,r,n,i){var o,s,a,u=this._wnafT1,l=this._wnafT2,h=this._wnafT3,c=0;for(o=0;o=1;o-=2){var m=o-1,g=o;if(1!==u[m]||1!==u[g]){h[m]=d(r[m],u[m],this._bitLength),h[g]=d(r[g],u[g],this._bitLength),c=Math.max(h[m].length,c),c=Math.max(h[g].length,c);continue}var v=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(v[1]=e[m].add(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].add(e[g].neg())):(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=f(r[m],r[g]);for(s=0,c=Math.max(b[0].length,c),h[m]=Array(c),h[g]=Array(c);s=0;o--){for(var k=0;o>=0;){var _=!0;for(s=0;s=0&&k++,E=E.dblp(k),o<0)break;for(s=0;s0?a=l[s][S-1>>1]:S<0&&(a=l[s][-S-1>>1].neg()),E="affine"===a.type?E.mixedAdd(a):E.add(a))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},g.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;io[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(t.lambda)r=new(i())(t.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(e))?r=s[0]:(r=s[1],y(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return n=t.basis?t.basis.map(function(t){return{a:new(i())(t.a,16),b:new(i())(t.b,16)}}):this._getEndoBasis(r),{beta:e,lambda:r,basis:n}}},b.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i().mont(t),r=new(i())(2).toRed(e).redInvm(),n=r.redNeg(),o=new(i())(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},b.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,l,h,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,f=this.n.clone(),p=new(i())(1),m=new(i())(0),g=new(i())(0),v=new(i())(1),y=0;0!==d.cmpn(0);){var b=f.div(d);l=f.sub(b.mul(d)),h=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!n&&0>l.cmp(c))e=u.neg(),r=p,n=l.neg(),o=h;else if(n&&2==++y)break;u=l,f=d,d=l,g=p,p=h,v=m,m=w}s=l.neg(),a=h;var A=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(A)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},b.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),l=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(l).neg()}},b.prototype.pointFromX=function(t,e){(t=new(i())(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},b.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},b.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},w.prototype.isInfinity=function(){return this.inf},w.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t)||0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},w.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.prototype.mul=function(t){return(t=new(i())(t,16),this.isInfinity())?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},w.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},w.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},w.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},w.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},w.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(A,m.BasePoint),b.prototype.jpoint=function(t,e,r){return new A(this,t,e,r)},A.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},A.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},A.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),h=l.redMul(a),c=n.redMul(l),d=u.redSqr().redIAdd(h).redISub(c).redISub(c),f=u.redMul(c.redISub(d)).redISub(o.redMul(h)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,f,p)},A.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),h=r.redMul(u),c=a.redSqr().redIAdd(l).redISub(h).redISub(h),d=a.redMul(h.redISub(c)).redISub(i.redMul(l)),f=this.z.redMul(s);return this.curve.jpoint(c,d,f)},A.prototype.dblp=function(t){if(0===t||this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var e,r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},A.prototype.inspect=function(){return this.isInfinity()?"":""},A.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var E=a(function(t,e){var r=e;r.base=m,r.short=b,r.mont=null,r.edwards=null}),x=a(function(t,e){var r,n=e,i=c.assert;function o(t){"short"===t.type?this.curve=new E.short(t):"edwards"===t.type?this.curve=new E.edwards(t):this.curve=new E.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var r=new o(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:s().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"]}),a("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:s().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),a("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:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(t){r=void 0}a("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:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function k(t){if(!(this instanceof k))return new k(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=h.toArray(t.entropy,t.entropyEnc||"hex"),r=h.toArray(t.nonce,t.nonceEnc||"hex"),n=h.toArray(t.pers,t.persEnc||"hex");u(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}k.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},k.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=h.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var M=c.assert;function C(t,e){if(t instanceof C)return t;this._importDER(t,e)||(M(t.r&&t.s,"Signature without r or s"),this.r=new(i())(t.r,16),this.s=new(i())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function P(){this.place=0}function I(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return!(i<=127)&&(e.place=s,i)}function B(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}C.prototype._importDER=function(t,e){t=c.toArray(t,e);var r=new P;if(48!==t[r.place++])return!1;var n=I(t,r);if(!1===n||n+r.place!==t.length||2!==t[r.place++])return!1;var o=I(t,r);if(!1===o)return!1;var s=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var a=I(t,r);if(!1===a||t.length!==a+r.place)return!1;var u=t.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(i())(s),this.s=new(i())(u),this.recoveryParam=null,!0},C.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=B(e),r=B(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];R(n,e.length),(n=n.concat(e)).push(2),R(n,r.length);var i=n.concat(r),o=[48];return R(o,i.length),o=o.concat(i),c.encode(o,t)};var T=function(){throw Error("unsupported")},N=c.assert;function O(t){if(!(this instanceof O))return new O(t);"string"==typeof t&&(N(Object.prototype.hasOwnProperty.call(x,t),"Unknown curve "+t),t=x[t]),t instanceof x.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}O.prototype.keyPair=function(t){return new S(this,t)},O.prototype.keyFromPrivate=function(t,e){return S.fromPrivate(this,t,e)},O.prototype.keyFromPublic=function(t,e){return S.fromPublic(this,t,e)},O.prototype.genKeyPair=function(t){t||(t={});for(var e=new k({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||T(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(e.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},O.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return(r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0)?t.sub(this.n):t},O.prototype.sign=function(t,e,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new(i())(t,16));for(var o=this.n.byteLength(),s=e.getPrivate().toArray("be",o),a=t.toArray("be",o),u=new k({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),l=this.n.sub(new(i())(1)),h=0;;h++){var c=n.k?n.k(h):new(i())(u.generate(this.n.byteLength()));if(!(0>=(c=this._truncateToN(c,!0)).cmpn(1)||c.cmp(l)>=0)){var d=this.g.mul(c);if(!d.isInfinity()){var f=d.getX(),p=f.umod(this.n);if(0!==p.cmpn(0)){var m=c.invm(this.n).mul(p.mul(e.getPrivate()).iadd(t));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(d.getY().isOdd()?1:0)|(0!==f.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new C({r:p,s:m,recoveryParam:g})}}}}}},O.prototype.verify=function(t,e,r,n){t=this._truncateToN(new(i())(t,16)),r=this.keyFromPublic(r,n);var o,s=(e=new C(e,"hex")).r,a=e.s;if(0>s.cmpn(1)||s.cmp(this.n)>=0||0>a.cmpn(1)||a.cmp(this.n)>=0)return!1;var u=a.invm(this.n),l=u.mul(t).umod(this.n),h=u.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(l,r.getPublic(),h)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(l,r.getPublic(),h)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},O.prototype.recoverPubKey=function(t,e,r,n){N((3&r)===r,"The recovery param is more than two bits"),e=new C(e,n);var o=this.n,s=new(i())(t),a=e.r,u=e.s,l=1&r,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var c=e.r.invm(o),d=o.sub(s).mul(c).umod(o),f=u.mul(c).umod(o);return this.g.mulAdd(d,a,f)},O.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new C(e,n)).recoveryParam)return e.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw Error("Unable to find valid recovery factor")};var D=a(function(t,e){var r=e;r.version="6.5.4",r.utils=c,r.rand=function(){throw Error("unsupported")},r.curve=E,r.curves=x,r.ec=O,r.eddsa=null}).ec,L=r(5591),F=r(4336),U=r(5601);let H=new U.Yd("signing-key/5.7.0"),G=null;function j(){return G||(G=new D("secp256k1")),G}class z{constructor(t){(0,F.zG)(this,"curve","secp256k1"),(0,F.zG)(this,"privateKey",(0,L.Dv)(t)),32!==(0,L.E1)(this.privateKey)&&H.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let e=j().keyFromPrivate((0,L.lE)(this.privateKey));(0,F.zG)(this,"publicKey","0x"+e.getPublic(!1,"hex")),(0,F.zG)(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),(0,F.zG)(this,"_isSigningKey",!0)}_addPoint(t){let e=j().keyFromPublic((0,L.lE)(this.publicKey)),r=j().keyFromPublic((0,L.lE)(t));return"0x"+e.pub.add(r.pub).encodeCompressed("hex")}signDigest(t){let e=j().keyFromPrivate((0,L.lE)(this.privateKey)),r=(0,L.lE)(t);32!==r.length&&H.throwArgumentError("bad digest length","digest",t);let n=e.sign(r,{canonical:!0});return(0,L.N)({recoveryParam:n.recoveryParam,r:(0,L.$m)("0x"+n.r.toString(16),32),s:(0,L.$m)("0x"+n.s.toString(16),32)})}computeSharedSecret(t){let e=j().keyFromPrivate((0,L.lE)(this.privateKey)),r=j().keyFromPublic((0,L.lE)(K(t)));return(0,L.$m)("0x"+e.derive(r.getPublic()).toString(16),32)}static isSigningKey(t){return!!(t&&t._isSigningKey)}}function q(t,e){let r=(0,L.N)(e),n={r:(0,L.lE)(r.r),s:(0,L.lE)(r.s)};return"0x"+j().recoverPubKey((0,L.lE)(t),n,r.recoveryParam).encode("hex",!1)}function K(t,e){let r=(0,L.lE)(t);if(32===r.length){let t=new z(r);return e?"0x"+j().keyFromPrivate(r).getPublic(!0,"hex"):t.publicKey}return 33===r.length?e?(0,L.Dv)(r):"0x"+j().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+j().keyFromPublic(r).getPublic(!0,"hex"):(0,L.Dv)(r):H.throwArgumentError("invalid public or private key","key","[REDACTED]")}},1632:function(t,e,r){"use strict";r.d(e,{Uj:function(){return o},Y0:function(){return f},XL:function(){return m},ZN:function(){return p}});var n,i,o,s,a=r(5591),u=r(5601);let l=new u.Yd("strings/5.7.0");function h(t,e,r,n,i){if(t===s.BAD_PREFIX||t===s.UNEXPECTED_CONTINUE){let t=0;for(let n=e+1;n>6==2;n++)t++;return t}return t===s.OVERRUN?r.length-e-1:0}(n=o||(o={})).current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD",(i=s||(s={})).UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation";let c=Object.freeze({error:function(t,e,r,n,i){return l.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:h,replace:function(t,e,r,n,i){return t===s.OVERLONG?(n.push(i),0):(n.push(65533),h(t,e,r,n,i))}});function d(t,e){null==e&&(e=c.error),t=(0,a.lE)(t);let r=[],n=0;for(;n>7==0){r.push(i);continue}let o=null,a=null;if((224&i)==192)o=1,a=127;else if((240&i)==224)o=2,a=2047;else if((248&i)==240)o=3,a=65535;else{(192&i)==128?n+=e(s.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(s.BAD_PREFIX,n-1,t,r);continue}if(n-1+o>=t.length){n+=e(s.OVERRUN,n-1,t,r);continue}let u=i&(1<<8-o-1)-1;for(let i=0;i1114111){n+=e(s.OUT_OF_RANGE,n-1-o,t,r,u);continue}if(u>=55296&&u<=57343){n+=e(s.UTF16_SURROGATE,n-1-o,t,r,u);continue}if(u<=a){n+=e(s.OVERLONG,n-1-o,t,r,u);continue}r.push(u)}}return r}function f(t,e=o.current){e!=o.current&&(l.checkNormalize(),t=t.normalize(e));let r=[];for(let e=0;e>6|192),r.push(63&n|128);else if((64512&n)==55296){e++;let i=t.charCodeAt(e);if(e>=t.length||(64512&i)!=56320)throw Error("invalid utf-8 string");let o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,a.lE)(r)}function p(t,e){return d(t,e).map(t=>t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10&1023)+55296,(1023&t)+56320)).join("")}function m(t,e=o.current){return d(f(t,e))}},1801:function(t,e,r){"use strict";r.d(e,{z7:function(){return x},db:function(){return b},Qc:function(){return P},qC:function(){return M}});var n,i,o=r(8568),s=r(661),a=r(5591);let u=s.O$.from(0);var l=r(2998),h=r(4336),c=r(4319),d=r(4135),f=r(5601);let p=new f.Yd("transactions/5.7.0");function m(t){return"0x"===t?null:(0,o.Kn)(t)}function g(t){return"0x"===t?u:s.O$.from(t)}(n=i||(i={}))[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559";let v=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function b(t){let e=(0,d.VW)(t);return(0,o.Kn)((0,a.p3)((0,l.w)((0,a.p3)(e,1)),12))}function w(t,e){return b((0,d.LO)((0,a.lE)(t),e))}function A(t,e){let r=(0,a.G1)(s.O$.from(t).toHexString());return r.length>32&&p.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function E(t,e){return{address:(0,o.Kn)(t),storageKeys:(e||[]).map((e,r)=>(32!==(0,a.E1)(e)&&p.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase()))}}function x(t){if(Array.isArray(t))return t.map((t,e)=>Array.isArray(t)?(t.length>2&&p.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),E(t[0],t[1])):E(t.address,t.storageKeys));let e=Object.keys(t).map(e=>{let r=t[e].reduce((t,e)=>(t[e]=!0,t),{});return E(e,Object.keys(r).sort())});return e.sort((t,e)=>t.address.localeCompare(e.address)),e}function k(t){return x(t).map(t=>[t.address,t.storageKeys])}function _(t,e){if(null!=t.gasPrice){let e=s.O$.from(t.gasPrice),r=s.O$.from(t.maxFeePerGas||0);e.eq(r)||p.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}let r=[A(t.chainId||0,"chainId"),A(t.nonce||0,"nonce"),A(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),A(t.maxFeePerGas||0,"maxFeePerGas"),A(t.gasLimit||0,"gasLimit"),null!=t.to?(0,o.Kn)(t.to):"0x",A(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){let t=(0,a.N)(e);r.push(A(t.recoveryParam,"recoveryParam")),r.push((0,a.G1)(t.r)),r.push((0,a.G1)(t.s))}return(0,a.xs)(["0x02",c.c(r)])}function S(t,e){let r=[A(t.chainId||0,"chainId"),A(t.nonce||0,"nonce"),A(t.gasPrice||0,"gasPrice"),A(t.gasLimit||0,"gasLimit"),null!=t.to?(0,o.Kn)(t.to):"0x",A(t.value||0,"value"),t.data||"0x",k(t.accessList||[])];if(e){let t=(0,a.N)(e);r.push(A(t.recoveryParam,"recoveryParam")),r.push((0,a.G1)(t.r)),r.push((0,a.G1)(t.s))}return(0,a.xs)(["0x01",c.c(r)])}function M(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&p.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,h.uj)(t,y);let r=[];v.forEach(function(e){let n=t[e.name]||[],i={};e.numeric&&(i.hexPad="left"),n=(0,a.lE)((0,a.Dv)(n,i)),e.length&&n.length!==e.length&&n.length>0&&p.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=(0,a.G1)(n)).length>e.maxLength&&p.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),r.push((0,a.Dv)(n))});let n=0;if(null!=t.chainId?"number"!=typeof(n=t.chainId)&&p.throwArgumentError("invalid transaction.chainId","transaction",t):e&&!(0,a.Zq)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push((0,a.Dv)(n)),r.push("0x"),r.push("0x")),!e)return c.c(r);let i=(0,a.N)(e),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,a.Dv)(o)),r.push((0,a.G1)((0,a.lE)(i.r))),r.push((0,a.G1)((0,a.lE)(i.s))),c.c(r)}(t,e);switch(t.type){case 1:return S(t,e);case 2:return _(t,e)}return p.throwError(`unsupported transaction type: ${t.type}`,f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function C(t,e,r){try{let r=g(e[0]).toNumber();if(0!==r&&1!==r)throw Error("bad recid");t.v=r}catch(t){p.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,a.$m)(e[1],32),t.s=(0,a.$m)(e[2],32);try{let e=(0,l.w)(r(t));t.from=w(e,{r:t.r,s:t.s,recoveryParam:t.v})}catch(t){}}function P(t){let e=(0,a.lE)(t);if(e[0]>127)return function(t){let e=c.J(t);9!==e.length&&6!==e.length&&p.throwArgumentError("invalid raw transaction","rawTransaction",t);let r={nonce:g(e[0]).toNumber(),gasPrice:g(e[1]),gasLimit:g(e[2]),to:m(e[3]),value:g(e[4]),data:e[5],chainId:0};if(6===e.length)return r;try{r.v=s.O$.from(e[6]).toNumber()}catch(t){return r}if(r.r=(0,a.$m)(e[7],32),r.s=(0,a.$m)(e[8],32),s.O$.from(r.r).isZero()&&s.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27,i=e.slice(0,6);0!==r.chainId&&(i.push((0,a.Dv)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);let o=(0,l.w)(c.c(i));try{r.from=w(o,{r:(0,a.Dv)(r.r),s:(0,a.Dv)(r.s),recoveryParam:n})}catch(t){}r.hash=(0,l.w)(t)}return r.type=null,r}(e);switch(e[0]){case 1:return function(t){let e=c.J(t.slice(1));8!==e.length&&11!==e.length&&p.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.Dv)(t));let r={type:1,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),gasPrice:g(e[2]),gasLimit:g(e[3]),to:m(e[4]),value:g(e[5]),data:e[6],accessList:x(e[7])};return 8===e.length||(r.hash=(0,l.w)(t),C(r,e.slice(8),S)),r}(e);case 2:return function(t){let e=c.J(t.slice(1));9!==e.length&&12!==e.length&&p.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.Dv)(t));let r=g(e[2]),n=g(e[3]),i={type:2,chainId:g(e[0]).toNumber(),nonce:g(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(e[4]),to:m(e[5]),value:g(e[6]),data:e[7],accessList:x(e[8])};return 9===e.length||(i.hash=(0,l.w)(t),C(i,e.slice(9),_)),i}(e)}return p.throwError(`unsupported transaction type: ${e[0]}`,f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}},9492:function(t,e,r){"use strict";r.d(e,{vz:function(){return E}});var n=r(5591),i=r(5601),o=r(179),s=r(661);let a=new i.Yd(o.i),u={},l=s.O$.from(0),h=s.O$.from(-1);function c(t,e,r,n){let o={fault:e,operation:r};return void 0!==n&&(o.value=n),a.throwError(t,i.Yd.errors.NUMERIC_FAULT,o)}let d="0";for(;d.length<256;)d+=d;function f(t){if("number"!=typeof t)try{t=s.O$.from(t).toNumber()}catch(t){}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+d.substring(0,t):a.throwArgumentError("invalid decimal size","decimals",t)}function p(t,e){null==e&&(e=0);let r=f(e);t=s.O$.from(t);let n=t.lt(l);n&&(t=t.mul(h));let i=t.mod(r).toString();for(;i.length2&&a.throwArgumentError("too many decimal points","value",t);let o=i[0],u=i[1];for(o||(o="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&c("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.lengthnull==t[e]?n:(typeof t[e]!==r&&a.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e]);e=i("signed","boolean",e),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new g(u,e,r,n)}}class v{constructor(t,e,r,n){t!==u&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=e,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(t){this.format.name!==t.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",t)}addUnsafe(t){this._checkFormat(t);let e=m(this._value,this.format.decimals),r=m(t._value,t.format.decimals);return v.fromValue(e.add(r),this.format.decimals,this.format)}subUnsafe(t){this._checkFormat(t);let e=m(this._value,this.format.decimals),r=m(t._value,t.format.decimals);return v.fromValue(e.sub(r),this.format.decimals,this.format)}mulUnsafe(t){this._checkFormat(t);let e=m(this._value,this.format.decimals),r=m(t._value,t.format.decimals);return v.fromValue(e.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(t){this._checkFormat(t);let e=m(this._value,this.format.decimals),r=m(t._value,t.format.decimals);return v.fromValue(e.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){let t=this.toString().split(".");1===t.length&&t.push("0");let e=v.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(e=e.subUnsafe(y.toFormat(e.format))),e}ceiling(){let t=this.toString().split(".");1===t.length&&t.push("0");let e=v.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(e=e.addUnsafe(y.toFormat(e.format))),e}round(t){null==t&&(t=0);let e=this.toString().split(".");if(1===e.length&&e.push("0"),(t<0||t>80||t%1)&&a.throwArgumentError("invalid decimal count","decimals",t),e[1].length<=t)return this;let r=v.from("1"+d.substring(0,t),this.format),n=b.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(t){if(null==t)return this._hex;t%8&&a.throwArgumentError("invalid byte width","width",t);let e=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(t).toHexString();return(0,n.$m)(e,t/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(t){return v.fromString(this._value,t)}static fromValue(t,e,r){return null!=r||null==e||(0,s.Zm)(e)||(r=e,e=null),null==e&&(e=0),null==r&&(r="fixed"),v.fromString(p(t,e),g.from(r))}static fromString(t,e){null==e&&(e="fixed");let r=g.from(e),i=m(t,r.decimals);!r.signed&&i.lt(l)&&c("unsigned value cannot be negative","overflow","value",t);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.$m)(o,r.width/8));let s=p(i,r.decimals);return new v(u,o,s,r)}static fromBytes(t,e){null==e&&(e="fixed");let r=g.from(e);if((0,n.lE)(t).length>r.width/8)throw Error("overflow");let i=s.O$.from(t);r.signed&&(i=i.fromTwos(r.width));let o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new v(u,o,a,r)}static from(t,e){if("string"==typeof t)return v.fromString(t,e);if((0,n._t)(t))return v.fromBytes(t,e);try{return v.fromValue(t,0,e)}catch(t){if(t.code!==i.Yd.errors.INVALID_ARGUMENT)throw t}return a.throwArgumentError("invalid FixedNumber value","value",t)}static isFixedNumber(t){return!!(t&&t._isFixedNumber)}}let y=v.from(1),b=v.from("0.5"),w=new i.Yd("units/5.7.0"),A=["wei","kwei","mwei","gwei","szabo","finney","ether"];function E(t,e){if("string"!=typeof t&&w.throwArgumentError("value must be a string","value",t),"string"==typeof e){let t=A.indexOf(e);-1!==t&&(e=3*t)}return m(t,null!=e?e:18)}},7424:function(t,e,r){"use strict";r.d(e,{w5:function(){return tc}});var n=r(8568),i=r(3844),o=r(4344),s=r(5591),a=r(2998),u=r(1632),l=r(9817),h=r(3504),c=r(661),d=r(840);function f(t,e,r,n,i){let o,a,u;t=(0,s.lE)(t),e=(0,s.lE)(e);let l=1,h=new Uint8Array(n),c=new Uint8Array(e.length+4);c.set(e);for(let f=1;f<=l;f++){c[e.length]=f>>24&255,c[e.length+1]=f>>16&255,c[e.length+2]=f>>8&255,c[e.length+3]=255&f;let p=(0,s.lE)((0,d.Gy)(i,t,c));o||(o=p.length,u=new Uint8Array(o),l=Math.ceil(n/o),a=n-(l-1)*o),u.set(p);for(let e=1;e=256)throw Error("Depth too large!");return B((0,s.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,s.Dv)(this.depth),this.parentFingerprint,(0,s.$m)((0,s.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,s.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new O(T,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw Error("invalid index - "+String(t));let e=this.path;e&&(e+="/"+(2147483647&t));let r=new Uint8Array(37);if(2147483648&t){if(!this.privateKey)throw Error("cannot derive child of neutered node");r.set((0,s.lE)(this.privateKey),1),e&&(e+="'")}else r.set((0,s.lE)(this.publicKey));for(let e=24;e>=0;e-=8)r[33+(e>>3)]=t>>24-e&255;let n=(0,s.lE)((0,d.Gy)(g.p.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32),a=null,u=null;if(this.privateKey)a=I(c.O$.from(i).add(this.privateKey).mod(M));else{let t=new m.Et((0,s.Dv)(i));u=t._addPoint(this.publicKey)}let l=e,h=this.mnemonic;return h&&(l=Object.freeze({phrase:h.phrase,path:e,locale:h.locale||"en"})),new O(T,a,u,this.fingerprint,I(o),t,this.depth+1,l)}derivePath(t){let e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw Error("invalid path - "+t);"m"===e[0]&&e.shift();let r=this;for(let t=0;t=2147483648)throw Error("invalid path index - "+n);r=r._derive(2147483648+t)}else if(n.match(/^[0-9]+$/)){let t=parseInt(n);if(t>=2147483648)throw Error("invalid path index - "+n);r=r._derive(t)}else throw Error("invalid path component - "+n)}return r}static _fromSeed(t,e){let r=(0,s.lE)(t);if(r.length<16||r.length>64)throw Error("invalid seed");let n=(0,s.lE)((0,d.Gy)(g.p.sha512,C,r));return new O(T,I(n.slice(0,32)),null,"0x00000000",I(n.slice(32)),0,0,e)}static fromMnemonic(t,e,r){return t=L(D(t,r=R(r)),r),O._fromSeed(function(t,e){e||(e="");let r=(0,u.Y0)("mnemonic"+e,u.Uj.NFKD);return f((0,u.Y0)(t,u.Uj.NFKD),r,2048,64,"sha512")}(t,e),{phrase:t,path:"m",locale:r.locale})}static fromSeed(t){return O._fromSeed(t,null)}static fromExtendedKey(t){let e=h.eU.decode(t);(82!==e.length||B(e.slice(0,78))!==t)&&S.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let r=e[4],n=(0,s.Dv)(e.slice(5,9)),i=parseInt((0,s.Dv)(e.slice(9,13)).substring(2),16),o=(0,s.Dv)(e.slice(13,45)),a=e.slice(45,78);switch((0,s.Dv)(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new O(T,null,(0,s.Dv)(a),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new O(T,(0,s.Dv)(a.slice(1)),null,n,o,i,r,null)}return S.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function D(t,e){e=R(e),S.checkNormalize();let r=e.split(t);if(r.length%3!=0)throw Error("invalid mnemonic");let n=(0,s.lE)(new Uint8Array(Math.ceil(11*r.length/8))),i=0;for(let t=0;t>3]|=1<<7-i%8),i++}let o=32*r.length/3,a=r.length/3,u=P(a),l=(0,s.lE)((0,d.JQ)(n.slice(0,o/8)))[0]&u;if(l!==(n[n.length-1]&u))throw Error("invalid checksum");return(0,s.Dv)(n.slice(0,o/8))}function L(t,e){if(e=R(e),(t=(0,s.lE)(t)).length%4!=0||t.length<16||t.length>32)throw Error("invalid entropy");let r=[0],n=11;for(let e=0;e8?(r[r.length-1]<<=8,r[r.length-1]|=t[e],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[e]>>8-n,r.push(t[e]&(1<<8-n)-1),n+=3);let i=t.length/4,o=(0,s.lE)((0,d.JQ)(t))[0]&P(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,e.join(r.map(t=>e.getWord(t)))}let F=new b.Yd("random/5.7.0"),U=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}(),H=U.crypto||U.msCrypto;function G(t){(t<=0||t>1024||t%1||t!=t)&&F.throwArgumentError("invalid length","length",t);let e=new Uint8Array(t);return H.getRandomValues(e),(0,s.lE)(e)}H&&H.getRandomValues||(F.warn("WARNING: Missing strong random number source"),H={getRandomValues:function(t){return F.throwError("no secure random source avaialble",b.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var j=r(3537),z=r.n(j),q=r(4728),K=r.n(q);function Q(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),(0,s.lE)(t)}function Y(t,e){for(t=String(t);t.lengthe),(0,p.zG)(this,"address",(0,v.db)(this.publicKey)),this.address!==(0,n.Kn)(t.address)&&th.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(t){let e=t.mnemonic;return e&&e.phrase}(t)){let e=t.mnemonic;(0,p.zG)(this,"_mnemonic",()=>({phrase:e.phrase,path:e.path||N,locale:e.locale||"en"}));let r=this.mnemonic,n=O.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,v.db)(n.privateKey)!==this.address&&th.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,p.zG)(this,"_mnemonic",()=>null)}else{if(m.Et.isSigningKey(t))"secp256k1"!==t.curve&&th.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,p.zG)(this,"_signingKey",()=>t);else{"string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t);let e=new m.Et(t);(0,p.zG)(this,"_signingKey",()=>e)}(0,p.zG)(this,"_mnemonic",()=>null),(0,p.zG)(this,"address",(0,v.db)(this.publicKey))}e&&!i.zt.isProvider(e)&&th.throwArgumentError("invalid provider","provider",e),(0,p.zG)(this,"provider",e||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(t){return new tc(this,t)}signTransaction(t){return(0,p.mE)(t).then(e=>{null!=e.from&&((0,n.Kn)(e.from)!==this.address&&th.throwArgumentError("transaction from address mismatch","transaction.from",t.from),delete e.from);let r=this._signingKey().signDigest((0,a.w)((0,v.qC)(e)));return(0,v.qC)(e,r)})}signMessage(t){return tl(this,void 0,void 0,function*(){var e;return(0,s.gV)(this._signingKey().signDigest(("string"==typeof(e=t)&&(e=(0,u.Y0)(e)),(0,a.w)((0,s.zo)([(0,u.Y0)("\x19Ethereum Signed Message:\n"),(0,u.Y0)(String(e.length)),e])))))})}_signTypedData(t,e,r){return tl(this,void 0,void 0,function*(){let n=yield l.E.resolveNames(t,e,r,t=>(null==this.provider&&th.throwError("cannot resolve ENS names without a provider",b.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:t}),this.provider.resolveName(t)));return(0,s.gV)(this._signingKey().signDigest(l.E.hash(n.domain,e,n.value)))})}encrypt(t,e,r){if("function"!=typeof e||r||(r=e,e={}),r&&"function"!=typeof r)throw Error("invalid callback");return e||(e={}),function(t,e,r,i){try{if((0,n.Kn)(t.address)!==(0,v.db)(t.privateKey))throw Error("address/privateKey mismatch");if(X(t)){let e=t.mnemonic,r=O.fromMnemonic(e.phrase,null,e.locale).derivePath(e.path||N);if(r.privateKey!=t.privateKey)throw Error("mnemonic mismatch")}}catch(t){return Promise.reject(t)}"function"!=typeof r||i||(i=r,r={}),r||(r={});let o=(0,s.lE)(t.privateKey),u=Z(e),l=null,h=null,c=null;if(X(t)){let e=t.mnemonic;l=(0,s.lE)(D(e.phrase,e.locale||"en")),h=e.path||N,c=e.locale||"en"}let d=r.client;d||(d="ethers.js");let f=null;f=r.salt?(0,s.lE)(r.salt):G(32);let p=null;if(r.iv){if(16!==(p=(0,s.lE)(r.iv)).length)throw Error("invalid iv")}else p=G(16);let m=null;if(r.uuid){if(16!==(m=(0,s.lE)(r.uuid)).length)throw Error("invalid uuid")}else m=G(16);let g=131072,y=8,b=1;return r.scrypt&&(r.scrypt.N&&(g=r.scrypt.N),r.scrypt.r&&(y=r.scrypt.r),r.scrypt.p&&(b=r.scrypt.p)),K().scrypt(u,f,g,y,b,64,i).then(e=>{e=(0,s.lE)(e);let r=e.slice(0,16),n=e.slice(16,32),i=e.slice(32,64),u=new(z()).Counter(p),v=new(z()).ModeOfOperation.ctr(r,u),w=(0,s.lE)(v.encrypt(o)),A=(0,a.w)((0,s.zo)([n,w])),E={address:t.address.substring(2).toLowerCase(),id:function(t){let e=(0,s.lE)(t);e[6]=15&e[6]|64,e[8]=63&e[8]|128;let r=(0,s.Dv)(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}(m),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.Dv)(p).substring(2)},ciphertext:(0,s.Dv)(w).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.Dv)(f).substring(2),n:g,dklen:32,p:b,r:y},mac:A.substring(2)}};if(l){let t=G(16),e=new(z()).Counter(t),r=new(z()).ModeOfOperation.ctr(i,e),n=(0,s.lE)(r.encrypt(l)),o=new Date,a=o.getUTCFullYear()+"-"+Y(o.getUTCMonth()+1,2)+"-"+Y(o.getUTCDate(),2)+"T"+Y(o.getUTCHours(),2)+"-"+Y(o.getUTCMinutes(),2)+"-"+Y(o.getUTCSeconds(),2)+".0Z";E["x-ethers"]={client:d,gethFilename:"UTC--"+a+"--"+E.address,mnemonicCounter:(0,s.Dv)(t).substring(2),mnemonicCiphertext:(0,s.Dv)(n).substring(2),path:h,locale:c,version:"0.1"}}return JSON.stringify(E)})}(this,t,e,r)}static createRandom(t){let e=G(16);t||(t={}),t.extraEntropy&&(e=(0,s.lE)((0,s.p3)((0,a.w)((0,s.zo)([e,t.extraEntropy])),0,16)));let r=L(e,t.locale);return tc.fromMnemonic(r,t.path,t.locale)}static fromEncryptedJson(t,e,r){return(function(t,e,r){if(ta(t)){r&&r(0);let n=ts(t,e);return r&&r(1),Promise.resolve(n)}return tu(t)?function(t,e,r){var n,i,o,s;return n=this,i=void 0,o=void 0,s=function*(){let n=JSON.parse(t),i=yield tn(n,e,tr,K().scrypt,r);return tt(n,i)},new(o||(o=Promise))(function(t,e){function r(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof o?n:new o(function(t){t(n)})).then(r,a)}u((s=s.apply(n,i||[])).next())})}(t,e,r):Promise.reject(Error("invalid JSON wallet"))})(t,e,r).then(t=>new tc(t))}static fromEncryptedJsonSync(t,e){return new tc(function(t,e){if(ta(t))return ts(t,e);if(tu(t))return function(t,e){let r=JSON.parse(t),n=tn(r,e,te,K().syncScrypt);return tt(r,n)}(t,e);throw Error("invalid JSON wallet")}(t,e))}static fromMnemonic(t,e,r){return e||(e=N),new tc(O.fromMnemonic(t,null,r).derivePath(e))}}},3537:function(t){"use strict";!function(e){function r(t){return parseInt(t)===t}function n(t){if(!r(t.length))return!1;for(var e=0;e255)return!1;return!0}function i(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!n(t))throw Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&n(t))return new Uint8Array(t);throw Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function s(t,e,r,n,i){(null!=n||null!=i)&&(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var a,u=(a="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r>4]+a[15&n])}return e.join("")}}),l={16:10,24:12,32:14},h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],c=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],A=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],E=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],x=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function _(t){for(var e=[],r=0;r>2,this._Ke[o][e%4]=i[e],this._Kd[t-o][e%4]=i[e];for(var o,s,a=0,u=n;u>16&255]<<24^c[s>>8&255]<<16^c[255&s]<<8^c[s>>24&255]^h[a]<<24,a+=1,8!=n)for(var e=1;e>8&255]<<8^c[s>>16&255]<<16^c[s>>24&255]<<24;for(var e=n/2+1;e>2,f=u%4,this._Ke[d][f]=i[e],this._Kd[t-d][f]=i[e++],u++}for(var d=1;d>24&255]^E[s>>16&255]^x[s>>8&255]^k[255&s]},S.prototype.encrypt=function(t){if(16!=t.length)throw Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=_(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s>24&255]^p[n[(i+1)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Ke[e][i],u[4*i]=(c[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(c[n[(i+1)%4]>>16&255]^a>>16)&255,u[4*i+2]=(c[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(c[255&n[(i+3)%4]]^a)&255;return u},S.prototype.decrypt=function(t){if(16!=t.length)throw Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=_(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s>24&255]^y[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Kd[e][i],u[4*i]=(d[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(d[n[(i+3)%4]>>16&255]^a>>16)&255,u[4*i+2]=(d[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(d[255&n[(i+1)%4]]^a)&255;return u};var M=function(t){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(t)};M.prototype.encrypt=function(t){if((t=i(t)).length%16!=0)throw Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=o(t.length),r=o(16),n=0;n=0;--e)this._counter[e]=t%256,t>>=8},B.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},B.prototype.increment=function(){for(var t=15;t>=0;t--)if(255===this._counter[t])this._counter[t]=0;else{this._counter[t]++;break}};var R=function(t,e){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",e instanceof B||(e=new B(e)),this._counter=e,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(t)};R.prototype.encrypt=function(t){for(var e=i(t,!0),r=0;r191&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}}},padding:{pkcs7:{pad:function(t){var e=16-(t=i(t,!0)).length%16,r=o(t.length+e);s(t,r);for(var n=t.length;n16)throw Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(r=0,e=o(e);re)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),l=t.slice(a+1);if(l.length<6)return"Data too short";var h=s(u);if("string"==typeof h)return h;for(var c=[],d=0;d=l.length||c.push(p)}return 1!==h?"Invalid checksum for "+t:{prefix:u,words:c}}function u(t,e,r,n){for(var i=0,o=0,s=(1<=r;)a.push(i>>(o-=r)&s);if(n)o>0&&a.push(i<=e)return"Excess padding";if(i<n)throw TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"==typeof i)throw Error(i);for(var a=t+"1",u=0;u>5!=0)throw Error("Non 5-bit word");i=o(i)^l,a+=e.charAt(l)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){var h=i>>(5-u)*5&31;a+=e.charAt(h)}return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw Error(e)}}},8577:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{c="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8885).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function a(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s0?t:e},o.min=function(t,e){return 0>t.cmp(e)?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;s-=3)o=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var c,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l>>26,c=67108863&u,d=Math.min(l,e.length-1),f=Math.max(0,l-t.length+1);f<=d;f++){var p=l-f|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[f])+c)/67108864|0,c=67108863&s}r.words[l]=0|c,u=0|h}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],h=p[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var m=c.modrn(h).toString(t);r=(c=c.idivn(h)).isZero()?m+r:d[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},c&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(c,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=t.allocUnsafe?t.allocUnsafe(o):new t(o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&n;for(;0!==o&&s>26,this.words[s]=67108863&n;if(0===o&&s>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,E=0|s[4],x=8191&E,k=E>>>13,_=0|s[5],S=8191&_,M=_>>>13,C=0|s[6],P=8191&C,I=C>>>13,B=0|s[7],R=8191&B,T=B>>>13,N=0|s[8],O=8191&N,D=N>>>13,L=0|s[9],F=8191&L,U=L>>>13,H=0|a[0],G=8191&H,j=H>>>13,z=0|a[1],q=8191&z,K=z>>>13,Q=0|a[2],Y=8191&Q,Z=Q>>>13,V=0|a[3],J=8191&V,W=V>>>13,X=0|a[4],$=8191&X,tt=X>>>13,te=0|a[5],tr=8191&te,tn=te>>>13,ti=0|a[6],to=8191&ti,ts=ti>>>13,ta=0|a[7],tu=8191&ta,tl=ta>>>13,th=0|a[8],tc=8191&th,td=th>>>13,tf=0|a[9],tp=8191&tf,tm=tf>>>13;r.negative=t.negative^e.negative,r.length=19;var tg=(l+(n=Math.imul(c,G))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(d,G)|0))<<13)|0;l=((o=Math.imul(d,j))+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(p,G),i=(i=Math.imul(p,j))+Math.imul(m,G)|0,o=Math.imul(m,j);var tv=(l+(n=n+Math.imul(c,q)|0)|0)+((8191&(i=(i=i+Math.imul(c,K)|0)+Math.imul(d,q)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(tv>>>26)|0,tv&=67108863,n=Math.imul(v,G),i=(i=Math.imul(v,j))+Math.imul(y,G)|0,o=Math.imul(y,j),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,K)|0;var ty=(l+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(d,Y)|0))<<13)|0;l=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ty>>>26)|0,ty&=67108863,n=Math.imul(w,G),i=(i=Math.imul(w,j))+Math.imul(A,G)|0,o=Math.imul(A,j),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var tb=(l+(n=n+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(d,J)|0))<<13)|0;l=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(x,G),i=(i=Math.imul(x,j))+Math.imul(k,G)|0,o=Math.imul(k,j),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,W)|0;var tw=(l+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(d,$)|0))<<13)|0;l=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,j))+Math.imul(M,G)|0,o=Math.imul(M,j),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var tA=(l+(n=n+Math.imul(c,tr)|0)|0)+((8191&(i=(i=i+Math.imul(c,tn)|0)+Math.imul(d,tr)|0))<<13)|0;l=((o=o+Math.imul(d,tn)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,j))+Math.imul(I,G)|0,o=Math.imul(I,j),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,tr)|0,i=(i=i+Math.imul(p,tn)|0)+Math.imul(m,tr)|0,o=o+Math.imul(m,tn)|0;var tE=(l+(n=n+Math.imul(c,to)|0)|0)+((8191&(i=(i=i+Math.imul(c,ts)|0)+Math.imul(d,to)|0))<<13)|0;l=((o=o+Math.imul(d,ts)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(R,G),i=(i=Math.imul(R,j))+Math.imul(T,G)|0,o=Math.imul(T,j),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(v,tr)|0,i=(i=i+Math.imul(v,tn)|0)+Math.imul(y,tr)|0,o=o+Math.imul(y,tn)|0,n=n+Math.imul(p,to)|0,i=(i=i+Math.imul(p,ts)|0)+Math.imul(m,to)|0,o=o+Math.imul(m,ts)|0;var tx=(l+(n=n+Math.imul(c,tu)|0)|0)+((8191&(i=(i=i+Math.imul(c,tl)|0)+Math.imul(d,tu)|0))<<13)|0;l=((o=o+Math.imul(d,tl)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(O,G),i=(i=Math.imul(O,j))+Math.imul(D,G)|0,o=Math.imul(D,j),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,tr)|0,i=(i=i+Math.imul(w,tn)|0)+Math.imul(A,tr)|0,o=o+Math.imul(A,tn)|0,n=n+Math.imul(v,to)|0,i=(i=i+Math.imul(v,ts)|0)+Math.imul(y,to)|0,o=o+Math.imul(y,ts)|0,n=n+Math.imul(p,tu)|0,i=(i=i+Math.imul(p,tl)|0)+Math.imul(m,tu)|0,o=o+Math.imul(m,tl)|0;var tk=(l+(n=n+Math.imul(c,tc)|0)|0)+((8191&(i=(i=i+Math.imul(c,td)|0)+Math.imul(d,tc)|0))<<13)|0;l=((o=o+Math.imul(d,td)|0)+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,j))+Math.imul(U,G)|0,o=Math.imul(U,j),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(x,tr)|0,i=(i=i+Math.imul(x,tn)|0)+Math.imul(k,tr)|0,o=o+Math.imul(k,tn)|0,n=n+Math.imul(w,to)|0,i=(i=i+Math.imul(w,ts)|0)+Math.imul(A,to)|0,o=o+Math.imul(A,ts)|0,n=n+Math.imul(v,tu)|0,i=(i=i+Math.imul(v,tl)|0)+Math.imul(y,tu)|0,o=o+Math.imul(y,tl)|0,n=n+Math.imul(p,tc)|0,i=(i=i+Math.imul(p,td)|0)+Math.imul(m,tc)|0,o=o+Math.imul(m,td)|0;var t_=(l+(n=n+Math.imul(c,tp)|0)|0)+((8191&(i=(i=i+Math.imul(c,tm)|0)+Math.imul(d,tp)|0))<<13)|0;l=((o=o+Math.imul(d,tm)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,K))+Math.imul(U,q)|0,o=Math.imul(U,K),n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(S,tr)|0,i=(i=i+Math.imul(S,tn)|0)+Math.imul(M,tr)|0,o=o+Math.imul(M,tn)|0,n=n+Math.imul(x,to)|0,i=(i=i+Math.imul(x,ts)|0)+Math.imul(k,to)|0,o=o+Math.imul(k,ts)|0,n=n+Math.imul(w,tu)|0,i=(i=i+Math.imul(w,tl)|0)+Math.imul(A,tu)|0,o=o+Math.imul(A,tl)|0,n=n+Math.imul(v,tc)|0,i=(i=i+Math.imul(v,td)|0)+Math.imul(y,tc)|0,o=o+Math.imul(y,td)|0;var tS=(l+(n=n+Math.imul(p,tp)|0)|0)+((8191&(i=(i=i+Math.imul(p,tm)|0)+Math.imul(m,tp)|0))<<13)|0;l=((o=o+Math.imul(m,tm)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(P,tr)|0,i=(i=i+Math.imul(P,tn)|0)+Math.imul(I,tr)|0,o=o+Math.imul(I,tn)|0,n=n+Math.imul(S,to)|0,i=(i=i+Math.imul(S,ts)|0)+Math.imul(M,to)|0,o=o+Math.imul(M,ts)|0,n=n+Math.imul(x,tu)|0,i=(i=i+Math.imul(x,tl)|0)+Math.imul(k,tu)|0,o=o+Math.imul(k,tl)|0,n=n+Math.imul(w,tc)|0,i=(i=i+Math.imul(w,td)|0)+Math.imul(A,tc)|0,o=o+Math.imul(A,td)|0;var tM=(l+(n=n+Math.imul(v,tp)|0)|0)+((8191&(i=(i=i+Math.imul(v,tm)|0)+Math.imul(y,tp)|0))<<13)|0;l=((o=o+Math.imul(y,tm)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(F,J),i=(i=Math.imul(F,W))+Math.imul(U,J)|0,o=Math.imul(U,W),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(R,tr)|0,i=(i=i+Math.imul(R,tn)|0)+Math.imul(T,tr)|0,o=o+Math.imul(T,tn)|0,n=n+Math.imul(P,to)|0,i=(i=i+Math.imul(P,ts)|0)+Math.imul(I,to)|0,o=o+Math.imul(I,ts)|0,n=n+Math.imul(S,tu)|0,i=(i=i+Math.imul(S,tl)|0)+Math.imul(M,tu)|0,o=o+Math.imul(M,tl)|0,n=n+Math.imul(x,tc)|0,i=(i=i+Math.imul(x,td)|0)+Math.imul(k,tc)|0,o=o+Math.imul(k,td)|0;var tC=(l+(n=n+Math.imul(w,tp)|0)|0)+((8191&(i=(i=i+Math.imul(w,tm)|0)+Math.imul(A,tp)|0))<<13)|0;l=((o=o+Math.imul(A,tm)|0)+(i>>>13)|0)+(tC>>>26)|0,tC&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(O,tr)|0,i=(i=i+Math.imul(O,tn)|0)+Math.imul(D,tr)|0,o=o+Math.imul(D,tn)|0,n=n+Math.imul(R,to)|0,i=(i=i+Math.imul(R,ts)|0)+Math.imul(T,to)|0,o=o+Math.imul(T,ts)|0,n=n+Math.imul(P,tu)|0,i=(i=i+Math.imul(P,tl)|0)+Math.imul(I,tu)|0,o=o+Math.imul(I,tl)|0,n=n+Math.imul(S,tc)|0,i=(i=i+Math.imul(S,td)|0)+Math.imul(M,tc)|0,o=o+Math.imul(M,td)|0;var tP=(l+(n=n+Math.imul(x,tp)|0)|0)+((8191&(i=(i=i+Math.imul(x,tm)|0)+Math.imul(k,tp)|0))<<13)|0;l=((o=o+Math.imul(k,tm)|0)+(i>>>13)|0)+(tP>>>26)|0,tP&=67108863,n=Math.imul(F,tr),i=(i=Math.imul(F,tn))+Math.imul(U,tr)|0,o=Math.imul(U,tn),n=n+Math.imul(O,to)|0,i=(i=i+Math.imul(O,ts)|0)+Math.imul(D,to)|0,o=o+Math.imul(D,ts)|0,n=n+Math.imul(R,tu)|0,i=(i=i+Math.imul(R,tl)|0)+Math.imul(T,tu)|0,o=o+Math.imul(T,tl)|0,n=n+Math.imul(P,tc)|0,i=(i=i+Math.imul(P,td)|0)+Math.imul(I,tc)|0,o=o+Math.imul(I,td)|0;var tI=(l+(n=n+Math.imul(S,tp)|0)|0)+((8191&(i=(i=i+Math.imul(S,tm)|0)+Math.imul(M,tp)|0))<<13)|0;l=((o=o+Math.imul(M,tm)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863,n=Math.imul(F,to),i=(i=Math.imul(F,ts))+Math.imul(U,to)|0,o=Math.imul(U,ts),n=n+Math.imul(O,tu)|0,i=(i=i+Math.imul(O,tl)|0)+Math.imul(D,tu)|0,o=o+Math.imul(D,tl)|0,n=n+Math.imul(R,tc)|0,i=(i=i+Math.imul(R,td)|0)+Math.imul(T,tc)|0,o=o+Math.imul(T,td)|0;var tB=(l+(n=n+Math.imul(P,tp)|0)|0)+((8191&(i=(i=i+Math.imul(P,tm)|0)+Math.imul(I,tp)|0))<<13)|0;l=((o=o+Math.imul(I,tm)|0)+(i>>>13)|0)+(tB>>>26)|0,tB&=67108863,n=Math.imul(F,tu),i=(i=Math.imul(F,tl))+Math.imul(U,tu)|0,o=Math.imul(U,tl),n=n+Math.imul(O,tc)|0,i=(i=i+Math.imul(O,td)|0)+Math.imul(D,tc)|0,o=o+Math.imul(D,td)|0;var tR=(l+(n=n+Math.imul(R,tp)|0)|0)+((8191&(i=(i=i+Math.imul(R,tm)|0)+Math.imul(T,tp)|0))<<13)|0;l=((o=o+Math.imul(T,tm)|0)+(i>>>13)|0)+(tR>>>26)|0,tR&=67108863,n=Math.imul(F,tc),i=(i=Math.imul(F,td))+Math.imul(U,tc)|0,o=Math.imul(U,td);var tT=(l+(n=n+Math.imul(O,tp)|0)|0)+((8191&(i=(i=i+Math.imul(O,tm)|0)+Math.imul(D,tp)|0))<<13)|0;l=((o=o+Math.imul(D,tm)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863;var tN=(l+(n=Math.imul(F,tp))|0)+((8191&(i=(i=Math.imul(F,tm))+Math.imul(U,tp)|0))<<13)|0;return l=((o=Math.imul(U,tm))+(i>>>13)|0)+(tN>>>26)|0,tN&=67108863,u[0]=tg,u[1]=tv,u[2]=ty,u[3]=tb,u[4]=tw,u[5]=tA,u[6]=tE,u[7]=tx,u[8]=tk,u[9]=t_,u[10]=tS,u[11]=tM,u[12]=tC,u[13]=tP,u[14]=tI,u[15]=tB,u[16]=tR,u[17]=tT,u[18]=tN,0!==l&&(u[19]=l,r.length++),r};function v(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):v(this,t,e)},y.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var i,o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var e=t%26,r=(t-e)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),s=t,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var u=i.length-s.length;if("mod"!==e){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var l=0;l=0;c--){var d=(0|i.words[s.length+c])*67108864+(0|i.words[s.length+c-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(s,d,c);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(s,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=d)}return r&&r._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(t,e,r){var i,s,a;return(n(!t.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&t.negative)!=0?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||0>this.cmp(t)?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=67108864%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var d=0,f=1;(e.words[0]&f)==0&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e,r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var s=new o(1),a=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var l=0,h=1;(r.words[0]&h)==0&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,d=1;(i.words[0]&d)==0&&c<26;++c,d<<=1);if(c>0)for(i.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(e=0===r.cmpn(1)?s:a).cmpn(0)&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return 0>=this.cmpn(t)},o.prototype.lte=function(t){return 0>=this.cmp(t)},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new _(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(A,w),A.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){var e;if(b[t])return b[t];if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else if("p25519"===t)e=new k;else throw Error("Unknown prime "+t);return b[t]=e,e},_.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){n((t.negative|e.negative)==0,"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],h=u-1;h>=0;h--){var c=l>>h&1;if(i!==r[0]&&(i=this.sqr(i)),0===c&&0===s){a=0;continue}s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)}u=26}return i},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},8059:function(t,e,r){var n=e;n.utils=r(9643),n.common=r(5352),n.sha=r(8043),n.ripemd=r(9481),n.hmac=r(7575),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5352:function(t,e,r){"use strict";var n=r(9643),i=r(1110);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(o=8,n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;othis.blockSize&&(t=new this.Hash().update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},9643:function(t,e,r){"use strict";var n=r(1110),i=r(4607);function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function a(t){if(7===t.length)return"0"+t;if(6===t.length)return"00"+t;if(5===t.length)return"000"+t;if(4===t.length)return"0000"+t;if(3===t.length)return"00000"+t;if(2===t.length)return"000000"+t;if(1===t.length)return"0000000"+t;else return t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t){if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,r[n++]=63&a|128):(o=t,s=i,(64512&o.charCodeAt(s))!=55296||s<0||s+1>=o.length?1:(64512&o.charCodeAt(s+1))!=56320)?(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128):(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128)}}else for(i=0;i>>0;return a},e.split32=function(t,e){for(var r=Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0;t[e]=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u,l=e;return t+r+i+s+(0+((l=l+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,l){var h,c=e;return t+r+i+s+u+(0+((c=c+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,l){return e+n+o+a+l>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},4607:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},5807:function(t,e,r){var n,i=r(2040);!function(){"use strict";var o="input is invalid type",s="object"==typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?a=r.g:u&&(a=self);var l=!a.JS_SHA3_NO_COMMON_JS&&t.exports,h=r.amdO,c=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),f=[4,1024,262144,67108864],p=[0,8,16,24],m=[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],g=[224,256,384,512],v=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),c&&(a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new O(t,e,t).update(n)[r]()}},A=function(t,e,r){return function(n,i){return new O(t,e,i).update(n)[r]()}},E=function(t,e,r){return function(e,n,i,o){return M["cshake"+t].update(e,n,i,o)[r]()}},x=function(t,e,r){return function(e,n,i,o){return M["kmac"+t].update(e,n,i,o)[r]()}},k=function(t,e,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function D(t,e,r){O.call(this,t,e,r)}O.prototype.update=function(t){if(this.finalized)throw Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=t.length,l=this.blockCount,h=0,d=this.s;h>2]|=t[h]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[l],n=0;n>=8,r=255&t;r>0;)i.unshift(r),t>>=8,r=255&t,++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},O.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}var n=0,i=t.length;if(e)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},O.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(e=1,t[0]=t[r];e>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];s%e==0&&(L(r),o=0)}return i&&(a+=d[(t=r[o])>>4&15]+d[15&t],i>1&&(a+=d[t>>12&15]+d[t>>8&15]),i>2&&(a+=d[t>>20&15]+d[t>>16&15])),a},O.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=new ArrayBuffer(i?n+1<<2:a);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},D.prototype=new O,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,l,h,c,d,f,p,g,v,y,b,w,A,E,x,k,_,S,M,C,P,I,B,R,T,N,O,D,L,F,U,H,G,j,z,q,K,Q,Y,Z,V,J,W,X,$,tt,te,tr,tn,ti,to,ts,ta,tu,tl,th;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],l=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49],e=d^(s<<1|a>>>31),r=f^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(h<<1|c>>>31),r=a^(c<<1|h>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(d<<1|f>>>31),r=l^(f<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=h^(i<<1|o>>>31),r=c^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,p=t[0],g=t[1],Y=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,P=t[20]<<3|t[21]>>>29,I=t[21]<<3|t[20]>>>29,ta=t[31]<<9|t[30]>>>23,tu=t[30]<<9|t[31]>>>23,z=t[40]<<18|t[41]>>>14,q=t[41]<<18|t[40]>>>14,O=t[2]<<1|t[3]>>>31,D=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,V=t[22]<<10|t[23]>>>22,J=t[23]<<10|t[22]>>>22,B=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,tl=t[42]<<2|t[43]>>>30,th=t[43]<<2|t[42]>>>30,te=t[5]<<30|t[4]>>>2,tr=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,F=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,W=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,T=t[45]<<29|t[44]>>>3,N=t[44]<<29|t[45]>>>3,_=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,tn=t[17]<<23|t[16]>>>9,ti=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,H=t[27]<<25|t[26]>>>7,A=t[36]<<21|t[37]>>>11,E=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,Q=t[9]<<27|t[8]>>>5,M=t[18]<<20|t[19]>>>12,C=t[19]<<20|t[18]>>>12,to=t[29]<<7|t[28]>>>25,ts=t[28]<<7|t[29]>>>25,G=t[38]<<8|t[39]>>>24,j=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=p^~v&b,t[1]=g^~y&w,t[10]=_^~M&P,t[11]=S^~C&I,t[20]=O^~L&U,t[21]=D^~F&H,t[30]=K^~Y&V,t[31]=Q^~Z&J,t[40]=te^~tn&to,t[41]=tr^~ti&ts,t[2]=v^~b&A,t[3]=y^~w&E,t[12]=M^~P&B,t[13]=C^~I&R,t[22]=L^~U&G,t[23]=F^~H&j,t[32]=Y^~V&W,t[33]=Z^~J&X,t[42]=tn^~to&ta,t[43]=ti^~ts&tu,t[4]=b^~A&x,t[5]=w^~E&k,t[14]=P^~B&T,t[15]=I^~R&N,t[24]=U^~G&z,t[25]=H^~j&q,t[34]=V^~W&$,t[35]=J^~X&tt,t[44]=to^~ta&tl,t[45]=ts^~tu&th,t[6]=A^~x&p,t[7]=E^~k&g,t[16]=B^~T&_,t[17]=R^~N&S,t[26]=G^~z&O,t[27]=j^~q&D,t[36]=W^~$&K,t[37]=X^~tt&Q,t[46]=ta^~tl&te,t[47]=tu^~th&tr,t[8]=x^~p&v,t[9]=k^~g&y,t[18]=T^~_&M,t[19]=N^~S&C,t[28]=z^~O&L,t[29]=q^~D&F,t[38]=$^~K&Y,t[39]=tt^~Q&Z,t[48]=tl^~te&tn,t[49]=th^~tr&ti,t[0]^=m[n],t[1]^=m[n+1]};if(l)t.exports=M;else{for(P=0;P=64;){let f=r,p=n,m=i,g=o,v=s,y=a,b=u,w=l,A,E,x,k,_;for(E=0;E<16;E++)x=c+4*E,h[E]=(255&t[x])<<24|(255&t[x+1])<<16|(255&t[x+2])<<8|255&t[x+3];for(E=16;E<64;E++)k=((A=h[E-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,_=((A=h[E-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,h[E]=(k+h[E-7]|0)+(_+h[E-16]|0)|0;for(E=0;E<64;E++)k=(((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&y^~v&b)|0)+(w+(e[E]+h[E]|0)|0)|0,_=((f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10))+(f&p^f&m^p&m)|0,w=b,b=y,y=v,v=g+k|0,g=m,m=p,p=f,f=k+_|0;r=r+f|0,n=n+p|0,i=i+m|0,o=o+g|0,s=s+v|0,a=a+y|0,u=u+b|0,l=l+w|0,c+=64,d-=64}}c(t);let d,f=t.length%64,p=t.length/536870912|0,m=t.length<<3,g=f<56?56:120,v=t.slice(t.length-f,t.length);for(v.push(128),d=f+1;d>>24&255),v.push(p>>>16&255),v.push(p>>>8&255),v.push(p>>>0&255),v.push(m>>>24&255),v.push(m>>>16&255),v.push(m>>>8&255),v.push(m>>>0&255),c(v),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function n(t,e,n){let i;t=t.length<=64?t:r(t);let o=64+e.length+4,s=Array(o),a=Array(64),u=[];for(i=0;i<64;i++)s[i]=54;for(i=0;i=o-4;t--){if(s[t]++,s[t]<=255)return;s[t]=0}}for(;n>=32;)l(),u=u.concat(r(a.concat(r(s)))),n-=32;return n>0&&(l(),u=u.concat(r(a.concat(r(s))).slice(0,n))),u}function i(t,e,r,n,i){let u;for(a(t,(2*r-1)*16,i,0,16),u=0;u<2*r;u++)s(t,16*u,i,16),function(t,e){a(t,0,e,0,16);for(let t=8;t>0;t-=2)e[4]^=o(e[0]+e[12],7),e[8]^=o(e[4]+e[0],9),e[12]^=o(e[8]+e[4],13),e[0]^=o(e[12]+e[8],18),e[9]^=o(e[5]+e[1],7),e[13]^=o(e[9]+e[5],9),e[1]^=o(e[13]+e[9],13),e[5]^=o(e[1]+e[13],18),e[14]^=o(e[10]+e[6],7),e[2]^=o(e[14]+e[10],9),e[6]^=o(e[2]+e[14],13),e[10]^=o(e[6]+e[2],18),e[3]^=o(e[15]+e[11],7),e[7]^=o(e[3]+e[15],9),e[11]^=o(e[7]+e[3],13),e[15]^=o(e[11]+e[7],18),e[1]^=o(e[0]+e[3],7),e[2]^=o(e[1]+e[0],9),e[3]^=o(e[2]+e[1],13),e[0]^=o(e[3]+e[2],18),e[6]^=o(e[5]+e[4],7),e[7]^=o(e[6]+e[5],9),e[4]^=o(e[7]+e[6],13),e[5]^=o(e[4]+e[7],18),e[11]^=o(e[10]+e[9],7),e[8]^=o(e[11]+e[10],9),e[9]^=o(e[8]+e[11],13),e[10]^=o(e[9]+e[8],18),e[12]^=o(e[15]+e[14],7),e[13]^=o(e[12]+e[15],9),e[14]^=o(e[13]+e[12],13),e[15]^=o(e[14]+e[13],18);for(let r=0;r<16;++r)t[r]+=e[r]}(i,n),a(i,0,t,e+16*u,16);for(u=0;u>>32-e}function s(t,e,r,n){for(let i=0;i=256)return!1}return!0}function l(t,e){if("number"!=typeof t||t%1)throw Error("invalid "+e);return t}function h(t,e,r,o,h,c,d){let f;if(r=l(r,"N"),o=l(o,"r"),h=l(h,"p"),c=l(c,"dkLen"),0===r||(r&r-1)!=0)throw Error("N must be power of 2");if(r>2147483647/128/o)throw Error("N too large");if(o>2147483647/128/h)throw Error("r too large");if(!u(t))throw Error("password must be an array or buffer");if(t=Array.prototype.slice.call(t),!u(e))throw Error("salt must be an array or buffer");let p=n(t,e=Array.prototype.slice.call(e),128*h*o),m=new Uint32Array(32*h*o);for(let t=0;tC&&(e=C);for(let t=0;tC&&(e=C);for(let t=0;t>0&255),p.push(m[t]>>8&255),p.push(m[t]>>16&255),p.push(m[t]>>24&255);let u=n(t,p,c);return d&&d(null,1,u),u}d&&P(I)};if(!d)for(;;){let t=I();if(void 0!=t)return t}I()}t.exports={scrypt:function(t,e,r,n,i,o,s){return new Promise(function(a,u){let l=0;s&&s(0),h(t,e,r,n,i,o,function(t,e,r){if(t)u(t);else if(r)s&&1!==l&&s(1),a(new Uint8Array(r));else if(s&&e!==l)return l=e,s(e)})})},syncScrypt:function(t,e,r,n,i,o){return new Uint8Array(h(t,e,r,n,i,o))}}}(0)},2671:function(t,e){"use strict";function r(t,e,r){if(r>t.length)throw Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return t.slice(e,r)}function n(t){if(0===t[0])throw Error("invalid RLP: extra zeros");return s(function(t){let e="";for(let r=0;re.toString(16).padStart(2,"0"));function s(t){let e=Number.parseInt(t,16);if(Number.isNaN(e))throw Error("Invalid byte sequence");return e}function a(t){if("string"!=typeof t)throw TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw Error("hexToBytes: received invalid unpadded hex");let e=new Uint8Array(t.length/2);for(let r=0;rt+e.length,0),r=new Uint8Array(e);for(let e=0,n=0;e=2&&"0"===t[0]&&"x"===t[1]}function c(t){if(t instanceof Uint8Array)return t;if("string"==typeof t){var e;return h(t)?a((e="string"!=typeof t?t:h(t)?t.slice(2):t).length%2?`0${e}`:e):new TextEncoder().encode(t)}if("number"==typeof t||"bigint"==typeof t)return t?a(l(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw Error("toBytes: received unsupported type "+typeof t)}e.yH={encode:function t(e){if(Array.isArray(e)){let r=[],n=0;for(let i=0;ie.length)throw Error("invalid RLP: total length is larger than the data");for(a=r(e,o,s);a.length;)u=t(a),l.push(u.data),a=u.remainder;return{data:l,remainder:e.slice(s)}}}(i);if(e)return o;if(0!==o.remainder.length)throw Error("invalid RLP: remainder must be zero");return o.data}}},7019:function(t,e,r){"use strict";r.d(e,{Kn:function(){return d}});var n=r(823),i=r(7419),o=r(5230),s=r.n(o),a=r(5268);let u=new a.Yd("address/5.7.0");function l(t){(0,n.A7)(t,20)||u.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let t=0;t<40;t++)r[t]=e[t].charCodeAt(0);let i=(0,n.lE)("0x"+s().keccak_256((0,n.lE)(r)));for(let t=0;t<40;t+=2)i[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&i[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return"0x"+e.join("")}let h={};for(let t=0;t<10;t++)h[String(t)]=String(t);for(let t=0;t<26;t++)h[String.fromCharCode(65+t)]=String(10+t);let c=Math.floor(Math.log10?Math.log10(9007199254740991):Math.log(9007199254740991)/Math.LN10);function d(t){let e=null;if("string"!=typeof t&&u.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=l(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&u.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==function(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(t=>h[t]).join("");for(;e.length>=c;){let t=e.substring(0,c);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}(t)&&u.throwArgumentError("bad icap checksum","address",t),e=(0,i.g$)(t.substring(4));e.length<40;)e="0"+e;e=l("0x"+e)}else u.throwArgumentError("invalid address","address",t);return e}},7419:function(t,e,r){"use strict";r.d(e,{O$:function(){return c},g$:function(){return g}});var n=r(1422),i=r.n(n),o=r(823),s=r(5268),a=i().BN;let u=new s.Yd("bignumber/5.7.0"),l={},h=!1;class c{constructor(t,e){t!==l&&u.throwError("cannot call constructor directly; use BigNumber.from",s.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return f(p(this).fromTwos(t))}toTwos(t){return f(p(this).toTwos(t))}abs(){return"-"===this._hex[0]?c.from(this._hex.substring(1)):this}add(t){return f(p(this).add(p(t)))}sub(t){return f(p(this).sub(p(t)))}div(t){let e=c.from(t);return e.isZero()&&m("division-by-zero","div"),f(p(this).div(p(t)))}mul(t){return f(p(this).mul(p(t)))}mod(t){let e=p(t);return e.isNeg()&&m("division-by-zero","mod"),f(p(this).umod(e))}pow(t){let e=p(t);return e.isNeg()&&m("negative-power","pow"),f(p(this).pow(e))}and(t){let e=p(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","and"),f(p(this).and(e))}or(t){let e=p(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","or"),f(p(this).or(e))}xor(t){let e=p(t);return(this.isNegative()||e.isNeg())&&m("unbound-bitwise-result","xor"),f(p(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&m("negative-width","mask"),f(p(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&m("negative-width","shl"),f(p(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&m("negative-width","shr"),f(p(this).shrn(t))}eq(t){return p(this).eq(p(t))}lt(t){return p(this).lt(p(t))}lte(t){return p(this).lte(p(t))}gt(t){return p(this).gt(p(t))}gte(t){return p(this).gte(p(t))}isNegative(){return"-"===this._hex[0]}isZero(){return p(this).isZero()}toNumber(){try{return p(this).toNumber()}catch(t){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(t){}return u.throwError("this platform does not support BigInt",s.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Yd.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",s.Yd.errors.UNEXPECTED_ARGUMENT,{})),p(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof c)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new c(l,d(t)):t.match(/^-?[0-9]+$/)?new c(l,d(new a(t))):u.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&m("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&m("overflow","BigNumber.from",t),c.from(String(t));if("bigint"==typeof t)return c.from(t.toString());if((0,o._t)(t))return c.from((0,o.Dv)(t));if(t){if(t.toHexString){let e=t.toHexString();if("string"==typeof e)return c.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.A7)(e)||"-"===e[0]&&(0,o.A7)(e.substring(1))))return c.from(e)}}return u.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function d(t){if("string"!=typeof t)return d(t.toString(16));if("-"===t[0])return("-"===(t=t.substring(1))[0]&&u.throwArgumentError("invalid hex","value",t),"0x00"===(t=d(t)))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function f(t){return c.from(d(t))}function p(t){let e=c.from(t).toHexString();return"-"===e[0]?new a("-"+e.substring(3),16):new a(e.substring(2),16)}function m(t,e,r){let n={fault:t,operation:e};return null!=r&&(n.value=r),u.throwError(t,s.Yd.errors.NUMERIC_FAULT,n)}function g(t){return new a(t,36).toString(16)}},823:function(t,e,r){"use strict";r.d(e,{lE:function(){return h},zo:function(){return c},xs:function(){return v},E1:function(){return g},$m:function(){return y},Dv:function(){return m},_t:function(){return l},Zq:function(){return a},A7:function(){return f},N:function(){return b},G1:function(){return d}});var n=r(5268);let i=new n.Yd("bytes/5.7.0");function o(t){return!!t.toHexString}function s(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function a(t){return f(t)&&!(t.length%2)||l(t)}function u(t){return"number"==typeof t&&t==t&&t%1==0}function l(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!u(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function h(t,e){if(e||(e={}),"number"==typeof t){i.checkSafeUint53(t,"invalid arrayify value");let e=[];for(;t;)e.unshift(255&t),t=parseInt(String(t/256));return 0===e.length&&e.push(0),s(new Uint8Array(e))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),o(t)&&(t=t.toHexString()),f(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":i.throwArgumentError("hex data is odd-length","value",t));let n=[];for(let t=0;th(t)),r=e.reduce((t,e)=>t+e.length,0),n=new Uint8Array(r);return e.reduce((t,e)=>(n.set(e,t),t+e.length),0),s(n)}function d(t){let e=h(t);if(0===e.length)return e;let r=0;for(;r>4]+p[15&n]}return e}return i.throwArgumentError("invalid hexlify value","value",t)}function g(t){if("string"!=typeof t)t=m(t);else if(!f(t)||t.length%2)return null;return(t.length-2)/2}function v(t){let e="0x";return t.forEach(t=>{e+=m(t).substring(2)}),e}function y(t,e){for("string"!=typeof t?t=m(t):f(t)||i.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&i.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function b(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(t)){let r=h(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=m(r.slice(0,32)),e.s=m(r.slice(32,64))):65===r.length?(e.r=m(r.slice(0,32)),e.s=m(r.slice(32,64)),e.v=r[64]):i.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:i.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=m(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){let r=function(t,e){(t=h(t)).length>e&&i.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),s(r)}(h(e._vs),32);e._vs=m(r);let n=r[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=n:e.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),r[0]&=127;let o=m(r);null==e.s?e.s=o:e.s!==o&&i.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?i.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{let r=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&f(e.r)?e.r=y(e.r,32):i.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&f(e.s)?e.s=y(e.s,32):i.throwArgumentError("signature missing or invalid s","signature",t);let r=h(e.s);r[0]>=128&&i.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let n=m(r);e._vs&&(f(e._vs)||i.throwArgumentError("signature invalid _vs","signature",t),e._vs=y(e._vs,32)),null==e._vs?e._vs=n:e._vs!==n&&i.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}},5268:function(t,e,r){"use strict";var n,i,o,s;r.d(e,{Yd:function(){return p}});let a=!1,u=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},h=l.default,c=null,d=function(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw Error("bad normalize")}catch(r){t.push(e)}}),t.length)throw Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(t){return t.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED",s.ACTION_REJECTED="ACTION_REJECTED";let f="0123456789abcdef";class p{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){let r=t.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",t),h>l[r]||console.log.apply(console,e)}debug(...t){this._log(p.levels.DEBUG,t)}info(...t){this._log(p.levels.INFO,t)}warn(...t){this._log(p.levels.WARNING,t)}makeError(t,e,r){if(u)return this.makeError("censored error",e,{});e||(e=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(t=>{let e=r[t];try{if(e instanceof Uint8Array){let r="";for(let t=0;t>4]+f[15&e[t]];n.push(t+"=Uint8Array(0x"+r+")")}else n.push(t+"="+JSON.stringify(e))}catch(e){n.push(t+"="+JSON.stringify(r[t].toString()))}}),n.push(`code=${e}`),n.push(`version=${this.version}`);let o=t,s="";switch(e){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let e=t;switch(e){case"overflow":case"underflow":case"division-by-zero":s+="-"+e;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=e}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(t+=" ("+n.join(", ")+")");let a=Error(t);return a.reason=o,a.code=e,Object.keys(r).forEach(function(t){a[t]=r[t]}),a}throwError(t,e,r){throw this.makeError(t,e,r)}throwArgumentError(t,e,r){return this.throwError(t,p.errors.INVALID_ARGUMENT,{argument:e,value:r})}assert(t,e,r,n){t||this.throwError(e,r,n)}assertArgument(t,e,r,n){t||this.throwArgumentError(e,r,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),d&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:d})}checkSafeUint53(t,e){"number"==typeof t&&(null==e&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,r){r=r?": "+r:"",te&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||null==t)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||null==t)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return c||(c=new p("logger/5.7.0")),c}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!t)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!t,a=!!e}static setLogLevel(t){let e=l[t.toLowerCase()];if(null==e){p.globalLogger().warn("invalid log level - "+t);return}h=e}static from(t){return new p(t)}}p.errors=i,p.levels=n},5831:function(t,e,r){"use strict";r.d(e,{uj:function(){return s},zG:function(){return o}});var n=r(5268);let i=new n.Yd("properties/5.7.0");function o(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function s(t,e){t&&"object"==typeof t||i.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}},4212:function(t,e,r){"use strict";r.d(e,{qC:function(){return b}});var n,i,o=r(7019),s=r(7419),a=r(823),u=r(5831),l=r(5268);let h=new l.Yd("rlp/5.7.0");function c(t){let e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function d(t){return(0,a.Dv)(function t(e){if(Array.isArray(e)){let r=[];if(e.forEach(function(e){r=r.concat(t(e))}),r.length<=55)return r.unshift(192+r.length),r;let n=c(r.length);return n.unshift(247+n.length),n.concat(r)}(0,a.Zq)(e)||h.throwArgumentError("RLP object must be BytesLike","object",e);let r=Array.prototype.slice.call((0,a.lE)(e));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let n=c(r.length);return n.unshift(183+n.length),n.concat(r)}(t))}let f=new l.Yd("transactions/5.7.0");(n=i||(i={}))[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559";let p=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function g(t,e){let r=(0,a.G1)(s.O$.from(t).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function v(t,e){return{address:(0,o.Kn)(t),storageKeys:(e||[]).map((e,r)=>(32!==(0,a.E1)(e)&&f.throwArgumentError("invalid access list storageKey",`accessList[${t}:${r}]`,e),e.toLowerCase()))}}function y(t){return(function(t){if(Array.isArray(t))return t.map((t,e)=>Array.isArray(t)?(t.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,t),v(t[0],t[1])):v(t.address,t.storageKeys));let e=Object.keys(t).map(e=>{let r=t[e].reduce((t,e)=>(t[e]=!0,t),{});return v(e,Object.keys(r).sort())});return e.sort((t,e)=>t.address.localeCompare(e.address)),e})(t).map(t=>[t.address,t.storageKeys])}function b(t,e){if(null==t.type||0===t.type)return null!=t.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),function(t,e){(0,u.uj)(t,m);let r=[];p.forEach(function(e){let n=t[e.name]||[],i={};e.numeric&&(i.hexPad="left"),n=(0,a.lE)((0,a.Dv)(n,i)),e.length&&n.length!==e.length&&n.length>0&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),e.maxLength&&(n=(0,a.G1)(n)).length>e.maxLength&&f.throwArgumentError("invalid length for "+e.name,"transaction:"+e.name,n),r.push((0,a.Dv)(n))});let n=0;if(null!=t.chainId?"number"!=typeof(n=t.chainId)&&f.throwArgumentError("invalid transaction.chainId","transaction",t):e&&!(0,a.Zq)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),0!==n&&(r.push((0,a.Dv)(n)),r.push("0x"),r.push("0x")),!e)return d(r);let i=(0,a.N)(e),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,a.Dv)(o)),r.push((0,a.G1)((0,a.lE)(i.r))),r.push((0,a.G1)((0,a.lE)(i.s))),d(r)}(t,e);switch(t.type){case 1:return function(t,e){let r=[g(t.chainId||0,"chainId"),g(t.nonce||0,"nonce"),g(t.gasPrice||0,"gasPrice"),g(t.gasLimit||0,"gasLimit"),null!=t.to?(0,o.Kn)(t.to):"0x",g(t.value||0,"value"),t.data||"0x",y(t.accessList||[])];if(e){let t=(0,a.N)(e);r.push(g(t.recoveryParam,"recoveryParam")),r.push((0,a.G1)(t.r)),r.push((0,a.G1)(t.s))}return(0,a.xs)(["0x01",d(r)])}(t,e);case 2:return function(t,e){if(null!=t.gasPrice){let e=s.O$.from(t.gasPrice),r=s.O$.from(t.maxFeePerGas||0);e.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:r})}let r=[g(t.chainId||0,"chainId"),g(t.nonce||0,"nonce"),g(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),g(t.maxFeePerGas||0,"maxFeePerGas"),g(t.gasLimit||0,"gasLimit"),null!=t.to?(0,o.Kn)(t.to):"0x",g(t.value||0,"value"),t.data||"0x",y(t.accessList||[])];if(e){let t=(0,a.N)(e);r.push(g(t.recoveryParam,"recoveryParam")),r.push((0,a.G1)(t.r)),r.push((0,a.G1)(t.s))}return(0,a.xs)(["0x02",d(r)])}(t,e)}return f.throwError(`unsupported transaction type: ${t.type}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}},1422:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{c="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(791).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function a(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&s0?t:e},o.min=function(t,e){return 0>t.cmp(e)?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;s-=3)o=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,h=r;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var c,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var l=1;l>>26,c=67108863&u,d=Math.min(l,e.length-1),f=Math.max(0,l-t.length+1);f<=d;f++){var p=l-f|0;h+=(s=(i=0|t.words[p])*(o=0|e.words[f])+c)/67108864|0,c=67108863&s}r.words[l]=0|c,u=0|h}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,i=0,o=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=f[t],h=p[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var m=c.modrn(h).toString(t);r=(c=c.idivn(h)).isZero()?m+r:d[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},c&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(c,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=t.allocUnsafe?t.allocUnsafe(o):new t(o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&n;for(;0!==o&&s>26,this.words[s]=67108863&n;if(0===o&&s>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,E=0|s[4],x=8191&E,k=E>>>13,_=0|s[5],S=8191&_,M=_>>>13,C=0|s[6],P=8191&C,I=C>>>13,B=0|s[7],R=8191&B,T=B>>>13,N=0|s[8],O=8191&N,D=N>>>13,L=0|s[9],F=8191&L,U=L>>>13,H=0|a[0],G=8191&H,j=H>>>13,z=0|a[1],q=8191&z,K=z>>>13,Q=0|a[2],Y=8191&Q,Z=Q>>>13,V=0|a[3],J=8191&V,W=V>>>13,X=0|a[4],$=8191&X,tt=X>>>13,te=0|a[5],tr=8191&te,tn=te>>>13,ti=0|a[6],to=8191&ti,ts=ti>>>13,ta=0|a[7],tu=8191&ta,tl=ta>>>13,th=0|a[8],tc=8191&th,td=th>>>13,tf=0|a[9],tp=8191&tf,tm=tf>>>13;r.negative=t.negative^e.negative,r.length=19;var tg=(l+(n=Math.imul(c,G))|0)+((8191&(i=(i=Math.imul(c,j))+Math.imul(d,G)|0))<<13)|0;l=((o=Math.imul(d,j))+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(p,G),i=(i=Math.imul(p,j))+Math.imul(m,G)|0,o=Math.imul(m,j);var tv=(l+(n=n+Math.imul(c,q)|0)|0)+((8191&(i=(i=i+Math.imul(c,K)|0)+Math.imul(d,q)|0))<<13)|0;l=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(tv>>>26)|0,tv&=67108863,n=Math.imul(v,G),i=(i=Math.imul(v,j))+Math.imul(y,G)|0,o=Math.imul(y,j),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,K)|0;var ty=(l+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(d,Y)|0))<<13)|0;l=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ty>>>26)|0,ty&=67108863,n=Math.imul(w,G),i=(i=Math.imul(w,j))+Math.imul(A,G)|0,o=Math.imul(A,j),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var tb=(l+(n=n+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(d,J)|0))<<13)|0;l=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(x,G),i=(i=Math.imul(x,j))+Math.imul(k,G)|0,o=Math.imul(k,j),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,W)|0;var tw=(l+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(d,$)|0))<<13)|0;l=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,j))+Math.imul(M,G)|0,o=Math.imul(M,j),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var tA=(l+(n=n+Math.imul(c,tr)|0)|0)+((8191&(i=(i=i+Math.imul(c,tn)|0)+Math.imul(d,tr)|0))<<13)|0;l=((o=o+Math.imul(d,tn)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,j))+Math.imul(I,G)|0,o=Math.imul(I,j),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,tr)|0,i=(i=i+Math.imul(p,tn)|0)+Math.imul(m,tr)|0,o=o+Math.imul(m,tn)|0;var tE=(l+(n=n+Math.imul(c,to)|0)|0)+((8191&(i=(i=i+Math.imul(c,ts)|0)+Math.imul(d,to)|0))<<13)|0;l=((o=o+Math.imul(d,ts)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(R,G),i=(i=Math.imul(R,j))+Math.imul(T,G)|0,o=Math.imul(T,j),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,K)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(v,tr)|0,i=(i=i+Math.imul(v,tn)|0)+Math.imul(y,tr)|0,o=o+Math.imul(y,tn)|0,n=n+Math.imul(p,to)|0,i=(i=i+Math.imul(p,ts)|0)+Math.imul(m,to)|0,o=o+Math.imul(m,ts)|0;var tx=(l+(n=n+Math.imul(c,tu)|0)|0)+((8191&(i=(i=i+Math.imul(c,tl)|0)+Math.imul(d,tu)|0))<<13)|0;l=((o=o+Math.imul(d,tl)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(O,G),i=(i=Math.imul(O,j))+Math.imul(D,G)|0,o=Math.imul(D,j),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,tr)|0,i=(i=i+Math.imul(w,tn)|0)+Math.imul(A,tr)|0,o=o+Math.imul(A,tn)|0,n=n+Math.imul(v,to)|0,i=(i=i+Math.imul(v,ts)|0)+Math.imul(y,to)|0,o=o+Math.imul(y,ts)|0,n=n+Math.imul(p,tu)|0,i=(i=i+Math.imul(p,tl)|0)+Math.imul(m,tu)|0,o=o+Math.imul(m,tl)|0;var tk=(l+(n=n+Math.imul(c,tc)|0)|0)+((8191&(i=(i=i+Math.imul(c,td)|0)+Math.imul(d,tc)|0))<<13)|0;l=((o=o+Math.imul(d,td)|0)+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,j))+Math.imul(U,G)|0,o=Math.imul(U,j),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(x,tr)|0,i=(i=i+Math.imul(x,tn)|0)+Math.imul(k,tr)|0,o=o+Math.imul(k,tn)|0,n=n+Math.imul(w,to)|0,i=(i=i+Math.imul(w,ts)|0)+Math.imul(A,to)|0,o=o+Math.imul(A,ts)|0,n=n+Math.imul(v,tu)|0,i=(i=i+Math.imul(v,tl)|0)+Math.imul(y,tu)|0,o=o+Math.imul(y,tl)|0,n=n+Math.imul(p,tc)|0,i=(i=i+Math.imul(p,td)|0)+Math.imul(m,tc)|0,o=o+Math.imul(m,td)|0;var t_=(l+(n=n+Math.imul(c,tp)|0)|0)+((8191&(i=(i=i+Math.imul(c,tm)|0)+Math.imul(d,tp)|0))<<13)|0;l=((o=o+Math.imul(d,tm)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,K))+Math.imul(U,q)|0,o=Math.imul(U,K),n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(S,tr)|0,i=(i=i+Math.imul(S,tn)|0)+Math.imul(M,tr)|0,o=o+Math.imul(M,tn)|0,n=n+Math.imul(x,to)|0,i=(i=i+Math.imul(x,ts)|0)+Math.imul(k,to)|0,o=o+Math.imul(k,ts)|0,n=n+Math.imul(w,tu)|0,i=(i=i+Math.imul(w,tl)|0)+Math.imul(A,tu)|0,o=o+Math.imul(A,tl)|0,n=n+Math.imul(v,tc)|0,i=(i=i+Math.imul(v,td)|0)+Math.imul(y,tc)|0,o=o+Math.imul(y,td)|0;var tS=(l+(n=n+Math.imul(p,tp)|0)|0)+((8191&(i=(i=i+Math.imul(p,tm)|0)+Math.imul(m,tp)|0))<<13)|0;l=((o=o+Math.imul(m,tm)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(D,J)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(P,tr)|0,i=(i=i+Math.imul(P,tn)|0)+Math.imul(I,tr)|0,o=o+Math.imul(I,tn)|0,n=n+Math.imul(S,to)|0,i=(i=i+Math.imul(S,ts)|0)+Math.imul(M,to)|0,o=o+Math.imul(M,ts)|0,n=n+Math.imul(x,tu)|0,i=(i=i+Math.imul(x,tl)|0)+Math.imul(k,tu)|0,o=o+Math.imul(k,tl)|0,n=n+Math.imul(w,tc)|0,i=(i=i+Math.imul(w,td)|0)+Math.imul(A,tc)|0,o=o+Math.imul(A,td)|0;var tM=(l+(n=n+Math.imul(v,tp)|0)|0)+((8191&(i=(i=i+Math.imul(v,tm)|0)+Math.imul(y,tp)|0))<<13)|0;l=((o=o+Math.imul(y,tm)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(F,J),i=(i=Math.imul(F,W))+Math.imul(U,J)|0,o=Math.imul(U,W),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(R,tr)|0,i=(i=i+Math.imul(R,tn)|0)+Math.imul(T,tr)|0,o=o+Math.imul(T,tn)|0,n=n+Math.imul(P,to)|0,i=(i=i+Math.imul(P,ts)|0)+Math.imul(I,to)|0,o=o+Math.imul(I,ts)|0,n=n+Math.imul(S,tu)|0,i=(i=i+Math.imul(S,tl)|0)+Math.imul(M,tu)|0,o=o+Math.imul(M,tl)|0,n=n+Math.imul(x,tc)|0,i=(i=i+Math.imul(x,td)|0)+Math.imul(k,tc)|0,o=o+Math.imul(k,td)|0;var tC=(l+(n=n+Math.imul(w,tp)|0)|0)+((8191&(i=(i=i+Math.imul(w,tm)|0)+Math.imul(A,tp)|0))<<13)|0;l=((o=o+Math.imul(A,tm)|0)+(i>>>13)|0)+(tC>>>26)|0,tC&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),n=n+Math.imul(O,tr)|0,i=(i=i+Math.imul(O,tn)|0)+Math.imul(D,tr)|0,o=o+Math.imul(D,tn)|0,n=n+Math.imul(R,to)|0,i=(i=i+Math.imul(R,ts)|0)+Math.imul(T,to)|0,o=o+Math.imul(T,ts)|0,n=n+Math.imul(P,tu)|0,i=(i=i+Math.imul(P,tl)|0)+Math.imul(I,tu)|0,o=o+Math.imul(I,tl)|0,n=n+Math.imul(S,tc)|0,i=(i=i+Math.imul(S,td)|0)+Math.imul(M,tc)|0,o=o+Math.imul(M,td)|0;var tP=(l+(n=n+Math.imul(x,tp)|0)|0)+((8191&(i=(i=i+Math.imul(x,tm)|0)+Math.imul(k,tp)|0))<<13)|0;l=((o=o+Math.imul(k,tm)|0)+(i>>>13)|0)+(tP>>>26)|0,tP&=67108863,n=Math.imul(F,tr),i=(i=Math.imul(F,tn))+Math.imul(U,tr)|0,o=Math.imul(U,tn),n=n+Math.imul(O,to)|0,i=(i=i+Math.imul(O,ts)|0)+Math.imul(D,to)|0,o=o+Math.imul(D,ts)|0,n=n+Math.imul(R,tu)|0,i=(i=i+Math.imul(R,tl)|0)+Math.imul(T,tu)|0,o=o+Math.imul(T,tl)|0,n=n+Math.imul(P,tc)|0,i=(i=i+Math.imul(P,td)|0)+Math.imul(I,tc)|0,o=o+Math.imul(I,td)|0;var tI=(l+(n=n+Math.imul(S,tp)|0)|0)+((8191&(i=(i=i+Math.imul(S,tm)|0)+Math.imul(M,tp)|0))<<13)|0;l=((o=o+Math.imul(M,tm)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863,n=Math.imul(F,to),i=(i=Math.imul(F,ts))+Math.imul(U,to)|0,o=Math.imul(U,ts),n=n+Math.imul(O,tu)|0,i=(i=i+Math.imul(O,tl)|0)+Math.imul(D,tu)|0,o=o+Math.imul(D,tl)|0,n=n+Math.imul(R,tc)|0,i=(i=i+Math.imul(R,td)|0)+Math.imul(T,tc)|0,o=o+Math.imul(T,td)|0;var tB=(l+(n=n+Math.imul(P,tp)|0)|0)+((8191&(i=(i=i+Math.imul(P,tm)|0)+Math.imul(I,tp)|0))<<13)|0;l=((o=o+Math.imul(I,tm)|0)+(i>>>13)|0)+(tB>>>26)|0,tB&=67108863,n=Math.imul(F,tu),i=(i=Math.imul(F,tl))+Math.imul(U,tu)|0,o=Math.imul(U,tl),n=n+Math.imul(O,tc)|0,i=(i=i+Math.imul(O,td)|0)+Math.imul(D,tc)|0,o=o+Math.imul(D,td)|0;var tR=(l+(n=n+Math.imul(R,tp)|0)|0)+((8191&(i=(i=i+Math.imul(R,tm)|0)+Math.imul(T,tp)|0))<<13)|0;l=((o=o+Math.imul(T,tm)|0)+(i>>>13)|0)+(tR>>>26)|0,tR&=67108863,n=Math.imul(F,tc),i=(i=Math.imul(F,td))+Math.imul(U,tc)|0,o=Math.imul(U,td);var tT=(l+(n=n+Math.imul(O,tp)|0)|0)+((8191&(i=(i=i+Math.imul(O,tm)|0)+Math.imul(D,tp)|0))<<13)|0;l=((o=o+Math.imul(D,tm)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863;var tN=(l+(n=Math.imul(F,tp))|0)+((8191&(i=(i=Math.imul(F,tm))+Math.imul(U,tp)|0))<<13)|0;return l=((o=Math.imul(U,tm))+(i>>>13)|0)+(tN>>>26)|0,tN&=67108863,u[0]=tg,u[1]=tv,u[2]=ty,u[3]=tb,u[4]=tw,u[5]=tA,u[6]=tE,u[7]=tx,u[8]=tk,u[9]=t_,u[10]=tS,u[11]=tM,u[12]=tC,u[13]=tP,u[14]=tI,u[15]=tB,u[16]=tR,u[17]=tT,u[18]=tN,0!==l&&(u[19]=l,r.length++),r};function v(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):v(this,t,e)},y.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,r+=(o/67108864|0)+(s>>>26),this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var i,o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var e=t%26,r=(t-e)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),s=t,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var u=i.length-s.length;if("mod"!==e){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var l=0;l=0;c--){var d=(0|i.words[s.length+c])*67108864+(0|i.words[s.length+c-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(s,d,c);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(s,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=d)}return r&&r._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(t,e,r){var i,s,a;return(n(!t.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):(this.negative&t.negative)!=0?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||0>this.cmp(t)?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=67108864%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var d=0,f=1;(e.words[0]&f)==0&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(h),s.isub(c)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(c)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e,r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var s=new o(1),a=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var l=0,h=1;(r.words[0]&h)==0&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var c=0,d=1;(i.words[0]&d)==0&&c<26;++c,d<<=1);if(c>0)for(i.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(e=0===r.cmpn(1)?s:a).cmpn(0)&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return -1===this.cmpn(t)},o.prototype.lt=function(t){return -1===this.cmp(t)},o.prototype.lten=function(t){return 0>=this.cmpn(t)},o.prototype.lte=function(t){return 0>=this.cmp(t)},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new _(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(A,w),A.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){var e;if(b[t])return b[t];if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new x;else if("p25519"===t)e=new k;else throw Error("Unknown prime "+t);return b[t]=e,e},_.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){n((t.negative|e.negative)==0,"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],h=u-1;h>=0;h--){var c=l>>h&1;if(i!==r[0]&&(i=this.sqr(i)),0===c&&0===s){a=0;continue}s<<=1,s|=c,(4==++a||0===n&&0===h)&&(i=this.mul(i,r[s]),a=0,s=0)}u=26}return i},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,_),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},3722:function(t,e){var r,n,i,o,s,a,u,l,h,c,d,f,p,m,g,v,y,b;(r="undefined"==typeof DO_NOT_EXPORT_CRC?e:{}).version="1.2.2",o=(i=function(t){var e=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):Array(4096);for(n=0;256!=n;++n)i[n]=t[n];for(n=0;256!=n;++n)for(r=t[n],e=256+n;e<4096;e+=256)r=i[e]=r>>>8^t[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(n=function(){for(var t=0,e=Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}()))[0],s=i[1],a=i[2],u=i[3],l=i[4],h=i[5],c=i[6],d=i[7],f=i[8],p=i[9],m=i[10],g=i[11],v=i[12],y=i[13],b=i[14],r.table=n,r.bstr=function(t,e){for(var r=-1^e,i=0,o=t.length;i>>8^n[(r^t.charCodeAt(i++))&255];return~r},r.buf=function(t,e){for(var r=-1^e,i=t.length-15,w=0;w>8&255]^v[t[w++]^r>>16&255]^g[t[w++]^r>>>24]^m[t[w++]]^p[t[w++]]^f[t[w++]]^d[t[w++]]^c[t[w++]]^h[t[w++]]^l[t[w++]]^u[t[w++]]^a[t[w++]]^s[t[w++]]^o[t[w++]]^n[t[w++]];for(i+=15;w>>8^n[(r^t[w++])&255];return~r},r.str=function(t,e){for(var r=-1^e,i=0,o=t.length,s=0,a=0;i>>8^n[(r^s)&255]:s<2048?r=(r=r>>>8^n[(r^(192|s>>6&31))&255])>>>8^n[(r^(128|63&s))&255]:s>=55296&&s<57344?(s=(1023&s)+64,a=1023&t.charCodeAt(i++),r=(r=(r=(r=r>>>8^n[(r^(240|s>>8&7))&255])>>>8^n[(r^(128|s>>2&63))&255])>>>8^n[(r^(128|a>>6&15|(3&s)<<4))&255])>>>8^n[(r^(128|63&a))&255]):r=(r=(r=r>>>8^n[(r^(224|s>>12&15))&255])>>>8^n[(r^(128|s>>6&63))&255])>>>8^n[(r^(128|63&s))&255];return~r}},9186:function(t,e){var r,n="undefined"!=typeof self?self:this,i=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();r=i,function(t){var e={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};function o(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(t){this.map={},t instanceof u?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function c(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t){if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else{var r;e.arrayBuffer&&e.blob&&(r=t)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t)}}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t,e,r,n=l(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=h(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},f.call(m.prototype),f.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var y=[301,302,303,307,308];v.redirect=function(t,e){if(-1===y.indexOf(e))throw RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function b(r,n){return new Promise(function(i,o){var s=new m(r,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new u,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;i(new v(n,r))},a.onerror=function(){o(TypeError("Network request failed"))},a.ontimeout=function(){o(TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),s.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),s.signal&&(s.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",l)}),a.send(void 0===s._bodyInit?null:s._bodyInit)})}b.polyfill=!0,r.fetch||(r.fetch=b,r.Headers=u,r.Request=m,r.Response=v),t.Headers=u,t.Request=m,t.Response=v,t.fetch=b,Object.defineProperty(t,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill,(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},5230:function(t,e,r){var n,i=r(2040);!function(){"use strict";var o="input is invalid type",s="object"==typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?a=r.g:u&&(a=self);var l=!a.JS_SHA3_NO_COMMON_JS&&t.exports,h=r.amdO,c=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),f=[4,1024,262144,67108864],p=[0,8,16,24],m=[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],g=[224,256,384,512],v=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),c&&(a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,r){return function(n){return new O(t,e,t).update(n)[r]()}},A=function(t,e,r){return function(n,i){return new O(t,e,i).update(n)[r]()}},E=function(t,e,r){return function(e,n,i,o){return M["cshake"+t].update(e,n,i,o)[r]()}},x=function(t,e,r){return function(e,n,i,o){return M["kmac"+t].update(e,n,i,o)[r]()}},k=function(t,e,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function D(t,e,r){O.call(this,t,e,r)}O.prototype.update=function(t){if(this.finalized)throw Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=t.length,l=this.blockCount,h=0,d=this.s;h>2]|=t[h]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[l],n=0;n>=8,r=255&t;r>0;)i.unshift(r),t>>=8,r=255&t,++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},O.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"===r){if(null===t)throw Error(o);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!c||!ArrayBuffer.isView(t)))throw Error(o)}else throw Error(o);e=!0}var n=0,i=t.length;if(e)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(t),n},O.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(e=1,t[0]=t[r];e>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];s%e==0&&(L(r),o=0)}return i&&(a+=d[(t=r[o])>>4&15]+d[15&t],i>1&&(a+=d[t>>12&15]+d[t>>8&15]),i>2&&(a+=d[t>>20&15]+d[t>>16&15])),a},O.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;t=new ArrayBuffer(i?n+1<<2:a);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;a%r==0&&L(n)}return o&&(t=a<<2,e=n[s],u[t]=255&e,o>1&&(u[t+1]=e>>8&255),o>2&&(u[t+2]=e>>16&255)),u},D.prototype=new O,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,a,u,l,h,c,d,f,p,g,v,y,b,w,A,E,x,k,_,S,M,C,P,I,B,R,T,N,O,D,L,F,U,H,G,j,z,q,K,Q,Y,Z,V,J,W,X,$,tt,te,tr,tn,ti,to,ts,ta,tu,tl,th;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],l=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49],e=d^(s<<1|a>>>31),r=f^(a<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(h<<1|c>>>31),r=a^(c<<1|h>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(d<<1|f>>>31),r=l^(f<<1|d>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=h^(i<<1|o>>>31),r=c^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,p=t[0],g=t[1],Y=t[11]<<4|t[10]>>>28,Z=t[10]<<4|t[11]>>>28,P=t[20]<<3|t[21]>>>29,I=t[21]<<3|t[20]>>>29,ta=t[31]<<9|t[30]>>>23,tu=t[30]<<9|t[31]>>>23,z=t[40]<<18|t[41]>>>14,q=t[41]<<18|t[40]>>>14,O=t[2]<<1|t[3]>>>31,D=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,V=t[22]<<10|t[23]>>>22,J=t[23]<<10|t[22]>>>22,B=t[33]<<13|t[32]>>>19,R=t[32]<<13|t[33]>>>19,tl=t[42]<<2|t[43]>>>30,th=t[43]<<2|t[42]>>>30,te=t[5]<<30|t[4]>>>2,tr=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,F=t[15]<<6|t[14]>>>26,b=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,W=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,T=t[45]<<29|t[44]>>>3,N=t[44]<<29|t[45]>>>3,_=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,tn=t[17]<<23|t[16]>>>9,ti=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,H=t[27]<<25|t[26]>>>7,A=t[36]<<21|t[37]>>>11,E=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,K=t[8]<<27|t[9]>>>5,Q=t[9]<<27|t[8]>>>5,M=t[18]<<20|t[19]>>>12,C=t[19]<<20|t[18]>>>12,to=t[29]<<7|t[28]>>>25,ts=t[28]<<7|t[29]>>>25,G=t[38]<<8|t[39]>>>24,j=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=p^~v&b,t[1]=g^~y&w,t[10]=_^~M&P,t[11]=S^~C&I,t[20]=O^~L&U,t[21]=D^~F&H,t[30]=K^~Y&V,t[31]=Q^~Z&J,t[40]=te^~tn&to,t[41]=tr^~ti&ts,t[2]=v^~b&A,t[3]=y^~w&E,t[12]=M^~P&B,t[13]=C^~I&R,t[22]=L^~U&G,t[23]=F^~H&j,t[32]=Y^~V&W,t[33]=Z^~J&X,t[42]=tn^~to&ta,t[43]=ti^~ts&tu,t[4]=b^~A&x,t[5]=w^~E&k,t[14]=P^~B&T,t[15]=I^~R&N,t[24]=U^~G&z,t[25]=H^~j&q,t[34]=V^~W&$,t[35]=J^~X&tt,t[44]=to^~ta&tl,t[45]=ts^~tu&th,t[6]=A^~x&p,t[7]=E^~k&g,t[16]=B^~T&_,t[17]=R^~N&S,t[26]=G^~z&O,t[27]=j^~q&D,t[36]=W^~$&K,t[37]=X^~tt&Q,t[46]=ta^~tl&te,t[47]=tu^~th&tr,t[8]=x^~p&v,t[9]=k^~g&y,t[18]=T^~_&M,t[19]=N^~S&C,t[28]=z^~O&L,t[29]=q^~D&F,t[38]=$^~K&Y,t[39]=tt^~Q&Z,t[48]=tl^~te&tn,t[49]=th^~tr&ti,t[0]^=m[n],t[1]^=m[n+1]};if(l)t.exports=M;else{for(P=0;P0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}e.ZP={number:n,bool:function(t){if("boolean"!=typeof t)throw Error(`Expected boolean, not ${t}`)},bytes:i,hash:function(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)},exists:function(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")},output:function(t,e){i(t);let r=e.outputLen;if(t.length>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}let s=(t,e)=>BigInt(t>>>0)<>>0);e.ZP={fromBig:o,split:function(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it>>>r,shrSL:(t,e,r)=>t<<32-r|e>>>r,rotrSH:(t,e,r)=>t>>>r|e<<32-r,rotrSL:(t,e,r)=>t<<32-r|e>>>r,rotrBH:(t,e,r)=>t<<64-r|e>>>r-32,rotrBL:(t,e,r)=>t>>>r-32|e<<64-r,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:(t,e,r)=>t<>>32-r,rotlSL:(t,e,r)=>e<>>32-r,rotlBH:(t,e,r)=>e<>>64-r,rotlBL:(t,e,r)=>t<>>64-r,add:function(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/4294967296|0)|0,l:0|i}},add3L:(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),add3H:(t,e,r,n)=>e+r+n+(t/4294967296|0)|0,add4L:(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),add4H:(t,e,r,n,i)=>e+r+n+i+(t/4294967296|0)|0,add5H:(t,e,r,n,i,o)=>e+r+n+i+o+(t/4294967296|0)|0,add5L:(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0)}},2417:function(t,e,r){"use strict";r.d(e,{e:function(){return n}});let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},8761:function(t,e,r){"use strict";r.d(e,{GL:function(){return s},Jq:function(){return o},O0:function(){return h},O6:function(){return v},U5:function(){return p},eV:function(){return c},gz:function(){return g},hE:function(){return m},iY:function(){return l},kb:function(){return d},np:function(){return a}});var n=r(2417);/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */let i=t=>t instanceof Uint8Array,o=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),s=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),a=(t,e)=>t<<32-e|t>>>e,u=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];if(!u)throw Error("Non little-endian hardware is not supported");function l(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function h(t){if("string"==typeof t&&(t=l(t)),!i(t))throw Error(`expected Uint8Array, got ${typeof t}`);return t}function c(...t){let e=new Uint8Array(t.reduce((t,e)=>t+e.length,0)),r=0;return t.forEach(t=>{if(!i(t))throw Error("Uint8Array expected");e.set(t,r),r+=t.length}),e}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));class d{clone(){return this._cloneInto()}}let f=t=>"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object;function p(t,e){if(void 0!==e&&("object"!=typeof e||!f(e)))throw Error("Options should be object or undefined");let r=Object.assign(t,e);return r}function m(t){let e=e=>t().update(h(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function g(t){let e=(e,r)=>t(r).update(h(e)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=e=>t(e),e}function v(t=32){if(n.e&&"function"==typeof n.e.getRandomValues)return n.e.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}},1742:function(t,e,r){"use strict";r.d(e,{wn:function(){return M}});var n=r(6156),i=r(6121),o=r(8761);let[s,a,u]=[[],[],[]],l=BigInt(0),h=BigInt(1),c=BigInt(2),d=BigInt(7),f=BigInt(256),p=BigInt(113);for(let t=0,e=h,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((t+1)*(t+2)/2%64);let i=l;for(let t=0;t<7;t++)(e=(e<>d)*p)%f)&c&&(i^=h<<(h<r>32?i.ZP.rotlBH(t,e,r):i.ZP.rotlSH(t,e,r),y=(t,e,r)=>r>32?i.ZP.rotlBL(t,e,r):i.ZP.rotlSL(t,e,r);class b extends o.kb{constructor(t,e,r,i=!1,s=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.ZP.number(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.Jq)(this.state)}keccak(){!function(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,i=(e+2)%10,o=r[i],s=r[i+1],a=v(o,s,1)^r[n],u=y(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=a,t[e+r+1]^=u}let e=t[2],i=t[3];for(let r=0;r<24;r++){let n=a[r],o=v(e,i,n),u=y(e,i,n),l=s[r];e=t[l],i=t[l+1],t[l]=o,t[l+1]=u}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=m[n],t[1]^=g[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){n.ZP.exists(this);let{blockLen:e,state:r}=this;t=(0,o.O0)(t);let i=t.length;for(let n=0;n=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return n.ZP.number(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(n.ZP.output(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:e,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return t||(t=new b(e,r,n,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=n,t.enableXOF=o,t.destroyed=this.destroyed,t}}let w=(t,e,r)=>(0,o.hE)(()=>new b(e,t,r));w(6,144,28),w(6,136,32),w(6,104,48),w(6,72,64);let A=w(1,144,28),E=w(1,136,32),x=w(1,104,48),k=w(1,72,64),_=(t,e,r)=>(0,o.gz)((n={})=>new b(e,t,void 0===n.dkLen?r:n.dkLen,!0));_(31,168,16),_(31,136,32);var S=r(7325);(0,S.gn)(A);let M=(()=>{let t=(0,S.gn)(E);return t.create=E.create,t})();(0,S.gn)(x),(0,S.gn)(k)},7325:function(t,e,r){"use strict";r.d(e,{Md:function(){return s},XB:function(){return o},eV:function(){return i.eV},gn:function(){return u},hD:function(){return a},iY:function(){return i.iY}});var n=r(6156),i=r(8761);n.ZP.bool;let o=n.ZP.bytes;function s(t){if(!(t instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof t}`);return new TextDecoder().decode(t)}function a(t,e){if(t.length!==e.length)return!1;for(let r=0;r(n.ZP.bytes(e),t(e))}(()=>{let t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,e="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);return e&&!t?e("crypto"):void 0})()},9973:function(t,e,r){"use strict";r.d(e,{WFj:function(){return R},GkU:function(){return i},JVB:function(){return V},Ylw:function(){return J},X6p:function(){return X},KSv:function(){return tH},uYR:function(){return tU},hYh:function(){return m},ZYx:function(){return g},KEx:function(){return x},_Q_:function(){return k},tOY:function(){return tq},X_Y:function(){return S},ZqO:function(){return _},oDX:function(){return n},a8b:function(){return ts},WTh:function(){return tc},$4q:function(){return E},zSi:function(){return T},A6c:function(){return C},HcZ:function(){return W},l$f:function(){return tC},eNY:function(){return f},bSi:function(){return t_},sAR:function(){return tN},X6d:function(){return tI},ABz:function(){return tx},$PL:function(){return O},T6V:function(){return ti},PlV:function(){return l},g6u:function(){return tT},CY5:function(){return to},yNx:function(){return M},clc:function(){return tl},NL0:function(){return tk},nII:function(){return d},QOl:function(){return a},L25:function(){return tE},$D9:function(){return tF},wnZ:function(){return u},Bq_:function(){return tR},SiY:function(){return tS},FJx:function(){return tu},w79:function(){return Q},SBp:function(){return K},jQu:function(){return tM},JDZ:function(){return tB},ePX:function(){return h},V41:function(){return c},R_K:function(){return tA},JsW:function(){return v},iQ5:function(){return P},Bye:function(){return $},DLI:function(){return Y},HW5:function(){return Z},Bif:function(){return te},v45:function(){return tP},GRi:function(){return B},S$e:function(){return I},WqT:function(){return p},VLp:function(){return y},T7U:function(){return s},kbX:function(){return N},kML:function(){return b},UF$:function(){return A},VLC:function(){return tL},lth:function(){return tz},_J2:function(){return F},iXd:function(){return D},SvW:function(){return tv},DT0:function(){return tf},H4O:function(){return tn},EpQ:function(){return ty},Vci:function(){return q},BhO:function(){return tg},FnB:function(){return tb},ydH:function(){return H},C3x:function(){return G},fbB:function(){return j},plQ:function(){return tp},wJO:function(){return tw},U_d:function(){return th},F92:function(){return z},bKH:function(){return ta},rsr:function(){return td},Oht:function(){return w},HIr:function(){return L},BEj:function(){return tK}});let n=1100;class i extends Error{constructor(t,e){super(t),this.innerError=e,this.name=this.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(new.target.constructor):this.stack=Error().stack}static convertToString(t,e=!1){if(null==t)return"undefined";let r=JSON.stringify(t,(t,e)=>"bigint"==typeof e?e.toString():e);return e&&["bigint","string"].includes(typeof t)?r.replace(/['\\"]+/g,""):r}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}}class o extends i{constructor(t,e){super(`Invalid value given "${i.convertToString(t,!0)}". Error: ${e}.`),this.name=this.constructor.name}}class s extends i{constructor(){super("Private key must be 32 bytes."),this.code=701}}class a extends i{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=702}}class u extends i{constructor(t){super(`"${t}"`),this.code=802}}class l extends i{constructor(){super("Invalid key derivation function"),this.code=703}}class h extends i{constructor(){super("Key derivation failed - possibly wrong password"),this.code=704}}class c extends i{constructor(){super("Unsupported key store version"),this.code=705}}class d extends i{constructor(){super("Password cannot be empty"),this.code=706}}class f extends i{constructor(){super("Initialization vector must be 16 bytes"),this.code=707}}class p extends i{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=709}}class m extends i{constructor(t,e){super(t),this.code=500,e&&(this.errorCode=e.code,this.errorReason=e.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class g extends m{constructor(t){super("Connection not open",t),this.code=503}}class v extends m{constructor(t){super(`Maximum number of reconnect attempts reached! (${t})`),this.code=505}}class y extends m{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=506}}class b extends m{constructor(t){super(`Request already sent with following id: ${t}`),this.code=507}}class w extends i{constructor(t,e){super(t),this.code=300,this.receipt=e}}class A extends i{constructor(t,e){super(`The resolver at ${t} does not implement requested method: "${e}".`),this.address=t,this.name=e,this.code=301}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class E extends w{constructor(t){if(super(t.message||"Error"),this.name="name"in t&&t.name||this.constructor.name,this.stack="stack"in t&&t.stack||void 0,this.code=t.code,"object"==typeof t.data){let e;e="originalError"in t.data?t.data.originalError:t.data,this.data=e.data,this.innerError=new E(e)}else this.data=t.data}setDecodedProperties(t,e,r){this.errorName=t,this.errorSignature=e,this.errorArgs=r}toJSON(){let t=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(t=Object.assign(Object.assign({},t),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),t}}class x extends w{constructor(t){super("Error happened while trying to execute a function inside a smart contract"),this.code=310,this.innerError=new E(t)}}class k extends o{constructor(t){var e,r;super(`data: ${null!==(e=t.data)&&void 0!==e?e:"undefined"}, input: ${null!==(r=t.input)&&void 0!==r?r:"undefined"}`,'You can\'t have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.'),this.code=311}}class _ extends i{constructor(t){super(`ENS is not supported on network ${t}`),this.code=902}}class S extends i{constructor(){super("Network not synced"),this.code=903}}class M extends i{constructor(t){super(`Invalid parameters passed. "${void 0!==t?t:""}"`),this.hint=t,this.code=207}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class C extends i{constructor(){super(...arguments),this.code=201}}class P extends i{constructor(){super("The method you're trying to call is not implemented."),this.code=202}}class I extends i{constructor(){super(...arguments),this.code=203}}class B extends i{constructor(){super(...arguments),this.code=204}}class R extends i{constructor(){super(...arguments),this.code=205}}class T extends i{constructor(t){super(`A plugin with the namespace: ${t} has already been registered.`),this.code=206}}class N extends i{constructor(){super(...arguments),this.code=600}}class O extends i{constructor(t){super(`Client URL "${t}" is invalid.`),this.code=602}}class D extends i{constructor(){super(...arguments),this.code=603}}class L extends i{constructor(){super(...arguments),this.code=604}}class F extends o{constructor(){super(...arguments),this.code=801}}class U extends i{constructor(t,e){super(t),this.receipt=e,this.code=400}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class H extends i{constructor(t,e,r,n){super(`Transaction has been reverted by the EVM${void 0===r?"":`: + ${i.convertToString(r)}`}`),this.reason=t,this.signature=e,this.receipt=r,this.data=n,this.code=402}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature,receipt:this.receipt,data:this.data})}}class G extends H{constructor(t,e,r,n,i,o,s){super(t),this.reason=t,this.customErrorName=e,this.customErrorDecodedSignature=r,this.customErrorArguments=n,this.signature=i,this.receipt=o,this.data=s,this.code=438}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,customErrorName:this.customErrorName,customErrorDecodedSignature:this.customErrorDecodedSignature,customErrorArguments:this.customErrorArguments,signature:this.signature,receipt:this.receipt,data:this.data})}}class j extends U{constructor(t){super(`Transaction has been reverted by the EVM${void 0===t?"":`: + ${i.convertToString(t)}`}`,t),this.code=405}}class z extends U{constructor(){super("Raw transaction undefined"),this.code=407}}class q extends U{constructor(){super("Transaction not found"),this.code=430}}class K extends o{constructor(t){super(t,"invalid transaction with invalid sender"),this.code=408}}class Q extends o{constructor(t){super(t,"invalid transaction with invalid receiver"),this.code=437}}class Y extends o{constructor(){super("MissingCustomChainError","If tx.common is provided it must have tx.common.customChain"),this.code=410}}class Z extends o{constructor(){super("MissingCustomChainIdError","If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId"),this.code=411}}class V extends o{constructor(t){super(JSON.stringify(t),"Chain Id doesnt match in tx.chainId tx.common.customChain.chainId"),this.code=412}}class J extends o{constructor(t){super(JSON.stringify(t),"Chain doesnt match in tx.chain tx.common.basechain"),this.code=435}}class W extends o{constructor(t){super(JSON.stringify(t),"hardfork doesnt match in tx.hardfork tx.common.hardfork"),this.code=436}}class X extends o{constructor(){super("CommonOrChainAndHardforkError","Please provide the common object or the chain and hardfork property but not all together."),this.code=413}}class $ extends o{constructor(t){var e,r;super("MissingChainOrHardforkError",`When specifying chain and hardfork, both values must be defined. Received "chain": ${null!==(e=t.chain)&&void 0!==e?e:"undefined"}, "hardfork": ${null!==(r=t.hardfork)&&void 0!==r?r:"undefined"}`),this.code=414}}class tt extends i{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'),this.code=440}}class te extends o{constructor(t){var e,r,n,i;super(`gas: ${null!==(e=t.gas)&&void 0!==e?e:"undefined"}, gasPrice: ${null!==(r=t.gasPrice)&&void 0!==r?r:"undefined"}, maxPriorityFeePerGas: ${null!==(n=t.maxPriorityFeePerGas)&&void 0!==n?n:"undefined"}, maxFeePerGas: ${null!==(i=t.maxFeePerGas)&&void 0!==i?i:"undefined"}`,'"gas" is missing'),this.code=415,this.innerError=new tt}}class tr extends i{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'),this.code=441}}class tn extends o{constructor(t){var e,r,n,i;super(`gas: ${null!==(e=t.gas)&&void 0!==e?e:"undefined"}, gasPrice: ${null!==(r=t.gasPrice)&&void 0!==r?r:"undefined"}, maxPriorityFeePerGas: ${null!==(n=t.maxPriorityFeePerGas)&&void 0!==n?n:"undefined"}, maxFeePerGas: ${null!==(i=t.maxFeePerGas)&&void 0!==i?i:"undefined"}`,"transaction must specify legacy or fee market gas properties, not both"),this.code=434,this.innerError=new tr}}class ti extends o{constructor(t){var e,r;super(`gas: ${null!==(e=t.gas)&&void 0!==e?e:"undefined"}, gasPrice: ${null!==(r=t.gasPrice)&&void 0!==r?r:"undefined"}`,"Gas or gasPrice is lower than 0"),this.code=416}}class to extends o{constructor(t){var e,r;super(`maxPriorityFeePerGas: ${null!==(e=t.maxPriorityFeePerGas)&&void 0!==e?e:"undefined"}, maxFeePerGas: ${null!==(r=t.maxFeePerGas)&&void 0!==r?r:"undefined"}`,"maxPriorityFeePerGas or maxFeePerGas is lower than 0"),this.code=417}}class ts extends o{constructor(t){super(t,"eip-1559 transactions don't support gasPrice"),this.code=418}}class ta extends o{constructor(t){var e,r;super(`maxPriorityFeePerGas: ${null!==(e=t.maxPriorityFeePerGas)&&void 0!==e?e:"undefined"}, maxFeePerGas: ${null!==(r=t.maxFeePerGas)&&void 0!==r?r:"undefined"}`,"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas"),this.code=419}}class tu extends o{constructor(t){super(t,"invalid transaction object"),this.code=420}}class tl extends o{constructor(t){var e,r;super(`nonce: ${null!==(e=t.nonce)&&void 0!==e?e:"undefined"}, chainId: ${null!==(r=t.chainId)&&void 0!==r?r:"undefined"}`,"Nonce or chainId is lower than 0"),this.code=421}}class th extends o{constructor(){super("UnableToPopulateNonceError","unable to populate nonce, no from address available"),this.code=422}}class tc extends o{constructor(){super("Eip1559NotSupportedError","Network doesn't support eip-1559"),this.code=423}}class td extends o{constructor(t){super(t,"unsupported transaction type"),this.code=424}}class tf extends o{constructor(t){var e,r;super(`data: ${null!==(e=t.data)&&void 0!==e?e:"undefined"}, input: ${null!==(r=t.input)&&void 0!==r?r:"undefined"}`,'You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.'),this.code=425}}class tp extends i{constructor(t){super(`The connected Ethereum Node did not respond within ${t.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined! + Transaction Hash: ${t.transactionHash?t.transactionHash.toString():"not available"}`),this.code=431}}function tm(t){return`Please make sure your transaction was properly sent and there no pervious pending transaction for the same account. However, be aware that it might still be mined! + Transaction Hash: ${t?t.toString():"not available"}`}class tg extends i{constructor(t){super(`Transaction was not mined within ${t.numberOfSeconds} seconds. ${tm(t.transactionHash)}`),this.code=426}}class tv extends i{constructor(t){super(`Transaction started at ${t.starterBlockNumber} but was not mined within ${t.numberOfBlocks} blocks. ${tm(t.transactionHash)}`),this.code=432}}class ty extends o{constructor(t){var e,r;super(`receipt: ${JSON.stringify(t.receipt)}, blockHash: ${null===(e=t.blockHash)||void 0===e?void 0:e.toString()}, transactionHash: ${null===(r=t.transactionHash)||void 0===r?void 0:r.toString()}`,"Receipt missing or blockHash null"),this.code=427}}class tb extends o{constructor(t){super(`receipt: ${JSON.stringify(t.receipt)}`,"Receipt missing block number"),this.code=428}}class tw extends i{constructor(t){super(`Invalid signature. "${t}"`),this.code=433}}class tA extends o{constructor(){super("LocalWalletNotAvailableError","Attempted to index account in local wallet, but no wallet is available"),this.code=429}}class tE extends i{constructor(t,e){let r=[];t.forEach(t=>r.push(t.keyword)),super(`The following properties are invalid for the transaction type ${e}: ${r.join(", ")}`),this.code=439}}class tx extends o{constructor(t){super(t,"can not parse as byte data"),this.code=1002}}class tk extends o{constructor(t){super(t,"can not parse as number data"),this.code=1003}}class t_ extends o{constructor(t){super(t,"invalid ethereum address"),this.code=1005}}class tS extends o{constructor(t){super(t,"not a valid string"),this.code=1001}}class tM extends o{constructor(t){super(t,"invalid unit"),this.code=1004}}class tC extends o{constructor(t){super(t,"can not be converted to hex"),this.code=1006}}class tP extends o{constructor(t){super(t,"value greater than the nibble width"),this.code=1014}}class tI extends o{constructor(t){super(t,"not a valid boolean."),this.code=1008}}class tB extends o{constructor(t){super(t,"not a valid unsigned integer."),this.code=1009}}class tR extends o{constructor(t){super(t,"invalid size given."),this.code=1010}}class tT extends o{constructor(t){super(t,"value is larger than size."),this.code=1011}}class tN extends o{constructor(t){super(t,"invalid string given"),this.code=1012}}let tO=t=>!Array.isArray(t)&&"2.0"===t.jsonrpc&&!!t&&(void 0===t.result||null===t.result)&&"error"in t&&("number"==typeof t.id||"string"==typeof t.id),tD=t=>tO(t)?t.error.message:"";class tL extends i{constructor(t,e,r){var n;let i;super(null!=e?e:`Returned error: ${Array.isArray(t)?t.map(t=>tD(t)).join(","):tD(t)}`),this.code=100,e||(this.data=Array.isArray(t)?t.map(t=>{var e;return null===(e=t.error)||void 0===e?void 0:e.data}):null===(n=null==t?void 0:t.error)||void 0===n?void 0:n.data),this.request=r,"error"in t?i=t.error:t instanceof Array&&(i=t.map(t=>t.error)),this.innerError=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{data:this.data,request:this.request})}}class tF extends tL{constructor(t,e){let r;super(t,void 0,e),this.code=101,"error"in t?r=t.error:t instanceof Array&&(r=t.map(t=>t.error)),this.innerError=r}}class tU extends i{constructor(t,e){super(`Web3Config hardfork doesnt match in defaultHardfork ${t} and common.hardfork ${e}`),this.code=1101}}class tH extends i{constructor(t,e){super(`Web3Config chain doesnt match in defaultHardfork ${t} and common.hardfork ${e}`),this.code=1101}}let tG="An Rpc error has occured with a code of *code*",tj={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},4001:{name:"User Rejected Request",message:"The user rejected the request."},4100:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},4200:{name:"Unsupported Method",message:"The Provider does not support the requested method."},4900:{name:"Disconnected",message:"The Provider is disconnected from all chains."},4901:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class tz extends i{constructor(t,e){super(null!=e?e:tG.replace("*code*",t.error.code.toString())),this.code=t.error.code,this.id=t.id,this.jsonrpc=t.jsonrpc,this.jsonRpcError=t.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class tq extends i{constructor(t,e){var r,n,i,o;if(t){if(null===(r=tj[t])||void 0===r?void 0:r.message)super(tj[t].message);else{let e=Object.keys(tj).find(e=>"string"==typeof e&&t>=parseInt(e.split("-")[0],10)&&t<=parseInt(e.split("-")[1],10));super(null!==(i=null===(n=tj[null!=e?e:""])||void 0===n?void 0:n.message)&&void 0!==i?i:tG.replace("*code*",null!==(o=null==t?void 0:t.toString())&&void 0!==o?o:'""'))}}else super();this.code=t,this.data=e}}let tK=new Map;tK.set(-32700,{error:class extends tz{constructor(t){super(t,tj[-32700].message),this.code=-32700}}}),tK.set(-32600,{error:class extends tz{constructor(t){super(t,tj[-32600].message),this.code=-32600}}}),tK.set(-32601,{error:class extends tz{constructor(t){super(t,tj[-32601].message),this.code=-32601}}}),tK.set(-32602,{error:class extends tz{constructor(t){super(t,tj[-32602].message),this.code=-32602}}}),tK.set(-32603,{error:class extends tz{constructor(t){super(t,tj[-32603].message),this.code=-32603}}}),tK.set(-32e3,{error:class extends tz{constructor(t){super(t,tj[-32e3].message),this.code=-32e3}}}),tK.set(-32004,{error:class extends tz{constructor(t){super(t,tj[-32004].message),this.code=-32004}}}),tK.set(-32002,{error:class extends tz{constructor(t){super(t,tj[-32002].message),this.code=-32002}}}),tK.set(-32003,{error:class extends tz{constructor(t){super(t,tj[-32003].message),this.code=-32003}}}),tK.set(-32001,{error:class extends tz{constructor(t){super(t,tj[-32001].message),this.code=-32001}}}),tK.set(-32006,{error:class extends tz{constructor(t){super(t,tj[-32006].message),this.code=-32006}}}),tK.set(-32005,{error:class extends tz{constructor(t){super(t,tj[-32005].message),this.code=-32005}}})},6852:function(t,e,r){"use strict";r.d(e,{Gn:function(){return eI},YW:function(){return ez},nL:function(){return eq},w5:function(){return E},Ue:function(){return e1},pe:function(){return e2},HI:function(){return e$},rj:function(){return eY},LF:function(){return e0},_5:function(){return eX},A9:function(){return eW},zG:function(){return eJ},Xx:function(){return eZ},OJ:function(){return eV}});var n,i,o,s,a,u,l,h,c,d,f,p,m,g,v={};r.r(v),r.d(v,{bitGet:function(){return tM},bitLen:function(){return tS},bitMask:function(){return tP},bitSet:function(){return tC},bytesToHex:function(){return tf},bytesToNumberBE:function(){return tv},bytesToNumberLE:function(){return ty},concatBytes:function(){return tx},createHmacDrbg:function(){return tR},ensureBytes:function(){return tE},equalBytes:function(){return tk},hexToBytes:function(){return tg},hexToNumber:function(){return tm},numberToBytesBE:function(){return tb},numberToBytesLE:function(){return tw},numberToHexUnpadded:function(){return tp},numberToVarBytesBE:function(){return tA},utf8ToBytes:function(){return t_},validateObject:function(){return tN}});var y={};r.r(y),r.d(y,{secp256k1:function(){return t7}});var b=r(6636),w=r(7008),A=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class E extends b.vy{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let t;try{t=window.localStorage;let e="__storage_test__";return t.setItem(e,e),t.removeItem(e),t}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&!(0,w.Rw)(t)&&0!==t.length?t:void 0}}create(t){for(let e=0;eA(this,void 0,void 0,function*(){return r.encrypt(t,e)})))})}decrypt(t,e,r){return A(this,void 0,void 0,function*(){let n=yield Promise.all(t.map(t=>A(this,void 0,void 0,function*(){return this._accountProvider.decrypt(t,e,r)})));for(let t of n)this.add(t);return this})}save(t,e){return A(this,void 0,void 0,function*(){let r=E.getStorage();if(!r)throw Error("Local storage not available.");return r.setItem(null!=e?e:this._defaultKeyName,JSON.stringify((yield this.encrypt(t)))),!0})}load(t,e){return A(this,void 0,void 0,function*(){let r=E.getStorage();if(!r)throw Error("Local storage not available.");let n=r.getItem(null!=e?e:this._defaultKeyName);return n&&(yield this.decrypt(JSON.parse(n)||[],t)),this})}}var x=r(2417),k=r(7325);let _={web:x.e};function S(t,e,r){if(!r.startsWith("aes-"))throw Error(`AES submodule doesn't support mode ${r}`);if(16!==e.length)throw Error("AES: wrong IV length");if(r.startsWith("aes-128")&&16!==t.length||r.startsWith("aes-256")&&32!==t.length)throw Error("AES: wrong key length")}async function M(t,e,r){let n;if(!_.web)throw Error("Browser crypto not available.");if(["aes-128-cbc","aes-256-cbc"].includes(t)&&(n="cbc"),["aes-128-ctr","aes-256-ctr"].includes(t)&&(n="ctr"),!n)throw Error("AES: unsupported mode");let i=await _.web.subtle.importKey("raw",e,{name:`AES-${n.toUpperCase()}`,length:8*e.length},!0,["encrypt","decrypt"]);return[i,{name:`aes-${n}`,iv:r,counter:r,length:128}]}async function C(t,e,r,n="aes-128-ctr",i=!0){if(S(e,r,n),_.web){let[o,s]=await M(n,e,r),a=await _.web.subtle.encrypt(s,o,t),u=new Uint8Array(a);return i||"aes-cbc"!==s.name||t.length%16||(u=u.slice(0,-16)),u}if(_.node){let o=_.node.createCipheriv(n,e,r);return o.setAutoPadding(i),(0,k.eV)(o.update(t),o.final())}throw Error("The environment doesn't have AES module")}async function P(t,e,r,n){let i=t.slice(-16);for(let t=0;t<16;t++)i[t]^=16^r[t];let o=await C(i,e,r,n);return o.slice(0,16)}async function I(t,e,r,n="aes-128-ctr",i=!0){if(S(e,r,n),_.web){let[o,s]=await M(n,e,r);if(!i&&"aes-cbc"===s.name){let i=await P(t,e,r,n);t=(0,k.eV)(t,i)}let a=await _.web.subtle.decrypt(s,o,t),u=new Uint8Array(a);if("aes-cbc"===s.name){let i=await C(u,e,r,n);if(!(0,k.hD)(i,t))throw Error("AES: wrong padding")}return u}if(_.node){let o=_.node.createDecipheriv(n,e,r);return o.setAutoPadding(i),(0,k.eV)(o.update(t),o.final())}throw Error("The environment doesn't have AES module")}var B=r(6156),R=r(8761);class T extends R.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,B.ZP.hash(t);let r=(0,R.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let t=0;tnew T(t,e).update(r).digest();function O(t,e,r,n){var i;let o;let{c:s,dkLen:a,DK:u,PRF:l,PRFSalt:h}=function(t,e,r,n){B.ZP.hash(t);let i=(0,R.U5)({dkLen:32,asyncTick:10},n),{c:o,dkLen:s,asyncTick:a}=i;if(B.ZP.number(o),B.ZP.number(s),B.ZP.number(a),o<1)throw Error("PBKDF2: iterations (c) should be >= 1");let u=(0,R.O0)(e),l=(0,R.O0)(r),h=new Uint8Array(s),c=N.create(t,u),d=c._cloneInto().update(l);return{c:o,dkLen:s,asyncTick:a,DK:h,PRF:c,PRFSalt:d}}(t,e,r,n),c=new Uint8Array(4),d=(0,R.GL)(c),f=new Uint8Array(l.outputLen);for(let t=1,e=0;enew T(t,e);class D extends R.kb{constructor(t,e,r,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,R.GL)(this.buffer)}update(t){B.ZP.exists(this);let{view:e,buffer:r,blockLen:n}=this;t=(0,R.O0)(t);let i=t.length;for(let o=0;on-o&&(this.process(r,0),o=0);for(let t=o;t>i&o),a=Number(r&o);t.setUint32(e+(n?4:0),s,n),t.setUint32(e+(n?0:4),a,n)}(r,n-8,BigInt(8*this.length),i),this.process(r,0);let s=(0,R.GL)(t),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let u=a/4,l=this.get();if(u>l.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;tt&e^~t&r,F=(t,e,r)=>t&e^t&r^e&r,U=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]),H=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),G=new Uint32Array(64);class j extends D{constructor(){super(64,32,8,!1),this.A=0|H[0],this.B=0|H[1],this.C=0|H[2],this.D=0|H[3],this.E=0|H[4],this.F=0|H[5],this.G=0|H[6],this.H=0|H[7]}get(){let{A:t,B:e,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[t,e,r,n,i,o,s,a]}set(t,e,r,n,i,o,s,a){this.A=0|t,this.B=0|e,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(t,e){for(let r=0;r<16;r++,e+=4)G[r]=t.getUint32(e,!1);for(let t=16;t<64;t++){let e=G[t-15],r=G[t-2],n=(0,R.np)(e,7)^(0,R.np)(e,18)^e>>>3,i=(0,R.np)(r,17)^(0,R.np)(r,19)^r>>>10;G[t]=i+G[t-7]+n+G[t-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:u,H:l}=this;for(let t=0;t<64;t++){let e=(0,R.np)(s,6)^(0,R.np)(s,11)^(0,R.np)(s,25),h=l+e+L(s,a,u)+U[t]+G[t]|0,c=(0,R.np)(r,2)^(0,R.np)(r,13)^(0,R.np)(r,22),d=c+F(r,n,i)|0;l=u,u=a,a=s,s=o+h|0,o=i,i=n,n=r,r=h+d|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(r,n,i,o,s,a,u,l)}roundClean(){G.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class z extends j{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 q=(0,R.hE)(()=>new j);(0,R.hE)(()=>new z);var K=r(6121);let[Q,Y]=K.ZP.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(t=>BigInt(t))),Z=new Uint32Array(80),V=new Uint32Array(80);class J extends D{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:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:l,Fh:h,Fl:c,Gh:d,Gl:f,Hh:p,Hl:m}=this;return[t,e,r,n,i,o,s,a,u,l,h,c,d,f,p,m]}set(t,e,r,n,i,o,s,a,u,l,h,c,d,f,p,m){this.Ah=0|t,this.Al=0|e,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|l,this.Fh=0|h,this.Fl=0|c,this.Gh=0|d,this.Gl=0|f,this.Hh=0|p,this.Hl=0|m}process(t,e){for(let r=0;r<16;r++,e+=4)Z[r]=t.getUint32(e),V[r]=t.getUint32(e+=4);for(let t=16;t<80;t++){let e=0|Z[t-15],r=0|V[t-15],n=K.ZP.rotrSH(e,r,1)^K.ZP.rotrSH(e,r,8)^K.ZP.shrSH(e,r,7),i=K.ZP.rotrSL(e,r,1)^K.ZP.rotrSL(e,r,8)^K.ZP.shrSL(e,r,7),o=0|Z[t-2],s=0|V[t-2],a=K.ZP.rotrSH(o,s,19)^K.ZP.rotrBH(o,s,61)^K.ZP.shrSH(o,s,6),u=K.ZP.rotrSL(o,s,19)^K.ZP.rotrBL(o,s,61)^K.ZP.shrSL(o,s,6),l=K.ZP.add4L(i,u,V[t-7],V[t-16]),h=K.ZP.add4H(l,n,a,Z[t-7],Z[t-16]);Z[t]=0|h,V[t]=0|l}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:a,Dh:u,Dl:l,Eh:h,El:c,Fh:d,Fl:f,Gh:p,Gl:m,Hh:g,Hl:v}=this;for(let t=0;t<80;t++){let e=K.ZP.rotrSH(h,c,14)^K.ZP.rotrSH(h,c,18)^K.ZP.rotrBH(h,c,41),y=K.ZP.rotrSL(h,c,14)^K.ZP.rotrSL(h,c,18)^K.ZP.rotrBL(h,c,41),b=h&d^~h&p,w=c&f^~c&m,A=K.ZP.add5L(v,y,w,Y[t],V[t]),E=K.ZP.add5H(A,g,e,b,Q[t],Z[t]),x=0|A,k=K.ZP.rotrSH(r,n,28)^K.ZP.rotrBH(r,n,34)^K.ZP.rotrBH(r,n,39),_=K.ZP.rotrSL(r,n,28)^K.ZP.rotrBL(r,n,34)^K.ZP.rotrBL(r,n,39),S=r&i^r&s^i&s,M=n&o^n&a^o&a;g=0|p,v=0|m,p=0|d,m=0|f,d=0|h,f=0|c,({h:h,l:c}=K.ZP.add(0|u,0|l,0|E,0|x)),u=0|s,l=0|a,s=0|i,a=0|o,i=0|r,o=0|n;let C=K.ZP.add3L(x,_,M);r=K.ZP.add3H(C,E,k,S),n=0|C}({h:r,l:n}=K.ZP.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=K.ZP.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=K.ZP.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:u,l:l}=K.ZP.add(0|this.Dh,0|this.Dl,0|u,0|l)),({h:h,l:c}=K.ZP.add(0|this.Eh,0|this.El,0|h,0|c)),({h:d,l:f}=K.ZP.add(0|this.Fh,0|this.Fl,0|d,0|f)),({h:p,l:m}=K.ZP.add(0|this.Gh,0|this.Gl,0|p,0|m)),({h:g,l:v}=K.ZP.add(0|this.Hh,0|this.Hl,0|g,0|v)),this.set(r,n,i,o,s,a,u,l,h,c,d,f,p,m,g,v)}roundClean(){Z.fill(0),V.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)}}class W extends J{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class X extends J{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class $ extends J{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}}let tt=(0,R.hE)(()=>new J);function te(t,e,r,n,i){if(!["sha256","sha512"].includes(i))throw Error("Only sha256 and sha512 are supported");return(0,k.XB)(t),(0,k.XB)(e),O("sha256"===i?q:tt,t,e,{c:r,dkLen:n})}(0,R.hE)(()=>new W),(0,R.hE)(()=>new X),(0,R.hE)(()=>new $);let tr=(t,e)=>t<>>32-e;function tn(t,e,r,n,i,o){let s=t[e++]^r[n++],a=t[e++]^r[n++],u=t[e++]^r[n++],l=t[e++]^r[n++],h=t[e++]^r[n++],c=t[e++]^r[n++],d=t[e++]^r[n++],f=t[e++]^r[n++],p=t[e++]^r[n++],m=t[e++]^r[n++],g=t[e++]^r[n++],v=t[e++]^r[n++],y=t[e++]^r[n++],b=t[e++]^r[n++],w=t[e++]^r[n++],A=t[e++]^r[n++],E=s,x=a,k=u,_=l,S=h,M=c,C=d,P=f,I=p,B=m,R=g,T=v,N=y,O=b,D=w,L=A;for(let t=0;t<8;t+=2)S^=tr(E+N|0,7),I^=tr(S+E|0,9),N^=tr(I+S|0,13),E^=tr(N+I|0,18),B^=tr(M+x|0,7),O^=tr(B+M|0,9),x^=tr(O+B|0,13),M^=tr(x+O|0,18),D^=tr(R+C|0,7),k^=tr(D+R|0,9),C^=tr(k+D|0,13),R^=tr(C+k|0,18),_^=tr(L+T|0,7),P^=tr(_+L|0,9),T^=tr(P+_|0,13),L^=tr(T+P|0,18),x^=tr(E+_|0,7),k^=tr(x+E|0,9),_^=tr(k+x|0,13),E^=tr(_+k|0,18),C^=tr(M+S|0,7),P^=tr(C+M|0,9),S^=tr(P+C|0,13),M^=tr(S+P|0,18),T^=tr(R+B|0,7),I^=tr(T+R|0,9),B^=tr(I+T|0,13),R^=tr(B+I|0,18),N^=tr(L+D|0,7),O^=tr(N+L|0,9),D^=tr(O+N|0,13),L^=tr(D+O|0,18);i[o++]=s+E|0,i[o++]=a+x|0,i[o++]=u+k|0,i[o++]=l+_|0,i[o++]=h+S|0,i[o++]=c+M|0,i[o++]=d+C|0,i[o++]=f+P|0,i[o++]=p+I|0,i[o++]=m+B|0,i[o++]=g+R|0,i[o++]=v+T|0,i[o++]=y+N|0,i[o++]=b+O|0,i[o++]=w+D|0,i[o++]=A+L|0}function ti(t,e,r,n,i){let o=n+0,s=n+16*i;for(let n=0;n<16;n++)r[s+n]=t[e+(2*i-1)*16+n];for(let n=0;n0&&(s+=16),tn(r,o,t,e+=16,r,s)}function to(t,e,r,n,i,o,s){return(0,k.XB)(t),(0,k.XB)(e),function(t,e,r){let{N:n,r:i,p:o,dkLen:s,blockSize32:a,V:u,B32:l,B:h,tmp:c,blockMixCb:d}=function(t,e,r){let n=(0,R.U5)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:o,p:s,dkLen:a,asyncTick:u,maxmem:l,onProgress:h}=n;if(B.ZP.number(i),B.ZP.number(o),B.ZP.number(s),B.ZP.number(a),B.ZP.number(u),B.ZP.number(l),void 0!==h&&"function"!=typeof h)throw Error("progressCb should be function");let c=128*o;if(i<=1||(i&i-1)!=0||i>=2**(c/8)||i>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(s<0||s>(4294967296-1)*32/c)throw Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(4294967296-1)*32)throw Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let d=c*(i+s);if(d>l)throw Error(`Scrypt: parameters too large, ${d} (128 * r * (N + p)) > ${l} (maxmem)`);let f=O(q,t,e,{c:1,dkLen:c*s}),p=(0,R.Jq)(f),m=(0,R.Jq)(new Uint8Array(c*i)),g=(0,R.Jq)(new Uint8Array(c)),v=()=>{};if(h){let t=2*i*s,e=Math.max(Math.floor(t/1e4),1),r=0;v=()=>{r++,h&&(!(r%e)||r===t)&&h(r/t)}}return{N:i,r:o,p:s,dkLen:a,blockSize32:c/4,V:m,B32:p,B:f,tmp:g,blockMixCb:v,asyncTick:u}}(t,e,r);for(let t=0;tt instanceof Uint8Array,td=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function tf(t){if(!tc(t))throw Error("Uint8Array expected");let e="";for(let r=0;rt+e.length,0)),r=0;return t.forEach(t=>{if(!tc(t))throw Error("Uint8Array expected");e.set(t,r),r+=t.length}),e}function tk(t,e){if(t.length!==e.length)return!1;for(let r=0;rtu;t>>=tl,e+=1);return e}function tM(t,e){return t>>BigInt(e)&tl}let tC=(t,e,r)=>t|(r?tl:tu)<(th<new Uint8Array(t),tB=t=>Uint8Array.from(t);function tR(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=tI(t),i=tI(t),o=0,s=()=>{n.fill(1),i.fill(0),o=0},a=(...t)=>r(i,n,...t),u=(t=tI())=>{i=a(tB([0]),t),n=a(),0!==t.length&&(i=a(tB([1]),t),n=a())},l=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t{let r;for(s(),u(t);!(r=e(l()));)u();return s(),r};return h}let tT={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function tN(t,e,r={}){let n=(e,r,n)=>{let i=tT[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let tO=BigInt(0),tD=BigInt(1),tL=BigInt(2),tF=BigInt(3),tU=BigInt(4),tH=BigInt(5),tG=BigInt(8);function tj(t,e){let r=t%e;return r>=tO?r:e+r}function tz(t,e,r){let n=t;for(;e-- >tO;)n*=n,n%=r;return n}function tq(t,e){if(t===tO||e<=tO)throw Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=tj(t,e),n=e,i=tO,o=tD,s=tD,a=tO;for(;r!==tO;){let t=n/r,e=n%r,u=i-s*t,l=o-a*t;n=r,r=e,i=s,o=a,s=u,a=l}let u=n;if(u!==tD)throw Error("invert: does not exist");return tj(i,e)}BigInt(9),BigInt(16);let tK=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function tQ(t,e){let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let tY=BigInt(0),tZ=BigInt(1);function tV(t){return!function(t){let e=tK.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});tN(t,e)}(t.Fp),tN(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...tQ(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}let{bytesToNumberBE:tJ,hexToBytes:tW}=v,tX={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){let{Err:e}=tX;if(t.length<2||2!==t[0])throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(128&n[0])throw new e("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new e("Invalid signature integer: unnecessary leading zero");return{d:tJ(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=tX,r="string"==typeof t?tW(t):t;if(!(r instanceof Uint8Array))throw Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:i,l:o}=tX._parseInt(r.subarray(2)),{d:s,l:a}=tX._parseInt(o);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){let e=t=>8&Number.parseInt(t[0],16)?"00"+t:t,r=t=>{let e=t.toString(16);return 1&e.length?`0${e}`:e},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}},t$=BigInt(0),t0=BigInt(1),t1=(BigInt(2),BigInt(3));BigInt(4);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let t2=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),t3=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t6=BigInt(1),t4=BigInt(2),t5=(t,e)=>(t+e/t4)/e,t8=function(t,e,r=!1,n={}){if(t<=tO)throw Error(`Expected Fp ORDER > 0, got ${t}`);let{nBitLength:i,nByteLength:o}=tQ(t,e);if(o>2048)throw Error("Field lengths over 2048 bytes are not supported");let s=function(t){if(t%tU===tF){let e=(t+tD)/tU;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}if(t%tG===tH){let e=(t-tH)/tG;return function(t,r){let n=t.mul(r,tL),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,tL),i),a=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(a),r))throw Error("Cannot find square root");return a}}return function(t){let e,r,n;let i=(t-tD)/tL;for(e=t-tD,r=0;e%tL===tO;e/=tL,r++);for(n=tL;n 0");if(r===tD)return tO;let n=tD;for(;e>tO;)e&tD&&(n=n*t%r),t=t*t%r,e>>=tD;return n}(n,i,t)!==t-tD;n++);if(1===r){let e=(t+tD)/tU;return function(t,r){let n=t.pow(r,e);if(!t.eql(t.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(e+tD)/tL;return function(t,s){if(t.pow(s,i)===t.neg(t.ONE))throw Error("Cannot find square root");let a=r,u=t.pow(t.mul(t.ONE,n),e),l=t.pow(s,o),h=t.pow(s,e);for(;!t.eql(h,t.ONE);){if(t.eql(h,t.ZERO))return t.ZERO;let e=1;for(let r=t.sqr(h);etj(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error(`Invalid field element: expected bigint, got ${typeof e}`);return tO<=e&&et===tO,isOdd:t=>(t&tD)===tD,neg:e=>tj(-e,t),eql:(t,e)=>t===e,sqr:e=>tj(e*e,t),add:(e,r)=>tj(e+r,t),sub:(e,r)=>tj(e-r,t),mul:(e,r)=>tj(e*r,t),pow:(t,e)=>(function(t,e,r){if(r 0");if(r===tO)return t.ONE;if(r===tD)return e;let n=t.ONE,i=e;for(;r>tO;)r&tD&&(n=t.mul(n,i)),i=t.sqr(i),r>>=tD;return n})(a,t,e),div:(e,r)=>tj(e*tq(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>tq(e,t),sqrt:n.sqrt||(t=>s(a,t)),invertBatch:t=>(function(t,e){let r=Array(e.length),n=e.reduce((e,n,i)=>t.is0(n)?e:(r[i]=e,t.mul(e,n)),t.ONE),i=t.inv(n);return e.reduceRight((e,n,i)=>t.is0(n)?e:(r[i]=t.mul(e,r[i]),t.mul(e,n)),i),r})(a,t),cmov:(t,e,r)=>r?e:t,toBytes:t=>r?tw(t,o):tb(t,o),fromBytes:t=>{if(t.length!==o)throw Error(`Fp.fromBytes: expected ${o}, got ${t.length}`);return r?ty(t):tv(t)}});return Object.freeze(a)}(t2,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),u=t*t*t%t2,l=u*u*t%t2,h=tz(l,e,t2)*l%t2,c=tz(h,e,t2)*l%t2,d=tz(c,t4,t2)*u%t2,f=tz(d,n,t2)*d%t2,p=tz(f,i,t2)*f%t2,m=tz(p,s,t2)*p%t2,g=tz(m,a,t2)*m%t2,v=tz(g,s,t2)*p%t2,y=tz(v,e,t2)*l%t2,b=tz(y,o,t2)*f%t2,w=tz(b,r,t2)*u%t2,A=tz(w,t4,t2);if(!t8.eql(t8.sqr(A),t))throw Error("Cannot find square root");return A}}),t7=function(t,e){let r=e=>(function(t){let e=function(t){let e=tV(t);return tN(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(t){return tj(t,n)}let{ProjectivePoint:a,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:h}=function(t){let e=/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function(t){let e=tV(t);tN(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}(t),{Fp:r}=e,n=e.toBytes||((t,e,n)=>{let i=e.toAffine();return tx(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),i=e.fromBytes||(t=>{let e=t.subarray(1),n=r.fromBytes(e.subarray(0,r.BYTES)),i=r.fromBytes(e.subarray(r.BYTES,2*r.BYTES));return{x:n,y:i}});function o(t){let{a:n,b:i}=e,o=r.sqr(t),s=r.mul(o,t);return r.add(r.add(s,r.mul(t,n)),i)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw Error("bad generator point: equation left != right");function s(t){return"bigint"==typeof t&&t$r.eql(t,r.ZERO);return i(e)&&i(n)?c.ZERO:new c(e,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(c.fromAffine)}static fromHex(t){let e=c.fromAffine(i(tE("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return c.BASE.multiply(u(t))}_setWindowSize(t){this._WINDOW_SIZE=t,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint)return;throw Error("bad point: ZERO")}let{x:t,y:n}=this.toAffine();if(!r.isValid(t)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),s=o(t);if(!r.eql(i,s))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:t}=this.toAffine();if(r.isOdd)return!r.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){h(t);let{px:e,py:n,pz:i}=this,{px:o,py:s,pz:a}=t,u=r.eql(r.mul(e,a),r.mul(o,i)),l=r.eql(r.mul(n,a),r.mul(s,i));return u&&l}negate(){return new c(this.px,r.neg(this.py),this.pz)}double(){let{a:t,b:n}=e,i=r.mul(n,t1),{px:o,py:s,pz:a}=this,u=r.ZERO,l=r.ZERO,h=r.ZERO,d=r.mul(o,o),f=r.mul(s,s),p=r.mul(a,a),m=r.mul(o,s);return m=r.add(m,m),h=r.mul(o,a),h=r.add(h,h),u=r.mul(t,h),l=r.mul(i,p),l=r.add(u,l),u=r.sub(f,l),l=r.add(f,l),l=r.mul(u,l),u=r.mul(m,u),h=r.mul(i,h),p=r.mul(t,p),m=r.sub(d,p),m=r.mul(t,m),m=r.add(m,h),h=r.add(d,d),d=r.add(h,d),d=r.add(d,p),d=r.mul(d,m),l=r.add(l,d),p=r.mul(s,a),p=r.add(p,p),d=r.mul(p,m),u=r.sub(u,d),h=r.mul(p,f),h=r.add(h,h),h=r.add(h,h),new c(u,l,h)}add(t){h(t);let{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t,l=r.ZERO,d=r.ZERO,f=r.ZERO,p=e.a,m=r.mul(e.b,t1),g=r.mul(n,s),v=r.mul(i,a),y=r.mul(o,u),b=r.add(n,i),w=r.add(s,a);b=r.mul(b,w),w=r.add(g,v),b=r.sub(b,w),w=r.add(n,o);let A=r.add(s,u);return w=r.mul(w,A),A=r.add(g,y),w=r.sub(w,A),A=r.add(i,o),l=r.add(a,u),A=r.mul(A,l),l=r.add(v,y),A=r.sub(A,l),f=r.mul(p,w),l=r.mul(m,y),f=r.add(l,f),l=r.sub(v,f),f=r.add(v,f),d=r.mul(l,f),v=r.add(g,g),v=r.add(v,g),y=r.mul(p,y),w=r.mul(m,w),v=r.add(v,y),y=r.sub(g,y),y=r.mul(p,y),w=r.add(w,y),g=r.mul(v,w),d=r.add(d,g),g=r.mul(A,w),l=r.mul(b,l),l=r.sub(l,g),g=r.mul(b,v),f=r.mul(A,f),f=r.add(f,g),new c(l,d,f)}subtract(t){return this.add(t.negate())}is0(){return this.equals(c.ZERO)}wNAF(t){return f.wNAFCached(this,l,t,t=>{let e=r.invertBatch(t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(c.fromAffine)})}multiplyUnsafe(t){let n=c.ZERO;if(t===t$)return n;if(a(t),t===t0)return this;let{endo:i}=e;if(!i)return f.unsafeLadder(this,t);let{k1neg:o,k1:s,k2neg:u,k2:l}=i.splitScalar(t),h=n,d=n,p=this;for(;s>t$||l>t$;)s&t0&&(h=h.add(p)),l&t0&&(d=d.add(p)),p=p.double(),s>>=t0,l>>=t0;return o&&(h=h.negate()),u&&(d=d.negate()),d=new c(r.mul(d.px,i.beta),d.py,d.pz),h.add(d)}multiply(t){let n,i;a(t);let{endo:o}=e;if(o){let{k1neg:e,k1:s,k2neg:a,k2:u}=o.splitScalar(t),{p:l,f:h}=this.wNAF(s),{p:d,f:p}=this.wNAF(u);l=f.constTimeNegate(e,l),d=f.constTimeNegate(a,d),d=new c(r.mul(d.px,o.beta),d.py,d.pz),n=l.add(d),i=h.add(p)}else{let{p:e,f:r}=this.wNAF(t);n=e,i=r}return c.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=c.BASE,i=(t,e)=>e!==t$&&e!==t0&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){let{px:e,py:n,pz:i}=this,o=this.is0();null==t&&(t=o?r.ONE:r.inv(i));let s=r.mul(e,t),a=r.mul(n,t),u=r.mul(i,t);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){let{h:t,isTorsionFree:r}=e;if(t===t0)return!0;if(r)return r(c,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:r}=e;return t===t0?this:r?r(c,this):this.multiplyUnsafe(e.h)}toRawBytes(t=!0){return this.assertValidity(),n(c,this,t)}toHex(t=!0){return tf(this.toRawBytes(t))}}c.BASE=new c(e.Gx,e.Gy,r.ONE),c.ZERO=new c(r.ZERO,r.ONE,r.ZERO);let d=e.nBitLength,f=function(t,e){let r=(t,e)=>{let r=e.negate();return t?r:e},n=t=>({windows:Math.ceil(e/t)+1,windowSize:2**(t-1)});return{constTimeNegate:r,unsafeLadder(e,r){let n=t.ZERO,i=e;for(;r>tY;)r&tZ&&(n=n.add(i)),i=i.double(),r>>=tZ;return n},precomputeWindow(t,e){let{windows:r,windowSize:i}=n(e),o=[],s=t,a=s;for(let t=0;t>=d,n>a&&(n-=c,o+=tZ);let s=e+Math.abs(n)-1,f=t%2!=0,p=n<0;0===n?l=l.add(r(f,i[e])):u=u.add(r(p,i[s]))}return{p:u,f:l}},wNAFCached(t,e,r,n){let i=t._WINDOW_SIZE||1,o=e.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&e.set(t,n(o))),this.wNAF(i,o,r)}}}(c,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:o,isWithinCurveOrder:s}}({...e,toBytes(t,e,n){let i=e.toAffine(),o=r.toBytes(i.x),s=tx;return n?s(Uint8Array.from([e.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(t){let e=t.length,n=t[0],s=t.subarray(1);if(e===i&&(2===n||3===n)){let t=tv(s);if(!(t$tf(tb(t,e.nByteLength)),d=(t,e,r)=>tv(t.slice(e,r));class f{constructor(t,e,r){this.r=t,this.s=e,this.recovery=r,this.assertValidity()}static fromCompact(t){let r=e.nByteLength;return t=tE("compactSignature",t,2*r),new f(d(t,0,r),d(t,r,2*r))}static fromDER(t){let{r:e,s:r}=tX.toSig(tE("DER",t));return new f(e,r)}assertValidity(){if(!h(this.r))throw Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new f(this.r,this.s,t)}recoverPublicKey(t){let{r:i,s:o,recovery:u}=this,l=g(tE("msgHash",t));if(null==u||![0,1,2,3].includes(u))throw Error("recovery id invalid");let h=2===u||3===u?i+e.n:i;if(h>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let d=a.fromHex(((1&u)==0?"02":"03")+c(h)),f=tq(h,n),p=s(-l*f),m=s(o*f),v=a.BASE.multiplyAndAddUnsafe(d,p,m);if(!v)throw Error("point at infinify");return v.assertValidity(),v}hasHighS(){return this.s>n>>t0}normalizeS(){return this.hasHighS()?new f(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return tg(this.toDERHex())}toDERHex(){return tX.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return tg(this.toCompactHex())}toCompactHex(){return c(this.r)+c(this.s)}}function p(t){let e=t instanceof Uint8Array,r="string"==typeof t,n=(e||r)&&t.length;return e?n===i||n===o:r?n===2*i||n===2*o:t instanceof a}let m=e.bits2int||function(t){let r=tv(t),n=8*t.length-e.nBitLength;return n>0?r>>BigInt(n):r},g=e.bits2int_modN||function(t){return s(m(t))},v=tP(e.nBitLength);function y(t){if("bigint"!=typeof t)throw Error("bigint expected");if(!(t$<=t&&tt in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:c}=e,{lowS:d,prehash:p,extraEntropy:v}=o;null==d&&(d=!0),t=tE("msgHash",t),p&&(t=tE("prehashed msgHash",l(t)));let w=g(t),A=u(i),E=[y(A),y(w)];if(null!=v){let t=!0===v?c(r.BYTES):v;E.push(tE("extraEntropy",t,r.BYTES))}let x=tx(...E);return{seed:x,k2sig:function(t){let e=m(t);if(!h(e))return;let r=tq(e,n),i=a.BASE.multiply(e).toAffine(),o=s(i.x);if(o===t$)return;let u=s(r*s(w+o*A));if(u===t$)return;let l=(i.x===o?0:2)|Number(i.y&t0),c=u;if(d&&u>n>>t0)c=u>n>>t0?s(-u):u,l^=1;return new f(o,c,l)}}}(t,i,o),d=tR(e.hash.outputLen,e.nByteLength,e.hmac);return d(l,c)},verify:function(t,r,i,o=w){let u,l;if(r=tE("msgHash",r),i=tE("publicKey",i),"strict"in o)throw Error("options.strict was renamed to lowS");let{lowS:h,prehash:c}=o;try{if("string"==typeof t||t instanceof Uint8Array)try{l=f.fromDER(t)}catch(e){if(!(e instanceof tX.Err))throw e;l=f.fromCompact(t)}else if("object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s){let{r:e,s:r}=t;l=new f(e,r)}else throw Error("PARSE");u=a.fromHex(i)}catch(t){if("PARSE"===t.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(h&&l.hasHighS())return!1;c&&(r=e.hash(r));let{r:d,s:p}=l,m=g(r),v=tq(p,n),y=s(m*v),b=s(d*v),A=a.BASE.multiplyAndAddUnsafe(u,y,b)?.toAffine();if(!A)return!1;let E=s(A.x);return E===d},ProjectivePoint:a,Signature:f,utils:{isValidPrivateKey(t){try{return u(t),!0}catch(t){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let t=e.randomBytes(r.BYTES+8),i=function(t,e,r=!1){t=tE("privateHash",t);let n=t.length,i=tQ(e).nByteLength+8;if(i<24||n1024)throw Error(`hashToPrivateScalar: expected ${i}-1024 bytes of input, got ${n}`);let o=r?ty(t):tv(t);return tj(o,e-tD)+tD}(t,n);return tb(i,e.nByteLength)},precompute:(t=8,e=a.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>N(e,t,(0,R.eV)(...r)),randomBytes:R.O6});return Object.freeze({...r(e),create:r})}({a:BigInt(0),b:BigInt(7),Fp:t8,n:t3,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-t6*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=t5(e*t,t3),s=t5(-r*t,t3),a=tj(t-o*e-s*n,t3),u=tj(-o*r-s*e,t3),l=a>i,h=u>i;if(l&&(a=t3-a),h&&(u=t3-u),a>i||u>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:a,k2neg:h,k2:u}}}},q),t9=(BigInt(0),t7.ProjectivePoint,null!=t7?t7:y),et=BigInt("0xffffffffffffffff"),ee=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),er=t9.CURVE.n,en=er/BigInt(2),ei={type:"object",required:["crypto","id","version","address"],properties:{crypto:{type:"object",required:["cipher","ciphertext","cipherparams","kdf","kdfparams","mac"],properties:{cipher:{type:"string"},ciphertext:{type:"string"},cipherparams:{type:"object"},kdf:{type:"string"},kdfparams:{type:"object"},salt:{type:"string"},mac:{type:"string"}}},id:{type:"string"},version:{type:"number"},address:{type:"string"}}};(n=h||(h={}))[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Sepolia=11155111]="Sepolia",(i=c||(c={})).Chainstart="chainstart",i.Homestead="homestead",i.Dao="dao",i.TangerineWhistle="tangerineWhistle",i.SpuriousDragon="spuriousDragon",i.Byzantium="byzantium",i.Constantinople="constantinople",i.Petersburg="petersburg",i.Istanbul="istanbul",i.MuirGlacier="muirGlacier",i.Berlin="berlin",i.London="london",i.ArrowGlacier="arrowGlacier",i.GrayGlacier="grayGlacier",i.MergeForkIdTransition="mergeForkIdTransition",i.Merge="merge",i.Shanghai="shanghai",i.ShardingForkDev="shardingFork",(o=d||(d={})).ProofOfStake="pos",o.ProofOfWork="pow",o.ProofOfAuthority="poa",(s=f||(f={})).Ethash="ethash",s.Clique="clique",s.Casper="casper",(a=p||(p={})).PolygonMainnet="polygon-mainnet",a.PolygonMumbai="polygon-mumbai",a.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",a.ArbitrumOne="arbitrum-one",a.xDaiChain="x-dai-chain",a.OptimisticKovan="optimistic-kovan",a.OptimisticEthereum="optimistic-ethereum",(u=m||(m={}))[u.Number=0]="Number",u[u.BigInt=1]="BigInt",u[u.Uint8Array=2]="Uint8Array",u[u.PrefixedHexString=3]="PrefixedHexString";let eo=t=>{if("string"!=typeof t)throw Error(`[stripHexPrefix] input must be type 'string', received ${typeof t}`);return(0,w.Lo)(t)?t.slice(2):t},es=function(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};function ea(t){let e=t;if("string"!=typeof e)throw Error(`[padToEven] value must be type 'string', received ${typeof e}`);return e.length%2&&(e=`0${e}`),e}let eu=function(t){let e=es(t);return(0,ta.hexToBytes)(`0x${ea(e.slice(2))}`)},el=function(t){if(null==t)return new Uint8Array;if(t instanceof Uint8Array)return t;if(Array.isArray(t))return Uint8Array.from(t);if("string"==typeof t){if(!(0,w.A7)(t))throw Error(`Cannot convert string to Uint8Array. only supports 0x-prefixed hex strings and this string was given: ${t}`);return(0,ta.hexToBytes)(ea(eo(t)))}if("number"==typeof t)return el((0,ta.numberToHex)(t));if("bigint"==typeof t){if(t0&&"0"===e.toString();)e=(t=t.slice(1))[0];return t}(t)},eg=t=>`0x${t.toString(16)}`;function ev(t){return em(el(`0x${t.toString(16)}`))}let ey=function(t,e,r,n,i){let o=e===BigInt(0)||e===BigInt(1)?e:void 0===i?e-BigInt(27):e-(i*BigInt(2)+BigInt(35));if(!(o===BigInt(0)||o===BigInt(1)))throw Error("Invalid signature v value");let s=new t9.Signature(eh(r),eh(n)).addRecoveryBit(Number(o)).recoverPublicKey(t).toRawBytes(!1);return s.slice(1)};function eb(t,e){if(null===t)return null;if(void 0===t)return;if("string"!=typeof t||(0,w.A7)(t)){if("number"==typeof t&&!Number.isSafeInteger(t))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)")}else throw Error(`A string must be provided with a 0x-prefix, given: ${t}`);let r=el(t);switch(e){case m.Uint8Array:return r;case m.BigInt:return eh(r);case m.Number:{let t=eh(r);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(t)}case m.PrefixedHexString:return(0,ta.bytesToHex)(r);default:throw Error("unknown outputType")}}var ew=r(1742),eA=r(2671),eE=r(3722),ex=r(8326),ek={name:"goerli",chainId:5,networkId:5,defaultHardfork:"merge",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818",name:"merge",ttd:"10790000",block:7382819,forkHash:"0xb8c6299d"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]},e_={name:"mainnet",chainId:1,networkId:1,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393",name:"merge",ttd:"58750000000000000000000",block:15537394,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]},eS={name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{timestamp:"0x6159af19",gasLimit:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408",name:"merge",ttd:"17000000000000000",block:1450409,forkHash:"0xfe3366e7"},{name:"mergeForkIdTransition",block:1735371,forkHash:"0xb96cbd13"},{name:"shanghai",block:null,timestamp:"1677557088",forkHash:"0xf7f9bc08"}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]};let eM={1153:{name:"EIP-1153",number:1153,comment:"Transient Storage",url:"https://eips.ethereum.org/EIPS/eip-1153",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}},vm:{},pow:{}},1559:{name:"EIP-1559",number:1559,comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}},gasPrices:{},vm:{},pow:{}},2315:{name:"EIP-2315",number:2315,comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:"Draft",minimumHardfork:"istanbul",gasConfig:{},gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}},vm:{},pow:{}},2537:{name:"EIP-2537",number:2537,comment:"BLS12-381 precompiles",url:"https://eips.ethereum.org/EIPS/eip-2537",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{Bls12381G1AddGas:{v:600,d:"Gas cost of a single BLS12-381 G1 addition precompile-call"},Bls12381G1MulGas:{v:12e3,d:"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},Bls12381G2AddGas:{v:4500,d:"Gas cost of a single BLS12-381 G2 addition precompile-call"},Bls12381G2MulGas:{v:55e3,d:"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},Bls12381PairingBaseGas:{v:115e3,d:"Base gas cost of BLS12-381 pairing check"},Bls12381PairingPerPairGas:{v:23e3,d:"Per-pair gas cost of BLS12-381 pairing check"},Bls12381MapG1Gas:{v:5500,d:"Gas cost of BLS12-381 map field element to G1"},Bls12381MapG2Gas:{v:11e4,d:"Gas cost of BLS12-381 map field element to G2"},Bls12381MultiExpGasDiscount:{v:[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],d:"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},vm:{},pow:{}},2565:{name:"EIP-2565",number:2565,comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:"Final",minimumHardfork:"byzantium",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}},vm:{},pow:{}},2718:{name:"EIP-2718",comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{},vm:{},pow:{}},2929:{name:"EIP-2929",comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}},vm:{},pow:{}},2930:{name:"EIP-2930",comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:"Final",minimumHardfork:"istanbul",requiredEIPs:[2718,2929],gasConfig:{},gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}},vm:{},pow:{}},3198:{name:"EIP-3198",number:3198,comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}},vm:{},pow:{}},3529:{name:"EIP-3529",comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}},vm:{},pow:{}},3540:{name:"EIP-3540",number:3540,comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:"Review",minimumHardfork:"london",requiredEIPs:[3541],gasConfig:{},gasPrices:{},vm:{},pow:{}},3541:{name:"EIP-3541",comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:"Final",minimumHardfork:"berlin",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3554:{name:"EIP-3554",comment:"Reduction in refunds",url:"Difficulty Bomb Delay to December 1st 2021",status:"Final",minimumHardfork:"muirGlacier",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}},3607:{name:"EIP-3607",number:3607,comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:"Final",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3651:{name:"EIP-3651",number:3198,comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:"Review",minimumHardfork:"london",requiredEIPs:[2929],gasConfig:{},gasPrices:{},vm:{},pow:{}},3670:{name:"EIP-3670",number:3670,comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:"london",requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}},3675:{name:"EIP-3675",number:3675,comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Final",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},3855:{name:"EIP-3855",number:3855,comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}},vm:{},pow:{}},3860:{name:"EIP-3860",number:3860,comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:"Review",minimumHardfork:"spuriousDragon",requiredEIPs:[],gasConfig:{},gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}},pow:{}},4345:{name:"EIP-4345",number:4345,comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}},4399:{name:"EIP-4399",number:4399,comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:"Review",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},5133:{name:"EIP-5133",number:5133,comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:"Draft",minimumHardfork:"grayGlacier",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}}},eC={chainstart:{name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:"",gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},tierStep:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},sha3:{v:30,d:"Base fee of the SHA3 opcode"},sha3Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}},homestead:{name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:"Final",gasConfig:{},gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}},vm:{},pow:{}},dao:{name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{}},tangerineWhistle:{name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:"Final",gasConfig:{},gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{},pow:{}},spuriousDragon:{name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:"Final",gasConfig:{},gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}},pow:{}},byzantium:{name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:"Final",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},vm:{},pow:{minerReward:{v:"3000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}},constantinople:{name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},vm:{},pow:{minerReward:{v:"2000000000000000000",d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}},petersburg:{name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}},vm:{},pow:{}},istanbul:{name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:"Final",gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"},sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}},vm:{},pow:{}},muirGlacier:{name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}},berlin:{name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:"Final",eips:[2565,2929,2718,2930]},london:{name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:"Final",eips:[1559,3198,3529,3541]},shanghai:{name:"shanghai",comment:"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md",status:"Final",eips:[3651,3855,3860,4895]},arrowGlacier:{name:"arrowGlacier",comment:"HF to delay the difficulty bomb",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md",status:"Final",eips:[4345],gasConfig:{},gasPrices:{},vm:{},pow:{}},grayGlacier:{name:"grayGlacier",comment:"Delaying the difficulty bomb to Mid September 2022",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md",status:"Draft",eips:[5133],gasConfig:{},gasPrices:{},vm:{},pow:{}},mergeForkIdTransition:{name:"mergeForkIdTransition",comment:"Pre-merge hardfork to fork off non-upgraded clients",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Draft",eips:[]},merge:{name:"merge",comment:"Hardfork to upgrade the consensus mechanism to Proof-of-Stake",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md",status:"Final",consensus:{type:"pos",algorithm:"casper",casper:{}},eips:[3675,4399]}},{buf:eP}=eE;class eI extends ex.EventEmitter{constructor(t){var e,r;super(),this._eips=[],this._customChains=null!==(e=t.customChains)&&void 0!==e?e:[],this._chainParams=this.setChain(t.chain),this.DEFAULT_HARDFORK=null!==(r=this._chainParams.defaultHardfork)&&void 0!==r?r:c.Merge,this.HARDFORK_CHANGES=this.hardforks().map(t=>[t.name,eC[t.name]]),this._hardfork=this.DEFAULT_HARDFORK,void 0!==t.hardfork&&this.setHardfork(t.hardfork),t.eips&&this.setEIPs(t.eips)}static custom(t,e={}){var r;let n=null!==(r=e.baseChain)&&void 0!==r?r:"mainnet",i=Object.assign({},eI._getChainParams(n));if(i.name="custom-chain","string"!=typeof t)return new eI(Object.assign({chain:Object.assign(Object.assign({},i),t)},e));if(t===p.PolygonMainnet)return eI.custom({name:p.PolygonMainnet,chainId:137,networkId:137},e);if(t===p.PolygonMumbai)return eI.custom({name:p.PolygonMumbai,chainId:80001,networkId:80001},e);if(t===p.ArbitrumRinkebyTestnet)return eI.custom({name:p.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},e);if(t===p.ArbitrumOne)return eI.custom({name:p.ArbitrumOne,chainId:42161,networkId:42161},e);if(t===p.xDaiChain)return eI.custom({name:p.xDaiChain,chainId:100,networkId:100},e);if(t===p.OptimisticKovan)return eI.custom({name:p.OptimisticKovan,chainId:69,networkId:69},Object.assign({hardfork:c.Berlin},e));if(t===p.OptimisticEthereum)return eI.custom({name:p.OptimisticEthereum,chainId:10,networkId:10},Object.assign({hardfork:c.Berlin},e));throw Error(`Custom chain ${t} not supported`)}static fromGethGenesis(t,{chain:e,eips:r,genesisHash:n,hardfork:i,mergeForkIdPostMerge:o}){var s;let a=function(t,e,r){try{if(["config","difficulty","gasLimit","alloc"].some(e=>!(e in t)))throw Error("Invalid format, expected geth genesis fields missing");return void 0!==e&&(t.name=e),function(t,e=!0){var r,n,i;let{name:o,config:s,difficulty:a,mixHash:u,gasLimit:l,coinbase:h,baseFeePerGas:d}=t,{extraData:f,timestamp:p,nonce:m}=t,g=Number(p),{chainId:v}=s;if(""===f&&(f="0x"),(0,w.Lo)(p)||(p=es(parseInt(p))),18!==m.length&&(m=(i=m)&&"0x0"!==i?(0,w.Lo)(i)?`0x${eo(i).padStart(16,"0")}`:`0x${i.padStart(16,"0")}`:"0x0000000000000000"),s.eip155Block!==s.eip158Block)throw Error("EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork");let y={name:o,chainId:v,networkId:v,genesis:{timestamp:p,gasLimit:parseInt(l),difficulty:parseInt(a),nonce:m,extraData:f,mixHash:u,coinbase:h,baseFeePerGas:d},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:void 0!==s.clique?{type:"poa",algorithm:"clique",clique:{period:null!==(r=s.clique.period)&&void 0!==r?r:s.clique.blockperiodseconds,epoch:null!==(n=s.clique.epoch)&&void 0!==n?n:s.clique.epochlength}}:{type:"pow",algorithm:"ethash",ethash:{}}},b={[c.Homestead]:{name:"homesteadBlock"},[c.Dao]:{name:"daoForkBlock"},[c.TangerineWhistle]:{name:"eip150Block"},[c.SpuriousDragon]:{name:"eip155Block"},[c.Byzantium]:{name:"byzantiumBlock"},[c.Constantinople]:{name:"constantinopleBlock"},[c.Petersburg]:{name:"petersburgBlock"},[c.Istanbul]:{name:"istanbulBlock"},[c.MuirGlacier]:{name:"muirGlacierBlock"},[c.Berlin]:{name:"berlinBlock"},[c.London]:{name:"londonBlock"},[c.MergeForkIdTransition]:{name:"mergeForkBlock",postMerge:e},[c.Shanghai]:{name:"shanghaiTime",postMerge:!0,isTimestamp:!0},[c.ShardingForkDev]:{name:"shardingForkTime",postMerge:!0,isTimestamp:!0}},A=Object.keys(b).reduce((t,e)=>(t[b[e].name]=e,t),{}),E=Object.keys(s).filter(t=>void 0!==A[t]&&void 0!==s[t]&&null!==s[t]);if(y.hardforks=E.map(t=>({name:A[t],block:!0===b[A[t]].isTimestamp||"number"!=typeof s[t]?null:s[t],timestamp:!0===b[A[t]].isTimestamp&&"number"==typeof s[t]?s[t]:void 0})).filter(t=>null!==t.block||void 0!==t.timestamp),y.hardforks.sort((t,e)=>{var r,n;return(null!==(r=t.block)&&void 0!==r?r:1/0)-(null!==(n=e.block)&&void 0!==n?n:1/0)}),y.hardforks.sort((t,e)=>{var r,n;return(null!==(r=t.timestamp)&&void 0!==r?r:g)-(null!==(n=e.timestamp)&&void 0!==n?n:g)}),void 0!==s.terminalTotalDifficulty){let t={name:c.Merge,ttd:s.terminalTotalDifficulty,block:null},e=y.hardforks.findIndex(t=>{var e;return(null===(e=b[t.name])||void 0===e?void 0:e.postMerge)===!0});-1!==e?y.hardforks.splice(e,0,t):y.hardforks.push(t)}let x=y.hardforks.length>0?y.hardforks.slice(-1)[0]:void 0;return y.hardfork=null==x?void 0:x.name,y.hardforks.unshift({name:c.Chainstart,block:0}),y}(t,r)}catch(t){throw Error(`Error parsing parameters file: ${t.message}`)}}(t,e,o),u=new eI({chain:null!==(s=a.name)&&void 0!==s?s:"custom",customChains:[a],eips:r,hardfork:null!=i?i:a.hardfork});return void 0!==n&&u.setForkHashes(n),u}static isSupportedChainId(t){let e=this._getInitializedChains();return!!e.names[t.toString()]}static _getChainParams(t,e){let r=t,n=this._getInitializedChains(e);if("number"==typeof r||"bigint"==typeof r){if(r=r.toString(),n.names[r]){let t=n.names[r];return n[t]}throw Error(`Chain with ID ${r} not supported`)}if(void 0!==n[r])return n[r];throw Error(`Chain with name ${r} not supported`)}setChain(t){if("number"==typeof t||"bigint"==typeof t||"string"==typeof t)this._chainParams=eI._getChainParams(t,this._customChains);else if("object"==typeof t){if(this._customChains.length>0)throw Error("Chain must be a string, number, or bigint when initialized with customChains passed in");for(let e of["networkId","genesis","hardforks","bootstrapNodes"])if(!(e in t))throw Error(`Missing required chain parameter: ${e}`);this._chainParams=t}else throw Error("Wrong input format");for(let t of this.hardforks())if(void 0===t.block)throw Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(t){let e=!1;for(let r of this.HARDFORK_CHANGES)r[0]===t&&(this._hardfork!==t&&(this._hardfork=t,this.emit("hardforkChanged",t)),e=!0);if(!e)throw Error(`Hardfork with name ${t} not supported`)}getHardforkByBlockNumber(t,e,r){let n=eb(t,m.BigInt),i=eb(e,m.BigInt),o=eb(r,m.Number),s=this.hardforks().filter(t=>null!==t.block||null!==t.ttd&&void 0!==t.ttd||void 0!==t.timestamp),a=s.findIndex(t=>null!==t.ttd&&void 0!==t.ttd),u=s.slice(a+1).findIndex(t=>null!==t.ttd&&void 0!==t.ttd);if(u>=0)throw Error("More than one merge hardforks found with ttd specified");let l=s.findIndex(t=>null!==t.block&&t.block>n||void 0!==o&&Number(t.timestamp)>o);if(-1===l)l=s.length;else if(0===l)throw Error("Must have at least one hardfork at block 0");if(void 0===o){let t=s.slice(0,l).reverse().findIndex(t=>null!==t.block||void 0!==t.ttd);l-=t}if(null===s[l-=1].block&&void 0===s[l].timestamp)(null==i||BigInt(s[l].ttd)>i)&&(l-=1);else if(a>=0&&null!=i){if(l>=a&&BigInt(s[a].ttd)>i)throw Error("Maximum HF determined by total difficulty is lower than the block number HF");if(l{var r;return Math.max(Number(null!==(r=e.timestamp)&&void 0!==r?r:"0"),t)},0);if(t>o)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");let e=s.slice(l+1).reduce((t,e)=>{var r;return Math.min(Number(null!==(r=e.timestamp)&&void 0!==r?r:o),t)},o);if(e=i}activeOnBlock(t){return this.hardforkIsActiveOnBlock(null,t)}hardforkGteHardfork(t,e){let r=null!=t?t:this._hardfork,n=this.hardforks(),i=-1,o=-1,s=0;for(let t of n)t.name===r&&(i=s),t.name===e&&(o=s),s+=1;return i>=o&&-1!==o}gteHardfork(t){return this.hardforkGteHardfork(null,t)}hardforkBlock(t){var e;let r=null!=t?t:this._hardfork,n=null===(e=this._getHardfork(r))||void 0===e?void 0:e.block;return null==n?null:BigInt(n)}hardforkTimestamp(t){var e;let r=null!=t?t:this._hardfork,n=null===(e=this._getHardfork(r))||void 0===e?void 0:e.timestamp;return null==n?null:BigInt(n)}eipBlock(t){for(let e of this.HARDFORK_CHANGES){let r=e[1];if("eips"in r&&r.eips.includes(t))return this.hardforkBlock("number"==typeof e[0]?String(e[0]):e[0])}return null}hardforkTTD(t){var e;let r=null!=t?t:this._hardfork,n=null===(e=this._getHardfork(r))||void 0===e?void 0:e.ttd;return null==n?null:BigInt(n)}isHardforkBlock(t,e){let r=eb(t,m.BigInt),n=null!=e?e:this._hardfork,i=this.hardforkBlock(n);return"bigint"==typeof i&&i!==BigInt(0)&&i===r}nextHardforkBlockOrTimestamp(t){var e,r;let n=null!=t?t:this._hardfork,i=this.hardforks(),o=i.findIndex(t=>t.name===n);if(n===c.Merge&&(o-=1),o<0)return null;let s=null!==(e=i[o].timestamp)&&void 0!==e?e:i[o].block;s=null!=s?Number(s):null;let a=i.slice(o+1).find(t=>{var e;let r=null!==(e=t.timestamp)&&void 0!==e?e:t.block;return r=null!=r?Number(r):null,t.name!==c.Merge&&null!=r&&r!==s});if(void 0===a)return null;let u=null!==(r=a.timestamp)&&void 0!==r?r:a.block;return null==u?null:BigInt(u)}nextHardforkBlock(t){let e=null!=t?t:this._hardfork,r=this.hardforkBlock(e);if(null===r&&e===c.Merge){let t=this.hardforks(),e=t.findIndex(t=>null!==t.ttd&&void 0!==t.ttd);if(e<0)throw Error("Merge hardfork should have been found");r=this.hardforkBlock(t[e-1].name)}if(null===r)return null;let n=this.hardforks().reduce((t,e)=>{let n=BigInt(null===e.block||void 0!==e.ttd&&null!==e.ttd?0:e.block);return n>r&&null===t?n:t},null);return n}isNextHardforkBlock(t,e){let r=eb(t,m.BigInt),n=null!=e?e:this._hardfork,i=this.nextHardforkBlock(n);return null!==i&&i===r}_calcForkHash(t,e){let r=new Uint8Array,n=0;for(let e of this.hardforks()){let{block:i,timestamp:o,name:s}=e,a=null!=o?o:i;if("number"==typeof(a=null!==a?Number(a):null)&&0!==a&&a!==n&&s!==c.Merge){let t=(0,ta.hexToBytes)(a.toString(16).padStart(16,"0"));r=(0,ta.uint8ArrayConcat)(r,t),n=a}if(e.name===t)break}let i=(0,ta.uint8ArrayConcat)(e,r),o=(0,ta.bytesToHex)(eu(eP(i)>>>0));return o}forkHash(t,e){let r=null!=t?t:this._hardfork,n=this._getHardfork(r);if(null===n||(null==n?void 0:n.block)===null&&(null==n?void 0:n.timestamp)===void 0&&(null==n?void 0:n.ttd)===void 0)throw Error("No fork hash calculation possible for future hardfork");if((null==n?void 0:n.forkHash)!==null&&(null==n?void 0:n.forkHash)!==void 0)return n.forkHash;if(!e)throw Error("genesisHash required for forkHash calculation");return this._calcForkHash(r,e)}hardforkForForkHash(t){let e=this.hardforks().filter(e=>e.forkHash===t);return e.length>=1?e[e.length-1]:null}setForkHashes(t){var e;for(let r of this.hardforks()){let n=null!==(e=r.timestamp)&&void 0!==e?e:r.block;(null===r.forkHash||void 0===r.forkHash)&&(null!=n||void 0!==r.ttd)&&(r.forkHash=this.forkHash(r.name,t))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){let t;let e=this.hardfork();for(let r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(t=r[1].consensus.type),r[0]===e)break;return null!=t?t:this._chainParams.consensus.type}consensusAlgorithm(){let t;let e=this.hardfork();for(let r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(t=r[1].consensus.algorithm),r[0]===e)break;return null!=t?t:this._chainParams.consensus.algorithm}consensusConfig(){var t;let e;let r=this.hardfork();for(let t of this.HARDFORK_CHANGES)if("consensus"in t[1]&&(e=t[1].consensus[t[1].consensus.algorithm]),t[0]===r)break;return null!==(t=null!=e?e:this._chainParams.consensus[this.consensusAlgorithm()])&&void 0!==t?t:{}}copy(){let t=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return t.removeAllListeners(),t}static _getInitializedChains(t){let e={};for(let[t,r]of Object.entries(h))e[r]=t.toLowerCase();let r={mainnet:e_,goerli:ek,sepolia:eS};if(t)for(let n of t){let{name:t}=n;e[n.chainId.toString()]=t,r[t]=n}return r.names=e,r}}(l=g||(g={}))[l.EIP155ReplayProtection=155]="EIP155ReplayProtection",l[l.EIP1559FeeMarket=1559]="EIP1559FeeMarket",l[l.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",l[l.EIP2930AccessLists=2930]="EIP2930AccessLists";class eB{constructor(t){if(20!==t.length)throw Error("Invalid address length");this.buf=t}static zero(){return new eB(ec(20))}equals(t){return(0,ta.uint8ArrayEquals)(this.buf,t.buf)}isZero(){return this.equals(eB.zero())}toString(){return(0,ta.bytesToHex)(this.buf)}toArray(){return this.buf}static publicToAddress(t,e=!1){let r=t;if(ef(r),e&&64!==r.length&&(r=t9.ProjectivePoint.fromHex(r).toRawBytes(!1).slice(1)),64!==r.length)throw Error("Expected pubKey to be of length 64");return(0,ew.wn)(r).slice(-20)}}let eR=(t,e)=>{let r=t.param("vm","maxInitCodeSize");if(r&&BigInt(e)>r)throw Error(`the initcode size of this transaction is too large: it is ${e} while the max is ${t.param("vm","maxInitCodeSize")}`)},eT=t=>{let e,r;if(!function(t){if(0===t.length)return!0;let e=t[0];return!!Array.isArray(e)}(t)){e=t;let n=[];for(let e=0;e{for(let e=0;e{let e=[];for(let r=0;r{let r=e.param("gasPrices","accessListStorageKeyCost"),n=e.param("gasPrices","accessListAddressCost"),i=0;for(let e=0;e0?new eB(m):void 0,this.value=eh(el(""===a?"0x":a)),this.data=el(""===u?"0x":u),this.v=g.length>0?eh(g):void 0,this.r=v.length>0?eh(v):void 0,this.s=y.length>0?eh(y):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);let b=void 0===this.to||null===this.to,w=null!==(r=e.allowUnlimitedInitCodeSize)&&void 0!==r&&r,A=null!==(n=e.common)&&void 0!==n?n:this._getCommon();b&&A.isActivatedEIP(3860)&&!w&&eR(A,this.data.length)}get type(){return this._type}supports(t){return this.activeCapabilities.includes(t)}validate(t=!1){let e=[];return this.getBaseFee()>this.gasLimit&&e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&e.push("Invalid Signature"),t?e:0===e.length}_validateYParity(){let{v:t}=this;if(void 0!==t&&t!==BigInt(0)&&t!==BigInt(1)){let t=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw Error(t)}}_validateHighS(){let{s:t}=this;if(this.common.gteHardfork("homestead")&&void 0!==t&&t>en){let t=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw Error(t)}}getBaseFee(){let t=this.common.param("gasPrices","tx"),e=this.getDataFee();if(t&&(e+=t),this.common.gteHardfork("homestead")&&this.toCreationAddress()){let t=this.common.param("gasPrices","txCreation");t&&(e+=t)}return e}getDataFee(){let t=this.common.param("gasPrices","txDataZero"),e=this.common.param("gasPrices","txDataNonZero"),r=BigInt(0);for(let n=0;n-1&&this.activeCapabilities.splice(t,1)}return s}_getCommon(t,e){var r;if(void 0!==e){let r=eh(el(e));if(t){if(t.chainId()!==r){let t=this._errorMsg("The chain ID does not match the chain ID of Common");throw Error(t)}return t.copy()}return eI.isSupportedChainId(r)?new eI({chain:r,hardfork:this.DEFAULT_HARDFORK}):eI.custom({name:"custom-chain",networkId:r,chainId:r},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}return null!==(r=null==t?void 0:t.copy())&&void 0!==r?r:new eI({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(t,e=256,r=!1){for(let[n,i]of Object.entries(t))switch(e){case 64:if(r){if(void 0!==i&&i>=et){let t=this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${i}`);throw Error(t)}}else if(void 0!==i&&i>et){let t=this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${i}`);throw Error(t)}break;case 256:if(r){if(void 0!==i&&i>=ee){let t=this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${i}`);throw Error(t)}}else if(void 0!==i&&i>ee){let t=this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${i}`);throw Error(t)}break;default:{let t=this._errorMsg("unimplemented bits value");throw Error(t)}}}static _validateNotArray(t){let e=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(let[r,n]of Object.entries(t))if(e.includes(r)&&Array.isArray(n))throw Error(`${r} cannot be an array`)}_getSharedErrorPostfix(){let t="";try{t=this.isSigned()?(0,ta.bytesToHex)(this.hash()):"not available (unsigned)"}catch(e){t="error"}let e="";try{e=this.isSigned().toString()}catch(e){t="error"}let r="";try{r=this.common.hardfork()}catch(t){r="error"}return`tx type=${this.type} hash=${t} nonce=${this.nonce} value=${this.value} signed=${e} hf=${r}`}_ecsign(t,e,r){let n=t9.sign(t,e),i=n.toCompactRawBytes(),o=i.subarray(0,32),s=i.subarray(32,64),a=void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2);return{r:o,s,v:a}}}let eF=(0,ta.hexToBytes)("2".padStart(2,"0"));class eU extends eL{constructor(t,e={}){var r;super(Object.assign(Object.assign({},t),{type:2}),e),this.DEFAULT_HARDFORK="london";let{chainId:n,accessList:i,maxFeePerGas:o,maxPriorityFeePerGas:s}=t;if(this.common=this._getCommon(e.common,n),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(1559))throw Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);let a=eT(null!=i?i:[]);if(this.accessList=a.accessList,this.AccessListJSON=a.AccessListJSON,eN(this.accessList),this.maxFeePerGas=eh(el(""===o?"0x":o)),this.maxPriorityFeePerGas=eh(el(""===s?"0x":s)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),eL._validateNotArray(t),this.gasLimit*this.maxFeePerGas>ee){let t=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw Error(t)}if(this.maxFeePerGasee){let t=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw Error(t)}this._validateYParity(),this._validateHighS();let a=null===(r=null==e?void 0:e.freeze)||void 0===r||r;a&&Object.freeze(this)}static fromTxData(t,e={}){return new eG(t,e)}static fromSerializedTx(t,e={}){if(!(0,ta.uint8ArrayEquals)(t.subarray(0,1),eH))throw Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: ${(0,ta.bytesToHex)(t.subarray(0,1))}`);let r=eA.yH.decode(Uint8Array.from(t.subarray(1)));if(!Array.isArray(r))throw Error("Invalid serialized tx input: must be array");return eG.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(8!==t.length&&11!==t.length)throw Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");let[r,n,i,o,s,a,u,l,h,c,d]=t;return this._validateNotArray({chainId:r,v:h}),(0,w.jY)({nonce:n,gasPrice:i,gasLimit:o,value:a,v:h,r:c,s:d}),new eG({chainId:eh(r),nonce:n,gasPrice:i,gasLimit:o,to:s,value:a,data:u,accessList:null!=l?l:[],v:void 0!==h?eh(h):void 0,r:c,s:d},e)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let t=super.getDataFee();return t+=BigInt(eD(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:t,hardfork:this.common.hardfork()}),t}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[ev(this.chainId),ev(this.nonce),ev(this.gasPrice),ev(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),ev(this.value),this.data,this.accessList,void 0!==this.v?ev(this.v):Uint8Array.from([]),void 0!==this.r?ev(this.r):Uint8Array.from([]),void 0!==this.s?ev(this.s):Uint8Array.from([])]}serialize(){let t=this.raw();return(0,ta.uint8ArrayConcat)(eH,eA.yH.encode(t))}getMessageToSign(t=!0){let e=this.raw().slice(0,8),r=(0,ta.uint8ArrayConcat)(eH,eA.yH.encode(e));return t?(0,ew.wn)(r):r}hash(){if(!this.isSigned()){let t=this._errorMsg("Cannot call hash method if transaction is not signed");throw Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,ew.wn)(this.serialize())),this.cache.hash):(0,ew.wn)(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){let t=this._errorMsg("Cannot call this method if transaction is not signed");throw Error(t)}let t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return ey(t,e+BigInt(27),ev(r),ev(n))}catch(e){let t=this._errorMsg("Invalid Signature");throw Error(t)}}_processSignature(t,e,r){let n=Object.assign(Object.assign({},this.txOptions),{common:this.common});return eG.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:t-BigInt(27),r:eh(e),s:eh(r)},n)}toJSON(){let t=eO(this.accessList);return{chainId:eg(this.chainId),nonce:eg(this.nonce),gasPrice:eg(this.gasPrice),gasLimit:eg(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:eg(this.value),data:(0,ta.bytesToHex)(this.data),accessList:t,v:void 0!==this.v?eg(this.v):void 0,r:void 0!==this.r?eg(this.r):void 0,s:void 0!==this.s?eg(this.s):void 0}}errorStr(){var t,e;return this._getSharedErrorPostfix()+` gasPrice=${this.gasPrice} accessListCount=${null!==(e=null===(t=this.accessList)||void 0===t?void 0:t.length)&&void 0!==e?e:0}`}_errorMsg(t){return`${t} (${this.errorStr()})`}}function ej(t,e){let r=Number(t),n=2*Number(e);return r===n+35||r===n+36}class ez extends eL{constructor(t,e={}){var r;if(super(Object.assign(Object.assign({},t),{type:0}),e),this.common=this._validateTxV(this.v,e.common),this.gasPrice=eh(el(""===t.gasPrice?"0x":t.gasPrice)),this.gasPrice*this.gasLimit>ee){let t=this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw Error(t)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),eL._validateNotArray(t),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?ej(this.v,this.common.chainId())&&this.activeCapabilities.push(g.EIP155ReplayProtection):this.activeCapabilities.push(g.EIP155ReplayProtection));let n=null===(r=null==e?void 0:e.freeze)||void 0===r||r;n&&Object.freeze(this)}static fromTxData(t,e={}){return new ez(t,e)}static fromSerializedTx(t,e={}){let r=eA.yH.decode(t);if(!Array.isArray(r))throw Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,e)}static fromValuesArray(t,e={}){if(6!==t.length&&9!==t.length)throw Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");let[r,n,i,o,s,a,u,l,h]=t;return(0,w.jY)({nonce:r,gasPrice:n,gasLimit:i,value:s,v:u,r:l,s:h}),new ez({nonce:r,gasPrice:n,gasLimit:i,to:o,value:s,data:a,v:u,r:l,s:h},e)}raw(){return[ev(this.nonce),ev(this.gasPrice),ev(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),ev(this.value),this.data,void 0!==this.v?ev(this.v):Uint8Array.from([]),void 0!==this.r?ev(this.r):Uint8Array.from([]),void 0!==this.s?ev(this.s):Uint8Array.from([])]}serialize(){return eA.yH.encode(this.raw())}_getMessageToSign(){let t=[ev(this.nonce),ev(this.gasPrice),ev(this.gasLimit),void 0!==this.to?this.to.buf:Uint8Array.from([]),ev(this.value),this.data];return this.supports(g.EIP155ReplayProtection)&&(t.push(el(this.common.chainId())),t.push(em(el(0))),t.push(em(el(0)))),t}getMessageToSign(t=!0){let e=this._getMessageToSign();return t?(0,ew.wn)(eA.yH.encode(e)):e}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){let t=this._errorMsg("Cannot call hash method if transaction is not signed");throw Error(t)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,ew.wn)(eA.yH.encode(this.raw()))),this.cache.hash):(0,ew.wn)(eA.yH.encode(this.raw()))}getMessageToVerifySignature(){if(!this.isSigned()){let t=this._errorMsg("This transaction is not signed");throw Error(t)}let t=this._getMessageToSign();return(0,ew.wn)(eA.yH.encode(t))}getSenderPublicKey(){let t=this.getMessageToVerifySignature(),{v:e,r,s:n}=this;this._validateHighS();try{return ey(t,e,ev(r),ev(n),this.supports(g.EIP155ReplayProtection)?this.common.chainId():void 0)}catch(e){let t=this._errorMsg("Invalid Signature");throw Error(t)}}_processSignature(t,e,r){let n=t;this.supports(g.EIP155ReplayProtection)&&(n+=this.common.chainId()*BigInt(2)+BigInt(8));let i=Object.assign(Object.assign({},this.txOptions),{common:this.common});return ez.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:n,r:eh(e),s:eh(r)},i)}toJSON(){return{nonce:eg(this.nonce),gasPrice:eg(this.gasPrice),gasLimit:eg(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:eg(this.value),data:(0,ta.bytesToHex)(this.data),v:void 0!==this.v?eg(this.v):void 0,r:void 0!==this.r?eg(this.r):void 0,s:void 0!==this.s?eg(this.s):void 0}}_validateTxV(t,e){let r;let n=void 0!==t?Number(t):void 0;if(void 0!==n&&n<37&&27!==n&&28!==n)throw Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${n}`);if(void 0!==n&&0!==n&&(!e||e.gteHardfork("spuriousDragon"))&&27!==n&&28!==n){if(e){if(!ej(BigInt(n),e.chainId()))throw Error(`Incompatible EIP155-based V ${n} and chain id ${e.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else r=BigInt(n-((n-35)%2==0?35:36))/BigInt(2)}return this._getCommon(e,r)}errorStr(){return this._getSharedErrorPostfix()+` gasPrice=${this.gasPrice}`}_errorMsg(t){return`${t} (${this.errorStr()})`}}class eq{constructor(){}static fromTxData(t,e={}){if(!("type"in t)||void 0===t.type)return ez.fromTxData(t,e);let r=Number(eh(el(t.type)));if(0===r)return ez.fromTxData(t,e);if(1===r)return eG.fromTxData(t,e);if(2===r)return eU.fromTxData(t,e);throw Error(`Tx instantiation with type ${r} not supported`)}static fromSerializedData(t,e={}){if(!(t[0]<=127))return ez.fromSerializedTx(t,e);switch(t[0]){case 1:return eG.fromSerializedTx(t,e);case 2:return eU.fromSerializedTx(t,e);default:throw Error(`TypedTransaction with ID ${t[0]} unknown`)}}static fromBlockBodyData(t,e={}){if(t instanceof Uint8Array)return this.fromSerializedData(t,e);if(Array.isArray(t))return ez.fromValuesArray(t,e);throw Error("Cannot decode transaction: unknown type input")}}var eK=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let eQ=(t,e)=>{let r;if(!e&&"string"==typeof t&&(0,w.H2)(t)&&66!==t.length)throw new ts.T7U;try{r=t instanceof Uint8Array?t:(0,ta.bytesToUint8Array)(t)}catch(t){throw new ts.QOl}if(!e&&32!==r.byteLength)throw new ts.T7U;return r},eY=t=>{let e=(0,w.H2)(t)?t:(0,ta.utf8ToHex)(t),r=(0,ta.hexToBytes)(e),n=(0,ta.hexToBytes)((0,ta.fromUtf8)(`\x19Ethereum Signed Message: +${r.byteLength}`)),i=(0,ta.uint8ArrayConcat)(n,r);return(0,ta.sha3Raw)(i)},eZ=(t,e)=>{let r=eQ(e),n=eY(t),i=t9.sign(n.substring(2),r),o=i.toCompactRawBytes(),s=i.r.toString(16).padStart(64,"0"),a=i.s.toString(16).padStart(64,"0"),u=i.recovery+27;return{message:t,messageHash:n,v:(0,ta.numberToHex)(u),r:`0x${s}`,s:`0x${a}`,signature:`${(0,ta.bytesToHex)(o)}${u.toString(16)}`}},eV=(t,e)=>eK(void 0,void 0,void 0,function*(){let r=t.sign((0,ta.hexToBytes)(e));if((0,w.Rw)(r.v)||(0,w.Rw)(r.r)||(0,w.Rw)(r.s))throw new ts.wJO("Signer Error");let n=r.validate(!0);if(n.length>0){let t="Signer Error ";for(let e of n)t+=`${t} ${e}.`;throw new ts.wJO(t)}let i=(0,ta.bytesToHex)(r.serialize()),o=(0,ta.sha3Raw)(i);return{messageHash:(0,ta.bytesToHex)(r.getMessageToSign(!0)),v:`0x${r.v.toString(16)}`,r:`0x${r.r.toString(16).padStart(64,"0")}`,s:`0x${r.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:(0,ta.bytesToHex)(o)}}),eJ=t=>{if((0,w.Rw)(t))throw new ts.F92;let e=eq.fromSerializedData((0,ta.hexToBytes)(t));return(0,ta.toChecksumAddress)(e.getSenderAddress().toString())},eW=(t,e,r,n,i)=>{if("object"==typeof t){let e=`${t.r}${t.s.slice(2)}${t.v.slice(2)}`;return eW(t.messageHash,e,r)}if("string"==typeof e&&"string"==typeof r&&!(0,w.Rw)(n)){let o=`${r}${n.slice(2)}${e.slice(2)}`;return eW(t,o,i)}if((0,w.Rw)(e))throw new ts.wnZ("signature string undefined");let o=r?t:eY(t),s=e.substring(130),a=t9.Signature.fromCompact(e.slice(2,130)).addRecoveryBit(parseInt(s,16)-27).recoverPublicKey(o.replace("0x","")).toRawBytes(!1),u=(0,ta.sha3Raw)(a.subarray(1)),l=(0,ta.toChecksumAddress)(`0x${u.slice(-40)}`);return l},eX=t=>{let e=eQ(t),r=t9.getPublicKey(e,!1),n=(0,ta.sha3Raw)(r.slice(1)),i=n.slice(-40);return(0,ta.toChecksumAddress)(`0x${i}`)},e$=(t,e,r)=>eK(void 0,void 0,void 0,function*(){var n,i,o,s,a,u,l;let h,c,d,f;let p=eQ(t);if(h=(null==r?void 0:r.salt)?"string"==typeof r.salt?(0,ta.hexToBytes)(r.salt):r.salt:(0,ta.randomBytes)(32),!((0,w.HD)(e)||e instanceof Uint8Array))throw new ts.nII;let m="string"==typeof e?(0,ta.hexToBytes)((0,ta.utf8ToHex)(e)):e;if(null==r?void 0:r.iv){if(16!==(c="string"==typeof r.iv?(0,ta.hexToBytes)(r.iv):r.iv).length)throw new ts.eNY}else c=(0,ta.randomBytes)(16);let g=null!==(n=null==r?void 0:r.kdf)&&void 0!==n?n:"scrypt";if("pbkdf2"===g){if((f={dklen:null!==(i=null==r?void 0:r.dklen)&&void 0!==i?i:32,salt:(0,ta.bytesToHex)(h).replace("0x",""),c:null!==(o=null==r?void 0:r.c)&&void 0!==o?o:262144,prf:"hmac-sha256"}).c<1e3)throw new ts.WqT;d=te(m,h,f.c,f.dklen,"sha256")}else if("scrypt"===g)f={n:null!==(s=null==r?void 0:r.n)&&void 0!==s?s:8192,r:null!==(a=null==r?void 0:r.r)&&void 0!==a?a:8,p:null!==(u=null==r?void 0:r.p)&&void 0!==u?u:1,dklen:null!==(l=null==r?void 0:r.dklen)&&void 0!==l?l:32,salt:(0,ta.bytesToHex)(h).replace("0x","")},d=to(m,h,f.n,f.p,f.r,f.dklen);else throw new ts.PlV;let v=yield C(p,d.slice(0,16),c,"aes-128-ctr"),y=(0,ta.bytesToHex)(v).slice(2),b=(0,ta.sha3Raw)((0,ta.uint8ArrayConcat)(d.slice(16,32),v)).replace("0x","");return{version:3,id:(0,ta.uuidV4)(),address:eX(p).toLowerCase().replace("0x",""),crypto:{ciphertext:y,cipherparams:{iv:(0,ta.bytesToHex)(c).replace("0x","")},cipher:"aes-128-ctr",kdf:g,kdfparams:f,mac:b}}}),e0=(t,e)=>{let r=eQ(t,e);return{address:eX(r),privateKey:(0,ta.bytesToHex)(r),signTransaction:t=>{throw new ts.wJO("Do not have network access to sign the transaction")},sign:t=>eZ("string"==typeof t?t:JSON.stringify(t),r),encrypt:(t,e)=>eK(void 0,void 0,void 0,function*(){return e$(r,t,e)})}},e1=()=>{let t=t9.utils.randomPrivateKey();return e0(`${(0,ta.bytesToHex)(t)}`)},e2=(t,e,r)=>eK(void 0,void 0,void 0,function*(){let n;let i="object"==typeof t?t:JSON.parse(r?t.toLowerCase():t);if(w.sC.validateJSONSchema(ei,i),3!==i.version)throw new ts.V41;let o="string"==typeof e?(0,ta.hexToBytes)((0,ta.utf8ToHex)(e)):e;if(w.sC.validate(["bytes"],[o]),"scrypt"===i.crypto.kdf){let t=i.crypto.kdfparams,e="string"==typeof t.salt?(0,ta.hexToBytes)(t.salt):t.salt;n=to(o,e,t.n,t.p,t.r,t.dklen)}else if("pbkdf2"===i.crypto.kdf){let t=i.crypto.kdfparams,e="string"==typeof t.salt?(0,ta.hexToBytes)(t.salt):t.salt;n=te(o,e,t.c,t.dklen,"sha256")}else throw new ts.PlV;let s=(0,ta.hexToBytes)(i.crypto.ciphertext),a=(0,ta.sha3Raw)((0,ta.uint8ArrayConcat)(n.slice(16,32),s)).replace("0x","");if(a!==i.crypto.mac)throw new ts.ePX;let u=yield I((0,ta.hexToBytes)(i.crypto.ciphertext),n.slice(0,16),(0,ta.hexToBytes)(i.crypto.cipherparams.iv));return e0(u)})},6636:function(t,e,r){"use strict";r.d(e,{U1:function(){return d},YK:function(){return n},pE:function(){return i},JB:function(){return c},vm:function(){return h},Ut:function(){return f},c9:function(){return o},EA:function(){return g},vy:function(){return v}}),(s=h||(h={})).NUMBER="NUMBER_NUMBER",s.HEX="NUMBER_HEX",s.STR="NUMBER_STR",s.BIGINT="NUMBER_BIGINT",(a=c||(c={})).HEX="BYTES_HEX",a.UINT8ARRAY="BYTES_UINT8ARRAY";let n={number:h.BIGINT,bytes:c.HEX},i={number:h.HEX,bytes:c.HEX};(u=d||(d={})).EARLIEST="earliest",u.LATEST="latest",u.PENDING="pending",u.SAFE="safe",u.FINALIZED="finalized",(l=f||(f={})).chainstart="chainstart",l.frontier="frontier",l.homestead="homestead",l.dao="dao",l.tangerineWhistle="tangerineWhistle",l.spuriousDragon="spuriousDragon",l.byzantium="byzantium",l.constantinople="constantinople",l.petersburg="petersburg",l.istanbul="istanbul",l.muirGlacier="muirGlacier",l.berlin="berlin",l.london="london",l.altair="altair",l.arrowGlacier="arrowGlacier",l.grayGlacier="grayGlacier",l.bellatrix="bellatrix",l.merge="merge",l.capella="capella",l.shanghai="shanghai";let o=Object.getPrototypeOf(Uint8Array);var s,a,u,l,h,c,d,f,p=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let m=Symbol.for("web3/base-provider");class g{static isWeb3Provider(t){return t instanceof g||!!(t&&t[m])}get[m](){return!0}send(t,e){this.request(t).then(t=>{e(null,t)}).catch(t=>{e(t)})}sendAsync(t){return p(this,void 0,void 0,function*(){return this.request(t)})}asEIP1193Provider(){let t=Object.create(this),e=t.request;return t.request=function(t){return p(this,void 0,void 0,function*(){let r=yield e(t);return r.result})},t.asEIP1193Provider=void 0,t}}class v extends Array{constructor(t){super(),this._accountProvider=t}}},9449:function(t,e,r){"use strict";let n;r.r(e),r.d(e,{ChunkResponseParser:function(){return tW},Eip1193Provider:function(){return t0},SocketProvider:function(){return t2},Web3DeferredPromise:function(){return tJ},asciiToHex:function(){return C},bytesToHex:function(){return m},bytesToUint8Array:function(){return f},checkAddressCheckSum:function(){return G},compareBlockNumbers:function(){return V},convert:function(){return tc},convertScalarValue:function(){return th},encodePacked:function(){return tx},ethUnitMap:function(){return d},format:function(){return td},fromAscii:function(){return P},fromDecimal:function(){return w},fromTwosComplement:function(){return ti},fromUtf8:function(){return x},fromWei:function(){return O},getStorageSlotNumForLongString:function(){return tS},hexToAscii:function(){return I},hexToBytes:function(){return g},hexToNumber:function(){return v},hexToNumberString:function(){return A},hexToString:function(){return M},hexToUtf8:function(){return _},isAddress:function(){return j},isBatchRequest:function(){return tZ},isBatchResponse:function(){return tq},isBloom:function(){return z},isContractAddressInBloom:function(){return Q},isDataFormat:function(){return tu},isHex:function(){return H},isHexStrict:function(){return U},isInBloom:function(){return q},isNullish:function(){return J},isPromise:function(){return tB},isResponseRpcError:function(){return tL},isResponseWithError:function(){return tU},isResponseWithNotification:function(){return tH},isResponseWithResult:function(){return tF},isSubscriptionResult:function(){return tG},isTopic:function(){return Y},isTopicInBloom:function(){return Z},isUserEthereumAddressInBloom:function(){return K},isValidResponse:function(){return tz},jsonRpc:function(){return o},keccak256:function(){return tg},keccak256Wrapper:function(){return tg},leftPad:function(){return tr},mergeDeep:function(){return X},numberToHex:function(){return b},padLeft:function(){return $},padRight:function(){return tt},pollTillDefined:function(){return tT},processSolidityEncodePackedArgs:function(){return tE},randomBytes:function(){return tC},randomHex:function(){return tP},rejectIfConditionAtInterval:function(){return tO},rejectIfTimeout:function(){return tN},rightPad:function(){return te},setRequestIdStart:function(){return tK},sha3:function(){return tp},sha3Raw:function(){return tm},soliditySha3:function(){return tk},soliditySha3Raw:function(){return t_},stringToHex:function(){return k},toAscii:function(){return B},toBatchPayload:function(){return tY},toBigInt:function(){return N},toChecksumAddress:function(){return L},toDecimal:function(){return y},toHex:function(){return R},toNumber:function(){return T},toPayload:function(){return tQ},toTwosComplement:function(){return tn},toUtf8:function(){return S},toWei:function(){return D},uint8ArrayConcat:function(){return to},uint8ArrayEquals:function(){return ts},utf8ToHex:function(){return E},uuidV4:function(){return tD},validateResponse:function(){return tj},waitWithTimeout:function(){return tR}});var i,o={};r.r(o),r.d(o,{isBatchRequest:function(){return tZ},isBatchResponse:function(){return tq},isResponseRpcError:function(){return tL},isResponseWithError:function(){return tU},isResponseWithNotification:function(){return tH},isResponseWithResult:function(){return tF},isSubscriptionResult:function(){return tG},isValidResponse:function(){return tz},setRequestIdStart:function(){return tK},toBatchPayload:function(){return tY},toPayload:function(){return tQ},validateResponse:function(){return tj}});var s=r(1742),a=r(7325),u=r(7008),l=r(9973);let h=BigInt(10),c=t=>h**BigInt(t),d={noether:BigInt("0"),wei:BigInt(1),kwei:c(3),Kwei:c(3),babbage:c(3),femtoether:c(3),mwei:c(6),Mwei:c(6),lovelace:c(6),picoether:c(6),gwei:c(9),Gwei:c(9),shannon:c(9),nanoether:c(9),nano:c(9),szabo:c(12),microether:c(12),micro:c(12),finney:c(15),milliether:c(15),milli:c(15),ether:c(18),kether:c(21),grand:c(21),mether:c(24),gether:c(27),tether:c(30)},f=t=>{if(u.sC.validate(["bytes"],[t]),t instanceof Uint8Array)return t;if(Array.isArray(t))return new Uint8Array(t);if("string"==typeof t)return u.P6.hexToUint8Array(t);throw new l.ABz(t)},{uint8ArrayToHexString:p}=u.P6,m=t=>p(f(t)),g=t=>"string"==typeof t&&"0x"!==t.slice(0,2).toLowerCase()?f(`0x${t}`):f(t),v=t=>(u.sC.validate(["hex"],[t]),u.P6.hexToNumber(t)),y=v,b=(t,e)=>{"bigint"!=typeof t&&u.sC.validate(["int"],[t]);let r=u.P6.numberToHex(t);return e&&(r.startsWith("-")||r.length%2!=1?r.length%2==0&&r.startsWith("-")&&(r="-0x0".concat(r.slice(3))):r="0x0".concat(r.slice(2))),r},w=b,A=t=>v(t).toString(),E=t=>{u.sC.validate(["string"],[t]);let e=t.replace(/^(?:\u0000)/,"");return e=e.replace(/(?:\u0000)$/,""),m(new TextEncoder().encode(e))},x=E,k=E,_=t=>(0,a.Md)(g(t)),S=t=>"string"==typeof t?_(t):(u.sC.validate(["bytes"],[t]),(0,a.Md)(t)),M=_,C=t=>{u.sC.validate(["string"],[t]);let e="";for(let r=0;r{let e=new TextDecoder("ascii");return e.decode(g(t))},B=I,R=(t,e)=>{if("string"==typeof t&&(0,u.UJ)(t))return e?"address":`0x${t.toLowerCase().replace(/^0x/i,"")}`;if("boolean"==typeof t)return e?"bool":t?"0x01":"0x00";if("number"==typeof t)return e?t<0?"int256":"uint256":b(t);if("bigint"==typeof t)return e?"bigint":b(t);if("object"==typeof t&&t)return e?"string":E(JSON.stringify(t));if("string"==typeof t){if(t.startsWith("-0x")||t.startsWith("-0X"))return e?"int256":b(t);if((0,u.H2)(t))return e?"bytes":t;if((0,u.vq)(t)&&!(0,u.GN)(t))return e?"bytes":`0x${t}`;if(!Number.isFinite(t))return e?"string":E(t)}throw new l.l$f(t)},T=t=>{if("number"==typeof t)return t;if("bigint"==typeof t)return t>=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t):t;if("string"==typeof t&&(0,u.H2)(t))return v(t);try{return T(BigInt(t))}catch(e){throw new l.NL0(t)}},N=t=>{if("number"==typeof t)return BigInt(t);if("bigint"==typeof t)return t;if("string"==typeof t&&(0,u.vq)(t))return BigInt(t);throw new l.NL0(t)},O=(t,e)=>{let r=d[e];if(!r)throw new l.jQu(e);let n=String(T(t)),i=r.toString().length-1;if(i<=0)return n.toString();let o=n.padStart(i,"0"),s=o.slice(0,-i),a=o.slice(-i).replace(/\.?0+$/,"");return""===s?`0.${a}`:""===a?s:`${s}.${a}`},D=(t,e)=>{u.sC.validate(["number"],[t]);let r=d[e];if(!r)throw new l.jQu(e);let[n,i]=String("string"!=typeof t||(0,u.H2)(t)?T(t):t).split(".").concat(""),o=BigInt(`${n}${i}`),s=o*r,a=r.toString().length-1,h=Math.min(i.length,a);return 0===h?s.toString():s.toString().padStart(h,"0").slice(0,-h)},L=t=>{if(!(0,u.UJ)(t,!1))throw new l.bSi(t);let e=t.toLowerCase().replace(/^0x/i,""),r=m((0,s.wn)((0,a.iY)(e)));if((0,u.Rw)(r)||"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===r)return"";let n="0x",i=r.replace(/^0x/i,"");for(let t=0;t7?n+=e[t].toUpperCase():n+=e[t];return n};var F=r(6636);let U=u.H2,H=u.vq,G=u.rf,j=u.UJ,z=u.cf,q=u.VG,K=u.TT,Q=u.rx,Y=u.x8,Z=u._W,V=(t,e)=>{let r="string"==typeof t&&(0,u.lA)(t),n="string"==typeof e&&(0,u.lA)(e);if(t===e||("earliest"===t||0===t)&&("earliest"===e||0===e))return 0;if("earliest"===t&&e>0)return -1;if("earliest"===e&&t>0)return 1;if(r&&n){let r={[F.U1.EARLIEST]:1,[F.U1.FINALIZED]:2,[F.U1.SAFE]:3,[F.U1.LATEST]:4,[F.U1.PENDING]:5};return r[t]"object"==typeof t&&!(0,u.Rw)(t)&&!Array.isArray(t)&&!(t instanceof F.c9),X=(t,...e)=>{let r=t;if(!W(r))return r;for(let t of e)for(let e in t)W(t[e])?(r[e]||(r[e]={}),X(r[e],t[e])):!(0,u.Rw)(t[e])&&Object.hasOwnProperty.call(t,e)&&(Array.isArray(t[e])||t[e]instanceof F.c9?r[e]=t[e].slice(0):r[e]=t[e]);return r},$=(t,e,r="0")=>"string"==typeof t?(0,u.H2)(t)?u.P6.padLeft(t,e,r):t.padStart(e,r):(u.sC.validate(["int"],[t]),u.P6.padLeft(t,e,r)),tt=(t,e,r="0")=>{if("string"==typeof t&&!(0,u.H2)(t))return t.padEnd(e,r);u.sC.validate(["int"],[t]);let n="string"==typeof t&&(0,u.H2)(t)?t:b(t),i=n.startsWith("-")?3:2;return n.padEnd(e+i,r)},te=tt,tr=$,tn=(t,e=64)=>{u.sC.validate(["int"],[t]);let r=T(t);if(r>=0)return $(R(r),e);let n=BigInt(2)**BigInt(4*e);if(-r>=n)throw new l.v45(`value: ${t}, nibbleWidth: ${e}`);let i=BigInt(r);return $(b(i+n),e)},ti=(t,e=64)=>{u.sC.validate(["int"],[t]);let r=T(t);if(r<0)return r;let n=Math.ceil(Math.log(Number(r))/Math.log(2));if(n>4*e)throw new l.v45(`value: "${t}", nibbleWidth: "${e}"`);if(4*e!==n)return r;let i=BigInt(2)**(BigInt(e)*BigInt(4));return T(BigInt(r)-i)};function to(...t){let e=t.reduce((t,e)=>{let r=t+e.length;return r},0),r=new Uint8Array(e),n=0;for(let e of t)r.set(e,n),n+=e.length;return r}function ts(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r"object"==typeof t&&!(0,u.Rw)(t)&&"number"in t&&"bytes"in t,tl=(t,e,r=[])=>{let n,i=Object.assign({},t);for(let t of e){if(i.oneOf&&n){let t=r.find(function(t){return this===t[0]},null!=n?n:"");t&&t[0]===n&&(i=i.oneOf[t[1]])}if(!i.properties&&!i.items)return;if(i.properties)i=i.properties[t];else if(i.items&&i.items.properties){let e=i.items.properties;if(!e)return;i=e[t]}else i.items&&(0,u.Kn)(i.items)?i=i.items:i.items&&Array.isArray(i.items)&&(i=i.items[parseInt(t,10)]);i&&t&&(n=t)}return i},th=(t,e,r)=>{try{let{baseType:n,baseTypeSize:i}=ta(e);if("int"===n||"uint"===n)switch(r.number){case F.vm.NUMBER:return Number(N(t));case F.vm.HEX:return b(N(t));case F.vm.STR:return N(t).toString();case F.vm.BIGINT:return N(t);default:throw new l.A6c(`Invalid format: ${String(r.number)}`)}if("bytes"===n){let e;switch(i?"string"==typeof t?e=$(t,2*i):t instanceof Uint8Array&&(e=to(new Uint8Array(i-t.length),t)):e=t,r.bytes){case F.JB.HEX:return m(f(e));case F.JB.UINT8ARRAY:return f(e);default:throw new l.A6c(`Invalid format: ${String(r.bytes)}`)}}}catch(t){}return t},tc=(t,e,r,n,i=[])=>{var o,s;if(!(0,u.Kn)(t)&&!Array.isArray(t))return th(t,null==e?void 0:e.format,n);let a=t;for(let[t,l]of Object.entries(a)){r.push(t);let h=tl(e,r,i);if((0,u.Rw)(h)){delete a[t],r.pop();continue}if((0,u.Kn)(l)){tc(l,e,r,n),r.pop();continue}if(Array.isArray(l)){let c=h;if((null==h?void 0:h.oneOf)!==void 0&&h.oneOf.forEach((e,r)=>{var n,o;Array.isArray(null==h?void 0:h.items)||("object"!=typeof l[0]||(null===(n=null==e?void 0:e.items)||void 0===n?void 0:n.type)!=="object")&&("string"!=typeof l[0]||(null===(o=null==e?void 0:e.items)||void 0===o?void 0:o.type)==="object")||(c=e,i.push([t,r]))}),(0,u.Rw)(null==c?void 0:c.items)){delete a[t],r.pop();continue}if((0,u.Kn)(c.items)&&!(0,u.Rw)(c.items.format)){for(let e=0;e{let n;n=(0,u.Kn)(e)?X({},e):Array.isArray(e)?[...e]:e;let i=(0,u.Kn)(t)?t:u.P6.ethAbiToJsonSchema(t);if(!i.properties&&!i.items&&!i.format)throw new l.A6c("Invalid json schema for formatting");return tc(n,i,[],r)},tf="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",tp=t=>{let e;e="string"==typeof t?t.startsWith("0x")&&(0,u.H2)(t)?g(t):(0,a.iY)(t):t;let r=m((0,s.wn)(e));return r===tf?void 0:r},tm=t=>{let e=tp(t);return(0,u.Rw)(e)?tf:e},tg=t=>{let e;return e="bigint"==typeof t||"number"==typeof t?(0,a.iY)(t.toString()):Array.isArray(t)?new Uint8Array(t):"string"!=typeof t||(0,u.H2)(t)?f(t):(0,a.iY)(t),m((0,s.wn)(e))},tv=t=>{let e,r;if(Array.isArray(t))throw Error("Autodetection of array types is not supported.");if("object"==typeof t&&("t"in t||"type"in t)&&("v"in t||"value"in t))e="t"in t?t.t:t.type,r="v"in t?t.v:t.value,e="bigint"===e.toLowerCase()?"int":e;else{if("bigint"==typeof t)return["int",t];e=R(t,!0),r=R(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")}return(e.startsWith("int")||e.startsWith("uint"))&&"string"==typeof r&&!/^(-)?0x/i.test(r)&&(r=N(r)),[e,r]},ty=t=>t.startsWith("int[")?`int256${t.slice(3)}`:"int"===t?"int256":t.startsWith("uint[")?`uint256'${t.slice(4)}`:"uint"===t?"uint256":t,tb=(t,e)=>{let r=/^(\d+).*$/.exec(t.slice(e));return r?parseInt(r[1],10):0},tw=t=>{let e=t.toString(2);return e.length},tA=(t,e)=>{let r=e.toString();if("string"===t){if("string"==typeof e)return E(e);throw new l.SiY(e)}if("bool"===t||"boolean"===t){if("boolean"==typeof e)return e?"01":"00";throw new l.X6d(e)}if("address"===t){if(!(0,u.UJ)(r))throw new l.bSi(r);return r}let n=ty(t);if(t.startsWith("uint")){let t=tb(n,4);if(t%8||t<8||t>256)throw new l.Bq_(r);let e=T(r);if(tw(e)>t)throw new l.g6u(r);if(e256)throw new l.Bq_(t);let i=T(r);if(tw(i)>e)throw new l.g6u(r);return i64||e{let[e,r]=tv(t);if(Array.isArray(r)){let t=r.map(t=>tA(e,t).replace("0x",""));return t.join("")}let n=tA(e,r);return n.replace("0x","")},tx=(...t)=>{let e=Array.prototype.slice.call(t),r=e.map(tE);return`0x${r.join("").toLowerCase()}`},tk=(...t)=>tp(tx(...t)),t_=(...t)=>tm(tx(...t)),tS=t=>tp(`0x${("number"==typeof t?t.toString():t).padStart(64,"0")}`);var tM=r(8761);let tC=t=>(0,tM.O6)(t),tP=t=>m(tC(t));var tI=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function tB(t){return("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}function tR(t,e,r){return tI(this,void 0,void 0,function*(){let n;let i=yield Promise.race([t instanceof Promise?t:t(),new Promise((t,i)=>{n=setTimeout(()=>r?i(r):t(void 0),e)})]);if(n&&clearTimeout(n),i instanceof Error)throw i;return i})}function tT(t,e){return tI(this,void 0,void 0,function*(){let r;let n=tR(t,e),i=new Promise((n,i)=>{r=setInterval(()=>{tI(this,void 0,void 0,function*(){try{let i=yield tR(t,e);(0,u.Rw)(i)||(clearInterval(r),n(i))}catch(t){clearInterval(r),i(t)}})},e)}),o=yield n;return(0,u.Rw)(o)?i:(r&&clearInterval(r),o)})}function tN(t,e){let r;let n=new Promise((n,i)=>{r=setTimeout(()=>{i(e)},t)});return[r,n]}function tO(t,e){let r;let n=new Promise((n,i)=>{r=setInterval(()=>{tI(this,void 0,void 0,function*(){let e=yield t();e&&(clearInterval(r),i(e))})},e)});return[r,n]}let tD=()=>{let t=tC(16);t[6]=15&t[6]|64,t[8]=63&t[8]|128;let e=m(t);return[e.substring(2,10),e.substring(10,14),e.substring(14,18),e.substring(18,22),e.substring(22,34)].join("-")},tL=t=>{let e=t.error.code;return l.BEj.has(e)||e>=-32099&&e<=-32e3},tF=t=>!Array.isArray(t)&&!!t&&"2.0"===t.jsonrpc&&"result"in t&&(0,u.Rw)(t.error)&&("number"==typeof t.id||"string"==typeof t.id),tU=t=>!Array.isArray(t)&&"2.0"===t.jsonrpc&&!!t&&(0,u.Rw)(t.result)&&"error"in t&&("number"==typeof t.id||"string"==typeof t.id),tH=t=>!Array.isArray(t)&&!!t&&"2.0"===t.jsonrpc&&!(0,u.Rw)(t.params)&&!(0,u.Rw)(t.method),tG=t=>!Array.isArray(t)&&!!t&&"2.0"===t.jsonrpc&&"id"in t&&"result"in t,tj=t=>tF(t)||tU(t),tz=t=>Array.isArray(t)?t.every(tj):tj(t),tq=t=>Array.isArray(t)&&t.length>0&&tz(t),tK=t=>{n=t},tQ=t=>{var e,r,i,o;return void 0!==n&&(n+=1),{jsonrpc:null!==(e=t.jsonrpc)&&void 0!==e?e:"2.0",id:null!==(i=null!==(r=t.id)&&void 0!==r?r:n)&&void 0!==i?i:tD(),method:t.method,params:null!==(o=t.params)&&void 0!==o?o:void 0}},tY=t=>t.map(t=>tQ(t)),tZ=t=>Array.isArray(t)&&t.length>0;var tV=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class tJ{constructor({timeout:t,eagerStart:e,timeoutMessage:r}={timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"}){this[i]="Promise",this._state="pending",this._promise=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this._timeoutMessage=r,this._timeoutInterval=t,e&&this.startTimer()}get state(){return this._state}then(t,e){return tV(this,void 0,void 0,function*(){return this._promise.then(t,e)})}catch(t){return tV(this,void 0,void 0,function*(){return this._promise.catch(t)})}finally(t){return tV(this,void 0,void 0,function*(){return this._promise.finally(t)})}resolve(t){this._resolve(t),this._state="fulfilled",this._clearTimeout()}reject(t){this._reject(t),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){"pending"===this._state&&this._timeoutId&&this.reject(new l.S$e(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}i=Symbol.toStringTag;class tW{constructor(t,e){this.eventEmitter=t,this.autoReconnect=e}clearQueues(){"function"==typeof this._clearQueues&&this._clearQueues()}onError(t){this._clearQueues=t}parseResponse(t){let e=[],r=t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return r.forEach(t=>{let r,n=t;this.lastChunk&&(n=this.lastChunk+n);try{r=JSON.parse(n)}catch(t){this.lastChunk=n,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),this.lastChunkTimeout=setTimeout(()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new l.$D9({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))},15e3);return}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,r&&e.push(r)}),e}}var tX=r(8326),t$=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class t0 extends F.EA{constructor(){super(...arguments),this._eventEmitter=new tX.EventEmitter,this._chainId="",this._accounts=[]}_getChainId(){var t;return t$(this,void 0,void 0,function*(){let e=yield this.request(tQ({method:"eth_chainId",params:[]}));return null!==(t=null==e?void 0:e.result)&&void 0!==t?t:""})}_getAccounts(){var t;return t$(this,void 0,void 0,function*(){let e=yield this.request(tQ({method:"eth_accounts",params:[]}));return null!==(t=null==e?void 0:e.result)&&void 0!==t?t:[]})}_onConnect(){Promise.all([this._getChainId().then(t=>{t!==this._chainId&&(this._chainId=t,this._eventEmitter.emit("chainChanged",this._chainId))}).catch(t=>{console.error(t)}),this._getAccounts().then(t=>{this._accounts.length===t.length&&t.every(e=>t.includes(e))||(this._accounts=t,this._onAccountsChanged())}).catch(t=>{console.error(t)})]).then(()=>this._eventEmitter.emit("connect",{chainId:this._chainId})).catch(t=>{console.error(t)})}_onDisconnect(t,e){this._eventEmitter.emit("disconnect",new l.tOY(t,e))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}let t1={autoReconnect:!0,delay:5e3,maxAttempts:5};class t2 extends t0{constructor(t,e,r){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(t))throw new l.$PL(t);this._socketPath=t,this._socketOptions=e,this._reconnectOptions=Object.assign(Object.assign({},t1),null!=r?r:{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new tW(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError(()=>{this._clearQueues()}),this.isReconnecting=!1}get SocketConnection(){return this._socketConnection}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(t){if(this.isReconnecting)setImmediate(()=>{this._reconnect()});else{if(this._connectionStatus="disconnected",t&&t.message)throw new l.hYh(`Error while connecting to ${this._socketPath}. Reason: ${t.message}`);throw new l.$PL(this._socketPath)}}}_validateProviderPath(t){return!!t}supportsSubscriptions(){return!0}on(t,e){this._eventEmitter.on(t,e)}once(t,e){this._eventEmitter.once(t,e)}removeListener(t,e){this._eventEmitter.removeListener(t,e)}_onDisconnect(t,e){this._connectionStatus="disconnected",super._onDisconnect(t,e)}disconnect(t,e){let r=null!=t?t:1e3;this._removeSocketListeners(),"disconnected"!==this.getStatus()&&this._closeSocketConnection(r,e),this._onDisconnect(r,e)}removeAllListeners(t){this._eventEmitter.removeAllListeners(t)}_onError(t){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",t)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((t,e)=>{t.deferredPromise.reject(new l.VLp),this._sentRequestsQueue.delete(e)}),this._reconnectAttempts{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1},this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new l.JsW(this._reconnectOptions.maxAttempts))))}request(t){var e,r,n,i;return e=this,r=void 0,n=void 0,i=function*(){if(J(this._socketConnection))throw Error("Connection is undefined");"disconnected"===this.getStatus()&&this.connect();let e=tZ(t)?t[0].id:t.id;if(!e)throw new l.HIr("Request Id not defined");if(this._sentRequestsQueue.has(e))throw new l.kML(e);let r=new tJ;r.catch(t=>{this._eventEmitter.emit("error",t)});let n={payload:t,deferredPromise:r};if("connecting"===this.getStatus())return this._pendingRequestsQueue.set(e,n),n.deferredPromise;this._sentRequestsQueue.set(e,n);try{this._sendToSocket(n.payload)}catch(t){this._sentRequestsQueue.delete(e),this._eventEmitter.emit("error",t)}return r},new(n||(n=Promise))(function(t,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(e){var r;e.done?t(e.value):((r=e.value)instanceof n?r:new n(function(t){t(r)})).then(s,a)}u((i=i.apply(e,r||[])).next())})}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(let[t,e]of this._pendingRequestsQueue.entries())this._sendToSocket(e.payload),this._pendingRequestsQueue.delete(t),this._sentRequestsQueue.set(t,e)}_onMessage(t){let e=this._parseResponses(t);if(0===e.length){this._reconnectOptions.autoReconnect&&this._reconnect();return}for(let t of e){if(tH(t)&&t.method.endsWith("_subscription")){this._eventEmitter.emit("message",t);return}let e=tq(t)?t[0].id:t.id,r=this._sentRequestsQueue.get(e);if(!r)return;(tq(t)||tF(t)||tU(t))&&(this._eventEmitter.emit("message",t),r.deferredPromise.resolve(t)),this._sentRequestsQueue.delete(e)}}_clearQueues(t){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach((e,r)=>{e.deferredPromise.reject(new l.ZYx(t)),this._pendingRequestsQueue.delete(r)}),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((e,r)=>{e.deferredPromise.reject(new l.ZYx(t)),this._sentRequestsQueue.delete(r)}),this._removeSocketListeners()}}},7008:function(t,e,r){"use strict";let n;r.d(e,{X$:function(){return eo},rf:function(){return eP},UJ:function(){return eI},lA:function(){return eD},cf:function(){return eF},_t:function(){return ez},rx:function(){return eG},vq:function(){return ef},Lo:function(){return ep},H2:function(){return ec},A7:function(){return ed},VG:function(){return eU},GN:function(){return eT},Rw:function(){return eq},hj:function(){return eN},Kn:function(){return eK},HD:function(){return eh},x8:function(){return eQ},_W:function(){return eY},fb:function(){return eR},TT:function(){return eH},P6:function(){return c},jY:function(){return em},sC:function(){return eX}});var i,o,s,a,u,l,h,c={};r.r(c),r.d(c,{abiSchemaToJsonSchema:function(){return eb},codePointToInt:function(){return ex},ethAbiToJsonSchema:function(){return ew},fetchArrayElement:function(){return eA},hexToNumber:function(){return ek},hexToUint8Array:function(){return eC},numberToHex:function(){return e_},padLeft:function(){return eS},parseBaseType:function(){return ev},transformJsonDataToAbiFormat:function(){return eE},uint8ArrayToHexString:function(){return eM}}),(i=a||(a={})).assertEqual=t=>t,i.assertIs=function(t){},i.assertNever=function(t){throw Error()},i.arrayToEnum=t=>{let e={};for(let r of t)e[r]=r;return e},i.getValidEnumValues=t=>{let e=i.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),r={};for(let n of e)r[n]=t[n];return i.objectValues(r)},i.objectValues=t=>i.objectKeys(t).map(function(e){return t[e]}),i.objectKeys="function"==typeof Object.keys?t=>Object.keys(t):t=>{let e=[];for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e},i.find=(t,e)=>{for(let r of t)if(e(r))return r},i.isInteger="function"==typeof Number.isInteger?t=>Number.isInteger(t):t=>"number"==typeof t&&isFinite(t)&&Math.floor(t)===t,i.joinValues=function(t,e=" | "){return t.map(t=>"string"==typeof t?`'${t}'`:t).join(e)},i.jsonStringifyReplacer=(t,e)=>"bigint"==typeof e?e.toString():e,(u||(u={})).mergeShapes=(t,e)=>({...t,...e});let d=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),f=t=>{switch(typeof t){case"undefined":return d.undefined;case"string":return d.string;case"number":return isNaN(t)?d.nan:d.number;case"boolean":return d.boolean;case"function":return d.function;case"bigint":return d.bigint;case"symbol":return d.symbol;case"object":if(Array.isArray(t))return d.array;if(null===t)return d.null;if(t.then&&"function"==typeof t.then&&t.catch&&"function"==typeof t.catch)return d.promise;if("undefined"!=typeof Map&&t instanceof Map)return d.map;if("undefined"!=typeof Set&&t instanceof Set)return d.set;if("undefined"!=typeof Date&&t instanceof Date)return d.date;return d.object;default:return d.unknown}},p=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),m=t=>{let e=JSON.stringify(t,null,2);return e.replace(/"([^"]+)":/g,"$1:")};class g extends Error{constructor(t){super(),this.issues=[],this.addIssue=t=>{this.issues=[...this.issues,t]},this.addIssues=(t=[])=>{this.issues=[...this.issues,...t]};let e=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,e):this.__proto__=e,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let e=t||function(t){return t.message},r={_errors:[]},n=t=>{for(let i of t.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(e(i));else{let t=r,n=0;for(;nt.message){let e={},r=[];for(let n of this.issues)n.path.length>0?(e[n.path[0]]=e[n.path[0]]||[],e[n.path[0]].push(t(n))):r.push(t(n));return{formErrors:r,fieldErrors:e}}get formErrors(){return this.flatten()}}g.create=t=>{let e=new g(t);return e};let v=(t,e)=>{let r;switch(t.code){case p.invalid_type:r=t.received===d.undefined?"Required":`Expected ${t.expected}, received ${t.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,a.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.joinValues(t.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.joinValues(t.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${a.joinValues(t.options)}, received '${t.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:"object"==typeof t.validation?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,"number"==typeof t.validation.position&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:a.assertNever(t.validation):r="regex"!==t.validation?`Invalid ${t.validation}`:"Invalid";break;case p.too_small:r="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:"date"===t.type?`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:"Invalid input";break;case p.too_big:r="array"===t.type?`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:"string"===t.type?`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:"number"===t.type?`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"bigint"===t.type?`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:"date"===t.type?`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:"Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=e.defaultError,a.assertNever(t)}return{message:r}},y=v,b=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],s={...i,path:o},a="",u=n.filter(t=>!!t).slice().reverse();for(let t of u)a=t(s,{data:e,defaultError:a}).message;return{...i,path:o,message:i.message||a}};function w(t,e){let r=b({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y,v].filter(t=>!!t)});t.common.issues.push(r)}class A{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(t,e){let r=[];for(let n of e){if("aborted"===n.status)return E;"dirty"===n.status&&t.dirty(),r.push(n.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,e){let r=[];for(let t of e)r.push({key:await t.key,value:await t.value});return A.mergeObjectSync(t,r)}static mergeObjectSync(t,e){let r={};for(let n of e){let{key:e,value:i}=n;if("aborted"===e.status||"aborted"===i.status)return E;"dirty"===e.status&&t.dirty(),"dirty"===i.status&&t.dirty(),"__proto__"!==e.value&&(void 0!==i.value||n.alwaysSet)&&(r[e.value]=i.value)}return{status:t.value,value:r}}}let E=Object.freeze({status:"aborted"}),x=t=>({status:"dirty",value:t}),k=t=>({status:"valid",value:t}),_=t=>"aborted"===t.status,S=t=>"dirty"===t.status,M=t=>"valid"===t.status,C=t=>"undefined"!=typeof Promise&&t instanceof Promise;(o=l||(l={})).errToObj=t=>"string"==typeof t?{message:t}:t||{},o.toString=t=>"string"==typeof t?t:null==t?void 0:t.message;class P{constructor(t,e,r,n){this._cachedPath=[],this.parent=t,this.data=e,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let I=(t,e)=>{if(M(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let e=new g(t.common.issues);return this._error=e,this._error}}};function B(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(e)return{errorMap:e,description:i};let o=(t,e)=>"invalid_type"!==t.code?{message:e.defaultError}:void 0===e.data?{message:null!=n?n:e.defaultError}:{message:null!=r?r:e.defaultError};return{errorMap:o,description:i}}class R{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return f(t.data)}_getOrReturnCtx(t,e){return e||{common:t.parent.common,data:t.data,parsedType:f(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new A,ctx:{common:t.parent.common,data:t.data,parsedType:f(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let e=this._parse(t);if(C(e))throw Error("Synchronous parse encountered promise.");return e}_parseAsync(t){let e=this._parse(t);return Promise.resolve(e)}parse(t,e){let r=this.safeParse(t,e);if(r.success)return r.data;throw r.error}safeParse(t,e){var r;let n={common:{issues:[],async:null!==(r=null==e?void 0:e.async)&&void 0!==r&&r,contextualErrorMap:null==e?void 0:e.errorMap},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:f(t)},i=this._parseSync({data:t,path:n.path,parent:n});return I(n,i)}async parseAsync(t,e){let r=await this.safeParseAsync(t,e);if(r.success)return r.data;throw r.error}async safeParseAsync(t,e){let r={common:{issues:[],contextualErrorMap:null==e?void 0:e.errorMap,async:!0},path:(null==e?void 0:e.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:f(t)},n=this._parse({data:t,path:r.path,parent:r}),i=await (C(n)?n:Promise.resolve(n));return I(r,i)}refine(t,e){let r=t=>"string"==typeof e||void 0===e?{message:e}:"function"==typeof e?e(t):e;return this._refinement((e,n)=>{let i=t(e),o=()=>n.addIssue({code:p.custom,...r(e)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(t=>!!t||(o(),!1)):!!i||(o(),!1)})}refinement(t,e){return this._refinement((r,n)=>!!t(r)||(n.addIssue("function"==typeof e?e(r,n):e),!1))}_refinement(t){return new tg({schema:this,typeName:h.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return tv.create(this,this._def)}nullable(){return ty.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $.create(this,this._def)}promise(){return tm.create(this,this._def)}or(t){return te.create([this,t],this._def)}and(t){return ti.create(this,t,this._def)}transform(t){return new tg({...B(this._def),schema:this,typeName:h.ZodEffects,effect:{type:"transform",transform:t}})}default(t){return new tb({...B(this._def),innerType:this,defaultValue:"function"==typeof t?t:()=>t,typeName:h.ZodDefault})}brand(){return new tx({typeName:h.ZodBranded,type:this,...B(this._def)})}catch(t){return new tw({...B(this._def),innerType:this,catchValue:"function"==typeof t?t:()=>t,typeName:h.ZodCatch})}describe(t){let e=this.constructor;return new e({...this._def,description:t})}pipe(t){return tk.create(this,t)}readonly(){return t_.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let T=/^c[^\s-]{8,}$/i,N=/^[a-z][a-z0-9]*$/,O=/^[0-9A-HJKMNP-TV-Z]{26}$/,D=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,F=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,U=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,H=t=>t.precision?t.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):0===t.precision?t.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class G extends R{_parse(t){let e;this._def.coerce&&(t.data=String(t.data));let r=this._getType(t);if(r!==d.string){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.string,received:e.parsedType}),E}let i=new A;for(let r of this._def.checks)if("min"===r.kind)t.data.lengthr.value&&(w(e=this._getOrReturnCtx(t,e),{code:p.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),i.dirty());else if("length"===r.kind){let n=t.data.length>r.value,o=t.data.lengtht.test(e),{validation:e,code:p.invalid_string,...l.errToObj(r)})}_addCheck(t){return new G({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...l.errToObj(t)})}url(t){return this._addCheck({kind:"url",...l.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...l.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...l.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...l.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...l.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...l.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...l.errToObj(t)})}datetime(t){var e;return"string"==typeof t?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:void 0===(null==t?void 0:t.precision)?null:null==t?void 0:t.precision,offset:null!==(e=null==t?void 0:t.offset)&&void 0!==e&&e,...l.errToObj(null==t?void 0:t.message)})}regex(t,e){return this._addCheck({kind:"regex",regex:t,...l.errToObj(e)})}includes(t,e){return this._addCheck({kind:"includes",value:t,position:null==e?void 0:e.position,...l.errToObj(null==e?void 0:e.message)})}startsWith(t,e){return this._addCheck({kind:"startsWith",value:t,...l.errToObj(e)})}endsWith(t,e){return this._addCheck({kind:"endsWith",value:t,...l.errToObj(e)})}min(t,e){return this._addCheck({kind:"min",value:t,...l.errToObj(e)})}max(t,e){return this._addCheck({kind:"max",value:t,...l.errToObj(e)})}length(t,e){return this._addCheck({kind:"length",value:t,...l.errToObj(e)})}nonempty(t){return this.min(1,l.errToObj(t))}trim(){return new G({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new G({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>"datetime"===t.kind)}get isEmail(){return!!this._def.checks.find(t=>"email"===t.kind)}get isURL(){return!!this._def.checks.find(t=>"url"===t.kind)}get isEmoji(){return!!this._def.checks.find(t=>"emoji"===t.kind)}get isUUID(){return!!this._def.checks.find(t=>"uuid"===t.kind)}get isCUID(){return!!this._def.checks.find(t=>"cuid"===t.kind)}get isCUID2(){return!!this._def.checks.find(t=>"cuid2"===t.kind)}get isULID(){return!!this._def.checks.find(t=>"ulid"===t.kind)}get isIP(){return!!this._def.checks.find(t=>"ip"===t.kind)}get minLength(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxLength(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value{var e;return new G({checks:[],typeName:h.ZodString,coerce:null!==(e=null==t?void 0:t.coerce)&&void 0!==e&&e,...B(t)})};class j extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){let e;this._def.coerce&&(t.data=Number(t.data));let r=this._getType(t);if(r!==d.number){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.number,received:e.parsedType}),E}let n=new A;for(let r of this._def.checks)if("int"===r.kind)a.isInteger(t.data)||(w(e=this._getOrReturnCtx(t,e),{code:p.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){let i=r.inclusive?t.datar.value:t.data>=r.value;i&&(w(e=this._getOrReturnCtx(t,e),{code:p.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==function(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),s=parseInt(e.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}(t.data,r.value)&&(w(e=this._getOrReturnCtx(t,e),{code:p.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(t.data)||(w(e=this._getOrReturnCtx(t,e),{code:p.not_finite,message:r.message}),n.dirty()):a.assertNever(r);return{status:n.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,l.toString(e))}gt(t,e){return this.setLimit("min",t,!1,l.toString(e))}lte(t,e){return this.setLimit("max",t,!0,l.toString(e))}lt(t,e){return this.setLimit("max",t,!1,l.toString(e))}setLimit(t,e,r,n){return new j({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:l.toString(n)}]})}_addCheck(t){return new j({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:l.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:l.toString(e)})}finite(t){return this._addCheck({kind:"finite",message:l.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(t)})}get minValue(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value"int"===t.kind||"multipleOf"===t.kind&&a.isInteger(t.value))}get isFinite(){let t=null,e=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===e||r.value>e)&&(e=r.value):"max"===r.kind&&(null===t||r.valuenew j({checks:[],typeName:h.ZodNumber,coerce:(null==t?void 0:t.coerce)||!1,...B(t)});class z extends R{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){let e;this._def.coerce&&(t.data=BigInt(t.data));let r=this._getType(t);if(r!==d.bigint){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.bigint,received:e.parsedType}),E}let n=new A;for(let r of this._def.checks)if("min"===r.kind){let i=r.inclusive?t.datar.value:t.data>=r.value;i&&(w(e=this._getOrReturnCtx(t,e),{code:p.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?t.data%r.value!==BigInt(0)&&(w(e=this._getOrReturnCtx(t,e),{code:p.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):a.assertNever(r);return{status:n.value,value:t.data}}gte(t,e){return this.setLimit("min",t,!0,l.toString(e))}gt(t,e){return this.setLimit("min",t,!1,l.toString(e))}lte(t,e){return this.setLimit("max",t,!0,l.toString(e))}lt(t,e){return this.setLimit("max",t,!1,l.toString(e))}setLimit(t,e,r,n){return new z({...this._def,checks:[...this._def.checks,{kind:t,value:e,inclusive:r,message:l.toString(n)}]})}_addCheck(t){return new z({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(t)})}multipleOf(t,e){return this._addCheck({kind:"multipleOf",value:t,message:l.toString(e)})}get minValue(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return t}get maxValue(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.value{var e;return new z({checks:[],typeName:h.ZodBigInt,coerce:null!==(e=null==t?void 0:t.coerce)&&void 0!==e&&e,...B(t)})};class q extends R{_parse(t){this._def.coerce&&(t.data=!!t.data);let e=this._getType(t);if(e!==d.boolean){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.boolean,received:e.parsedType}),E}return k(t.data)}}q.create=t=>new q({typeName:h.ZodBoolean,coerce:(null==t?void 0:t.coerce)||!1,...B(t)});class K extends R{_parse(t){let e;this._def.coerce&&(t.data=new Date(t.data));let r=this._getType(t);if(r!==d.date){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.date,received:e.parsedType}),E}if(isNaN(t.data.getTime())){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_date}),E}let n=new A;for(let r of this._def.checks)"min"===r.kind?t.data.getTime()r.value&&(w(e=this._getOrReturnCtx(t,e),{code:p.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):a.assertNever(r);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new K({...this._def,checks:[...this._def.checks,t]})}min(t,e){return this._addCheck({kind:"min",value:t.getTime(),message:l.toString(e)})}max(t,e){return this._addCheck({kind:"max",value:t.getTime(),message:l.toString(e)})}get minDate(){let t=null;for(let e of this._def.checks)"min"===e.kind&&(null===t||e.value>t)&&(t=e.value);return null!=t?new Date(t):null}get maxDate(){let t=null;for(let e of this._def.checks)"max"===e.kind&&(null===t||e.valuenew K({checks:[],coerce:(null==t?void 0:t.coerce)||!1,typeName:h.ZodDate,...B(t)});class Q extends R{_parse(t){let e=this._getType(t);if(e!==d.symbol){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.symbol,received:e.parsedType}),E}return k(t.data)}}Q.create=t=>new Q({typeName:h.ZodSymbol,...B(t)});class Y extends R{_parse(t){let e=this._getType(t);if(e!==d.undefined){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.undefined,received:e.parsedType}),E}return k(t.data)}}Y.create=t=>new Y({typeName:h.ZodUndefined,...B(t)});class Z extends R{_parse(t){let e=this._getType(t);if(e!==d.null){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.null,received:e.parsedType}),E}return k(t.data)}}Z.create=t=>new Z({typeName:h.ZodNull,...B(t)});class V extends R{constructor(){super(...arguments),this._any=!0}_parse(t){return k(t.data)}}V.create=t=>new V({typeName:h.ZodAny,...B(t)});class J extends R{constructor(){super(...arguments),this._unknown=!0}_parse(t){return k(t.data)}}J.create=t=>new J({typeName:h.ZodUnknown,...B(t)});class W extends R{_parse(t){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.never,received:e.parsedType}),E}}W.create=t=>new W({typeName:h.ZodNever,...B(t)});class X extends R{_parse(t){let e=this._getType(t);if(e!==d.undefined){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.void,received:e.parsedType}),E}return k(t.data)}}X.create=t=>new X({typeName:h.ZodVoid,...B(t)});class $ extends R{_parse(t){let{ctx:e,status:r}=this._processInputParams(t),n=this._def;if(e.parsedType!==d.array)return w(e,{code:p.invalid_type,expected:d.array,received:e.parsedType}),E;if(null!==n.exactLength){let t=e.data.length>n.exactLength.value,i=e.data.lengthn.maxLength.value&&(w(e,{code:p.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),e.common.async)return Promise.all([...e.data].map((t,r)=>n.type._parseAsync(new P(e,t,e.path,r)))).then(t=>A.mergeArray(r,t));let i=[...e.data].map((t,r)=>n.type._parseSync(new P(e,t,e.path,r)));return A.mergeArray(r,i)}get element(){return this._def.type}min(t,e){return new $({...this._def,minLength:{value:t,message:l.toString(e)}})}max(t,e){return new $({...this._def,maxLength:{value:t,message:l.toString(e)}})}length(t,e){return new $({...this._def,exactLength:{value:t,message:l.toString(e)}})}nonempty(t){return this.min(1,t)}}$.create=(t,e)=>new $({type:t,minLength:null,maxLength:null,exactLength:null,typeName:h.ZodArray,...B(e)});class tt extends R{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let t=this._def.shape(),e=a.objectKeys(t);return this._cached={shape:t,keys:e}}_parse(t){let e=this._getType(t);if(e!==d.object){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.object,received:e.parsedType}),E}let{status:r,ctx:n}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(let t in n.data)o.includes(t)||s.push(t);let a=[];for(let t of o){let e=i[t],r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new P(n,r,n.path,t)),alwaysSet:t in n.data})}if(this._def.catchall instanceof W){let t=this._def.unknownKeys;if("passthrough"===t)for(let t of s)a.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===t)s.length>0&&(w(n,{code:p.unrecognized_keys,keys:s}),r.dirty());else if("strip"===t);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let t=this._def.catchall;for(let e of s){let r=n.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new P(n,r,n.path,e)),alwaysSet:e in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let t=[];for(let e of a){let r=await e.key;t.push({key:r,value:await e.value,alwaysSet:e.alwaysSet})}return t}).then(t=>A.mergeObjectSync(r,t)):A.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(t){return l.errToObj,new tt({...this._def,unknownKeys:"strict",...void 0!==t?{errorMap:(e,r)=>{var n,i,o,s;let a=null!==(o=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,e,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===e.code?{message:null!==(s=l.errToObj(t).message)&&void 0!==s?s:a}:{message:a}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){let e=new tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:h.ZodObject});return e}setKey(t,e){return this.augment({[t]:e})}catchall(t){return new tt({...this._def,catchall:t})}pick(t){let e={};return a.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(e[r]=this.shape[r])}),new tt({...this._def,shape:()=>e})}omit(t){let e={};return a.objectKeys(this.shape).forEach(r=>{t[r]||(e[r]=this.shape[r])}),new tt({...this._def,shape:()=>e})}deepPartial(){return function t(e){if(e instanceof tt){let r={};for(let n in e.shape){let i=e.shape[n];r[n]=tv.create(t(i))}return new tt({...e._def,shape:()=>r})}return e instanceof $?new $({...e._def,type:t(e.element)}):e instanceof tv?tv.create(t(e.unwrap())):e instanceof ty?ty.create(t(e.unwrap())):e instanceof to?to.create(e.items.map(e=>t(e))):e}(this)}partial(t){let e={};return a.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];t&&!t[r]?e[r]=n:e[r]=n.optional()}),new tt({...this._def,shape:()=>e})}required(t){let e={};return a.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])e[r]=this.shape[r];else{let t=this.shape[r],n=t;for(;n instanceof tv;)n=n._def.innerType;e[r]=n}}),new tt({...this._def,shape:()=>e})}keyof(){return td(a.objectKeys(this.shape))}}tt.create=(t,e)=>new tt({shape:()=>t,unknownKeys:"strip",catchall:W.create(),typeName:h.ZodObject,...B(e)}),tt.strictCreate=(t,e)=>new tt({shape:()=>t,unknownKeys:"strict",catchall:W.create(),typeName:h.ZodObject,...B(e)}),tt.lazycreate=(t,e)=>new tt({shape:t,unknownKeys:"strip",catchall:W.create(),typeName:h.ZodObject,...B(e)});class te extends R{_parse(t){let{ctx:e}=this._processInputParams(t),r=this._def.options;if(e.common.async)return Promise.all(r.map(async t=>{let r={...e,common:{...e.common,issues:[]},parent:null};return{result:await t._parseAsync({data:e.data,path:e.path,parent:r}),ctx:r}})).then(function(t){for(let e of t)if("valid"===e.result.status)return e.result;for(let r of t)if("dirty"===r.result.status)return e.common.issues.push(...r.ctx.common.issues),r.result;let r=t.map(t=>new g(t.ctx.common.issues));return w(e,{code:p.invalid_union,unionErrors:r}),E});{let t;let n=[];for(let i of r){let r={...e,common:{...e.common,issues:[]},parent:null},o=i._parseSync({data:e.data,path:e.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||t||(t={result:o,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(t)return e.common.issues.push(...t.ctx.common.issues),t.result;let i=n.map(t=>new g(t));return w(e,{code:p.invalid_union,unionErrors:i}),E}}get options(){return this._def.options}}te.create=(t,e)=>new te({options:t,typeName:h.ZodUnion,...B(e)});let tr=t=>{if(t instanceof th)return tr(t.schema);if(t instanceof tg)return tr(t.innerType());if(t instanceof tc)return[t.value];if(t instanceof tf)return t.options;if(t instanceof tp)return Object.keys(t.enum);if(t instanceof tb)return tr(t._def.innerType);if(t instanceof Y)return[void 0];else if(t instanceof Z)return[null];else return null};class tn extends R{_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==d.object)return w(e,{code:p.invalid_type,expected:d.object,received:e.parsedType}),E;let r=this.discriminator,n=e.data[r],i=this.optionsMap.get(n);return i?e.common.async?i._parseAsync({data:e.data,path:e.path,parent:e}):i._parseSync({data:e.data,path:e.path,parent:e}):(w(e,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),E)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,e,r){let n=new Map;for(let r of e){let e=tr(r.shape[t]);if(!e)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let i of e){if(n.has(i))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(i)}`);n.set(i,r)}}return new tn({typeName:h.ZodDiscriminatedUnion,discriminator:t,options:e,optionsMap:n,...B(r)})}}class ti extends R{_parse(t){let{status:e,ctx:r}=this._processInputParams(t),n=(t,n)=>{if(_(t)||_(n))return E;let i=function t(e,r){let n=f(e),i=f(r);if(e===r)return{valid:!0,data:e};if(n===d.object&&i===d.object){let n=a.objectKeys(r),i=a.objectKeys(e).filter(t=>-1!==n.indexOf(t)),o={...e,...r};for(let n of i){let i=t(e[n],r[n]);if(!i.valid)return{valid:!1};o[n]=i.data}return{valid:!0,data:o}}if(n===d.array&&i===d.array){if(e.length!==r.length)return{valid:!1};let n=[];for(let i=0;in(t,e)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ti.create=(t,e,r)=>new ti({left:t,right:e,typeName:h.ZodIntersection,...B(r)});class to extends R{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.array)return w(r,{code:p.invalid_type,expected:d.array,received:r.parsedType}),E;if(r.data.lengththis._def.items.length&&(w(r,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),e.dirty());let i=[...r.data].map((t,e)=>{let n=this._def.items[e]||this._def.rest;return n?n._parse(new P(r,t,r.path,e)):null}).filter(t=>!!t);return r.common.async?Promise.all(i).then(t=>A.mergeArray(e,t)):A.mergeArray(e,i)}get items(){return this._def.items}rest(t){return new to({...this._def,rest:t})}}to.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new to({items:t,typeName:h.ZodTuple,rest:null,...B(e)})};class ts extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.object)return w(r,{code:p.invalid_type,expected:d.object,received:r.parsedType}),E;let n=[],i=this._def.keyType,o=this._def.valueType;for(let t in r.data)n.push({key:i._parse(new P(r,t,r.path,t)),value:o._parse(new P(r,r.data[t],r.path,t))});return r.common.async?A.mergeObjectAsync(e,n):A.mergeObjectSync(e,n)}get element(){return this._def.valueType}static create(t,e,r){return new ts(e instanceof R?{keyType:t,valueType:e,typeName:h.ZodRecord,...B(r)}:{keyType:G.create(),valueType:t,typeName:h.ZodRecord,...B(e)})}}class ta extends R{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.map)return w(r,{code:p.invalid_type,expected:d.map,received:r.parsedType}),E;let n=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([t,e],o)=>({key:n._parse(new P(r,t,r.path,[o,"key"])),value:i._parse(new P(r,e,r.path,[o,"value"]))}));if(r.common.async){let t=new Map;return Promise.resolve().then(async()=>{for(let r of o){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return E;("dirty"===n.status||"dirty"===i.status)&&e.dirty(),t.set(n.value,i.value)}return{status:e.value,value:t}})}{let t=new Map;for(let r of o){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return E;("dirty"===n.status||"dirty"===i.status)&&e.dirty(),t.set(n.value,i.value)}return{status:e.value,value:t}}}}ta.create=(t,e,r)=>new ta({valueType:e,keyType:t,typeName:h.ZodMap,...B(r)});class tu extends R{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.parsedType!==d.set)return w(r,{code:p.invalid_type,expected:d.set,received:r.parsedType}),E;let n=this._def;null!==n.minSize&&r.data.sizen.maxSize.value&&(w(r,{code:p.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),e.dirty());let i=this._def.valueType;function o(t){let r=new Set;for(let n of t){if("aborted"===n.status)return E;"dirty"===n.status&&e.dirty(),r.add(n.value)}return{status:e.value,value:r}}let s=[...r.data.values()].map((t,e)=>i._parse(new P(r,t,r.path,e)));return r.common.async?Promise.all(s).then(t=>o(t)):o(s)}min(t,e){return new tu({...this._def,minSize:{value:t,message:l.toString(e)}})}max(t,e){return new tu({...this._def,maxSize:{value:t,message:l.toString(e)}})}size(t,e){return this.min(t,e).max(t,e)}nonempty(t){return this.min(1,t)}}tu.create=(t,e)=>new tu({valueType:t,minSize:null,maxSize:null,typeName:h.ZodSet,...B(e)});class tl extends R{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==d.function)return w(e,{code:p.invalid_type,expected:d.function,received:e.parsedType}),E;function r(t,r){return b({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,y,v].filter(t=>!!t),issueData:{code:p.invalid_arguments,argumentsError:r}})}function n(t,r){return b({data:t,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,y,v].filter(t=>!!t),issueData:{code:p.invalid_return_type,returnTypeError:r}})}let i={errorMap:e.common.contextualErrorMap},o=e.data;if(this._def.returns instanceof tm){let t=this;return k(async function(...e){let s=new g([]),a=await t._def.args.parseAsync(e,i).catch(t=>{throw s.addIssue(r(e,t)),s}),u=await Reflect.apply(o,this,a),l=await t._def.returns._def.type.parseAsync(u,i).catch(t=>{throw s.addIssue(n(u,t)),s});return l})}{let t=this;return k(function(...e){let s=t._def.args.safeParse(e,i);if(!s.success)throw new g([r(e,s.error)]);let a=Reflect.apply(o,this,s.data),u=t._def.returns.safeParse(a,i);if(!u.success)throw new g([n(a,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new tl({...this._def,args:to.create(t).rest(J.create())})}returns(t){return new tl({...this._def,returns:t})}implement(t){let e=this.parse(t);return e}strictImplement(t){let e=this.parse(t);return e}static create(t,e,r){return new tl({args:t||to.create([]).rest(J.create()),returns:e||J.create(),typeName:h.ZodFunction,...B(r)})}}class th extends R{get schema(){return this._def.getter()}_parse(t){let{ctx:e}=this._processInputParams(t),r=this._def.getter();return r._parse({data:e.data,path:e.path,parent:e})}}th.create=(t,e)=>new th({getter:t,typeName:h.ZodLazy,...B(e)});class tc extends R{_parse(t){if(t.data!==this._def.value){let e=this._getOrReturnCtx(t);return w(e,{received:e.data,code:p.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:t.data}}get value(){return this._def.value}}function td(t,e){return new tf({values:t,typeName:h.ZodEnum,...B(e)})}tc.create=(t,e)=>new tc({value:t,typeName:h.ZodLiteral,...B(e)});class tf extends R{_parse(t){if("string"!=typeof t.data){let e=this._getOrReturnCtx(t),r=this._def.values;return w(e,{expected:a.joinValues(r),received:e.parsedType,code:p.invalid_type}),E}if(-1===this._def.values.indexOf(t.data)){let e=this._getOrReturnCtx(t),r=this._def.values;return w(e,{received:e.data,code:p.invalid_enum_value,options:r}),E}return k(t.data)}get options(){return this._def.values}get enum(){let t={};for(let e of this._def.values)t[e]=e;return t}get Values(){let t={};for(let e of this._def.values)t[e]=e;return t}get Enum(){let t={};for(let e of this._def.values)t[e]=e;return t}extract(t){return tf.create(t)}exclude(t){return tf.create(this.options.filter(e=>!t.includes(e)))}}tf.create=td;class tp extends R{_parse(t){let e=a.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==d.string&&r.parsedType!==d.number){let t=a.objectValues(e);return w(r,{expected:a.joinValues(t),received:r.parsedType,code:p.invalid_type}),E}if(-1===e.indexOf(t.data)){let t=a.objectValues(e);return w(r,{received:r.data,code:p.invalid_enum_value,options:t}),E}return k(t.data)}get enum(){return this._def.values}}tp.create=(t,e)=>new tp({values:t,typeName:h.ZodNativeEnum,...B(e)});class tm extends R{unwrap(){return this._def.type}_parse(t){let{ctx:e}=this._processInputParams(t);if(e.parsedType!==d.promise&&!1===e.common.async)return w(e,{code:p.invalid_type,expected:d.promise,received:e.parsedType}),E;let r=e.parsedType===d.promise?e.data:Promise.resolve(e.data);return k(r.then(t=>this._def.type.parseAsync(t,{path:e.path,errorMap:e.common.contextualErrorMap})))}}tm.create=(t,e)=>new tm({type:t,typeName:h.ZodPromise,...B(e)});class tg extends R{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===h.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:e,ctx:r}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:t=>{w(r,t),t.fatal?e.abort():e.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let t=n.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(t).then(t=>this._def.schema._parseAsync({data:t,path:r.path,parent:r})):this._def.schema._parseSync({data:t,path:r.path,parent:r})}if("refinement"===n.type){let t=t=>{let e=n.refinement(t,i);if(r.common.async)return Promise.resolve(e);if(e instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return t};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?E:("dirty"===r.status&&e.dirty(),t(r.value).then(()=>({status:e.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?E:("dirty"===n.status&&e.dirty(),t(n.value),{status:e.value,value:n.value})}}if("transform"===n.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(t=>M(t)?Promise.resolve(n.transform(t.value,i)).then(t=>({status:e.value,value:t})):t);{let t=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!M(t))return t;let o=n.transform(t.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:o}}}a.assertNever(n)}}tg.create=(t,e,r)=>new tg({schema:t,typeName:h.ZodEffects,effect:e,...B(r)}),tg.createWithPreprocess=(t,e,r)=>new tg({schema:e,effect:{type:"preprocess",transform:t},typeName:h.ZodEffects,...B(r)});class tv extends R{_parse(t){let e=this._getType(t);return e===d.undefined?k(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}tv.create=(t,e)=>new tv({innerType:t,typeName:h.ZodOptional,...B(e)});class ty extends R{_parse(t){let e=this._getType(t);return e===d.null?k(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ty.create=(t,e)=>new ty({innerType:t,typeName:h.ZodNullable,...B(e)});class tb extends R{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;return e.parsedType===d.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:e.path,parent:e})}removeDefault(){return this._def.innerType}}tb.create=(t,e)=>new tb({innerType:t,typeName:h.ZodDefault,defaultValue:"function"==typeof e.default?e.default:()=>e.default,...B(e)});class tw extends R{_parse(t){let{ctx:e}=this._processInputParams(t),r={...e,common:{...e.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return C(n)?n.then(t=>({status:"valid",value:"valid"===t.status?t.value:this._def.catchValue({get error(){return new g(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new g(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}tw.create=(t,e)=>new tw({innerType:t,typeName:h.ZodCatch,catchValue:"function"==typeof e.catch?e.catch:()=>e.catch,...B(e)});class tA extends R{_parse(t){let e=this._getType(t);if(e!==d.nan){let e=this._getOrReturnCtx(t);return w(e,{code:p.invalid_type,expected:d.nan,received:e.parsedType}),E}return{status:"valid",value:t.data}}}tA.create=t=>new tA({typeName:h.ZodNaN,...B(t)});let tE=Symbol("zod_brand");class tx extends R{_parse(t){let{ctx:e}=this._processInputParams(t),r=e.data;return this._def.type._parse({data:r,path:e.path,parent:e})}unwrap(){return this._def.type}}class tk extends R{_parse(t){let{status:e,ctx:r}=this._processInputParams(t);if(r.common.async){let t=async()=>{let t=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===t.status?E:"dirty"===t.status?(e.dirty(),x(t.value)):this._def.out._parseAsync({data:t.value,path:r.path,parent:r})};return t()}{let t=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===t.status?E:"dirty"===t.status?(e.dirty(),{status:"dirty",value:t.value}):this._def.out._parseSync({data:t.value,path:r.path,parent:r})}}static create(t,e){return new tk({in:t,out:e,typeName:h.ZodPipeline})}}class t_ extends R{_parse(t){let e=this._def.innerType._parse(t);return M(e)&&(e.value=Object.freeze(e.value)),e}}t_.create=(t,e)=>new t_({innerType:t,typeName:h.ZodReadonly,...B(e)});let tS=(t,e={},r)=>t?V.create().superRefine((n,i)=>{var o,s;if(!t(n)){let t="function"==typeof e?e(n):"string"==typeof e?{message:e}:e,a=null===(s=null!==(o=t.fatal)&&void 0!==o?o:r)||void 0===s||s;i.addIssue({code:"custom",..."string"==typeof t?{message:t}:t,fatal:a})}}):V.create(),tM={object:tt.lazycreate};(s=h||(h={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly";let tC=(t,e={message:`Input not instance of ${t.name}`})=>tS(e=>e instanceof t,e),tP=G.create,tI=j.create,tB=tA.create,tR=z.create,tT=q.create,tN=K.create,tO=Q.create,tD=Y.create,tL=Z.create,tF=V.create,tU=J.create,tH=W.create,tG=X.create,tj=$.create,tz=tt.create,tq=tt.strictCreate,tK=te.create,tQ=tn.create,tY=ti.create,tZ=to.create,tV=ts.create,tJ=ta.create,tW=tu.create,tX=tl.create,t$=th.create,t0=tc.create,t1=tf.create,t2=tp.create,t3=tm.create,t6=tg.create,t4=tv.create,t5=ty.create,t8=tg.createWithPreprocess,t7=tk.create,t9=()=>tP().optional(),et=()=>tI().optional(),ee=()=>tT().optional();var er=Object.freeze({__proto__:null,defaultErrorMap:v,setErrorMap:function(t){y=t},getErrorMap:function(){return y},makeIssue:b,EMPTY_PATH:[],addIssueToContext:w,ParseStatus:A,INVALID:E,DIRTY:x,OK:k,isAborted:_,isDirty:S,isValid:M,isAsync:C,get util(){return a},get objectUtil(){return u},ZodParsedType:d,getParsedType:f,ZodType:R,ZodString:G,ZodNumber:j,ZodBigInt:z,ZodBoolean:q,ZodDate:K,ZodSymbol:Q,ZodUndefined:Y,ZodNull:Z,ZodAny:V,ZodUnknown:J,ZodNever:W,ZodVoid:X,ZodArray:$,ZodObject:tt,ZodUnion:te,ZodDiscriminatedUnion:tn,ZodIntersection:ti,ZodTuple:to,ZodRecord:ts,ZodMap:ta,ZodSet:tu,ZodFunction:tl,ZodLazy:th,ZodLiteral:tc,ZodEnum:tf,ZodNativeEnum:tp,ZodPromise:tm,ZodEffects:tg,ZodTransformer:tg,ZodOptional:tv,ZodNullable:ty,ZodDefault:tb,ZodCatch:tw,ZodNaN:tA,BRAND:tE,ZodBranded:tx,ZodPipeline:tk,ZodReadonly:t_,custom:tS,Schema:R,ZodSchema:R,late:tM,get ZodFirstPartyTypeKind(){return h},coerce:{string:t=>G.create({...t,coerce:!0}),number:t=>j.create({...t,coerce:!0}),boolean:t=>q.create({...t,coerce:!0}),bigint:t=>z.create({...t,coerce:!0}),date:t=>K.create({...t,coerce:!0})},any:tF,array:tj,bigint:tR,boolean:tT,date:tN,discriminatedUnion:tQ,effect:t6,enum:t1,function:tX,instanceof:tC,intersection:tY,lazy:t$,literal:t0,map:tJ,nan:tB,nativeEnum:t2,never:tH,null:tL,nullable:t5,number:tI,object:tz,oboolean:ee,onumber:et,optional:t4,ostring:t9,pipeline:t7,preprocess:t8,promise:t3,record:tV,set:tW,strictObject:tq,string:tP,symbol:tO,transformer:t6,tuple:tZ,undefined:tD,union:tK,unknown:tU,void:tG,NEVER:E,ZodIssueCode:p,quotelessJson:m,ZodError:g}),en=r(9973);let ei=t=>t.message?t.message:"unspecified error";class eo extends en.GkU{constructor(t){super(),this.code=en.oDX,this.errors=t,super.message=`Web3 validator found ${t.length} error[s]: +${this._compileErrors().join("\n")}`}_compileErrors(){return this.errors.map(ei)}}var es=r(1742),ea=r(7325);let eu=["bool","int","uint","bytes","string","address","tuple"],el=t=>"object"==typeof t&&"type"in t&&"name"in t,eh=t=>"string"==typeof t,ec=t=>"string"==typeof t&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(t);function ed(t,e){return"string"==typeof t&&!!t.match(/^0x[0-9A-Fa-f]*$/)&&(void 0===e||!(e>0)||t.length===2+2*e)}let ef=t=>"number"==typeof t||"bigint"==typeof t||"string"==typeof t&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(t);function ep(t){if("string"!=typeof t)throw Error(`[isHexPrefixed] input must be type 'string', received type ${typeof t}`);return t.startsWith("0x")}let em=function(t){for(let[e,r]of Object.entries(t))if(void 0!==r&&r.length>0&&0===r[0])throw Error(`${e} cannot have leading zeroes, received: ${r.toString()}`)},eg=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],ev=t=>{let e,r=t.replace(/ /,""),n=!1,i=[];if(t.includes("[")&&(r=r.slice(0,r.indexOf("[")),n=(i=[...t.matchAll(/(?:\[(\d*)\])/g)].map(t=>parseInt(t[1],10)).map(t=>Number.isNaN(t)?-1:t)).length>0),eu.includes(r))return{baseType:r,isArray:n,baseTypeSize:e,arraySizes:i};if(r.startsWith("int"))e=parseInt(r.substring(3),10),r="int";else if(r.startsWith("uint"))e=parseInt(t.substring(4),10),r="uint";else{if(!r.startsWith("bytes"))return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};e=parseInt(r.substring(5),10),r="bytes"}return{baseType:r,isArray:n,baseTypeSize:e,arraySizes:i}},ey=(t,e={})=>{let r=Object.keys(e).includes("type");if(r)throw new eo([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:t},instancePath:"",schemaPath:""}]);let{baseType:n,baseTypeSize:i}=ev(t);if(!n&&!eg.includes(t))throw new eo([{keyword:"eth",message:`Eth data type "${t}" is not valid`,params:{eth:t},instancePath:"",schemaPath:""}]);if(n){if("tuple"===n)throw Error('"tuple" type is not implemented directly.');return{format:`${n}${null!=i?i:""}`,required:!0}}return t?{format:t,required:!0}:{}},eb=(t,e="/0")=>{let r={type:"array",items:[],maxItems:t.length,minItems:t.length};for(let[n,i]of t.entries()){let t,o,s;let a=[];el(i)?(t=i.type,o=i.name,a=i.components):"string"==typeof i?(t=i,o=`${e}/${n}`):Array.isArray(i)&&(i[0]&&"string"==typeof i[0]&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(t=i[0],o=`${e}/${n}`,a=i[1]):(t="tuple",o=`${e}/${n}`,a=i));let{baseType:u,isArray:l,arraySizes:h}=ev(t),c=r;for(let t=h.length-1;t>0;t-=1)s={type:"array",items:[],maxItems:h[t],minItems:h[t]},h[t]<0&&(delete s.maxItems,delete s.minItems),c.items=s,c=s;if("tuple"!==u||l){if("tuple"===u&&l){let t=h[0],e={$id:o,type:"array",items:eb(a,o),maxItems:t,minItems:t};t<0&&(delete e.maxItems,delete e.minItems),c.items.push(e)}else if(l){let t=h[0],e={type:"array",$id:o,items:ey(String(u)),minItems:t,maxItems:t};t<0&&(delete e.maxItems,delete e.minItems),c.items.push(e)}else Array.isArray(c.items)?c.items.push(Object.assign({$id:o},ey(t))):c.items.items.push(Object.assign({$id:o},ey(t)))}else{let t=eb(a,o);t.$id=o,c.items.push(t)}}return r},ew=t=>eb(t),eA=(t,e)=>1===e?t:eA(t[0],e-1),eE=(t,e,r)=>{let n=[];for(let[i,o]of t.entries()){let t,s;let a=[];el(o)?(t=o.type,s=o.name,a=o.components):"string"==typeof o?t=o:Array.isArray(o)&&(o[1]&&Array.isArray(o[1])?(t=o[0],a=o[1]):(t="tuple",a=o));let{baseType:u,isArray:l,arraySizes:h}=ev(t),c=Array.isArray(e)?e[i]:e[s];if("tuple"!==u||l){if("tuple"===u&&l){let t=[];for(let e of c)if(h.length>1){let n=eA(e,h.length-1),i=[];for(let t of n)i.push(eE(a,t,r));t.push(i)}else t.push(eE(a,e,r));n.push(t)}else n.push(c)}else n.push(eE(a,c,r))}return(r=null!=r?r:[]).push(...n),r},ex=t=>{if(t>=48&&t<=57)return t-48;if(t>=65&&t<=70)return t-55;if(t>=97&&t<=102)return t-87;throw Error(`Invalid code point: ${t}`)},ek=t=>{if(!ec(t))throw Error("Invalid hex string");let[e,r]=t.startsWith("-")?[!0,t.slice(1)]:[!1,t],n=BigInt(r);return n>Number.MAX_SAFE_INTEGER?e?-n:n:n{if(("number"==typeof t||"bigint"==typeof t)&&t<0)return`-0x${t.toString(16).slice(1)}`;if(("number"==typeof t||"bigint"==typeof t)&&t>=0)return`0x${t.toString(16)}`;if("string"==typeof t&&ec(t)){let[e,r]=t.startsWith("-")?[!0,t.slice(1)]:[!1,t],n=r.split(/^(-)?0(x|X)/).slice(-1)[0];return`${e?"-":""}0x${n.replace(/^0+/,"").toLowerCase()}`}if("string"==typeof t&&!ec(t))return e_(BigInt(t));throw new en.NL0(t)},eS=(t,e,r="0")=>{if("string"==typeof t&&!ec(t))return t.padStart(e,r);let n="string"==typeof t&&ec(t)?t:e_(t),[i,o]=n.startsWith("-")?["-0x",n.slice(3)]:["0x",n.slice(2)];return`${i}${o.padStart(e,r)}`};function eM(t){let e="0x";for(let r of t){let t=r.toString(16);e+=1===t.length?`0${t}`:t}return e}function eC(t){let e;if((e=t.toLowerCase().startsWith("0x")?t.slice(2):t).length%2!=0)throw new en.ABz(`hex string has odd length: ${t}`);let r=new Uint8Array(Math.ceil(e.length/2));for(let t=0;t{if(!/^(0x)?[0-9a-f]{40}$/i.test(t))return!1;let e=t.slice(2),r=(0,ea.iY)(e.toLowerCase()),n=eM((0,es.wn)(r)).slice(2);for(let t=0;t<40;t+=1)if(parseInt(n[t],16)>7&&e[t].toUpperCase()!==e[t]||7>=parseInt(n[t],16)&&e[t].toLowerCase()!==e[t])return!1;return!0},eI=(t,e=!0)=>{let r;return!!("string"==typeof t||t instanceof Uint8Array)&&(r=t instanceof Uint8Array?eM(t):"string"!=typeof t||ec(t)?t:t.toLowerCase().startsWith("0x")?t:`0x${t}`,!!/^(0x)?[0-9a-f]{40}$/i.test(r)&&(!!(/^(0x|0X)?[0-9a-f]{40}$/.test(r)||/^(0x|0X)?[0-9A-F]{40}$/.test(r))||!e||eP(r)))};var eB=r(6636);let eR=(t,e={abiType:"uint"})=>{let r;if(!["number","string","bigint"].includes(typeof t)||"string"==typeof t&&0===t.length)return!1;if(null==e?void 0:e.abiType){let{baseTypeSize:t}=ev(e.abiType);t&&(r=t)}else e.bitSize&&(r=e.bitSize);let n=BigInt(2)**BigInt(null!=r?r:256)-BigInt(1);try{let e="string"==typeof t&&ec(t)?BigInt(ek(t)):BigInt(t);return e>=0&&e<=n}catch(t){return!1}},eT=(t,e={abiType:"int"})=>{let r;if(!["number","string","bigint"].includes(typeof t)||"number"==typeof t&&t>Number.MAX_SAFE_INTEGER)return!1;if(null==e?void 0:e.abiType){let{baseTypeSize:t,baseType:n}=ev(e.abiType);if("int"!==n)return!1;t&&(r=t)}else e.bitSize&&(r=e.bitSize);let n=BigInt(2)**BigInt((null!=r?r:256)-1),i=BigInt(-1)*BigInt(2)**BigInt((null!=r?r:256)-1);try{let e="string"==typeof t&&ec(t)?BigInt(ek(t)):BigInt(t);return e>=i&&e<=n}catch(t){return!1}},eN=t=>!!(eT(t)||"string"==typeof t&&/[0-9.]/.test(t)&&t.indexOf(".")===t.lastIndexOf("."))||"number"==typeof t,eO=t=>eR(t),eD=t=>Object.values(eB.U1).includes(t),eL=t=>eD(t)||eO(t),eF=t=>!!("string"==typeof t&&/^(0x)?[0-9a-f]{512}$/i.test(t))&&!!(/^(0x)?[0-9a-f]{512}$/.test(t)||/^(0x)?[0-9A-F]{512}$/.test(t)),eU=(t,e)=>{if("string"==typeof e&&!ec(e)||!eF(t))return!1;let r="string"==typeof e?eC(e):e,n=eM((0,es.wn)(r)).slice(2);for(let e=0;e<12;e+=4){let r=(parseInt(n.slice(e,e+2),16)<<8)+parseInt(n.slice(e+2,e+4),16)&2047,i=ex(t.charCodeAt(t.length-1-Math.floor(r/4))),o=1<{if(!eF(t)||!eI(e))return!1;let r=eS(e,64);return eU(t,r)},eG=(t,e)=>!!(eF(t)&&eI(e))&&eU(t,e),ej=t=>!!["number","string","boolean"].includes(typeof t)&&("boolean"==typeof t||("string"!=typeof t||ec(t)?"string"==typeof t&&ec(t)?"0x1"===t||"0x0"===t:1===t||0===t:"1"===t||"0"===t)),ez=(t,e={abiType:"bytes"})=>{let r;if("string"!=typeof t&&!Array.isArray(t)&&!(t instanceof Uint8Array)||"string"==typeof t&&ec(t)&&t.startsWith("-")||"string"==typeof t&&!ec(t))return!1;if("string"==typeof t){if(t.length%2!=0)return!1;r=eC(t)}else if(Array.isArray(t)){if(t.some(t=>t<0||t>255||!Number.isInteger(t)))return!1;r=new Uint8Array(t)}else r=t;if(null==e?void 0:e.abiType){let{baseTypeSize:t}=ev(e.abiType);return!t||r.length===t}return null==e||!e.size||r.length===(null==e?void 0:e.size)},eq=t=>null==t,eK=t=>"object"==typeof t&&!eq(t)&&!Array.isArray(t)&&!(t instanceof eB.c9),eQ=t=>!!("string"==typeof t&&/^(0x)?[0-9a-f]{64}$/i.test(t))&&!!(/^(0x)?[0-9a-f]{64}$/.test(t)||/^(0x)?[0-9A-F]{64}$/.test(t)),eY=(t,e)=>!!(eF(t)&&eQ(e))&&eU(t,e),eZ=t=>{let e=["fromBlock","toBlock","address","topics","blockHash"];if(eq(t)||"object"!=typeof t||!Object.keys(t).every(t=>e.includes(t))||!eq(t.fromBlock)&&!eL(t.fromBlock)||!eq(t.toBlock)&&!eL(t.toBlock))return!1;if(!eq(t.address)){if(Array.isArray(t.address)){if(!t.address.every(t=>eI(t)))return!1}else if(!eI(t.address))return!1}return!!(eq(t.topics)||t.topics.every(t=>!!eq(t)||(Array.isArray(t)?t.every(t=>eQ(t)):!!eQ(t))))},eV={address:t=>eI(t),bloom:t=>eF(t),blockNumber:t=>eO(t),blockTag:t=>eD(t),blockNumberOrTag:t=>eL(t),bool:t=>ej(t),bytes:t=>ez(t),filter:t=>eZ(t),hex:t=>ec(t),uint:t=>eR(t),int:t=>eT(t),number:t=>eN(t),string:t=>eh(t)};for(let t=3;t<=8;t+=1){let e=2**t;eV[`int${e}`]=t=>eT(t,{bitSize:e}),eV[`uint${e}`]=t=>eR(t,{bitSize:e})}for(let t=1;t<=32;t+=1)eV[`bytes${t}`]=e=>ez(e,{size:t});eV.bytes256=eV.bytes;let eJ=t=>{if((!(null==t?void 0:t.type)||(null==t?void 0:t.type)==="object")&&(null==t?void 0:t.properties)){let e={};for(let r of Object.keys(t.properties)){let n=eJ(t.properties[r]);n&&(e[r]=n)}return Array.isArray(t.required)?er.object(e).partial().required(t.required.reduce((t,e)=>Object.assign(Object.assign({},t),{[e]:!0}),{})):er.object(e).partial()}if((null==t?void 0:t.type)==="array"&&(null==t?void 0:t.items)){if(Array.isArray(t.items)&&t.items.length>0){let e=[];for(let r of t.items){let t=eJ(r);t&&e.push(t)}return er.tuple(e)}return er.array(eJ(t.items))}return t.oneOf&&Array.isArray(t.oneOf)?er.union(t.oneOf.map(t=>eJ(t))):(null==t?void 0:t.format)?er.any().refine(eV[t.format],e=>({params:{value:e,format:t.format}})):(null==t?void 0:t.type)&&(null==t?void 0:t.type)!=="object"&&"function"==typeof er[String(t.type)]?er[String(t.type)]():er.object({data:er.any()}).partial()};class eW{static factory(){return eW.validatorInstance||(eW.validatorInstance=new eW),eW.validatorInstance}validate(t,e,r){var n,i;let o=eJ(t),s=o.safeParse(e);if(!s.success){let t=this.convertErrors(null!==(i=null===(n=s.error)||void 0===n?void 0:n.issues)&&void 0!==i?i:[]);if(t){if(null==r?void 0:r.silent)return t;throw new eo(t)}}}convertErrors(t){if(t&&Array.isArray(t)&&t.length>0)return t.map(t=>{var e;let r,n,i,o;o=t.path.join("/");let s=String(t.path[t.path.length-1]),a=t.path.join("/");if(t.code===p.too_big)n="maxItems",o=`${a}/maxItems`,i={limit:t.maximum},r=`must NOT have more than ${t.maximum} items`;else if(t.code===p.too_small)n="minItems",o=`${a}/minItems`,i={limit:t.minimum},r=`must NOT have fewer than ${t.minimum} items`;else if(t.code===p.custom){let{value:n,format:s}=null!==(e=t.params)&&void 0!==e?e:{};r=void 0===n?`value at "/${o}" is required`:`value "${"object"==typeof n?JSON.stringify(n):n}" at "/${o}" must pass "${s}" validation`,i={value:n}}return{keyword:null!=n?n:s,instancePath:a?`/${a}`:"",schemaPath:o?`#${o}`:"#",params:null!=i?i:{value:t.message},message:null!=r?r:t.message}})}}let eX=new class{constructor(){this._validator=eW.factory()}validateJSONSchema(t,e,r){return this._validator.validate(t,e,r)}validate(t,e,r={silent:!1}){var n,i;let o=ew(t);if(!Array.isArray(o.items)||(null===(n=o.items)||void 0===n?void 0:n.length)!==0||0!==e.length){if(Array.isArray(o.items)&&(null===(i=o.items)||void 0===i?void 0:i.length)===0&&0!==e.length)throw new eo([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:e}]);return this._validator.validate(o,e,r)}}}},589:function(t,e,r){"use strict";let n,i,o,s,a,u,l,h,c,d,f,p,m,g,v;r.d(e,{BvB:function(){return ii}});var y,b,w,A,E,x,k,_,S=r(9973),M=r(9449),C=r(8326);class P{constructor(){this._emitter=new C.EventEmitter}on(t,e){this._emitter.on(t,e)}once(t,e){this._emitter.once(t,e)}off(t,e){this._emitter.off(t,e)}emit(t,e){this._emitter.emit(t,e)}listenerCount(t){return this._emitter.listenerCount(t)}listeners(t){return this._emitter.listeners(t)}eventNames(){return this._emitter.eventNames()}removeAllListeners(){return this._emitter.removeAllListeners()}setMaxListenerWarningThreshold(t){this._emitter.setMaxListeners(t)}getMaxListeners(){return this._emitter.getMaxListeners()}}(A||(A={})).CONFIG_CHANGE="CONFIG_CHANGE";class I extends P{constructor(t){super(),this.config={handleRevert:!1,defaultAccount:void 0,defaultBlock:"latest",transactionBlockTimeout:50,transactionConfirmationBlocks:24,transactionPollingInterval:1e3,transactionPollingTimeout:75e4,transactionReceiptPollingInterval:void 0,transactionSendTimeout:75e4,transactionConfirmationPollingInterval:void 0,blockHeaderTimeout:10,maxListenersWarningThreshold:100,contractDataInputFill:"input",defaultNetworkId:void 0,defaultChain:"mainnet",defaultHardfork:"london",defaultCommon:void 0,defaultTransactionType:"0x0",defaultMaxPriorityFeePerGas:(0,M.toHex)(25e8),enableExperimentalFeatures:{useSubscriptionWhenCheckingBlockTimeout:!1,useRpcCallSpecification:!1},transactionBuilder:void 0,transactionTypeParser:void 0},this.setConfig(null!=t?t:{})}setConfig(t){Object.assign(this.config,t)}get handleRevert(){return this.config.handleRevert}set handleRevert(t){this._triggerConfigChange("handleRevert",t),this.config.handleRevert=t}get contractDataInputFill(){return this.config.contractDataInputFill}set contractDataInputFill(t){this._triggerConfigChange("contractDataInputFill",t),this.config.contractDataInputFill=t}get defaultAccount(){return this.config.defaultAccount}set defaultAccount(t){this._triggerConfigChange("defaultAccount",t),this.config.defaultAccount=t}get defaultBlock(){return this.config.defaultBlock}set defaultBlock(t){this._triggerConfigChange("defaultBlock",t),this.config.defaultBlock=t}get transactionSendTimeout(){return this.config.transactionSendTimeout}set transactionSendTimeout(t){this._triggerConfigChange("transactionSendTimeout",t),this.config.transactionSendTimeout=t}get transactionBlockTimeout(){return this.config.transactionBlockTimeout}set transactionBlockTimeout(t){this._triggerConfigChange("transactionBlockTimeout",t),this.config.transactionBlockTimeout=t}get transactionConfirmationBlocks(){return this.config.transactionConfirmationBlocks}set transactionConfirmationBlocks(t){this._triggerConfigChange("transactionConfirmationBlocks",t),this.config.transactionConfirmationBlocks=t}get transactionPollingInterval(){return this.config.transactionPollingInterval}set transactionPollingInterval(t){this._triggerConfigChange("transactionPollingInterval",t),this.config.transactionPollingInterval=t,this.transactionReceiptPollingInterval=t,this.transactionConfirmationPollingInterval=t}get transactionPollingTimeout(){return this.config.transactionPollingTimeout}set transactionPollingTimeout(t){this._triggerConfigChange("transactionPollingTimeout",t),this.config.transactionPollingTimeout=t}get transactionReceiptPollingInterval(){return this.config.transactionReceiptPollingInterval}set transactionReceiptPollingInterval(t){this._triggerConfigChange("transactionReceiptPollingInterval",t),this.config.transactionReceiptPollingInterval=t}get transactionConfirmationPollingInterval(){return this.config.transactionConfirmationPollingInterval}set transactionConfirmationPollingInterval(t){this._triggerConfigChange("transactionConfirmationPollingInterval",t),this.config.transactionConfirmationPollingInterval=t}get blockHeaderTimeout(){return this.config.blockHeaderTimeout}set blockHeaderTimeout(t){this._triggerConfigChange("blockHeaderTimeout",t),this.config.blockHeaderTimeout=t}get enableExperimentalFeatures(){return this.config.enableExperimentalFeatures}set enableExperimentalFeatures(t){this._triggerConfigChange("enableExperimentalFeatures",t),this.config.enableExperimentalFeatures=t}get maxListenersWarningThreshold(){return this.config.maxListenersWarningThreshold}set maxListenersWarningThreshold(t){this._triggerConfigChange("maxListenersWarningThreshold",t),this.setMaxListenerWarningThreshold(t),this.config.maxListenersWarningThreshold=t}get defaultNetworkId(){return this.config.defaultNetworkId}set defaultNetworkId(t){this._triggerConfigChange("defaultNetworkId",t),this.config.defaultNetworkId=t}get defaultChain(){return this.config.defaultChain}set defaultChain(t){if(!(0,M.isNullish)(this.config.defaultCommon)&&!(0,M.isNullish)(this.config.defaultCommon.baseChain)&&t!==this.config.defaultCommon.baseChain)throw new S.KSv(this.config.defaultChain,t);this._triggerConfigChange("defaultChain",t),this.config.defaultChain=t}get defaultHardfork(){return this.config.defaultHardfork}set defaultHardfork(t){if(!(0,M.isNullish)(this.config.defaultCommon)&&!(0,M.isNullish)(this.config.defaultCommon.hardfork)&&t!==this.config.defaultCommon.hardfork)throw new S.uYR(this.config.defaultCommon.hardfork,t);this._triggerConfigChange("defaultHardfork",t),this.config.defaultHardfork=t}get defaultCommon(){return this.config.defaultCommon}set defaultCommon(t){if(!(0,M.isNullish)(this.config.defaultHardfork)&&!(0,M.isNullish)(t)&&!(0,M.isNullish)(t.hardfork)&&this.config.defaultHardfork!==t.hardfork)throw new S.uYR(this.config.defaultHardfork,t.hardfork);if(!(0,M.isNullish)(this.config.defaultChain)&&!(0,M.isNullish)(t)&&!(0,M.isNullish)(t.baseChain)&&this.config.defaultChain!==t.baseChain)throw new S.KSv(this.config.defaultChain,t.baseChain);this._triggerConfigChange("defaultCommon",t),this.config.defaultCommon=t}get defaultTransactionType(){return this.config.defaultTransactionType}set defaultTransactionType(t){this._triggerConfigChange("defaultTransactionType",t),this.config.defaultTransactionType=t}get defaultMaxPriorityFeePerGas(){return this.config.defaultMaxPriorityFeePerGas}set defaultMaxPriorityFeePerGas(t){this._triggerConfigChange("defaultMaxPriorityFeePerGas",t),this.config.defaultMaxPriorityFeePerGas=t}get transactionBuilder(){return this.config.transactionBuilder}set transactionBuilder(t){this._triggerConfigChange("transactionBuilder",t),this.config.transactionBuilder=t}get transactionTypeParser(){return this.config.transactionTypeParser}set transactionTypeParser(t){this._triggerConfigChange("transactionTypeParser",t),this.config.transactionTypeParser=t}_triggerConfigChange(t,e){this.emit(A.CONFIG_CHANGE,{name:t,oldValue:this.config[t],newValue:e})}}var B=r(9186),R=r(6636);class T extends R.EA{constructor(t,e){if(super(),!T.validateClientUrl(t))throw new S.$PL(t);this.clientUrl=t,this.httpProviderOptions=e}static validateClientUrl(t){return"string"==typeof t&&/^http(s)?:\/\//i.test(t)}getStatus(){throw new S.iQ5}supportsSubscriptions(){return!1}request(t,e){var r,n,i,o,s;return n=this,i=void 0,o=void 0,s=function*(){let n=Object.assign(Object.assign({},null===(r=this.httpProviderOptions)||void 0===r?void 0:r.providerOptions),e),i=yield B(this.clientUrl,Object.assign(Object.assign({},n),{method:"POST",headers:Object.assign(Object.assign({},n.headers),{"Content-Type":"application/json"}),body:JSON.stringify(t)}));if(!i.ok)throw new S.VLC((yield i.json()));return yield i.json()},new(o||(o=Promise))(function(t,e){function r(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof o?n:new o(function(t){t(n)})).then(r,a)}u((s=s.apply(n,i||[])).next())})}on(){throw new S.iQ5}removeListener(){throw new S.iQ5}once(){throw new S.iQ5}removeAllListeners(){throw new S.iQ5}connect(){throw new S.iQ5}disconnect(){throw new S.iQ5}reset(){throw new S.iQ5}reconnect(){throw new S.iQ5}}var N=null;"undefined"!=typeof WebSocket?N=WebSocket:"undefined"!=typeof MozWebSocket?N=MozWebSocket:void 0!==r.g?N=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?N=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(N=self.WebSocket||self.MozWebSocket);var O=N;class D extends M.SocketProvider{constructor(t,e,r){super(t,e,r)}_validateProviderPath(t){return"string"==typeof t&&/^ws(s)?:\/\//i.test(t)}getStatus(){if(this._socketConnection&&!(0,M.isNullish)(this._socketConnection))switch(this._socketConnection.readyState){case this._socketConnection.CONNECTING:return"connecting";case this._socketConnection.OPEN:return"connected"}return"disconnected"}_openSocketConnection(){this._socketConnection=new O(this._socketPath,void 0,this._socketOptions&&0===Object.keys(this._socketOptions).length?void 0:this._socketOptions)}_closeSocketConnection(t,e){var r;null===(r=this._socketConnection)||void 0===r||r.close(t,e)}_sendToSocket(t){var e;if("disconnected"===this.getStatus())throw new S.ZYx;null===(e=this._socketConnection)||void 0===e||e.send(JSON.stringify(t))}_parseResponses(t){return this.chunkResponseParser.parseResponse(t.data)}_addSocketListeners(){var t,e,r,n;null===(t=this._socketConnection)||void 0===t||t.addEventListener("open",this._onOpenHandler),null===(e=this._socketConnection)||void 0===e||e.addEventListener("message",this._onMessageHandler),null===(r=this._socketConnection)||void 0===r||r.addEventListener("close",t=>this._onCloseHandler(t)),null===(n=this._socketConnection)||void 0===n||n.addEventListener("error",this._onErrorHandler)}_removeSocketListeners(){var t,e,r;null===(t=this._socketConnection)||void 0===t||t.removeEventListener("message",this._onMessageHandler),null===(e=this._socketConnection)||void 0===e||e.removeEventListener("open",this._onOpenHandler),null===(r=this._socketConnection)||void 0===r||r.removeEventListener("close",this._onCloseHandler)}_onCloseEvent(t){var e;if(this._reconnectOptions.autoReconnect&&(![1e3,1001].includes(t.code)||!t.wasClean)){this._reconnect();return}this._clearQueues(t),this._removeSocketListeners(),this._onDisconnect(t.code,t.reason),null===(e=this._socketConnection)||void 0===e||e.removeEventListener("error",this._onErrorHandler)}}let L=t=>R.EA.isWeb3Provider(t),F=t=>"string"!=typeof t&&"request"in t&&"Function"===t.request.constructor.name,U=t=>"string"!=typeof t&&"request"in t&&"AsyncFunction"===t.request.constructor.name,H=t=>"string"!=typeof t&&"send"in t,G=t=>"string"!=typeof t&&"sendAsync"in t,j=t=>t&&(L(t)||U(t)||F(t)||G(t)||H(t)),z=t=>t&&"supportsSubscriptions"in t?t.supportsSubscriptions():!!t&&"string"!=typeof t&&"on"in t;var q=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};(y=E||(E={})).PROVIDER_CHANGED="PROVIDER_CHANGED",y.BEFORE_PROVIDER_CHANGE="BEFORE_PROVIDER_CHANGE";let K={HttpProvider:T,WebsocketProvider:D};class Q extends P{constructor(t,e){super(),(0,M.isNullish)(t)||this.setProvider(t),this.useRpcCallSpecification=e}static get providers(){return K}get provider(){return this._provider}get providers(){return K}setProvider(t){let e;if(t&&"string"==typeof t&&this.providers){if(/^http(s)?:\/\//i.test(t))e=new this.providers.HttpProvider(t);else if(/^ws(s)?:\/\//i.test(t))e=new this.providers.WebsocketProvider(t);else throw new S.kbX(`Can't autodetect provider for "${t}"`)}else e=(0,M.isNullish)(t)?void 0:t;return this.emit(E.BEFORE_PROVIDER_CHANGE,this._provider),this._provider=e,this.emit(E.PROVIDER_CHANGED,this._provider),!0}send(t){return q(this,void 0,void 0,function*(){let e=yield this._sendRequest(t);if(M.jsonRpc.isResponseWithResult(e))return e.result;throw new S.VLC(e)})}sendBatch(t){return q(this,void 0,void 0,function*(){let e=yield this._sendRequest(t);return e})}_sendRequest(t){return q(this,void 0,void 0,function*(){let{provider:e}=this;if((0,M.isNullish)(e))throw new S.kbX("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");let r=M.jsonRpc.isBatchRequest(t)?M.jsonRpc.toBatchPayload(t):M.jsonRpc.toPayload(t);if(L(e)){let t;try{t=yield e.request(r)}catch(e){t=e}return this._processJsonRpcResponse(r,t,{legacy:!1,error:!1})}if(U(e))return e.request(r).then(t=>this._processJsonRpcResponse(r,t,{legacy:!0,error:!1})).catch(t=>this._processJsonRpcResponse(r,t,{legacy:!0,error:!0}));if(F(e))return new Promise((t,n)=>{let i=t=>n(this._processJsonRpcResponse(r,t,{legacy:!0,error:!0})),o=e=>t(this._processJsonRpcResponse(r,e,{legacy:!0,error:!1})),s=e.request(r,(t,e)=>t?i(t):o(e));(0,M.isPromise)(s)&&s.then(o).catch(i)});if(H(e))return new Promise((t,n)=>{e.send(r,(e,i)=>{if(e)return n(this._processJsonRpcResponse(r,e,{legacy:!0,error:!0}));if((0,M.isNullish)(i))throw new S.VLC("",'Got a "nullish" response from provider.');return t(this._processJsonRpcResponse(r,i,{legacy:!0,error:!1}))})});if(G(e))return e.sendAsync(r).then(t=>this._processJsonRpcResponse(r,t,{legacy:!0,error:!1})).catch(t=>this._processJsonRpcResponse(r,t,{legacy:!0,error:!0}));throw new S.kbX("Provider does not have a request or send method to use.")})}_processJsonRpcResponse(t,e,{legacy:r,error:n}){if((0,M.isNullish)(e))return this._buildResponse(t,null,n);if(M.jsonRpc.isResponseWithError(e)){if(this.useRpcCallSpecification&&(0,M.isResponseRpcError)(e)){if(S.BEj.get(e.error.code)){let t=S.BEj.get(e.error.code).error;throw new t(e)}throw new S.lth(e)}if(!Q._isReverted(e))throw new S.$D9(e,t)}if(M.jsonRpc.isResponseWithResult(e))return e;if(e instanceof Error)throw Q._isReverted(e),e;if(!r&&M.jsonRpc.isBatchRequest(t)&&M.jsonRpc.isBatchResponse(e)||r&&!n&&M.jsonRpc.isBatchRequest(t))return e;if(r&&n&&M.jsonRpc.isBatchRequest(t))throw e;if(r&&!M.jsonRpc.isResponseWithError(e)&&!M.jsonRpc.isResponseWithResult(e))return this._buildResponse(t,e,n);if(M.jsonRpc.isBatchRequest(t)&&!Array.isArray(e))throw new S.VLC(e,"Got normal response for a batch request.");if(!M.jsonRpc.isBatchRequest(t)&&Array.isArray(e))throw new S.VLC(e,"Got batch response for a normal request.");if((M.jsonRpc.isResponseWithError(e)||M.jsonRpc.isResponseWithResult(e))&&!M.jsonRpc.isBatchRequest(t)&&e.id&&t.id!==e.id)throw new S.$D9(e);throw new S.VLC(e,"Invalid response")}static _isReverted(t){let e;if(M.jsonRpc.isResponseWithError(t)?e=t.error:t instanceof Error&&(e=t),null==e?void 0:e.message.includes("revert"))throw new S.KEx(e);return!1}_buildResponse(t,e,r){let n={jsonrpc:"2.0",id:M.jsonRpc.isBatchRequest(t)?t[0].id:"id"in t?t.id:null};return r?Object.assign(Object.assign({},n),{error:e}):Object.assign(Object.assign({},n),{result:e})}}var Y=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class Z{constructor(t,e,r=!1){this.requestManager=t,this.registeredSubscriptions=e,this.tolerateUnlinkedSubscription=r,this._subscriptions=new Map,this.requestManager.on(E.BEFORE_PROVIDER_CHANGE,()=>Y(this,void 0,void 0,function*(){yield this.unsubscribe()})),this.requestManager.on(E.PROVIDER_CHANGED,()=>{this.clear(),this.listenToProviderEvents()}),this.listenToProviderEvents()}listenToProviderEvents(){let t=this.requestManager.provider;this.requestManager.provider&&("function"!=typeof(null==t?void 0:t.supportsSubscriptions)||(null==t?void 0:t.supportsSubscriptions()))&&"function"==typeof this.requestManager.provider.on&&("function"==typeof this.requestManager.provider.request?this.requestManager.provider.on("message",t=>this.messageListener(t)):t.on("data",t=>this.messageListener(t)))}messageListener(t){var e,r,n;if(!t)throw new S.iXd("Should not call messageListener with no data. Type was");let i=(null===(e=t.params)||void 0===e?void 0:e.subscription)||(null===(r=t.data)||void 0===r?void 0:r.subscription)||(null===(n=t.id)||void 0===n?void 0:n.toString(16));if(i){let e=this._subscriptions.get(i);null==e||e.processSubscriptionData(t)}}subscribe(t,e,r=R.YK){return Y(this,void 0,void 0,function*(){let n=this.registeredSubscriptions[t];if(!n)throw new S.iXd("Invalid subscription type");let i=new n(null!=e?e:void 0,{subscriptionManager:this,returnFormat:r});return yield this.addSubscription(i),i})}get subscriptions(){return this._subscriptions}addSubscription(t){return Y(this,void 0,void 0,function*(){if(!this.requestManager.provider)throw new S.kbX("Provider not available");if(!this.supportsSubscriptions())throw new S.iXd("The current provider does not support subscriptions");if(t.id&&this._subscriptions.has(t.id))throw new S.iXd(`Subscription with id "${t.id}" already exists`);if(yield t.sendSubscriptionRequest(),(0,M.isNullish)(t.id))throw new S.iXd("Subscription is not subscribed yet.");return this._subscriptions.set(t.id,t),t.id})}removeSubscription(t){return Y(this,void 0,void 0,function*(){let{id:e}=t;if((0,M.isNullish)(e))throw new S.iXd("Subscription is not subscribed yet. Or, had already been unsubscribed but not through the Subscription Manager.");if(!this._subscriptions.has(e)&&!this.tolerateUnlinkedSubscription)throw new S.iXd(`Subscription with id "${e.toString()}" does not exists`);return yield t.sendUnsubscribeRequest(),this._subscriptions.delete(e),e})}unsubscribe(t){return Y(this,void 0,void 0,function*(){let e=[];for(let[r,n]of this.subscriptions.entries())(!t||"function"==typeof t&&t({id:r,sub:n}))&&e.push(this.removeSubscription(n));return Promise.all(e)})}clear(){this._subscriptions.clear()}supportsSubscriptions(){return!(0,M.isNullish)(this.requestManager.provider)&&z(this.requestManager.provider)}}var V=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class J extends P{constructor(t,e){var r;super(),this.args=t;let{requestManager:n}=e,{subscriptionManager:i}=e;if(n&&i)throw new S.iXd("Only requestManager or subscriptionManager should be provided at Subscription constructor");if(!n&&!i)throw new S.iXd("Either requestManager or subscriptionManager should be provided at Subscription constructor");n?this._subscriptionManager=new Z(n,{},!0):this._subscriptionManager=i,this._returnFormat=null!==(r=null==e?void 0:e.returnFormat)&&void 0!==r?r:R.YK}get id(){return this._id}get lastBlock(){return this._lastBlock}subscribe(){return V(this,void 0,void 0,function*(){return this._subscriptionManager.addSubscription(this)})}processSubscriptionData(t){var e,r;(null==t?void 0:t.data)?this._processSubscriptionResult(null!==(r=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.result)&&void 0!==r?r:null==t?void 0:t.data):t&&M.jsonRpc.isResponseWithNotification(t)&&this._processSubscriptionResult(null==t?void 0:t.params.result)}sendSubscriptionRequest(){return V(this,void 0,void 0,function*(){return this._id=yield this._subscriptionManager.requestManager.send({method:"eth_subscribe",params:this._buildSubscriptionParams()}),this.emit("connected",this._id),this._id})}get returnFormat(){return this._returnFormat}get subscriptionManager(){return this._subscriptionManager}resubscribe(){return V(this,void 0,void 0,function*(){yield this.unsubscribe(),yield this.subscribe()})}unsubscribe(){return V(this,void 0,void 0,function*(){this.id&&(yield this._subscriptionManager.removeSubscription(this))})}sendUnsubscribeRequest(){return V(this,void 0,void 0,function*(){yield this._subscriptionManager.requestManager.send({method:"eth_unsubscribe",params:[this.id]}),this._id=void 0})}formatSubscriptionResult(t){return t}_processSubscriptionResult(t){this.emit("data",this.formatSubscriptionResult(t))}_processSubscriptionError(t){this.emit("error",t)}_buildSubscriptionParams(){throw Error("Implement in the child class")}}var W=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class X{constructor(t){this._requestManager=t,this._requests=new Map}get requests(){return[...this._requests.values()].map(t=>t.payload)}add(t){let e=M.jsonRpc.toPayload(t),r=new M.Web3DeferredPromise;return this._requests.set(e.id,{payload:e,promise:r}),r}execute(t){var e;return W(this,void 0,void 0,function*(){if(0===this.requests.length)return Promise.resolve([]);let r=new M.Web3DeferredPromise({timeout:null!==(e=null==t?void 0:t.timeout)&&void 0!==e?e:1e3,eagerStart:!0,timeoutMessage:"Batch request timeout"});return this._processBatchRequest(r).catch(t=>r.reject(t)),r.catch(t=>{t instanceof S.S$e&&this._abortAllRequests("Batch request timeout"),r.reject(t)}),r})}_processBatchRequest(t){var e,r;return W(this,void 0,void 0,function*(){let n=yield this._requestManager.sendBatch([...this._requests.values()].map(t=>t.payload));if(n.length!==this._requests.size)throw this._abortAllRequests("Invalid batch response"),new S.VLC(n,`Batch request size mismatch the results size. Requests: ${this._requests.size}, Responses: ${n.length}`);let i=this.requests.map(t=>t.id).map(Number).sort((t,e)=>t-e),o=n.map(t=>t.id).map(Number).sort((t,e)=>t-e);if(JSON.stringify(i)!==JSON.stringify(o))throw this._abortAllRequests("Invalid batch response"),new S.VLC(n,`Batch request mismatch the results. Requests: [${i.join()}], Responses: [${o.join()}]`);for(let t of n)M.jsonRpc.isResponseWithResult(t)?null===(e=this._requests.get(t.id))||void 0===e||e.promise.resolve(t.result):M.jsonRpc.isResponseWithError(t)&&(null===(r=this._requests.get(t.id))||void 0===r||r.promise.reject(t.error));t.resolve(n)})}_abortAllRequests(t){for(let{promise:e}of this._requests.values())e.reject(new S.GRi(t))}}class $ extends I{constructor(t){var e;if(super(),this.providers=Q.providers,(0,M.isNullish)(t)||"string"==typeof t&&""!==t.trim()||j(t)){this._requestManager=new Q(t),this._subscriptionManager=new Z(this._requestManager,{});return}let{config:r,provider:n,requestManager:i,subscriptionManager:o,registeredSubscriptions:s,accountProvider:a,wallet:u}=t;this.setConfig(null!=r?r:{}),this._requestManager=null!=i?i:new Q(n,null===(e=null==r?void 0:r.enableExperimentalFeatures)||void 0===e?void 0:e.useSubscriptionWhenCheckingBlockTimeout),o?this._subscriptionManager=o:this._subscriptionManager=new Z(this.requestManager,null!=s?s:{}),a&&(this._accountProvider=a),u&&(this._wallet=u)}get requestManager(){return this._requestManager}get subscriptionManager(){return this._subscriptionManager}get wallet(){return this._wallet}get accountProvider(){return this._accountProvider}static fromContextObject(...t){return new this(...t.reverse())}getContextObject(){var t;return{config:this.config,provider:this.provider,requestManager:this.requestManager,subscriptionManager:this.subscriptionManager,registeredSubscriptions:null===(t=this.subscriptionManager)||void 0===t?void 0:t.registeredSubscriptions,providers:this.providers,wallet:this.wallet,accountProvider:this.accountProvider}}use(t,...e){let r=new t(...[...e,this.getContextObject()]);return this.on(A.CONFIG_CHANGE,t=>{r.setConfig({[t.name]:t.newValue})}),r}link(t){this.setConfig(t.config),this._requestManager=t.requestManager,this.provider=t.provider,this._subscriptionManager=t.subscriptionManager,this._wallet=t.wallet,this._accountProvider=t._accountProvider,t.on(A.CONFIG_CHANGE,t=>{this.setConfig({[t.name]:t.newValue})})}registerPlugin(t){if(void 0!==this[t.pluginNamespace])throw new S.zSi(t.pluginNamespace);let e={[t.pluginNamespace]:t};e[t.pluginNamespace].link(this),Object.assign(this,e)}get provider(){return this.currentProvider}set provider(t){this.requestManager.setProvider(t)}get currentProvider(){return this.requestManager.provider}set currentProvider(t){this.requestManager.setProvider(t)}get givenProvider(){return $.givenProvider}setProvider(t){return this.provider=t,!0}get BatchRequest(){return X.bind(void 0,this._requestManager)}extend(t){var e;return t.property&&!this[t.property]&&(this[t.property]={}),null===(e=t.methods)||void 0===e||e.forEach(e=>{let r=(...t)=>{var r,n,i,o;return r=this,n=void 0,i=void 0,o=function*(){return this.requestManager.send({method:e.call,params:t})},new(i||(i=Promise))(function(t,e){function s(t){try{u(o.next(t))}catch(t){e(t)}}function a(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):((r=e.value)instanceof i?r:new i(function(t){t(r)})).then(s,a)}u((o=o.apply(r,n||[])).next())})};t.property?this[t.property][e.name]=r:this[e.name]=r}),this}}$.providers=Q.providers;var tt=r(7008);class te{constructor(t){if(this.toAddress=()=>{if(this.isDirect()){let t=this._iban.slice(4),e=te._parseInt(t,36),r=(0,M.leftPad)(e,40);return(0,M.toChecksumAddress)(r)}throw Error("Iban is indirect and cannot be converted. Must be length of 34 or 35")},te.isIndirect(t)||te.isDirect(t))this._iban=t;else throw Error("Invalid IBAN was provided")}static isDirect(t){return 34===t.length||35===t.length}isDirect(){return te.isDirect(this._iban)}static isIndirect(t){return 20===t.length}isIndirect(){return te.isIndirect(this._iban)}static isValid(t){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(t)&&1===te._mod9710(te._iso13616Prepare(t))}isValid(){return te.isValid(this._iban)}static fromBban(t){let e=this._mod9710(this._iso13616Prepare(`XE00${t}`)),r=`0${(98-e).toString()}`.slice(-2);return new te(`XE${r}${t}`)}static createIndirect(t){return te.fromBban(`ETH${t.institution}${t.identifier}`)}static fromAddress(t){if(!(0,tt.UJ)(t))throw new S.bSi(t);let e=BigInt((0,M.hexToNumber)(t)),r=e.toString(36),n=(0,M.leftPad)(r,15);return te.fromBban(n.toUpperCase())}static toIban(t){return te.fromAddress(t).toString()}client(){return this.isIndirect()?this._iban.slice(11):""}checksum(){return this._iban.slice(2,4)}institution(){return this.isIndirect()?this._iban.slice(7,11):""}toString(){return this._iban}}te._iso13616Prepare=t=>{let e=t.toUpperCase(),r=`${e.slice(4)}${e.slice(0,4)}`;return r.split("").map(t=>{let e=t.charCodeAt(0);return e>=65&&e<=90?e-65+10:t}).join("")},te._parseInt=(t,e)=>[...t].reduce((t,r)=>BigInt(parseInt(r,e))+BigInt(e)*t,BigInt(0)),te._mod9710=t=>{let e,r=t;for(;r.length>2;)e=r.slice(0,9),r=`${(parseInt(e,10)%97).toString()}${r.slice(e.length)}`;return parseInt(r,10)%97},te.toAddress=t=>{let e=new te(t);return e.toAddress()};var tr=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class tn extends P{constructor(t){super(),this[x]="Promise",this._promise=new Promise(t)}then(t,e){return tr(this,void 0,void 0,function*(){return this._promise.then(t,e)})}catch(t){return tr(this,void 0,void 0,function*(){return this._promise.catch(t)})}finally(t){return tr(this,void 0,void 0,function*(){return this._promise.finally(t)})}on(t,e){return super.on(t,e),this}once(t,e){return super.once(t,e),this}}x=Symbol.toStringTag,r(323);var ti=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function to(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_syncing",params:[]})})}function ts(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["hex"],[e]),t.send({method:"eth_sendRawTransaction",params:[e]})})}function ta(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag","bool"],[e,r]),t.send({method:"eth_getBlockByNumber",params:[e,r]})})}var tu=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})},tl=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let th=t=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_listAccounts",params:[]})}),tc=(t,e)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_newAccount",params:[e]})}),td=(t,e,r,n)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_unlockAccount",params:[e,r,n]})}),tf=(t,e)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_lockAccount",params:[e]})}),tp=(t,e,r)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_importRawKey",params:[e,r]})}),tm=(t,e,r)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_sendTransaction",params:[e,r]})}),tg=(t,e,r)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_signTransaction",params:[e,r]})}),tv=(t,e,r,n)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_sign",params:[e,r,n]})}),ty=(t,e,r)=>tl(void 0,void 0,void 0,function*(){return t.send({method:"personal_ecRecover",params:[e,r]})});var tb=r(6852);let tw={type:"object",properties:{accessList:{type:"null"},maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},tA={type:"object",properties:{maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},tE={type:"object",properties:{gasPrice:{type:"null"}}},tx=(t,e,r)=>{try{tt.sC.validateJSONSchema(t,e)}catch(t){if(t instanceof tt.X$)throw new S.L25(t.errors,r);throw t}},tk=t=>{var e,r;if(!(0,tt.Rw)(t.type)){let e;switch(t.type){case"0x0":e=tw;break;case"0x1":e=tA;break;case"0x2":e=tE;break;default:return(0,M.format)({format:"uint"},t.type,R.pE)}return tx(e,t,t.type),(0,M.format)({format:"uint"},t.type,R.pE)}if(!(0,tt.Rw)(t.maxFeePerGas)||!(0,tt.Rw)(t.maxPriorityFeePerGas))return tx(tE,t,"0x2"),"0x2";if(!(0,tt.Rw)(t.accessList))return tx(tA,t,"0x1"),"0x1";(0,tt.Rw)(t.gasPrice)||tx(tw,t,"0x0");let n=null!==(e=t.hardfork)&&void 0!==e?e:null===(r=t.common)||void 0===r?void 0:r.hardfork;if(void 0===n)return;let i=Object.keys(R.Ut).indexOf(n);if(void 0!==i){if(i>=Object.keys(R.Ut).indexOf("london"))return(0,tt.Rw)(t.gasPrice)?"0x2":"0x0";if(i===Object.keys(R.Ut).indexOf("berlin"))return"0x0"}},t_=(t,e)=>{var r;return(null!==(r=null==e?void 0:e.transactionTypeParser)&&void 0!==r?r:tk)(t)},tS=t=>t[0]>127?"0x0":(0,M.toHex)(t[0]),tM={type:"array",items:Object.assign({},{type:"object",properties:{address:{format:"address"},storageKeys:{type:"array",items:{format:"bytes32"}}}})},tC={type:"object",properties:{accessList:Object.assign({},tM),gasUsed:{type:"string"}}},tP={type:"string",enum:["goerli","kovan","mainnet","rinkeby","ropsten","sepolia"]},tI={type:"string",enum:["arrowGlacier","berlin","byzantium","chainstart","constantinople","dao","homestead","istanbul","london","merge","muirGlacier","petersburg","shanghai","spuriousDragon","tangerineWhistle"]},tB={type:"object",properties:{from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},tM),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},chain:Object.assign({},tP),hardfork:Object.assign({},tI),chainId:{format:"uint"},networkId:{format:"uint"},common:{type:"object",properties:{customChain:Object.assign({},{type:"object",properties:{name:{format:"string"},networkId:{format:"uint"},chainId:{format:"uint"}}}),baseChain:Object.assign({},tP),hardfork:Object.assign({},tI)}},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}}},tR={type:"object",properties:Object.assign(Object.assign({},tB.properties),{blockHash:{format:"bytes32"},blockNumber:{format:"uint"},hash:{format:"bytes32"},transactionIndex:{format:"uint"},from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},tM),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}})},tT={type:"object",properties:{parentHash:{format:"bytes32"},sha3Uncles:{format:"bytes32"},miner:{format:"bytes"},stateRoot:{format:"bytes32"},transactionsRoot:{format:"bytes32"},receiptsRoot:{format:"bytes32"},logsBloom:{format:"bytes256"},difficulty:{format:"uint"},number:{format:"uint"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},timestamp:{format:"uint"},extraData:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},totalDifficulty:{format:"uint"},baseFeePerGas:{format:"uint"},size:{format:"uint"},transactions:{oneOf:[{type:"array",items:Object.assign({},tR)},{type:"array",items:{format:"bytes32"}}]},uncles:{type:"array",items:{format:"bytes32"}},hash:{format:"bytes32"}}},tN={type:"object",properties:{author:{format:"bytes32"},hash:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},miner:{format:"bytes"},stateRoot:{format:"bytes32"},transactionsRoot:{format:"bytes32"},withdrawalsRoot:{format:"bytes32"},logsBloom:{format:"bytes256"},difficulty:{format:"uint"},totalDifficulty:{format:"uint"},number:{format:"uint"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},timestamp:{format:"uint"},extraData:{format:"bytes"},nonce:{format:"uint"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},baseFeePerGas:{format:"uint"},excessDataGas:{format:"uint"},mixHash:{format:"bytes32"},transactions:{type:"array",items:{format:"bytes32"}},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},{type:"object",properties:{index:{format:"uint"},validatorIndex:{format:"uint"},address:{format:"bytes32"},amount:{format:"uint"}}})}}},tO={type:"object",properties:{removed:{format:"bool"},logIndex:{format:"uint"},transactionIndex:{format:"uint"},transactionHash:{format:"bytes32"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},address:{format:"address"},data:{format:"bytes"},topics:{type:"array",items:{format:"bytes32"}}}},tD={type:"object",properties:{startingBlock:{format:"string"},currentBlock:{format:"string"},highestBlock:{format:"string"},knownStates:{format:"string"},pulledStates:{format:"string"}}},tL={type:"object",properties:{transactionHash:{format:"bytes32"},transactionIndex:{format:"uint"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},from:{format:"address"},to:{format:"address"},cumulativeGasUsed:{format:"uint"},gasUsed:{format:"uint"},effectiveGasPrice:{format:"uint"},contractAddress:{format:"address"},logs:{type:"array",items:Object.assign({},tO)},logsBloom:{format:"bytes"},root:{format:"bytes"},status:{format:"uint"},type:{format:"uint"}}},tF={type:"object",properties:{messageHash:{format:"bytes"},r:{format:"bytes32"},s:{format:"bytes32"},v:{format:"bytes"},message:{format:"bytes"},signature:{format:"bytes"}}},tU={type:"object",properties:{oldestBlock:{format:"uint"},baseFeePerGas:{type:"array",items:{format:"uint"}},reward:{type:"array",items:{type:"array",items:{format:"uint"}}},gasUsedRatio:{type:"array",items:{type:"number"}}}},tH={type:"object",properties:{balance:{format:"uint"},codeHash:{format:"bytes32"},nonce:{format:"uint"},storageHash:{format:"bytes32"},accountProof:{type:"array",items:{format:"bytes32"}},storageProof:{type:"array",items:Object.assign({},{type:"object",properties:{key:{format:"bytes32"},value:{format:"uint"},proof:{type:"array",items:{format:"bytes32"}}}})}}};function tG(t,e=R.YK,r={transactionSchema:tR,fillInputAndData:!1}){var n,i;let o=(0,M.mergeDeep)({},t);if((0,tt.Rw)(null==t?void 0:t.common)||(o.common=Object.assign({},t.common),(0,tt.Rw)(null===(n=t.common)||void 0===n?void 0:n.customChain)||(o.common.customChain=Object.assign({},t.common.customChain))),o=(0,M.format)(null!==(i=r.transactionSchema)&&void 0!==i?i:tR,o,e),!(0,tt.Rw)(o.data)&&!(0,tt.Rw)(o.input)&&(0,M.toHex)(o.data)!==(0,M.toHex)(o.input))throw new S.DT0({data:(0,M.bytesToHex)(o.data),input:(0,M.bytesToHex)(o.input)});return r.fillInputAndData&&((0,tt.Rw)(o.data)?(0,tt.Rw)(o.input)||(o.data=o.input):o.input=o.data),(0,tt.Rw)(o.gasLimit)||(o.gas=o.gasLimit,delete o.gasLimit),o}var tj=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function tz(t,e){return tj(this,void 0,void 0,function*(){let r=yield function(t){return tu(this,void 0,void 0,function*(){return t.send({method:"net_version",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}let tq=t=>tj(void 0,void 0,void 0,function*(){return function(t){return tu(this,void 0,void 0,function*(){return t.send({method:"net_listening",params:[]})})}(t.requestManager)});var tK=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class tQ extends ${getId(t=R.YK){return tK(this,void 0,void 0,function*(){return tz(this,t)})}getPeerCount(t=R.YK){return tK(this,void 0,void 0,function*(){return function(t,e){return tj(this,void 0,void 0,function*(){let r=yield function(t){return tu(this,void 0,void 0,function*(){return t.send({method:"net_peerCount",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}(this,t)})}isListening(){return tK(this,void 0,void 0,function*(){return tq(this)})}}let tY={bytes:R.JB.HEX,number:R.vm.NUMBER};var tZ=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function tV(t,e,r){return tZ(this,void 0,void 0,function*(){let n=t$(t,e);if(!(0,tt.Rw)(n)){if(n.startsWith("-")||n<"0x0"||n>"0x7f")throw new S.rsr(n);if((0,tt.Rw)(t.gasPrice)&&("0x0"===n||"0x1"===n))return{gasPrice:yield rM(e,r),maxPriorityFeePerGas:void 0,maxFeePerGas:void 0};if("0x2"===n)return Object.assign({gasPrice:void 0},(yield function(t,e,r){var n,i,o;return tZ(this,void 0,void 0,function*(){let s=yield rP(e,e.defaultBlock,!1,r);if((0,tt.Rw)(s.baseFeePerGas))throw new S.WTh;if(!(0,tt.Rw)(t.gasPrice)){let e=(0,M.format)({format:"uint"},t.gasPrice,r);return{maxPriorityFeePerGas:e,maxFeePerGas:e}}return{maxPriorityFeePerGas:(0,M.format)({format:"uint"},null!==(n=t.maxPriorityFeePerGas)&&void 0!==n?n:e.defaultMaxPriorityFeePerGas,r),maxFeePerGas:(0,M.format)({format:"uint"},null!==(i=t.maxFeePerGas)&&void 0!==i?i:BigInt(s.baseFeePerGas)*BigInt(2)+BigInt(null!==(o=t.maxPriorityFeePerGas)&&void 0!==o?o:e.defaultMaxPriorityFeePerGas),r)}})}(t,e,r)))}})}var tJ=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let tW=(t,e,r,n)=>{if(void 0!==r&&t in r&&void 0!==r[t]){if("string"==typeof r[t]&&(0,tt.UJ)(r[t]))return r[t];if(!(0,tt.H2)(r[t])&&(0,tt.hj)(r[t])){if(e.wallet){let n=e.wallet.get((0,M.format)({format:"uint"},r[t],tY));if(!(0,tt.Rw)(n))return n.address}throw new S.R_K}throw"from"===t?new S.SBp(r.from):new S.w79(r.to)}if("from"===t){if(!(0,tt.Rw)(n))return(0,tb._5)(n);if(!(0,tt.Rw)(e.defaultAccount))return e.defaultAccount}},tX=(t,e,r=R.YK)=>tJ(void 0,void 0,void 0,function*(){if((0,tt.Rw)(e))throw new S.U_d;return rB(t,e,t.defaultBlock,r)}),t$=(t,e)=>{let r=t_(t,e);return(0,tt.Rw)(r)?(0,tt.Rw)(e.defaultTransactionType)?void 0:(0,M.format)({format:"uint"},e.defaultTransactionType,R.pE):r};function t0(t){var e,r;return tJ(this,void 0,void 0,function*(){let n=(0,M.format)(tB,t.transaction,R.YK);if((0,tt.Rw)(n.from)&&(n.from=tW("from",t.web3Context,void 0,t.privateKey)),(0,tt.Rw)(n.nonce)&&(n.nonce=yield tX(t.web3Context,n.from,R.pE)),(0,tt.Rw)(n.value)&&(n.value="0x"),(0,tt.Rw)(n.data))(0,tt.Rw)(n.input)?n.input="0x":n.input.startsWith("0x")||(n.input=`0x${n.input}`);else{if(!(0,tt.Rw)(n.input)&&n.data!==n.input)throw new S.DT0({data:(0,M.bytesToHex)(n.data),input:(0,M.bytesToHex)(n.input)});n.data.startsWith("0x")||(n.data=`0x${n.data}`)}if((0,tt.Rw)(n.common)){if(t.web3Context.defaultCommon){let e=t.web3Context.defaultCommon,r=e.customChain.chainId,i=e.customChain.networkId,o=e.customChain.name;n.common=Object.assign(Object.assign({},e),{customChain:{chainId:r,networkId:i,name:o}})}(0,tt.Rw)(n.chain)&&(n.chain=t.web3Context.defaultChain),(0,tt.Rw)(n.hardfork)&&(n.hardfork=t.web3Context.defaultHardfork)}if((0,tt.Rw)(n.chainId)&&(0,tt.Rw)(null===(e=n.common)||void 0===e?void 0:e.customChain.chainId)&&(n.chainId=yield rD(t.web3Context,R.pE)),(0,tt.Rw)(n.networkId)&&(n.networkId=null!==(r=t.web3Context.defaultNetworkId)&&void 0!==r?r:yield tz(t.web3Context,R.pE)),(0,tt.Rw)(n.gasLimit)&&!(0,tt.Rw)(n.gas)&&(n.gasLimit=n.gas),n.type=t$(n,t.web3Context),(0,tt.Rw)(n.accessList)&&("0x1"===n.type||"0x2"===n.type)&&(n.accessList=[]),t.fillGasPrice&&(n=Object.assign(Object.assign({},n),(yield tV(n,t.web3Context,R.pE)))),(0,tt.Rw)(n.gas)&&(0,tt.Rw)(n.gasLimit)&&t.fillGasLimit){let e=yield rN(t.web3Context,n,"latest",R.pE);n=Object.assign(Object.assign({},n),{gas:(0,M.format)({format:"uint"},e,R.pE)})}return n})}let t1=t=>tJ(void 0,void 0,void 0,function*(){var e;return(null!==(e=t.web3Context.transactionBuilder)&&void 0!==e?e:t0)(Object.assign(Object.assign({},t),{transaction:t.transaction}))});var t2=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function t3(t,e,r){let n=t.transactionPollingInterval,[i,o]=(0,M.rejectIfConditionAtInterval)(()=>t2(this,void 0,void 0,function*(){let n;try{n=yield rC(t,tY)}catch(t){console.warn("An error happen while trying to get the block number",t);return}let i=n-e;if(i>=t.transactionBlockTimeout)return new S.SvW({starterBlockNumber:e,numberOfBlocks:i,transactionHash:r})}),n),s=()=>{clearInterval(i)};return[o,{clean:s}]}function t6(t,e){var r;return t2(this,void 0,void 0,function*(){let{provider:n}=t.requestManager,i=yield rC(t,tY);return(null===(r=n.supportsSubscriptions)||void 0===r?void 0:r.call(n))&&t.enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout?yield function(t,e,r){var n;return t2(this,void 0,void 0,function*(){let i,o,s=!0;function a(n,i){i&&console.warn("error happened at subscription. So revert to polling...",i),o.clean(),s=!1;let[a,u]=t3(t,e,r);o.clean=u.clean,a.catch(t=>n(t))}try{i=yield null===(n=t.subscriptionManager)||void 0===n?void 0:n.subscribe("newHeads"),o={clean:()=>{var e;i.id&&(null===(e=t.subscriptionManager)||void 0===e||e.removeSubscription(i).then(()=>{}).catch(()=>{}))}}}catch(n){return t3(t,e,r)}let u=new Promise((n,o)=>{try{i.on("data",n=>{if(s=!1,!(null==n?void 0:n.number))return;let i=Number(BigInt(n.number)-BigInt(e));i>=t.transactionBlockTimeout&&o(new S.SvW({starterBlockNumber:e,numberOfBlocks:i,transactionHash:r}))}),i.on("error",t=>{a(o,t)})}catch(t){a(o,t)}setTimeout(()=>{s&&a(o)},1e3*t.blockHeaderTimeout)});return[u,o]})}(t,i,e):t3(t,i,e)})}function t4(t,e,r){var n,i,o,s;return n=this,i=void 0,o=void 0,s=function*(){let[n,i]=(0,M.rejectIfTimeout)(t.transactionSendTimeout,new S.plQ({numberOfSeconds:t.transactionSendTimeout/1e3,transactionHash:r})),[o,s]=yield t6(t,r);try{return yield Promise.race([e(),i,o])}finally{clearTimeout(n),s.clean()}},new(o||(o=Promise))(function(t,e){function r(t){try{u(s.next(t))}catch(t){e(t)}}function a(t){try{u(s.throw(t))}catch(t){e(t)}}function u(e){var n;e.done?t(e.value):((n=e.value)instanceof o?n:new o(function(t){t(n)})).then(r,a)}u((s=s.apply(n,i||[])).next())})}var t5=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};function t8(t,e,r){var n;return t5(this,void 0,void 0,function*(){let i=null!==(n=t.transactionReceiptPollingInterval)&&void 0!==n?n:t.transactionPollingInterval,o=(0,M.pollTillDefined)(()=>t5(this,void 0,void 0,function*(){try{return rI(t,e,r)}catch(t){console.warn("An error happen while trying to get the transaction receipt",t);return}}),i),[s,a]=(0,M.rejectIfTimeout)(t.transactionPollingTimeout,new S.BhO({numberOfSeconds:t.transactionPollingTimeout/1e3,transactionHash:e})),[u,l]=yield t6(t,e);try{return yield Promise.race([o,a,u])}finally{clearTimeout(s),l.clean()}})}let t7=({web3Context:t,transactionReceipt:e,transactionPromiEvent:r,returnFormat:n})=>{var i;let o=1,s=setInterval(()=>{var i,a,u,l;i=void 0,a=void 0,u=void 0,l=function*(){o>=t.transactionConfirmationBlocks&&clearInterval(s);let i=yield ta(t.requestManager,(0,M.numberToHex)(BigInt(e.blockNumber)+BigInt(o)),!1);(null==i?void 0:i.hash)&&(o+=1,r.emit("confirmation",{confirmations:(0,M.format)({format:"uint"},o,n),receipt:(0,M.format)(tL,e,n),latestBlockHash:(0,M.format)({format:"bytes32"},i.hash,n)}))},new(u||(u=Promise))(function(t,e){function r(t){try{o(l.next(t))}catch(t){e(t)}}function n(t){try{o(l.throw(t))}catch(t){e(t)}}function o(e){var i;e.done?t(e.value):((i=e.value)instanceof u?i:new u(function(t){t(i)})).then(r,n)}o((l=l.apply(i,a||[])).next())})},null!==(i=t.transactionReceiptPollingInterval)&&void 0!==i?i:t.transactionPollingInterval)};var t9=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let et=({web3Context:t,transactionReceipt:e,transactionPromiEvent:r,returnFormat:n})=>{let i,o=!0;setImmediate(()=>{var s;null===(s=t.subscriptionManager)||void 0===s||s.subscribe("newHeads").then(s=>{s.on("data",a=>t9(void 0,void 0,void 0,function*(){var u;if(o=!1,!(null==a?void 0:a.number)||i===(null==a?void 0:a.parentHash))return;i=null==a?void 0:a.parentHash;let l=BigInt(a.number)-BigInt(e.blockNumber)+BigInt(1);r.emit("confirmation",{confirmations:(0,M.format)({format:"uint"},l,n),receipt:(0,M.format)(tL,e,n),latestBlockHash:(0,M.format)({format:"bytes32"},a.parentHash,n)}),l>=t.transactionConfirmationBlocks&&(yield null===(u=t.subscriptionManager)||void 0===u?void 0:u.removeSubscription(s))})),s.on("error",()=>t9(void 0,void 0,void 0,function*(){var i;yield null===(i=t.subscriptionManager)||void 0===i?void 0:i.removeSubscription(s),o=!1,t7({web3Context:t,transactionReceipt:e,transactionPromiEvent:r,returnFormat:n})}))}).catch(()=>{o=!1,t7({web3Context:t,transactionReceipt:e,transactionPromiEvent:r,returnFormat:n})})}),setTimeout(()=>{o&&t7({web3Context:t,transactionReceipt:e,transactionPromiEvent:r,returnFormat:n})},1e3*t.blockHeaderTimeout)};function ee(t,e,r,n,i){if((0,tt.Rw)(r)||(0,tt.Rw)(r.blockHash))throw new S.EpQ({receipt:r,blockHash:(0,M.format)({format:"bytes32"},null==r?void 0:r.blockHash,i),transactionHash:(0,M.format)({format:"bytes32"},n,i)});if(!r.blockNumber)throw new S.FnB({receipt:r});e.emit("confirmation",{confirmations:(0,M.format)({format:"uint"},1,i),receipt:(0,M.format)(tL,r,i),latestBlockHash:(0,M.format)({format:"bytes32"},r.blockHash,i)});let o=t.requestManager.provider;o.supportsSubscriptions()?et({web3Context:t,transactionReceipt:r,transactionPromiEvent:e,returnFormat:i}):t7({web3Context:t,transactionReceipt:r,transactionPromiEvent:e,returnFormat:i})}var er=r(5831),en=r(5268);let ei="abi/5.7.0",eo=new en.Yd(ei),es={},ea={calldata:!0,memory:!0,storage:!0},eu={calldata:!0,memory:!0};function el(t,e){if("bytes"===t||"string"===t){if(ea[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&eu[e])return!0;return(ea[e]||"payable"===e)&&eo.throwArgumentError("invalid modifier","name",e),!1}function eh(t,e){for(let r in e)(0,er.zG)(t,r,e[r])}let ec=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),ed=new RegExp(/^(.*)\[([0-9]*)\]$/);class ef{constructor(t,e){t!==es&&eo.throwError("use fromString",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),eh(this,e);let r=this.type.match(ed);r?eh(this,{arrayLength:parseInt(r[2]||"-1"),arrayChildren:ef.fromObject({type:r[1],components:this.components}),baseType:"array"}):eh(this,{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=ec.sighash),ec[t]||eo.throwArgumentError("invalid format type","format",t),t===ec.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map(e=>JSON.parse(e.format(t)))),JSON.stringify(e)}let e="";return"array"===this.baseType?e+=this.arrayChildren.format(t)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(t!==ec.sighash&&(e+=this.type),e+="("+this.components.map(e=>e.format(t)).join(t===ec.full?", ":",")+")"):e+=this.type,t!==ec.sighash&&(!0===this.indexed&&(e+=" indexed"),t===ec.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"==typeof t?ef.fromString(t,e):ef.fromObject(t)}static fromObject(t){return ef.isParamType(t)?t:new ef(es,{name:t.name||null,type:ep(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(ef.fromObject):null})}static fromString(t,e){var r;return r=function(t,e){let r=t;function n(e){eo.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function i(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let r=0;rthis.wordSize&&ev.throwError("value out-of-bounds",en.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=(0,em.zo)([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){let t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class ew{constructor(t,e,r,n){(0,er.zG)(this,"_data",(0,em.lE)(t)),(0,er.zG)(this,"wordSize",e||32),(0,er.zG)(this,"_coerceFunc",r),(0,er.zG)(this,"allowLoose",n),this._offset=0}get data(){return(0,em.Dv)(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&48>=parseInt(r[1])&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):ew.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:ev.throwError("data out-of-bounds",en.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new ew(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return eg.O$.from(this.readBytes(this.wordSize))}}var eA=r(7019);class eE extends ey{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=(0,eA.Kn)(e)}catch(t){this._throwError(t.message,e)}return t.writeValue(e)}decode(t){return(0,eA.Kn)((0,em.$m)(t.readValue().toHexString(),20))}}class ex extends ey{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}let ek=new en.Yd(ei);function e_(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let t={};n=e.map(e=>{let n=e.localName;return n||ek.throwError("cannot encode object for signature with missing names",en.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&ek.throwError("cannot encode object for signature with duplicate names",en.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]})}else ek.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&ek.throwArgumentError("types/value length mismatch","tuple",r);let i=new eb(t.wordSize),o=new eb(t.wordSize),s=[];return e.forEach((t,e)=>{let r=n[e];if(t.dynamic){let e=o.length;t.encode(o,r);let n=i.writeUpdatableValue();s.push(t=>{n(t+e)})}else t.encode(i,r)}),s.forEach(t=>{t(i.length)}),t.appendWriter(i)+t.appendWriter(o)}function eS(t,e){let r=[],n=t.subReader(0);e.forEach(e=>{let i=null;if(e.dynamic){let r=t.readValue(),o=n.subReader(r.toNumber());try{i=e.decode(o)}catch(t){if(t.code===en.Yd.errors.BUFFER_OVERRUN)throw t;(i=t).baseType=e.name,i.name=e.localName,i.type=e.type}}else try{i=e.decode(t)}catch(t){if(t.code===en.Yd.errors.BUFFER_OVERRUN)throw t;(i=t).baseType=e.name,i.name=e.localName,i.type=e.type}void 0!=i&&r.push(i)});let i=e.reduce((t,e)=>{let r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t},{});e.forEach((t,e)=>{let n=t.localName;if(!n||1!==i[n]||("length"===n&&(n="_length"),null!=r[n]))return;let o=r[e];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o});for(let t=0;t{throw e}})}return Object.freeze(r)}class eM extends ey{constructor(t,e,r){let n=t.type+"["+(e>=0?e:"")+"]",i=-1===e||t.dynamic;super("array",n,r,i),this.coder=t,this.length=e}defaultValue(){let t=this.coder.defaultValue(),e=[];for(let r=0;rt._data.length&&ek.throwError("insufficient data length",en.Yd.errors.BUFFER_OVERRUN,{length:t._data.length,count:e});let r=[];for(let t=0;t>6==2;n++)t++;return t}return t===_.OVERRUN?r.length-e-1:0}(b=k||(k={})).current="",b.NFC="NFC",b.NFD="NFD",b.NFKC="NFKC",b.NFKD="NFKD",(w=_||(_={})).UNEXPECTED_CONTINUE="unexpected continuation byte",w.BAD_PREFIX="bad codepoint prefix",w.OVERRUN="string overrun",w.MISSING_CONTINUE="missing continuation byte",w.OUT_OF_RANGE="out of UTF-8 range",w.UTF16_SURROGATE="UTF-16 surrogate",w.OVERLONG="overlong representation";let eH=Object.freeze({error:function(t,e,r,n,i){return eF.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:eU,replace:function(t,e,r,n,i){return t===_.OVERLONG?(n.push(i),0):(n.push(65533),eU(t,e,r,n,i))}});class eG extends eP{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,function(t,e=k.current){e!=k.current&&(eF.checkNormalize(),t=t.normalize(e));let r=[];for(let e=0;e>6|192),r.push(63&n|128);else if((64512&n)==55296){e++;let i=t.charCodeAt(e);if(e>=t.length||(64512&i)!=56320)throw Error("invalid utf-8 string");let o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,em.lE)(r)}(e))}decode(t){return(function(t,e){null==e&&(e=eH.error),t=(0,em.lE)(t);let r=[],n=0;for(;n>7==0){r.push(i);continue}let o=null,s=null;if((224&i)==192)o=1,s=127;else if((240&i)==224)o=2,s=2047;else if((248&i)==240)o=3,s=65535;else{(192&i)==128?n+=e(_.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(_.BAD_PREFIX,n-1,t,r);continue}if(n-1+o>=t.length){n+=e(_.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-o-1)-1;for(let i=0;i1114111){n+=e(_.OUT_OF_RANGE,n-1-o,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(_.UTF16_SURROGATE,n-1-o,t,r,a);continue}if(a<=s){n+=e(_.OVERLONG,n-1-o,t,r,a);continue}r.push(a)}}return r})(super.decode(t),void 0).map(t=>t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10&1023)+55296,(1023&t)+56320)).join("")}}class ej extends ey{constructor(t,e){let r=!1,n=[];t.forEach(t=>{t.dynamic&&(r=!0),n.push(t.type)});let i="tuple("+n.join(",")+")";super("tuple",i,e,r),this.coders=t}defaultValue(){let t=[];this.coders.forEach(e=>{t.push(e.defaultValue())});let e=this.coders.reduce((t,e)=>{let r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t},{});return this.coders.forEach((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))}),Object.freeze(t)}encode(t,e){return e_(t,this.coders,e)}decode(t){return t.coerce(this.name,eS(t,this.coders))}}let ez=new en.Yd(ei),eq=new RegExp(/^bytes([0-9]*)$/),eK=new RegExp(/^(u?int)([0-9]*)$/);class eQ{constructor(t){(0,er.zG)(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new eE(t.name);case"bool":return new eC(t.name);case"string":return new eG(t.name);case"bytes":return new eI(t.name);case"array":return new eM(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new ej((t.components||[]).map(t=>this._getCoder(t)),t.name);case"":return new eR(t.name)}let e=t.type.match(eK);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!=0)&&ez.throwArgumentError("invalid "+e[1]+" bit length","param",t),new eL(r/8,"int"===e[1],t.name)}if(e=t.type.match(eq)){let r=parseInt(e[1]);return(0===r||r>32)&&ez.throwArgumentError("invalid bytes length","param",t),new eB(r,t.name)}return ez.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new ew(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new eb(this._getWordSize())}getDefaultValue(t){let e=t.map(t=>this._getCoder(ef.from(t))),r=new ej(e,"_");return r.defaultValue()}encode(t,e){t.length!==e.length&&ez.throwError("types/values length mismatch",en.Yd.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});let r=t.map(t=>this._getCoder(ef.from(t))),n=new ej(r,"_"),i=this._getWriter();return n.encode(i,e),i.data}decode(t,e,r){let n=t.map(t=>this._getCoder(ef.from(t))),i=new ej(n,"_");return i.decode(this._getReader((0,em.lE)(e),r))}}new eQ;let eY=new eQ((t,e)=>(null==e?void 0:e._isBigNumber)?e.toBigInt():e),eZ=t=>!(0,M.isNullish)(t)&&"object"==typeof t&&!(0,M.isNullish)(t.type)&&["function","event","constructor","error"].includes(t.type),eV=t=>!(0,M.isNullish)(t)&&"object"==typeof t&&!(0,M.isNullish)(t.type)&&"error"===t.type,eJ=t=>!(0,M.isNullish)(t)&&"object"==typeof t&&!(0,M.isNullish)(t.type)&&"event"===t.type,eW=t=>!(0,M.isNullish)(t)&&"object"==typeof t&&!(0,M.isNullish)(t.type)&&"function"===t.type,eX=t=>!(0,M.isNullish)(t)&&"object"==typeof t&&!(0,M.isNullish)(t.type)&&"constructor"===t.type,e$=t=>"object"==typeof t&&void 0===t.components&&void 0===t.name,e0=t=>t.includes("[]")?{type:"tuple[]",name:t.slice(0,-2)}:{type:"tuple",name:t},e1=t=>{let e=[];for(let r of Object.keys(t)){let n=t[r];"object"==typeof n?e.push(Object.assign(Object.assign({},e0(r)),{components:e1(n)})):e.push({name:r,type:t[r]})}return e},e2=t=>{let e=[];for(let r of t){let t=r;if("object"==typeof r&&(t=Object.assign({},r)),"object"==typeof r&&"function"===r.type&&(t=Object.assign(Object.assign({},r),{type:"bytes24"})),e$(t)){let r=Object.keys(t)[0];e.push(Object.assign(Object.assign({},e0(r)),{components:e1(t[r])}))}else e.push(t)}return e},e3=t=>"string"==typeof t&&/^(-)?0x[0-9a-f]*$/i.test(t)&&t.length%2==1,e6=t=>e3(t)?`0x0${t.substring(2)}`:t,e4=(t,e)=>{var r;let n="object"!=typeof e||Array.isArray(e)?e:Object.assign({},e);if(n instanceof BigInt)return n.toString(10);if(/^bytes([0-9]*)\[\]$/.exec(t)||/^(u?int)([0-9]*)\[\]$/.exec(t)){let e=[...n];return e.map(e=>e4(t.replace("[]",""),e))}let i=/^(u?int)([0-9]*)$/.exec(t);if(i){let t=parseInt(null!==(r=i[2])&&void 0!==r?r:"256",10);if(t/8"array"===t.name?e.map(e=>e5(eY._getCoder(ef.from(t.type.replace("[]",""))),[e])):(t.coders.forEach((t,r)=>{"tuple"===t.name?e5(t,[e[r]]):e[r]=e4(t.name,e[r])}),[]),e8=(t,e)=>{let r=[];return e.forEach(e=>{if("object"==typeof e.components){if(!e.type.startsWith("tuple"))throw new S.WFj(`Invalid value given "${e.type}". Error: components found but type is not tuple.`);let n=e.type.indexOf("["),i=n>=0?e.type.substring(n):"",o=e8(t,e.components);Array.isArray(o)&&t?r.push(`tuple(${o.join(",")})${i}`):t?r.push(`(${o.join()})`):r.push(`(${o.join(",")})${i}`)}else r.push(e.type)}),r},e7=t=>{var e,r,n,i;return eV(t)||eJ(t)||eW(t)?(null===(e=t.name)||void 0===e?void 0:e.includes("("))?t.name:`${null!==(r=t.name)&&void 0!==r?r:""}(${e8(!1,null!==(n=t.inputs)&&void 0!==n?n:[]).join(",")})`:`(${e8(!1,null!==(i=t.inputs)&&void 0!==i?i:[]).join(",")})`},e9=t=>{let e;if("string"!=typeof t&&!eV(t))throw new S.WFj("Invalid parameter value in encodeErrorSignature");return e=t&&("function"==typeof t||"object"==typeof t)?e7(t):t,(0,M.sha3Raw)(e)},rt=t=>{let e;if("string"!=typeof t&&!eJ(t))throw new S.WFj("Invalid parameter value in encodeEventSignature");return e=t&&("function"==typeof t||"object"==typeof t)?e7(t):t,(0,M.sha3Raw)(e)},re=(t,e)=>{try{let r=e2(Array.isArray(t)?t:[t]),n=[];for(let[t,i]of e.entries()){let e;let o=r[t];e=eZ(o)&&o.type?o.type:o;let s=e4(e,i);if("string"==typeof e&&e.includes("tuple")){let t=eY._getCoder(ef.from(e));e5(t,[s])}n.push(s)}return eY.encode(r.map(t=>ef.from(t)),n)}catch(t){throw new S.WFj("Parameter encoding error",t)}},rr=(t,e)=>re([t],[e]),rn=t=>Array.isArray(t)&&Object.keys(t).filter(t=>Number.isInteger(+t)).length!==Object.keys(t).length,ri=t=>{let e={__length__:0};for(let r of Object.keys(t))e[r]=Array.isArray(t[r])&&rn(t[r])?ri(t[r]):t[r],e.__length__+=Number.isInteger(+r)?1:0;return e},ro=(t,e,r)=>{try{if(t.length>0&&(!e||"0x"===e||"0X"===e))throw new S.WFj("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");let n=eY.decode(e2(t).map(t=>ef.from(t)),`0x${e.replace(/0x/i,"")}`,r);return ri(n)}catch(t){throw new S.WFj(`Parameter decoding error: ${t.message}`)}},rs=(t,e)=>ro(t,e,!1),ra=(t,e)=>rs([t],e)["0"],ru=t=>{let e;if("string"!=typeof t&&!eW(t))throw new S.WFj("Invalid parameter value in encodeFunctionSignature");return e=t&&("function"==typeof t||"object"==typeof t)?e7(t):t,(0,M.sha3Raw)(e).slice(0,10)},rl=(t,e)=>{var r;if(!eW(t))throw new S.WFj("Invalid parameter value in encodeFunctionCall");return`${ru(t)}${re(null!==(r=t.inputs)&&void 0!==r?r:[],null!=e?e:[]).replace("0x","")}`},rh=["bool","string","int","uint","address","fixed","ufixed"],rc=(t,e)=>"string"===t?e:ra(t,e),rd=(t,e,r)=>{let n=Array.isArray(r)?r:[r],i={},o={};for(let[e,r]of t.entries())r.indexed?i[e]=r:o[e]=r;let s=e?ro(Object.values(o),e,!0):{__length__:0},a=n.length-Object.keys(i).length,u=Object.values(i).map((t,e)=>rh.some(e=>t.type.startsWith(e))?rc(t.type,n[e+a]):n[e+a]),l={__length__:0},h=0,c=0;for(let[e,r]of t.entries())l[e]="string"===r.type?"":void 0,i[e]&&(l[e]=u[h],h+=1),o[e]&&(l[e]=s[String(c)],c+=1),r.name&&(l[r.name]=l[e]),l.__length__+=1;return l},rf=(t,e)=>{if(null==e?void 0:e.data){let r,n,i;try{let o=e.data.slice(0,10),s=t.find(t=>e9(t).startsWith(o));(null==s?void 0:s.inputs)&&(r=s.name,n=e7(s),i=rs([...s.inputs],e.data.substring(10)))}catch(t){console.error(t)}r&&e.setDecodedProperties(r,n,i)}},rp=/^\w+/,rm=/^(.*)\[([0-9]*?)]$/,rg=(t,e,r=[])=>{let n=e.match(rp),i=n[0];return r.includes(i)||!t.types[i]?r:[i,...t.types[i].reduce((e,r)=>[...e,...rg(t,r.type,e).filter(t=>!e.includes(t))],[])]},rv=(t,e)=>{let[r,...n]=rg(t,e),i=[r,...n.sort()];return i.map(e=>`${e}(${t.types[e].map(t=>`${t.type} ${t.name}`)})`).join("")},ry=(t,e)=>keccak256(rv(t,e)),rb=(t,e,r)=>keccak256(rA(t,e,r)),rw=(t,e,r)=>{let n=e.match(rm);if(n){let e=n[1],i=Number(n[2])||void 0;if(!Array.isArray(r))throw Error("Cannot encode data: value is not of array type");if(i&&r.length!==i)throw Error(`Cannot encode data: expected length of ${i}, but got ${r.length}`);let o=r.map(r=>rw(t,e,r)),s=o.map(t=>t[0]),a=o.map(t=>t[1]);return["bytes32",keccak256(ethersAbiCoder.encode(s,a))]}return t.types[e]?["bytes32",rb(t,e,r)]:"string"===e||"bytes"===e?["bytes32",keccak256(r)]:[e,r]},rA=(t,e,r)=>{let[n,i]=t.types[e].reduce(([e,n],i)=>{if(isNullish(r[i.name])||isNullish(r[i.name]))throw Error(`Cannot encode data: missing data for '${i.name}'`);let o=r[i.name],[s,a]=rw(t,i.type,o);return[[...e,s],[...n,a]]},[["bytes32"],[ry(t,e)]]);return ethersAbiCoder.encode(n,i)},rE=(t,e)=>{var r,n,i,o;if(t instanceof S.KEx&&t.innerError instanceof S.$4q){if(void 0!==e){let i=e.filter(t=>eV(t));return rf(i,t.innerError),{reason:t.innerError.message,signature:null===(r=t.innerError.data)||void 0===r?void 0:r.slice(0,10),data:null===(n=t.innerError.data)||void 0===n?void 0:n.substring(10),customErrorName:t.innerError.errorName,customErrorDecodedSignature:t.innerError.errorSignature,customErrorArguments:t.innerError.errorArgs}}return{reason:t.innerError.message,signature:null===(i=t.innerError.data)||void 0===i?void 0:i.slice(0,10),data:null===(o=t.innerError.data)||void 0===o?void 0:o.substring(10)}}if(t instanceof S.$D9&&!Array.isArray(t.innerError)&&void 0!==t.innerError)return t.innerError.message;throw t};function rx(t,e,r,n=R.YK){var i,o,s,a;return i=this,o=void 0,s=void 0,a=function*(){try{yield rT(t,e,t.defaultBlock,n);return}catch(t){return rE(t,r)}},new(s||(s=Promise))(function(t,e){function r(t){try{u(a.next(t))}catch(t){e(t)}}function n(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var i;e.done?t(e.value):((i=e.value)instanceof s?i:new s(function(t){t(i)})).then(r,n)}u((a=a.apply(i,o||[])).next())})}function rk(t,e,r,n,i,o){var s,a,u,l;return s=this,a=void 0,u=void 0,l=function*(){let s,a=o;if(void 0===a&&(void 0!==n?a=rE(n):t.handleRevert&&void 0!==e&&(a=yield rx(t,e,i))),void 0===a)s=new S.fbB(r);else if("string"==typeof a)s=new S.ydH(a,void 0,r);else if(void 0!==a.customErrorName&&void 0!==a.customErrorDecodedSignature&&void 0!==a.customErrorArguments){let t=a;s=new S.C3x(t.reason,t.customErrorName,t.customErrorDecodedSignature,t.customErrorArguments,t.signature,r,t.data)}else s=new S.ydH(a.reason,a.signature,r,a.data);return s},new(u||(u=Promise))(function(t,e){function r(t){try{i(l.next(t))}catch(t){e(t)}}function n(t){try{i(l.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof u?i:new u(function(t){t(i)})).then(r,n)}i((l=l.apply(s,a||[])).next())})}var r_=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let rS=t=>r_(void 0,void 0,void 0,function*(){return to(t.requestManager)});function rM(t,e){return r_(this,void 0,void 0,function*(){let r=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_gasPrice",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}function rC(t,e){return r_(this,void 0,void 0,function*(){let r=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_blockNumber",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}function rP(t,e=t.defaultBlock,r=!1,n){return r_(this,void 0,void 0,function*(){let i;if((0,tt._t)(e)){let n=(0,M.format)({format:"bytes32"},e,R.pE);i=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32","bool"],[e,r]),t.send({method:"eth_getBlockByHash",params:[e,r]})})}(t.requestManager,n,r)}else{let n=(0,tt.lA)(e)?e:(0,M.format)({format:"uint"},e,R.pE);i=yield ta(t.requestManager,n,r)}return(0,M.format)(tT,i,n)})}function rI(t,e,r){return r_(this,void 0,void 0,function*(){let n=(0,M.format)({format:"bytes32"},e,R.YK),i=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32"],[e]),t.send({method:"eth_getTransactionReceipt",params:[e]})})}(t.requestManager,n);return(0,tt.Rw)(i)?i:(0,M.format)(tL,i,r)})}function rB(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),o=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","blockNumberOrTag"],[e,r]),t.send({method:"eth_getTransactionCount",params:[e,r]})})}(t.requestManager,e,i);return(0,M.format)({format:"uint"},o,n)})}function rR(t,e,r,n={checkRevertBeforeSending:!0}){let i=new tn((o,s)=>{setImmediate(()=>{r_(this,void 0,void 0,function*(){let a=tG(Object.assign(Object.assign({},e),{from:tW("from",t,e),to:tW("to",t,e)}),R.pE);!(null==n?void 0:n.ignoreGasPricing)&&(0,tt.Rw)(a.gasPrice)&&((0,tt.Rw)(e.maxPriorityFeePerGas)||(0,tt.Rw)(e.maxFeePerGas))&&(a=Object.assign(Object.assign({},a),(yield tV(a,t,R.pE))));try{let e,u;if(!1!==n.checkRevertBeforeSending){let e=yield rx(t,a,n.contractAbi);if(void 0!==e){let r=yield rk(t,a,void 0,void 0,n.contractAbi,e);i.listenerCount("error")>0&&i.emit("error",r),s(r);return}}if(i.listenerCount("sending")>0&&i.emit("sending",a),t.wallet&&!(0,tt.Rw)(a.from)&&(u=t.wallet.get(a.from)),u){let r=yield u.signTransaction(a);e=yield t4(t,()=>r_(this,void 0,void 0,function*(){return ts(t.requestManager,r.rawTransaction)}),r.transactionHash)}else e=yield t4(t,()=>r_(this,void 0,void 0,function*(){return function(t,e){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_sendTransaction",params:[e]})})}(t.requestManager,a)}));let l=(0,M.format)({format:"bytes32"},e,r);i.listenerCount("sent")>0&&i.emit("sent",a),i.listenerCount("transactionHash")>0&&i.emit("transactionHash",l);let h=yield t8(t,e,r),c=(0,M.format)(tL,h,r);if(i.listenerCount("receipt")>0&&i.emit("receipt",c),null==n?void 0:n.transactionResolver)o(null==n?void 0:n.transactionResolver(c));else if(h.status===BigInt(0)){let e=yield rk(t,a,c,void 0,null==n?void 0:n.contractAbi);i.listenerCount("error")>0&&i.emit("error",e),s(e)}else o(c);i.listenerCount("confirmation")>0&&ee(t,i,c,e,r)}catch(r){let e=r;e instanceof S.KEx&&t.handleRevert&&(e=yield rk(t,a,void 0,void 0,null==n?void 0:n.contractAbi)),(e instanceof S.$D9||e instanceof S.KEx||e instanceof S.C3x||e instanceof S.fbB||e instanceof S.ydH)&&i.listenerCount("error")>0&&i.emit("error",e),s(e)}})})});return i}function rT(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),o=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag"],[r]),t.send({method:"eth_call",params:[e,r]})})}(t.requestManager,tG(e,R.pE),i);return(0,M.format)({format:"bytes"},o,n)})}function rN(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=tG(e,R.pE),o=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),s=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag"],[r]),t.send({method:"eth_estimateGas",params:[e,r]})})}(t.requestManager,i,o);return(0,M.format)({format:"uint"},s,n)})}function rO(t,e,r){return r_(this,void 0,void 0,function*(){let{toBlock:n,fromBlock:i}=e;(0,tt.Rw)(n)||"number"!=typeof n&&"bigint"!=typeof n||(n=(0,M.numberToHex)(n)),(0,tt.Rw)(i)||"number"!=typeof i&&"bigint"!=typeof i||(i=(0,M.numberToHex)(i));let o=Object.assign(Object.assign({},e),{fromBlock:i,toBlock:n}),s=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["filter"],[e]),t.send({method:"eth_getLogs",params:[e]})})}(t.requestManager,o),a=s.map(t=>"string"==typeof t?t:(0,M.format)(tO,t,r));return a})}function rD(t,e){return r_(this,void 0,void 0,function*(){let r=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_chainId",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}function rL(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),o=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag"],[r]),t.send({method:"eth_createAccessList",params:[e,r]})})}(t.requestManager,tG(e,R.pE),i);return(0,M.format)(tC,o,n)})}class rF extends J{_buildSubscriptionParams(){return["logs",this.args]}formatSubscriptionResult(t){return(0,M.format)(tO,t,super.returnFormat)}}class rU extends J{_buildSubscriptionParams(){return["newPendingTransactions"]}formatSubscriptionResult(t){return(0,M.format)({format:"string"},t,super.returnFormat)}}class rH extends J{_buildSubscriptionParams(){return["newHeads"]}formatSubscriptionResult(t){return(0,M.format)(tN,t,super.returnFormat)}}class rG extends J{_buildSubscriptionParams(){return["syncing"]}_processSubscriptionResult(t){if("boolean"==typeof t)this.emit("changed",t);else{let e=Object.fromEntries(Object.entries(t.status).map(([t,e])=>[t.charAt(0).toLowerCase()+t.substring(1),e]));this.emit("changed",t.syncing),this.emit("data",(0,M.format)(tD,e,super.returnFormat))}}}var rj=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let rz={logs:rF,newPendingTransactions:rU,newHeads:rH,syncing:rG,pendingTransactions:rU,newBlockHeaders:rH};class rq extends ${constructor(t){if("string"==typeof t||j(t)){super({provider:t,registeredSubscriptions:rz});return}if(t.registeredSubscriptions){super(t);return}super(Object.assign(Object.assign({},t),{registeredSubscriptions:rz}))}getProtocolVersion(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_protocolVersion",params:[]})})}(this.requestManager)})}isSyncing(){return rj(this,void 0,void 0,function*(){return to(this.requestManager)})}getCoinbase(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_coinbase",params:[]})})}(this.requestManager)})}isMining(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_mining",params:[]})})}(this.requestManager)})}getHashrate(t=R.YK){return rj(this,void 0,void 0,function*(){return this.getHashRate(t)})}getHashRate(t=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e){return r_(this,void 0,void 0,function*(){let r=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_hashrate",params:[]})})}(t.requestManager);return(0,M.format)({format:"uint"},r,e)})}(this,t)})}getGasPrice(t=R.YK){return rj(this,void 0,void 0,function*(){return rM(this,t)})}getAccounts(){var t;return rj(this,void 0,void 0,function*(){let e=null!==(t=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_accounts",params:[]})})}(this.requestManager))&&void 0!==t?t:[];return e.map(t=>(0,M.toChecksumAddress)(t))})}getBlockNumber(t=R.YK){return rj(this,void 0,void 0,function*(){return rC(this,t)})}getBalance(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),o=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","blockNumberOrTag"],[e,r]),t.send({method:"eth_getBalance",params:[e,r]})})}(t.requestManager,e,i);return(0,M.format)({format:"uint"},o,n)})}(this,t,e,r)})}getStorageAt(t,e,r=this.defaultBlock,n=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r,n=t.defaultBlock,i){return r_(this,void 0,void 0,function*(){let o=(0,M.format)({format:"uint"},r,R.pE),s=(0,tt.lA)(n)?n:(0,M.format)({format:"uint"},n,R.pE),a=yield function(t,e,r,n){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","hex","blockNumberOrTag"],[e,r,n]),t.send({method:"eth_getStorageAt",params:[e,r,n]})})}(t.requestManager,e,o,s);return(0,M.format)({format:"bytes"},a,i)})}(this,t,e,r,n)})}getCode(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r=t.defaultBlock,n){return r_(this,void 0,void 0,function*(){let i=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),o=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","blockNumberOrTag"],[e,r]),t.send({method:"eth_getCode",params:[e,r]})})}(t.requestManager,e,i);return(0,M.format)({format:"bytes"},o,n)})}(this,t,e,r)})}getBlock(t=this.defaultBlock,e=!1,r=R.YK){return rj(this,void 0,void 0,function*(){return rP(this,t,e,r)})}getBlockTransactionCount(t=this.defaultBlock,e=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e=t.defaultBlock,r){return r_(this,void 0,void 0,function*(){let n;if((0,tt._t)(e)){let r=(0,M.format)({format:"bytes32"},e,R.pE);n=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32"],[e]),t.send({method:"eth_getBlockTransactionCountByHash",params:[e]})})}(t.requestManager,r)}else{let r=(0,tt.lA)(e)?e:(0,M.format)({format:"uint"},e,R.pE);n=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag"],[e]),t.send({method:"eth_getBlockTransactionCountByNumber",params:[e]})})}(t.requestManager,r)}return(0,M.format)({format:"uint"},n,r)})}(this,t,e)})}getBlockUncleCount(t=this.defaultBlock,e=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e=t.defaultBlock,r){return r_(this,void 0,void 0,function*(){let n;if((0,tt._t)(e)){let r=(0,M.format)({format:"bytes32"},e,R.pE);n=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32"],[e]),t.send({method:"eth_getUncleCountByBlockHash",params:[e]})})}(t.requestManager,r)}else{let r=(0,tt.lA)(e)?e:(0,M.format)({format:"uint"},e,R.pE);n=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag"],[e]),t.send({method:"eth_getUncleCountByBlockNumber",params:[e]})})}(t.requestManager,r)}return(0,M.format)({format:"uint"},n,r)})}(this,t,e)})}getUncle(t=this.defaultBlock,e,r=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e=t.defaultBlock,r,n){return r_(this,void 0,void 0,function*(){let i;let o=(0,M.format)({format:"uint"},r,R.pE);if((0,tt._t)(e)){let r=(0,M.format)({format:"bytes32"},e,R.pE);i=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32","hex"],[e,r]),t.send({method:"eth_getUncleByBlockHashAndIndex",params:[e,r]})})}(t.requestManager,r,o)}else{let r=(0,tt.lA)(e)?e:(0,M.format)({format:"uint"},e,R.pE);i=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag","hex"],[e,r]),t.send({method:"eth_getUncleByBlockNumberAndIndex",params:[e,r]})})}(t.requestManager,r,o)}return(0,M.format)(tT,i,n)})}(this,t,e,r)})}getTransaction(t,e=R.YK){return rj(this,void 0,void 0,function*(){let r=yield function(t,e,r){return r_(this,void 0,void 0,function*(){let n=(0,M.format)({format:"bytes32"},e,R.YK),i=yield function(t,e){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32"],[e]),t.send({method:"eth_getTransactionByHash",params:[e]})})}(t.requestManager,n);return(0,tt.Rw)(i)?i:tG(i,r,{fillInputAndData:!0})})}(this,t,e);if(!r)throw new S.Vci;return r})}getPendingTransactions(t=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e){return r_(this,void 0,void 0,function*(){let r=yield function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_pendingTransactions",params:[]})})}(t.requestManager);return r.map(t=>tG(t,e,{fillInputAndData:!0}))})}(this,t)})}getTransactionFromBlock(t=this.defaultBlock,e,r=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e=t.defaultBlock,r,n){return r_(this,void 0,void 0,function*(){let i;let o=(0,M.format)({format:"uint"},r,R.pE);if((0,tt._t)(e)){let r=(0,M.format)({format:"bytes32"},e,R.pE);i=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes32","hex"],[e,r]),t.send({method:"eth_getTransactionByBlockHashAndIndex",params:[e,r]})})}(t.requestManager,r,o)}else{let r=(0,tt.lA)(e)?e:(0,M.format)({format:"uint"},e,R.pE);i=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["blockNumberOrTag","hex"],[e,r]),t.send({method:"eth_getTransactionByBlockNumberAndIndex",params:[e,r]})})}(t.requestManager,r,o)}return(0,tt.Rw)(i)?i:tG(i,n,{fillInputAndData:!0})})}(this,t,e,r)})}getTransactionReceipt(t,e=R.YK){return rj(this,void 0,void 0,function*(){let r=yield rI(this,t,e);if(!r)throw new S.Vci;return r})}getTransactionCount(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return rB(this,t,e,r)})}sendTransaction(t,e=R.YK,r){return rR(this,t,e,r)}sendSignedTransaction(t,e=R.YK,r){return function(t,e,r,n={checkRevertBeforeSending:!0}){let i=new tn((o,s)=>{setImmediate(()=>{r_(this,void 0,void 0,function*(){let a=(0,M.format)({format:"bytes"},e,R.pE),u=tb.nL.fromSerializedData((0,M.bytesToUint8Array)((0,M.hexToBytes)(a))),l=Object.assign(Object.assign({},u.toJSON()),{from:u.getSenderAddress().toString()});try{if(!1!==n.checkRevertBeforeSending){let e=yield rx(t,l,n.contractAbi);if(void 0!==e){let r=yield rk(t,l,void 0,void 0,n.contractAbi,e);i.listenerCount("error")>0&&i.emit("error",r),s(r);return}}i.listenerCount("sending")>0&&i.emit("sending",a);let e=yield t4(t,()=>r_(this,void 0,void 0,function*(){return ts(t.requestManager,a)}));i.listenerCount("sent")>0&&i.emit("sent",a);let u=(0,M.format)({format:"bytes32"},e,r);i.listenerCount("transactionHash")>0&&i.emit("transactionHash",u);let h=yield t8(t,e,r),c=(0,M.format)(tL,h,r);if(i.listenerCount("receipt")>0&&i.emit("receipt",c),null==n?void 0:n.transactionResolver)o(null==n?void 0:n.transactionResolver(c));else if(h.status===BigInt(0)){let e=yield rk(t,l,c,void 0,null==n?void 0:n.contractAbi);i.listenerCount("error")>0&&i.emit("error",e),s(e)}else o(c);i.listenerCount("confirmation")>0&&ee(t,i,c,e,r)}catch(r){let e=r;e instanceof S.KEx&&t.handleRevert&&(e=yield rk(t,l,void 0,void 0,null==n?void 0:n.contractAbi)),(e instanceof S.$D9||e instanceof S.KEx||e instanceof S.C3x||e instanceof S.fbB||e instanceof S.ydH)&&i.listenerCount("error")>0&&i.emit("error",e),s(e)}})})});return i}(this,t,e,r)}sign(t,e,r=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r,n){var i;return r_(this,void 0,void 0,function*(){let o=(0,M.format)({format:"bytes"},e,R.YK);if(null===(i=t.wallet)||void 0===i?void 0:i.get(r)){let e=t.wallet.get(r),i=e.sign(o);return(0,M.format)(tF,i,n)}if("number"==typeof r)throw new S._J2(e,'RPC method "eth_sign" does not support index signatures');let s=yield function(t,e,r){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","hex"],[e,r]),t.send({method:"eth_sign",params:[e,r]})})}(t.requestManager,r,o);return(0,M.format)({format:"bytes"},s,n)})}(this,t,e,r)})}signTransaction(t,e=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r){return r_(this,void 0,void 0,function*(){let n=yield function(t,e){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_signTransaction",params:[e]})})}(t.requestManager,tG(e,R.pE));return(0,tt.HD)(n)?function(t,e,r={fillInputAndData:!1}){return{raw:(0,M.format)({format:"bytes"},t,e),tx:tG(Object.assign(Object.assign({},tb.nL.fromSerializedData((0,M.hexToBytes)(t)).toJSON()),{hash:(0,M.bytesToHex)((0,M.keccak256)((0,M.hexToBytes)(t))),type:tS((0,M.hexToBytes)(t))}),e,{fillInputAndData:r.fillInputAndData})}}(n,r,{fillInputAndData:!0}):{raw:(0,M.format)({format:"bytes"},n.raw,r),tx:tG(n.tx,r,{fillInputAndData:!0})}})}(this,t,e)})}call(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return rT(this,t,e,r)})}estimateGas(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return rN(this,t,e,r)})}getPastLogs(t,e=R.YK){return rj(this,void 0,void 0,function*(){return rO(this,t,e)})}getWork(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_getWork",params:[]})})}(this.requestManager)})}submitWork(t,e,r){return rj(this,void 0,void 0,function*(){return function(t,e,r,n){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["bytes8","bytes32","bytes32"],[e,r,n]),t.send({method:"eth_submitWork",params:[e,r,n]})})}(this.requestManager,t,e,r)})}requestAccounts(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"eth_requestAccounts",params:[]})})}(this.requestManager)})}getChainId(t=R.YK){return rj(this,void 0,void 0,function*(){return rD(this,t)})}getNodeInfo(){return rj(this,void 0,void 0,function*(){return function(t){return ti(this,void 0,void 0,function*(){return t.send({method:"web3_clientVersion",params:[]})})}(this.requestManager)})}getProof(t,e,r=this.defaultBlock,n=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r,n=t.defaultBlock,i){return r_(this,void 0,void 0,function*(){let o=r.map(t=>(0,M.format)({format:"bytes"},t,R.pE)),s=(0,tt.lA)(n)?n:(0,M.format)({format:"uint"},n,R.pE),a=yield function(t,e,r,n){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address","bytes32[]","blockNumberOrTag"],[e,r,n]),t.send({method:"eth_getProof",params:[e,r,n]})})}(t.requestManager,e,o,s);return(0,M.format)(tH,a,i)})}(this,t,e,r,n)})}getFeeHistory(t,e=this.defaultBlock,r,n=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r=t.defaultBlock,n,i){return r_(this,void 0,void 0,function*(){let o=(0,M.format)({format:"uint"},e,R.pE),s=(0,tt.lA)(r)?r:(0,M.format)({format:"uint"},r,R.pE),a=(0,M.format)({type:"array",items:{format:"uint"}},n,tY),u=yield function(t,e,r,n){return ti(this,void 0,void 0,function*(){for(let t of(tt.sC.validate(["hex","blockNumberOrTag"],[e,r]),n))tt.sC.validate(["number"],[t]);return t.send({method:"eth_feeHistory",params:[e,r,n]})})}(t.requestManager,o,s,a);return(0,M.format)(tU,u,i)})}(this,t,e,r,n)})}createAccessList(t,e=this.defaultBlock,r=R.YK){return rj(this,void 0,void 0,function*(){return rL(this,t,e,r)})}signTypedData(t,e,r=!1,n=R.YK){return rj(this,void 0,void 0,function*(){return function(t,e,r,n,i){return r_(this,void 0,void 0,function*(){let o=yield function(t,e,r,n=!1){return ti(this,void 0,void 0,function*(){return tt.sC.validate(["address"],[e]),t.send({method:`eth_signTypedData${n?"":"_v4"}`,params:[e,r]})})}(t.requestManager,e,r,n);return(0,M.format)({format:"bytes"},o,i)})}(this,t,e,r,n)})}subscribe(t,e,r=R.YK){var n;return rj(this,void 0,void 0,function*(){let i=yield null===(n=this.subscriptionManager)||void 0===n?void 0:n.subscribe(t,e,r);return i instanceof rF&&"logs"===t&&"object"==typeof e&&!(0,M.isNullish)(e.fromBlock)&&Number.isFinite(Number(e.fromBlock))&&setImmediate(()=>{this.getPastLogs(e).then(t=>{for(let e of t)i._processSubscriptionResult(e)}).catch(t=>{i._processSubscriptionError(t)})}),i})}static shouldClearSubscription({sub:t}){return!(t instanceof rG)}clearSubscriptions(t=!1){var e;return null===(e=this.subscriptionManager)||void 0===e?void 0:e.unsubscribe(t?rq.shouldClearSubscription:void 0)}}let rK=t=>{if(!(0,tt.Rw)(t.common)){if((0,tt.Rw)(t.common.customChain))throw new S.DLI;if((0,tt.Rw)(t.common.customChain.chainId))throw new S.HW5;if(!(0,tt.Rw)(t.chainId)&&t.chainId!==t.common.customChain.chainId)throw new S.JVB({txChainId:t.chainId,customChainId:t.common.customChain.chainId})}},rQ=t=>{if(!(0,tt.Rw)(t.common)&&!(0,tt.Rw)(t.chain)&&!(0,tt.Rw)(t.hardfork))throw new S.X6p;if(!(0,tt.Rw)(t.chain)&&(0,tt.Rw)(t.hardfork)||!(0,tt.Rw)(t.hardfork)&&(0,tt.Rw)(t.chain))throw new S.Bye({chain:t.chain,hardfork:t.hardfork})},rY=t=>{if(!(0,tt.Rw)(t.common)&&!(0,tt.Rw)(t.common.baseChain)&&!(0,tt.Rw)(t.chain)&&t.chain!==t.common.baseChain)throw new S.Ylw({txChain:t.chain,baseChain:t.common.baseChain})},rZ=t=>{if(!(0,tt.Rw)(t.common)&&!(0,tt.Rw)(t.common.hardfork)&&!(0,tt.Rw)(t.hardfork)&&t.hardfork!==t.common.hardfork)throw new S.HcZ({txHardfork:t.hardfork,commonHardfork:t.common.hardfork})},rV=t=>{if((0,tt.Rw)(t.gas)||!(0,tt.fb)(t.gas)||(0,tt.Rw)(t.gasPrice)||!(0,tt.fb)(t.gasPrice))throw new S.T6V({gas:t.gas,gasPrice:t.gasPrice});if(!(0,tt.Rw)(t.maxFeePerGas)||!(0,tt.Rw)(t.maxPriorityFeePerGas))throw new S.bKH({maxFeePerGas:t.maxFeePerGas,maxPriorityFeePerGas:t.maxPriorityFeePerGas})},rJ=t=>{if(!(0,tt.Rw)(t.gasPrice)&&"0x2"===t.type)throw new S.a8b(t.gasPrice);if("0x0"===t.type||"0x1"===t.type)throw new S.bKH({maxFeePerGas:t.maxFeePerGas,maxPriorityFeePerGas:t.maxPriorityFeePerGas});if((0,tt.Rw)(t.maxFeePerGas)||!(0,tt.fb)(t.maxFeePerGas)||(0,tt.Rw)(t.maxPriorityFeePerGas)||!(0,tt.fb)(t.maxPriorityFeePerGas))throw new S.CY5({maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas})},rW=t=>{let e=!(0,tt.Rw)(t.gas)||!(0,tt.Rw)(t.gasLimit),r=e&&!(0,tt.Rw)(t.gasPrice),n=e&&!(0,tt.Rw)(t.maxPriorityFeePerGas)&&!(0,tt.Rw)(t.maxFeePerGas);if(!r&&!n)throw new S.Bif({gas:t.gas,gasPrice:t.gasPrice,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas});if(r&&n)throw new S.H4O({gas:t.gas,gasPrice:t.gasPrice,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas});(r?rV:rJ)(t),(!(0,tt.Rw)(t.type)&&t.type>"0x1"?rJ:rV)(t)},rX=(t,e)=>{if(!(0,tt.Rw)(e)){e(t);return}if("object"!=typeof t||(0,tt.Rw)(t))throw new S.FJx(t);rK(t),rQ(t),rY(t),rZ(t);let r=tG(t,R.pE);if(rW(r),(0,tt.Rw)(r.nonce)||(0,tt.Rw)(r.chainId)||r.nonce.startsWith("-")||r.chainId.startsWith("-"))throw new S.clc({nonce:t.nonce,chainId:t.chainId})},r$=t=>{var e,r;return{nonce:t.nonce,gasPrice:t.gasPrice,gasLimit:null!==(e=t.gasLimit)&&void 0!==e?e:t.gas,to:t.to,value:t.value,data:null!==(r=t.data)&&void 0!==r?r:t.input,type:t.type,chainId:t.chainId,accessList:t.accessList,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas}},r0=(t,e)=>{var r,n,i,o,s,a,u,l,h,c,d,f,p,m,g,v,y,b;let w;let A=!(0,tt.Rw)(t.chain)&&!(0,tt.Rw)(t.hardfork)||!(0,tt.Rw)(t.common);if(A){let r=null!==(a=null!==(s=null===(o=null===(i=null==t?void 0:t.common)||void 0===i?void 0:i.customChain)||void 0===o?void 0:o.name)&&void 0!==s?s:t.chain)&&void 0!==a?a:"custom-network",n=(0,M.toNumber)(null!==(h=null===(l=null===(u=null==t?void 0:t.common)||void 0===u?void 0:u.customChain)||void 0===l?void 0:l.chainId)&&void 0!==h?h:null==t?void 0:t.chainId),A=(0,M.toNumber)(null!==(f=null===(d=null===(c=null==t?void 0:t.common)||void 0===c?void 0:c.customChain)||void 0===d?void 0:d.networkId)&&void 0!==f?f:null==t?void 0:t.networkId),E=null!==(g=null!==(m=null===(p=null==t?void 0:t.common)||void 0===p?void 0:p.hardfork)&&void 0!==m?m:null==t?void 0:t.hardfork)&&void 0!==g?g:e.defaultHardfork,x=null!==(b=null!==(y=null===(v=t.common)||void 0===v?void 0:v.baseChain)&&void 0!==y?y:t.chain)&&void 0!==b?b:e.defaultChain;n&&A&&r&&(w=tb.Gn.custom({name:r,chainId:n,networkId:A,defaultHardfork:E},{baseChain:x}))}else e.defaultCommon?(w=e.defaultCommon,(0,tt.Rw)(w.hardfork)&&(w.hardfork=null!==(r=t.hardfork)&&void 0!==r?r:e.defaultHardfork),(0,tt.Rw)(w.baseChain)&&(w.baseChain=e.defaultChain)):w=tb.Gn.custom({name:"custom-network",chainId:(0,M.toNumber)(t.chainId),networkId:(0,tt.Rw)(t.networkId)?void 0:(0,M.toNumber)(t.networkId),defaultHardfork:null!==(n=t.hardfork)&&void 0!==n?n:e.defaultHardfork},{baseChain:e.defaultChain});return{common:w}},r1=(t,e,r,n=!1,i=!0)=>{var o,s,a,u;return o=void 0,s=void 0,a=void 0,u=function*(){let o=yield t1({transaction:t,web3Context:e,privateKey:r,fillGasPrice:n,fillGasLimit:i}),s=tG(o,R.pE);return rX(s),tb.nL.fromTxData(r$(s),r0(s,e))},new(a||(a=Promise))(function(t,e){function r(t){try{i(u.next(t))}catch(t){e(t)}}function n(t){try{i(u.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof a?i:new a(function(t){t(i)})).then(r,n)}i((u=u.apply(o,s||[])).next())})},r2="ALLEVENTS",r3={name:r2,signature:"",type:"event",inputs:[]},r6=({address:t},e,r)=>{var n,i;let o=null==r?void 0:r.topics,s=null!==(n=null==r?void 0:r.filter)&&void 0!==n?n:{},a={};if((0,M.isNullish)(null==r?void 0:r.fromBlock)||(a.fromBlock=(0,M.format)(tT.properties.number,null==r?void 0:r.fromBlock,{number:R.vm.HEX,bytes:R.JB.HEX})),(0,M.isNullish)(null==r?void 0:r.toBlock)||(a.toBlock=(0,M.format)(tT.properties.number,null==r?void 0:r.toBlock,{number:R.vm.HEX,bytes:R.JB.HEX})),o&&Array.isArray(o))a.topics=[...o];else if(a.topics=[],e&&!e.anonymous&&"ALLEVENTS"!==e.name&&a.topics.push(null!==(i=e.signature)&&void 0!==i?i:rt(e7(e))),"ALLEVENTS"!==e.name&&e.inputs)for(let t of e.inputs){if(!t.indexed)continue;let e=s[t.name];if(!e){a.topics.push(null);continue}Array.isArray(e)?a.topics.push(e.map(e=>rr(t.type,e))):"string"===t.type?a.topics.push((0,M.keccak256)(e)):a.topics.push(rr(t.type,e))}return a.topics.length||delete a.topics,t&&(a.address=t.toLowerCase()),a},r4=(t,e,r,n=R.YK)=>{var i,o,s,a,u;let l=Object.assign({},t),h=(0,M.format)(tO,e,n);if("ALLEVENTS"===l.name){let t=r.find(t=>t.signature===e.topics[0]);l=t||{anonymous:!0}}if(l.inputs=null!==(o=null!==(i=l.inputs)&&void 0!==i?i:t.inputs)&&void 0!==o?o:[],!l.anonymous){let t=0;(null!==(s=l.inputs)&&void 0!==s?s:[]).forEach(e=>{e.indexed&&(t+=1)}),t>0&&(null==e?void 0:e.topics)&&(null==e?void 0:e.topics.length)!==t+1&&(l=Object.assign(Object.assign({},l),{anonymous:!0,inputs:[]}))}let c=l.anonymous?e.topics:(null!==(a=e.topics)&&void 0!==a?a:[]).slice(1);return Object.assign(Object.assign({},h),{returnValues:rd([...null!==(u=l.inputs)&&void 0!==u?u:[]],e.data,c),event:l.name,signature:!l.anonymous&&e.topics&&0!==e.topics.length&&e.topics[0]?e.topics[0]:void 0,raw:{data:e.data,topics:e.topics}})},r5=(t,e,r)=>{let n=Array.isArray(t.inputs)?t.inputs.length:0;if(n!==e.length)throw new S.Oht(`The number of arguments is not matching the methods required number. You need to pass ${n} arguments.`);let i=re(Array.isArray(t.inputs)?t.inputs:[],e).replace("0x","");if(eX(t)){if(!r)throw new S.Oht("The contract has no contract data option set. This is necessary to append the constructor parameters.");return r.startsWith("0x")?`${r}${i}`:`0x${r}${i}`}return`${ru(t)}${i}`},r8=(t,e)=>{if("constructor"===t.type)return e;if(!e)return null;let r=e.length>=2?e.slice(2):e;if(!t.outputs)return null;let n=rs([...t.outputs],r);return 1===n.__length__?n[0]:n};class r7 extends J{constructor(t,e){super(t,e),this.address=t.address,this.topics=t.topics,this.abi=t.abi,this.jsonInterface=t.jsonInterface}_buildSubscriptionParams(){return["logs",{address:this.address,topics:this.topics}]}formatSubscriptionResult(t){return r4(this.abi,t,this.jsonInterface,super.returnFormat)}}let r9=(t,e,r,n)=>{var i,o;let s={};return(0,M.isNullish)(t.data)&&"both"!==n||(s.data=r5(e,r,null!==(i=t.data)&&void 0!==i?i:t.input)),(0,M.isNullish)(t.input)&&"both"!==n||(s.input=r5(e,r,null!==(o=t.input)&&void 0!==o?o:t.data)),(0,M.isNullish)(s.input)&&(0,M.isNullish)(s.data)&&(s[n]=r5(e,r)),{data:s.data,input:s.input}},nt=({abi:t,params:e,options:r,contractOptions:n})=>{var i,o,s;let a=null!==(s=null!==(o=null!==(i=null==r?void 0:r.input)&&void 0!==i?i:null==r?void 0:r.data)&&void 0!==o?o:n.input)&&void 0!==s?s:n.data;if(!a&&!(null==r?void 0:r.to)&&!n.address)throw new S.Oht("Contract address not specified");if(!(null==r?void 0:r.from)&&!n.from)throw new S.Oht('Contract "from" address not specified');let u=(0,M.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),l=r9(u,t,e,null==r?void 0:r.dataInputFill);return Object.assign(Object.assign({},u),{data:l.data,input:l.input})},ne=({abi:t,params:e,options:r,contractOptions:n})=>{if(!(null==r?void 0:r.to)&&!n.address)throw new S.Oht("Contract address not specified");let i=(0,M.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),o=r9(i,t,e,null==r?void 0:r.dataInputFill);return Object.assign(Object.assign({},i),{data:o.data,input:o.input})},nr=({abi:t,params:e,options:r,contractOptions:n})=>{let i=(0,M.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,data:n.data},r),o=r9(i,t,e,null==r?void 0:r.dataInputFill);return Object.assign(Object.assign({},i),{data:o.data,input:o.input})},nn=t=>"object"==typeof t&&!(0,M.isNullish)(t)&&["input","data","from","gas","gasPrice","gasLimit","address","jsonInterface","syncWithContext","dataInputFill"].some(e=>e in t),ni=t=>"object"==typeof t&&!(0,M.isNullish)(t)&&!nn(t),no=({abi:t,params:e,options:r,contractOptions:n})=>{if(!(null==r?void 0:r.to)&&!n.address)throw new S.Oht("Contract address not specified");if(!(null==r?void 0:r.from)&&!n.from)throw new S.Oht('Contract "from" address not specified');let i=(0,M.mergeDeep)({to:n.address,gas:n.gas,gasPrice:n.gasPrice,from:n.from,input:n.input,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,data:n.data},r),o=r9(i,t,e,null==r?void 0:r.dataInputFill);return Object.assign(Object.assign({},i),{data:o.data,input:o.input})};var ns=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let na={logs:r7,newHeads:rH,newBlockHeaders:rH};class nu extends ${constructor(t,e,r,n,i){var o,s,a;let u;let l=nn(e)?e:nn(r)?r:void 0;if(super(Object.assign(Object.assign({},u=ni(e)?e:ni(r)?r:n),{provider:"object"==typeof e&&"provider"in e?e.provider:"object"==typeof r&&"provider"in r?r.provider:"object"==typeof n&&"provider"in n?n.provider:nu.givenProvider,registeredSubscriptions:na})),this.syncWithContext=!1,this._functions={},!(0,tt.Rw)(l)&&!(0,tt.Rw)(l.data)&&!(0,tt.Rw)(l.input)&&"both"!==this.config.contractDataInputFill)throw new S._Q_({data:l.data,input:l.input});this._overloadedMethodAbis=new Map;let h=(0,M.isDataFormat)(n)?n:(0,M.isDataFormat)(r)?r:null!=i?i:R.YK,c="string"==typeof e?e:void 0;"both"===this.config.contractDataInputFill?this._dataInputFill=this.config.contractDataInputFill:this._dataInputFill=null!==(o=null==l?void 0:l.dataInputFill)&&void 0!==o?o:this.config.contractDataInputFill,this._parseAndSetJsonInterface(t,h),(0,tt.Rw)(c)||this._parseAndSetAddress(c,h),this.options={address:c,jsonInterface:this._jsonInterface,gas:null!==(s=null==l?void 0:l.gas)&&void 0!==s?s:null==l?void 0:l.gasLimit,gasPrice:null==l?void 0:l.gasPrice,from:null==l?void 0:l.from,input:null==l?void 0:l.input,data:null==l?void 0:l.data},this.syncWithContext=null!==(a=null==l?void 0:l.syncWithContext)&&void 0!==a&&a,u instanceof $&&this.subscribeToContextEvents(u),Object.defineProperty(this.options,"address",{set:t=>this._parseAndSetAddress(t,h),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:t=>this._parseAndSetJsonInterface(t,h),get:()=>this._jsonInterface})}get events(){return this._events}get methods(){return this._methods}clone(){let t;return t=this.options.address?new nu([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()):new nu([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this._dataInputFill},this.getContextObject()),this.context&&t.subscribeToContextEvents(this.context),t}deploy(t){var e,r,n;let i=this._jsonInterface.find(t=>"constructor"===t.type);i||(i={type:"constructor",inputs:[],stateMutability:""});let o=(0,M.format)({format:"bytes"},null!==(e=null==t?void 0:t.input)&&void 0!==e?e:this.options.input,R.YK),s=(0,M.format)({format:"bytes"},null!==(r=null==t?void 0:t.data)&&void 0!==r?r:this.options.data,R.YK);if((!o||"0x"===o.trim())&&(!s||"0x"===s.trim()))throw new S.Oht("contract creation without any data provided.");let a=null!==(n=null==t?void 0:t.arguments)&&void 0!==n?n:[],u=Object.assign(Object.assign({},this.options),{input:o,data:s}),l=null!=o?o:s;return{arguments:a,send:t=>{let e=Object.assign({},t);return this._contractMethodDeploySend(i,a,e,u)},estimateGas:(t,e=R.YK)=>ns(this,void 0,void 0,function*(){let r=Object.assign({},t);return this._contractMethodEstimateGas({abi:i,params:a,returnFormat:e,options:r,contractOptions:u})}),encodeABI:()=>r5(i,a,(0,M.format)({format:"bytes"},l,R.YK))}}getPastEvents(t,e,r){var n;return ns(this,void 0,void 0,function*(){let i="string"==typeof t?t:"allEvents",o="string"==typeof t||(0,M.isDataFormat)(t)?(0,M.isDataFormat)(e)?{}:e:t,s=(0,M.isDataFormat)(t)?t:(0,M.isDataFormat)(e)?e:null!=r?r:R.YK,a="allEvents"===i||i===r2?r3:this._jsonInterface.find(t=>"name"in t&&t.name===i);if(!a)throw new S.Oht(`Event ${i} not found.`);let{fromBlock:u,toBlock:l,topics:h,address:c}=r6(this.options,a,null!=o?o:{}),d=yield rO(this,{fromBlock:u,toBlock:l,topics:h,address:c},s),f=d.map(t=>"string"==typeof t?t:r4(a,t,this._jsonInterface,s)),p=null!==(n=null==o?void 0:o.filter)&&void 0!==n?n:{},m=Object.keys(p);return m.length>0?f.filter(t=>"string"==typeof t||m.every(e=>{var r;if(Array.isArray(p[e]))return p[e].some(r=>String(t.returnValues[e]).toUpperCase()===String(r).toUpperCase());let n=null===(r=a.inputs)||void 0===r?void 0:r.filter(t=>t.name===e)[0];if((null==n?void 0:n.indexed)&&"string"===n.type){let r=(0,M.keccak256)(p[e]);if(r===String(t.returnValues[e]))return!0}return String(t.returnValues[e]).toUpperCase()===String(p[e]).toUpperCase()})):f})}_parseAndSetAddress(t,e=R.YK){this._address=t?(0,M.toChecksumAddress)((0,M.format)({format:"address"},t,e)):t}_parseAndSetJsonInterface(t,e=R.YK){var r,n,i,o,s;this._functions={},this._methods={},this._events={};let a=[],u=t.filter(t=>"error"!==t.type),l=t.filter(t=>eV(t));for(let t of u){let u=Object.assign(Object.assign({},t),{signature:""});if(eW(u)){let t=e7(u),e=ru(t);u.signature=e,r="view"===u.stateMutability,u.constant=null!==(n=void 0!==r?r:"pure"===u.stateMutability)&&void 0!==n?n:u.constant,i="payable"===u.stateMutability,u.payable=void 0!==i?i:u.payable,this._overloadedMethodAbis.set(u.name,[...null!==(o=this._overloadedMethodAbis.get(u.name))&&void 0!==o?o:[],u]);let a=null!==(s=this._overloadedMethodAbis.get(u.name))&&void 0!==s?s:[],h=this._createContractMethod(a,l);this._functions[t]={signature:e,method:h},this._methods[u.name]=this._functions[t].method,this._methods[t]=this._functions[t].method,this._methods[e]=this._functions[t].method}else if(eJ(u)){let t=e7(u),r=rt(t),n=this._createContractEvent(u,e);u.signature=r,t in this._events&&"bound"!==u.name||(this._events[t]=n),this._events[u.name]=n,this._events[r]=n}a=[...a,u]}this._events.allEvents=this._createContractEvent(r3,e),this._jsonInterface=[...a],this._errorsInterface=l}_getAbiParams(t,e){var r;try{return tt.P6.transformJsonDataToAbiFormat(null!==(r=t.inputs)&&void 0!==r?r:[],e)}catch(e){throw new S.Oht(`Invalid parameters for method ${t.name}: ${e.message}`)}}_createContractMethod(t,e){let r=t[t.length-1];return(...t)=>{var n,i;let o;let s=null!==(n=this._overloadedMethodAbis.get(r.name))&&void 0!==n?n:[],a=s[0],u=s.filter(e=>{var r;return(null!==(r=e.inputs)&&void 0!==r?r:[]).length===t.length});if(1===s.length||0===u.length)o=this._getAbiParams(a,t),tt.sC.validate(null!==(i=r.inputs)&&void 0!==i?i:[],o);else{let e=[];for(let r of u)try{o=this._getAbiParams(r,t),tt.sC.validate(r.inputs,o),a=r;break}catch(t){e.push(t)}if(e.length===u.length)throw new tt.X$(e)}let l={arguments:o,call:(t,r)=>ns(this,void 0,void 0,function*(){return this._contractMethodCall(a,o,e,t,r)}),send:t=>this._contractMethodSend(a,o,e,t),estimateGas:(t,e=R.YK)=>ns(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:a,params:o,returnFormat:e,options:t})}),encodeABI:()=>r5(a,o),createAccessList:(t,r)=>ns(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(a,o,e,t,r)})};return a.stateMutability,l}}_contractMethodCall(t,e,r,n,i){var o;return ns(this,void 0,void 0,function*(){let s=ne({abi:t,params:e,options:Object.assign(Object.assign({},n),{dataInputFill:this._dataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:null!==(o=this.options.from)&&void 0!==o?o:this.config.defaultAccount})});try{let e=yield rT(this,s,i,R.YK);return r8(t,e)}catch(t){throw t instanceof S.KEx&&rf(r,t.innerError),t}})}_contractMethodCreateAccessList(t,e,r,n,i){var o;return ns(this,void 0,void 0,function*(){let s=no({abi:t,params:e,options:Object.assign(Object.assign({},n),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:null!==(o=this.options.from)&&void 0!==o?o:this.config.defaultAccount})});try{return rL(this,s,i,R.YK)}catch(t){throw t instanceof S.KEx&&rf(r,t.innerError),t}})}_contractMethodSend(t,e,r,n,i){var o,s;let a=null!=i?i:this.options;a=Object.assign(Object.assign({},a),{input:void 0,from:null!==(s=null!==(o=a.from)&&void 0!==o?o:this.defaultAccount)&&void 0!==s?s:void 0});let u=nt({abi:t,params:e,options:Object.assign(Object.assign({},n),{dataInputFill:this.config.contractDataInputFill}),contractOptions:a}),l=rR(this,u,R.YK,{checkRevertBeforeSending:!1});return l.on("error",t=>{t instanceof S.KEx&&rf(r,t.innerError)}),l}_contractMethodDeploySend(t,e,r,n){var i,o;let s=null!=n?n:this.options;s=Object.assign(Object.assign({},s),{from:null!==(o=null!==(i=s.from)&&void 0!==i?i:this.defaultAccount)&&void 0!==o?o:void 0});let a=nt({abi:t,params:e,options:Object.assign(Object.assign({},r),{dataInputFill:this.config.contractDataInputFill}),contractOptions:s});return rR(this,a,R.YK,{transactionResolver:t=>{if(t.status===BigInt(0))throw new S.Oht("code couldn't be stored",t);let e=this.clone();return e.options.address=t.contractAddress,e},checkRevertBeforeSending:!1})}_contractMethodEstimateGas({abi:t,params:e,returnFormat:r,options:n,contractOptions:i}){return ns(this,void 0,void 0,function*(){let o=nr({abi:t,params:e,options:Object.assign(Object.assign({},n),{dataInputFill:this.config.contractDataInputFill}),contractOptions:null!=i?i:this.options});return rN(this,o,R.U1.LATEST,r)})}_createContractEvent(t,e=R.YK){return(...r)=>{var n;let{topics:i,fromBlock:o}=r6(this.options,t,r[0]),s=new r7({address:this.options.address,topics:i,abi:t,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:e});return(0,tt.Rw)(o)||this.getPastEvents(t.name,{fromBlock:o,topics:i},e).then(t=>{t.forEach(t=>s.emit("data",t))}).catch(t=>{s.emit("error",new S.iXd("Failed to get past events.",t))}),null===(n=this.subscriptionManager)||void 0===n||n.addSubscription(s).catch(t=>{s.emit("error",new S.iXd("Failed to subscribe.",t))}),s}}subscribeToContextEvents(t){let e=this;this.context=t,e.syncWithContext&&t.on(A.CONFIG_CHANGE,t=>{e.setConfig({[t.name]:t.newValue})})}}var nl=nu;let nh={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"},nc={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash"},nd={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},nf={"0x1":"main","0x5":"goerli"},np=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}],nm=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"DNSZoneCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"}],ng=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function nv(t){var e;let r;return e=function(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,o=[0,1];for(let t=1;t>--u&1}let c=2147483648-1,d=0;for(let t=0;t<31;t++)d=d<<1|h();let f=[],p=0,m=2147483648;for(;;){let t=Math.floor(((d-p+1)*i-1)/m),e=0,r=n;for(;r-e>1;){let n=e+r>>>1;t>>1|h(),s=s<<1^1073741824,a=(1073741824^a)<<1|1073741825;p=s,m=1+a-s}let g=n-4;return f.map(e=>{switch(e-g){case 3:return g+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return g+256+(t[a++]<<8|t[a++]);case 1:return g+t[a++];default:return e-1}})}(function(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((t,r)=>e[t.charCodeAt(0)]=r);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i=8&&(n[o++]=a>>(s-=8));return n}(t)),r=0,()=>e[r++]}function ny(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let t=0;t{let e=ny(t);if(e.length)return e})}function nw(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(function(t,e){let r=1+e(),n=e(),i=nA(e);return nE(i.length,1+t,e).flatMap((t,e)=>{let[o,...s]=t;return Array(i[e]).fill().map((t,e)=>{let i=e*n;return[o+e*r,s.map(t=>t+i)]})})}(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(nE(1+t(),1+r,t).map(t=>[t[0],t.slice(1)]))}return e.flat()}function nA(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function nE(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i>1:n>>1}return r})(t,r).forEach((t,e)=>n[e].push(t));return n}function nx(t){return`{${t.toString(16).toUpperCase().padStart(2,"0")}}`}function nk(t){let e=t.length;if(e<4096)return String.fromCodePoint(...t);let r=[];for(let n=0;n>24&255}function nM(t){return 16777215&t}function nC(t){return t>=44032&&t<55204}function nP(t){n||function(){let t=nv("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");for(let[e,r]of(n=new Map(nb(t).flatMap((t,e)=>t.map(t=>[t,e+1<<24]))),i=new Set(ny(t)),o=new Map,s=new Map,nw(t))){if(!i.has(e)&&2==r.length){let[t,n]=r,i=s.get(t);i||(i=new Map,s.set(t,i)),i.set(n,e)}o.set(e,r.reverse())}}();let e=[],r=[],a=!1;function u(t){let r=n.get(t);r&&(a=!0,t|=r),e.push(t)}for(let n of t)for(;;){if(n<128)e.push(n);else if(nC(n)){let t=n-44032,e=t/588|0,r=t%588/28|0,i=t%28;u(4352+e),u(4449+r),i>0&&u(4519+i)}else{let t=o.get(n);t?r.push(...t):u(n)}if(!r.length)break;n=r.pop()}if(a&&e.length>1){let t=nS(e[0]);for(let r=1;r0&&i>=t)0==t?(e.push(n,...r),r.length=0,n=a):r.push(a),i=t;else{let o=function(t,e){if(t>=4352&&t<4371&&e>=4449&&e<4470)return 44032+(t-4352)*588+(e-4449)*28;if(nC(t)&&e>4519&&e<4547&&(t-44032)%28==0)return t+(e-4519);{let r=s.get(t);return r&&(r=r.get(e))?r:-1}}(n,a);o>=0?n=o:0==i&&0==t?(e.push(n),n=a):(r.push(a),i=t)}}return n>=0&&e.push(n,...r),e}(nP(t))}let nB=t=>Array.from(t);function nR(t,e){return t.P.has(e)||t.Q.has(e)}class nT extends Array{get is_emoji(){return!0}}function nN(){let t,e;if(a)return;let r=nv("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"),n=()=>ny(r),i=()=>new Set(n());a=new Map(nw(r)),u=i(),l=n(),h=new Set(n().map(t=>l[t])),l=new Set(l),c=i(),i();let o=nb(r),s=r(),y=()=>new Set(n().flatMap(t=>o[t]).concat(n()));d=nA(t=>{let e=nA(r).map(t=>t+96);if(e.length){let n=t>=s;return e[0]-=32,e=nk(e),n&&(e=`Restricted[${e}]`),{N:e,P:y(),Q:y(),M:!r(),R:n}}}),f=i(),p=new Map;let b=n().concat(nB(f)).sort((t,e)=>t-e);for(let{V:t,M:e}of(b.forEach((t,e)=>{let n=r(),i=b[e]=n?b[e-n]:{V:[],M:new Map};i.V.push(t),f.has(t)||p.set(t,i)}),new Set(p.values()))){let r=[];for(let e of t){let t=d.filter(t=>nR(t,e)),n=r.find(({G:e})=>t.some(t=>e.has(t)));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(e),t.forEach(t=>n.G.add(t))}let n=r.flatMap(t=>nB(t.G));for(let{G:t,V:i}of r){let r=new Set(n.filter(e=>!t.has(e)));for(let t of i)e.set(t,r)}}let w=new Set,A=new Set,E=t=>w.has(t)?A.add(t):w.add(t);for(let t of d){for(let e of t.P)E(e);for(let e of t.Q)E(e)}for(let t of w)p.has(t)||A.has(t)||p.set(t,1);for(let n of(m=new Set(nB(w).concat(nB(nP(w).map(nM)))),g=(t=[],e=ny(r),function e({S:r,B:n},i,o){if(!(4&r)||o!==i[i.length-1])for(let s of(2&r&&(o=i[i.length-1]),1&r&&t.push(i),n))for(let t of s.Q)e(s,[...i,t],o)}(function t(n){return{S:r(),B:nA(()=>{let n=ny(r).map(t=>e[t]);if(n.length)return t(n)}),Q:n}}([]),[]),t).map(t=>nT.from(t)).sort(n_),v=new Map,g)){let t=[v];for(let e of n){let r=t.map(t=>{let r=t.get(e);return r||(r=new Map,t.set(e,r)),r});65039===e?t.push(...r):t=r}for(let e of t)e.V=n}}function nO(t){return(nF(t)?"":`${nD(nL([t]))} `)+nx(t)}function nD(t){return`"${t}"\u200E`}function nL(t,e=nx){var r;let n=[];r=t[0],nN(),l.has(r)&&n.push("◌");let i=0,o=t.length;for(let r=0;rt.P.has(e));return n&&(r=`${n.N} ${r}`),Error(`illegal mixture: ${t.N} + ${r}`)}function nG(t){return Error(`illegal placement: ${t}`)}function nj(t){return t.filter(t=>65039!=t)}let nz=t=>{var e;return(e=function(t,e,r){if(!t)return[];nN();let n=0;return t.split(".").map(t=>{let i=function(t){let e=[];for(let r=0,n=t.length;r0;)if(95!==t[--e])throw Error("underscore allowed only at start")}(c),!(o.emoji=s>1||n[0].is_emoji)&&c.every(t=>t<128))!function(t){if(t.length>=4&&45==t[2]&&45==t[3])throw Error(`invalid label extension: "${nk(t.slice(0,4))}"`)}(c),t="ASCII";else{let e=n.flatMap(t=>t.is_emoji?[]:t);if(e.length){if(l.has(c[0]))throw nG("leading combining mark");for(let t=1;tnR(t,r));if(!t.length){if(d.some(t=>nR(t,r)))throw nH(e[0],r);throw nU(r)}if(e=t,1==t.length)break}return e}(r);(function(t,e){for(let r of e)if(!nR(t,r))throw nH(t,r);if(t.M){let t=nP(e).map(nM);for(let e=1,r=t.length;e4)throw Error(`excessive non-spacing marks: ${nD(nL(t.slice(e-1,n)))} (${n-e}/4)`);e=n}}})(i,e),function(t,e){let r;let n=[];for(let t of e){let e=p.get(t);if(1===e)return;if(e){let n=e.M.get(t);if(!(r=r?r.filter(t=>n.has(t)):nB(n)).length)return}else n.push(t)}if(r){for(let e of r)if(n.every(t=>nR(e,t)))throw Error(`whole-script confusable: ${t.N}/${e.N}`)}}(i,r),t=i.N}else t="Emoji"}o.type=t}catch(t){o.error=t}return o})}(t,nI,nj)).map(({input:t,error:r,output:n})=>{if(r){let n=r.message;throw Error(1==e.length?n:`Invalid label ${nD(nL(t))}: ${n}`)}return nk(n)}).join(".")},nq=t=>{let e="";for(let t=0;t<32;t+=1)e+="00";if(t){let r=nz(t),n=r.split(".");for(let t=n.length-1;t>=0;t-=1){let r=(0,M.sha3Raw)(n[t]).slice(2);e=(0,M.sha3Raw)(`0x${e}${r}`).slice(2)}}return`0x${e}`};var nK=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class nQ{constructor(t,e){this.contract=new nu(np,null!=e?e:nd.main,t),this.context=t}getOwner(t){return nK(this,void 0,void 0,function*(){try{let e=this.contract.methods.owner(nq(t)).call();return e}catch(t){throw Error()}})}getTTL(t){return nK(this,void 0,void 0,function*(){try{return this.contract.methods.ttl(nq(t)).call()}catch(t){throw Error()}})}recordExists(t){return nK(this,void 0,void 0,function*(){try{let e=this.contract.methods.recordExists(nq(t)).call();return e}catch(t){throw Error()}})}getResolver(t){return nK(this,void 0,void 0,function*(){try{return this.contract.methods.resolver(nq(t)).call().then(t=>{if("string"==typeof t){let e=new nu(nm,t,this.context);return e}throw Error()})}catch(t){throw Error()}})}get events(){return this.contract.events}}var nY=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class nZ{constructor(t){this.registry=t}getResolverContractAdapter(t){return nY(this,void 0,void 0,function*(){return this.registry.getResolver(t)})}checkInterfaceSupport(t,e){var r,n;return nY(this,void 0,void 0,function*(){if((0,M.isNullish)(nh[e]))throw new S.UF$(null!==(r=t.options.address)&&void 0!==r?r:"",e);let i=yield t.methods.supportsInterface(nh[e]).call();if(!i)throw new S.UF$(null!==(n=t.options.address)&&void 0!==n?n:"",e)})}supportsInterface(t,e){var r;return nY(this,void 0,void 0,function*(){let n=yield this.getResolverContractAdapter(t),i=e;if(!(0,tt.H2)(i)){if(i=null!==(r=(0,M.sha3)(e))&&void 0!==r?r:"",""===e)throw Error("Invalid interface Id");i=i.slice(0,10)}return n.methods.supportsInterface(i).call()})}getAddress(t,e=60){return nY(this,void 0,void 0,function*(){let r=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(r,nc.addr),r.methods.addr(nq(t),e).call()})}getPubkey(t){return nY(this,void 0,void 0,function*(){let e=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(e,nc.pubkey),e.methods.pubkey(nq(t)).call()})}getContenthash(t){return nY(this,void 0,void 0,function*(){let e=yield this.getResolverContractAdapter(t);return yield this.checkInterfaceSupport(e,nc.contenthash),e.methods.contenthash(nq(t)).call()})}}var nV=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class nJ extends ${constructor(t,e){super(null!=e?e:""),this.registryAddress=null!=t?t:nd.main,this._registry=new nQ(this.getContextObject(),t),this._resolver=new nZ(this._registry)}getResolver(t){return nV(this,void 0,void 0,function*(){return this._registry.getResolver(t)})}recordExists(t){return nV(this,void 0,void 0,function*(){return this._registry.recordExists(t)})}getTTL(t){return nV(this,void 0,void 0,function*(){return this._registry.getTTL(t)})}getOwner(t){return nV(this,void 0,void 0,function*(){return this._registry.getOwner(t)})}getAddress(t,e=60){return nV(this,void 0,void 0,function*(){return this._resolver.getAddress(t,e)})}getPubkey(t){return nV(this,void 0,void 0,function*(){return this._resolver.getPubkey(t)})}getContenthash(t){return nV(this,void 0,void 0,function*(){return this._resolver.getContenthash(t)})}checkNetwork(){return nV(this,void 0,void 0,function*(){let t=Date.now()/1e3;if(!this._lastSyncCheck||t-this._lastSyncCheck>3600){let e=yield rS(this);if(!("boolean"==typeof e&&!e))throw new S.X_Y;this._lastSyncCheck=t}if(this._detectedAddress)return this._detectedAddress;let e=yield tz(this,Object.assign(Object.assign({},R.YK),{number:R.vm.HEX})),r=nd[nf[e]];if(void 0===r)throw new S.ZqO(e);return this._detectedAddress=r,this._detectedAddress})}supportsInterface(t,e){return nV(this,void 0,void 0,function*(){return this._resolver.supportsInterface(t,e)})}get events(){return this._registry.events}}var nW=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let nX=t=>nW(void 0,void 0,void 0,function*(){let e=yield th(t);return e.map(M.toChecksumAddress)}),n$=(t,e)=>nW(void 0,void 0,void 0,function*(){tt.sC.validate(["string"],[e]);let r=yield tc(t,e);return(0,M.toChecksumAddress)(r)}),n0=(t,e,r,n)=>nW(void 0,void 0,void 0,function*(){return tt.sC.validate(["address","string","uint"],[e,r,n]),td(t,e,r,n)}),n1=(t,e)=>nW(void 0,void 0,void 0,function*(){return tt.sC.validate(["address"],[e]),tf(t,e)}),n2=(t,e,r)=>nW(void 0,void 0,void 0,function*(){return tt.sC.validate(["string","string"],[e,r]),tp(t,e,r)}),n3=(t,e,r)=>nW(void 0,void 0,void 0,function*(){let n=tG(e,R.pE);return tm(t,n,r)}),n6=(t,e,r)=>nW(void 0,void 0,void 0,function*(){let n=tG(e,R.pE);return tg(t,n,r)}),n4=(t,e,r,n)=>nW(void 0,void 0,void 0,function*(){tt.sC.validate(["string","address","string"],[e,r,n]);let i=(0,tt.H2)(e)?e:(0,M.utf8ToHex)(e);return tv(t,i,r,n)}),n5=(t,e,r)=>nW(void 0,void 0,void 0,function*(){tt.sC.validate(["string","string"],[e,r]);let n=(0,tt.H2)(e)?e:(0,M.utf8ToHex)(e);return ty(t,n,r)});var n8=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};class n7 extends ${getAccounts(){return n8(this,void 0,void 0,function*(){return nX(this.requestManager)})}newAccount(t){return n8(this,void 0,void 0,function*(){return n$(this.requestManager,t)})}unlockAccount(t,e,r){return n8(this,void 0,void 0,function*(){return n0(this.requestManager,t,e,r)})}lockAccount(t){return n8(this,void 0,void 0,function*(){return n1(this.requestManager,t)})}importRawKey(t,e){return n8(this,void 0,void 0,function*(){return n2(this.requestManager,t,e)})}sendTransaction(t,e){return n8(this,void 0,void 0,function*(){return n3(this.requestManager,t,e)})}signTransaction(t,e){return n8(this,void 0,void 0,function*(){return n6(this.requestManager,t,e)})}sign(t,e,r){return n8(this,void 0,void 0,function*(){return n4(this.requestManager,t,e,r)})}ecRecover(t,e){return n8(this,void 0,void 0,function*(){return n5(this.requestManager,t,e)})}}var n9={encodeEventSignature:rt,encodeFunctionCall:rl,encodeFunctionSignature:ru,encodeParameter:rr,encodeParameters:re,decodeParameter:ra,decodeParameters:rs,decodeLog:rd},it=function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})};let ie=t=>{let e=(e,r)=>it(void 0,void 0,void 0,function*(){let n=yield r1(e,t),i=(0,M.format)({format:"bytes"},r,R.pE);return(0,tb.OJ)(n,i)}),r=t=>{let r=(0,tb.LF)(t);return Object.assign(Object.assign({},r),{signTransaction:t=>it(void 0,void 0,void 0,function*(){return e(t,r.privateKey)})})},n=(t,r,n)=>it(void 0,void 0,void 0,function*(){var i;let o=yield(0,tb.pe)(t,r,null===(i=null==n?void 0:n.nonStrict)||void 0===i||i);return Object.assign(Object.assign({},o),{signTransaction:t=>it(void 0,void 0,void 0,function*(){return e(t,o.privateKey)})})}),i=()=>{let t=(0,tb.Ue)();return Object.assign(Object.assign({},t),{signTransaction:r=>it(void 0,void 0,void 0,function*(){return e(r,t.privateKey)})})},o=new tb.w5({create:i,privateKeyToAccount:r,decrypt:n});return{signTransaction:e,create:i,privateKeyToAccount:r,decrypt:n,recoverTransaction:tb.zG,hashMessage:tb.rj,sign:tb.Xx,recover:tb.A9,encrypt:tb.HI,wallet:o}};class ir extends ${constructor(t){var e;!(0,M.isNullish)(t)&&("string"!=typeof t||""!==t.trim())&&("string"==typeof t||j(t)||t.provider)||console.warn("NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!");let r={};"string"==typeof t||j(t)?r.provider=t:r=t||{},r.registeredSubscriptions=Object.assign(Object.assign({},rz),null!==(e=r.registeredSubscriptions)&&void 0!==e?e:{}),super(r);let n=ie(this);this._wallet=n.wallet,this._accountProvider=n,this.utils=M;let i=this,o=i.use(rq);this.eth=Object.assign(o,{ens:i.use(nJ,nd.main),Iban:te,net:i.use(tQ),personal:i.use(n7),Contract:class extends nl{constructor(t,e,r){if("object"==typeof e&&"object"==typeof r)throw new S.yNx("Should not provide options at both 2nd and 3rd parameters");if((0,M.isNullish)(e))super(t,r,i.getContextObject());else if("object"==typeof e)super(t,e,i.getContextObject());else if("string"==typeof e)super(t,e,null!=r?r:{},i.getContextObject());else throw new S.yNx;super.subscribeToContextEvents(i)}},abi:n9,accounts:n})}}ir.version="4.1.2",ir.utils=M,ir.modules={Web3Eth:rq,Iban:te,Net:tQ,ENS:nJ,Personal:n7};var ii=ir}}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/app/layout-58b163300f6dcfa7.js b/test_assets/out/_next/static/chunks/app/layout-58b163300f6dcfa7.js new file mode 100644 index 0000000..759aa51 --- /dev/null +++ b/test_assets/out/_next/static/chunks/app/layout-58b163300f6dcfa7.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6477:function(e,n,t){Promise.resolve().then(t.t.bind(t,4026,23)),Promise.resolve().then(t.t.bind(t,6476,23))},4026:function(){},6476:function(e){e.exports={style:{fontFamily:"'__Inter_a64ecd', '__Inter_Fallback_a64ecd'",fontStyle:"normal"},className:"__className_a64ecd"}}},function(e){e.O(0,[667,139,744],function(){return e(e.s=6477)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/app/page-84f0a425fcdcf910.js b/test_assets/out/_next/static/chunks/app/page-84f0a425fcdcf910.js new file mode 100644 index 0000000..cee7396 --- /dev/null +++ b/test_assets/out/_next/static/chunks/app/page-84f0a425fcdcf910.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{8885:function(){},791:function(){},918:function(e,t,n){Promise.resolve().then(n.bind(n,1460))},1460:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eB}});var o=n(9268),s=n(6394),i=n.n(s),r=n(6006);let a={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,overflow:"auto",cursor:"pointer"},c={backgroundColor:"white",padding:20,borderRadius:4,wordWrap:"break-word",maxHeight:"80vh",overflow:"auto"},l={padding:"10px 20px",backgroundColor:"#ae9151",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"16px",fontWeight:"bold"},d=e=>{let{content:t,handleClose:n}=e;if(!t)return null;let s=e=>{e.target===e.currentTarget&&n()};return(0,o.jsx)("div",{style:a,onClick:s,children:(0,o.jsxs)("div",{style:c,children:[(0,o.jsx)("h2",{children:t.title}),(0,o.jsx)("p",{children:t.content}),(0,o.jsx)("div",{style:{height:"7px"}}),(0,o.jsx)("button",{style:l,onClick:n,children:"Close"})]})})};function u(e){let[t,n]=(0,r.useState)(null);return(0,r.useEffect)(()=>{e().then(e=>{n(e)}).catch(e=>{console.error(e),n(e)})},[e]),t}function g(){return!f()}function f(){var e;return window.webkit?e=>window.webkit.messageHandlers.NOMOJSChannel.postMessage(e):window.NOMOJSChannel?e=>window.NOMOJSChannel.postMessage(e):(null===(e=window.chrome)||void 0===e?void 0:e.webview)?e=>window.chrome.webview.postMessage(e):null}async function h(e,t){let n=new Date,o=e+"_"+n.toISOString()+"_"+Math.random(),s=JSON.stringify({functionName:e,invocationID:o,args:t}),i=new Promise(function(e,t){m[o]=e,p[o]=t});try{let t=f();if(!t)return Promise.reject(`the function ${e} does not work outside of the NOMO-app.`);t(s)}catch(e){return Promise.reject(e.message)}return i}let m={},p={};try{window.fulfillPromiseFromFlutter=function(e){let t;let n=function(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;eJSON.stringify(e));h("nomoNativeLog",{argsArray:n,severity:e})}catch(e){O(e)}}async function k(e){return await h("nomoSignEvmTransaction",e)}async function M(e){return g()?{sigHex:"0x1e8fccc1f75eda4ee82adb9b3b0ae8243b418bd8810873b6df696d240267a223105e265189bd2ea0677bfa42f5d9cbba50622d91ef4e4805cd81f9f8715e38101b"}:await h("nomoSignEvmMessage",e)}async function _(){return g()?{version:"0.2.0",buildNumber:"123400",appName:"Not in Nomo app!",clientName:"Not in Nomo app!",operatingSystem:"unknown"}:await h("nomoGetPlatformInfo",null)}async function B(){return g()?{messengerAddress:"0x3f0e8cf0c6eb9789348541d9d0ce4ac847277e9b",inviteLink:"https://nomo.id/@0x6b65b7eadc7544dcf04869136466ba6224e799a2:zeniq.chat"}:await h("nomoGetMessengerAddress",null)}async function T(){return g()?{walletAddresses:{ETH:"0xF1cA9cb74685755965c7458528A36934Df52A3EF",ZENIQ:"meXd5DAdJYadrgssPVY9sTu1Z1YNJGH9R3"}}:await h("nomoGetWalletAddresses",null)}async function P(e){return await h("nomoInjectQRCode",e)}async function D(e){return await h("nomoInjectIntoPlugin",e)}let F="data:image/png;base64,",H=F+"iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAAE0lEQVR4nGP4wAAgkwB5Bh0pBAAAAABJRU5ErkJggg==";async function G(e){if(g())return{path:"/data/user/0/app.nomo.debug/cache/6098a97a-e556-4711-a069-4809d3db0aeb5994719432468143068.jpg",imageBase64:H};let t=await h("nomoTakePicture",null!=e?e:null);return Object.assign(Object.assign({},t),{imageBase64:F+t.imageBase64})}async function J(e){if(g())return{path:"/data/user/0/app.nomo.debug/cache/6098a97a-e556-4711-a069-4809d3db0aeb5994719432468143068.jpg",imageBase64:H};let t=await h("nomoPickFromGallery",null!=e?e:null);return Object.assign(Object.assign({},t),{imageBase64:F+t.imageBase64})}async function L(){return g()?{name:"LIGHT",displayName:"Nomo Light",colors:{primary:"0xffbca570",onPrimary:"0xffffffff",primaryContainer:"0xfffcfaf7",secondary:"0xffd1af72",onSecondary:"0xff000000",secondaryContainer:"0xffe6d0a3",background:"0xfff5f5f5",surface:"0xffffffff",foreground1:"0xcf000000",foreground2:"0xdf000000",foreground3:"0xef000000",snackBarColor:"0xfffff7e5",disabledColor:"0xffe0e0e0",error:"0xffff5252",settingsTileColor:"0xffffffff",settingsColumnColor:"0xffededed"}}:await h("nomoGetTheme",null)}async function W(){return g()?{deviceHashes:"b6Qz6EEKg,m2wAyKypQ,d67rq8zvw,pHcGGpnD5,iBFGnwEoE,vBhmQwyos,aGGJKq2QG,o9q6MhCeA,s9KLx6CVa,f7nin76st,rF3JVtwjV,u3txrGJEW"}:await h("nomoGetDeviceHashes",null)}async function V(){return g()?{deviceName:"Browser fallback mode: No device name outside of Nomo app"}:await h("nomoGetDeviceName",null)}async function z(e){return await x(e)}async function U(e){return await h("nomoSendAssets",e)}async function q(){return g()?{mnemonicBackupExisted:!1}:await h("nomoMnemonicBackupExisted",{})}async function Q(e){if(window.onPluginVisible=e,!g())return await h("nomoEnableOnPluginVisible",{})}async function R(){return g()?{language:"en"}:await h("nomoGetLanguage",{})}async function Z(e){return await h("nomoAddCustomToken",e)}async function K(){return g()?{visibleAssets:[{name:"AVINOC",symbol:"AVINOC ZEN20",decimals:18,contractAddress:"0xF1cA9cb74685755965c7458528A36934Df52A3EF"}]}:await h("nomoGetVisibleAssets",{})}let X=null;async function Y(){if(!X){let e=await T();X=e.walletAddresses.ETH}return X}async function $(){return g()?{selectedAsset:{name:"AVINOC",symbol:"AVINOC ZEN20",decimals:18,contractAddress:"0xF1cA9cb74685755965c7458528A36934Df52A3EF"}}:await h("nomoSelectAssetFromDialog",{})}async function ee(){return await h("nomoGetManifest",{})}async function et(e){return await h("nomoLaunchUrl",e)}async function en(){let e=await N.getTheme(),t=e.colors;for(let e of Object.entries(t))t[e[0]]=function(e){if(!e.startsWith("0x"))return e;let t=e.replace("0x","");return t.length>=8&&(t=t.substring(2)+t.substring(0,2)),"#"+t}(e[1]);return e}async function eo(){let e=document.getElementsByTagName("html");if(!e)return Promise.reject("did not find HTML tag for injection");let t=await en();Object.entries(t.colors).forEach(t=>{var n;let o="--nomo"+((n=t[0]).length?n.charAt(0).toUpperCase()+n.slice(1):n),s=t[1];e[0].style.setProperty(o,s)})}var es=n(4817),ei=n.n(es);function er(e){let t=JSON.stringify(e,function(e,t){return"bigint"==typeof t?t.toString():t},1);return t}n(4470);var ea=n(1725),ec=n(9492),el=n(1801),ed=n(7424),eu=n(4344),eg=n(4336),ef=n(2040);let eh=null;function em(){if(!eh){console.error("fallback mode: try to read NEXT_PUBLIC_FALLBACK_MNEMONIC from environment");let e=ef.env.NEXT_PUBLIC_FALLBACK_MNEMONIC;if(!e||!e.length)throw Error("NEXT_PUBLIC_FALLBACK_MNEMONIC is not defined. Create a .env.local to define it");eh=ed.w5.fromMnemonic(e)}return eh}let ep=null;class ex extends eu.E{constructor(e){super(),(0,eg.zG)(this,"provider",e||null)}connect(e){return this}getAddress(){return g()?em().getAddress():ep?Promise.resolve(ep):new Promise((e,t)=>{N.getWalletAddresses().then(t=>{e(ep=t.walletAddresses.ETH)}).catch(e=>{t(e)})})}signMessage(e){return Promise.reject("signMessage not implemented")}signTransaction(e){if(g())return function(e){let t=em();return t.signTransaction(e)}(e);let t={};for(let n of["chainId","data","gasLimit","gasPrice","nonce","to","type","value"])t[n]=e[n];let n=el.qC(t);return new Promise((e,o)=>{N.signEvmTransaction({messageHex:n}).then(n=>{let o=function(e,t){if(130!==t.length)throw Error("unexpected sigHexFromNative length");let n=t.startsWith("0x")?t:"0x"+t;return el.qC(e,n)}(t,n.sigHex);e(o)}).catch(e=>{o(e)})})}}let ew=new ea.r("https://smart.zeniq.network:9545",383414847825),eb=new ex(ew);async function ey(){let e=await eb.getAddress(),t=ec.vz("0.1",18),n=await eb.sendTransaction({to:e,value:t,gasLimit:21e3});return n}var eN=n(589),ev=n(6852),ej=n(7419),eA=n(2671),eO=n(4212),eC=n(1083).Buffer;let eS="https://smart.zeniq.network:9545",eE=ev.Gn.custom({name:"mainnet",networkId:383414847825,chainId:383414847825,url:eS}),eI=new eN.BvB(new eN.BvB.providers.HttpProvider(eS));async function ek(e,t){let n=e.getMessageToSign(!1),o=function(e){let t=eA.yH.encode(e),n=eC.from(t),o="0x"+n.toString("hex");return o}(n);return console.log("unsignedTxHex",o),new Promise((n,s)=>{N.signEvmTransaction({messageHex:o}).then(o=>{console.log("resFromNomo",o.sigHex);let s=function(e,t,n){if(130!==t.length)throw Error("unexpected sigHexFromNative length");let o=t.startsWith("0x")?t:"0x"+t,s={chainId:383414847825,type:0};for(let t of["chainId","data","gasLimit","gasPrice","nonce","to","type","value"]){let o=e[t];if("bigint"==typeof o&&(o="value"===t?ej.O$.from(o):Number(o)),"to"===t&&(o=n),void 0!==o&&(s[t]=o),void 0===s[t])throw Error("missing property "+t+" in txRequestFromWeb3Js")}return Object.freeze(s),eO.qC(s,o)}(e,o.sigHex,t);n(s)}).catch(e=>{s(e)})})}async function eM(){let e=await N.getEvmAddress();console.log("ownAddress",e);let t=eI.utils.toWei("0.1","ether"),n=await eI.eth.getTransactionCount(e),o={nonce:n,to:e,value:eI.utils.toBigInt(t),gasLimit:21000n,gasPrice:1e10},s=ev.YW.fromTxData(o,{common:eE}),i=await ek(s,e),r=await eI.eth.sendSignedTransaction(i);return console.log("res",r),r}async function e_(){let e=await N.getWalletAddresses(),t=e.walletAddresses.ETH;if("0x05870f1507d820212E921e1f39f14660336231D1"!==t)return"This test only works with the reject wallet";let n=await N.signEvmTransaction({messageHex:"0xf382049a8502540be4008252089405870f1507d820212e921e1f39f14660336231d188016345785d8a0000808559454e49518080"});console.log("sigFromNomo",n.sigHex);let{v:o,r:s,s:i}=function(e){let t=BigInt("0x"+e.slice(0,64)),n=BigInt("0x"+e.slice(64,128)),o=BigInt("0x"+e.slice(128,130));return{v:o,r:t,s:n}}(n.sigHex);return 0x46b737d652093ddf9f9dd7cc53dab762434a4df1a5ffc40968fa66d6e7fe9b80n!==s||0x12416bb6aa894a8d8fe6b9c456fbb1a2dbf9a3597b02e755ef84230ce2800f7bn!==i||27n!==o?"TEST FAIL: expectedSig != sigFromNomo":"TEST SUCCESS: expectedSig == sigFromNomo"}function eB(){let[e,t]=(0,r.useState)(null),n=u(N.getPlatformInfo),s=u(N.getWalletAddresses),a=u(N.getMessengerAddress),c=u(N.getDeviceName),l=u(en),[g,f]=(0,r.useState)(null),[h,m]=(0,r.useState)(null);(0,r.useEffect)(()=>{N.enableMobileConsoleDebugging(),console.warn("test console warning"),console.info("test console info"),console.log("test console with multiple args",1,{object:3},{nesting:{key:"some value"}},!1),N.localStorage.setItem("foo","bar"),N.localStorage.getItem("foo").then(e=>{console.log("Got value from nomoLocalStorage: "+e)}),N.getDeviceHashes().then(console.log).catch(console.error),N.getManifest().then(console.log).catch(console.error),eo(),N.registerOnPluginVisible(e=>{console.log("onPluginVisible called",e)}),N.getVisibleAssets().then(console.log).catch(console.error)},[]);let p=e=>{console.log("openDialog",e),t(e)};return(0,o.jsxs)("main",{className:ei().main,children:[(0,o.jsx)("div",{className:ei().description,children:(0,o.jsx)("p",{children:"NOMO Demo Plugin - Get started by editing src/app/page.tsx. Scroll down to explore features of NOMO-plugins!"})}),(0,o.jsxs)("div",{className:ei().flex,children:[(0,o.jsx)(d,{content:e,handleClose:()=>t(null)}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsx)(i(),{className:ei().logo,src:"/nomo-logo-square.jpg",alt:"NOMO Logo",width:180,height:37,priority:!0}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsxs)("div",{style:{width:"100%"},children:[(0,o.jsx)("b",{children:"Platform info:"})," ",JSON.stringify(n)]}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsxs)("div",{style:{width:"100%"},children:[(0,o.jsx)("b",{children:"Wallet addresses:"})," ",JSON.stringify(s)]}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsxs)("div",{style:{width:"100%"},children:[(0,o.jsx)("b",{children:"Chat messenger address:"})," ",JSON.stringify(a).substring(0,70),".."]}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsxs)("div",{style:{width:"100%"},children:[(0,o.jsx)("b",{children:"NOMO theme:"})," ",JSON.stringify(l).substring(0,70),".."]}),(0,o.jsx)("div",{style:{height:"10px"}}),(0,o.jsxs)("div",{style:{width:"100%"},children:[(0,o.jsx)("b",{children:"Device name:"})," ",JSON.stringify(c)]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{eM().then(e=>{let t=er(e);p({title:"Transaction submitted to the ZENIQ Smartchain!",content:t})}).catch(e=>{console.error(e),p({title:"sendDemoTransaction failed",content:e instanceof Error?e.toString():JSON.stringify(e)})})},children:["Sign EVM transaction with web3.js",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Send a transaction to the ZENIQ Smartchain, signed by the Nomo app with web3js-nomo-plugins."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{ey().then(e=>{let t=er(e);p({title:"Transaction submitted to the ZENIQ Smartchain!",content:t})}).catch(e=>{console.error(e),p({title:"sendDemoTransaction failed",content:e instanceof Error?e.toString():JSON.stringify(e)})})},children:["Sign EVM transaction with ethers.js",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Send a transaction to the ZENIQ Smartchain, signed by the Nomo app with ethersjs-nomo-plugins."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.takePicture({maxWidth:800,maxHeight:800}).then(e=>{f(e.imageBase64)}).catch(e=>{console.error(e),p({title:"nomoTakePicture failed",content:JSON.stringify(e)})})},children:["Take picture ",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Use the NOMO-app for getting a picture into the plugin."})]}),g?(0,o.jsx)("img",{src:g,alt:"",style:{maxWidth:"100%"}}):(0,o.jsx)("div",{children:"Your camera image will be shown here"}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.pickFromGallery({maxWidth:1e3,maxHeight:1e3}).then(e=>{m(e.imageBase64)}).catch(e=>{console.error(e),p({title:"nomoPickFromGallery failed",content:JSON.stringify(e)})})},children:["Open gallery",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Upload documents or images from a NOMO-plugin."})]}),h?(0,o.jsx)("img",{src:h,alt:"",style:{maxWidth:"100%"}}):(0,o.jsx)("div",{children:"Your gallery image will be shown here"}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.injectQRCode({qrCode:"https://nomo.id/@0x6b65b7eadc7544dcf04869136466ba6224e799a2:zeniq.chat",navigateBack:!0}).catch(e=>{console.error(e),p({title:"Opening a chat failed",content:JSON.stringify(e)})})},children:["Open a chat ",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Open a chat with a human or with a chat-bot, powered by the zeniq.chat service."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{p({title:"Feature not yet available",content:"Future updates of the NOMO-app will bring AI capabilities."})},children:["Speech to text",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Say something to the NOMO-app and get the text into the plugin."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.authHttp({url:"https://price.zeniq.services/v2/currentprice/avinoc/usd"}).then(e=>{p({title:"NOMO-Auth",content:"Used nomoAuthHttp for fetching an AVINOC-price: "+e.response})}).catch(e=>{console.error(e),p({title:"nomoAuthHttp failed",content:JSON.stringify(e)})})},children:["NOMO-Auth",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"NOMO-Auth is a protocol for seamless authentication of plugins, utilizing the NOMO-wallet."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{p({title:"NOMO-ID",content:"For NOMO-ID, a plugin can inject QRCodes without actually scanning QRCodes. See GitHub for more information about the NOMO-ID protocol."})},children:["NOMO-ID",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Log in instantly with NOMO-ID. With NOMO-plugins, there is no need to scan a QRCode."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.sendAssets({assetSymbol:"ZENIQ Token",targetAddress:"0x7561DEAf4ECf96dc9F0d50B4136046979ACdAD3e",amount:"100000000000000000"}).catch(e=>{console.error(e),p({title:"nomoSendAssets failed",content:JSON.stringify(e)})})},children:["Send assets",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"With consent from the user, plugins can send assets from the NOMO-wallet."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.signEvmMessage({message:"this message comes from my wallet"}).then(e=>{p({title:"Message was signed!",content:JSON.stringify(e)})}).catch(e=>{console.error(e),p({title:"signEvmMessage failed",content:JSON.stringify(e)})})},children:["Sign EVM message",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"With consent from the user, plugins can sign messages to prove that the user controls a specific wallet."})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{N.addCustomToken({contractAddress:"0x83B58BC6CB9653117c206DDAFA3018b9344F8070",network:"zeniqSmartChain"}).catch(console.error)},children:["Add custom token",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Plugins can expand the list of tokens"})]}),(0,o.jsxs)("div",{className:ei().card,children:[(0,o.jsxs)("h2",{onClick:()=>{e_().then(e=>{p({title:"Unittest Result",content:JSON.stringify(e)})}).catch(e=>{console.error(e),p({title:"sign transaction failed",content:e.toString()})})},children:["Unittest transaction signing ",(0,o.jsx)("span",{children:"->"})]}),(0,o.jsx)("p",{children:"Unittest for signing a transaction with the Nomo app."})]})]})]})}},4470:function(){},4817:function(e){e.exports={main:"page_main__ibFHK",description:"page_description__s_Lqk",code:"page_code__Cdcue",flex:"page_flex__es1Vt",card:"page_card__ftWzl",center:"page_center__GvJ9Y",logo:"page_logo__M5piD",content:"page_content__rFejU",grid:"page_grid__2WZXq",vercelLogo:"page_vercelLogo__1QD2W",rotate:"page_rotate__P15uU"}}},function(e){e.O(0,[722,667,139,744],function(){return e(e.s=918)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/main-47256448c4a9e632.js b/test_assets/out/_next/static/chunks/main-47256448c4a9e632.js new file mode 100644 index 0000000..38643a4 --- /dev/null +++ b/test_assets/out/_next/static/chunks/main-47256448c4a9e632.js @@ -0,0 +1,25 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{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 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(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})})},4848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return l}});let r=n(6258),a=n(7812);function l(e,t){return(0,a.normalizePathTrailingSlash)((0,r.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)},5116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(7812);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let n=t[e.type]||[];n.push(e),t[e.type]=n});let r=t.title?t.title[0]:null,a="";if(r){let{children:e}=r.props;a="string"==typeof e?e:Array.isArray(e)?e.join(""):""}a!==document.title&&(document.title=a),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let n=document.getElementsByTagName("head")[0],r=n.querySelector("meta[name=next-head-count]"),o=Number(r.content),i=[];for(let t=0,n=r.previousElementSibling;t{for(let t=0,n=i.length;t{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>n.insertBefore(e,r)),r.content=(o-i.length+s.length).toString()},("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)},35:function(e,t,n){"use strict";let r,a,l,o,i,u,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let m=n(1757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{version:function(){return B},router:function(){return r},emitter:function(){return H},initialize:function(){return $},hydrate:function(){return eo}});let g=n(8754);n(37);let y=g._(n(5784)),v=g._(n(7618)),b=n(3142),w=g._(n(5344)),_=n(7220),S=n(7232),k=n(4030),P=n(6607),E=n(6333),x=n(6873),C=n(1826),O=g._(n(9997)),N=g._(n(795)),R=g._(n(9442)),L=n(9190),M=n(3598),j=n(676),T=n(9677),A=n(303),z=n(1219),I=n(6102),D=n(1066),F=n(8747),U=g._(n(9899)),B="13.4.3",H=(0,w.default)(),W=e=>[].slice.call(e),V=!1;self.__next_require__=n;class q extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),r.isSsr&&(a.isFallback||a.nextExport&&((0,k.isDynamicRoute)(r.pathname)||location.search||V)||a.props&&a.props.__N_SSG&&(location.search||V))&&r.replace(r.pathname+"?"+String((0,P.assign)((0,P.urlQueryToSearchParams)(r.query),new URLSearchParams(location.search))),l,{_h:1,shallow:!a.isFallback&&!V}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function $(e){void 0===e&&(e={}),a=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=a,h=a.defaultLocale;let t=a.assetPrefix||"";if(n.p=""+t+"/_next/",(0,E.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:a.runtimeConfig||{}}),l=(0,x.getURL)(),(0,z.hasBasePath)(l)&&(l=(0,A.removeBasePath)(l)),a.scriptLoader){let{initScriptLoader:e}=n(6431);e(a.scriptLoader)}o=new N.default(a.buildId,t);let s=e=>{let[t,n]=e;return o.routeLoader.onEntrypoint(t,n)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(u=(0,O.default)()).getIsSsr=()=>r.isSsr,i=document.getElementById("__next"),{assetPrefix:t}}function Q(e,t){return y.default.createElement(e,t)}function G(e){var t;let{children:n}=e;return y.default.createElement(q,{fn:e=>X({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e))},y.default.createElement(I.AppRouterContext.Provider,{value:(0,D.adaptForAppRouterInstance)(r)},y.default.createElement(F.SearchParamsContext.Provider,{value:(0,D.adaptForSearchParams)(r)},y.default.createElement(D.PathnameContextProviderAdapter,{router:r,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t},y.default.createElement(_.RouterContext.Provider,{value:(0,M.makePublicRouterInstance)(r)},y.default.createElement(b.HeadManagerContext.Provider,{value:u},y.default.createElement(T.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:!0}},n)))))))}let Y=e=>t=>{let n={...t,Component:p,err:a.err,router:r};return y.default.createElement(G,null,Q(e,n))};function X(e){let{App:t,err:i}=e;return console.error(i),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),o.loadPage("/_error").then(r=>{let{page:a,styleSheets:l}=r;return(null==s?void 0:s.Component)===a?Promise.resolve().then(()=>m._(n(2512))).then(r=>Promise.resolve().then(()=>m._(n(3439))).then(n=>(t=n.default,e.App=t,r))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:a,styleSheets:l}}).then(n=>{var o;let{ErrorComponent:u,styleSheets:s}=n,c=Y(t),f={Component:u,AppTree:c,router:r,ctx:{err:i,pathname:a.page,query:a.query,asPath:l,AppTree:c}};return Promise.resolve((null==(o=e.props)?void 0:o.err)?e.props:(0,x.loadGetInitialProps)(t,f)).then(t=>ea({...e,err:i,Component:u,styleSheets:s,props:t}))})}function K(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let Z=null,J=!0;function ee(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach(e=>performance.clearMarks(e))}function et(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),d&&performance.getEntriesByName("Next.js-hydration").forEach(d),ee())}function en(){if(!x.ST)return;performance.mark("afterRender");let e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),d&&(performance.getEntriesByName("Next.js-render").forEach(d),performance.getEntriesByName("Next.js-route-change-to-render").forEach(d)),ee(),["Next.js-route-change-to-render","Next.js-render"].forEach(e=>performance.clearMeasures(e)))}function er(e){let{callbacks:t,children:n}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,R.default)(d)},[]),n}function ea(e){let t,{App:n,Component:a,props:l,err:o}=e,u="initial"in e?void 0:e.styleSheets;a=a||s.Component,l=l||s.props;let f={...l,Component:a,err:o,router:r};s=f;let d=!1,p=new Promise((e,n)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,n(e)}});function h(){t()}!function(){if(!u)return;let e=W(document.querySelectorAll("style[data-n-href]")),t=new Set(e.map(e=>e.getAttribute("data-n-href"))),n=document.querySelector("noscript[data-n-css]"),r=null==n?void 0:n.getAttribute("data-n-css");u.forEach(e=>{let{href:n,text:a}=e;if(!t.has(n)){let e=document.createElement("style");e.setAttribute("data-n-href",n),e.setAttribute("media","x"),r&&e.setAttribute("nonce",r),document.head.appendChild(e),e.appendChild(document.createTextNode(a))}})}();let m=y.default.createElement(y.default.Fragment,null,y.default.createElement(K,{callback:function(){if(u&&!d){let e=new Set(u.map(e=>e.href)),t=W(document.querySelectorAll("style[data-n-href]")),n=t.map(e=>e.getAttribute("data-n-href"));for(let r=0;r{let{href:t}=e,n=document.querySelector('style[data-n-href="'+t+'"]');n&&(r.parentNode.insertBefore(n,r.nextSibling),r=n)}),W(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:n}=e.scroll;(0,S.handleSmoothScroll)(()=>{window.scrollTo(t,n)})}}}),y.default.createElement(G,null,Q(n,f),y.default.createElement(C.Portal,{type:"next-route-announcer"},y.default.createElement(L.RouteAnnouncer,null))));return!function(e,t){x.ST&&performance.mark("beforeRender");let n=t(J?et:en);if(Z){let e=y.default.startTransition;e(()=>{Z.render(n)})}else Z=v.default.hydrateRoot(e,n,{onRecoverableError:U.default}),J=!1}(i,e=>y.default.createElement(er,{callbacks:[e,h]},m)),p}async function el(e){if(e.err){await X(e);return}try{await ea(e)}catch(n){let t=(0,j.getProperError)(n);if(t.cancelled)throw t;await X({...e,err:t})}}async function eo(e){let t=a.err;try{let e=await o.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:n}=e;f=t,n&&n.reportWebVitals&&(d=e=>{let t,{id:r,name:a,startTime:l,value:o,duration:i,entryType:u,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:r||f,name:a,startTime:l||t,value:null==o?i:o,label:"mark"===u||"measure"===u?"custom":"web-vital"};c&&(d.attribution=c),n.reportWebVitals(d)});let r=await o.routeLoader.whenEntrypoint(a.page);if("error"in r)throw r.error;p=r.component}catch(e){t=(0,j.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(a.dynamicIds),r=(0,M.createRouter)(a.page,a.query,l,{initialProps:a.props,pageLoader:o,App:f,Component:p,wrapApp:Y,err:t,isFallback:!!a.isFallback,subscription:(e,t,n)=>el(Object.assign({},e,{App:t,scroll:n})),locale:a.locale,locales:a.locales,defaultLocale:h,domainLocales:a.domainLocales,isPreview:a.isPreview}),V=await r._initialMatchesMiddlewarePromise;let n={App:f,initial:!0,Component:p,props:a.props,err:t};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),el(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)},2768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(35);window.next={version:r.version,get router(){return r.router},emitter:r.emitter},(0,r.initialize)({}).then(()=>(0,r.hydrate)()).catch(console.error),("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)},7812:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return l}});let r=n(386),a=n(5606),l=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:l}=(0,a.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+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)},9899:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(9757);function a(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};e.digest!==r.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)},795:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let r=n(8754),a=n(4848),l=n(5466),o=r._(n(8473)),i=n(5116),u=n(4030),s=n(4393),c=n(386),f=n(5202);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:n,locale:r}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(n),{pathname:h}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,o.default)((0,c.removeTrailingSlash)((0,i.addLocale)(e,r)),".json");return(0,a.addBasePath)("/_next/data/"+this.buildId+t+p,!0)})(e.skipInterpolation?h:(0,u.isDynamicRoute)(m)?(0,l.interpolateAs)(f,h,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("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)},9442:function(e,t,n){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let a=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let l=!1;function o(e){r&&r(e)}let i=e=>{if(r=e,!l)for(let e of(l=!0,a))try{let t;t||(t=n(8018)),t["on"+e](o)}catch(t){console.warn("Failed to track "+e+" web-vital",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)},1826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return l}});let r=n(5784),a=n(8369),l=e=>{let{children:t,type:n}=e,[l,o]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=document.createElement(n);return document.body.appendChild(e),o(e),()=>{document.body.removeChild(e)}},[n]),l?(0,a.createPortal)(t,l):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)},303:function(e,t,n){"use strict";function r(e){return(e=e.slice(0)).startsWith("/")||(e="/"+e),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(1219),("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)},3215:function(e,t,n){"use strict";function r(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return r}}),n(5606),("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)},7027:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return r}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(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)},9190:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RouteAnnouncer:function(){return i},default:function(){return u}});let r=n(8754),a=r._(n(5784)),l=n(3598),o={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"},i=()=>{let{asPath:e}=(0,l.useRouter)(),[t,n]=a.default.useState(""),r=a.default.useRef(e);return a.default.useEffect(()=>{if(r.current!==e){if(r.current=e,document.title)n(document.title);else{var t;let r=document.querySelector("h1"),a=null!=(t=null==r?void 0:r.innerText)?t:null==r?void 0:r.textContent;n(a||e)}}},[e]),a.default.createElement("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:o},t)},u=i;("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)},5202:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{markAssetError:function(){return i},isAssetError:function(){return u},getClientBuildManifest:function(){return f},createRouteLoader:function(){return p}}),n(8754),n(8473);let r=n(5980),a=n(7027);function l(e,t,n){let r,a=t.get(e);if(a)return"future"in a?a.future:Promise.resolve(a);let l=new Promise(e=>{r=e});return t.set(e,a={resolve:r,future:l}),n?n().then(e=>(r(e),e)).catch(n=>{throw t.delete(e),n}):l}let o=Symbol("ASSET_LOAD_ERROR");function i(e){return Object.defineProperty(e,o,{})}function u(e){return e&&o in e}let s=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}();function c(e,t,n){return new Promise((r,l)=>{let o=!1;e.then(e=>{o=!0,r(e)}).catch(l),(0,a.requestIdleCallback)(()=>setTimeout(()=>{o||l(n)},t))})}function f(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);let e=new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}});return c(e,3800,i(Error("Failed to load client build manifest")))}function d(e,t){return f().then(n=>{if(!(t in n))throw i(Error("Failed to lookup route: "+t));let a=n[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:a.filter(e=>e.endsWith(".js")).map(e=>(0,r.__unsafeCreateTrustedScriptURL)(e)),css:a.filter(e=>e.endsWith(".css"))}})}function p(e){let t=new Map,n=new Map,r=new Map,o=new Map;function u(e){{var t;let r=n.get(e.toString());return r||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(n.set(e.toString(),r=new Promise((n,r)=>{(t=document.createElement("script")).onload=n,t.onerror=()=>r(i(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),r))}}function f(e){let t=r.get(e);return t||r.set(e,t=fetch(e).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw i(e)})),t}return{whenEntrypoint:e=>l(e,t),onEntrypoint(e,n){(n?Promise.resolve().then(()=>n()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(n=>{let r=t.get(e);r&&"resolve"in r?n&&(t.set(e,n),r.resolve(n)):(n?t.set(e,n):t.delete(e),o.delete(e))})},loadRoute(n,r){return l(n,o,()=>{let a;return c(d(e,n).then(e=>{let{scripts:r,css:a}=e;return Promise.all([t.has(n)?[]:Promise.all(r.map(u)),Promise.all(a.map(f))])}).then(e=>this.whenEntrypoint(n).then(t=>({entrypoint:t,styles:e[1]}))),3800,i(Error("Route did not complete loading: "+n))).then(e=>{let{entrypoint:t,styles:n}=e,r=Object.assign({styles:n},t);return"error"in t?t:r}).catch(e=>{if(r)throw e;return{error:e}}).finally(()=>null==a?void 0:a())})},prefetch(t){let n;return(n=navigator.connection)&&(n.saveData||/2g/.test(n.effectiveType))?Promise.resolve():d(e,t).then(e=>Promise.all(s?e.scripts.map(e=>{var t,n,r;return t=e.toString(),n="script",new Promise((e,a)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();r=document.createElement("link"),n&&(r.as=n),r.rel="prefetch",r.crossOrigin=void 0,r.onload=e,r.onerror=()=>a(i(Error("Failed to prefetch: "+t))),r.href=t,document.head.appendChild(r)})}):[])).then(()=>{(0,a.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("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)},3598:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Router:function(){return l.default},default:function(){return p},withRouter:function(){return u.default},useRouter:function(){return h},createRouter:function(){return m},makePublicRouterInstance:function(){return g}});let r=n(8754),a=r._(n(5784)),l=r._(n(9004)),o=n(7220),i=r._(n(676)),u=r._(n(8799)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>l.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get(){let t=d();return t[e]}})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,n=Array(t),r=0;r{s.ready(()=>{l.default.events.on(e,function(){for(var t=arguments.length,n=Array(t),r=0;re()),s.readyCallbacks=[],s.router}function g(e){let t={};for(let n of c){if("object"==typeof e[n]){t[n]=Object.assign(Array.isArray(e[n])?[]:{},e[n]);continue}t[n]=e[n]}return t.events=l.default.events,f.forEach(n=>{t[n]=function(){for(var t=arguments.length,r=Array(t),a=0;a{let{src:t,id:n,onLoad:r=()=>{},onReady:a=null,dangerouslySetInnerHTML:l,children:o="",strategy:i="afterInteractive",onError:s}=e,p=n||t;if(p&&f.has(p))return;if(c.has(t)){f.add(p),c.get(t).then(r,s);return}let h=()=>{a&&a(),f.add(p)},m=document.createElement("script"),g=new Promise((e,t)=>{m.addEventListener("load",function(t){e(),r&&r.call(this,t),h()}),m.addEventListener("error",function(e){t(e)})}).catch(function(e){s&&s(e)});for(let[n,r]of(l?(m.innerHTML=l.__html||"",h()):o?(m.textContent="string"==typeof o?o:Array.isArray(o)?o.join(""):"",h()):t&&(m.src=t,c.set(t,g)),Object.entries(e))){if(void 0===r||d.includes(n))continue;let e=u.DOMAttributeNames[n]||n.toLowerCase();m.setAttribute(e,r)}"worker"===i&&m.setAttribute("type","text/partytown"),m.setAttribute("data-nscript",i),document.body.appendChild(m)};function h(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>p(e))}):p(e)}function m(e){e.forEach(h),function(){let e=[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')];e.forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}()}function g(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:a=null,strategy:u="afterInteractive",onError:c,...d}=e,{updateScripts:h,scripts:m,getIsSsr:g,appDir:y,nonce:v}=(0,o.useContext)(i.HeadManagerContext),b=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=t||n;b.current||(a&&e&&f.has(e)&&a(),b.current=!0)},[a,t,n]);let w=(0,o.useRef)(!1);if((0,o.useEffect)(()=>{!w.current&&("afterInteractive"===u?p(e):"lazyOnload"===u&&("complete"===document.readyState?(0,s.requestIdleCallback)(()=>p(e)):window.addEventListener("load",()=>{(0,s.requestIdleCallback)(()=>p(e))})),w.current=!0)},[e,u]),("beforeInteractive"===u||"worker"===u)&&(h?(m[u]=(m[u]||[]).concat([{id:t,src:n,onLoad:r,onReady:a,onError:c,...d}]),h(m)):g&&g()?f.add(t||n):g&&!g()&&p(e)),y){if("beforeInteractive"===u)return n?(l.default.preload(n,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"}),o.default.createElement("script",{nonce:v,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n])+")"}})):(d.dangerouslySetInnerHTML&&(d.children=d.dangerouslySetInnerHTML.__html,delete d.dangerouslySetInnerHTML),o.default.createElement("script",{nonce:v,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...d}])+")"}}));"afterInteractive"===u&&n&&l.default.preload(n,d.integrity?{as:"script",integrity:d.integrity}:{as:"script"})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let y=g;("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)},5980:function(e,t){"use strict";let n;function r(e){var t;return(null==(t=function(){if(void 0===n){var e;n=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return n}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return 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)},8799:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(8754),a=r._(n(5784)),l=n(3598);function o(e){function t(t){return a.default.createElement(e,{router:(0,l.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,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)},3439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(8754),a=r._(n(5784)),l=n(6873);async function o(e){let{Component:t,ctx:n}=e,r=await (0,l.loadGetInitialProps)(t,n);return{pageProps:r}}class i extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return a.default.createElement(e,t)}}i.origGetInitialProps=o,i.getInitialProps=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)},2512:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(8754),a=r._(n(5784)),l=r._(n(8316)),o={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function i(e){let{res:t,err:n}=e,r=t&&t.statusCode?t.statusCode:n?n.statusCode:404;return{statusCode:r}}let 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"},desc:{display:"inline-block",textAlign:"left"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};class s extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,n=this.props.title||o[e]||"An unexpected error has occurred";return a.default.createElement("div",{style:u.error},a.default.createElement(l.default,null,a.default.createElement("title",null,e?e+": "+n:"Application error: a client-side exception has occurred")),a.default.createElement("div",null,a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?a.default.createElement("h1",{className:"next-error-h1",style:u.h1},e):null,a.default.createElement("div",{style:u.desc},a.default.createElement("h2",{style:u.h2},this.props.title||e?n:a.default.createElement(a.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}}s.displayName="ErrorPage",s.getInitialProps=i,s.origGetInitialProps=i,("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)},7401:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return l}});let r=n(8754),a=r._(n(5784)),l=a.default.createContext({})},6561:function(e,t){"use strict";function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},6102:function(e,t,n){"use strict";var r,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{CacheStates:function(){return r},AppRouterContext:function(){return i},LayoutRouterContext:function(){return u},GlobalLayoutRouterContext:function(){return s},TemplateContext:function(){return c}});let l=n(8754),o=l._(n(5784));(a=r||(r={})).LAZY_INITIALIZED="LAZYINITIALIZED",a.DATA_FETCH="DATAFETCH",a.READY="READY";let i=o.default.createContext(null),u=o.default.createContext(null),s=o.default.createContext(null),c=o.default.createContext(null)},3839:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return n}});class n{static from(e,t){void 0===t&&(t=.01);let r=new n(e.length,t);for(let t of e)r.add(t);return r}export(){let e={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};return e}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){let t=this.getHashValues(e);t.forEach(e=>{this.bitArray[e]=1})}contains(e){let t=this.getHashValues(e);return t.every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let n=1;n<=this.numHashes;n++){let r=function(e){let t=0;for(let n=0;n>>13,t=Math.imul(t,1540483477)}return t>>>0}(""+e+n)%this.numBits;t.push(r)}return t}constructor(e,t){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},9489:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return a}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function a(e){return n.test(e)?e.replace(r,"\\$&"):e}},3142:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return l}});let r=n(8754),a=r._(n(5784)),l=a.default.createContext({})},8316:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{defaultHead:function(){return c},default:function(){return h}});let r=n(8754),a=n(1757),l=a._(n(5784)),o=r._(n(4323)),i=n(7401),u=n(3142),s=n(6561);function c(e){void 0===e&&(e=!1);let t=[l.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(l.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(9627);let d=["name","httpEquiv","charSet","itemProp"];function p(e,t){let{inAmpMode:n}=t;return e.reduce(f,[]).reverse().concat(c(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return a=>{let l=!0,o=!1;if(a.key&&"number"!=typeof a.key&&a.key.indexOf("$")>0){o=!0;let t=a.key.slice(a.key.indexOf("$")+1);e.has(t)?l=!1:e.add(t)}switch(a.type){case"title":case"base":t.has(a.type)?l=!1:t.add(a.type);break;case"meta":for(let e=0,t=d.length;e{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,l.default.cloneElement(e,t)}return l.default.cloneElement(e,{key:r})})}let h=function(e){let{children:t}=e,n=(0,l.useContext)(i.AmpStateContext),r=(0,l.useContext)(u.HeadManagerContext);return l.default.createElement(o.default,{reduceComponentsToState:p,headManager:r,inAmpMode:(0,s.isInAmpMode)(n)},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)},8747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{SearchParamsContext:function(){return a},PathnameContext:function(){return l}});let r=n(5784),a=(0,r.createContext)(null),l=(0,r.createContext)(null)},4324:function(e,t){"use strict";function n(e,t){let n;let r=e.split("/");return(t||[]).some(t=>!!r[1]&&r[1].toLowerCase()===t.toLowerCase()&&(n=t,r.splice(1,1),e=r.join("/")||"/",!0)),{pathname:e,detectedLocale:n}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}})},9677:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return o}});let r=n(8754),a=r._(n(5784)),l=n(1410),o=a.default.createContext(l.imageConfigDefault)},1410:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={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}},5306:function(e,t){"use strict";function n(e){return Object.prototype.toString.call(e)}function r(e){if("[object Object]"!==n(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getObjectClassLabel:function(){return n},isPlainObject:function(){return r}})},9757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return n}});let n="DYNAMIC_SERVER_USAGE"},5344:function(e,t){"use strict";function n(){let e=Object.create(null);return{on(t,n){(e[t]||(e[t]=[])).push(n)},off(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit(t){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a{e(...r)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}})},7965:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return l}});let r=n(2647),a=n(1821);function l(e){let t=(0,a.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,r.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},1821:function(e,t){"use strict";function n(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return n}})},7220:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return l}});let r=n(8754),a=r._(n(5784)),l=a.default.createContext(null)},1066:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{adaptForAppRouterInstance:function(){return i},adaptForSearchParams:function(){return u},PathnameContextProviderAdapter:function(){return s}});let r=n(1757),a=r._(n(5784)),l=n(8747),o=n(2647);function i(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},push(t){e.push(t)},replace(t){e.replace(t)},prefetch(t){e.prefetch(t)}}}function u(e){return e.isReady&&e.query?function(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else void 0!==r&&t.append(n,r);return t}(e.query):new URLSearchParams}function s(e){let{children:t,router:n,...r}=e,i=(0,a.useRef)(r.isAutoExport),u=(0,a.useMemo)(()=>{let e;let t=i.current;if(t&&(i.current=!1),(0,o.isDynamicRoute)(n.pathname)&&(n.isFallback||t&&!n.isReady))return null;try{e=new URL(n.asPath,"http://f")}catch(e){return"/"}return e.pathname},[n.asPath,n.isFallback,n.isReady,n.pathname]);return a.default.createElement(l.PathnameContext.Provider,{value:u},t)}},9004:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return $},matchesMiddleware:function(){return A},createKey:function(){return W}});let r=n(8754),a=n(1757),l=n(386),o=n(5202),i=n(6431),u=a._(n(676)),s=n(7965),c=n(4324),f=r._(n(5344)),d=n(6873),p=n(4030),h=n(4393);n(2431);let m=n(6616),g=n(248),y=n(242);n(5701);let v=n(5606),b=n(5116),w=n(3215),_=n(303),S=n(4848),k=n(1219),P=n(9423),E=n(5907),x=n(5456),C=n(1336),O=n(1901),N=n(7211),R=n(4532),L=n(947),M=n(5466),j=n(7232);function T(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function A(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:n}=(0,v.parsePath)(e.asPath),r=(0,k.hasBasePath)(n)?(0,_.removeBasePath)(n):n,a=(0,S.addBasePath)((0,b.addLocale)(r,e.locale));return t.some(e=>new RegExp(e.regexp).test(a))}function z(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function I(e,t,n){let[r,a]=(0,L.resolveHref)(e,t,!0),l=(0,d.getLocationOrigin)(),o=r.startsWith(l),i=a&&a.startsWith(l);r=z(r),a=a?z(a):a;let u=o?r:(0,S.addBasePath)(r),s=n?z((0,L.resolveHref)(e,n)):a||r;return{url:u,as:i?s:(0,S.addBasePath)(s)}}function D(e,t){let n=(0,l.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===n||"/_error"===n?e:(t.includes(n)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,g.getRouteRegex)(t).re.test(n))return e=t,!0}),(0,l.removeTrailingSlash)(e))}async function F(e){let t=await A(e);if(!t||!e.fetchData)return null;try{let t=await e.fetchData(),n=await function(e,t,n){let r={basePath:n.router.basePath,i18n:{locales:n.router.locales},trailingSlash:!1},a=t.headers.get("x-nextjs-rewrite"),i=a||t.headers.get("x-nextjs-matched-path"),u=t.headers.get("x-matched-path");if(!u||i||u.includes("__next_data_catchall")||u.includes("/_error")||u.includes("/404")||(i=u),i){if(i.startsWith("/")){let t=(0,h.parseRelativeUrl)(i),u=(0,E.getNextPathnameInfo)(t.pathname,{nextConfig:r,parseData:!0}),s=(0,l.removeTrailingSlash)(u.pathname);return Promise.all([n.router.pageLoader.getPageList(),(0,o.getClientBuildManifest)()]).then(l=>{let[o,{__rewrites:i}]=l,f=(0,b.addLocale)(u.pathname,u.locale);if((0,p.isDynamicRoute)(f)||!a&&o.includes((0,c.normalizeLocalePath)((0,_.removeBasePath)(f),n.router.locales).pathname)){let n=(0,E.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:r,parseData:!0});f=(0,S.addBasePath)(n.pathname),t.pathname=f}if(!o.includes(s)){let e=D(s,o);e!==s&&(s=e)}let d=o.includes(s)?s:D((0,c.normalizeLocalePath)((0,_.removeBasePath)(t.pathname),n.router.locales).pathname,o);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,g.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,v.parsePath)(e),u=(0,x.formatNextPathnameInfo)({...(0,E.getNextPathnameInfo)(t.pathname,{nextConfig:r,parseData:!0}),defaultLocale:n.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-external",destination:""+u+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,v.parsePath)(s),t=(0,x.formatNextPathnameInfo)({...(0,E.getNextPathnameInfo)(e.pathname,{nextConfig:r,parseData:!0}),defaultLocale:n.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:n}}catch(e){return null}}let U=Symbol("SSG_DATA_NOT_FOUND");function B(e){try{return JSON.parse(e)}catch(e){return null}}function H(e){var t;let{dataHref:n,inflightCache:r,isPrefetch:a,hasMiddleware:l,isServerRender:i,parseJSON:u,persistCache:s,isBackground:c,unstable_skipClientCache:f}=e,{href:d}=new URL(n,window.location.href),p=e=>(function e(t,n,r){return fetch(t,{credentials:"same-origin",method:r.method||"GET",headers:Object.assign({},r.headers,{"x-nextjs-data":"1"})}).then(a=>!a.ok&&n>1&&a.status>=500?e(t,n-1,r):a)})(n,i?3:1,{headers:Object.assign({},a?{purpose:"prefetch"}:{},a&&l?{"x-middleware-prefetch":"1"}:{}),method:null!=(t=null==e?void 0:e.method)?t:"GET"}).then(t=>t.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:n,response:t,text:"",json:{},cacheKey:d}:t.text().then(e=>{if(!t.ok){if(l&&[301,302,307,308].includes(t.status))return{dataHref:n,response:t,text:e,json:{},cacheKey:d};if(404===t.status){var r;if(null==(r=B(e))?void 0:r.notFound)return{dataHref:n,json:{notFound:U},response:t,text:e,cacheKey:d}}let a=Error("Failed to load static props");throw i||(0,o.markAssetError)(a),a}return{dataHref:n,json:u?B(e):null,response:t,text:e,cacheKey:d}})).then(e=>(s&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[d],e)).catch(e=>{throw f||delete r[d],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,o.markAssetError)(e),e});return f&&s?p({}).then(e=>(r[d]=Promise.resolve(e),e)):void 0!==r[d]?r[d]:r[d]=p(c?{method:"HEAD"}:{})}function W(){return Math.random().toString(36).slice(2,10)}function V(e){let{url:t,router:n}=e;if(t===(0,S.addBasePath)((0,b.addLocale)(n.asPath,n.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let q=e=>{let{route:t,router:n}=e,r=!1,a=n.clc=()=>{r=!0},l=()=>{if(r){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}a===n.clc&&(n.clc=null)};return l};class ${reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,n){return void 0===n&&(n={}),{url:e,as:t}=I(this,e,t),this.change("pushState",e,t,n)}replace(e,t,n){return void 0===n&&(n={}),{url:e,as:t}=I(this,e,t),this.change("replaceState",e,t,n)}async _bfl(e,t,n,r){{let u=!1,s=!1;for(let c of[e,t])if(c){let t=(0,l.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,S.addBasePath)((0,b.addLocale)(t,n||this.locale));if(t!==(0,l.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var a,o,i;for(let e of(u=u||!!(null==(a=this._bfl_s)?void 0:a.contains(t))||!!(null==(o=this._bfl_s)?void 0:o.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e{})}}}}return!1}async change(e,t,n,r,a){var s,c,f,P,E,x,N,L,j;let z,F;if(!(0,O.isLocalURL)(t))return V({url:t,router:this}),!1;let B=1===r._h;B||r.shallow||await this._bfl(n,void 0,r.locale);let H=B||r._shouldResolveHref||(0,v.parsePath)(t).pathname===(0,v.parsePath)(n).pathname,W={...this.state},q=!0!==this.isReady;this.isReady=!0;let Q=this.isSsr;if(B||(this.isSsr=!1),B&&this.clc)return!1;let G=W.locale;d.ST&&performance.mark("routeChange");let{shallow:Y=!1,scroll:X=!0}=r,K={shallow:Y};this._inFlightRoute&&this.clc&&(Q||$.events.emit("routeChangeError",T(),this._inFlightRoute,K),this.clc(),this.clc=null),n=(0,S.addBasePath)((0,b.addLocale)((0,k.hasBasePath)(n)?(0,_.removeBasePath)(n):n,r.locale,this.defaultLocale));let Z=(0,w.removeLocale)((0,k.hasBasePath)(n)?(0,_.removeBasePath)(n):n,W.locale);this._inFlightRoute=n;let J=G!==W.locale;if(!B&&this.onlyAHashChange(Z)&&!J){W.asPath=Z,$.events.emit("hashChangeStart",n,K),this.changeState(e,t,n,{...r,scroll:!1}),X&&this.scrollToHash(Z);try{await this.set(W,this.components[W.route],null)}catch(e){throw(0,u.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,Z,K),e}return $.events.emit("hashChangeComplete",n,K),!0}let ee=(0,h.parseRelativeUrl)(t),{pathname:et,query:en}=ee;if(null==(s=this.components[et])?void 0:s.__appRouter)return V({url:n,router:this}),new Promise(()=>{});try{[z,{__rewrites:F}]=await Promise.all([this.pageLoader.getPageList(),(0,o.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return V({url:n,router:this}),!1}this.urlIsNew(Z)||J||(e="replaceState");let er=n;et=et?(0,l.removeTrailingSlash)((0,_.removeBasePath)(et)):et;let ea=(0,l.removeTrailingSlash)(et),el=n.startsWith("/")&&(0,h.parseRelativeUrl)(n).pathname,eo=!!(el&&ea!==el&&(!(0,p.isDynamicRoute)(ea)||!(0,m.getRouteMatcher)((0,g.getRouteRegex)(ea))(el))),ei=!r.shallow&&await A({asPath:n,locale:W.locale,router:this});if(B&&ei&&(H=!1),H&&"/_error"!==et&&(r._shouldResolveHref=!0,ee.pathname=D(et,z),ee.pathname===et||(et=ee.pathname,ee.pathname=(0,S.addBasePath)(et),ei||(t=(0,y.formatWithValidation)(ee)))),!(0,O.isLocalURL)(n))return V({url:n,router:this}),!1;er=(0,w.removeLocale)((0,_.removeBasePath)(er),W.locale),ea=(0,l.removeTrailingSlash)(et);let eu=!1;if((0,p.isDynamicRoute)(ea)){let e=(0,h.parseRelativeUrl)(er),r=e.pathname,a=(0,g.getRouteRegex)(ea);eu=(0,m.getRouteMatcher)(a)(r);let l=ea===r,o=l?(0,M.interpolateAs)(ea,r,en):{};if(eu&&(!l||o.result))l?n=(0,y.formatWithValidation)(Object.assign({},e,{pathname:o.result,query:(0,R.omit)(en,o.params)})):Object.assign(en,eu);else{let e=Object.keys(a.groups).filter(e=>!en[e]&&!a.groups[e].optional);if(e.length>0&&!ei)throw Error((l?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+r+") is incompatible with the `href` value ("+ea+"). ")+"Read more: https://nextjs.org/docs/messages/"+(l?"href-interpolation-failed":"incompatible-href-as"))}}B||$.events.emit("routeChangeStart",n,K);let es="/404"===this.pathname||"/_error"===this.pathname;try{let l=await this.getRouteInfo({route:ea,pathname:et,query:en,as:n,resolvedAs:er,routeProps:K,locale:W.locale,isPreview:W.isPreview,hasMiddleware:ei,unstable_skipClientCache:r.unstable_skipClientCache,isQueryUpdating:B&&!this.isFallback,isMiddlewareRewrite:eo});if(B||r.shallow||await this._bfl(n,"resolvedAs"in l?l.resolvedAs:void 0,W.locale),"route"in l&&ei){ea=et=l.route||ea,K.shallow||(en=Object.assign({},l.query||{},en));let e=(0,k.hasBasePath)(ee.pathname)?(0,_.removeBasePath)(ee.pathname):ee.pathname;if(eu&&et!==e&&Object.keys(eu).forEach(e=>{eu&&en[e]===eu[e]&&delete en[e]}),(0,p.isDynamicRoute)(et)){let e=!K.shallow&&l.resolvedAs?l.resolvedAs:(0,S.addBasePath)((0,b.addLocale)(new URL(n,location.href).pathname,W.locale),!0),t=e;(0,k.hasBasePath)(t)&&(t=(0,_.removeBasePath)(t));let r=(0,g.getRouteRegex)(et),a=(0,m.getRouteMatcher)(r)(new URL(t,location.href).pathname);a&&Object.assign(en,a)}}if("type"in l){if("redirect-internal"===l.type)return this.change(e,l.newUrl,l.newAs,r);return V({url:l.destination,router:this}),new Promise(()=>{})}let o=l.Component;if(o&&o.unstable_scriptLoader){let e=[].concat(o.unstable_scriptLoader());e.forEach(e=>{(0,i.handleClientScriptLoad)(e.props)})}if((l.__N_SSG||l.__N_SSP)&&l.props){if(l.props.pageProps&&l.props.pageProps.__N_REDIRECT){r.locale=!1;let t=l.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==l.props.pageProps.__N_REDIRECT_BASE_PATH){let n=(0,h.parseRelativeUrl)(t);n.pathname=D(n.pathname,z);let{url:a,as:l}=I(this,t,t);return this.change(e,a,l,r)}return V({url:t,router:this}),new Promise(()=>{})}if(W.isPreview=!!l.props.__N_PREVIEW,l.props.notFound===U){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(l=await this.getRouteInfo({route:e,pathname:e,query:en,as:n,resolvedAs:er,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isNotFound:!0}),"type"in l)throw Error("Unexpected middleware effect on /404")}}B&&"/_error"===this.pathname&&(null==(c=self.__NEXT_DATA__.props)?void 0:null==(f=c.pageProps)?void 0:f.statusCode)===500&&(null==(P=l.props)?void 0:P.pageProps)&&(l.props.pageProps.statusCode=500);let s=r.shallow&&W.route===(null!=(E=l.route)?E:ea),d=null!=(x=r.scroll)?x:!B&&!s,y=null!=a?a:d?{x:0,y:0}:null,v={...W,route:ea,pathname:et,query:en,asPath:Z,isFallback:!1};if(B&&es){if(l=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:en,as:n,resolvedAs:er,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isQueryUpdating:B&&!this.isFallback}),"type"in l)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(N=self.__NEXT_DATA__.props)?void 0:null==(L=N.pageProps)?void 0:L.statusCode)===500&&(null==(j=l.props)?void 0:j.pageProps)&&(l.props.pageProps.statusCode=500);try{await this.set(v,l,y)}catch(e){throw(0,u.default)(e)&&e.cancelled&&$.events.emit("routeChangeError",e,Z,K),e}return!0}$.events.emit("beforeHistoryChange",n,K),this.changeState(e,t,n,r);let w=B&&!y&&!q&&!J&&(0,C.compareRouterStates)(v,this.state);if(!w){try{await this.set(v,l,y)}catch(e){if(e.cancelled)l.error=l.error||e;else throw e}if(l.error)throw B||$.events.emit("routeChangeError",l.error,Z,K),l.error;B||$.events.emit("routeChangeComplete",n,K),d&&/#.+$/.test(n)&&this.scrollToHash(n)}return!0}catch(e){if((0,u.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,n,r){void 0===r&&(r={}),("pushState"!==e||(0,d.getURL)()!==n)&&(this._shallow=r.shallow,window.history[e]({url:t,as:n,options:r,__N:!0,key:this._key="pushState"!==e?this._key:W()},"",n))}async handleRouteInfoError(e,t,n,r,a,l){if(console.error(e),e.cancelled)throw e;if((0,o.isAssetError)(e)||l)throw $.events.emit("routeChangeError",e,r,a),V({url:r,router:this}),T();try{let r;let{page:a,styleSheets:l}=await this.fetchComponent("/_error"),o={props:r,Component:a,styleSheets:l,err:e,error:e};if(!o.props)try{o.props=await this.getInitialProps(a,{err:e,pathname:t,query:n})}catch(e){console.error("Error in error page `getInitialProps`: ",e),o.props={}}return o}catch(e){return this.handleRouteInfoError((0,u.default)(e)?e:Error(e+""),t,n,r,a,!0)}}async getRouteInfo(e){let{route:t,pathname:n,query:r,as:a,resolvedAs:o,routeProps:i,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:m,isNotFound:g}=e,v=t;try{var b,w,S,k;let e=q({route:v,router:this}),t=this.components[v];if(i.shallow&&t&&this.route===v)return t;f&&(t=void 0);let u=!t||"initial"in t?void 0:t,E={dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:n,query:r}),skipInterpolation:!0,asPath:g?"/404":o,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},x=h&&!m?null:await F({fetchData:()=>H(E),asPath:g?"/404":o,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(x&&("/_error"===n||"/404"===n)&&(x.effect=void 0),h&&(x?x.json=self.__NEXT_DATA__.props:x={json:self.__NEXT_DATA__.props}),e(),(null==x?void 0:null==(b=x.effect)?void 0:b.type)==="redirect-internal"||(null==x?void 0:null==(w=x.effect)?void 0:w.type)==="redirect-external")return x.effect;if((null==x?void 0:null==(S=x.effect)?void 0:S.type)==="rewrite"){let e=(0,l.removeTrailingSlash)(x.effect.resolvedHref),a=await this.pageLoader.getPageList();if((!h||a.includes(e))&&(v=e,n=x.effect.resolvedHref,r={...r,...x.effect.parsedAs.query},o=(0,_.removeBasePath)((0,c.normalizeLocalePath)(x.effect.parsedAs.pathname,this.locales).pathname),t=this.components[v],i.shallow&&t&&this.route===v&&!f))return{...t,route:v}}if((0,P.isAPIRoute)(v))return V({url:a,router:this}),new Promise(()=>{});let C=u||await this.fetchComponent(v).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),O=null==x?void 0:null==(k=x.response)?void 0:k.headers.get("x-middleware-skip"),N=C.__N_SSG||C.__N_SSP;O&&(null==x?void 0:x.dataHref)&&delete this.sdc[x.dataHref];let{props:R,cacheKey:L}=await this._getData(async()=>{if(N){if((null==x?void 0:x.json)&&!O)return{cacheKey:x.cacheKey,props:x.json};let e=(null==x?void 0:x.dataHref)?x.dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:n,query:r}),asPath:o,locale:s}),t=await H({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:O?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(C.Component,{pathname:n,query:r,asPath:a,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return C.__N_SSP&&E.dataHref&&L&&delete this.sdc[L],this.isPreview||!C.__N_SSG||h||H(Object.assign({},E,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),R.pageProps=Object.assign({},R.pageProps),C.props=R,C.route=v,C.query=r,C.resolvedAs=o,this.components[v]=C,C}catch(e){return this.handleRouteInfoError((0,u.getProperError)(e),n,r,a,i)}}set(e,t,n){return this.state=e,this.sub(t,this.components["/_app"].Component,n)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,n]=this.asPath.split("#"),[r,a]=e.split("#");return!!a&&t===r&&n===a||t===r&&n!==a}scrollToHash(e){let[,t=""]=e.split("#");if(""===t||"top"===t){(0,j.handleSmoothScroll)(()=>window.scrollTo(0,0));return}let n=decodeURIComponent(t),r=document.getElementById(n);if(r){(0,j.handleSmoothScroll)(()=>r.scrollIntoView());return}let a=document.getElementsByName(n)[0];a&&(0,j.handleSmoothScroll)(()=>a.scrollIntoView())}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,n){if(void 0===t&&(t=e),void 0===n&&(n={}),(0,N.isBot)(window.navigator.userAgent))return;let r=(0,h.parseRelativeUrl)(e),a=r.pathname,{pathname:o,query:i}=r,u=o,s=await this.pageLoader.getPageList(),c=t,f=void 0!==n.locale?n.locale||void 0:this.locale,d=await A({asPath:t,locale:f,router:this});r.pathname=D(r.pathname,s),(0,p.isDynamicRoute)(r.pathname)&&(o=r.pathname,r.pathname=o,Object.assign(i,(0,m.getRouteMatcher)((0,g.getRouteRegex)(r.pathname))((0,v.parsePath)(t).pathname)||{}),d||(e=(0,y.formatWithValidation)(r)));let b=await F({fetchData:()=>H({dataHref:this.pageLoader.getDataHref({href:(0,y.formatWithValidation)({pathname:u,query:i}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==b?void 0:b.effect.type)==="rewrite"&&(r.pathname=b.effect.resolvedHref,o=b.effect.resolvedHref,i={...i,...b.effect.parsedAs.query},c=b.effect.parsedAs.pathname,e=(0,y.formatWithValidation)(r)),(null==b?void 0:b.effect.type)==="redirect-external")return;let w=(0,l.removeTrailingSlash)(o);await this._bfl(t,c,n.locale,!0)&&(this.components[a]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(w).then(t=>!!t&&H({dataHref:(null==b?void 0:b.json)?null==b?void 0:b.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:n.unstable_skipClientCache||n.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[n.priority?"loadPage":"prefetch"](w)])}async fetchComponent(e){let t=q({route:e,router:this});try{let n=await this.pageLoader.loadPage(e);return t(),n}catch(e){throw t(),e}}_getData(e){let t=!1,n=()=>{t=!0};return this.clc=n,e().then(e=>{if(n===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return H({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:n}=this.components["/_app"],r=this._wrapApp(n);return t.AppTree=r,(0,d.loadGetInitialProps)(n,{AppTree:r,Component:e,router:this,ctx:t})}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(e,t,r,{initialProps:a,pageLoader:o,App:i,wrapApp:u,Component:s,err:c,subscription:f,isFallback:m,locale:g,locales:v,defaultLocale:b,domainLocales:w,isPreview:_}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=W(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:n}=this;this.isFirstPopStateEvent=!1;let r=e.state;if(!r){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,y.formatWithValidation)({pathname:(0,S.addBasePath)(e),query:t}),(0,d.getURL)());return}if(r.__NA){window.location.reload();return}if(!r.__N||n&&this.locale===r.options.locale&&r.as===this.asPath)return;let{url:a,as:l,options:o,key:i}=r;this._key=i;let{pathname:u}=(0,h.parseRelativeUrl)(a);(!this.isSsr||l!==(0,S.addBasePath)(this.asPath)||u!==(0,S.addBasePath)(this.pathname))&&(!this._bps||this._bps(r))&&this.change("replaceState",a,l,Object.assign({},o,{shallow:o.shallow&&this._shallow,locale:o.locale||this.defaultLocale,_h:0}),t)};let k=(0,l.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[k]={Component:s,initial:!0,props:a,err:c,__N_SSG:a&&a.__N_SSG,__N_SSP:a&&a.__N_SSP}),this.components["/_app"]={Component:i,styleSheets:[]};{let{BloomFilter:e}=n(3839),t={numItems:2,errorRate:.01,numBits:20,numHashes:7,bitArray:[0,0,0,1,1,0,1,1,0,0,1,1,0,0,0,1,1,0,1,1]},r={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==r?void 0:r.numHashes)&&(this._bfl_d=new e(r.numItems,r.errorRate),this._bfl_d.import(r))}this.events=$.events,this.pageLoader=o;let P=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=f,this.clc=null,this._wrapApp=u,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!P&&!self.location.search),this.state={route:k,pathname:e,query:t,asPath:P?e:r,isPreview:!!_,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!r.startsWith("//")){let n={locale:g},a=(0,d.getURL)();this._initialMatchesMiddlewarePromise=A({router:this,locale:g,asPath:a}).then(l=>(n._shouldResolveHref=r!==e,this.changeState("replaceState",l?a:(0,y.formatWithValidation)({pathname:(0,S.addBasePath)(e),query:t}),a,n),l))}window.addEventListener("popstate",this.onPopState)}}$.events=(0,f.default)()},6323:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return l}});let r=n(6258),a=n(3546);function l(e,t,n,l){if(!t||t===n)return e;let o=e.toLowerCase();return!l&&((0,a.pathHasPrefix)(o,"/api")||(0,a.pathHasPrefix)(o,"/"+t.toLowerCase()))?e:(0,r.addPathPrefix)(e,"/"+t)}},6258:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return a}});let r=n(5606);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:a,hash:l}=(0,r.parsePath)(e);return""+t+n+a+l}},1151:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return a}});let r=n(5606);function a(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:a,hash:l}=(0,r.parsePath)(e);return""+n+t+a+l}},1336:function(e,t){"use strict";function n(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=n.length;r--;){let a=n[r];if("query"===a){let n=Object.keys(e.query);if(n.length!==Object.keys(t.query).length)return!1;for(let r=n.length;r--;){let a=n[r];if(!t.query.hasOwnProperty(a)||e.query[a]!==t.query[a])return!1}}else if(!t.hasOwnProperty(a)||e[a]!==t[a])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return n}})},5456:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return i}});let r=n(386),a=n(6258),l=n(1151),o=n(6323);function i(e){let t=(0,o.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,r.removeTrailingSlash)(t)),e.buildId&&(t=(0,l.addPathSuffix)((0,a.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,a.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,l.addPathSuffix)(t,"/"):(0,r.removeTrailingSlash)(t)}},242:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return o},urlObjectKeys:function(){return i},formatWithValidation:function(){return u}});let r=n(1757),a=r._(n(6607)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:n}=e,r=e.protocol||"",o=e.pathname||"",i=e.hash||"",u=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:n&&(s=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(s+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&"?"+u||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||l.test(r))&&!1!==s?(s="//"+(s||""),o&&"/"!==o[0]&&(o="/"+o)):s||(s=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),""+r+s+(o=o.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+i}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},8473:function(e,t){"use strict";function n(e,t){void 0===t&&(t="");let n="/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:""+e;return n+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}})},5907:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return o}});let r=n(4324),a=n(5054),l=n(3546);function o(e,t){var n,o,i;let{basePath:u,i18n:s,trailingSlash:c}=null!=(n=t.nextConfig)?n:{},f={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):c};if(u&&(0,l.pathHasPrefix)(f.pathname,u)&&(f.pathname=(0,a.removePathPrefix)(f.pathname,u),f.basePath=u),!0===t.parseData&&f.pathname.startsWith("/_next/data/")&&f.pathname.endsWith(".json")){let e=f.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),t=e[0];f.pathname="index"!==e[1]?"/"+e.slice(1).join("/"):"/",f.buildId=t}if(t.i18nProvider){let e=t.i18nProvider.analyze(f.pathname);f.locale=e.detectedLocale,f.pathname=null!=(o=e.pathname)?o:f.pathname}else if(s){let e=(0,r.normalizeLocalePath)(f.pathname,s.locales);f.locale=e.detectedLocale,f.pathname=null!=(i=e.pathname)?i:f.pathname}return f}},7232:function(e,t){"use strict";function n(e,t){void 0===t&&(t={});let n=document.documentElement,r=n.style.scrollBehavior;n.style.scrollBehavior="auto",t.dontForceLayout||n.getClientRects(),e(),n.style.scrollBehavior=r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return n}})},2647:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return a.isDynamicRoute}});let r=n(1965),a=n(4030)},5466:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return l}});let r=n(6616),a=n(248);function l(e,t,n){let l="",o=(0,a.getRouteRegex)(e),i=o.groups,u=(t!==e?(0,r.getRouteMatcher)(o)(t):"")||n;l=e;let s=Object.keys(i);return s.every(e=>{let t=u[e]||"",{repeat:n,optional:r}=i[e],a="["+(n?"...":"")+e+"]";return r&&(a=(t?"":"/")+"["+a+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in u)&&(l=l.replace(a,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(l=""),{params:s,result:l}}},7211:function(e,t){"use strict";function n(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 n}})},4030:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return r}});let n=/\/\[[^/]+?\](?=\/|$)/;function r(e){return n.test(e)}},1901:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return l}});let r=n(6873),a=n(1219);function l(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,a.hasBasePath)(n.pathname)}catch(e){return!1}}},4532:function(e,t){"use strict";function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},5606:function(e,t){"use strict";function n(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,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 n}})},4393:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return l}});let r=n(6873),a=n(6607);function l(e,t){let n=new URL((0,r.getLocationOrigin)()),l=t?new URL(t,n):e.startsWith(".")?new URL(window.location.href):n,{pathname:o,searchParams:i,search:u,hash:s,href:c,origin:f}=new URL(e,l);if(f!==n.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:o,query:(0,a.searchParamsToUrlQuery)(i),search:u,hash:s,href:c.slice(n.origin.length)}}},3546:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return a}});let r=n(5606);function a(e,t){if("string"!=typeof e)return!1;let{pathname:n}=(0,r.parsePath)(e);return n===t||n.startsWith(t+"/")}},6607:function(e,t){"use strict";function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,a]=e;Array.isArray(a)?a.forEach(e=>t.append(n,r(e))):t.set(n,r(a))}),t}function l(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return a},assign:function(){return l}})},5054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return a}});let r=n(3546);function a(e,t){if(!(0,r.pathHasPrefix)(e,t))return e;let n=e.slice(t.length);return n.startsWith("/")?n:"/"+n}},386:function(e,t){"use strict";function n(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return n}})},947:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let r=n(6607),a=n(242),l=n(4532),o=n(6873),i=n(7812),u=n(1901),s=n(4030),c=n(5466);function f(e,t,n){let f;let d="string"==typeof t?t:(0,a.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d,m=h.split("?");if((m[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,o.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,u.isLocalURL)(d))return n?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,i.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:o,params:i}=(0,c.interpolateAs)(e.pathname,e.pathname,n);o&&(t=(0,a.formatWithValidation)({pathname:o,hash:e.hash,query:(0,l.omit)(n,i)}))}let o=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return n?[o,t||o]:o}catch(e){return n?[d]:d}}},6616:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return a}});let r=n(6873);function a(e){let{re:t,groups:n}=e;return e=>{let a=t.exec(e);if(!a)return!1;let l=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},o={};return Object.keys(n).forEach(e=>{let t=n[e],r=a[t.pos];void 0!==r&&(o[e]=~r.indexOf("/")?r.split("/").map(e=>l(e)):t.repeat?[l(r)]:l(r))}),o}}},248:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getRouteRegex:function(){return u},getNamedRouteRegex:function(){return c},getNamedMiddlewareRegex:function(){return f}});let r=n(9489),a=n(386),l="nxtP";function o(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function i(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),n={},l=1;return{parameterizedRoute:t.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,r.escapeStringRegexp)(e);{let{key:t,optional:r,repeat:a}=o(e.slice(1,-1));return n[t]={pos:l++,repeat:a,optional:r},a?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function u(e){let{parameterizedRoute:t,groups:n}=i(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function s(e,t){let n,i;let u=(0,a.removeTrailingSlash)(e).slice(1).split("/"),s=(n=97,i=1,()=>{let e="";for(let t=0;t122&&(i++,n=97);return e}),c={};return{namedParameterizedRoute:u.map(e=>{if(!(e.startsWith("[")&&e.endsWith("]")))return"/"+(0,r.escapeStringRegexp)(e);{let{key:n,optional:r,repeat:a}=o(e.slice(1,-1)),i=n.replace(/\W/g,"");t&&(i=""+l+i);let u=!1;return(0===i.length||i.length>30)&&(u=!0),isNaN(parseInt(i.slice(0,1)))||(u=!0),u&&(i=s()),t?c[i]=""+l+n:c[i]=""+n,a?r?"(?:/(?<"+i+">.+?))?":"/(?<"+i+">.+?)":"/(?<"+i+">[^/]+?)"}}).join(""),routeKeys:c}}function c(e,t){let n=s(e,t);return{...u(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function f(e,t){let{parameterizedRoute:n}=i(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:a}=s(e,!1);return{namedRegex:"^"+a+(r?"(?:(/.*)?)":"")+"$"}}},1965:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let a=e[0];if(a.startsWith("[")&&a.endsWith("]")){let n=a.slice(1,-1),o=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),o=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function l(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===a.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(o){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');l(this.optionalRestSlugName,n),this.optionalRestSlugName=n,a="[[...]]"}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 "'+e[0]+'").');l(this.restSlugName,n),this.restSlugName=n,a="[...]"}}else{if(o)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');l(this.slugName,n),this.slugName=n,a="[]"}}this.children.has(a)||this.children.set(a,new n),this.children.get(a)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},6333:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return r},setConfig:function(){return a}});let r=()=>n;function a(e){n=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)},4323:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(1757),a=r._(n(5784)),l=a.useLayoutEffect,o=a.useEffect;function i(e){let{headManager:t,reduceComponentsToState:n}=e;function r(){if(t&&t.mountedInstances){let r=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(r,e))}}return l(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),l(()=>(t&&(t._pendingUpdate=r),()=>{t&&(t._pendingUpdate=r)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},6873:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{WEB_VITALS:function(){return n},execOnce:function(){return r},isAbsoluteUrl:function(){return l},getLocationOrigin:function(){return o},getURL:function(){return i},getDisplayName:function(){return u},isResSent:function(){return s},normalizeRepeatedSlashes:function(){return c},loadGetInitialProps:function(){return f},SP:function(){return d},ST:function(){return p},DecodeError:function(){return h},NormalizeError:function(){return m},PageNotFoundError:function(){return g},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return v}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,a=Array(r),l=0;la.test(e);function o(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function i(){let{href:e}=window.location,t=o();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?"),n=t[0];return n.replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&s(n))return r;if(!r){let t='"'+u(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.';throw Error(t)}return r}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}},9627:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},7544:function(e,t,n){"use strict";/** + * @license React + * react-dom.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 r,a=n(5784),l=n(9954),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nf||(e.current=c[f],c[f]=null,f--)}function h(e,t){c[++f]=e.current,e.current=t}var m=Symbol.for("react.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),_=Symbol.for("react.context"),S=Symbol.for("react.server_context"),k=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),O=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen"),R=Symbol.for("react.legacy_hidden"),L=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var M=Symbol.for("react.default_value"),j=Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var A=d(null),z=d(null),I=d(null);function D(e,t){switch(h(I,t),h(z,e),h(A,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?sb(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=sw(e=sb(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}p(A),h(A,t)}function F(){p(A),p(z),p(I)}function U(e){var t=A.current,n=sw(t,e.type);t!==n&&(h(z,e),h(A,n))}function B(e){z.current===e&&(p(A),p(z))}var H=l.unstable_scheduleCallback,W=l.unstable_cancelCallback,V=l.unstable_shouldYield,q=l.unstable_requestPaint,$=l.unstable_now,Q=l.unstable_getCurrentPriorityLevel,G=l.unstable_ImmediatePriority,Y=l.unstable_UserBlockingPriority,X=l.unstable_NormalPriority,K=l.unstable_LowPriority,Z=l.unstable_IdlePriority,J=null,ee=null,et=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(en(e)/er|0)|0},en=Math.log,er=Math.LN2,ea=128,el=8388608;function eo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:return 8388480&e;case 8388608:case 16777216:case 33554432:case 67108864:return 125829120&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ei(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,l=e.pingedLanes,o=268435455&n;if(0!==o){var i=o&~a;0!==i?r=eo(i):0!=(l&=o)&&(r=eo(l))}else 0!=(o=n&~a)?r=eo(o):0!==l&&(r=eo(l));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&a)&&((a=r&-r)>=(l=t&-t)||32===a&&0!=(8388480&l)))return t;if(0!=(8&r)&&(r|=32&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ed(e,t){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0)}function ep(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),a=1<--i||a[o]!==l[i]){var u="\n"+a[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=i);break}}}finally{eq=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?eV(e):""}function eQ(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function eG(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function eY(e){e._valueTracker||(e._valueTracker=function(e){var t=eG(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,l.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function eX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=eG(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function eK(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var eZ=/[\n"\\]/g;function eJ(e){return e.replace(eZ,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e0(e,t,n,r,a,l,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+eQ(t)):e.value!==""+eQ(t)&&(e.value=""+eQ(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?e2(e,o,eQ(t)):null!=n?e2(e,o,eQ(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=l&&(e.defaultChecked=!!l),null!=a&&!!a!==e.checked&&(e.checked=a),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+eQ(i):e.removeAttribute("name")}function e1(e,t,n,r,a,l,o,i){if(null!=l&&"function"!=typeof l&&"symbol"!=typeof l&&"boolean"!=typeof l&&(e.type=l),null!=t||null!=n){if(!("submit"!==l&&"reset"!==l||null!=t))return;n=null!=n?""+eQ(n):"",t=null!=t?""+eQ(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,i||(e.checked=!!r),e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function e2(e,t,n){"number"===t&&eK(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var e4=Array.isArray;function e3(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=ig.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var e7=e6;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(e7=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return e6(e,t)})});var e9=e7;function te(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var tt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tn(e,t){if(null!=t&&"object"!=typeof t)throw Error(i(62));for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=t[n],a=0===n.indexOf("--");null==r||"boolean"==typeof r||""===r?a?e.setProperty(n,""):"float"===n?e.cssFloat="":e[n]="":a?e.setProperty(n,r):"number"!=typeof r||0===r||tt.has(n)?"float"===n?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}}function tr(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ta=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tl=null;function to(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ti=null,tu=null;function ts(e){var t=eO(e);if(t&&(e=t.stateNode)){var n=eR(e);e:switch(e=t.stateNode,t.type){case"input":if(e0(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+eJ(""+t)+'"][type="radio"]'),t=0;t>=o,a-=o,tA=1<<32-et(t)+a|n<m?(g=f,f=null):g=f.sibling;var y=p(a,f,i[m],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(a,f),o=l(y,o,m),null===c?s=y:c.sibling=y,c=y,f=g}if(m===i.length)return n(a,f),tW&&tI(a,m),s;if(null===f){for(;mg?(y=m,m=null):y=m.sibling;var b=p(a,m,v.value,s);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(a,m),o=l(b,o,g),null===f?c=b:f.sibling=b,f=b,m=y}if(v.done)return n(a,m),tW&&tI(a,g),c;if(null===m){for(;!v.done;g++,v=u.next())null!==(v=d(a,v.value,s))&&(o=l(v,o,g),null===f?c=v:f.sibling=v,f=v);return tW&&tI(a,g),c}for(m=r(a,m);!v.done;g++,v=u.next())null!==(v=h(m,a,g,v.value,s))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),o=l(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&m.forEach(function(e){return t(a,e)}),tW&&tI(a,g),c}(c,f,v,b);if("function"==typeof v.then)return s(c,f,nP(v),b);if(v.$$typeof===_||v.$$typeof===S)return s(c,f,aW(c,v,b),b);nx(c,v)}return"string"==typeof v&&""!==v||"number"==typeof v?(v=""+v,null!==f&&6===f.tag?(n(c,f.sibling),(f=a(f,v)).return=c,c=f):(n(c,f),(f=o4(v,c.mode,b)).return=c,c=f),o(c)):n(c,f)}(s,c,f,v),nS=null,s}}var nN=nO(!0),nR=nO(!1),nL=d(null),nM=d(0);function nj(e,t){h(nM,e=l6),h(nL,t),l6=e|t.baseLanes}function nT(){h(nM,l6),h(nL,nL.current)}function nA(){l6=nM.current,p(nL),p(nM)}var nz=d(null),nI=null;function nD(e){var t=e.alternate;h(nH,1&nH.current),h(nz,e),null===nI&&(null===t||null!==nL.current?nI=e:null!==t.memoizedState&&(nI=e))}function nF(e){if(22===e.tag){if(h(nH,nH.current),h(nz,e),null===nI){var t=e.alternate;null!==t&&null!==t.memoizedState&&(nI=e)}}else nU(e)}function nU(){h(nH,nH.current),h(nz,nz.current)}function nB(e){p(nz),nI===e&&(nI=null),p(nH)}var nH=d(0);function nW(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nV=[];function nq(){for(var e=0;el?l:8;var o=n8.transition;n8.transition=null,rY(e,t,n),n8.transition={};try{rY(e,t,r),a()}catch(e){throw e}finally{eh=l,n8.transition=o}}function rq(){return rg().memoizedState}function r$(){return rg().memoizedState}function rQ(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=ov(t);e=no(n);var r=ni(t,e,n);null!==r&&(ob(r,t,n),nu(r,t,n)),t={cache:aY()},e.payload=t;return}t=t.return}}function rG(e,t,n){var r=ov(e);n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},rX(e)?rK(t,n):(t9(e,t,n,r),null!==(n=nn(e))&&(ob(n,e,r),rZ(n,t,r)))}function rY(e,t,n){var r=ov(e),a={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(rX(e))rK(t,a);else{var l=e.alternate;if(0===e.lanes&&(null===l||0===l.lanes)&&null!==(l=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=l(o,n);if(a.hasEagerState=!0,a.eagerState=i,tC(i,o)){t9(e,t,a,0),null===l1&&t7();return}}catch(e){}finally{}t9(e,t,a,r),null!==(n=nn(e))&&(ob(n,e,r),rZ(n,t,r))}}function rX(e){var t=e.alternate;return e===n6||null!==t&&t===n6}function rK(e,t){rt=re=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rZ(e,t,n){if(0!=(8388480&n)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ep(e,n)}}iy=function(){return{lastEffect:null,events:null,stores:null}};var rJ={readContext:aH,use:rv,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri};rJ.useCacheRefresh=ri;var r0={readContext:aH,use:rv,useCallback:function(e,t){return rm().memoizedState=[e,void 0===t?null:t],e},useContext:aH,useEffect:rT,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,rM(4194308,4,rD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rM(4194308,4,e,t)},useInsertionEffect:function(e,t){rM(4,2,e,t)},useMemo:function(e,t){var n=rm();return t=void 0===t?null:t,rn&&e(),e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rm();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=rG.bind(null,n6,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},rm().memoizedState=e},useState:function(e){var t=(e=rN(e)).queue,n=rY.bind(null,n6,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:rU,useDeferredValue:function(e){return rm().memoizedState=e},useTransition:function(){var e=rN(!1);return e=rV.bind(null,n6,e.queue,!0,!1),rm().memoizedState=e,[!1,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=n6,a=rm();if(tW){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===l1)throw Error(i(349));0!=(60&n5)||rP(r,t,n)}a.memoizedState=n;var l={value:n,getSnapshot:t};return a.queue=l,rT(rx.bind(null,r,l,e),[e]),r.flags|=2048,rR(9,rE.bind(null,r,l,n,t),{destroy:void 0},null),n},useId:function(){var e=rm(),t=l1.identifierPrefix;if(tW){var n=tz,r=tA;t=":"+t+"R"+(n=(r&~(1<<32-et(r)-1)).toString(32)+n),0<(n=rr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ro++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return rm().memoizedState=rQ.bind(null,n6)}},r1={readContext:aH,use:rv,useCallback:rB,useContext:aH,useEffect:rA,useImperativeHandle:rF,useInsertionEffect:rz,useLayoutEffect:rI,useMemo:rH,useReducer:rw,useRef:rL,useState:function(){return rw(rb)},useDebugValue:rU,useDeferredValue:function(e){return rW(rg(),n7.memoizedState,e)},useTransition:function(){var e=rw(rb)[0],t=rg().memoizedState;return["boolean"==typeof e?e:ry(e),t]},useMutableSource:rS,useSyncExternalStore:rk,useId:rq};r1.useCacheRefresh=r$;var r2={readContext:aH,use:rv,useCallback:rB,useContext:aH,useEffect:rA,useImperativeHandle:rF,useInsertionEffect:rz,useLayoutEffect:rI,useMemo:rH,useReducer:r_,useRef:rL,useState:function(){return r_(rb)},useDebugValue:rU,useDeferredValue:function(e){var t=rg();return null===n7?t.memoizedState=e:rW(t,n7.memoizedState,e)},useTransition:function(){var e=r_(rb)[0],t=rg().memoizedState;return["boolean"==typeof e?e:ry(e),t]},useMutableSource:rS,useSyncExternalStore:rk,useId:rq};function r4(e,t){if(e&&e.defaultProps)for(var n in t=u({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}function r3(e,t,n,r){t=e.memoizedState,n=null==(n=n(r,t))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}r2.useCacheRefresh=r$;var r8={isMounted:function(e){return!!(e=e._reactInternals)&&td(e)===e},enqueueSetState:function(e,t,n){var r=ov(e=e._reactInternals),a=no(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=ni(e,a,r))&&(ob(t,e,r),nu(t,e,r))},enqueueReplaceState:function(e,t,n){var r=ov(e=e._reactInternals),a=no(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=ni(e,a,r))&&(ob(t,e,r),nu(t,e,r))},enqueueForceUpdate:function(e,t){var n=ov(e=e._reactInternals),r=no(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=ni(e,r,n))&&(ob(t,e,n),nu(t,e,n))}};function r5(e,t,n,r,a,l,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,l,o):!t.prototype||!t.prototype.isPureReactComponent||!np(n,r)||!np(a,l)}function r6(e,t,n){var r=!1,a=tg,l=t.contextType;return"object"==typeof l&&null!==l?l=aH(l):(a=t_(t)?tb:ty.current,l=(r=null!=(r=t.contextTypes))?tw(e,a):tg),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=r8,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function r7(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&r8.enqueueReplaceState(t,t.state,null)}function r9(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},na(e);var l=t.contextType;"object"==typeof l&&null!==l?a.context=aH(l):(l=t_(t)?tb:ty.current,a.context=tw(e,l)),a.state=e.memoizedState,"function"==typeof(l=t.getDerivedStateFromProps)&&(r3(e,t,l,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&r8.enqueueReplaceState(a,a.state,null),nc(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4194308)}function ae(e,t){try{var n="",r=t;do n+=function(e){switch(e.tag){case 26:case 27:case 5:return eV(e.type);case 16:return eV("Lazy");case 13:return eV("Suspense");case 19:return eV("SuspenseList");case 0:case 2:case 15:return e=e$(e.type,!1);case 11:return e=e$(e.type.render,!1);case 1:return e=e$(e.type,!0);default:return""}}(r),r=r.return;while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a,digest:null}}function at(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function an(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function ar(e,t,n){(n=no(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ou||(ou=!0,os=r),an(e,t)},n}function aa(e,t,n){(n=no(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){an(e,t)}}var l=e.stateNode;return null!==l&&"function"==typeof l.componentDidCatch&&(n.callback=function(){an(e,t),"function"!=typeof r&&(null===oc?oc=new Set([this]):oc.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function al(e,t,n,r,a){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=no(2)).tag=2,ni(n,t,2))),n.lanes|=2),e):(e.flags|=65536,e.lanes=a,e)}var ao=s.ReactCurrentOwner,ai=Error(i(461)),au=!1;function as(e,t,n,r){t.child=null===e?nR(t,null,n,r):nN(t,e.child,n,r)}function ac(e,t,n,r,a){n=n.render;var l=t.ref;return(aB(t,a),r=rs(e,t,n,r,l,a),n=rd(),null===e||au)?(tW&&n&&tF(t),t.flags|=1,as(e,t,r,a),t.child):(rp(e,t,a),aL(e,t,a))}function af(e,t,n,r,a){if(null===e){var l=n.type;return"function"!=typeof l||oK(l)||void 0!==l.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=o0(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=l,ad(e,t,l,r,a))}if(l=e.child,0==(e.lanes&a)){var o=l.memoizedProps;if((n=null!==(n=n.compare)?n:np)(o,r)&&e.ref===t.ref)return aL(e,t,a)}return t.flags|=1,(e=oZ(l,r)).ref=t.ref,e.return=t,t.child=e}function ad(e,t,n,r,a){if(null!==e){var l=e.memoizedProps;if(np(l,r)&&e.ref===t.ref){if(au=!1,t.pendingProps=r=l,0==(e.lanes&a))return t.lanes=e.lanes,aL(e,t,a);0!=(131072&e.flags)&&(au=!0)}}return ag(e,t,n,r,a)}function ap(e,t,n){var r=t.pendingProps,a=r.children,l=0!=(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(am(e,t),"hidden"===r.mode||l){if(0!=(128&t.flags)){if(n=null!==o?o.baseLanes|n:n,null!==e){for(a=0,r=t.child=e.child;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;t.childLanes=a&~n}else t.childLanes=0,t.child=null;return ah(e,t,n)}if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},null!==e&&a0(t,null),nT(),nF(t);else{if(0==(1073741824&n))return t.lanes=t.childLanes=1073741824,ah(e,t,null!==o?o.baseLanes|n:n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&a0(t,null!==o?o.cachePool:null),null!==o?nj(t,o):nT(),nF(t)}}else null!==o?(a0(t,o.cachePool),nj(t,o),nU(t),t.memoizedState=null):(null!==e&&a0(t,null),nT(),nU(t));return as(e,t,a,n),t.child}function ah(e,t,n){var r=aJ();return r=null===r?null:{parent:aG._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},null!==e&&a0(t,null),nT(),nF(t),null}function am(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ag(e,t,n,r,a){var l=t_(n)?tb:ty.current;return(l=tw(t,l),aB(t,a),n=rs(e,t,n,r,l,a),r=rd(),null===e||au)?(tW&&r&&tF(t),t.flags|=1,as(e,t,n,a),t.child):(rp(e,t,a),aL(e,t,a))}function ay(e,t,n,r,a,l){return(aB(t,l),n=rf(t,r,n,a),rc(),r=rd(),null===e||au)?(tW&&r&&tF(t),t.flags|=1,as(e,t,n,l),t.child):(rp(e,t,l),aL(e,t,l))}function av(e,t,n,r,a){if(t_(n)){var l=!0;tE(t)}else l=!1;if(aB(t,a),null===t.stateNode)aR(e,t),r6(t,n,r),r9(t,n,r,a),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;s="object"==typeof s&&null!==s?aH(s):tw(t,s=t_(n)?tb:ty.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&r7(t,o,r,s),nr=!1;var d=t.memoizedState;o.state=d,nc(t,r,o,a),u=t.memoizedState,i!==r||d!==u||tv.current||nr?("function"==typeof c&&(r3(t,n,c,r),u=t.memoizedState),(i=nr||r5(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,nl(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:r4(t.type,i),o.props=s,f=t.pendingProps,d=o.context,u="object"==typeof(u=n.contextType)&&null!==u?aH(u):tw(t,u=t_(n)?tb:ty.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&r7(t,o,r,u),nr=!1,d=t.memoizedState,o.state=d,nc(t,r,o,a);var h=t.memoizedState;i!==f||d!==h||tv.current||nr?("function"==typeof p&&(r3(t,n,p,r),h=t.memoizedState),(s=nr||r5(t,n,s,r,d,h,u)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ab(e,t,n,r,l,a)}function ab(e,t,n,r,a,l){am(e,t);var o=0!=(128&t.flags);if(!r&&!o)return a&&tx(t,n,!1),aL(e,t,l);r=t.stateNode,ao.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=nN(t,e.child,null,l),t.child=nN(t,null,i,l)):as(e,t,i,l),t.memoizedState=r.state,a&&tx(t,n,!0),t.child}function aw(e){var t=e.stateNode;t.pendingContext?tk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tk(e,t.context,!1),D(e,t.containerInfo)}function a_(e,t,n,r,a){return t4(),t3(a),t.flags|=256,as(e,t,n,r),t.child}var aS={dehydrated:null,treeContext:null,retryLane:0};function ak(e){return{baseLanes:e,cachePool:a1()}}function aP(e,t,n){var r,a=t.pendingProps,l=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&nH.current)),r&&(l=!0,t.flags&=-129),null===e){if(tW){if(l?nD(t):nU(t),tW&&((o=e=tH)?tX(t,o)||(tK(t)&&tZ(),tH=sR(o.nextSibling),r=tB,tH&&tX(t,tH)?t$(r,o):(tQ(tB,t),tW=!1,tB=t,tH=e)):(tK(t)&&tZ(),tQ(tB,t),tW=!1,tB=t,tH=e)),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated))return 0==(1&t.mode)?t.lanes=2:"$!"===e.data?t.lanes=16:t.lanes=1073741824,null;nB(t)}return(o=a.children,e=a.fallback,l)?(nU(t),a=t.mode,l=t.child,o={mode:"hidden",children:o},0==(1&a)&&null!==l?(l.childLanes=0,l.pendingProps=o):l=o2(o,a,0,null),e=o1(e,a,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ak(n),t.memoizedState=aS,e):(nD(t),aE(t,o))}if(null!==(r=e.memoizedState)){var u=r.dehydrated;if(null!==u)return function(e,t,n,r,a,l,o){if(n)return 256&t.flags?(nD(t),t.flags&=-257,ax(e,t,o,r=at(Error(i(422))))):null!==t.memoizedState?(nU(t),t.child=e.child,t.flags|=128,null):(nU(t),l=r.fallback,a=t.mode,r=o2({mode:"visible",children:r.children},a,0,null),l=o1(l,a,o,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,0!=(1&t.mode)&&nN(t,e.child,null,o),t.child.memoizedState=ak(o),t.memoizedState=aS,l);if(nD(t),0==(1&t.mode))return ax(e,t,o,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var u=r.dgst;return r=u,(l=Error(i(419))).digest=r,r=at(l,r,void 0),ax(e,t,o,r)}if(u=0!=(o&e.childLanes),au||u){if(null!==(r=l1)){switch(o&-o){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=64;break;case 536870912:a=268435456;break;default:a=0}if(0!==(a=0!=(a&(r.suspendedLanes|o))?0:a)&&a!==l.retryLane)throw l.retryLane=a,ne(e,a),ob(r,e,a),ai}return oj(),ax(e,t,o,null)}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=oQ.bind(null,e),a._reactRetry=t,null):(e=l.treeContext,tH=sR(a.nextSibling),tB=t,tW=!0,tV=null,tq=!1,null!==e&&(tM[tj++]=tA,tM[tj++]=tz,tM[tj++]=tT,tA=e.id,tz=e.overflow,tT=t),t=aE(t,r.children),t.flags|=4096,t)}(e,t,o,a,u,r,n)}if(l){nU(t),l=a.fallback,o=t.mode,u=(r=e.child).sibling;var s={mode:"hidden",children:a.children};return 0==(1&o)&&t.child!==r?((a=t.child).childLanes=0,a.pendingProps=s,t.deletions=null):(a=oZ(r,s)).subtreeFlags=31457280&r.subtreeFlags,null!==u?l=oZ(u,l):(l=o1(l,o,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,a=l,l=t.child,null===(o=e.child.memoizedState)?o=ak(n):(null!==(r=o.cachePool)?(u=aG._currentValue,r=r.parent!==u?{parent:u,pool:u}:r):r=a1(),o={baseLanes:o.baseLanes|n,cachePool:r}),l.memoizedState=o,l.childLanes=e.childLanes&~n,t.memoizedState=aS,a}return nD(t),e=(l=e.child).sibling,a=oZ(l,{mode:"visible",children:a.children}),0==(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function aE(e,t){return(t=o2({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ax(e,t,n,r){return null!==r&&t3(r),nN(t,e.child,null,n),e=aE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function aC(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),aF(e.return,t,n)}function aO(e,t,n,r,a){var l=e.memoizedState;null===l?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=a)}function aN(e,t,n){var r=t.pendingProps,a=r.revealOrder,l=r.tail;if(as(e,t,r.children,n),0!=(2&(r=nH.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&aC(e,n,t);else if(19===e.tag)aC(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(h(nH,r),0==(1&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(a=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===nW(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),aO(t,!1,a,n,l);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===nW(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}aO(t,!0,n,null,l);break;case"together":aO(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function aR(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function aL(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),oe|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=oZ(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=oZ(e,e.pendingProps)).return=t;n.sibling=null}return t.child}var aM=d(null),aj=null,aT=null,aA=null;function az(){aA=aT=aj=null}function aI(e,t,n){h(aM,t._currentValue),t._currentValue=n}function aD(e){var t=aM.current;e._currentValue=t===M?e._defaultValue:t,p(aM)}function aF(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function aU(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var a=r.dependencies;if(null!==a)for(var l=r.child,o=a.firstContext;null!==o;){if(o.context===t){if(1===r.tag){(o=no(n&-n)).tag=2;var u=r.updateQueue;if(null!==u){var s=(u=u.shared).pending;null===s?o.next=o:(o.next=s.next,s.next=o),u.pending=o}}r.lanes|=n,null!==(o=r.alternate)&&(o.lanes|=n),aF(r.return,n,e),a.lanes|=n;break}o=o.next}else if(10===r.tag)l=r.type===e.type?null:r.child;else if(18===r.tag){if(null===(l=r.return))throw Error(i(341));l.lanes|=n,null!==(a=l.alternate)&&(a.lanes|=n),aF(l,n,e),l=r.sibling}else l=r.child;if(null!==l)l.return=r;else for(l=r;null!==l;){if(l===e){l=null;break}if(null!==(r=l.sibling)){r.return=l.return,l=r;break}l=l.return}r=l}}function aB(e,t){aj=e,aA=aT=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(au=!0),e.firstContext=null)}function aH(e){return aV(aj,e)}function aW(e,t,n){return null===aj&&aB(e,n),aV(e,t)}function aV(e,t){var n=t._currentValue;if(aA!==t){if(t={context:t,memoizedValue:n,next:null},null===aT){if(null===e)throw Error(i(308));aT=t,e.dependencies={lanes:0,firstContext:t}}else aT=aT.next=t}return n}var aq="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},a$=l.unstable_scheduleCallback,aQ=l.unstable_NormalPriority,aG={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_defaultValue:null,_globalName:null};function aY(){return{controller:new aq,data:new Map,refCount:0}}function aX(e){e.refCount--,0===e.refCount&&a$(aQ,function(){e.controller.abort()})}var aK=s.ReactCurrentBatchConfig,aZ=d(null);function aJ(){var e=aZ.current;return null!==e?e:l1.pooledCache}function a0(e,t){null===t?h(aZ,aZ.current):h(aZ,t.pool)}function a1(){var e=aJ();return null===e?null:{parent:aG._currentValue,pool:e}}function a2(e){e.flags|=4}function a4(e){e.flags|=2097664}function a3(e,t,n,r){if((e=e.memoizedProps)!==r){n=null;var a,l,o=null;for(a in e)if(!r.hasOwnProperty(a)&&e.hasOwnProperty(a)&&null!=e[a]){if("style"===a){var i=e[a];for(l in i)i.hasOwnProperty(l)&&(o||(o={}),o[l]="")}else(n=n||[]).push(a,null)}for(a in r){i=r[a];var u=null!=e?e[a]:void 0;if(r.hasOwnProperty(a)&&i!==u&&(null!=i||null!=u)){if("style"===a){if(u){for(l in u)!u.hasOwnProperty(l)||i&&i.hasOwnProperty(l)||(o||(o={}),o[l]="");for(l in i)i.hasOwnProperty(l)&&u[l]!==i[l]&&(o||(o={}),o[l]=i[l])}else o||(n||(n=[]),n.push(a,o)),o=i}else(n=n||[]).push(a,i)}}o&&(n=n||[]).push("style",o),r=n,(t.updateQueue=r)&&a2(t)}}function a8(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,0==(42&l4)&&!(t="stylesheet"!==t.type||0!=(3&t.state.loading))){if(oR())e.flags|=8192;else throw nw=ng,nm}}function a5(e,t){null!==t?e.flags|=4:16384&e.flags&&(t=22!==e.tag?ec():1073741824,e.lanes|=t)}function a6(e,t){if(!tW)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function a7(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=31457280&a.subtreeFlags,r|=31457280&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function a9(e,t){switch(tU(t),t.tag){case 1:null!=(e=t.type.childContextTypes)&&tS();break;case 3:aD(aG),F(),p(tv),p(ty),nq();break;case 26:case 27:case 5:B(t);break;case 4:F();break;case 13:nB(t);break;case 19:p(nH);break;case 10:aD(t.type._context);break;case 22:case 23:nB(t),nA(),null!==e&&p(aZ);break;case 24:aD(aG)}}function le(e,t,n){var r=Array.prototype.slice.call(arguments,3);try{t.apply(n,r)}catch(e){this.onError(e)}}var lt=!1,ln=null,lr=!1,la=null,ll={onError:function(e){lt=!0,ln=e}};function lo(e,t,n,r,a,l,o,i,u){lt=!1,ln=null,le.apply(ll,arguments)}var li=!1,lu=!1,ls="function"==typeof WeakSet?WeakSet:Set,lc=null;function lf(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var a=r;break;default:a=r}"function"==typeof n?e.refCleanup=n(a):n.current=a}}catch(n){oW(e,t,n)}}function ld(e,t){var n=e.ref,r=e.refCleanup;if(null!==n){if("function"==typeof r)try{r()}catch(n){oW(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){oW(e,t,n)}else n.current=null}}function lp(e,t,n){try{n()}catch(n){oW(e,t,n)}}var lh=!1;function lm(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var l=a.inst,o=l.destroy;void 0!==o&&(l.destroy=void 0,lp(t,n,o))}a=a.next}while(a!==r)}}function lg(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create,a=n.inst;r=r(),a.destroy=r}n=n.next}while(n!==t)}}function ly(e,t){try{lg(t,e)}catch(t){oW(e,e.return,t)}}function lv(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{nd(t,n)}catch(t){oW(e,e.return,t)}}}function lb(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src&&(r.src=n.src)}}catch(t){oW(e,e.return,t)}}function lw(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:lT(e,n),4&r&&ly(n,5);break;case 1:if(lT(e,n),4&r){if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){oW(n,n.return,e)}else{var a=n.elementType===n.type?t.memoizedProps:r4(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){oW(n,n.return,e)}}}64&r&&lv(n),512&r&&lf(n,n.return);break;case 3:if(lT(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{nd(r,e)}catch(e){oW(n,n.return,e)}}break;case 26:lT(e,n),512&r&&lf(n,n.return);break;case 27:case 5:lT(e,n),null===t&&4&r&&lb(n),512&r&&lf(n,n.return);break;case 12:default:lT(e,n);break;case 13:lT(e,n),4&r&&lO(e,n);break;case 22:if(0!=(1&n.mode)){if(!(a=null!==n.memoizedState||li)){t=null!==t&&null!==t.memoizedState||lu;var l=li,o=lu;li=a,(lu=t)&&!o?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var a=n.alternate,l=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(l,o,r),ly(o,4);break;case 1:if(e(l,o,r),"function"==typeof(l=o.stateNode).componentDidMount)try{l.componentDidMount()}catch(e){oW(o,o.return,e)}if(null!==(a=o.updateQueue)){var u=a.shared.hiddenCallbacks;if(null!==u)for(a.shared.hiddenCallbacks=null,a=0;a title"))),sh(a,n,r),a[ev]=e,eM(a),n=a;break e;case"link":var l=sQ("link","href",t).get(n+(r.href||""));if(l){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?a.createElement(n,{is:r.is}):a.createElement(n)}}e[ev]=t,e[eb]=r;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&27!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=e;e:switch(sh(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&a2(t)}null!==t.ref&&a4(t)}return a7(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&a2(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t1(t)){e:{if(e=t.stateNode,r=t.memoizedProps,e[ev]=t,(n=e.nodeValue!==r)&&null!==(a=tB))switch(a.tag){case 3:if(a=0!=(1&a.mode),sc(e.nodeValue,r,a),a){e=!1;break e}break;case 27:case 5:if(l=0!=(1&a.mode),!0!==a.memoizedProps.suppressHydrationWarning&&sc(e.nodeValue,r,l),l){e=!1;break e}}e=n}e&&a2(t)}else(e=sv(e).createTextNode(r))[ev]=t,t.stateNode=e}return a7(t),null;case 13:if(nB(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tW&&null!==tH&&0!=(1&t.mode)&&0==(128&t.flags))t2(),t4(),t.flags|=384,a=!1;else if(a=t1(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[ev]=t}else t4(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;a7(t),a=!1}else null!==tV&&(oS(tV),tV=null),a=!0;if(!a)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return r=null!==r,e=null!==e&&null!==e.memoizedState,r&&(n=t.child,a=null,null!==n.alternate&&null!==n.alternate.memoizedState&&null!==n.alternate.memoizedState.cachePool&&(a=n.alternate.memoizedState.cachePool.pool),l=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),a5(t,t.updateQueue),a7(t),null;case 4:return F(),null===e&&se(t.stateNode.containerInfo),a7(t),null;case 10:return aD(t.type._context),a7(t),null;case 19:if(p(nH),null===(a=t.memoizedState))return a7(t),null;if(r=0!=(128&t.flags),null===(l=a.rendering)){if(r)a6(a,!1);else{if(0!==l7||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=nW(e))){for(t.flags|=128,a6(a,!1),e=l.updateQueue,t.updateQueue=e,a5(t,e),t.subtreeFlags=0,e=n,r=t.child;null!==r;)oJ(r,e),r=r.sibling;return h(nH,1&nH.current|2),t.child}e=e.sibling}null!==a.tail&&$()>oo&&(t.flags|=128,r=!0,a6(a,!1),t.lanes=8388608)}}else{if(!r){if(null!==(e=nW(l))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,a5(t,e),a6(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!tW)return a7(t),null}else 2*$()-a.renderingStartTime>oo&&1073741824!==n&&(t.flags|=128,r=!0,a6(a,!1),t.lanes=8388608)}a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(e=a.last)?e.sibling=l:t.child=l,a.last=l)}if(null!==a.tail)return t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=$(),t.sibling=null,e=nH.current,h(nH,r?1&e|2:1&e),t;return a7(t),null;case 22:case 23:return nB(t),nA(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&n)&&0==(128&t.flags)&&(a7(t),6&t.subtreeFlags&&(t.flags|=8192)):a7(t),null!==(r=t.updateQueue)&&a5(t,r.retryQueue),r=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(r=e.memoizedState.cachePool.pool),n=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),null!==e&&p(aZ),null;case 24:return r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),aD(aG),a7(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,l6);if(null!==n){l2=n;return}if(null!==(t=t.sibling)){l2=t;return}l2=t=e}while(null!==t);0===l7&&(l7=5)}function oF(e,t,n){var r=eh,a=lJ.transition;try{lJ.transition=null,eh=2,function(e,t,n,r){do oB();while(null!==od);if(0!=(6&l0))throw Error(i(327));var a=e.finishedWork,l=e.finishedLanes;if(null!==a){if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var o=a.lanes|a.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,t=e.entanglements;var r=e.expirationTimes;for(e=e.hiddenUpdates;0r&&(a=r,r=l,l=a),a=uT(n,l);var o=uT(n,r);a&&o&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=lJ.transition;var a=eh;try{if(lJ.transition=null,eh=r,null===od)var l=!1;else{r=om,om=null;var o=od,u=op;if(od=null,op=0,0!=(6&l0))throw Error(i(331));var s=l0;if(l0|=4,l$(o.current),lF(o,o.current,u,r),l0=s,nJ(!1),ee&&"function"==typeof ee.onPostCommitFiberRoot)try{ee.onPostCommitFiberRoot(J,o)}catch(e){}l=!0}return l}finally{eh=a,lJ.transition=n,oU(e,t)}}return!1}function oH(e,t,n){t=ae(n,t),t=ar(e,t,2),null!==(e=ni(e,t,2))&&(ed(e,2),nZ(e))}function oW(e,t,n){if(3===e.tag)oH(e,e,n);else for(;null!==t;){if(3===t.tag){oH(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oc||!oc.has(r))){e=ae(n,e),e=aa(t,e,2),null!==(t=ni(t,e,2))&&(ed(t,2),nZ(t));break}}t=t.return}}function oV(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new lY;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(l5=!0,a.add(n),e=oq.bind(null,e,t,n),t.then(e,e))}function oq(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,l1===e&&(l4&n)===n&&(4===l7||3===l7&&(125829120&l4)===l4&&500>$()-ol?0==(2&l0)&&oO(e,0):on|=n),nZ(e)}function o$(e,t){0===t&&(t=0==(1&e.mode)?2:ec()),null!==(e=ne(e,t))&&(ed(e,t),nZ(e))}function oQ(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),o$(e,n)}function oG(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),o$(e,n)}function oY(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oX(e,t,n,r){return new oY(e,t,n,r)}function oK(e){return!(!(e=e.prototype)||!e.isReactComponent)}function oZ(e,t){var n=e.alternate;return null===n?((n=oX(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function oJ(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function o0(e,t,n,r,a,l){var o=2;if(r=e,"function"==typeof e)oK(e)&&(o=1);else if("string"==typeof e)o=!function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;if("stylesheet"===t.rel)return e=t.disabled,"string"==typeof t.precedence&&null==e;return!0;case"script":if(!0===t.async&&!t.onLoad&&!t.onError&&"string"==typeof t.src&&t.src)return!0}return!1}(e,n,A.current)?"html"===e||"head"===e||"body"===e?27:5:26;else e:switch(e){case y:return o1(n.children,a,l,t);case v:o=8,0!=(1&(a|=8))&&(a|=16);break;case b:return(e=oX(12,n,t,2|a)).elementType=b,e.lanes=l,e;case P:return(e=oX(13,n,t,a)).elementType=P,e.lanes=l,e;case E:return(e=oX(19,n,t,a)).elementType=E,e.lanes=l,e;case N:return o2(n,a,l,t);case R:case O:case L:return(e=oX(24,n,t,a)).elementType=L,e.lanes=l,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:o=10;break e;case _:o=9;break e;case k:o=11;break e;case x:o=14;break e;case C:o=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=oX(o,n,t,a)).elementType=e,t.type=r,t.lanes=l,t}function o1(e,t,n,r){return(e=oX(7,e,r,t)).lanes=n,e}function o2(e,t,n,r){(e=oX(22,e,r,t)).elementType=N,e.lanes=n;var a={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=a._current;if(null===e)throw Error(i(456));if(0==(2&a._pendingVisibility)){var t=ne(e,2);null!==t&&(a._pendingVisibility|=2,ob(t,e,2))}},attach:function(){var e=a._current;if(null===e)throw Error(i(456));if(0!=(2&a._pendingVisibility)){var t=ne(e,2);null!==t&&(a._pendingVisibility&=-3,ob(t,e,2))}}};return e.stateNode=a,e}function o4(e,t,n){return(e=oX(6,e,null,t)).lanes=n,e}function o3(e,t,n){return(t=oX(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o8(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ef(-1),this.entangledLanes=this.errorRecoveryDisabledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ef(0),this.hiddenUpdates=ef(null),this.identifierPrefix=r,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.mutableSourceEagerHydrationData=null,this.incompleteTransitions=new Map}function o5(e,t,n,r,a,l,o,i,u){return e=new o8(e,t,n,i,u),1===t?(t=1,!0===l&&(t|=24)):t=0,l=oX(3,null,null,t),e.current=l,l.stateNode=e,t=aY(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:r,isDehydrated:n,cache:t},na(l),e}function o6(e){if(!e)return tg;e=e._reactInternals;e:{if(td(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(t_(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(t_(n))return tP(e,n,t)}return t}function o7(e,t,n,r,a,l,o,i,u){return(e=o5(n,r,!0,e,a,l,o,i,u)).context=o6(null),(a=no(r=ov(n=e.current))).callback=null!=t?t:null,ni(n,a,r),e.current.lanes=r,ed(e,r),nZ(e),e}function o9(e,t,n,r){var a=t.current,l=ov(a);return n=o6(n),null===t.context?t.context=n:t.pendingContext=n,(t=no(l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ni(a,t,l))&&(ob(e,a,l),nu(e,a,l)),l}function ie(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function it(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n=us),ud=!1;function up(e,t){switch(e){case"keyup":return -1!==ui.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uh(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var um=!1,ug={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ug[e.type]:"textarea"===t}function uv(e,t,n,r){tc(r),0<(t=sa(t,"onChange")).length&&(n=new ik("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ub=null,uw=null;function u_(e){u5(e,0)}function uS(e){if(eX(eN(e)))return e}function uk(e,t){if("change"===e)return t}var uP=!1;if(eI){if(eI){var uE="oninput"in document;if(!uE){var ux=document.createElement("div");ux.setAttribute("oninput","return;"),uE="function"==typeof ux.oninput}r=uE}else r=!1;uP=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=uj(r)}}function uA(){for(var e=window,t=eK();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=eK(e.document)}return t}function uz(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var uI=eI&&"documentMode"in document&&11>=document.documentMode,uD=null,uF=null,uU=null,uB=!1;function uH(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;uB||null==uD||uD!==eK(r)||(r="selectionStart"in(r=uD)&&uz(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},uU&&np(uU,r)||(uU=r,0<(r=sa(uF,"onSelect")).length&&(t=new ik("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=uD)))}function uW(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var uV={animationend:uW("Animation","AnimationEnd"),animationiteration:uW("Animation","AnimationIteration"),animationstart:uW("Animation","AnimationStart"),transitionend:uW("Transition","TransitionEnd")},uq={},u$={};function uQ(e){if(uq[e])return uq[e];if(!uV[e])return e;var t,n=uV[e];for(t in n)if(n.hasOwnProperty(t)&&t in u$)return uq[e]=n[t];return e}eI&&(u$=document.createElement("div").style,"AnimationEvent"in window||(delete uV.animationend.animation,delete uV.animationiteration.animation,delete uV.animationstart.animation),"TransitionEvent"in window||delete uV.transitionend.transition);var uG=uQ("animationend"),uY=uQ("animationiteration"),uX=uQ("animationstart"),uK=uQ("transitionend"),uZ=new Map,uJ="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function u0(e,t){uZ.set(e,t),eA(t,[e])}for(var u1=0;u1 title"):null)}var sY=null;function sX(){}function sK(){if(this.count--,0===this.count){if(this.stylesheets)sJ(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sZ=null;function sJ(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sZ=new Map,t.forEach(s0,e),sZ=null,sK.call(e))}function s0(e,t){if(!(4&t.state.loading)){var n=sZ.get(e);if(n)var r=n.get("last");else{n=new Map,sZ.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l>>1,a=e[r];if(0>>1;rl(u,n))sl(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[i]=n,r=i);else if(sl(c,n))e[r]=c,e[s]=n,r=s;else break e}}return t}function l(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}var c=[],f=[],d=1,p=null,h=3,m=!1,g=!1,y=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(f);null!==t;){if(null===t.callback)a(f);else if(t.startTime<=e)a(f),t.sortIndex=t.expirationTime,n(c,t);else break;t=r(f)}}function S(e){if(y=!1,_(e),!g){if(null!==r(c))g=!0,j(k);else{var t=r(f);null!==t&&T(S,t.startTime-e)}}}function k(e,n){g=!1,y&&(y=!1,b(x),x=-1),m=!0;var l=h;try{e:{for(_(n),p=r(c);null!==p&&(!(p.expirationTime>n)||e&&!N());){var o=p.callback;if("function"==typeof o){p.callback=null,h=p.priorityLevel;var i=o(p.expirationTime<=n);if(n=t.unstable_now(),"function"==typeof i){p.callback=i,_(n);var u=!0;break e}p===r(c)&&a(c),_(n)}else a(c);p=r(c)}if(null!==p)u=!0;else{var s=r(f);null!==s&&T(S,s.startTime-n),u=!1}}return u}finally{p=null,h=l,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var P=!1,E=null,x=-1,C=5,O=-1;function N(){return!(t.unstable_now()-Oe||125o?(e.sortIndex=l,n(f,e),null===r(c)&&e===r(f)&&(y?(b(x),x=-1):y=!0,T(S,l-o))):(e.sortIndex=i,n(c,e),g||m||(g=!0,j(k))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},9954:function(e,t,n){"use strict";e.exports=n(4640)},8018:function(e){var t,n,r,a,l,o,i,u,s,c,f,d,p,h,m,g,y,v,b,w,_,S,k,P,E,x,C,O,N,R,L,M,j,T,A,z,I,D,F,U,B,H,W,V,q,$;(t={}).d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==t&&(t.ab="//"),n={},t.r(n),t.d(n,{getCLS:function(){return k},getFCP:function(){return w},getFID:function(){return R},getINP:function(){return H},getLCP:function(){return V},getTTFB:function(){return $},onCLS:function(){return k},onFCP:function(){return w},onFID:function(){return R},onINP:function(){return H},onLCP:function(){return V},onTTFB:function(){return $}}),u=-1,s=function(e){addEventListener("pageshow",function(t){t.persisted&&(u=t.timeStamp,e(t))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},f=function(){var e=c();return e&&e.activationStart||0},d=function(e,t){var n=c(),r="navigate";return u>=0?r="back-forward-cache":n&&(r=document.prerendering||f()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){t(e.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},h=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},m=function(e,t,n,r){var a,l;return function(o){var i;t.value>=0&&(o||r)&&((l=t.value-(a||0))||void 0===a)&&(a=t.value,t.delta=l,t.rating=(i=t.value)>n[1]?"poor":i>n[0]?"needs-improvement":"good",e(t))}},g=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},v=function(){h(function(e){g=e.timeStamp},!0)},b=function(){return g<0&&(g=y(),v(),s(function(){setTimeout(function(){g=y(),v()},0)})),{get firstHiddenTime(){return g}}},w=function(e,t){t=t||{};var n,r=[1800,3e3],a=b(),l=d("FCP"),o=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(u&&u.disconnect(),e.startTime-1&&e(t)},l=d("CLS",0),o=0,i=[],u=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e]),o>l.value&&(l.value=o,l.entries=i,r())}})},c=p("layout-shift",u);c&&(r=m(a,l,n,t.reportAllChanges),h(function(){u(c.takeRecords()),r(!0)}),s(function(){o=0,S=-1,r=m(a,l=d("CLS",0),n,t.reportAllChanges)}))},P={passive:!0,capture:!0},E=new Date,x=function(e,t){r||(r=t,a=e,l=new Date,N(removeEventListener),C())},C=function(){if(a>=0&&a1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){x(a,e),r()},n=function(){r()},r=function(){removeEventListener("pointerup",t,P),removeEventListener("pointercancel",n,P)},addEventListener("pointerup",t,P),addEventListener("pointercancel",n,P)):x(a,e)}},N=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,O,P)})},R=function(e,t){t=t||{};var n,l=[100,300],i=b(),u=d("FID"),c=function(e){e.startTimet.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};U[r.id]=r,F.push(r)}F.sort(function(e,t){return t.latency-e.latency}),F.splice(10).forEach(function(e){delete U[e.id]})}},H=function(e,t){t=t||{};var n=[200,500];z();var r,a=d("INP"),l=function(e){e.forEach(function(e){e.interactionId&&B(e),"first-input"!==e.entryType||F.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||B(e)});var t,n=(t=Math.min(F.length-1,Math.floor(D()/50)),F[t]);n&&n.latency!==a.value&&(a.value=n.latency,a.entries=n.entries,r())},o=p("event",l,{durationThreshold:t.durationThreshold||40});r=m(e,a,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),h(function(){l(o.takeRecords()),a.value<0&&D()>0&&(a.value=0,a.entries=[]),r(!0)}),s(function(){F=[],I=A(),r=m(e,a=d("INP"),n,t.reportAllChanges)}))},W={},V=function(e,t){t=t||{};var n,r=[2500,4e3],a=b(),l=d("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=t.startTime-f();rperformance.now())return;r.entries=[l],a(!0),s(function(){(a=m(e,r=d("TTFB",0),n,t.reportAllChanges))(!0)})}})},e.exports=n},9423:function(e,t){"use strict";function n(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return n}})},676:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return a},getProperError:function(){return l}});let r=n(5306);function a(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function l(e){return a(e)?e:Error((0,r.isPlainObject)(e)?JSON.stringify(e):e+"")}},2431:function(){},8754:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n.r(t),n.d(t,{_:function(){return r},_interop_require_default:function(){return r}})},1757:function(e,t,n){"use strict";function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=l?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}n.r(t),n.d(t,{_:function(){return a},_interop_require_wildcard:function(){return a}})}},function(e){_N_E=e(e.s=2768)}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/main-app-1a57ea009a1e68dc.js b/test_assets/out/_next/static/chunks/main-app-1a57ea009a1e68dc.js new file mode 100644 index 0000000..e23a76e --- /dev/null +++ b/test_assets/out/_next/static/chunks/main-app-1a57ea009a1e68dc.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{6384:function(e,n,t){Promise.resolve().then(t.t.bind(t,7858,23)),Promise.resolve().then(t.t.bind(t,9544,23)),Promise.resolve().then(t.t.bind(t,99,23)),Promise.resolve().then(t.t.bind(t,3055,23)),Promise.resolve().then(t.t.bind(t,9457,23))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[667,139],function(){return n(7732),n(6384)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/pages/_app-c544d6df833bfd4a.js b/test_assets/out/_next/static/chunks/pages/_app-c544d6df833bfd4a.js new file mode 100644 index 0000000..985b8b5 --- /dev/null +++ b/test_assets/out/_next/static/chunks/pages/_app-c544d6df833bfd4a.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{1597:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return u(3439)}])}},function(n){var _=function(_){return n(n.s=_)};n.O(0,[179],function(){return _(1597),_(3598)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/pages/_error-e6359318fe16f140.js b/test_assets/out/_next/static/chunks/pages/_error-e6359318fe16f140.js new file mode 100644 index 0000000..234e0e3 --- /dev/null +++ b/test_assets/out/_next/static/chunks/pages/_error-e6359318fe16f140.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{1981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(2512)}])}},function(n){n.O(0,[888,179],function(){return n(n.s=1981)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/test_assets/out/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js b/test_assets/out/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js new file mode 100644 index 0000000..3858b79 --- /dev/null +++ b/test_assets/out/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js @@ -0,0 +1 @@ +!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r=function(t){return t&&t.Math==Math&&t},n=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),a={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,s=u&&!a.call({1:2},1)?function(t){var e=u(this,t);return!!e&&e.enumerable}:a,c={f:s},f=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},l={}.toString,h=function(t){return l.call(t).slice(8,-1)},p="".split,d=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==h(t)?p.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return d(v(t))},y=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!y(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!y(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!y(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!y(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(t,e){return b.call(t,e)},S=n.document,E=y(S)&&y(S.createElement),x=function(t){return E?S.createElement(t):{}},A=!i&&!o(function(){return 7!=Object.defineProperty(x("div"),"a",{get:function(){return 7}}).a}),O=Object.getOwnPropertyDescriptor,R={f:i?O:function(t,e){if(t=g(t),e=m(e,!0),A)try{return O(t,e)}catch(t){}if(w(t,e))return f(!c.f.call(t,e),t[e])}},j=function(t){if(!y(t))throw TypeError(String(t)+" is not an object");return t},P=Object.defineProperty,I={f:i?P:function(t,e,r){if(j(t),e=m(e,!0),j(r),A)try{return P(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},T=i?function(t,e,r){return I.f(t,e,f(1,r))}:function(t,e,r){return t[e]=r,t},k=function(t,e){try{T(n,t,e)}catch(r){n[t]=e}return e},L="__core-js_shared__",U=n[L]||k(L,{}),M=Function.toString;"function"!=typeof U.inspectSource&&(U.inspectSource=function(t){return M.call(t)});var _,N,C,F=U.inspectSource,B=n.WeakMap,D="function"==typeof B&&/native code/.test(F(B)),q=!1,z=e(function(t){(t.exports=function(t,e){return U[t]||(U[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),W=0,K=Math.random(),G=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++W+K).toString(36)},$=z("keys"),V=function(t){return $[t]||($[t]=G(t))},H={};if(D){var X=new(0,n.WeakMap),Y=X.get,J=X.has,Q=X.set;_=function(t,e){return Q.call(X,t,e),e},N=function(t){return Y.call(X,t)||{}},C=function(t){return J.call(X,t)}}else{var Z=V("state");H[Z]=!0,_=function(t,e){return T(t,Z,e),e},N=function(t){return w(t,Z)?t[Z]:{}},C=function(t){return w(t,Z)}}var tt,et={set:_,get:N,has:C,enforce:function(t){return C(t)?N(t):_(t,{})},getterFor:function(t){return function(e){var r;if(!y(e)||(r=N(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},rt=e(function(t){var e=et.get,r=et.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||w(i,"name")||T(i,"name",e),r(i).source=o.join("string"==typeof e?e:"")),t!==n?(u?!c&&t[e]&&(s=!0):delete t[e],s?t[e]=i:T(t,e,i)):s?t[e]=i:k(e,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||F(this)})}),nt=n,ot=function(t){return"function"==typeof t?t:void 0},it=function(t,e){return arguments.length<2?ot(nt[t])||ot(n[t]):nt[t]&&nt[t][e]||n[t]&&n[t][e]},at=Math.ceil,ut=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?ut:at)(t)},ct=Math.min,ft=function(t){return t>0?ct(st(t),9007199254740991):0},lt=Math.max,ht=Math.min,pt=function(t,e){var r=st(t);return r<0?lt(r+e,0):ht(r,e)},dt=function(t){return function(e,r,n){var o,i=g(e),a=ft(i.length),u=pt(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},vt={includes:dt(!0),indexOf:dt(!1)},gt=vt.indexOf,yt=function(t,e){var r,n=g(t),o=0,i=[];for(r in n)!w(H,r)&&w(n,r)&&i.push(r);for(;e.length>o;)w(n,r=e[o++])&&(~gt(i,r)||i.push(r));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=mt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return yt(t,bt)}},St={f:Object.getOwnPropertySymbols},Et=it("Reflect","ownKeys")||function(t){var e=wt.f(j(t)),r=St.f;return r?e.concat(r(t)):e},xt=function(t,e){for(var r=Et(e),n=I.f,o=R.f,i=0;i2?arguments[2]:void 0,u=Mt((void 0===a?n:pt(a,n))-i,n-o),s=1;for(i0;)i in r?r[o]=r[i]:delete r[o],o+=s,i+=s;return r},Nt=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())}),Ct=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ft=z("wks"),Bt=n.Symbol,Dt=Ct?Bt:Bt&&Bt.withoutSetter||G,qt=function(t){return w(Ft,t)||(Ft[t]=Nt&&w(Bt,t)?Bt[t]:Dt("Symbol."+t)),Ft[t]},zt=Object.keys||function(t){return yt(t,mt)},Wt=i?Object.defineProperties:function(t,e){j(t);for(var r,n=zt(e),o=n.length,i=0;o>i;)I.f(t,r=n[i++],e[r]);return t},Kt=it("document","documentElement"),Gt=V("IE_PROTO"),$t=function(){},Vt=function(t){return"