{"version":3,"sources":["../../../src/evm/gen/template-inline.ts","../../../src/evm/gen/template.ts","../../../src/evm/template-loader.ts","../../../src/themeUtils.ts","../../../src/evm/paywall.ts","../../../src/evm/index.ts"],"names":["EVM_PAYWALL_TEMPLATE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,uBAAA,GAAA,EAAA;AAAA,QAAA,CAAA,uBAAA,EAAA;AAAA,EAAA,2BAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAAA,IAKa,2BAAA;AALb,IAAA,oBAAA,GAAA,KAAA,CAAA;AAAA,EAAA,gCAAA,GAAA;AAKO,IAAM,2BAAA,GAA8B,28pqFAAA;AAAA,EAAA;AAAA,CAAA,CAAA;;;ACL3C,IAAA,gBAAA,GAAA,EAAA;AAAA,QAAA,CAAA,gBAAA,EAAA;AAAA,EAAA,oBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAAA,IAKa,oBAAA;AALb,IAAA,aAAA,GAAA,KAAA,CAAA;AAAA,EAAA,yBAAA,GAAA;AAKO,IAAM,oBAAA,GAAuB,0cAAA;AAAA,EAAA;AAAA,CAAA,CAAA;;;ACLpC,IAAI,iBAAA,GAAmC,IAAA;AACvC,IAAI,oBAAA,GAAsC,IAAA;AAQnC,SAAS,cAAA,CAAe,OAAyB,KAAA,EAAsB;AAC5E,EAAA,IAAI,SAAS,QAAA,EAAU;AACrB,IAAA,IAAI,yBAAyB,IAAA,EAAM;AACjC,MAAA,OAAO,oBAAA;AAAA,IACT;AACA,IAAA,IAAI;AAEF,MAAA,MAAM,QAAA,IAAW,oBAAA,EAAA,EAAA,YAAA,CAAA,uBAAA,CAAA,CAAA;AACjB,MAAA,oBAAA,GAAuB,QAAA,CAAS,2BAAA;AAChC,MAAA,OAAO,oBAAA;AAAA,IACT,CAAA,CAAA,MAAQ;AACN,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EACF;AAEA,EAAA,IAAI,sBAAsB,IAAA,EAAM;AAC9B,IAAA,OAAO,iBAAA;AAAA,EACT;AACA,EAAA,IAAI;AAEF,IAAA,MAAM,QAAA,IAAW,aAAA,EAAA,EAAA,YAAA,CAAA,gBAAA,CAAA,CAAA;AACjB,IAAA,iBAAA,GAAoB,QAAA,CAAS,oBAAA;AAC7B,IAAA,OAAO,iBAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,IAAA;AAAA,EACT;AACF;;;AC1BO,SAAS,oBAAoB,KAAA,EAA8B;AAChE,EAAA,IAAI,CAAC,KAAA,EAAO;AACV,IAAA,OAAO,EAAA;AAAA,EACT;AAEA,EAAA,MAAM,WAAA,GAAc,IAAA,CAAK,SAAA,CAAU,KAAK,CAAA;AAExC,EAAA,OAAO;AAAA;AAAA;AAAA,kBAAA,EAGW,WAAW,CAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAA,CAAA;AAsD/B;;;AC/DA,SAAS,aAAa,GAAA,EAAqB;AACzC,EAAA,OAAO,GAAA,CACJ,QAAQ,KAAA,EAAO,MAAM,EACrB,OAAA,CAAQ,IAAA,EAAM,KAAK,CAAA,CACnB,OAAA,CAAQ,IAAA,EAAM,KAAK,CAAA,CACnB,OAAA,CAAQ,KAAA,EAAO,KAAK,CAAA,CACpB,OAAA,CAAQ,OAAO,KAAK,CAAA,CACpB,OAAA,CAAQ,KAAA,EAAO,KAAK,CAAA;AACzB;AAOA,SAAS,cAAA,GAAiB;AACxB,EAAA,OAAO;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,WAAA,EAAa,4CAAA;AAAA,MACb,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,WAAA,EAAa,4CAAA;AAAA,MACb,QAAA,EAAU;AAAA;AACZ,GACF;AACF;AA2BO,SAAS,kBAAkB,OAAA,EAAoC;AACpE,EAAA,MAAM,IAAA,GAAO,QAAQ,YAAA,IAAgB,KAAA;AACrC,EAAA,MAAMA,qBAAAA,GAAuB,eAAe,IAAI,CAAA;AAEhD,EAAA,IAAI,CAACA,qBAAAA,EAAsB;AACzB,IAAA,OAAO,CAAA,gHAAA,CAAA;AAAA,EACT;AAEA,EAAA,MAAM;AAAA,IACJ,MAAA;AAAA,IACA,OAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,MAAM,YAAA,GAAe,UACjB,gEAAA,GACA,EAAA;AAEJ,EAAA,MAAM,SAAS,cAAA,EAAe;AAC9B,EAAA,MAAM,WAAA,GAAc,oBAAoB,KAAK,CAAA;AAG7C,EAAA,MAAM,oBAAoB,sBAAA,GACtB,CAAA,yBAAA,EAA4B,YAAA,CAAa,sBAAsB,CAAC,CAAA,EAAA,CAAA,GAChE,EAAA;AAEJ,EAAA,MAAM,YAAA,GAAe;AAAA;AAAA;AAAA,cAAA,EAGP,MAAM,CAAA;AAAA,uBAAA,EACG,IAAA,CAAK,SAAA,CAAU,eAAe,CAAC,CAAA;AAAA,eAAA,EACvC,OAAO,CAAA;AAAA,mBAAA,EACH,YAAA,CAAa,UAAU,CAAC,CAAA;AAAA;AAAA,qBAAA,EAEtB,IAAA,CAAK,SAAA,CAAU,MAAM,CAAC,CAAA;AAAA;AAAA,gBAAA,EAE3B,YAAA,CAAa,OAAA,IAAW,EAAE,CAAC,CAAA;AAAA,gBAAA,EAC3B,YAAA,CAAa,OAAA,IAAW,EAAE,CAAC,CAAA;AAAA,MAAA,EACrC,iBAAiB;AAAA;AAAA,IAAA,EAEnB,YAAY;AAAA,WAAA,CAAA;AAGhB,EAAA,OAAOA,sBAAqB,OAAA,CAAQ,SAAA,EAAW,CAAA,EAAG,WAAW,GAAG,YAAY;AAAA,OAAA,CAAW,CAAA;AACzF;;;ACrGO,IAAM,UAAA,GAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO/C,SAAS,WAAA,EAA2C;AAClD,IAAA,OAAO,WAAA,CAAY,OAAA,CAAQ,UAAA,CAAW,SAAS,CAAA;AAAA,EACjD,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,YAAA,CACE,WAAA,EACA,eAAA,EACA,MAAA,EACQ;AACR,IAAA,MAAM,MAAA,GAAS,WAAA,CAAY,MAAA,GACvB,UAAA,CAAW,YAAY,MAAM,CAAA,GAAI,GAAA,GACjC,WAAA,CAAY,iBAAA,GACV,UAAA,CAAW,WAAA,CAAY,iBAAiB,IAAI,GAAA,GAC5C,CAAA;AAEN,IAAA,OAAO,iBAAA,CAAkB;AAAA,MACvB,MAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA,EAAY,eAAA,CAAgB,QAAA,EAAU,GAAA,IAAO,OAAO,UAAA,IAAc,EAAA;AAAA,MAClE,OAAA,EAAS,OAAO,OAAA,IAAW,IAAA;AAAA,MAC3B,SAAS,MAAA,CAAO,OAAA;AAAA,MAChB,SAAS,MAAA,CAAO,OAAA;AAAA,MAChB,OAAO,MAAA,CAAO,KAAA;AAAA,MACd,wBAAwB,MAAA,CAAO;AAAA,KAChC,CAAA;AAAA,EACH;AACF","file":"index.cjs","sourcesContent":["// THIS FILE IS AUTO-GENERATED - DO NOT EDIT\n/**\n * Full inline EVM paywall template with all JS/CSS embedded.\n * Use deliveryMode: \"inline\" to enable this template.\n */\nexport const EVM_PAYWALL_TEMPLATE_INLINE = \"<!DOCTYPE html><html lang=\\\"en\\\"><head>\\n        <meta charset=\\\"UTF-8\\\">\\n        <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n    <title>Payment Required</title><style>*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}:root{--background-color: #f9fafb;--container-background-color: #ffffff;--text-color: #111827;--secondary-text-color: #4b5563;--muted-text-color: #6b7280;--border-color: #e5e7eb;--details-background-color: #f9fafb;--details-background-color-hover: #f3f4f6;--button-primary-color: #2563eb;--button-primary-hover-color: #1d4ed8;--button-secondary-color: #eef0f3;--button-secondary-hover-color: #e9ebee;--button-positive-color: #059669;--button-positive-hover-color: #047857;--button-error-color: #ef4444;--button-error-hover-color: #dc2626;--focus-ring-color: rgba(37, 99, 235, .4);--shadow-color: rgba(0, 0, 0, .1);--shadow-color-light: rgba(0, 0, 0, .06)}.dark{--background-color: #111827;--container-background-color: #1f2937;--text-color: #f9fafb;--secondary-text-color: #d1d5db;--muted-text-color: #9ca3af;--border-color: #374151;--details-background-color: #374151;--details-background-color-hover: #4b5563;--button-primary-color: #3b82f6;--button-primary-hover-color: #2563eb;--button-secondary-color: #374151;--button-secondary-hover-color: #4b5563;--button-positive-color: #10b981;--button-positive-hover-color: #059669;--button-error-color: #f87171;--button-error-hover-color: #ef4444;--focus-ring-color: rgba(59, 130, 246, .5);--shadow-color: rgba(0, 0, 0, .3);--shadow-color-light: rgba(0, 0, 0, .2)}body{min-height:100vh;background-color:var(--background-color);color:var(--text-color);font-family:Inter,system-ui,-apple-system,sans-serif}.container{max-width:32rem;margin:4rem auto;padding:1.5rem;background-color:var(--container-background-color);border-radius:.75rem;display:flex;flex-direction:column;align-items:center;text-align:center;box-shadow:0 4px 6px -1px var(--shadow-color),0 2px 4px -1px var(--shadow-color-light)}.header{display:flex;flex-direction:column;gap:1rem}.title{font-size:1.5rem;font-weight:700;color:var(--text-color);margin-bottom:.5rem}.subtitle{color:var(--secondary-text-color)}.instructions{font-size:.9rem;color:var(--secondary-text-color);font-style:italic}.instructions a{color:var(--button-primary-color);text-decoration:none}.instructions a:hover{text-decoration:underline}.content{display:flex;flex-direction:column;gap:1rem}.input{width:100%;padding:.75rem 1rem;border-radius:.5rem;border:1px solid var(--border-color);background-color:var(--container-background-color);color:var(--text-color);transition:border-color .15s,box-shadow .15s}.input:focus{outline:none;border-color:var(--button-primary-color);box-shadow:0 0 0 3px var(--focus-ring-color)}.button{width:100%;padding:.75rem 1rem;border-radius:.5rem;font-weight:600;border:none;cursor:pointer;transition:background-color .15s,transform .1s;min-height:44px}.button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring-color)}.button:active{transform:scale(.98)}.button:disabled{opacity:.6;cursor:not-allowed}.button-primary{background-color:var(--button-primary-color);color:#fff}.button-primary:hover:not(:disabled){background-color:var(--button-primary-hover-color)}.button-secondary{background-color:var(--button-secondary-color);color:var(--text-color)}.button-secondary:hover:not(:disabled){background-color:var(--button-secondary-hover-color)}.button-positive{background-color:var(--button-positive-color);color:#fff}.button-positive:hover:not(:disabled){background-color:var(--button-positive-hover-color)}.button-error{background-color:var(--button-error-color);color:#fff}.button-error:hover:not(:disabled){background-color:var(--button-error-hover-color)}.payment-details{padding:1rem;margin-bottom:1rem;background-color:var(--details-background-color);border-radius:.5rem}.payment-row{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:.5rem}.payment-row:last-child{margin-bottom:0}.payment-label{color:var(--text-color)}.payment-value{font-weight:500}.hidden{display:none}.status{text-align:center;font-size:.875rem;color:var(--secondary-text-color)}.status[role=status]{min-height:1.5rem}.cta-container{display:flex;flex-basis:50%;flex-direction:row;gap:.5rem;margin-top:1rem}.balance-button{background-color:transparent;border:none;cursor:pointer;min-height:1rem;min-width:150px;display:flex;justify-content:flex-end;align-items:center;color:var(--text-color)}.balance-button:focus-visible{outline:2px solid var(--button-primary-color);outline-offset:2px;border-radius:4px}@keyframes spin{to{transform:rotate(360deg)}}.spinner{display:inline-flex;align-items:center;justify-content:center}.spinner>div{animation:spin 1s linear infinite;border:2px solid var(--border-color);border-top-color:var(--button-primary-color);border-radius:50%;width:1rem;height:1rem}.network-selector{width:100%}.network-selector-header{margin-bottom:1.5rem}.network-selector-title{font-size:1.25rem;font-weight:700;color:var(--text-color);margin-bottom:.5rem}.network-selector-subtitle{font-size:.875rem;color:var(--secondary-text-color)}.network-options{display:flex;flex-direction:column;gap:.75rem}.network-option{display:flex;align-items:center;gap:1rem;width:100%;padding:1rem;background-color:var(--details-background-color);border:1px solid var(--border-color);border-radius:.75rem;cursor:pointer;transition:background-color .15s,border-color .15s,transform .1s;text-align:left}.network-option:hover{background-color:var(--details-background-color-hover);border-color:var(--button-primary-color)}.network-option:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring-color);border-color:var(--button-primary-color)}.network-option:active{transform:scale(.98)}.network-option-icon{flex-shrink:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.network-option-icon svg{width:32px;height:32px}.network-option-info{flex-grow:1;display:flex;flex-direction:column;gap:.25rem}.network-option-name{font-weight:600;color:var(--text-color)}.network-option-amount{font-size:.875rem;color:var(--muted-text-color)}.network-option-arrow{flex-shrink:0;color:var(--muted-text-color)}.back-button{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;background-color:transparent;border:none;color:var(--secondary-text-color);font-size:.875rem;cursor:pointer;transition:color .15s;align-self:flex-start}.back-button:hover{color:var(--text-color)}.back-button:focus-visible{outline:2px solid var(--button-primary-color);outline-offset:2px;border-radius:4px}.back-button svg{width:16px;height:16px}.w-full{width:100%}.gap-8{gap:2rem}@media(max-width:640px){.container{margin:1rem;padding:1rem;border-radius:.5rem}.title{font-size:1.25rem}.cta-container{flex-direction:column}.network-option{padding:.75rem}.network-option-icon{width:32px;height:32px}.network-option-icon svg{width:24px;height:24px}}.payment-progress{display:flex;align-items:flex-start;justify-content:center;gap:0;width:100%;margin-bottom:1.5rem}.progress-step{display:flex;flex-direction:column;align-items:center;position:relative;flex:1;max-width:80px}.progress-step-indicator{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:600;transition:background-color .2s,border-color .2s,color .2s;position:relative;z-index:1}.progress-step.pending .progress-step-indicator{background-color:var(--details-background-color);border:2px solid var(--border-color);color:var(--muted-text-color)}.progress-step.current .progress-step-indicator,.progress-step.current.processing .progress-step-indicator{background-color:var(--button-primary-color);border:2px solid var(--button-primary-color);color:#fff}.progress-step.current.error .progress-step-indicator{background-color:var(--button-error-color);border:2px solid var(--button-error-color);color:#fff}.progress-step.completed .progress-step-indicator{background-color:var(--button-positive-color);border:2px solid var(--button-positive-color);color:#fff}.progress-step-number{line-height:1}.progress-step-label{font-size:.75rem;color:var(--muted-text-color);margin-top:.5rem;text-align:center;transition:color .2s}.progress-step.current .progress-step-label{color:var(--text-color);font-weight:500}.progress-step.completed .progress-step-label{color:var(--button-positive-color)}.progress-connector{position:absolute;top:16px;left:calc(50% + 16px);width:calc(100% - 32px);height:2px;background-color:var(--border-color);transition:background-color .2s}.progress-connector.completed{background-color:var(--button-positive-color)}@keyframes progress-spin{to{transform:rotate(360deg)}}.progress-spinner{animation:progress-spin 1s linear infinite}@media(max-width:640px){.progress-step{max-width:60px}.progress-step-indicator{width:28px;height:28px;font-size:.7rem}.progress-step-label{font-size:.65rem}.progress-connector{top:14px;left:calc(50% + 14px);width:calc(100% - 28px)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.qr-code-container{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1rem;background-color:var(--container-background-color);border:1px solid var(--border-color);border-radius:.75rem;margin-bottom:1rem}.qr-code-canvas{border-radius:.5rem;background-color:var(--container-background-color)}.qr-code-label{font-size:.875rem;color:var(--secondary-text-color);text-align:center;max-width:200px;word-break:break-all}.qr-code-copy-button{display:inline-flex;align-items:center;justify-content:center;padding:.5rem 1rem;font-size:.875rem;min-height:36px;width:auto}@media(max-width:640px){.qr-code-container{padding:.75rem}.qr-code-canvas{max-width:160px;max-height:160px}}.tx-status-container{width:100%;padding:1rem;background-color:var(--details-background-color);border:1px solid var(--border-color);border-radius:.75rem;margin-top:1rem}.tx-status-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.tx-status-label{font-size:.875rem;font-weight:500;color:var(--secondary-text-color)}.tx-status-badge{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem .625rem;border-radius:9999px;font-size:.75rem;font-weight:500}.tx-status-pending{background-color:#3b82f61a;color:var(--button-primary-color)}.tx-status-success{background-color:#10b9811a;color:var(--button-positive-color)}.tx-status-error{background-color:#ef44441a;color:var(--button-error-color)}.tx-hash-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.tx-hash{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:.875rem;color:var(--text-color);background-color:var(--container-background-color);padding:.375rem .625rem;border-radius:.375rem;border:1px solid var(--border-color)}.tx-hash-actions{display:flex;gap:.25rem}.tx-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background-color:transparent;border:1px solid var(--border-color);border-radius:.375rem;color:var(--secondary-text-color);cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}.tx-action-button:hover{background-color:var(--details-background-color-hover);border-color:var(--button-primary-color);color:var(--button-primary-color)}.tx-action-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring-color);border-color:var(--button-primary-color)}.tx-confirmations-bar{height:4px;background-color:var(--border-color);border-radius:2px;margin-top:.75rem;overflow:hidden}.tx-confirmations-progress{height:100%;background-color:var(--button-primary-color);border-radius:2px;transition:width .3s ease-out}@keyframes tx-spin{to{transform:rotate(360deg)}}.tx-status-spinner{animation:tx-spin 1s linear infinite}.dark .tx-status-pending{background-color:#3b82f626}.dark .tx-status-success{background-color:#10b98126}.dark .tx-status-error{background-color:#f8717126}@media(max-width:640px){.tx-status-container{padding:.75rem}.tx-status-header{flex-direction:column;align-items:flex-start;gap:.5rem}.tx-hash-row{flex-direction:column;align-items:stretch;gap:.5rem}.tx-hash{font-size:.8rem;text-align:center}.tx-hash-actions{justify-content:center}}\\n</style></head>\\n    <body>\\n        <div id=\\\"root\\\"></div>\\n    \\n    \\n  <script type=\\\"module\\\">\\\"use strict\\\";(()=>{var aot=Object.create;var VR=Object.defineProperty;var cot=Object.getOwnPropertyDescriptor;var lot=Object.getOwnPropertyNames;var uot=Object.getPrototypeOf,dot=Object.prototype.hasOwnProperty;var qhe=t=>{throw TypeError(t)};var x=(t,e)=>()=>(t&&(e=t(t=0)),e);var q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ue=(t,e)=>{for(var r in e)VR(t,r,{get:e[r],enumerable:!0})},$R=(t,e,r,n)=>{if(e&&typeof e==\\\"object\\\"||typeof e==\\\"function\\\")for(let i of lot(e))!dot.call(t,i)&&i!==r&&VR(t,i,{get:()=>e[i],enumerable:!(n=cot(e,i))||n.enumerable});return t},So=(t,e,r)=>($R(t,e,\\\"default\\\"),r&&$R(r,e,\\\"default\\\")),Me=(t,e,r)=>(r=t!=null?aot(uot(t)):{},$R(e||!t||!t.__esModule?VR(r,\\\"default\\\",{value:t,enumerable:!0}):r,t)),mt=t=>$R(VR({},\\\"__esModule\\\",{value:!0}),t);var rW=(t,e,r)=>e.has(t)||qhe(\\\"Cannot \\\"+r);var V=(t,e,r)=>(rW(t,e,\\\"read from private field\\\"),r?r.call(t):e.get(t)),Fe=(t,e,r)=>e.has(t)?qhe(\\\"Cannot add the same private member more than once\\\"):e instanceof WeakSet?e.add(t):e.set(t,r),Ae=(t,e,r,n)=>(rW(t,e,\\\"write to private field\\\"),n?n.call(t,r):e.set(t,r),r),gt=(t,e,r)=>(rW(t,e,\\\"access private method\\\"),r);var T8=(t,e,r,n)=>({set _(i){Ae(t,e,i,r)},get _(){return V(t,e,n)}});var Vhe=q(WR=>{\\\"use strict\\\";u();WR.byteLength=pot;WR.toByteArray=mot;WR.fromByteArray=bot;var Hf=[],iu=[],fot=typeof Uint8Array<\\\"u\\\"?Uint8Array:Array,nW=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\";for(Cb=0,zhe=nW.length;Cb<zhe;++Cb)Hf[Cb]=nW[Cb],iu[nW.charCodeAt(Cb)]=Cb;var Cb,zhe;iu[45]=62;iu[95]=63;function $he(t){var e=t.length;if(e%4>0)throw new Error(\\\"Invalid string. Length must be a multiple of 4\\\");var r=t.indexOf(\\\"=\\\");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function pot(t){var e=$he(t),r=e[0],n=e[1];return(r+n)*3/4-n}function hot(t,e,r){return(e+r)*3/4-r}function mot(t){var e,r=$he(t),n=r[0],i=r[1],s=new fot(hot(t,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c<a;c+=4)e=iu[t.charCodeAt(c)]<<18|iu[t.charCodeAt(c+1)]<<12|iu[t.charCodeAt(c+2)]<<6|iu[t.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=iu[t.charCodeAt(c)]<<2|iu[t.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=iu[t.charCodeAt(c)]<<10|iu[t.charCodeAt(c+1)]<<4|iu[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function got(t){return Hf[t>>18&63]+Hf[t>>12&63]+Hf[t>>6&63]+Hf[t&63]}function yot(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(got(n));return i.join(\\\"\\\")}function bot(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(yot(t,o,o+s>a?a:o+s));return n===1?(e=t[r-1],i.push(Hf[e>>2]+Hf[e<<4&63]+\\\"==\\\")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Hf[e>>10]+Hf[e>>4&63]+Hf[e<<2&63]+\\\"=\\\")),i.join(\\\"\\\")}});var Whe=q(iW=>{u();iW.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,c=(1<<a)-1,l=c>>1,d=-7,f=r?i-1:0,p=r?-1:1,h=t[e+f];for(f+=p,s=h&(1<<-d)-1,h>>=-d,d+=a;d>0;s=s*256+t[e+f],f+=p,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+f],f+=p,d-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(h?-1:1)*o*Math.pow(2,s-n)};iW.write=function(t,e,r,n,i,s){var o,a,c,l=s*8-i-1,d=(1<<l)-1,f=d>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,m=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?e+=p/c:e+=p*Math.pow(2,1-f),e*c>=2&&(o++,c/=2),o+f>=d?(a=0,o=d):o+f>=1?(a=(e*c-1)*Math.pow(2,i),o=o+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+h]=a&255,h+=m,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+h]=o&255,h+=m,o/=256,l-=8);t[r+h-m]|=g*128}});var Qx=q(Zx=>{\\\"use strict\\\";u();var sW=Vhe(),Gx=Whe(),Ghe=typeof Symbol==\\\"function\\\"&&typeof Symbol.for==\\\"function\\\"?Symbol.for(\\\"nodejs.util.inspect.custom\\\"):null;Zx.Buffer=ne;Zx.SlowBuffer=Cot;Zx.INSPECT_MAX_BYTES=50;var GR=2147483647;Zx.kMaxLength=GR;ne.TYPED_ARRAY_SUPPORT=wot();!ne.TYPED_ARRAY_SUPPORT&&typeof console<\\\"u\\\"&&typeof console.error==\\\"function\\\"&&console.error(\\\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\\\");function wot(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(ne.prototype,\\\"parent\\\",{enumerable:!0,get:function(){if(ne.isBuffer(this))return this.buffer}});Object.defineProperty(ne.prototype,\\\"offset\\\",{enumerable:!0,get:function(){if(ne.isBuffer(this))return this.byteOffset}});function Nh(t){if(t>GR)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,ne.prototype),e}function ne(t,e,r){if(typeof t==\\\"number\\\"){if(typeof e==\\\"string\\\")throw new TypeError('The \\\"string\\\" argument must be of type string. Received type number');return lW(t)}return Jhe(t,e,r)}ne.poolSize=8192;function Jhe(t,e,r){if(typeof t==\\\"string\\\")return xot(t,e);if(ArrayBuffer.isView(t))return Eot(t);if(t==null)throw new TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t);if(qf(t,ArrayBuffer)||t&&qf(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<\\\"u\\\"&&(qf(t,SharedArrayBuffer)||t&&qf(t.buffer,SharedArrayBuffer)))return aW(t,e,r);if(typeof t==\\\"number\\\")throw new TypeError('The \\\"value\\\" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return ne.from(n,e,r);let i=_ot(t);if(i)return i;if(typeof Symbol<\\\"u\\\"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]==\\\"function\\\")return ne.from(t[Symbol.toPrimitive](\\\"string\\\"),e,r);throw new TypeError(\\\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \\\"+typeof t)}ne.from=function(t,e,r){return Jhe(t,e,r)};Object.setPrototypeOf(ne.prototype,Uint8Array.prototype);Object.setPrototypeOf(ne,Uint8Array);function Yhe(t){if(typeof t!=\\\"number\\\")throw new TypeError('\\\"size\\\" argument must be of type number');if(t<0)throw new RangeError('The value \\\"'+t+'\\\" is invalid for option \\\"size\\\"')}function vot(t,e,r){return Yhe(t),t<=0?Nh(t):e!==void 0?typeof r==\\\"string\\\"?Nh(t).fill(e,r):Nh(t).fill(e):Nh(t)}ne.alloc=function(t,e,r){return vot(t,e,r)};function lW(t){return Yhe(t),Nh(t<0?0:uW(t)|0)}ne.allocUnsafe=function(t){return lW(t)};ne.allocUnsafeSlow=function(t){return lW(t)};function xot(t,e){if((typeof e!=\\\"string\\\"||e===\\\"\\\")&&(e=\\\"utf8\\\"),!ne.isEncoding(e))throw new TypeError(\\\"Unknown encoding: \\\"+e);let r=Xhe(t,e)|0,n=Nh(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function oW(t){let e=t.length<0?0:uW(t.length)|0,r=Nh(e);for(let n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Eot(t){if(qf(t,Uint8Array)){let e=new Uint8Array(t);return aW(e.buffer,e.byteOffset,e.byteLength)}return oW(t)}function aW(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\\\"offset\\\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\\\"length\\\" is outside of buffer bounds');let n;return e===void 0&&r===void 0?n=new Uint8Array(t):r===void 0?n=new Uint8Array(t,e):n=new Uint8Array(t,e,r),Object.setPrototypeOf(n,ne.prototype),n}function _ot(t){if(ne.isBuffer(t)){let e=uW(t.length)|0,r=Nh(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!=\\\"number\\\"||fW(t.length)?Nh(0):oW(t);if(t.type===\\\"Buffer\\\"&&Array.isArray(t.data))return oW(t.data)}function uW(t){if(t>=GR)throw new RangeError(\\\"Attempt to allocate Buffer larger than maximum size: 0x\\\"+GR.toString(16)+\\\" bytes\\\");return t|0}function Cot(t){return+t!=t&&(t=0),ne.alloc(+t)}ne.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==ne.prototype};ne.compare=function(e,r){if(qf(e,Uint8Array)&&(e=ne.from(e,e.offset,e.byteLength)),qf(r,Uint8Array)&&(r=ne.from(r,r.offset,r.byteLength)),!ne.isBuffer(e)||!ne.isBuffer(r))throw new TypeError('The \\\"buf1\\\", \\\"buf2\\\" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==r[s]){n=e[s],i=r[s];break}return n<i?-1:i<n?1:0};ne.isEncoding=function(e){switch(String(e).toLowerCase()){case\\\"hex\\\":case\\\"utf8\\\":case\\\"utf-8\\\":case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":case\\\"base64\\\":case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return!0;default:return!1}};ne.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');if(e.length===0)return ne.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<e.length;++n)r+=e[n].length;let i=ne.allocUnsafe(r),s=0;for(n=0;n<e.length;++n){let o=e[n];if(qf(o,Uint8Array))s+o.length>i.length?(ne.isBuffer(o)||(o=ne.from(o)),o.copy(i,s)):Uint8Array.prototype.set.call(i,o,s);else if(ne.isBuffer(o))o.copy(i,s);else throw new TypeError('\\\"list\\\" argument must be an Array of Buffers');s+=o.length}return i};function Xhe(t,e){if(ne.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||qf(t,ArrayBuffer))return t.byteLength;if(typeof t!=\\\"string\\\")throw new TypeError('The \\\"string\\\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":return r;case\\\"utf8\\\":case\\\"utf-8\\\":return cW(t).length;case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return r*2;case\\\"hex\\\":return r>>>1;case\\\"base64\\\":return cme(t).length;default:if(i)return n?-1:cW(t).length;e=(\\\"\\\"+e).toLowerCase(),i=!0}}ne.byteLength=Xhe;function Sot(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return\\\"\\\";for(t||(t=\\\"utf8\\\");;)switch(t){case\\\"hex\\\":return Mot(this,e,r);case\\\"utf8\\\":case\\\"utf-8\\\":return tme(this,e,r);case\\\"ascii\\\":return kot(this,e,r);case\\\"latin1\\\":case\\\"binary\\\":return Bot(this,e,r);case\\\"base64\\\":return Oot(this,e,r);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return Dot(this,e,r);default:if(n)throw new TypeError(\\\"Unknown encoding: \\\"+t);t=(t+\\\"\\\").toLowerCase(),n=!0}}ne.prototype._isBuffer=!0;function Sb(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}ne.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError(\\\"Buffer size must be a multiple of 16-bits\\\");for(let r=0;r<e;r+=2)Sb(this,r,r+1);return this};ne.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError(\\\"Buffer size must be a multiple of 32-bits\\\");for(let r=0;r<e;r+=4)Sb(this,r,r+3),Sb(this,r+1,r+2);return this};ne.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError(\\\"Buffer size must be a multiple of 64-bits\\\");for(let r=0;r<e;r+=8)Sb(this,r,r+7),Sb(this,r+1,r+6),Sb(this,r+2,r+5),Sb(this,r+3,r+4);return this};ne.prototype.toString=function(){let e=this.length;return e===0?\\\"\\\":arguments.length===0?tme(this,0,e):Sot.apply(this,arguments)};ne.prototype.toLocaleString=ne.prototype.toString;ne.prototype.equals=function(e){if(!ne.isBuffer(e))throw new TypeError(\\\"Argument must be a Buffer\\\");return this===e?!0:ne.compare(this,e)===0};ne.prototype.inspect=function(){let e=\\\"\\\",r=Zx.INSPECT_MAX_BYTES;return e=this.toString(\\\"hex\\\",0,r).replace(/(.{2})/g,\\\"$1 \\\").trim(),this.length>r&&(e+=\\\" ... \\\"),\\\"<Buffer \\\"+e+\\\">\\\"};Ghe&&(ne.prototype[Ghe]=ne.prototype.inspect);ne.prototype.compare=function(e,r,n,i,s){if(qf(e,Uint8Array)&&(e=ne.from(e,e.offset,e.byteLength)),!ne.isBuffer(e))throw new TypeError('The \\\"target\\\" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError(\\\"out of range index\\\");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;let o=s-i,a=n-r,c=Math.min(o,a),l=this.slice(i,s),d=e.slice(r,n);for(let f=0;f<c;++f)if(l[f]!==d[f]){o=l[f],a=d[f];break}return o<a?-1:a<o?1:0};function eme(t,e,r,n,i){if(t.length===0)return-1;if(typeof r==\\\"string\\\"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,fW(r)&&(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)r=0;else return-1;if(typeof e==\\\"string\\\"&&(e=ne.from(e,n)),ne.isBuffer(e))return e.length===0?-1:Khe(t,e,r,n,i);if(typeof e==\\\"number\\\")return e=e&255,typeof Uint8Array.prototype.indexOf==\\\"function\\\"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Khe(t,[e],r,n,i);throw new TypeError(\\\"val must be string, number or Buffer\\\")}function Khe(t,e,r,n,i){let s=1,o=t.length,a=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n===\\\"ucs2\\\"||n===\\\"ucs-2\\\"||n===\\\"utf16le\\\"||n===\\\"utf-16le\\\")){if(t.length<2||e.length<2)return-1;s=2,o/=2,a/=2,r/=2}function c(d,f){return s===1?d[f]:d.readUInt16BE(f*s)}let l;if(i){let d=-1;for(l=r;l<o;l++)if(c(t,l)===c(e,d===-1?0:l-d)){if(d===-1&&(d=l),l-d+1===a)return d*s}else d!==-1&&(l-=l-d),d=-1}else for(r+a>o&&(r=o-a),l=r;l>=0;l--){let d=!0;for(let f=0;f<a;f++)if(c(t,l+f)!==c(e,f)){d=!1;break}if(d)return l}return-1}ne.prototype.includes=function(e,r,n){return this.indexOf(e,r,n)!==-1};ne.prototype.indexOf=function(e,r,n){return eme(this,e,r,n,!0)};ne.prototype.lastIndexOf=function(e,r,n){return eme(this,e,r,n,!1)};function Aot(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let s=e.length;n>s/2&&(n=s/2);let o;for(o=0;o<n;++o){let a=parseInt(e.substr(o*2,2),16);if(fW(a))return o;t[r+o]=a}return o}function Tot(t,e,r,n){return KR(cW(e,t.length-r),t,r,n)}function Iot(t,e,r,n){return KR(jot(e),t,r,n)}function Rot(t,e,r,n){return KR(cme(e),t,r,n)}function Pot(t,e,r,n){return KR(Hot(e,t.length-r),t,r,n)}ne.prototype.write=function(e,r,n,i){if(r===void 0)i=\\\"utf8\\\",n=this.length,r=0;else if(n===void 0&&typeof r==\\\"string\\\")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i=\\\"utf8\\\")):(i=n,n=void 0);else throw new Error(\\\"Buffer.write(string, encoding, offset[, length]) is no longer supported\\\");let s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError(\\\"Attempt to write outside buffer bounds\\\");i||(i=\\\"utf8\\\");let o=!1;for(;;)switch(i){case\\\"hex\\\":return Aot(this,e,r,n);case\\\"utf8\\\":case\\\"utf-8\\\":return Tot(this,e,r,n);case\\\"ascii\\\":case\\\"latin1\\\":case\\\"binary\\\":return Iot(this,e,r,n);case\\\"base64\\\":return Rot(this,e,r,n);case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return Pot(this,e,r,n);default:if(o)throw new TypeError(\\\"Unknown encoding: \\\"+i);i=(\\\"\\\"+i).toLowerCase(),o=!0}};ne.prototype.toJSON=function(){return{type:\\\"Buffer\\\",data:Array.prototype.slice.call(this._arr||this,0)}};function Oot(t,e,r){return e===0&&r===t.length?sW.fromByteArray(t):sW.fromByteArray(t.slice(e,r))}function tme(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){let c,l,d,f;switch(a){case 1:s<128&&(o=s);break;case 2:c=t[i+1],(c&192)===128&&(f=(s&31)<<6|c&63,f>127&&(o=f));break;case 3:c=t[i+1],l=t[i+2],(c&192)===128&&(l&192)===128&&(f=(s&15)<<12|(c&63)<<6|l&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:c=t[i+1],l=t[i+2],d=t[i+3],(c&192)===128&&(l&192)===128&&(d&192)===128&&(f=(s&15)<<18|(c&63)<<12|(l&63)<<6|d&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return Not(n)}var Zhe=4096;function Not(t){let e=t.length;if(e<=Zhe)return String.fromCharCode.apply(String,t);let r=\\\"\\\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Zhe));return r}function kot(t,e,r){let n=\\\"\\\";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]&127);return n}function Bot(t,e,r){let n=\\\"\\\";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function Mot(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i=\\\"\\\";for(let s=e;s<r;++s)i+=qot[t[s]];return i}function Dot(t,e,r){let n=t.slice(e,r),i=\\\"\\\";for(let s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+n[s+1]*256);return i}ne.prototype.slice=function(e,r){let n=this.length;e=~~e,r=r===void 0?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);let i=this.subarray(e,r);return Object.setPrototypeOf(i,ne.prototype),i};function Xs(t,e,r){if(t%1!==0||t<0)throw new RangeError(\\\"offset is not uint\\\");if(t+e>r)throw new RangeError(\\\"Trying to access beyond buffer length\\\")}ne.prototype.readUintLE=ne.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Xs(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return i};ne.prototype.readUintBE=ne.prototype.readUIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Xs(e,r,this.length);let i=this[e+--r],s=1;for(;r>0&&(s*=256);)i+=this[e+--r]*s;return i};ne.prototype.readUint8=ne.prototype.readUInt8=function(e,r){return e=e>>>0,r||Xs(e,1,this.length),this[e]};ne.prototype.readUint16LE=ne.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Xs(e,2,this.length),this[e]|this[e+1]<<8};ne.prototype.readUint16BE=ne.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Xs(e,2,this.length),this[e]<<8|this[e+1]};ne.prototype.readUint32LE=ne.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};ne.prototype.readUint32BE=ne.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};ne.prototype.readBigUInt64LE=eg(function(e){e=e>>>0,Kx(e,\\\"offset\\\");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I8(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,s=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))});ne.prototype.readBigUInt64BE=eg(function(e){e=e>>>0,Kx(e,\\\"offset\\\");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I8(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],s=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(s)});ne.prototype.readIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Xs(e,r,this.length);let i=this[e],s=1,o=0;for(;++o<r&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*r)),i};ne.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Xs(e,r,this.length);let i=r,s=1,o=this[e+--i];for(;i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*r)),o};ne.prototype.readInt8=function(e,r){return e=e>>>0,r||Xs(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};ne.prototype.readInt16LE=function(e,r){e=e>>>0,r||Xs(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};ne.prototype.readInt16BE=function(e,r){e=e>>>0,r||Xs(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};ne.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};ne.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};ne.prototype.readBigInt64LE=eg(function(e){e=e>>>0,Kx(e,\\\"offset\\\");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I8(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});ne.prototype.readBigInt64BE=eg(function(e){e=e>>>0,Kx(e,\\\"offset\\\");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&I8(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});ne.prototype.readFloatLE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),Gx.read(this,e,!0,23,4)};ne.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Xs(e,4,this.length),Gx.read(this,e,!1,23,4)};ne.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Xs(e,8,this.length),Gx.read(this,e,!0,52,8)};ne.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Xs(e,8,this.length),Gx.read(this,e,!1,52,8)};function pc(t,e,r,n,i,s){if(!ne.isBuffer(t))throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('\\\"value\\\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\")}ne.prototype.writeUintLE=ne.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;pc(this,e,r,n,a,0)}let s=1,o=0;for(this[r]=e&255;++o<n&&(s*=256);)this[r+o]=e/s&255;return r+n};ne.prototype.writeUintBE=ne.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let a=Math.pow(2,8*n)-1;pc(this,e,r,n,a,0)}let s=n-1,o=1;for(this[r+s]=e&255;--s>=0&&(o*=256);)this[r+s]=e/o&255;return r+n};ne.prototype.writeUint8=ne.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,1,255,0),this[r]=e&255,r+1};ne.prototype.writeUint16LE=ne.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};ne.prototype.writeUint16BE=ne.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};ne.prototype.writeUint32LE=ne.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};ne.prototype.writeUint32BE=ne.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function rme(t,e,r,n,i){ame(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,r}function nme(t,e,r,n,i){ame(e,n,i,t,r,7);let s=Number(e&BigInt(4294967295));t[r+7]=s,s=s>>8,t[r+6]=s,s=s>>8,t[r+5]=s,s=s>>8,t[r+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o=o>>8,t[r+2]=o,o=o>>8,t[r+1]=o,o=o>>8,t[r]=o,r+8}ne.prototype.writeBigUInt64LE=eg(function(e,r=0){return rme(this,e,r,BigInt(0),BigInt(\\\"0xffffffffffffffff\\\"))});ne.prototype.writeBigUInt64BE=eg(function(e,r=0){return nme(this,e,r,BigInt(0),BigInt(\\\"0xffffffffffffffff\\\"))});ne.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);pc(this,e,r,n,c-1,-c)}let s=0,o=1,a=0;for(this[r]=e&255;++s<n&&(o*=256);)e<0&&a===0&&this[r+s-1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};ne.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let c=Math.pow(2,8*n-1);pc(this,e,r,n,c-1,-c)}let s=n-1,o=1,a=0;for(this[r+s]=e&255;--s>=0&&(o*=256);)e<0&&a===0&&this[r+s+1]!==0&&(a=1),this[r+s]=(e/o>>0)-a&255;return r+n};ne.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};ne.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};ne.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};ne.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};ne.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||pc(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};ne.prototype.writeBigInt64LE=eg(function(e,r=0){return rme(this,e,r,-BigInt(\\\"0x8000000000000000\\\"),BigInt(\\\"0x7fffffffffffffff\\\"))});ne.prototype.writeBigInt64BE=eg(function(e,r=0){return nme(this,e,r,-BigInt(\\\"0x8000000000000000\\\"),BigInt(\\\"0x7fffffffffffffff\\\"))});function ime(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError(\\\"Index out of range\\\");if(r<0)throw new RangeError(\\\"Index out of range\\\")}function sme(t,e,r,n,i){return e=+e,r=r>>>0,i||ime(t,e,r,4,34028234663852886e22,-34028234663852886e22),Gx.write(t,e,r,n,23,4),r+4}ne.prototype.writeFloatLE=function(e,r,n){return sme(this,e,r,!0,n)};ne.prototype.writeFloatBE=function(e,r,n){return sme(this,e,r,!1,n)};function ome(t,e,r,n,i){return e=+e,r=r>>>0,i||ime(t,e,r,8,17976931348623157e292,-17976931348623157e292),Gx.write(t,e,r,n,52,8),r+8}ne.prototype.writeDoubleLE=function(e,r,n){return ome(this,e,r,!0,n)};ne.prototype.writeDoubleBE=function(e,r,n){return ome(this,e,r,!1,n)};ne.prototype.copy=function(e,r,n,i){if(!ne.isBuffer(e))throw new TypeError(\\\"argument should be a Buffer\\\");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError(\\\"targetStart out of bounds\\\");if(n<0||n>=this.length)throw new RangeError(\\\"Index out of range\\\");if(i<0)throw new RangeError(\\\"sourceEnd out of bounds\\\");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);let s=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin==\\\"function\\\"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),s};ne.prototype.fill=function(e,r,n,i){if(typeof e==\\\"string\\\"){if(typeof r==\\\"string\\\"?(i=r,r=0,n=this.length):typeof n==\\\"string\\\"&&(i=n,n=this.length),i!==void 0&&typeof i!=\\\"string\\\")throw new TypeError(\\\"encoding must be a string\\\");if(typeof i==\\\"string\\\"&&!ne.isEncoding(i))throw new TypeError(\\\"Unknown encoding: \\\"+i);if(e.length===1){let o=e.charCodeAt(0);(i===\\\"utf8\\\"&&o<128||i===\\\"latin1\\\")&&(e=o)}}else typeof e==\\\"number\\\"?e=e&255:typeof e==\\\"boolean\\\"&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError(\\\"Out of range index\\\");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let s;if(typeof e==\\\"number\\\")for(s=r;s<n;++s)this[s]=e;else{let o=ne.isBuffer(e)?e:ne.from(e,i),a=o.length;if(a===0)throw new TypeError('The value \\\"'+e+'\\\" is invalid for argument \\\"value\\\"');for(s=0;s<n-r;++s)this[s+r]=o[s%a]}return this};var Wx={};function dW(t,e,r){Wx[t]=class extends r{constructor(){super(),Object.defineProperty(this,\\\"message\\\",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(i){Object.defineProperty(this,\\\"code\\\",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}dW(\\\"ERR_BUFFER_OUT_OF_BOUNDS\\\",function(t){return t?`${t} is outside of buffer bounds`:\\\"Attempt to access memory outside buffer bounds\\\"},RangeError);dW(\\\"ERR_INVALID_ARG_TYPE\\\",function(t,e){return`The \\\"${t}\\\" argument must be of type number. Received type ${typeof e}`},TypeError);dW(\\\"ERR_OUT_OF_RANGE\\\",function(t,e,r){let n=`The value of \\\"${t}\\\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Qhe(String(r)):typeof r==\\\"bigint\\\"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Qhe(i)),i+=\\\"n\\\"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Qhe(t){let e=\\\"\\\",r=t.length,n=t[0]===\\\"-\\\"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Lot(t,e,r){Kx(e,\\\"offset\\\"),(t[e]===void 0||t[e+r]===void 0)&&I8(e,t.length-(r+1))}function ame(t,e,r,n,i,s){if(t>r||t<e){let o=typeof e==\\\"bigint\\\"?\\\"n\\\":\\\"\\\",a;throw s>3?e===0||e===BigInt(0)?a=`>= 0${o} and < 2${o} ** ${(s+1)*8}${o}`:a=`>= -(2${o} ** ${(s+1)*8-1}${o}) and < 2 ** ${(s+1)*8-1}${o}`:a=`>= ${e}${o} and <= ${r}${o}`,new Wx.ERR_OUT_OF_RANGE(\\\"value\\\",a,t)}Lot(n,i,s)}function Kx(t,e){if(typeof t!=\\\"number\\\")throw new Wx.ERR_INVALID_ARG_TYPE(e,\\\"number\\\",t)}function I8(t,e,r){throw Math.floor(t)!==t?(Kx(t,r),new Wx.ERR_OUT_OF_RANGE(r||\\\"offset\\\",\\\"an integer\\\",t)):e<0?new Wx.ERR_BUFFER_OUT_OF_BOUNDS:new Wx.ERR_OUT_OF_RANGE(r||\\\"offset\\\",`>= ${r?1:0} and <= ${e}`,t)}var Uot=/[^+/0-9A-Za-z-_]/g;function Fot(t){if(t=t.split(\\\"=\\\")[0],t=t.trim().replace(Uot,\\\"\\\"),t.length<2)return\\\"\\\";for(;t.length%4!==0;)t=t+\\\"=\\\";return t}function cW(t,e){e=e||1/0;let r,n=t.length,i=null,s=[];for(let o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error(\\\"Invalid code point\\\")}return s}function jot(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function Hot(t,e){let r,n,i,s=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function cme(t){return sW.toByteArray(Fot(t))}function KR(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function qf(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function fW(t){return t!==t}var qot=(function(){let t=\\\"0123456789abcdef\\\",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e})();function eg(t){return typeof BigInt>\\\"u\\\"?zot:t}function zot(){throw new Error(\\\"BigInt not supported\\\")}});var lme,u=x(()=>{\\\"use strict\\\";lme=Me(Qx(),1);globalThis.Buffer=lme.Buffer});var wme=q(wi=>{\\\"use strict\\\";u();function gW(t,e){var r=t.length;t.push(e);e:for(;0<r;){var n=r-1>>>1,i=t[n];if(0<ZR(i,e))t[n]=e,t[r]=i,r=n;else break e}}function zf(t){return t.length===0?null:t[0]}function JR(t){if(t.length===0)return null;var e=t[0],r=t.pop();if(r!==e){t[0]=r;e:for(var n=0,i=t.length,s=i>>>1;n<s;){var o=2*(n+1)-1,a=t[o],c=o+1,l=t[c];if(0>ZR(a,r))c<i&&0>ZR(l,a)?(t[n]=l,t[c]=r,n=c):(t[n]=a,t[o]=r,n=o);else if(c<i&&0>ZR(l,r))t[n]=l,t[c]=r,n=c;else break e}}return e}function ZR(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}wi.unstable_now=void 0;typeof performance==\\\"object\\\"&&typeof performance.now==\\\"function\\\"?(ume=performance,wi.unstable_now=function(){return ume.now()}):(pW=Date,dme=pW.now(),wi.unstable_now=function(){return pW.now()-dme});var ume,pW,dme,kh=[],tg=[],$ot=1,su=null,ca=3,yW=!1,R8=!1,P8=!1,bW=!1,hme=typeof setTimeout==\\\"function\\\"?setTimeout:null,mme=typeof clearTimeout==\\\"function\\\"?clearTimeout:null,fme=typeof setImmediate<\\\"u\\\"?setImmediate:null;function QR(t){for(var e=zf(tg);e!==null;){if(e.callback===null)JR(tg);else if(e.startTime<=t)JR(tg),e.sortIndex=e.expirationTime,gW(kh,e);else break;e=zf(tg)}}function wW(t){if(P8=!1,QR(t),!R8)if(zf(kh)!==null)R8=!0,Yx||(Yx=!0,Jx());else{var e=zf(tg);e!==null&&vW(wW,e.startTime-t)}}var Yx=!1,O8=-1,gme=5,yme=-1;function bme(){return bW?!0:!(wi.unstable_now()-yme<gme)}function hW(){if(bW=!1,Yx){var t=wi.unstable_now();yme=t;var e=!0;try{e:{R8=!1,P8&&(P8=!1,mme(O8),O8=-1),yW=!0;var r=ca;try{t:{for(QR(t),su=zf(kh);su!==null&&!(su.expirationTime>t&&bme());){var n=su.callback;if(typeof n==\\\"function\\\"){su.callback=null,ca=su.priorityLevel;var i=n(su.expirationTime<=t);if(t=wi.unstable_now(),typeof i==\\\"function\\\"){su.callback=i,QR(t),e=!0;break t}su===zf(kh)&&JR(kh),QR(t)}else JR(kh);su=zf(kh)}if(su!==null)e=!0;else{var s=zf(tg);s!==null&&vW(wW,s.startTime-t),e=!1}}break e}finally{su=null,ca=r,yW=!1}e=void 0}}finally{e?Jx():Yx=!1}}}var Jx;typeof fme==\\\"function\\\"?Jx=function(){fme(hW)}:typeof MessageChannel<\\\"u\\\"?(mW=new MessageChannel,pme=mW.port2,mW.port1.onmessage=hW,Jx=function(){pme.postMessage(null)}):Jx=function(){hme(hW,0)};var mW,pme;function vW(t,e){O8=hme(function(){t(wi.unstable_now())},e)}wi.unstable_IdlePriority=5;wi.unstable_ImmediatePriority=1;wi.unstable_LowPriority=4;wi.unstable_NormalPriority=3;wi.unstable_Profiling=null;wi.unstable_UserBlockingPriority=2;wi.unstable_cancelCallback=function(t){t.callback=null};wi.unstable_forceFrameRate=function(t){0>t||125<t?console.error(\\\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\\\"):gme=0<t?Math.floor(1e3/t):5};wi.unstable_getCurrentPriorityLevel=function(){return ca};wi.unstable_next=function(t){switch(ca){case 1:case 2:case 3:var e=3;break;default:e=ca}var r=ca;ca=e;try{return t()}finally{ca=r}};wi.unstable_requestPaint=function(){bW=!0};wi.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=ca;ca=t;try{return e()}finally{ca=r}};wi.unstable_scheduleCallback=function(t,e,r){var n=wi.unstable_now();switch(typeof r==\\\"object\\\"&&r!==null?(r=r.delay,r=typeof r==\\\"number\\\"&&0<r?n+r:n):r=n,t){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=r+i,t={id:$ot++,callback:e,priorityLevel:t,startTime:r,expirationTime:i,sortIndex:-1},r>n?(t.sortIndex=r,gW(tg,t),zf(kh)===null&&t===zf(tg)&&(P8?(mme(O8),O8=-1):P8=!0,vW(wW,r-n))):(t.sortIndex=i,gW(kh,t),R8||yW||(R8=!0,Yx||(Yx=!0,Jx()))),t};wi.unstable_shouldYield=bme;wi.unstable_wrapCallback=function(t){var e=ca;return function(){var r=ca;ca=e;try{return t.apply(this,arguments)}finally{ca=r}}}});var xme=q((JZt,vme)=>{\\\"use strict\\\";u();vme.exports=wme()});var Nme=q(Et=>{\\\"use strict\\\";u();var _W=Symbol.for(\\\"react.transitional.element\\\"),Vot=Symbol.for(\\\"react.portal\\\"),Wot=Symbol.for(\\\"react.fragment\\\"),Got=Symbol.for(\\\"react.strict_mode\\\"),Kot=Symbol.for(\\\"react.profiler\\\"),Zot=Symbol.for(\\\"react.consumer\\\"),Qot=Symbol.for(\\\"react.context\\\"),Jot=Symbol.for(\\\"react.forward_ref\\\"),Yot=Symbol.for(\\\"react.suspense\\\"),Xot=Symbol.for(\\\"react.memo\\\"),Ame=Symbol.for(\\\"react.lazy\\\"),eat=Symbol.for(\\\"react.activity\\\"),Eme=Symbol.iterator;function tat(t){return t===null||typeof t!=\\\"object\\\"?null:(t=Eme&&t[Eme]||t[\\\"@@iterator\\\"],typeof t==\\\"function\\\"?t:null)}var Tme={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ime=Object.assign,Rme={};function eE(t,e,r){this.props=t,this.context=e,this.refs=Rme,this.updater=r||Tme}eE.prototype.isReactComponent={};eE.prototype.setState=function(t,e){if(typeof t!=\\\"object\\\"&&typeof t!=\\\"function\\\"&&t!=null)throw Error(\\\"takes an object of state variables to update or a function which returns an object of state variables.\\\");this.updater.enqueueSetState(this,t,e,\\\"setState\\\")};eE.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\\\"forceUpdate\\\")};function Pme(){}Pme.prototype=eE.prototype;function CW(t,e,r){this.props=t,this.context=e,this.refs=Rme,this.updater=r||Tme}var SW=CW.prototype=new Pme;SW.constructor=CW;Ime(SW,eE.prototype);SW.isPureReactComponent=!0;var _me=Array.isArray;function EW(){}var Hn={H:null,A:null,T:null,S:null},Ome=Object.prototype.hasOwnProperty;function AW(t,e,r){var n=r.ref;return{$$typeof:_W,type:t,key:e,ref:n!==void 0?n:null,props:r}}function rat(t,e){return AW(t.type,e,t.props)}function TW(t){return typeof t==\\\"object\\\"&&t!==null&&t.$$typeof===_W}function nat(t){var e={\\\"=\\\":\\\"=0\\\",\\\":\\\":\\\"=2\\\"};return\\\"$\\\"+t.replace(/[=:]/g,function(r){return e[r]})}var Cme=/\\\\/+/g;function xW(t,e){return typeof t==\\\"object\\\"&&t!==null&&t.key!=null?nat(\\\"\\\"+t.key):e.toString(36)}function iat(t){switch(t.status){case\\\"fulfilled\\\":return t.value;case\\\"rejected\\\":throw t.reason;default:switch(typeof t.status==\\\"string\\\"?t.then(EW,EW):(t.status=\\\"pending\\\",t.then(function(e){t.status===\\\"pending\\\"&&(t.status=\\\"fulfilled\\\",t.value=e)},function(e){t.status===\\\"pending\\\"&&(t.status=\\\"rejected\\\",t.reason=e)})),t.status){case\\\"fulfilled\\\":return t.value;case\\\"rejected\\\":throw t.reason}}throw t}function Xx(t,e,r,n,i){var s=typeof t;(s===\\\"undefined\\\"||s===\\\"boolean\\\")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case\\\"bigint\\\":case\\\"string\\\":case\\\"number\\\":o=!0;break;case\\\"object\\\":switch(t.$$typeof){case _W:case Vot:o=!0;break;case Ame:return o=t._init,Xx(o(t._payload),e,r,n,i)}}if(o)return i=i(t),o=n===\\\"\\\"?\\\".\\\"+xW(t,0):n,_me(i)?(r=\\\"\\\",o!=null&&(r=o.replace(Cme,\\\"$&/\\\")+\\\"/\\\"),Xx(i,e,r,\\\"\\\",function(l){return l})):i!=null&&(TW(i)&&(i=rat(i,r+(i.key==null||t&&t.key===i.key?\\\"\\\":(\\\"\\\"+i.key).replace(Cme,\\\"$&/\\\")+\\\"/\\\")+o)),e.push(i)),1;o=0;var a=n===\\\"\\\"?\\\".\\\":n+\\\":\\\";if(_me(t))for(var c=0;c<t.length;c++)n=t[c],s=a+xW(n,c),o+=Xx(n,e,r,s,i);else if(c=tat(t),typeof c==\\\"function\\\")for(t=c.call(t),c=0;!(n=t.next()).done;)n=n.value,s=a+xW(n,c++),o+=Xx(n,e,r,s,i);else if(s===\\\"object\\\"){if(typeof t.then==\\\"function\\\")return Xx(iat(t),e,r,n,i);throw e=String(t),Error(\\\"Objects are not valid as a React child (found: \\\"+(e===\\\"[object Object]\\\"?\\\"object with keys {\\\"+Object.keys(t).join(\\\", \\\")+\\\"}\\\":e)+\\\"). If you meant to render a collection of children, use an array instead.\\\")}return o}function YR(t,e,r){if(t==null)return t;var n=[],i=0;return Xx(t,n,\\\"\\\",\\\"\\\",function(s){return e.call(r,s,i++)}),n}function sat(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Sme=typeof reportError==\\\"function\\\"?reportError:function(t){if(typeof window==\\\"object\\\"&&typeof window.ErrorEvent==\\\"function\\\"){var e=new window.ErrorEvent(\\\"error\\\",{bubbles:!0,cancelable:!0,message:typeof t==\\\"object\\\"&&t!==null&&typeof t.message==\\\"string\\\"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==\\\"object\\\"&&typeof process.emit==\\\"function\\\"){process.emit(\\\"uncaughtException\\\",t);return}console.error(t)},oat={map:YR,forEach:function(t,e,r){YR(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return YR(t,function(){e++}),e},toArray:function(t){return YR(t,function(e){return e})||[]},only:function(t){if(!TW(t))throw Error(\\\"React.Children.only expected to receive a single React element child.\\\");return t}};Et.Activity=eat;Et.Children=oat;Et.Component=eE;Et.Fragment=Wot;Et.Profiler=Kot;Et.PureComponent=CW;Et.StrictMode=Got;Et.Suspense=Yot;Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Hn;Et.__COMPILER_RUNTIME={__proto__:null,c:function(t){return Hn.H.useMemoCache(t)}};Et.cache=function(t){return function(){return t.apply(null,arguments)}};Et.cacheSignal=function(){return null};Et.cloneElement=function(t,e,r){if(t==null)throw Error(\\\"The argument must be a React element, but you passed \\\"+t+\\\".\\\");var n=Ime({},t.props),i=t.key;if(e!=null)for(s in e.key!==void 0&&(i=\\\"\\\"+e.key),e)!Ome.call(e,s)||s===\\\"key\\\"||s===\\\"__self\\\"||s===\\\"__source\\\"||s===\\\"ref\\\"&&e.ref===void 0||(n[s]=e[s]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var o=Array(s),a=0;a<s;a++)o[a]=arguments[a+2];n.children=o}return AW(t.type,i,n)};Et.createContext=function(t){return t={$$typeof:Qot,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Zot,_context:t},t};Et.createElement=function(t,e,r){var n,i={},s=null;if(e!=null)for(n in e.key!==void 0&&(s=\\\"\\\"+e.key),e)Ome.call(e,n)&&n!==\\\"key\\\"&&n!==\\\"__self\\\"&&n!==\\\"__source\\\"&&(i[n]=e[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var a=Array(o),c=0;c<o;c++)a[c]=arguments[c+2];i.children=a}if(t&&t.defaultProps)for(n in o=t.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return AW(t,s,i)};Et.createRef=function(){return{current:null}};Et.forwardRef=function(t){return{$$typeof:Jot,render:t}};Et.isValidElement=TW;Et.lazy=function(t){return{$$typeof:Ame,_payload:{_status:-1,_result:t},_init:sat}};Et.memo=function(t,e){return{$$typeof:Xot,type:t,compare:e===void 0?null:e}};Et.startTransition=function(t){var e=Hn.T,r={};Hn.T=r;try{var n=t(),i=Hn.S;i!==null&&i(r,n),typeof n==\\\"object\\\"&&n!==null&&typeof n.then==\\\"function\\\"&&n.then(EW,Sme)}catch(s){Sme(s)}finally{e!==null&&r.types!==null&&(e.types=r.types),Hn.T=e}};Et.unstable_useCacheRefresh=function(){return Hn.H.useCacheRefresh()};Et.use=function(t){return Hn.H.use(t)};Et.useActionState=function(t,e,r){return Hn.H.useActionState(t,e,r)};Et.useCallback=function(t,e){return Hn.H.useCallback(t,e)};Et.useContext=function(t){return Hn.H.useContext(t)};Et.useDebugValue=function(){};Et.useDeferredValue=function(t,e){return Hn.H.useDeferredValue(t,e)};Et.useEffect=function(t,e){return Hn.H.useEffect(t,e)};Et.useEffectEvent=function(t){return Hn.H.useEffectEvent(t)};Et.useId=function(){return Hn.H.useId()};Et.useImperativeHandle=function(t,e,r){return Hn.H.useImperativeHandle(t,e,r)};Et.useInsertionEffect=function(t,e){return Hn.H.useInsertionEffect(t,e)};Et.useLayoutEffect=function(t,e){return Hn.H.useLayoutEffect(t,e)};Et.useMemo=function(t,e){return Hn.H.useMemo(t,e)};Et.useOptimistic=function(t,e){return Hn.H.useOptimistic(t,e)};Et.useReducer=function(t,e,r){return Hn.H.useReducer(t,e,r)};Et.useRef=function(t){return Hn.H.useRef(t)};Et.useState=function(t){return Hn.H.useState(t)};Et.useSyncExternalStore=function(t,e,r){return Hn.H.useSyncExternalStore(t,e,r)};Et.useTransition=function(){return Hn.H.useTransition()};Et.version=\\\"19.2.4\\\"});var Vi=q((tQt,kme)=>{\\\"use strict\\\";u();kme.exports=Nme()});var Mme=q(Ba=>{\\\"use strict\\\";u();var aat=Vi();function Bme(t){var e=\\\"https://react.dev/errors/\\\"+t;if(1<arguments.length){e+=\\\"?args[]=\\\"+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)e+=\\\"&args[]=\\\"+encodeURIComponent(arguments[r])}return\\\"Minified React error #\\\"+t+\\\"; visit \\\"+e+\\\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\\\"}function rg(){}var ka={d:{f:rg,r:function(){throw Error(Bme(522))},D:rg,C:rg,L:rg,m:rg,X:rg,S:rg,M:rg},p:0,findDOMNode:null},cat=Symbol.for(\\\"react.portal\\\");function lat(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:cat,key:n==null?null:\\\"\\\"+n,children:t,containerInfo:e,implementation:r}}var N8=aat.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function XR(t,e){if(t===\\\"font\\\")return\\\"\\\";if(typeof e==\\\"string\\\")return e===\\\"use-credentials\\\"?e:\\\"\\\"}Ba.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ka;Ba.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Bme(299));return lat(t,e,null,r)};Ba.flushSync=function(t){var e=N8.T,r=ka.p;try{if(N8.T=null,ka.p=2,t)return t()}finally{N8.T=e,ka.p=r,ka.d.f()}};Ba.preconnect=function(t,e){typeof t==\\\"string\\\"&&(e?(e=e.crossOrigin,e=typeof e==\\\"string\\\"?e===\\\"use-credentials\\\"?e:\\\"\\\":void 0):e=null,ka.d.C(t,e))};Ba.prefetchDNS=function(t){typeof t==\\\"string\\\"&&ka.d.D(t)};Ba.preinit=function(t,e){if(typeof t==\\\"string\\\"&&e&&typeof e.as==\\\"string\\\"){var r=e.as,n=XR(r,e.crossOrigin),i=typeof e.integrity==\\\"string\\\"?e.integrity:void 0,s=typeof e.fetchPriority==\\\"string\\\"?e.fetchPriority:void 0;r===\\\"style\\\"?ka.d.S(t,typeof e.precedence==\\\"string\\\"?e.precedence:void 0,{crossOrigin:n,integrity:i,fetchPriority:s}):r===\\\"script\\\"&&ka.d.X(t,{crossOrigin:n,integrity:i,fetchPriority:s,nonce:typeof e.nonce==\\\"string\\\"?e.nonce:void 0})}};Ba.preinitModule=function(t,e){if(typeof t==\\\"string\\\")if(typeof e==\\\"object\\\"&&e!==null){if(e.as==null||e.as===\\\"script\\\"){var r=XR(e.as,e.crossOrigin);ka.d.M(t,{crossOrigin:r,integrity:typeof e.integrity==\\\"string\\\"?e.integrity:void 0,nonce:typeof e.nonce==\\\"string\\\"?e.nonce:void 0})}}else e==null&&ka.d.M(t)};Ba.preload=function(t,e){if(typeof t==\\\"string\\\"&&typeof e==\\\"object\\\"&&e!==null&&typeof e.as==\\\"string\\\"){var r=e.as,n=XR(r,e.crossOrigin);ka.d.L(t,r,{crossOrigin:n,integrity:typeof e.integrity==\\\"string\\\"?e.integrity:void 0,nonce:typeof e.nonce==\\\"string\\\"?e.nonce:void 0,type:typeof e.type==\\\"string\\\"?e.type:void 0,fetchPriority:typeof e.fetchPriority==\\\"string\\\"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy==\\\"string\\\"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet==\\\"string\\\"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes==\\\"string\\\"?e.imageSizes:void 0,media:typeof e.media==\\\"string\\\"?e.media:void 0})}};Ba.preloadModule=function(t,e){if(typeof t==\\\"string\\\")if(e){var r=XR(e.as,e.crossOrigin);ka.d.m(t,{as:typeof e.as==\\\"string\\\"&&e.as!==\\\"script\\\"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity==\\\"string\\\"?e.integrity:void 0})}else ka.d.m(t)};Ba.requestFormReset=function(t){ka.d.r(t)};Ba.unstable_batchedUpdates=function(t,e){return t(e)};Ba.useFormState=function(t,e,r){return N8.H.useFormState(t,e,r)};Ba.useFormStatus=function(){return N8.H.useHostTransitionStatus()};Ba.version=\\\"19.2.4\\\"});var Ume=q((sQt,Lme)=>{\\\"use strict\\\";u();function Dme(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\\\"u\\\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\\\"function\\\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dme)}catch(t){console.error(t)}}Dme(),Lme.exports=Mme()});var Q1e=q(CO=>{\\\"use strict\\\";u();var Fs=xme(),uge=Vi(),uat=Ume();function le(t){var e=\\\"https://react.dev/errors/\\\"+t;if(1<arguments.length){e+=\\\"?args[]=\\\"+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)e+=\\\"&args[]=\\\"+encodeURIComponent(arguments[r])}return\\\"Minified React error #\\\"+t+\\\"; visit \\\"+e+\\\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\\\"}function dge(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function bS(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function fge(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function pge(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Fme(t){if(bS(t)!==t)throw Error(le(188))}function dat(t){var e=t.alternate;if(!e){if(e=bS(t),e===null)throw Error(le(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return Fme(i),t;if(s===n)return Fme(i),e;s=s.sibling}throw Error(le(188))}if(r.return!==n.return)r=i,n=s;else{for(var o=!1,a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o)throw Error(le(189))}}if(r.alternate!==n)throw Error(le(190))}if(r.tag!==3)throw Error(le(188));return r.stateNode.current===r?t:e}function hge(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=hge(t),e!==null)return e;t=t.sibling}return null}var $n=Object.assign,fat=Symbol.for(\\\"react.element\\\"),eP=Symbol.for(\\\"react.transitional.element\\\"),j8=Symbol.for(\\\"react.portal\\\"),oE=Symbol.for(\\\"react.fragment\\\"),mge=Symbol.for(\\\"react.strict_mode\\\"),aG=Symbol.for(\\\"react.profiler\\\"),gge=Symbol.for(\\\"react.consumer\\\"),Hh=Symbol.for(\\\"react.context\\\"),rK=Symbol.for(\\\"react.forward_ref\\\"),cG=Symbol.for(\\\"react.suspense\\\"),lG=Symbol.for(\\\"react.suspense_list\\\"),nK=Symbol.for(\\\"react.memo\\\"),ng=Symbol.for(\\\"react.lazy\\\"),uG=Symbol.for(\\\"react.activity\\\"),pat=Symbol.for(\\\"react.memo_cache_sentinel\\\"),jme=Symbol.iterator;function k8(t){return t===null||typeof t!=\\\"object\\\"?null:(t=jme&&t[jme]||t[\\\"@@iterator\\\"],typeof t==\\\"function\\\"?t:null)}var hat=Symbol.for(\\\"react.client.reference\\\");function dG(t){if(t==null)return null;if(typeof t==\\\"function\\\")return t.$$typeof===hat?null:t.displayName||t.name||null;if(typeof t==\\\"string\\\")return t;switch(t){case oE:return\\\"Fragment\\\";case aG:return\\\"Profiler\\\";case mge:return\\\"StrictMode\\\";case cG:return\\\"Suspense\\\";case lG:return\\\"SuspenseList\\\";case uG:return\\\"Activity\\\"}if(typeof t==\\\"object\\\")switch(t.$$typeof){case j8:return\\\"Portal\\\";case Hh:return t.displayName||\\\"Context\\\";case gge:return(t._context.displayName||\\\"Context\\\")+\\\".Consumer\\\";case rK:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||\\\"\\\",t=t!==\\\"\\\"?\\\"ForwardRef(\\\"+t+\\\")\\\":\\\"ForwardRef\\\"),t;case nK:return e=t.displayName||null,e!==null?e:dG(t.type)||\\\"Memo\\\";case ng:e=t._payload,t=t._init;try{return dG(t(e))}catch{}}return null}var H8=Array.isArray,ct=uge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Dr=uat.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ob={pending:!1,data:null,method:null,action:null},fG=[],aE=-1;function Kf(t){return{current:t}}function ro(t){0>aE||(t.current=fG[aE],fG[aE]=null,aE--)}function Sn(t,e){aE++,fG[aE]=t.current,t.current=e}var Gf=Kf(null),iS=Kf(null),hg=Kf(null),kP=Kf(null);function BP(t,e){switch(Sn(hg,e),Sn(iS,t),Sn(Gf,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?G0e(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=G0e(e),t=D1e(e,t);else switch(t){case\\\"svg\\\":t=1;break;case\\\"math\\\":t=2;break;default:t=0}}ro(Gf),Sn(Gf,t)}function SE(){ro(Gf),ro(iS),ro(hg)}function pG(t){t.memoizedState!==null&&Sn(kP,t);var e=Gf.current,r=D1e(e,t.type);e!==r&&(Sn(iS,t),Sn(Gf,r))}function MP(t){iS.current===t&&(ro(Gf),ro(iS)),kP.current===t&&(ro(kP),mS._currentValue=Ob)}var IW,Hme;function Tb(t){if(IW===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\\\\n( *(at )?)/);IW=e&&e[1]||\\\"\\\",Hme=-1<r.stack.indexOf(`\\n    at`)?\\\" (<anonymous>)\\\":-1<r.stack.indexOf(\\\"@\\\")?\\\"@unknown:0:0\\\":\\\"\\\"}return`\\n`+IW+t+Hme}var RW=!1;function PW(t,e){if(!t||RW)return\\\"\\\";RW=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,\\\"props\\\",{set:function(){throw Error()}}),typeof Reflect==\\\"object\\\"&&Reflect.construct){try{Reflect.construct(f,[])}catch(h){var p=h}Reflect.construct(t,[],f)}else{try{f.call()}catch(h){p=h}t.call(f.prototype)}}else{try{throw Error()}catch(h){p=h}(f=t())&&typeof f.catch==\\\"function\\\"&&f.catch(function(){})}}catch(h){if(h&&p&&typeof h.stack==\\\"string\\\")return[h.stack,p.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName=\\\"DetermineComponentFrameRoot\\\";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,\\\"name\\\");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,\\\"name\\\",{value:\\\"DetermineComponentFrameRoot\\\"});var s=n.DetermineComponentFrameRoot(),o=s[0],a=s[1];if(o&&a){var c=o.split(`\\n`),l=a.split(`\\n`);for(i=n=0;n<c.length&&!c[n].includes(\\\"DetermineComponentFrameRoot\\\");)n++;for(;i<l.length&&!l[i].includes(\\\"DetermineComponentFrameRoot\\\");)i++;if(n===c.length||i===l.length)for(n=c.length-1,i=l.length-1;1<=n&&0<=i&&c[n]!==l[i];)i--;for(;1<=n&&0<=i;n--,i--)if(c[n]!==l[i]){if(n!==1||i!==1)do if(n--,i--,0>i||c[n]!==l[i]){var d=`\\n`+c[n].replace(\\\" at new \\\",\\\" at \\\");return t.displayName&&d.includes(\\\"<anonymous>\\\")&&(d=d.replace(\\\"<anonymous>\\\",t.displayName)),d}while(1<=n&&0<=i);break}}}finally{RW=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:\\\"\\\")?Tb(r):\\\"\\\"}function mat(t,e){switch(t.tag){case 26:case 27:case 5:return Tb(t.type);case 16:return Tb(\\\"Lazy\\\");case 13:return t.child!==e&&e!==null?Tb(\\\"Suspense Fallback\\\"):Tb(\\\"Suspense\\\");case 19:return Tb(\\\"SuspenseList\\\");case 0:case 15:return PW(t.type,!1);case 11:return PW(t.type.render,!1);case 1:return PW(t.type,!0);case 31:return Tb(\\\"Activity\\\");default:return\\\"\\\"}}function qme(t){try{var e=\\\"\\\",r=null;do e+=mat(t,r),r=t,t=t.return;while(t);return e}catch(n){return`\\nError generating stack: `+n.message+`\\n`+n.stack}}var hG=Object.prototype.hasOwnProperty,iK=Fs.unstable_scheduleCallback,OW=Fs.unstable_cancelCallback,gat=Fs.unstable_shouldYield,yat=Fs.unstable_requestPaint,ul=Fs.unstable_now,bat=Fs.unstable_getCurrentPriorityLevel,yge=Fs.unstable_ImmediatePriority,bge=Fs.unstable_UserBlockingPriority,DP=Fs.unstable_NormalPriority,wat=Fs.unstable_LowPriority,wge=Fs.unstable_IdlePriority,vat=Fs.log,xat=Fs.unstable_setDisableYieldValue,wS=null,dl=null;function lg(t){if(typeof vat==\\\"function\\\"&&xat(t),dl&&typeof dl.setStrictMode==\\\"function\\\")try{dl.setStrictMode(wS,t)}catch{}}var fl=Math.clz32?Math.clz32:Cat,Eat=Math.log,_at=Math.LN2;function Cat(t){return t>>>=0,t===0?32:31-(Eat(t)/_at|0)|0}var tP=256,rP=262144,nP=4194304;function Ib(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function cO(t,e,r){var n=t.pendingLanes;if(n===0)return 0;var i=0,s=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var a=n&134217727;return a!==0?(n=a&~s,n!==0?i=Ib(n):(o&=a,o!==0?i=Ib(o):r||(r=a&~t,r!==0&&(i=Ib(r))))):(a=n&~s,a!==0?i=Ib(a):o!==0?i=Ib(o):r||(r=n&~t,r!==0&&(i=Ib(r)))),i===0?0:e!==0&&e!==i&&(e&s)===0&&(s=i&-i,r=e&-e,s>=r||s===32&&(r&4194048)!==0)?e:i}function vS(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Sat(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vge(){var t=nP;return nP<<=1,(nP&62914560)===0&&(nP=4194304),t}function NW(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function xS(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Aat(t,e,r,n,i,s){var o=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var a=t.entanglements,c=t.expirationTimes,l=t.hiddenUpdates;for(r=o&~r;0<r;){var d=31-fl(r),f=1<<d;a[d]=0,c[d]=-1;var p=l[d];if(p!==null)for(l[d]=null,d=0;d<p.length;d++){var h=p[d];h!==null&&(h.lane&=-536870913)}r&=~f}n!==0&&xge(t,n,0),s!==0&&i===0&&t.tag!==0&&(t.suspendedLanes|=s&~(o&~e))}function xge(t,e,r){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-fl(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|r&261930}function Ege(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-fl(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}function _ge(t,e){var r=e&-e;return r=(r&42)!==0?1:sK(r),(r&(t.suspendedLanes|e))!==0?0:r}function sK(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function oK(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Cge(){var t=Dr.p;return t!==0?t:(t=window.event,t===void 0?32:G1e(t.type))}function zme(t,e){var r=Dr.p;try{return Dr.p=t,e()}finally{Dr.p=r}}var Tg=Math.random().toString(36).slice(2),To=\\\"__reactFiber$\\\"+Tg,wc=\\\"__reactProps$\\\"+Tg,DE=\\\"__reactContainer$\\\"+Tg,mG=\\\"__reactEvents$\\\"+Tg,Tat=\\\"__reactListeners$\\\"+Tg,Iat=\\\"__reactHandles$\\\"+Tg,$me=\\\"__reactResources$\\\"+Tg,ES=\\\"__reactMarker$\\\"+Tg;function aK(t){delete t[To],delete t[wc],delete t[mG],delete t[Tat],delete t[Iat]}function cE(t){var e=t[To];if(e)return e;for(var r=t.parentNode;r;){if(e=r[DE]||r[To]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Y0e(t);t!==null;){if(r=t[To])return r;t=Y0e(t)}return e}t=r,r=t.parentNode}return null}function LE(t){if(t=t[To]||t[DE]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function q8(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(le(33))}function bE(t){var e=t[$me];return e||(e=t[$me]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function to(t){t[ES]=!0}var Sge=new Set,Age={};function Hb(t,e){AE(t,e),AE(t+\\\"Capture\\\",e)}function AE(t,e){for(Age[t]=e,t=0;t<e.length;t++)Sge.add(e[t])}var Rat=RegExp(\\\"^[:A-Z_a-z\\\\\\\\u00C0-\\\\\\\\u00D6\\\\\\\\u00D8-\\\\\\\\u00F6\\\\\\\\u00F8-\\\\\\\\u02FF\\\\\\\\u0370-\\\\\\\\u037D\\\\\\\\u037F-\\\\\\\\u1FFF\\\\\\\\u200C-\\\\\\\\u200D\\\\\\\\u2070-\\\\\\\\u218F\\\\\\\\u2C00-\\\\\\\\u2FEF\\\\\\\\u3001-\\\\\\\\uD7FF\\\\\\\\uF900-\\\\\\\\uFDCF\\\\\\\\uFDF0-\\\\\\\\uFFFD][:A-Z_a-z\\\\\\\\u00C0-\\\\\\\\u00D6\\\\\\\\u00D8-\\\\\\\\u00F6\\\\\\\\u00F8-\\\\\\\\u02FF\\\\\\\\u0370-\\\\\\\\u037D\\\\\\\\u037F-\\\\\\\\u1FFF\\\\\\\\u200C-\\\\\\\\u200D\\\\\\\\u2070-\\\\\\\\u218F\\\\\\\\u2C00-\\\\\\\\u2FEF\\\\\\\\u3001-\\\\\\\\uD7FF\\\\\\\\uF900-\\\\\\\\uFDCF\\\\\\\\uFDF0-\\\\\\\\uFFFD\\\\\\\\-.0-9\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]*$\\\"),Vme={},Wme={};function Pat(t){return hG.call(Wme,t)?!0:hG.call(Vme,t)?!1:Rat.test(t)?Wme[t]=!0:(Vme[t]=!0,!1)}function bP(t,e,r){if(Pat(e))if(r===null)t.removeAttribute(e);else{switch(typeof r){case\\\"undefined\\\":case\\\"function\\\":case\\\"symbol\\\":t.removeAttribute(e);return;case\\\"boolean\\\":var n=e.toLowerCase().slice(0,5);if(n!==\\\"data-\\\"&&n!==\\\"aria-\\\"){t.removeAttribute(e);return}}t.setAttribute(e,\\\"\\\"+r)}}function iP(t,e,r){if(r===null)t.removeAttribute(e);else{switch(typeof r){case\\\"undefined\\\":case\\\"function\\\":case\\\"symbol\\\":case\\\"boolean\\\":t.removeAttribute(e);return}t.setAttribute(e,\\\"\\\"+r)}}function Bh(t,e,r,n){if(n===null)t.removeAttribute(r);else{switch(typeof n){case\\\"undefined\\\":case\\\"function\\\":case\\\"symbol\\\":case\\\"boolean\\\":t.removeAttribute(r);return}t.setAttributeNS(e,r,\\\"\\\"+n)}}function au(t){switch(typeof t){case\\\"bigint\\\":case\\\"boolean\\\":case\\\"number\\\":case\\\"string\\\":case\\\"undefined\\\":return t;case\\\"object\\\":return t;default:return\\\"\\\"}}function Tge(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()===\\\"input\\\"&&(e===\\\"checkbox\\\"||e===\\\"radio\\\")}function Oat(t,e,r){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<\\\"u\\\"&&typeof n.get==\\\"function\\\"&&typeof n.set==\\\"function\\\"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=\\\"\\\"+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=\\\"\\\"+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function gG(t){if(!t._valueTracker){var e=Tge(t)?\\\"checked\\\":\\\"value\\\";t._valueTracker=Oat(t,e,\\\"\\\"+t[e])}}function Ige(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n=\\\"\\\";return t&&(n=Tge(t)?t.checked?\\\"true\\\":\\\"false\\\":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function LP(t){if(t=t||(typeof document<\\\"u\\\"?document:void 0),typeof t>\\\"u\\\")return null;try{return t.activeElement||t.body}catch{return t.body}}var Nat=/[\\\\n\\\"\\\\\\\\]/g;function uu(t){return t.replace(Nat,function(e){return\\\"\\\\\\\\\\\"+e.charCodeAt(0).toString(16)+\\\" \\\"})}function yG(t,e,r,n,i,s,o,a){t.name=\\\"\\\",o!=null&&typeof o!=\\\"function\\\"&&typeof o!=\\\"symbol\\\"&&typeof o!=\\\"boolean\\\"?t.type=o:t.removeAttribute(\\\"type\\\"),e!=null?o===\\\"number\\\"?(e===0&&t.value===\\\"\\\"||t.value!=e)&&(t.value=\\\"\\\"+au(e)):t.value!==\\\"\\\"+au(e)&&(t.value=\\\"\\\"+au(e)):o!==\\\"submit\\\"&&o!==\\\"reset\\\"||t.removeAttribute(\\\"value\\\"),e!=null?bG(t,o,au(e)):r!=null?bG(t,o,au(r)):n!=null&&t.removeAttribute(\\\"value\\\"),i==null&&s!=null&&(t.defaultChecked=!!s),i!=null&&(t.checked=i&&typeof i!=\\\"function\\\"&&typeof i!=\\\"symbol\\\"),a!=null&&typeof a!=\\\"function\\\"&&typeof a!=\\\"symbol\\\"&&typeof a!=\\\"boolean\\\"?t.name=\\\"\\\"+au(a):t.removeAttribute(\\\"name\\\")}function Rge(t,e,r,n,i,s,o,a){if(s!=null&&typeof s!=\\\"function\\\"&&typeof s!=\\\"symbol\\\"&&typeof s!=\\\"boolean\\\"&&(t.type=s),e!=null||r!=null){if(!(s!==\\\"submit\\\"&&s!==\\\"reset\\\"||e!=null)){gG(t);return}r=r!=null?\\\"\\\"+au(r):\\\"\\\",e=e!=null?\\\"\\\"+au(e):r,a||e===t.value||(t.value=e),t.defaultValue=e}n=n??i,n=typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\"&&!!n,t.checked=a?t.checked:!!n,t.defaultChecked=!!n,o!=null&&typeof o!=\\\"function\\\"&&typeof o!=\\\"symbol\\\"&&typeof o!=\\\"boolean\\\"&&(t.name=o),gG(t)}function bG(t,e,r){e===\\\"number\\\"&&LP(t.ownerDocument)===t||t.defaultValue===\\\"\\\"+r||(t.defaultValue=\\\"\\\"+r)}function wE(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e[\\\"$\\\"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty(\\\"$\\\"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=\\\"\\\"+au(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Pge(t,e,r){if(e!=null&&(e=\\\"\\\"+au(e),e!==t.value&&(t.value=e),r==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=r!=null?\\\"\\\"+au(r):\\\"\\\"}function Oge(t,e,r,n){if(e==null){if(n!=null){if(r!=null)throw Error(le(92));if(H8(n)){if(1<n.length)throw Error(le(93));n=n[0]}r=n}r==null&&(r=\\\"\\\"),e=r}r=au(e),t.defaultValue=r,n=t.textContent,n===r&&n!==\\\"\\\"&&n!==null&&(t.value=n),gG(t)}function TE(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var kat=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 Gme(t,e,r){var n=e.indexOf(\\\"--\\\")===0;r==null||typeof r==\\\"boolean\\\"||r===\\\"\\\"?n?t.setProperty(e,\\\"\\\"):e===\\\"float\\\"?t.cssFloat=\\\"\\\":t[e]=\\\"\\\":n?t.setProperty(e,r):typeof r!=\\\"number\\\"||r===0||kat.has(e)?e===\\\"float\\\"?t.cssFloat=r:t[e]=(\\\"\\\"+r).trim():t[e]=r+\\\"px\\\"}function Nge(t,e,r){if(e!=null&&typeof e!=\\\"object\\\")throw Error(le(62));if(t=t.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf(\\\"--\\\")===0?t.setProperty(n,\\\"\\\"):n===\\\"float\\\"?t.cssFloat=\\\"\\\":t[n]=\\\"\\\");for(var i in e)n=e[i],e.hasOwnProperty(i)&&r[i]!==n&&Gme(t,i,n)}else for(var s in e)e.hasOwnProperty(s)&&Gme(t,s,e[s])}function cK(t){if(t.indexOf(\\\"-\\\")===-1)return!1;switch(t){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 Bat=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\\\"]]),Mat=/^[\\\\u0000-\\\\u001F ]*j[\\\\r\\\\n\\\\t]*a[\\\\r\\\\n\\\\t]*v[\\\\r\\\\n\\\\t]*a[\\\\r\\\\n\\\\t]*s[\\\\r\\\\n\\\\t]*c[\\\\r\\\\n\\\\t]*r[\\\\r\\\\n\\\\t]*i[\\\\r\\\\n\\\\t]*p[\\\\r\\\\n\\\\t]*t[\\\\r\\\\n\\\\t]*:/i;function wP(t){return Mat.test(\\\"\\\"+t)?\\\"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\\\":t}function qh(){}var wG=null;function lK(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var lE=null,vE=null;function Kme(t){var e=LE(t);if(e&&(t=e.stateNode)){var r=t[wc]||null;e:switch(t=e.stateNode,e.type){case\\\"input\\\":if(yG(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),e=r.name,r.type===\\\"radio\\\"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name=\\\"'+uu(\\\"\\\"+e)+'\\\"][type=\\\"radio\\\"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=n[wc]||null;if(!i)throw Error(le(90));yG(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(e=0;e<r.length;e++)n=r[e],n.form===t.form&&Ige(n)}break e;case\\\"textarea\\\":Pge(t,r.value,r.defaultValue);break e;case\\\"select\\\":e=r.value,e!=null&&wE(t,!!r.multiple,e,!1)}}}var kW=!1;function kge(t,e,r){if(kW)return t(e,r);kW=!0;try{var n=t(e);return n}finally{if(kW=!1,(lE!==null||vE!==null)&&(vO(),lE&&(e=lE,t=vE,vE=lE=null,Kme(e),t)))for(e=0;e<t.length;e++)Kme(t[e])}}function sS(t,e){var r=t.stateNode;if(r===null)return null;var n=r[wc]||null;if(n===null)return null;r=n[e];e:switch(e){case\\\"onClick\\\":case\\\"onClickCapture\\\":case\\\"onDoubleClick\\\":case\\\"onDoubleClickCapture\\\":case\\\"onMouseDown\\\":case\\\"onMouseDownCapture\\\":case\\\"onMouseMove\\\":case\\\"onMouseMoveCapture\\\":case\\\"onMouseUp\\\":case\\\"onMouseUpCapture\\\":case\\\"onMouseEnter\\\":(n=!n.disabled)||(t=t.type,n=!(t===\\\"button\\\"||t===\\\"input\\\"||t===\\\"select\\\"||t===\\\"textarea\\\")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!=\\\"function\\\")throw Error(le(231,e,typeof r));return r}var Gh=!(typeof window>\\\"u\\\"||typeof window.document>\\\"u\\\"||typeof window.document.createElement>\\\"u\\\"),vG=!1;if(Gh)try{tE={},Object.defineProperty(tE,\\\"passive\\\",{get:function(){vG=!0}}),window.addEventListener(\\\"test\\\",tE,tE),window.removeEventListener(\\\"test\\\",tE,tE)}catch{vG=!1}var tE,ug=null,uK=null,vP=null;function Bge(){if(vP)return vP;var t,e=uK,r=e.length,n,i=\\\"value\\\"in ug?ug.value:ug.textContent,s=i.length;for(t=0;t<r&&e[t]===i[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===i[s-n];n++);return vP=i.slice(t,1<n?1-n:void 0)}function xP(t){var e=t.keyCode;return\\\"charCode\\\"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function sP(){return!0}function Zme(){return!1}function vc(t){function e(r,n,i,s,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?sP:Zme,this.isPropagationStopped=Zme,this}return $n(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!=\\\"unknown\\\"&&(r.returnValue=!1),this.isDefaultPrevented=sP)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!=\\\"unknown\\\"&&(r.cancelBubble=!0),this.isPropagationStopped=sP)},persist:function(){},isPersistent:sP}),e}var qb={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lO=vc(qb),_S=$n({},qb,{view:0,detail:0}),Dat=vc(_S),BW,MW,B8,uO=$n({},_S,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dK,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return\\\"movementX\\\"in t?t.movementX:(t!==B8&&(B8&&t.type===\\\"mousemove\\\"?(BW=t.screenX-B8.screenX,MW=t.screenY-B8.screenY):MW=BW=0,B8=t),BW)},movementY:function(t){return\\\"movementY\\\"in t?t.movementY:MW}}),Qme=vc(uO),Lat=$n({},uO,{dataTransfer:0}),Uat=vc(Lat),Fat=$n({},_S,{relatedTarget:0}),DW=vc(Fat),jat=$n({},qb,{animationName:0,elapsedTime:0,pseudoElement:0}),Hat=vc(jat),qat=$n({},qb,{clipboardData:function(t){return\\\"clipboardData\\\"in t?t.clipboardData:window.clipboardData}}),zat=vc(qat),$at=$n({},qb,{data:0}),Jme=vc($at),Vat={Esc:\\\"Escape\\\",Spacebar:\\\" \\\",Left:\\\"ArrowLeft\\\",Up:\\\"ArrowUp\\\",Right:\\\"ArrowRight\\\",Down:\\\"ArrowDown\\\",Del:\\\"Delete\\\",Win:\\\"OS\\\",Menu:\\\"ContextMenu\\\",Apps:\\\"ContextMenu\\\",Scroll:\\\"ScrollLock\\\",MozPrintableKey:\\\"Unidentified\\\"},Wat={8:\\\"Backspace\\\",9:\\\"Tab\\\",12:\\\"Clear\\\",13:\\\"Enter\\\",16:\\\"Shift\\\",17:\\\"Control\\\",18:\\\"Alt\\\",19:\\\"Pause\\\",20:\\\"CapsLock\\\",27:\\\"Escape\\\",32:\\\" \\\",33:\\\"PageUp\\\",34:\\\"PageDown\\\",35:\\\"End\\\",36:\\\"Home\\\",37:\\\"ArrowLeft\\\",38:\\\"ArrowUp\\\",39:\\\"ArrowRight\\\",40:\\\"ArrowDown\\\",45:\\\"Insert\\\",46:\\\"Delete\\\",112:\\\"F1\\\",113:\\\"F2\\\",114:\\\"F3\\\",115:\\\"F4\\\",116:\\\"F5\\\",117:\\\"F6\\\",118:\\\"F7\\\",119:\\\"F8\\\",120:\\\"F9\\\",121:\\\"F10\\\",122:\\\"F11\\\",123:\\\"F12\\\",144:\\\"NumLock\\\",145:\\\"ScrollLock\\\",224:\\\"Meta\\\"},Gat={Alt:\\\"altKey\\\",Control:\\\"ctrlKey\\\",Meta:\\\"metaKey\\\",Shift:\\\"shiftKey\\\"};function Kat(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Gat[t])?!!e[t]:!1}function dK(){return Kat}var Zat=$n({},_S,{key:function(t){if(t.key){var e=Vat[t.key]||t.key;if(e!==\\\"Unidentified\\\")return e}return t.type===\\\"keypress\\\"?(t=xP(t),t===13?\\\"Enter\\\":String.fromCharCode(t)):t.type===\\\"keydown\\\"||t.type===\\\"keyup\\\"?Wat[t.keyCode]||\\\"Unidentified\\\":\\\"\\\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dK,charCode:function(t){return t.type===\\\"keypress\\\"?xP(t):0},keyCode:function(t){return t.type===\\\"keydown\\\"||t.type===\\\"keyup\\\"?t.keyCode:0},which:function(t){return t.type===\\\"keypress\\\"?xP(t):t.type===\\\"keydown\\\"||t.type===\\\"keyup\\\"?t.keyCode:0}}),Qat=vc(Zat),Jat=$n({},uO,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yme=vc(Jat),Yat=$n({},_S,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dK}),Xat=vc(Yat),ect=$n({},qb,{propertyName:0,elapsedTime:0,pseudoElement:0}),tct=vc(ect),rct=$n({},uO,{deltaX:function(t){return\\\"deltaX\\\"in t?t.deltaX:\\\"wheelDeltaX\\\"in t?-t.wheelDeltaX:0},deltaY:function(t){return\\\"deltaY\\\"in t?t.deltaY:\\\"wheelDeltaY\\\"in t?-t.wheelDeltaY:\\\"wheelDelta\\\"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),nct=vc(rct),ict=$n({},qb,{newState:0,oldState:0}),sct=vc(ict),oct=[9,13,27,32],fK=Gh&&\\\"CompositionEvent\\\"in window,V8=null;Gh&&\\\"documentMode\\\"in document&&(V8=document.documentMode);var act=Gh&&\\\"TextEvent\\\"in window&&!V8,Mge=Gh&&(!fK||V8&&8<V8&&11>=V8),Xme=\\\" \\\",e0e=!1;function Dge(t,e){switch(t){case\\\"keyup\\\":return oct.indexOf(e.keyCode)!==-1;case\\\"keydown\\\":return e.keyCode!==229;case\\\"keypress\\\":case\\\"mousedown\\\":case\\\"focusout\\\":return!0;default:return!1}}function Lge(t){return t=t.detail,typeof t==\\\"object\\\"&&\\\"data\\\"in t?t.data:null}var uE=!1;function cct(t,e){switch(t){case\\\"compositionend\\\":return Lge(e);case\\\"keypress\\\":return e.which!==32?null:(e0e=!0,Xme);case\\\"textInput\\\":return t=e.data,t===Xme&&e0e?null:t;default:return null}}function lct(t,e){if(uE)return t===\\\"compositionend\\\"||!fK&&Dge(t,e)?(t=Bge(),vP=uK=ug=null,uE=!1,t):null;switch(t){case\\\"paste\\\":return null;case\\\"keypress\\\":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case\\\"compositionend\\\":return Mge&&e.locale!==\\\"ko\\\"?null:e.data;default:return null}}var uct={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 t0e(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e===\\\"input\\\"?!!uct[t.type]:e===\\\"textarea\\\"}function Uge(t,e,r,n){lE?vE?vE.push(n):vE=[n]:lE=n,e=tO(e,\\\"onChange\\\"),0<e.length&&(r=new lO(\\\"onChange\\\",\\\"change\\\",null,r,n),t.push({event:r,listeners:e}))}var W8=null,oS=null;function dct(t){k1e(t,0)}function dO(t){var e=q8(t);if(Ige(e))return t}function r0e(t,e){if(t===\\\"change\\\")return e}var Fge=!1;Gh&&(Gh?(aP=\\\"oninput\\\"in document,aP||(LW=document.createElement(\\\"div\\\"),LW.setAttribute(\\\"oninput\\\",\\\"return;\\\"),aP=typeof LW.oninput==\\\"function\\\"),oP=aP):oP=!1,Fge=oP&&(!document.documentMode||9<document.documentMode));var oP,aP,LW;function n0e(){W8&&(W8.detachEvent(\\\"onpropertychange\\\",jge),oS=W8=null)}function jge(t){if(t.propertyName===\\\"value\\\"&&dO(oS)){var e=[];Uge(e,oS,t,lK(t)),kge(dct,e)}}function fct(t,e,r){t===\\\"focusin\\\"?(n0e(),W8=e,oS=r,W8.attachEvent(\\\"onpropertychange\\\",jge)):t===\\\"focusout\\\"&&n0e()}function pct(t){if(t===\\\"selectionchange\\\"||t===\\\"keyup\\\"||t===\\\"keydown\\\")return dO(oS)}function hct(t,e){if(t===\\\"click\\\")return dO(e)}function mct(t,e){if(t===\\\"input\\\"||t===\\\"change\\\")return dO(e)}function gct(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hl=typeof Object.is==\\\"function\\\"?Object.is:gct;function aS(t,e){if(hl(t,e))return!0;if(typeof t!=\\\"object\\\"||t===null||typeof e!=\\\"object\\\"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!hG.call(e,i)||!hl(t[i],e[i]))return!1}return!0}function i0e(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function s0e(t,e){var r=i0e(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=i0e(r)}}function Hge(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Hge(t,e.parentNode):\\\"contains\\\"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function qge(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=LP(t.document);e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href==\\\"string\\\"}catch{r=!1}if(r)t=e.contentWindow;else break;e=LP(t.document)}return e}function pK(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e===\\\"input\\\"&&(t.type===\\\"text\\\"||t.type===\\\"search\\\"||t.type===\\\"tel\\\"||t.type===\\\"url\\\"||t.type===\\\"password\\\")||e===\\\"textarea\\\"||t.contentEditable===\\\"true\\\")}var yct=Gh&&\\\"documentMode\\\"in document&&11>=document.documentMode,dE=null,xG=null,G8=null,EG=!1;function o0e(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;EG||dE==null||dE!==LP(n)||(n=dE,\\\"selectionStart\\\"in n&&pK(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),G8&&aS(G8,n)||(G8=n,n=tO(xG,\\\"onSelect\\\"),0<n.length&&(e=new lO(\\\"onSelect\\\",\\\"select\\\",null,e,r),t.push({event:e,listeners:n}),e.target=dE)))}function Ab(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r[\\\"Webkit\\\"+t]=\\\"webkit\\\"+e,r[\\\"Moz\\\"+t]=\\\"moz\\\"+e,r}var fE={animationend:Ab(\\\"Animation\\\",\\\"AnimationEnd\\\"),animationiteration:Ab(\\\"Animation\\\",\\\"AnimationIteration\\\"),animationstart:Ab(\\\"Animation\\\",\\\"AnimationStart\\\"),transitionrun:Ab(\\\"Transition\\\",\\\"TransitionRun\\\"),transitionstart:Ab(\\\"Transition\\\",\\\"TransitionStart\\\"),transitioncancel:Ab(\\\"Transition\\\",\\\"TransitionCancel\\\"),transitionend:Ab(\\\"Transition\\\",\\\"TransitionEnd\\\")},UW={},zge={};Gh&&(zge=document.createElement(\\\"div\\\").style,\\\"AnimationEvent\\\"in window||(delete fE.animationend.animation,delete fE.animationiteration.animation,delete fE.animationstart.animation),\\\"TransitionEvent\\\"in window||delete fE.transitionend.transition);function zb(t){if(UW[t])return UW[t];if(!fE[t])return t;var e=fE[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in zge)return UW[t]=e[r];return t}var $ge=zb(\\\"animationend\\\"),Vge=zb(\\\"animationiteration\\\"),Wge=zb(\\\"animationstart\\\"),bct=zb(\\\"transitionrun\\\"),wct=zb(\\\"transitionstart\\\"),vct=zb(\\\"transitioncancel\\\"),Gge=zb(\\\"transitionend\\\"),Kge=new Map,_G=\\\"abort auxClick beforeToggle 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(\\\" \\\");_G.push(\\\"scrollEnd\\\");function Rd(t,e){Kge.set(t,e),Hb(e,[t])}var UP=typeof reportError==\\\"function\\\"?reportError:function(t){if(typeof window==\\\"object\\\"&&typeof window.ErrorEvent==\\\"function\\\"){var e=new window.ErrorEvent(\\\"error\\\",{bubbles:!0,cancelable:!0,message:typeof t==\\\"object\\\"&&t!==null&&typeof t.message==\\\"string\\\"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==\\\"object\\\"&&typeof process.emit==\\\"function\\\"){process.emit(\\\"uncaughtException\\\",t);return}console.error(t)},ou=[],pE=0,hK=0;function fO(){for(var t=pE,e=hK=pE=0;e<t;){var r=ou[e];ou[e++]=null;var n=ou[e];ou[e++]=null;var i=ou[e];ou[e++]=null;var s=ou[e];if(ou[e++]=null,n!==null&&i!==null){var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}s!==0&&Zge(r,i,s)}}function pO(t,e,r,n){ou[pE++]=t,ou[pE++]=e,ou[pE++]=r,ou[pE++]=n,hK|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function mK(t,e,r,n){return pO(t,e,r,n),FP(t)}function $b(t,e){return pO(t,null,null,e),FP(t)}function Zge(t,e,r){t.lanes|=r;var n=t.alternate;n!==null&&(n.lanes|=r);for(var i=!1,s=t.return;s!==null;)s.childLanes|=r,n=s.alternate,n!==null&&(n.childLanes|=r),s.tag===22&&(t=s.stateNode,t===null||t._visibility&1||(i=!0)),t=s,s=s.return;return t.tag===3?(s=t.stateNode,i&&e!==null&&(i=31-fl(r),t=s.hiddenUpdates,n=t[i],n===null?t[i]=[e]:n.push(e),e.lane=r|536870912),s):null}function FP(t){if(50<rS)throw rS=0,$G=null,Error(le(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var hE={};function xct(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cl(t,e,r,n){return new xct(t,e,r,n)}function gK(t){return t=t.prototype,!(!t||!t.isReactComponent)}function $h(t,e){var r=t.alternate;return r===null?(r=cl(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&65011712,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r}function Qge(t,e){t.flags&=65011714;var r=t.alternate;return r===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,e=r.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function EP(t,e,r,n,i,s){var o=0;if(n=t,typeof t==\\\"function\\\")gK(t)&&(o=1);else if(typeof t==\\\"string\\\")o=Clt(t,r,Gf.current)?26:t===\\\"html\\\"||t===\\\"head\\\"||t===\\\"body\\\"?27:5;else e:switch(t){case uG:return t=cl(31,r,e,i),t.elementType=uG,t.lanes=s,t;case oE:return Nb(r.children,i,s,e);case mge:o=8,i|=24;break;case aG:return t=cl(12,r,e,i|2),t.elementType=aG,t.lanes=s,t;case cG:return t=cl(13,r,e,i),t.elementType=cG,t.lanes=s,t;case lG:return t=cl(19,r,e,i),t.elementType=lG,t.lanes=s,t;default:if(typeof t==\\\"object\\\"&&t!==null)switch(t.$$typeof){case Hh:o=10;break e;case gge:o=9;break e;case rK:o=11;break e;case nK:o=14;break e;case ng:o=16,n=null;break e}o=29,r=Error(le(130,t===null?\\\"null\\\":typeof t,\\\"\\\")),n=null}return e=cl(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Nb(t,e,r,n){return t=cl(7,t,n,e),t.lanes=r,t}function FW(t,e,r){return t=cl(6,t,null,e),t.lanes=r,t}function Jge(t){var e=cl(18,null,null,0);return e.stateNode=t,e}function jW(t,e,r){return e=cl(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var a0e=new WeakMap;function du(t,e){if(typeof t==\\\"object\\\"&&t!==null){var r=a0e.get(t);return r!==void 0?r:(e={value:t,source:e,stack:qme(e)},a0e.set(t,e),e)}return{value:t,source:e,stack:qme(e)}}var mE=[],gE=0,jP=null,cS=0,cu=[],lu=0,_g=null,$f=1,Vf=\\\"\\\";function Fh(t,e){mE[gE++]=cS,mE[gE++]=jP,jP=t,cS=e}function Yge(t,e,r){cu[lu++]=$f,cu[lu++]=Vf,cu[lu++]=_g,_g=t;var n=$f;t=Vf;var i=32-fl(n)-1;n&=~(1<<i),r+=1;var s=32-fl(e)+i;if(30<s){var o=i-i%5;s=(n&(1<<o)-1).toString(32),n>>=o,i-=o,$f=1<<32-fl(e)+i|r<<i|n,Vf=s+t}else $f=1<<s|r<<i|n,Vf=t}function yK(t){t.return!==null&&(Fh(t,1),Yge(t,1,0))}function bK(t){for(;t===jP;)jP=mE[--gE],mE[gE]=null,cS=mE[--gE],mE[gE]=null;for(;t===_g;)_g=cu[--lu],cu[lu]=null,Vf=cu[--lu],cu[lu]=null,$f=cu[--lu],cu[lu]=null}function Xge(t,e){cu[lu++]=$f,cu[lu++]=Vf,cu[lu++]=_g,$f=e.id,Vf=e.overflow,_g=t}var Io=null,zn=null,Xt=!1,mg=null,fu=!1,CG=Error(le(519));function Cg(t){var e=Error(le(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?\\\"text\\\":\\\"HTML\\\",\\\"\\\"));throw lS(du(e,t)),CG}function c0e(t){var e=t.stateNode,r=t.type,n=t.memoizedProps;switch(e[To]=t,e[wc]=n,r){case\\\"dialog\\\":Wt(\\\"cancel\\\",e),Wt(\\\"close\\\",e);break;case\\\"iframe\\\":case\\\"object\\\":case\\\"embed\\\":Wt(\\\"load\\\",e);break;case\\\"video\\\":case\\\"audio\\\":for(r=0;r<pS.length;r++)Wt(pS[r],e);break;case\\\"source\\\":Wt(\\\"error\\\",e);break;case\\\"img\\\":case\\\"image\\\":case\\\"link\\\":Wt(\\\"error\\\",e),Wt(\\\"load\\\",e);break;case\\\"details\\\":Wt(\\\"toggle\\\",e);break;case\\\"input\\\":Wt(\\\"invalid\\\",e),Rge(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case\\\"select\\\":Wt(\\\"invalid\\\",e);break;case\\\"textarea\\\":Wt(\\\"invalid\\\",e),Oge(e,n.value,n.defaultValue,n.children)}r=n.children,typeof r!=\\\"string\\\"&&typeof r!=\\\"number\\\"&&typeof r!=\\\"bigint\\\"||e.textContent===\\\"\\\"+r||n.suppressHydrationWarning===!0||M1e(e.textContent,r)?(n.popover!=null&&(Wt(\\\"beforetoggle\\\",e),Wt(\\\"toggle\\\",e)),n.onScroll!=null&&Wt(\\\"scroll\\\",e),n.onScrollEnd!=null&&Wt(\\\"scrollend\\\",e),n.onClick!=null&&(e.onclick=qh),e=!0):e=!1,e||Cg(t,!0)}function l0e(t){for(Io=t.return;Io;)switch(Io.tag){case 5:case 31:case 13:fu=!1;return;case 27:case 3:fu=!0;return;default:Io=Io.return}}function rE(t){if(t!==Io)return!1;if(!Xt)return l0e(t),Xt=!0,!1;var e=t.tag,r;if((r=e!==3&&e!==27)&&((r=e===5)&&(r=t.type,r=!(r!==\\\"form\\\"&&r!==\\\"button\\\")||ZG(t.type,t.memoizedProps)),r=!r),r&&zn&&Cg(t),l0e(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(le(317));zn=J0e(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(le(317));zn=J0e(t)}else e===27?(e=zn,Ig(t.type)?(t=XG,XG=null,zn=t):zn=e):zn=Io?hu(t.stateNode.nextSibling):null;return!0}function Db(){zn=Io=null,Xt=!1}function HW(){var t=mg;return t!==null&&(yc===null?yc=t:yc.push.apply(yc,t),mg=null),t}function lS(t){mg===null?mg=[t]:mg.push(t)}var SG=Kf(null),Vb=null,zh=null;function sg(t,e,r){Sn(SG,e._currentValue),e._currentValue=r}function Vh(t){t._currentValue=SG.current,ro(SG)}function AG(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function TG(t,e,r,n){var i=t.child;for(i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){var o=i.child;s=s.firstContext;e:for(;s!==null;){var a=s;s=i;for(var c=0;c<e.length;c++)if(a.context===e[c]){s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),AG(s.return,r,t),n||(o=null);break e}s=a.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(le(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),AG(o,r,t),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function UE(t,e,r,n){t=null;for(var i=e,s=!1;i!==null;){if(!s){if((i.flags&524288)!==0)s=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(le(387));if(o=o.memoizedProps,o!==null){var a=i.type;hl(i.pendingProps.value,o.value)||(t!==null?t.push(a):t=[a])}}else if(i===kP.current){if(o=i.alternate,o===null)throw Error(le(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(t!==null?t.push(mS):t=[mS])}i=i.return}t!==null&&TG(e,t,r,n),e.flags|=262144}function HP(t){for(t=t.firstContext;t!==null;){if(!hl(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Lb(t){Vb=t,zh=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ro(t){return eye(Vb,t)}function cP(t,e){return Vb===null&&Lb(t),eye(t,e)}function eye(t,e){var r=e._currentValue;if(e={context:e,memoizedValue:r,next:null},zh===null){if(t===null)throw Error(le(308));zh=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else zh=zh.next=e;return r}var Ect=typeof AbortController<\\\"u\\\"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(r,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(r){return r()})}},_ct=Fs.unstable_scheduleCallback,Cct=Fs.unstable_NormalPriority,bs={$$typeof:Hh,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wK(){return{controller:new Ect,data:new Map,refCount:0}}function CS(t){t.refCount--,t.refCount===0&&_ct(Cct,function(){t.controller.abort()})}var K8=null,IG=0,IE=0,xE=null;function Sct(t,e){if(K8===null){var r=K8=[];IG=0,IE=$K(),xE={status:\\\"pending\\\",value:void 0,then:function(n){r.push(n)}}}return IG++,e.then(u0e,u0e),e}function u0e(){if(--IG===0&&K8!==null){xE!==null&&(xE.status=\\\"fulfilled\\\");var t=K8;K8=null,IE=0,xE=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Act(t,e){var r=[],n={status:\\\"pending\\\",value:null,reason:null,then:function(i){r.push(i)}};return t.then(function(){n.status=\\\"fulfilled\\\",n.value=e;for(var i=0;i<r.length;i++)(0,r[i])(e)},function(i){for(n.status=\\\"rejected\\\",n.reason=i,i=0;i<r.length;i++)(0,r[i])(void 0)}),n}var d0e=ct.S;ct.S=function(t,e){h1e=ul(),typeof e==\\\"object\\\"&&e!==null&&typeof e.then==\\\"function\\\"&&Sct(t,e),d0e!==null&&d0e(t,e)};var kb=Kf(null);function vK(){var t=kb.current;return t!==null?t:cn.pooledCache}function _P(t,e){e===null?Sn(kb,kb.current):Sn(kb,e.pool)}function tye(){var t=vK();return t===null?null:{parent:bs._currentValue,pool:t}}var FE=Error(le(460)),xK=Error(le(474)),hO=Error(le(542)),qP={then:function(){}};function f0e(t){return t=t.status,t===\\\"fulfilled\\\"||t===\\\"rejected\\\"}function rye(t,e,r){switch(r=t[r],r===void 0?t.push(e):r!==e&&(e.then(qh,qh),e=r),e.status){case\\\"fulfilled\\\":return e.value;case\\\"rejected\\\":throw t=e.reason,h0e(t),t;default:if(typeof e.status==\\\"string\\\")e.then(qh,qh);else{if(t=cn,t!==null&&100<t.shellSuspendCounter)throw Error(le(482));t=e,t.status=\\\"pending\\\",t.then(function(n){if(e.status===\\\"pending\\\"){var i=e;i.status=\\\"fulfilled\\\",i.value=n}},function(n){if(e.status===\\\"pending\\\"){var i=e;i.status=\\\"rejected\\\",i.reason=n}})}switch(e.status){case\\\"fulfilled\\\":return e.value;case\\\"rejected\\\":throw t=e.reason,h0e(t),t}throw Bb=e,FE}}function Rb(t){try{var e=t._init;return e(t._payload)}catch(r){throw r!==null&&typeof r==\\\"object\\\"&&typeof r.then==\\\"function\\\"?(Bb=r,FE):r}}var Bb=null;function p0e(){if(Bb===null)throw Error(le(459));var t=Bb;return Bb=null,t}function h0e(t){if(t===FE||t===hO)throw Error(le(483))}var EE=null,uS=0;function lP(t){var e=uS;return uS+=1,EE===null&&(EE=[]),rye(EE,t,e)}function M8(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function uP(t,e){throw e.$$typeof===fat?Error(le(525)):(t=Object.prototype.toString.call(e),Error(le(31,t===\\\"[object Object]\\\"?\\\"object with keys {\\\"+Object.keys(e).join(\\\", \\\")+\\\"}\\\":t)))}function nye(t){function e(v,b){if(t){var _=v.deletions;_===null?(v.deletions=[b],v.flags|=16):_.push(b)}}function r(v,b){if(!t)return null;for(;b!==null;)e(v,b),b=b.sibling;return null}function n(v){for(var b=new Map;v!==null;)v.key!==null?b.set(v.key,v):b.set(v.index,v),v=v.sibling;return b}function i(v,b){return v=$h(v,b),v.index=0,v.sibling=null,v}function s(v,b,_){return v.index=_,t?(_=v.alternate,_!==null?(_=_.index,_<b?(v.flags|=67108866,b):_):(v.flags|=67108866,b)):(v.flags|=1048576,b)}function o(v){return t&&v.alternate===null&&(v.flags|=67108866),v}function a(v,b,_,S){return b===null||b.tag!==6?(b=FW(_,v.mode,S),b.return=v,b):(b=i(b,_),b.return=v,b)}function c(v,b,_,S){var T=_.type;return T===oE?d(v,b,_.props.children,S,_.key):b!==null&&(b.elementType===T||typeof T==\\\"object\\\"&&T!==null&&T.$$typeof===ng&&Rb(T)===b.type)?(b=i(b,_.props),M8(b,_),b.return=v,b):(b=EP(_.type,_.key,_.props,null,v.mode,S),M8(b,_),b.return=v,b)}function l(v,b,_,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==_.containerInfo||b.stateNode.implementation!==_.implementation?(b=jW(_,v.mode,S),b.return=v,b):(b=i(b,_.children||[]),b.return=v,b)}function d(v,b,_,S,T){return b===null||b.tag!==7?(b=Nb(_,v.mode,S,T),b.return=v,b):(b=i(b,_),b.return=v,b)}function f(v,b,_){if(typeof b==\\\"string\\\"&&b!==\\\"\\\"||typeof b==\\\"number\\\"||typeof b==\\\"bigint\\\")return b=FW(\\\"\\\"+b,v.mode,_),b.return=v,b;if(typeof b==\\\"object\\\"&&b!==null){switch(b.$$typeof){case eP:return _=EP(b.type,b.key,b.props,null,v.mode,_),M8(_,b),_.return=v,_;case j8:return b=jW(b,v.mode,_),b.return=v,b;case ng:return b=Rb(b),f(v,b,_)}if(H8(b)||k8(b))return b=Nb(b,v.mode,_,null),b.return=v,b;if(typeof b.then==\\\"function\\\")return f(v,lP(b),_);if(b.$$typeof===Hh)return f(v,cP(v,b),_);uP(v,b)}return null}function p(v,b,_,S){var T=b!==null?b.key:null;if(typeof _==\\\"string\\\"&&_!==\\\"\\\"||typeof _==\\\"number\\\"||typeof _==\\\"bigint\\\")return T!==null?null:a(v,b,\\\"\\\"+_,S);if(typeof _==\\\"object\\\"&&_!==null){switch(_.$$typeof){case eP:return _.key===T?c(v,b,_,S):null;case j8:return _.key===T?l(v,b,_,S):null;case ng:return _=Rb(_),p(v,b,_,S)}if(H8(_)||k8(_))return T!==null?null:d(v,b,_,S,null);if(typeof _.then==\\\"function\\\")return p(v,b,lP(_),S);if(_.$$typeof===Hh)return p(v,b,cP(v,_),S);uP(v,_)}return null}function h(v,b,_,S,T){if(typeof S==\\\"string\\\"&&S!==\\\"\\\"||typeof S==\\\"number\\\"||typeof S==\\\"bigint\\\")return v=v.get(_)||null,a(b,v,\\\"\\\"+S,T);if(typeof S==\\\"object\\\"&&S!==null){switch(S.$$typeof){case eP:return v=v.get(S.key===null?_:S.key)||null,c(b,v,S,T);case j8:return v=v.get(S.key===null?_:S.key)||null,l(b,v,S,T);case ng:return S=Rb(S),h(v,b,_,S,T)}if(H8(S)||k8(S))return v=v.get(_)||null,d(b,v,S,T,null);if(typeof S.then==\\\"function\\\")return h(v,b,_,lP(S),T);if(S.$$typeof===Hh)return h(v,b,_,cP(b,S),T);uP(b,S)}return null}function m(v,b,_,S){for(var T=null,N=null,O=b,L=b=0,B=null;O!==null&&L<_.length;L++){O.index>L?(B=O,O=null):B=O.sibling;var H=p(v,O,_[L],S);if(H===null){O===null&&(O=B);break}t&&O&&H.alternate===null&&e(v,O),b=s(H,b,L),N===null?T=H:N.sibling=H,N=H,O=B}if(L===_.length)return r(v,O),Xt&&Fh(v,L),T;if(O===null){for(;L<_.length;L++)O=f(v,_[L],S),O!==null&&(b=s(O,b,L),N===null?T=O:N.sibling=O,N=O);return Xt&&Fh(v,L),T}for(O=n(O);L<_.length;L++)B=h(O,v,L,_[L],S),B!==null&&(t&&B.alternate!==null&&O.delete(B.key===null?L:B.key),b=s(B,b,L),N===null?T=B:N.sibling=B,N=B);return t&&O.forEach(function(M){return e(v,M)}),Xt&&Fh(v,L),T}function g(v,b,_,S){if(_==null)throw Error(le(151));for(var T=null,N=null,O=b,L=b=0,B=null,H=_.next();O!==null&&!H.done;L++,H=_.next()){O.index>L?(B=O,O=null):B=O.sibling;var M=p(v,O,H.value,S);if(M===null){O===null&&(O=B);break}t&&O&&M.alternate===null&&e(v,O),b=s(M,b,L),N===null?T=M:N.sibling=M,N=M,O=B}if(H.done)return r(v,O),Xt&&Fh(v,L),T;if(O===null){for(;!H.done;L++,H=_.next())H=f(v,H.value,S),H!==null&&(b=s(H,b,L),N===null?T=H:N.sibling=H,N=H);return Xt&&Fh(v,L),T}for(O=n(O);!H.done;L++,H=_.next())H=h(O,v,L,H.value,S),H!==null&&(t&&H.alternate!==null&&O.delete(H.key===null?L:H.key),b=s(H,b,L),N===null?T=H:N.sibling=H,N=H);return t&&O.forEach(function(F){return e(v,F)}),Xt&&Fh(v,L),T}function w(v,b,_,S){if(typeof _==\\\"object\\\"&&_!==null&&_.type===oE&&_.key===null&&(_=_.props.children),typeof _==\\\"object\\\"&&_!==null){switch(_.$$typeof){case eP:e:{for(var T=_.key;b!==null;){if(b.key===T){if(T=_.type,T===oE){if(b.tag===7){r(v,b.sibling),S=i(b,_.props.children),S.return=v,v=S;break e}}else if(b.elementType===T||typeof T==\\\"object\\\"&&T!==null&&T.$$typeof===ng&&Rb(T)===b.type){r(v,b.sibling),S=i(b,_.props),M8(S,_),S.return=v,v=S;break e}r(v,b);break}else e(v,b);b=b.sibling}_.type===oE?(S=Nb(_.props.children,v.mode,S,_.key),S.return=v,v=S):(S=EP(_.type,_.key,_.props,null,v.mode,S),M8(S,_),S.return=v,v=S)}return o(v);case j8:e:{for(T=_.key;b!==null;){if(b.key===T)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){r(v,b.sibling),S=i(b,_.children||[]),S.return=v,v=S;break e}else{r(v,b);break}else e(v,b);b=b.sibling}S=jW(_,v.mode,S),S.return=v,v=S}return o(v);case ng:return _=Rb(_),w(v,b,_,S)}if(H8(_))return m(v,b,_,S);if(k8(_)){if(T=k8(_),typeof T!=\\\"function\\\")throw Error(le(150));return _=T.call(_),g(v,b,_,S)}if(typeof _.then==\\\"function\\\")return w(v,b,lP(_),S);if(_.$$typeof===Hh)return w(v,b,cP(v,_),S);uP(v,_)}return typeof _==\\\"string\\\"&&_!==\\\"\\\"||typeof _==\\\"number\\\"||typeof _==\\\"bigint\\\"?(_=\\\"\\\"+_,b!==null&&b.tag===6?(r(v,b.sibling),S=i(b,_),S.return=v,v=S):(r(v,b),S=FW(_,v.mode,S),S.return=v,v=S),o(v)):r(v,b)}return function(v,b,_,S){try{uS=0;var T=w(v,b,_,S);return EE=null,T}catch(O){if(O===FE||O===hO)throw O;var N=cl(29,O,null,v.mode);return N.lanes=S,N.return=v,N}}}var Ub=nye(!0),iye=nye(!1),ig=!1;function EK(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function RG(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function gg(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function yg(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(Mr&2)!==0){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,e=FP(t),Zge(t,null,r),e}return pO(t,n,e,r),FP(t)}function Z8(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Ege(t,r)}}function qW(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=e:s=s.next=e}else i=s=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}var PG=!1;function Q8(){if(PG){var t=xE;if(t!==null)throw t}}function J8(t,e,r,n){PG=!1;var i=t.updateQueue;ig=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?s=l:o.next=l,o=c;var d=t.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=l:a.next=l,d.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;o=0,d=l=c=null,a=s;do{var p=a.lane&-536870913,h=p!==a.lane;if(h?(Qt&p)===p:(n&p)===p){p!==0&&p===IE&&(PG=!0),d!==null&&(d=d.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var m=t,g=a;p=e;var w=r;switch(g.tag){case 1:if(m=g.payload,typeof m==\\\"function\\\"){f=m.call(w,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,p=typeof m==\\\"function\\\"?m.call(w,f,p):m,p==null)break e;f=$n({},f,p);break e;case 2:ig=!0}}p=a.callback,p!==null&&(t.flags|=64,h&&(t.flags|=8192),h=i.callbacks,h===null?i.callbacks=[p]:h.push(p))}else h={lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(l=d=h,c=f):d=d.next=h,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=d,s===null&&(i.shared.lanes=0),Ag|=o,t.lanes=o,t.memoizedState=f}}function sye(t,e){if(typeof t!=\\\"function\\\")throw Error(le(191,t));t.call(e)}function oye(t,e){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)sye(r[t],e)}var RE=Kf(null),zP=Kf(0);function m0e(t,e){t=Jh,Sn(zP,t),Sn(RE,e),Jh=t|e.baseLanes}function OG(){Sn(zP,Jh),Sn(RE,RE.current)}function _K(){Jh=zP.current,ro(RE),ro(zP)}var ml=Kf(null),pu=null;function og(t){var e=t.alternate;Sn(ss,ss.current&1),Sn(ml,t),pu===null&&(e===null||RE.current!==null||e.memoizedState!==null)&&(pu=t)}function NG(t){Sn(ss,ss.current),Sn(ml,t),pu===null&&(pu=t)}function aye(t){t.tag===22?(Sn(ss,ss.current),Sn(ml,t),pu===null&&(pu=t)):ag(t)}function ag(){Sn(ss,ss.current),Sn(ml,ml.current)}function al(t){ro(ml),pu===t&&(pu=null),ro(ss)}var ss=Kf(0);function $P(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||JG(r)||YG(r)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder===\\\"forwards\\\"||e.memoizedProps.revealOrder===\\\"backwards\\\"||e.memoizedProps.revealOrder===\\\"unstable_legacy-backwards\\\"||e.memoizedProps.revealOrder===\\\"together\\\")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Kh=0,St=null,Xr=null,gs=null,VP=!1,_E=!1,Fb=!1,WP=0,dS=0,CE=null,Tct=0;function Wi(){throw Error(le(321))}function CK(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!hl(t[r],e[r]))return!1;return!0}function SK(t,e,r,n,i,s){return Kh=s,St=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ct.H=t===null||t.memoizedState===null?Uye:DK,Fb=!1,s=r(n,i),Fb=!1,_E&&(s=lye(e,r,n,i)),cye(t),s}function cye(t){ct.H=fS;var e=Xr!==null&&Xr.next!==null;if(Kh=0,gs=Xr=St=null,VP=!1,dS=0,CE=null,e)throw Error(le(300));t===null||ws||(t=t.dependencies,t!==null&&HP(t)&&(ws=!0))}function lye(t,e,r,n){St=t;var i=0;do{if(_E&&(CE=null),dS=0,_E=!1,25<=i)throw Error(le(301));if(i+=1,gs=Xr=null,t.updateQueue!=null){var s=t.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}ct.H=Fye,s=e(r,n)}while(_E);return s}function Ict(){var t=ct.H,e=t.useState()[0];return e=typeof e.then==\\\"function\\\"?SS(e):e,t=t.useState()[0],(Xr!==null?Xr.memoizedState:null)!==t&&(St.flags|=1024),e}function AK(){var t=WP!==0;return WP=0,t}function TK(t,e,r){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r}function IK(t){if(VP){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}VP=!1}Kh=0,gs=Xr=St=null,_E=!1,dS=WP=0,CE=null}function Ma(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gs===null?St.memoizedState=gs=t:gs=gs.next=t,gs}function os(){if(Xr===null){var t=St.alternate;t=t!==null?t.memoizedState:null}else t=Xr.next;var e=gs===null?St.memoizedState:gs.next;if(e!==null)gs=e,Xr=t;else{if(t===null)throw St.alternate===null?Error(le(467)):Error(le(310));Xr=t,t={memoizedState:Xr.memoizedState,baseState:Xr.baseState,baseQueue:Xr.baseQueue,queue:Xr.queue,next:null},gs===null?St.memoizedState=gs=t:gs=gs.next=t}return gs}function mO(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function SS(t){var e=dS;return dS+=1,CE===null&&(CE=[]),t=rye(CE,t,e),e=St,(gs===null?e.memoizedState:gs.next)===null&&(e=e.alternate,ct.H=e===null||e.memoizedState===null?Uye:DK),t}function gO(t){if(t!==null&&typeof t==\\\"object\\\"){if(typeof t.then==\\\"function\\\")return SS(t);if(t.$$typeof===Hh)return Ro(t)}throw Error(le(438,String(t)))}function RK(t){var e=null,r=St.updateQueue;if(r!==null&&(e=r.memoCache),e==null){var n=St.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(i){return i.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),r===null&&(r=mO(),St.updateQueue=r),r.memoCache=e,r=e.data[e.index],r===void 0)for(r=e.data[e.index]=Array(t),n=0;n<t;n++)r[n]=pat;return e.index++,r}function Zh(t,e){return typeof e==\\\"function\\\"?e(t):e}function CP(t){var e=os();return PK(e,Xr,t)}function PK(t,e,r){var n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=r;var i=t.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}e.baseQueue=i=s,n.pending=null}if(s=t.baseState,i===null)t.memoizedState=s;else{e=i.next;var a=o=null,c=null,l=e,d=!1;do{var f=l.lane&-536870913;if(f!==l.lane?(Qt&f)===f:(Kh&f)===f){var p=l.revertLane;if(p===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),f===IE&&(d=!0);else if((Kh&p)===p){l=l.next,p===IE&&(d=!0);continue}else f={lane:0,revertLane:l.revertLane,gesture:null,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},c===null?(a=c=f,o=s):c=c.next=f,St.lanes|=p,Ag|=p;f=l.action,Fb&&r(s,f),s=l.hasEagerState?l.eagerState:r(s,f)}else p={lane:f,revertLane:l.revertLane,gesture:l.gesture,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},c===null?(a=c=p,o=s):c=c.next=p,St.lanes|=f,Ag|=f;l=l.next}while(l!==null&&l!==e);if(c===null?o=s:c.next=a,!hl(s,t.memoizedState)&&(ws=!0,d&&(r=xE,r!==null)))throw r;t.memoizedState=s,t.baseState=o,t.baseQueue=c,n.lastRenderedState=s}return i===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function zW(t){var e=os(),r=e.queue;if(r===null)throw Error(le(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,s=e.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);hl(s,e.memoizedState)||(ws=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),r.lastRenderedState=s}return[s,n]}function uye(t,e,r){var n=St,i=os(),s=Xt;if(s){if(r===void 0)throw Error(le(407));r=r()}else r=e();var o=!hl((Xr||i).memoizedState,r);if(o&&(i.memoizedState=r,ws=!0),i=i.queue,OK(pye.bind(null,n,i,t),[t]),i.getSnapshot!==e||o||gs!==null&&gs.memoizedState.tag&1){if(n.flags|=2048,PE(9,{destroy:void 0},fye.bind(null,n,i,r,e),null),cn===null)throw Error(le(349));s||(Kh&127)!==0||dye(n,e,r)}return r}function dye(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=St.updateQueue,e===null?(e=mO(),St.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function fye(t,e,r,n){e.value=r,e.getSnapshot=n,hye(e)&&mye(t)}function pye(t,e,r){return r(function(){hye(e)&&mye(t)})}function hye(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!hl(t,r)}catch{return!0}}function mye(t){var e=$b(t,2);e!==null&&bc(e,t,2)}function kG(t){var e=Ma();if(typeof t==\\\"function\\\"){var r=t;if(t=r(),Fb){lg(!0);try{r()}finally{lg(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zh,lastRenderedState:t},e}function gye(t,e,r,n){return t.baseState=r,PK(t,Xr,typeof n==\\\"function\\\"?n:Zh)}function Rct(t,e,r,n,i){if(bO(t))throw Error(le(485));if(t=e.action,t!==null){var s={payload:i,action:t,next:null,isTransition:!0,status:\\\"pending\\\",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};ct.T!==null?r(!0):s.isTransition=!1,n(s),r=e.pending,r===null?(s.next=e.pending=s,yye(e,s)):(s.next=r.next,e.pending=r.next=s)}}function yye(t,e){var r=e.action,n=e.payload,i=t.state;if(e.isTransition){var s=ct.T,o={};ct.T=o;try{var a=r(i,n),c=ct.S;c!==null&&c(o,a),g0e(t,e,a)}catch(l){BG(t,e,l)}finally{s!==null&&o.types!==null&&(s.types=o.types),ct.T=s}}else try{s=r(i,n),g0e(t,e,s)}catch(l){BG(t,e,l)}}function g0e(t,e,r){r!==null&&typeof r==\\\"object\\\"&&typeof r.then==\\\"function\\\"?r.then(function(n){y0e(t,e,n)},function(n){return BG(t,e,n)}):y0e(t,e,r)}function y0e(t,e,r){e.status=\\\"fulfilled\\\",e.value=r,bye(e),t.state=r,e=t.pending,e!==null&&(r=e.next,r===e?t.pending=null:(r=r.next,e.next=r,yye(t,r)))}function BG(t,e,r){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status=\\\"rejected\\\",e.reason=r,bye(e),e=e.next;while(e!==n)}t.action=null}function bye(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function wye(t,e){return e}function b0e(t,e){if(Xt){var r=cn.formState;if(r!==null){e:{var n=St;if(Xt){if(zn){t:{for(var i=zn,s=fu;i.nodeType!==8;){if(!s){i=null;break t}if(i=hu(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s===\\\"F!\\\"||s===\\\"F\\\"?i:null}if(i){zn=hu(i.nextSibling),n=i.data===\\\"F!\\\";break e}}Cg(n)}n=!1}n&&(e=r[0])}}return r=Ma(),r.memoizedState=r.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wye,lastRenderedState:e},r.queue=n,r=Mye.bind(null,St,n),n.dispatch=r,n=kG(!1),s=MK.bind(null,St,!1,n.queue),n=Ma(),i={state:e,dispatch:null,action:t,pending:null},n.queue=i,r=Rct.bind(null,St,i,s,r),i.dispatch=r,n.memoizedState=t,[e,r,!1]}function w0e(t){var e=os();return vye(e,Xr,t)}function vye(t,e,r){if(e=PK(t,e,wye)[0],t=CP(Zh)[0],typeof e==\\\"object\\\"&&e!==null&&typeof e.then==\\\"function\\\")try{var n=SS(e)}catch(o){throw o===FE?hO:o}else n=e;e=os();var i=e.queue,s=i.dispatch;return r!==e.memoizedState&&(St.flags|=2048,PE(9,{destroy:void 0},Pct.bind(null,i,r),null)),[n,s,t]}function Pct(t,e){t.action=e}function v0e(t){var e=os(),r=Xr;if(r!==null)return vye(e,r,t);os(),e=e.memoizedState,r=os();var n=r.queue.dispatch;return r.memoizedState=t,[e,n,!1]}function PE(t,e,r,n){return t={tag:t,create:r,deps:n,inst:e,next:null},e=St.updateQueue,e===null&&(e=mO(),St.updateQueue=e),r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t),t}function xye(){return os().memoizedState}function SP(t,e,r,n){var i=Ma();St.flags|=t,i.memoizedState=PE(1|e,{destroy:void 0},r,n===void 0?null:n)}function yO(t,e,r,n){var i=os();n=n===void 0?null:n;var s=i.memoizedState.inst;Xr!==null&&n!==null&&CK(n,Xr.memoizedState.deps)?i.memoizedState=PE(e,s,r,n):(St.flags|=t,i.memoizedState=PE(1|e,s,r,n))}function x0e(t,e){SP(8390656,8,t,e)}function OK(t,e){yO(2048,8,t,e)}function Oct(t){St.flags|=4;var e=St.updateQueue;if(e===null)e=mO(),St.updateQueue=e,e.events=[t];else{var r=e.events;r===null?e.events=[t]:r.push(t)}}function Eye(t){var e=os().memoizedState;return Oct({ref:e,nextImpl:t}),function(){if((Mr&2)!==0)throw Error(le(440));return e.impl.apply(void 0,arguments)}}function _ye(t,e){return yO(4,2,t,e)}function Cye(t,e){return yO(4,4,t,e)}function Sye(t,e){if(typeof e==\\\"function\\\"){t=t();var r=e(t);return function(){typeof r==\\\"function\\\"?r():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Aye(t,e,r){r=r!=null?r.concat([t]):null,yO(4,4,Sye.bind(null,e,t),r)}function NK(){}function Tye(t,e){var r=os();e=e===void 0?null:e;var n=r.memoizedState;return e!==null&&CK(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function Iye(t,e){var r=os();e=e===void 0?null:e;var n=r.memoizedState;if(e!==null&&CK(e,n[1]))return n[0];if(n=t(),Fb){lg(!0);try{t()}finally{lg(!1)}}return r.memoizedState=[n,e],n}function kK(t,e,r){return r===void 0||(Kh&1073741824)!==0&&(Qt&261930)===0?t.memoizedState=e:(t.memoizedState=r,t=g1e(),St.lanes|=t,Ag|=t,r)}function Rye(t,e,r,n){return hl(r,e)?r:RE.current!==null?(t=kK(t,r,n),hl(t,e)||(ws=!0),t):(Kh&42)===0||(Kh&1073741824)!==0&&(Qt&261930)===0?(ws=!0,t.memoizedState=r):(t=g1e(),St.lanes|=t,Ag|=t,e)}function Pye(t,e,r,n,i){var s=Dr.p;Dr.p=s!==0&&8>s?s:8;var o=ct.T,a={};ct.T=a,MK(t,!1,e,r);try{var c=i(),l=ct.S;if(l!==null&&l(a,c),c!==null&&typeof c==\\\"object\\\"&&typeof c.then==\\\"function\\\"){var d=Act(c,n);Y8(t,e,d,pl(t))}else Y8(t,e,n,pl(t))}catch(f){Y8(t,e,{then:function(){},status:\\\"rejected\\\",reason:f},pl())}finally{Dr.p=s,o!==null&&a.types!==null&&(o.types=a.types),ct.T=o}}function Nct(){}function MG(t,e,r,n){if(t.tag!==5)throw Error(le(476));var i=Oye(t).queue;Pye(t,i,e,Ob,r===null?Nct:function(){return Nye(t),r(n)})}function Oye(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Ob,baseState:Ob,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zh,lastRenderedState:Ob},next:null};var r={};return e.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zh,lastRenderedState:r},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Nye(t){var e=Oye(t);e.next===null&&(e=t.alternate.memoizedState),Y8(t,e.next.queue,{},pl())}function BK(){return Ro(mS)}function kye(){return os().memoizedState}function Bye(){return os().memoizedState}function kct(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var r=pl();t=gg(r);var n=yg(e,t,r);n!==null&&(bc(n,e,r),Z8(n,e,r)),e={cache:wK()},t.payload=e;return}e=e.return}}function Bct(t,e,r){var n=pl();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},bO(t)?Dye(e,r):(r=mK(t,e,r,n),r!==null&&(bc(r,t,n),Lye(r,e,n)))}function Mye(t,e,r){var n=pl();Y8(t,e,r,n)}function Y8(t,e,r,n){var i={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(bO(t))Dye(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,hl(a,o))return pO(t,e,i,0),cn===null&&fO(),!1}catch{}if(r=mK(t,e,i,n),r!==null)return bc(r,t,n),Lye(r,e,n),!0}return!1}function MK(t,e,r,n){if(n={lane:2,revertLane:$K(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},bO(t)){if(e)throw Error(le(479))}else e=mK(t,r,n,2),e!==null&&bc(e,t,2)}function bO(t){var e=t.alternate;return t===St||e!==null&&e===St}function Dye(t,e){_E=VP=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function Lye(t,e,r){if((r&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Ege(t,r)}}var fS={readContext:Ro,use:gO,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useLayoutEffect:Wi,useInsertionEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useDeferredValue:Wi,useTransition:Wi,useSyncExternalStore:Wi,useId:Wi,useHostTransitionStatus:Wi,useFormState:Wi,useActionState:Wi,useOptimistic:Wi,useMemoCache:Wi,useCacheRefresh:Wi};fS.useEffectEvent=Wi;var Uye={readContext:Ro,use:gO,useCallback:function(t,e){return Ma().memoizedState=[t,e===void 0?null:e],t},useContext:Ro,useEffect:x0e,useImperativeHandle:function(t,e,r){r=r!=null?r.concat([t]):null,SP(4194308,4,Sye.bind(null,e,t),r)},useLayoutEffect:function(t,e){return SP(4194308,4,t,e)},useInsertionEffect:function(t,e){SP(4,2,t,e)},useMemo:function(t,e){var r=Ma();e=e===void 0?null:e;var n=t();if(Fb){lg(!0);try{t()}finally{lg(!1)}}return r.memoizedState=[n,e],n},useReducer:function(t,e,r){var n=Ma();if(r!==void 0){var i=r(e);if(Fb){lg(!0);try{r(e)}finally{lg(!1)}}}else i=e;return n.memoizedState=n.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},n.queue=t,t=t.dispatch=Bct.bind(null,St,t),[n.memoizedState,t]},useRef:function(t){var e=Ma();return t={current:t},e.memoizedState=t},useState:function(t){t=kG(t);var e=t.queue,r=Mye.bind(null,St,e);return e.dispatch=r,[t.memoizedState,r]},useDebugValue:NK,useDeferredValue:function(t,e){var r=Ma();return kK(r,t,e)},useTransition:function(){var t=kG(!1);return t=Pye.bind(null,St,t.queue,!0,!1),Ma().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,r){var n=St,i=Ma();if(Xt){if(r===void 0)throw Error(le(407));r=r()}else{if(r=e(),cn===null)throw Error(le(349));(Qt&127)!==0||dye(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,x0e(pye.bind(null,n,s,t),[t]),n.flags|=2048,PE(9,{destroy:void 0},fye.bind(null,n,s,r,e),null),r},useId:function(){var t=Ma(),e=cn.identifierPrefix;if(Xt){var r=Vf,n=$f;r=(n&~(1<<32-fl(n)-1)).toString(32)+r,e=\\\"_\\\"+e+\\\"R_\\\"+r,r=WP++,0<r&&(e+=\\\"H\\\"+r.toString(32)),e+=\\\"_\\\"}else r=Tct++,e=\\\"_\\\"+e+\\\"r_\\\"+r.toString(32)+\\\"_\\\";return t.memoizedState=e},useHostTransitionStatus:BK,useFormState:b0e,useActionState:b0e,useOptimistic:function(t){var e=Ma();e.memoizedState=e.baseState=t;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=r,e=MK.bind(null,St,!0,r),r.dispatch=e,[t,e]},useMemoCache:RK,useCacheRefresh:function(){return Ma().memoizedState=kct.bind(null,St)},useEffectEvent:function(t){var e=Ma(),r={impl:t};return e.memoizedState=r,function(){if((Mr&2)!==0)throw Error(le(440));return r.impl.apply(void 0,arguments)}}},DK={readContext:Ro,use:gO,useCallback:Tye,useContext:Ro,useEffect:OK,useImperativeHandle:Aye,useInsertionEffect:_ye,useLayoutEffect:Cye,useMemo:Iye,useReducer:CP,useRef:xye,useState:function(){return CP(Zh)},useDebugValue:NK,useDeferredValue:function(t,e){var r=os();return Rye(r,Xr.memoizedState,t,e)},useTransition:function(){var t=CP(Zh)[0],e=os().memoizedState;return[typeof t==\\\"boolean\\\"?t:SS(t),e]},useSyncExternalStore:uye,useId:kye,useHostTransitionStatus:BK,useFormState:w0e,useActionState:w0e,useOptimistic:function(t,e){var r=os();return gye(r,Xr,t,e)},useMemoCache:RK,useCacheRefresh:Bye};DK.useEffectEvent=Eye;var Fye={readContext:Ro,use:gO,useCallback:Tye,useContext:Ro,useEffect:OK,useImperativeHandle:Aye,useInsertionEffect:_ye,useLayoutEffect:Cye,useMemo:Iye,useReducer:zW,useRef:xye,useState:function(){return zW(Zh)},useDebugValue:NK,useDeferredValue:function(t,e){var r=os();return Xr===null?kK(r,t,e):Rye(r,Xr.memoizedState,t,e)},useTransition:function(){var t=zW(Zh)[0],e=os().memoizedState;return[typeof t==\\\"boolean\\\"?t:SS(t),e]},useSyncExternalStore:uye,useId:kye,useHostTransitionStatus:BK,useFormState:v0e,useActionState:v0e,useOptimistic:function(t,e){var r=os();return Xr!==null?gye(r,Xr,t,e):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:RK,useCacheRefresh:Bye};Fye.useEffectEvent=Eye;function $W(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:$n({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var DG={enqueueSetState:function(t,e,r){t=t._reactInternals;var n=pl(),i=gg(n);i.payload=e,r!=null&&(i.callback=r),e=yg(t,i,n),e!==null&&(bc(e,t,n),Z8(e,t,n))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=pl(),i=gg(n);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=yg(t,i,n),e!==null&&(bc(e,t,n),Z8(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=pl(),n=gg(r);n.tag=2,e!=null&&(n.callback=e),e=yg(t,n,r),e!==null&&(bc(e,t,r),Z8(e,t,r))}};function E0e(t,e,r,n,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate==\\\"function\\\"?t.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!aS(r,n)||!aS(i,s):!0}function _0e(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps==\\\"function\\\"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps==\\\"function\\\"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&DG.enqueueReplaceState(e,e.state,null)}function jb(t,e){var r=e;if(\\\"ref\\\"in e){r={};for(var n in e)n!==\\\"ref\\\"&&(r[n]=e[n])}if(t=t.defaultProps){r===e&&(r=$n({},r));for(var i in t)r[i]===void 0&&(r[i]=t[i])}return r}function jye(t){UP(t)}function Hye(t){console.error(t)}function qye(t){UP(t)}function GP(t,e){try{var r=t.onUncaughtError;r(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function C0e(t,e,r){try{var n=t.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function LG(t,e,r){return r=gg(r),r.tag=3,r.payload={element:null},r.callback=function(){GP(t,e)},r}function zye(t){return t=gg(t),t.tag=3,t}function $ye(t,e,r,n){var i=r.type.getDerivedStateFromError;if(typeof i==\\\"function\\\"){var s=n.value;t.payload=function(){return i(s)},t.callback=function(){C0e(e,r,n)}}var o=r.stateNode;o!==null&&typeof o.componentDidCatch==\\\"function\\\"&&(t.callback=function(){C0e(e,r,n),typeof i!=\\\"function\\\"&&(bg===null?bg=new Set([this]):bg.add(this));var a=n.stack;this.componentDidCatch(n.value,{componentStack:a!==null?a:\\\"\\\"})})}function Mct(t,e,r,n,i){if(r.flags|=32768,n!==null&&typeof n==\\\"object\\\"&&typeof n.then==\\\"function\\\"){if(e=r.alternate,e!==null&&UE(e,r,i,!0),r=ml.current,r!==null){switch(r.tag){case 31:case 13:return pu===null?YP():r.alternate===null&&Gi===0&&(Gi=3),r.flags&=-257,r.flags|=65536,r.lanes=i,n===qP?r.flags|=16384:(e=r.updateQueue,e===null?r.updateQueue=new Set([n]):e.add(n),tG(t,n,i)),!1;case 22:return r.flags|=65536,n===qP?r.flags|=16384:(e=r.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=e):(r=e.retryQueue,r===null?e.retryQueue=new Set([n]):r.add(n)),tG(t,n,i)),!1}throw Error(le(435,r.tag))}return tG(t,n,i),YP(),!1}if(Xt)return e=ml.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=i,n!==CG&&(t=Error(le(422),{cause:n}),lS(du(t,r)))):(n!==CG&&(e=Error(le(423),{cause:n}),lS(du(e,r))),t=t.current.alternate,t.flags|=65536,i&=-i,t.lanes|=i,n=du(n,r),i=LG(t.stateNode,n,i),qW(t,i),Gi!==4&&(Gi=2)),!1;var s=Error(le(520),{cause:n});if(s=du(s,r),tS===null?tS=[s]:tS.push(s),Gi!==4&&(Gi=2),e===null)return!0;n=du(n,r),r=e;do{switch(r.tag){case 3:return r.flags|=65536,t=i&-i,r.lanes|=t,t=LG(r.stateNode,n,t),qW(r,t),!1;case 1:if(e=r.type,s=r.stateNode,(r.flags&128)===0&&(typeof e.getDerivedStateFromError==\\\"function\\\"||s!==null&&typeof s.componentDidCatch==\\\"function\\\"&&(bg===null||!bg.has(s))))return r.flags|=65536,i&=-i,r.lanes|=i,i=zye(i),$ye(i,t,r,n),qW(r,i),!1}r=r.return}while(r!==null);return!1}var LK=Error(le(461)),ws=!1;function Ao(t,e,r,n){e.child=t===null?iye(e,null,r,n):Ub(e,t.child,r,n)}function S0e(t,e,r,n,i){r=r.render;var s=e.ref;if(\\\"ref\\\"in n){var o={};for(var a in n)a!==\\\"ref\\\"&&(o[a]=n[a])}else o=n;return Lb(e),n=SK(t,e,r,o,s,i),a=AK(),t!==null&&!ws?(TK(t,e,i),Qh(t,e,i)):(Xt&&a&&yK(e),e.flags|=1,Ao(t,e,n,i),e.child)}function A0e(t,e,r,n,i){if(t===null){var s=r.type;return typeof s==\\\"function\\\"&&!gK(s)&&s.defaultProps===void 0&&r.compare===null?(e.tag=15,e.type=s,Vye(t,e,s,n,i)):(t=EP(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!UK(t,i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:aS,r(o,n)&&t.ref===e.ref)return Qh(t,e,i)}return e.flags|=1,t=$h(s,n),t.ref=e.ref,t.return=e,e.child=t}function Vye(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(aS(s,n)&&t.ref===e.ref)if(ws=!1,e.pendingProps=n=s,UK(t,i))(t.flags&131072)!==0&&(ws=!0);else return e.lanes=t.lanes,Qh(t,e,i)}return UG(t,e,r,n,i)}function Wye(t,e,r,n){var i=n.children,s=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode===\\\"hidden\\\"){if((e.flags&128)!==0){if(s=s!==null?s.baseLanes|r:r,t!==null){for(n=e.child=t.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~s}else n=0,e.child=null;return T0e(t,e,s,r,n)}if((r&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&_P(e,s!==null?s.cachePool:null),s!==null?m0e(e,s):OG(),aye(e);else return n=e.lanes=536870912,T0e(t,e,s!==null?s.baseLanes|r:r,r,n)}else s!==null?(_P(e,s.cachePool),m0e(e,s),ag(e),e.memoizedState=null):(t!==null&&_P(e,null),OG(),ag(e));return Ao(t,e,i,r),e.child}function z8(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function T0e(t,e,r,n,i){var s=vK();return s=s===null?null:{parent:bs._currentValue,pool:s},e.memoizedState={baseLanes:r,cachePool:s},t!==null&&_P(e,null),OG(),aye(e),t!==null&&UE(t,e,n,!0),e.childLanes=i,null}function AP(t,e){return e=KP({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function I0e(t,e,r){return Ub(e,t.child,null,r),t=AP(e,e.pendingProps),t.flags|=2,al(e),e.memoizedState=null,t}function Dct(t,e,r){var n=e.pendingProps,i=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Xt){if(n.mode===\\\"hidden\\\")return t=AP(e,n),e.lanes=536870912,z8(null,t);if(NG(e),(t=zn)?(t=U1e(t,fu),t=t!==null&&t.data===\\\"&\\\"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_g!==null?{id:$f,overflow:Vf}:null,retryLane:536870912,hydrationErrors:null},r=Jge(t),r.return=e,e.child=r,Io=e,zn=null)):t=null,t===null)throw Cg(e);return e.lanes=536870912,null}return AP(e,n)}var s=t.memoizedState;if(s!==null){var o=s.dehydrated;if(NG(e),i)if(e.flags&256)e.flags&=-257,e=I0e(t,e,r);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(le(558));else if(ws||UE(t,e,r,!1),i=(r&t.childLanes)!==0,ws||i){if(n=cn,n!==null&&(o=_ge(n,r),o!==0&&o!==s.retryLane))throw s.retryLane=o,$b(t,o),bc(n,t,o),LK;YP(),e=I0e(t,e,r)}else t=s.treeContext,zn=hu(o.nextSibling),Io=e,Xt=!0,mg=null,fu=!1,t!==null&&Xge(e,t),e=AP(e,n),e.flags|=4096;return e}return t=$h(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function TP(t,e){var r=e.ref;if(r===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof r!=\\\"function\\\"&&typeof r!=\\\"object\\\")throw Error(le(284));(t===null||t.ref!==r)&&(e.flags|=4194816)}}function UG(t,e,r,n,i){return Lb(e),r=SK(t,e,r,n,void 0,i),n=AK(),t!==null&&!ws?(TK(t,e,i),Qh(t,e,i)):(Xt&&n&&yK(e),e.flags|=1,Ao(t,e,r,i),e.child)}function R0e(t,e,r,n,i,s){return Lb(e),e.updateQueue=null,r=lye(e,n,r,i),cye(t),n=AK(),t!==null&&!ws?(TK(t,e,s),Qh(t,e,s)):(Xt&&n&&yK(e),e.flags|=1,Ao(t,e,r,s),e.child)}function P0e(t,e,r,n,i){if(Lb(e),e.stateNode===null){var s=hE,o=r.contextType;typeof o==\\\"object\\\"&&o!==null&&(s=Ro(o)),s=new r(n,s),e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=DG,e.stateNode=s,s._reactInternals=e,s=e.stateNode,s.props=n,s.state=e.memoizedState,s.refs={},EK(e),o=r.contextType,s.context=typeof o==\\\"object\\\"&&o!==null?Ro(o):hE,s.state=e.memoizedState,o=r.getDerivedStateFromProps,typeof o==\\\"function\\\"&&($W(e,r,o,n),s.state=e.memoizedState),typeof r.getDerivedStateFromProps==\\\"function\\\"||typeof s.getSnapshotBeforeUpdate==\\\"function\\\"||typeof s.UNSAFE_componentWillMount!=\\\"function\\\"&&typeof s.componentWillMount!=\\\"function\\\"||(o=s.state,typeof s.componentWillMount==\\\"function\\\"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount==\\\"function\\\"&&s.UNSAFE_componentWillMount(),o!==s.state&&DG.enqueueReplaceState(s,s.state,null),J8(e,n,s,i),Q8(),s.state=e.memoizedState),typeof s.componentDidMount==\\\"function\\\"&&(e.flags|=4194308),n=!0}else if(t===null){s=e.stateNode;var a=e.memoizedProps,c=jb(r,a);s.props=c;var l=s.context,d=r.contextType;o=hE,typeof d==\\\"object\\\"&&d!==null&&(o=Ro(d));var f=r.getDerivedStateFromProps;d=typeof f==\\\"function\\\"||typeof s.getSnapshotBeforeUpdate==\\\"function\\\",a=e.pendingProps!==a,d||typeof s.UNSAFE_componentWillReceiveProps!=\\\"function\\\"&&typeof s.componentWillReceiveProps!=\\\"function\\\"||(a||l!==o)&&_0e(e,s,n,o),ig=!1;var p=e.memoizedState;s.state=p,J8(e,n,s,i),Q8(),l=e.memoizedState,a||p!==l||ig?(typeof f==\\\"function\\\"&&($W(e,r,f,n),l=e.memoizedState),(c=ig||E0e(e,r,c,n,p,l,o))?(d||typeof s.UNSAFE_componentWillMount!=\\\"function\\\"&&typeof s.componentWillMount!=\\\"function\\\"||(typeof s.componentWillMount==\\\"function\\\"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount==\\\"function\\\"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount==\\\"function\\\"&&(e.flags|=4194308)):(typeof s.componentDidMount==\\\"function\\\"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),s.props=n,s.state=l,s.context=o,n=c):(typeof s.componentDidMount==\\\"function\\\"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,RG(t,e),o=e.memoizedProps,d=jb(r,o),s.props=d,f=e.pendingProps,p=s.context,l=r.contextType,c=hE,typeof l==\\\"object\\\"&&l!==null&&(c=Ro(l)),a=r.getDerivedStateFromProps,(l=typeof a==\\\"function\\\"||typeof s.getSnapshotBeforeUpdate==\\\"function\\\")||typeof s.UNSAFE_componentWillReceiveProps!=\\\"function\\\"&&typeof s.componentWillReceiveProps!=\\\"function\\\"||(o!==f||p!==c)&&_0e(e,s,n,c),ig=!1,p=e.memoizedState,s.state=p,J8(e,n,s,i),Q8();var h=e.memoizedState;o!==f||p!==h||ig||t!==null&&t.dependencies!==null&&HP(t.dependencies)?(typeof a==\\\"function\\\"&&($W(e,r,a,n),h=e.memoizedState),(d=ig||E0e(e,r,d,n,p,h,c)||t!==null&&t.dependencies!==null&&HP(t.dependencies))?(l||typeof s.UNSAFE_componentWillUpdate!=\\\"function\\\"&&typeof s.componentWillUpdate!=\\\"function\\\"||(typeof s.componentWillUpdate==\\\"function\\\"&&s.componentWillUpdate(n,h,c),typeof s.UNSAFE_componentWillUpdate==\\\"function\\\"&&s.UNSAFE_componentWillUpdate(n,h,c)),typeof s.componentDidUpdate==\\\"function\\\"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate==\\\"function\\\"&&(e.flags|=1024)):(typeof s.componentDidUpdate!=\\\"function\\\"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!=\\\"function\\\"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=h),s.props=n,s.state=h,s.context=c,n=d):(typeof s.componentDidUpdate!=\\\"function\\\"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!=\\\"function\\\"||o===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return s=n,TP(t,e),n=(e.flags&128)!==0,s||n?(s=e.stateNode,r=n&&typeof r.getDerivedStateFromError!=\\\"function\\\"?null:s.render(),e.flags|=1,t!==null&&n?(e.child=Ub(e,t.child,null,i),e.child=Ub(e,null,r,i)):Ao(t,e,r,i),e.memoizedState=s.state,t=e.child):t=Qh(t,e,i),t}function O0e(t,e,r,n){return Db(),e.flags|=256,Ao(t,e,r,n),e.child}var VW={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function WW(t){return{baseLanes:t,cachePool:tye()}}function GW(t,e,r){return t=t!==null?t.childLanes&~r:0,e&&(t|=ll),t}function Gye(t,e,r){var n=e.pendingProps,i=!1,s=(e.flags&128)!==0,o;if((o=s)||(o=t!==null&&t.memoizedState===null?!1:(ss.current&2)!==0),o&&(i=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(Xt){if(i?og(e):ag(e),(t=zn)?(t=U1e(t,fu),t=t!==null&&t.data!==\\\"&\\\"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_g!==null?{id:$f,overflow:Vf}:null,retryLane:536870912,hydrationErrors:null},r=Jge(t),r.return=e,e.child=r,Io=e,zn=null)):t=null,t===null)throw Cg(e);return YG(t)?e.lanes=32:e.lanes=536870912,null}var a=n.children;return n=n.fallback,i?(ag(e),i=e.mode,a=KP({mode:\\\"hidden\\\",children:a},i),n=Nb(n,i,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n=e.child,n.memoizedState=WW(r),n.childLanes=GW(t,o,r),e.memoizedState=VW,z8(null,n)):(og(e),FG(e,a))}var c=t.memoizedState;if(c!==null&&(a=c.dehydrated,a!==null)){if(s)e.flags&256?(og(e),e.flags&=-257,e=KW(t,e,r)):e.memoizedState!==null?(ag(e),e.child=t.child,e.flags|=128,e=null):(ag(e),a=n.fallback,i=e.mode,n=KP({mode:\\\"visible\\\",children:n.children},i),a=Nb(a,i,r,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,Ub(e,t.child,null,r),n=e.child,n.memoizedState=WW(r),n.childLanes=GW(t,o,r),e.memoizedState=VW,e=z8(null,n));else if(og(e),YG(a)){if(o=a.nextSibling&&a.nextSibling.dataset,o)var l=o.dgst;o=l,n=Error(le(419)),n.stack=\\\"\\\",n.digest=o,lS({value:n,source:null,stack:null}),e=KW(t,e,r)}else if(ws||UE(t,e,r,!1),o=(r&t.childLanes)!==0,ws||o){if(o=cn,o!==null&&(n=_ge(o,r),n!==0&&n!==c.retryLane))throw c.retryLane=n,$b(t,n),bc(o,t,n),LK;JG(a)||YP(),e=KW(t,e,r)}else JG(a)?(e.flags|=192,e.child=t.child,e=null):(t=c.treeContext,zn=hu(a.nextSibling),Io=e,Xt=!0,mg=null,fu=!1,t!==null&&Xge(e,t),e=FG(e,n.children),e.flags|=4096);return e}return i?(ag(e),a=n.fallback,i=e.mode,c=t.child,l=c.sibling,n=$h(c,{mode:\\\"hidden\\\",children:n.children}),n.subtreeFlags=c.subtreeFlags&65011712,l!==null?a=$h(l,a):(a=Nb(a,i,r,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,z8(null,n),n=e.child,a=t.child.memoizedState,a===null?a=WW(r):(i=a.cachePool,i!==null?(c=bs._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=tye(),a={baseLanes:a.baseLanes|r,cachePool:i}),n.memoizedState=a,n.childLanes=GW(t,o,r),e.memoizedState=VW,z8(t.child,n)):(og(e),r=t.child,t=r.sibling,r=$h(r,{mode:\\\"visible\\\",children:n.children}),r.return=e,r.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=r,e.memoizedState=null,r)}function FG(t,e){return e=KP({mode:\\\"visible\\\",children:e},t.mode),e.return=t,t.child=e}function KP(t,e){return t=cl(22,t,null,e),t.lanes=0,t}function KW(t,e,r){return Ub(e,t.child,null,r),t=FG(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function N0e(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),AG(t.return,e,r)}function ZW(t,e,r,n,i,s){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,treeForkCount:s}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i,o.treeForkCount=s)}function Kye(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;n=n.children;var o=ss.current,a=(o&2)!==0;if(a?(o=o&1|2,e.flags|=128):o&=1,Sn(ss,o),Ao(t,e,n,r),n=Xt?cS:0,!a&&t!==null&&(t.flags&128)!==0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&N0e(t,r,e);else if(t.tag===19)N0e(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(i){case\\\"forwards\\\":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&$P(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),ZW(e,!1,i,r,s,n);break;case\\\"backwards\\\":case\\\"unstable_legacy-backwards\\\":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&$P(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}ZW(e,!0,r,null,s,n);break;case\\\"together\\\":ZW(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function Qh(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ag|=e.lanes,(r&e.childLanes)===0)if(t!==null){if(UE(t,e,r,!1),(r&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(le(153));if(e.child!==null){for(t=e.child,r=$h(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=$h(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function UK(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&HP(t)))}function Lct(t,e,r){switch(e.tag){case 3:BP(e,e.stateNode.containerInfo),sg(e,bs,t.memoizedState.cache),Db();break;case 27:case 5:pG(e);break;case 4:BP(e,e.stateNode.containerInfo);break;case 10:sg(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,NG(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(og(e),e.flags|=128,null):(r&e.child.childLanes)!==0?Gye(t,e,r):(og(e),t=Qh(t,e,r),t!==null?t.sibling:null);og(e);break;case 19:var i=(t.flags&128)!==0;if(n=(r&e.childLanes)!==0,n||(UE(t,e,r,!1),n=(r&e.childLanes)!==0),i){if(n)return Kye(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Sn(ss,ss.current),n)break;return null;case 22:return e.lanes=0,Wye(t,e,r,e.pendingProps);case 24:sg(e,bs,t.memoizedState.cache)}return Qh(t,e,r)}function Zye(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps)ws=!0;else{if(!UK(t,r)&&(e.flags&128)===0)return ws=!1,Lct(t,e,r);ws=(t.flags&131072)!==0}else ws=!1,Xt&&(e.flags&1048576)!==0&&Yge(e,cS,e.index);switch(e.lanes=0,e.tag){case 16:e:{var n=e.pendingProps;if(t=Rb(e.elementType),e.type=t,typeof t==\\\"function\\\")gK(t)?(n=jb(t,n),e.tag=1,e=P0e(null,e,t,n,r)):(e.tag=0,e=UG(null,e,t,n,r));else{if(t!=null){var i=t.$$typeof;if(i===rK){e.tag=11,e=S0e(null,e,t,n,r);break e}else if(i===nK){e.tag=14,e=A0e(null,e,t,n,r);break e}}throw e=dG(t)||t,Error(le(306,e,\\\"\\\"))}}return e;case 0:return UG(t,e,e.type,e.pendingProps,r);case 1:return n=e.type,i=jb(n,e.pendingProps),P0e(t,e,n,i,r);case 3:e:{if(BP(e,e.stateNode.containerInfo),t===null)throw Error(le(387));n=e.pendingProps;var s=e.memoizedState;i=s.element,RG(t,e),J8(e,n,null,r);var o=e.memoizedState;if(n=o.cache,sg(e,bs,n),n!==s.cache&&TG(e,[bs],r,!0),Q8(),n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){e=O0e(t,e,n,r);break e}else if(n!==i){i=du(Error(le(424)),e),lS(i),e=O0e(t,e,n,r);break e}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName===\\\"HTML\\\"?t.ownerDocument.body:t,zn=hu(t.firstChild),Io=e,Xt=!0,mg=null,fu=!0,r=iye(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Db(),n===i){e=Qh(t,e,r);break e}Ao(t,e,n,r)}e=e.child}return e;case 26:return TP(t,e),t===null?(r=ege(e.type,null,e.pendingProps,null))?e.memoizedState=r:Xt||(r=e.type,t=e.pendingProps,n=rO(hg.current).createElement(r),n[To]=e,n[wc]=t,Po(n,r,t),to(n),e.stateNode=n):e.memoizedState=ege(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return pG(e),t===null&&Xt&&(n=e.stateNode=F1e(e.type,e.pendingProps,hg.current),Io=e,fu=!0,i=zn,Ig(e.type)?(XG=i,zn=hu(n.firstChild)):zn=i),Ao(t,e,e.pendingProps.children,r),TP(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Xt&&((i=n=zn)&&(n=dlt(n,e.type,e.pendingProps,fu),n!==null?(e.stateNode=n,Io=e,zn=hu(n.firstChild),fu=!1,i=!0):i=!1),i||Cg(e)),pG(e),i=e.type,s=e.pendingProps,o=t!==null?t.memoizedProps:null,n=s.children,ZG(i,s)?n=null:o!==null&&ZG(i,o)&&(e.flags|=32),e.memoizedState!==null&&(i=SK(t,e,Ict,null,null,r),mS._currentValue=i),TP(t,e),Ao(t,e,n,r),e.child;case 6:return t===null&&Xt&&((t=r=zn)&&(r=flt(r,e.pendingProps,fu),r!==null?(e.stateNode=r,Io=e,zn=null,t=!0):t=!1),t||Cg(e)),null;case 13:return Gye(t,e,r);case 4:return BP(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ub(e,null,n,r):Ao(t,e,n,r),e.child;case 11:return S0e(t,e,e.type,e.pendingProps,r);case 7:return Ao(t,e,e.pendingProps,r),e.child;case 8:return Ao(t,e,e.pendingProps.children,r),e.child;case 12:return Ao(t,e,e.pendingProps.children,r),e.child;case 10:return n=e.pendingProps,sg(e,e.type,n.value),Ao(t,e,n.children,r),e.child;case 9:return i=e.type._context,n=e.pendingProps.children,Lb(e),i=Ro(i),n=n(i),e.flags|=1,Ao(t,e,n,r),e.child;case 14:return A0e(t,e,e.type,e.pendingProps,r);case 15:return Vye(t,e,e.type,e.pendingProps,r);case 19:return Kye(t,e,r);case 31:return Dct(t,e,r);case 22:return Wye(t,e,r,e.pendingProps);case 24:return Lb(e),n=Ro(bs),t===null?(i=vK(),i===null&&(i=cn,s=wK(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=r),i=s),e.memoizedState={parent:n,cache:i},EK(e),sg(e,bs,i)):((t.lanes&r)!==0&&(RG(t,e),J8(e,null,null,r),Q8()),i=t.memoizedState,s=e.memoizedState,i.parent!==n?(i={parent:n,cache:n},e.memoizedState=i,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=i),sg(e,bs,n)):(n=s.cache,sg(e,bs,n),n!==i.cache&&TG(e,[bs],r,!0))),Ao(t,e,e.pendingProps.children,r),e.child;case 29:throw e.pendingProps}throw Error(le(156,e.tag))}function Mh(t){t.flags|=4}function QW(t,e,r,n,i){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(i&335544128)===i)if(t.stateNode.complete)t.flags|=8192;else if(w1e())t.flags|=8192;else throw Bb=qP,xK}else t.flags&=-16777217}function k0e(t,e){if(e.type!==\\\"stylesheet\\\"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!q1e(e))if(w1e())t.flags|=8192;else throw Bb=qP,xK}function dP(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?vge():536870912,t.lanes|=e,OE|=e)}function D8(t,e){if(!Xt)switch(t.tailMode){case\\\"hidden\\\":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case\\\"collapsed\\\":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function qn(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function Uct(t,e,r){var n=e.pendingProps;switch(bK(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(e),null;case 1:return qn(e),null;case 3:return r=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Vh(bs),SE(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(rE(e)?Mh(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,HW())),qn(e),null;case 26:var i=e.type,s=e.memoizedState;return t===null?(Mh(e),s!==null?(qn(e),k0e(e,s)):(qn(e),QW(e,i,null,n,r))):s?s!==t.memoizedState?(Mh(e),qn(e),k0e(e,s)):(qn(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Mh(e),qn(e),QW(e,i,t,n,r)),null;case 27:if(MP(e),r=hg.current,i=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Mh(e);else{if(!n){if(e.stateNode===null)throw Error(le(166));return qn(e),null}t=Gf.current,rE(e)?c0e(e,t):(t=F1e(i,n,r),e.stateNode=t,Mh(e))}return qn(e),null;case 5:if(MP(e),i=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Mh(e);else{if(!n){if(e.stateNode===null)throw Error(le(166));return qn(e),null}if(s=Gf.current,rE(e))c0e(e,s);else{var o=rO(hg.current);switch(s){case 1:s=o.createElementNS(\\\"http://www.w3.org/2000/svg\\\",i);break;case 2:s=o.createElementNS(\\\"http://www.w3.org/1998/Math/MathML\\\",i);break;default:switch(i){case\\\"svg\\\":s=o.createElementNS(\\\"http://www.w3.org/2000/svg\\\",i);break;case\\\"math\\\":s=o.createElementNS(\\\"http://www.w3.org/1998/Math/MathML\\\",i);break;case\\\"script\\\":s=o.createElement(\\\"div\\\"),s.innerHTML=\\\"<script><\\\\/script>\\\",s=s.removeChild(s.firstChild);break;case\\\"select\\\":s=typeof n.is==\\\"string\\\"?o.createElement(\\\"select\\\",{is:n.is}):o.createElement(\\\"select\\\"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is==\\\"string\\\"?o.createElement(i,{is:n.is}):o.createElement(i)}}s[To]=e,s[wc]=n;e:for(o=e.child;o!==null;){if(o.tag===5||o.tag===6)s.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===e)break e;for(;o.sibling===null;){if(o.return===null||o.return===e)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=s;e:switch(Po(s,i,n),i){case\\\"button\\\":case\\\"input\\\":case\\\"select\\\":case\\\"textarea\\\":n=!!n.autoFocus;break e;case\\\"img\\\":n=!0;break e;default:n=!1}n&&Mh(e)}}return qn(e),QW(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,r),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Mh(e);else{if(typeof n!=\\\"string\\\"&&e.stateNode===null)throw Error(le(166));if(t=hg.current,rE(e)){if(t=e.stateNode,r=e.memoizedProps,n=null,i=Io,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}t[To]=e,t=!!(t.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||M1e(t.nodeValue,r)),t||Cg(e,!0)}else t=rO(t).createTextNode(n),t[To]=e,e.stateNode=t}return qn(e),null;case 31:if(r=e.memoizedState,t===null||t.memoizedState!==null){if(n=rE(e),r!==null){if(t===null){if(!n)throw Error(le(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(le(557));t[To]=e}else Db(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;qn(e),t=!1}else r=HW(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return e.flags&256?(al(e),e):(al(e),null);if((e.flags&128)!==0)throw Error(le(558))}return qn(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=rE(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(le(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(le(317));i[To]=e}else Db(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;qn(e),i=!1}else i=HW(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(al(e),e):(al(e),null)}return al(e),(e.flags&128)!==0?(e.lanes=r,e):(r=n!==null,t=t!==null&&t.memoizedState!==null,r&&(n=e.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==i&&(n.flags|=2048)),r!==t&&r&&(e.child.flags|=8192),dP(e,e.updateQueue),qn(e),null);case 4:return SE(),t===null&&VK(e.stateNode.containerInfo),qn(e),null;case 10:return Vh(e.type),qn(e),null;case 19:if(ro(ss),n=e.memoizedState,n===null)return qn(e),null;if(i=(e.flags&128)!==0,s=n.rendering,s===null)if(i)D8(n,!1);else{if(Gi!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(s=$P(t),s!==null){for(e.flags|=128,D8(n,!1),t=s.updateQueue,e.updateQueue=t,dP(e,t),e.subtreeFlags=0,t=r,r=e.child;r!==null;)Qge(r,t),r=r.sibling;return Sn(ss,ss.current&1|2),Xt&&Fh(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&ul()>QP&&(e.flags|=128,i=!0,D8(n,!1),e.lanes=4194304)}else{if(!i)if(t=$P(s),t!==null){if(e.flags|=128,i=!0,t=t.updateQueue,e.updateQueue=t,dP(e,t),D8(n,!0),n.tail===null&&n.tailMode===\\\"hidden\\\"&&!s.alternate&&!Xt)return qn(e),null}else 2*ul()-n.renderingStartTime>QP&&r!==536870912&&(e.flags|=128,i=!0,D8(n,!1),e.lanes=4194304);n.isBackwards?(s.sibling=e.child,e.child=s):(t=n.last,t!==null?t.sibling=s:e.child=s,n.last=s)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=ul(),t.sibling=null,r=ss.current,Sn(ss,i?r&1|2:r&1),Xt&&Fh(e,n.treeForkCount),t):(qn(e),null);case 22:case 23:return al(e),_K(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(r&536870912)!==0&&(e.flags&128)===0&&(qn(e),e.subtreeFlags&6&&(e.flags|=8192)):qn(e),r=e.updateQueue,r!==null&&dP(e,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==r&&(e.flags|=2048),t!==null&&ro(kb),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),e.memoizedState.cache!==r&&(e.flags|=2048),Vh(bs),qn(e),null;case 25:return null;case 30:return null}throw Error(le(156,e.tag))}function Fct(t,e){switch(bK(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vh(bs),SE(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return MP(e),null;case 31:if(e.memoizedState!==null){if(al(e),e.alternate===null)throw Error(le(340));Db()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(al(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(le(340));Db()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ro(ss),null;case 4:return SE(),null;case 10:return Vh(e.type),null;case 22:case 23:return al(e),_K(),t!==null&&ro(kb),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Vh(bs),null;case 25:return null;default:return null}}function Qye(t,e){switch(bK(e),e.tag){case 3:Vh(bs),SE();break;case 26:case 27:case 5:MP(e);break;case 4:SE();break;case 31:e.memoizedState!==null&&al(e);break;case 13:al(e);break;case 19:ro(ss);break;case 10:Vh(e.type);break;case 22:case 23:al(e),_K(),t!==null&&ro(kb);break;case 24:Vh(bs)}}function AS(t,e){try{var r=e.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var i=n.next;r=i;do{if((r.tag&t)===t){n=void 0;var s=r.create,o=r.inst;n=s(),o.destroy=n}r=r.next}while(r!==i)}}catch(a){Wr(e,e.return,a)}}function Sg(t,e,r){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var s=i.next;n=s;do{if((n.tag&t)===t){var o=n.inst,a=o.destroy;if(a!==void 0){o.destroy=void 0,i=e;var c=r,l=a;try{l()}catch(d){Wr(i,c,d)}}}n=n.next}while(n!==s)}}catch(d){Wr(e,e.return,d)}}function Jye(t){var e=t.updateQueue;if(e!==null){var r=t.stateNode;try{oye(e,r)}catch(n){Wr(t,t.return,n)}}}function Yye(t,e,r){r.props=jb(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(n){Wr(t,e,n)}}function X8(t,e){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof r==\\\"function\\\"?t.refCleanup=r(n):r.current=n}}catch(i){Wr(t,e,i)}}function Wf(t,e){var r=t.ref,n=t.refCleanup;if(r!==null)if(typeof n==\\\"function\\\")try{n()}catch(i){Wr(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r==\\\"function\\\")try{r(null)}catch(i){Wr(t,e,i)}else r.current=null}function Xye(t){var e=t.type,r=t.memoizedProps,n=t.stateNode;try{e:switch(e){case\\\"button\\\":case\\\"input\\\":case\\\"select\\\":case\\\"textarea\\\":r.autoFocus&&n.focus();break e;case\\\"img\\\":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(i){Wr(t,t.return,i)}}function JW(t,e,r){try{var n=t.stateNode;slt(n,t.type,r,e),n[wc]=e}catch(i){Wr(t,t.return,i)}}function e1e(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ig(t.type)||t.tag===4}function YW(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||e1e(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ig(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function jG(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(r.nodeType===9?r.body:r.nodeName===\\\"HTML\\\"?r.ownerDocument.body:r).insertBefore(t,e):(e=r.nodeType===9?r.body:r.nodeName===\\\"HTML\\\"?r.ownerDocument.body:r,e.appendChild(t),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=qh));else if(n!==4&&(n===27&&Ig(t.type)&&(r=t.stateNode,e=null),t=t.child,t!==null))for(jG(t,e,r),t=t.sibling;t!==null;)jG(t,e,r),t=t.sibling}function ZP(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(n===27&&Ig(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(ZP(t,e,r),t=t.sibling;t!==null;)ZP(t,e,r),t=t.sibling}function t1e(t){var e=t.stateNode,r=t.memoizedProps;try{for(var n=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Po(e,n,r),e[To]=t,e[wc]=r}catch(s){Wr(t,t.return,s)}}var jh=!1,ys=!1,XW=!1,B0e=typeof WeakSet==\\\"function\\\"?WeakSet:Set,eo=null;function jct(t,e){if(t=t.containerInfo,GG=oO,t=qge(t),pK(t)){if(\\\"selectionStart\\\"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,d=0,f=t,p=null;t:for(;;){for(var h;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===t)break t;if(p===r&&++l===i&&(a=o),p===s&&++d===n&&(c=o),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(KG={focusedElem:t,selectionRange:r},oO=!1,eo=e;eo!==null;)if(e=eo,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,eo=t;else for(;eo!==null;){switch(e=eo,s=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r<t.length;r++)i=t[r],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&s!==null){t=void 0,r=e,i=s.memoizedProps,s=s.memoizedState,n=r.stateNode;try{var m=jb(r.type,i);t=n.getSnapshotBeforeUpdate(m,s),n.__reactInternalSnapshotBeforeUpdate=t}catch(g){Wr(r,r.return,g)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,r=t.nodeType,r===9)QG(t);else if(r===1)switch(t.nodeName){case\\\"HEAD\\\":case\\\"HTML\\\":case\\\"BODY\\\":QG(t);break;default:t.textContent=\\\"\\\"}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(le(163))}if(t=e.sibling,t!==null){t.return=e.return,eo=t;break}eo=e.return}}function r1e(t,e,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:Lh(t,r),n&4&&AS(5,r);break;case 1:if(Lh(t,r),n&4)if(t=r.stateNode,e===null)try{t.componentDidMount()}catch(o){Wr(r,r.return,o)}else{var i=jb(r.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(i,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){Wr(r,r.return,o)}}n&64&&Jye(r),n&512&&X8(r,r.return);break;case 3:if(Lh(t,r),n&64&&(t=r.updateQueue,t!==null)){if(e=null,r.child!==null)switch(r.child.tag){case 27:case 5:e=r.child.stateNode;break;case 1:e=r.child.stateNode}try{oye(t,e)}catch(o){Wr(r,r.return,o)}}break;case 27:e===null&&n&4&&t1e(r);case 26:case 5:Lh(t,r),e===null&&n&4&&Xye(r),n&512&&X8(r,r.return);break;case 12:Lh(t,r);break;case 31:Lh(t,r),n&4&&s1e(t,r);break;case 13:Lh(t,r),n&4&&o1e(t,r),n&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=Zct.bind(null,r),plt(t,r))));break;case 22:if(n=r.memoizedState!==null||jh,!n){e=e!==null&&e.memoizedState!==null||ys,i=jh;var s=ys;jh=n,(ys=e)&&!s?Uh(t,r,(r.subtreeFlags&8772)!==0):Lh(t,r),jh=i,ys=s}break;case 30:break;default:Lh(t,r)}}function n1e(t){var e=t.alternate;e!==null&&(t.alternate=null,n1e(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&aK(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var vi=null,gc=!1;function Dh(t,e,r){for(r=r.child;r!==null;)i1e(t,e,r),r=r.sibling}function i1e(t,e,r){if(dl&&typeof dl.onCommitFiberUnmount==\\\"function\\\")try{dl.onCommitFiberUnmount(wS,r)}catch{}switch(r.tag){case 26:ys||Wf(r,e),Dh(t,e,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ys||Wf(r,e);var n=vi,i=gc;Ig(r.type)&&(vi=r.stateNode,gc=!1),Dh(t,e,r),nS(r.stateNode),vi=n,gc=i;break;case 5:ys||Wf(r,e);case 6:if(n=vi,i=gc,vi=null,Dh(t,e,r),vi=n,gc=i,vi!==null)if(gc)try{(vi.nodeType===9?vi.body:vi.nodeName===\\\"HTML\\\"?vi.ownerDocument.body:vi).removeChild(r.stateNode)}catch(s){Wr(r,e,s)}else try{vi.removeChild(r.stateNode)}catch(s){Wr(r,e,s)}break;case 18:vi!==null&&(gc?(t=vi,Z0e(t.nodeType===9?t.body:t.nodeName===\\\"HTML\\\"?t.ownerDocument.body:t,r.stateNode),ME(t)):Z0e(vi,r.stateNode));break;case 4:n=vi,i=gc,vi=r.stateNode.containerInfo,gc=!0,Dh(t,e,r),vi=n,gc=i;break;case 0:case 11:case 14:case 15:Sg(2,r,e),ys||Sg(4,r,e),Dh(t,e,r);break;case 1:ys||(Wf(r,e),n=r.stateNode,typeof n.componentWillUnmount==\\\"function\\\"&&Yye(r,e,n)),Dh(t,e,r);break;case 21:Dh(t,e,r);break;case 22:ys=(n=ys)||r.memoizedState!==null,Dh(t,e,r),ys=n;break;default:Dh(t,e,r)}}function s1e(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ME(t)}catch(r){Wr(e,e.return,r)}}}function o1e(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ME(t)}catch(r){Wr(e,e.return,r)}}function Hct(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new B0e),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new B0e),e;default:throw Error(le(435,t.tag))}}function fP(t,e){var r=Hct(t);e.forEach(function(n){if(!r.has(n)){r.add(n);var i=Qct.bind(null,t,n);n.then(i,i)}})}function hc(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n],s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 27:if(Ig(a.type)){vi=a.stateNode,gc=!1;break e}break;case 5:vi=a.stateNode,gc=!1;break e;case 3:case 4:vi=a.stateNode.containerInfo,gc=!0;break e}a=a.return}if(vi===null)throw Error(le(160));i1e(s,o,i),vi=null,gc=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)a1e(e,t),e=e.sibling}var Id=null;function a1e(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:hc(e,t),mc(t),n&4&&(Sg(3,t,t.return),AS(3,t),Sg(5,t,t.return));break;case 1:hc(e,t),mc(t),n&512&&(ys||r===null||Wf(r,r.return)),n&64&&jh&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:var i=Id;if(hc(e,t),mc(t),n&512&&(ys||r===null||Wf(r,r.return)),n&4){var s=r!==null?r.memoizedState:null;if(n=t.memoizedState,r===null)if(n===null)if(t.stateNode===null){e:{n=t.type,r=t.memoizedProps,i=i.ownerDocument||i;t:switch(n){case\\\"title\\\":s=i.getElementsByTagName(\\\"title\\\")[0],(!s||s[ES]||s[To]||s.namespaceURI===\\\"http://www.w3.org/2000/svg\\\"||s.hasAttribute(\\\"itemprop\\\"))&&(s=i.createElement(n),i.head.insertBefore(s,i.querySelector(\\\"head > title\\\"))),Po(s,n,r),s[To]=t,to(s),n=s;break e;case\\\"link\\\":var o=rge(\\\"link\\\",\\\"href\\\",i).get(n+(r.href||\\\"\\\"));if(o){for(var a=0;a<o.length;a++)if(s=o[a],s.getAttribute(\\\"href\\\")===(r.href==null||r.href===\\\"\\\"?null:r.href)&&s.getAttribute(\\\"rel\\\")===(r.rel==null?null:r.rel)&&s.getAttribute(\\\"title\\\")===(r.title==null?null:r.title)&&s.getAttribute(\\\"crossorigin\\\")===(r.crossOrigin==null?null:r.crossOrigin)){o.splice(a,1);break t}}s=i.createElement(n),Po(s,n,r),i.head.appendChild(s);break;case\\\"meta\\\":if(o=rge(\\\"meta\\\",\\\"content\\\",i).get(n+(r.content||\\\"\\\"))){for(a=0;a<o.length;a++)if(s=o[a],s.getAttribute(\\\"content\\\")===(r.content==null?null:\\\"\\\"+r.content)&&s.getAttribute(\\\"name\\\")===(r.name==null?null:r.name)&&s.getAttribute(\\\"property\\\")===(r.property==null?null:r.property)&&s.getAttribute(\\\"http-equiv\\\")===(r.httpEquiv==null?null:r.httpEquiv)&&s.getAttribute(\\\"charset\\\")===(r.charSet==null?null:r.charSet)){o.splice(a,1);break t}}s=i.createElement(n),Po(s,n,r),i.head.appendChild(s);break;default:throw Error(le(468,n))}s[To]=t,to(s),n=s}t.stateNode=n}else nge(i,t.type,t.stateNode);else t.stateNode=tge(i,n,t.memoizedProps);else s!==n?(s===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):s.count--,n===null?nge(i,t.type,t.stateNode):tge(i,n,t.memoizedProps)):n===null&&t.stateNode!==null&&JW(t,t.memoizedProps,r.memoizedProps)}break;case 27:hc(e,t),mc(t),n&512&&(ys||r===null||Wf(r,r.return)),r!==null&&n&4&&JW(t,t.memoizedProps,r.memoizedProps);break;case 5:if(hc(e,t),mc(t),n&512&&(ys||r===null||Wf(r,r.return)),t.flags&32){i=t.stateNode;try{TE(i,\\\"\\\")}catch(m){Wr(t,t.return,m)}}n&4&&t.stateNode!=null&&(i=t.memoizedProps,JW(t,i,r!==null?r.memoizedProps:i)),n&1024&&(XW=!0);break;case 6:if(hc(e,t),mc(t),n&4){if(t.stateNode===null)throw Error(le(162));n=t.memoizedProps,r=t.stateNode;try{r.nodeValue=n}catch(m){Wr(t,t.return,m)}}break;case 3:if(PP=null,i=Id,Id=nO(e.containerInfo),hc(e,t),Id=i,mc(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ME(e.containerInfo)}catch(m){Wr(t,t.return,m)}XW&&(XW=!1,c1e(t));break;case 4:n=Id,Id=nO(t.stateNode.containerInfo),hc(e,t),mc(t),Id=n;break;case 12:hc(e,t),mc(t);break;case 31:hc(e,t),mc(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,fP(t,n)));break;case 13:hc(e,t),mc(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(wO=ul()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,fP(t,n)));break;case 22:i=t.memoizedState!==null;var c=r!==null&&r.memoizedState!==null,l=jh,d=ys;if(jh=l||i,ys=d||c,hc(e,t),ys=d,jh=l,mc(t),n&8192)e:for(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,i&&(r===null||c||jh||ys||Pb(t)),r=null,e=t;;){if(e.tag===5||e.tag===26){if(r===null){c=r=e;try{if(s=c.stateNode,i)o=s.style,typeof o.setProperty==\\\"function\\\"?o.setProperty(\\\"display\\\",\\\"none\\\",\\\"important\\\"):o.display=\\\"none\\\";else{a=c.stateNode;var f=c.memoizedProps.style,p=f!=null&&f.hasOwnProperty(\\\"display\\\")?f.display:null;a.style.display=p==null||typeof p==\\\"boolean\\\"?\\\"\\\":(\\\"\\\"+p).trim()}}catch(m){Wr(c,c.return,m)}}}else if(e.tag===6){if(r===null){c=e;try{c.stateNode.nodeValue=i?\\\"\\\":c.memoizedProps}catch(m){Wr(c,c.return,m)}}}else if(e.tag===18){if(r===null){c=e;try{var h=c.stateNode;i?Q0e(h,!0):Q0e(c.stateNode,!1)}catch(m){Wr(c,c.return,m)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;r===e&&(r=null),e=e.return}r===e&&(r=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,fP(t,r))));break;case 19:hc(e,t),mc(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,fP(t,n)));break;case 30:break;case 21:break;default:hc(e,t),mc(t)}}function mc(t){var e=t.flags;if(e&2){try{for(var r,n=t.return;n!==null;){if(e1e(n)){r=n;break}n=n.return}if(r==null)throw Error(le(160));switch(r.tag){case 27:var i=r.stateNode,s=YW(t);ZP(t,s,i);break;case 5:var o=r.stateNode;r.flags&32&&(TE(o,\\\"\\\"),r.flags&=-33);var a=YW(t);ZP(t,a,o);break;case 3:case 4:var c=r.stateNode.containerInfo,l=YW(t);jG(t,l,c);break;default:throw Error(le(161))}}catch(d){Wr(t,t.return,d)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function c1e(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;c1e(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Lh(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)r1e(t,e.alternate,e),e=e.sibling}function Pb(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Sg(4,e,e.return),Pb(e);break;case 1:Wf(e,e.return);var r=e.stateNode;typeof r.componentWillUnmount==\\\"function\\\"&&Yye(e,e.return,r),Pb(e);break;case 27:nS(e.stateNode);case 26:case 5:Wf(e,e.return),Pb(e);break;case 22:e.memoizedState===null&&Pb(e);break;case 30:Pb(e);break;default:Pb(e)}t=t.sibling}}function Uh(t,e,r){for(r=r&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,i=t,s=e,o=s.flags;switch(s.tag){case 0:case 11:case 15:Uh(i,s,r),AS(4,s);break;case 1:if(Uh(i,s,r),n=s,i=n.stateNode,typeof i.componentDidMount==\\\"function\\\")try{i.componentDidMount()}catch(l){Wr(n,n.return,l)}if(n=s,i=n.updateQueue,i!==null){var a=n.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)sye(c[i],a)}catch(l){Wr(n,n.return,l)}}r&&o&64&&Jye(s),X8(s,s.return);break;case 27:t1e(s);case 26:case 5:Uh(i,s,r),r&&n===null&&o&4&&Xye(s),X8(s,s.return);break;case 12:Uh(i,s,r);break;case 31:Uh(i,s,r),r&&o&4&&s1e(i,s);break;case 13:Uh(i,s,r),r&&o&4&&o1e(i,s);break;case 22:s.memoizedState===null&&Uh(i,s,r),X8(s,s.return);break;case 30:break;default:Uh(i,s,r)}e=e.sibling}}function FK(t,e){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==r&&(t!=null&&t.refCount++,r!=null&&CS(r))}function jK(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&CS(t))}function Td(t,e,r,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)l1e(t,e,r,n),e=e.sibling}function l1e(t,e,r,n){var i=e.flags;switch(e.tag){case 0:case 11:case 15:Td(t,e,r,n),i&2048&&AS(9,e);break;case 1:Td(t,e,r,n);break;case 3:Td(t,e,r,n),i&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&CS(t)));break;case 12:if(i&2048){Td(t,e,r,n),t=e.stateNode;try{var s=e.memoizedProps,o=s.id,a=s.onPostCommit;typeof a==\\\"function\\\"&&a(o,e.alternate===null?\\\"mount\\\":\\\"update\\\",t.passiveEffectDuration,-0)}catch(c){Wr(e,e.return,c)}}else Td(t,e,r,n);break;case 31:Td(t,e,r,n);break;case 13:Td(t,e,r,n);break;case 23:break;case 22:s=e.stateNode,o=e.alternate,e.memoizedState!==null?s._visibility&2?Td(t,e,r,n):eS(t,e):s._visibility&2?Td(t,e,r,n):(s._visibility|=2,iE(t,e,r,n,(e.subtreeFlags&10256)!==0||!1)),i&2048&&FK(o,e);break;case 24:Td(t,e,r,n),i&2048&&jK(e.alternate,e);break;default:Td(t,e,r,n)}}function iE(t,e,r,n,i){for(i=i&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var s=t,o=e,a=r,c=n,l=o.flags;switch(o.tag){case 0:case 11:case 15:iE(s,o,a,c,i),AS(8,o);break;case 23:break;case 22:var d=o.stateNode;o.memoizedState!==null?d._visibility&2?iE(s,o,a,c,i):eS(s,o):(d._visibility|=2,iE(s,o,a,c,i)),i&&l&2048&&FK(o.alternate,o);break;case 24:iE(s,o,a,c,i),i&&l&2048&&jK(o.alternate,o);break;default:iE(s,o,a,c,i)}e=e.sibling}}function eS(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var r=t,n=e,i=n.flags;switch(n.tag){case 22:eS(r,n),i&2048&&FK(n.alternate,n);break;case 24:eS(r,n),i&2048&&jK(n.alternate,n);break;default:eS(r,n)}e=e.sibling}}var $8=8192;function nE(t,e,r){if(t.subtreeFlags&$8)for(t=t.child;t!==null;)u1e(t,e,r),t=t.sibling}function u1e(t,e,r){switch(t.tag){case 26:nE(t,e,r),t.flags&$8&&t.memoizedState!==null&&Slt(r,Id,t.memoizedState,t.memoizedProps);break;case 5:nE(t,e,r);break;case 3:case 4:var n=Id;Id=nO(t.stateNode.containerInfo),nE(t,e,r),Id=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=$8,$8=16777216,nE(t,e,r),$8=n):nE(t,e,r));break;default:nE(t,e,r)}}function d1e(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function L8(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var r=0;r<e.length;r++){var n=e[r];eo=n,p1e(n,t)}d1e(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)f1e(t),t=t.sibling}function f1e(t){switch(t.tag){case 0:case 11:case 15:L8(t),t.flags&2048&&Sg(9,t,t.return);break;case 3:L8(t);break;case 12:L8(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,IP(t)):L8(t);break;default:L8(t)}}function IP(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var r=0;r<e.length;r++){var n=e[r];eo=n,p1e(n,t)}d1e(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Sg(8,e,e.return),IP(e);break;case 22:r=e.stateNode,r._visibility&2&&(r._visibility&=-3,IP(e));break;default:IP(e)}t=t.sibling}}function p1e(t,e){for(;eo!==null;){var r=eo;switch(r.tag){case 0:case 11:case 15:Sg(8,r,e);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:CS(r.memoizedState.cache)}if(n=r.child,n!==null)n.return=r,eo=n;else e:for(r=t;eo!==null;){n=eo;var i=n.sibling,s=n.return;if(n1e(n),n===r){eo=null;break e}if(i!==null){i.return=s,eo=i;break e}eo=s}}}var qct={getCacheForType:function(t){var e=Ro(bs),r=e.data.get(t);return r===void 0&&(r=t(),e.data.set(t,r)),r},cacheSignal:function(){return Ro(bs).controller.signal}},zct=typeof WeakMap==\\\"function\\\"?WeakMap:Map,Mr=0,cn=null,Gt=null,Qt=0,Vr=0,ol=null,dg=!1,jE=!1,HK=!1,Jh=0,Gi=0,Ag=0,Mb=0,qK=0,ll=0,OE=0,tS=null,yc=null,HG=!1,wO=0,h1e=0,QP=1/0,JP=null,bg=null,Us=0,wg=null,NE=null,Wh=0,qG=0,zG=null,m1e=null,rS=0,$G=null;function pl(){return(Mr&2)!==0&&Qt!==0?Qt&-Qt:ct.T!==null?$K():Cge()}function g1e(){if(ll===0)if((Qt&536870912)===0||Xt){var t=rP;rP<<=1,(rP&3932160)===0&&(rP=262144),ll=t}else ll=536870912;return t=ml.current,t!==null&&(t.flags|=32),ll}function bc(t,e,r){(t===cn&&(Vr===2||Vr===9)||t.cancelPendingCommit!==null)&&(kE(t,0),fg(t,Qt,ll,!1)),xS(t,r),((Mr&2)===0||t!==cn)&&(t===cn&&((Mr&2)===0&&(Mb|=r),Gi===4&&fg(t,Qt,ll,!1)),Zf(t))}function y1e(t,e,r){if((Mr&6)!==0)throw Error(le(327));var n=!r&&(e&127)===0&&(e&t.expiredLanes)===0||vS(t,e),i=n?Wct(t,e):eG(t,e,!0),s=n;do{if(i===0){jE&&!n&&fg(t,e,0,!1);break}else{if(r=t.current.alternate,s&&!$ct(r)){i=eG(t,e,!1),s=!1;continue}if(i===2){if(s=e,t.errorRecoveryDisabledLanes&s)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;e:{var a=t;i=tS;var c=a.current.memoizedState.isDehydrated;if(c&&(kE(a,o).flags|=256),o=eG(a,o,!1),o!==2){if(HK&&!c){a.errorRecoveryDisabledLanes|=s,Mb|=s,i=4;break e}s=yc,yc=i,s!==null&&(yc===null?yc=s:yc.push.apply(yc,s))}i=o}if(s=!1,i!==2)continue}}if(i===1){kE(t,0),fg(t,e,0,!0);break}e:{switch(n=t,s=i,s){case 0:case 1:throw Error(le(345));case 4:if((e&4194048)!==e)break;case 6:fg(n,e,ll,!dg);break e;case 2:yc=null;break;case 3:case 5:break;default:throw Error(le(329))}if((e&62914560)===e&&(i=wO+300-ul(),10<i)){if(fg(n,e,ll,!dg),cO(n,0,!0)!==0)break e;Wh=e,n.timeoutHandle=L1e(M0e.bind(null,n,r,yc,JP,HG,e,ll,Mb,OE,dg,s,\\\"Throttled\\\",-0,0),i);break e}M0e(n,r,yc,JP,HG,e,ll,Mb,OE,dg,s,null,-0,0)}}break}while(!0);Zf(t)}function M0e(t,e,r,n,i,s,o,a,c,l,d,f,p,h){if(t.timeoutHandle=-1,f=e.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qh},u1e(e,s,f);var m=(s&62914560)===s?wO-ul():(s&4194048)===s?h1e-ul():0;if(m=Alt(f,m),m!==null){Wh=s,t.cancelPendingCommit=m(L0e.bind(null,t,e,s,r,n,i,o,a,c,d,f,null,p,h)),fg(t,s,o,!l);return}}L0e(t,e,s,r,n,i,o,a,c)}function $ct(t){for(var e=t;;){var r=e.tag;if((r===0||r===11||r===15)&&e.flags&16384&&(r=e.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!hl(s(),i))return!1}catch{return!1}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function fg(t,e,r,n){e&=~qK,e&=~Mb,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var i=e;0<i;){var s=31-fl(i),o=1<<s;n[s]=-1,i&=~o}r!==0&&xge(t,r,e)}function vO(){return(Mr&6)===0?(TS(0,!1),!1):!0}function zK(){if(Gt!==null){if(Vr===0)var t=Gt.return;else t=Gt,zh=Vb=null,IK(t),EE=null,uS=0,t=Gt;for(;t!==null;)Qye(t.alternate,t),t=t.return;Gt=null}}function kE(t,e){var r=t.timeoutHandle;r!==-1&&(t.timeoutHandle=-1,clt(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),Wh=0,zK(),cn=t,Gt=r=$h(t.current,null),Qt=e,Vr=0,ol=null,dg=!1,jE=vS(t,e),HK=!1,OE=ll=qK=Mb=Ag=Gi=0,yc=tS=null,HG=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var i=31-fl(n),s=1<<i;e|=t[i],n&=~s}return Jh=e,fO(),r}function b1e(t,e){St=null,ct.H=fS,e===FE||e===hO?(e=p0e(),Vr=3):e===xK?(e=p0e(),Vr=4):Vr=e===LK?8:e!==null&&typeof e==\\\"object\\\"&&typeof e.then==\\\"function\\\"?6:1,ol=e,Gt===null&&(Gi=1,GP(t,du(e,t.current)))}function w1e(){var t=ml.current;return t===null?!0:(Qt&4194048)===Qt?pu===null:(Qt&62914560)===Qt||(Qt&536870912)!==0?t===pu:!1}function v1e(){var t=ct.H;return ct.H=fS,t===null?fS:t}function x1e(){var t=ct.A;return ct.A=qct,t}function YP(){Gi=4,dg||(Qt&4194048)!==Qt&&ml.current!==null||(jE=!0),(Ag&134217727)===0&&(Mb&134217727)===0||cn===null||fg(cn,Qt,ll,!1)}function eG(t,e,r){var n=Mr;Mr|=2;var i=v1e(),s=x1e();(cn!==t||Qt!==e)&&(JP=null,kE(t,e)),e=!1;var o=Gi;e:do try{if(Vr!==0&&Gt!==null){var a=Gt,c=ol;switch(Vr){case 8:zK(),o=6;break e;case 3:case 2:case 9:case 6:ml.current===null&&(e=!0);var l=Vr;if(Vr=0,ol=null,yE(t,a,c,l),r&&jE){o=0;break e}break;default:l=Vr,Vr=0,ol=null,yE(t,a,c,l)}}Vct(),o=Gi;break}catch(d){b1e(t,d)}while(!0);return e&&t.shellSuspendCounter++,zh=Vb=null,Mr=n,ct.H=i,ct.A=s,Gt===null&&(cn=null,Qt=0,fO()),o}function Vct(){for(;Gt!==null;)E1e(Gt)}function Wct(t,e){var r=Mr;Mr|=2;var n=v1e(),i=x1e();cn!==t||Qt!==e?(JP=null,QP=ul()+500,kE(t,e)):jE=vS(t,e);e:do try{if(Vr!==0&&Gt!==null){e=Gt;var s=ol;t:switch(Vr){case 1:Vr=0,ol=null,yE(t,e,s,1);break;case 2:case 9:if(f0e(s)){Vr=0,ol=null,D0e(e);break}e=function(){Vr!==2&&Vr!==9||cn!==t||(Vr=7),Zf(t)},s.then(e,e);break e;case 3:Vr=7;break e;case 4:Vr=5;break e;case 7:f0e(s)?(Vr=0,ol=null,D0e(e)):(Vr=0,ol=null,yE(t,e,s,7));break;case 5:var o=null;switch(Gt.tag){case 26:o=Gt.memoizedState;case 5:case 27:var a=Gt;if(o?q1e(o):a.stateNode.complete){Vr=0,ol=null;var c=a.sibling;if(c!==null)Gt=c;else{var l=a.return;l!==null?(Gt=l,xO(l)):Gt=null}break t}}Vr=0,ol=null,yE(t,e,s,5);break;case 6:Vr=0,ol=null,yE(t,e,s,6);break;case 8:zK(),Gi=6;break e;default:throw Error(le(462))}}Gct();break}catch(d){b1e(t,d)}while(!0);return zh=Vb=null,ct.H=n,ct.A=i,Mr=r,Gt!==null?0:(cn=null,Qt=0,fO(),Gi)}function Gct(){for(;Gt!==null&&!gat();)E1e(Gt)}function E1e(t){var e=Zye(t.alternate,t,Jh);t.memoizedProps=t.pendingProps,e===null?xO(t):Gt=e}function D0e(t){var e=t,r=e.alternate;switch(e.tag){case 15:case 0:e=R0e(r,e,e.pendingProps,e.type,void 0,Qt);break;case 11:e=R0e(r,e,e.pendingProps,e.type.render,e.ref,Qt);break;case 5:IK(e);default:Qye(r,e),e=Gt=Qge(e,Jh),e=Zye(r,e,Jh)}t.memoizedProps=t.pendingProps,e===null?xO(t):Gt=e}function yE(t,e,r,n){zh=Vb=null,IK(e),EE=null,uS=0;var i=e.return;try{if(Mct(t,i,e,r,Qt)){Gi=1,GP(t,du(r,t.current)),Gt=null;return}}catch(s){if(i!==null)throw Gt=i,s;Gi=1,GP(t,du(r,t.current)),Gt=null;return}e.flags&32768?(Xt||n===1?t=!0:jE||(Qt&536870912)!==0?t=!1:(dg=t=!0,(n===2||n===9||n===3||n===6)&&(n=ml.current,n!==null&&n.tag===13&&(n.flags|=16384))),_1e(e,t)):xO(e)}function xO(t){var e=t;do{if((e.flags&32768)!==0){_1e(e,dg);return}t=e.return;var r=Uct(e.alternate,e,Jh);if(r!==null){Gt=r;return}if(e=e.sibling,e!==null){Gt=e;return}Gt=e=t}while(e!==null);Gi===0&&(Gi=5)}function _1e(t,e){do{var r=Fct(t.alternate,t);if(r!==null){r.flags&=32767,Gt=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!e&&(t=t.sibling,t!==null)){Gt=t;return}Gt=t=r}while(t!==null);Gi=6,Gt=null}function L0e(t,e,r,n,i,s,o,a,c){t.cancelPendingCommit=null;do EO();while(Us!==0);if((Mr&6)!==0)throw Error(le(327));if(e!==null){if(e===t.current)throw Error(le(177));if(s=e.lanes|e.childLanes,s|=hK,Aat(t,r,s,o,a,c),t===cn&&(Gt=cn=null,Qt=0),NE=e,wg=t,Wh=r,qG=s,zG=i,m1e=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Jct(DP,function(){return I1e(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=ct.T,ct.T=null,i=Dr.p,Dr.p=2,o=Mr,Mr|=4;try{jct(t,e,r)}finally{Mr=o,Dr.p=i,ct.T=n}}Us=1,C1e(),S1e(),A1e()}}function C1e(){if(Us===1){Us=0;var t=wg,e=NE,r=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||r){r=ct.T,ct.T=null;var n=Dr.p;Dr.p=2;var i=Mr;Mr|=4;try{a1e(e,t);var s=KG,o=qge(t.containerInfo),a=s.focusedElem,c=s.selectionRange;if(o!==a&&a&&a.ownerDocument&&Hge(a.ownerDocument.documentElement,a)){if(c!==null&&pK(a)){var l=c.start,d=c.end;if(d===void 0&&(d=l),\\\"selectionStart\\\"in a)a.selectionStart=l,a.selectionEnd=Math.min(d,a.value.length);else{var f=a.ownerDocument||document,p=f&&f.defaultView||window;if(p.getSelection){var h=p.getSelection(),m=a.textContent.length,g=Math.min(c.start,m),w=c.end===void 0?g:Math.min(c.end,m);!h.extend&&g>w&&(o=w,w=g,g=o);var v=s0e(a,g),b=s0e(a,w);if(v&&b&&(h.rangeCount!==1||h.anchorNode!==v.node||h.anchorOffset!==v.offset||h.focusNode!==b.node||h.focusOffset!==b.offset)){var _=f.createRange();_.setStart(v.node,v.offset),h.removeAllRanges(),g>w?(h.addRange(_),h.extend(b.node,b.offset)):(_.setEnd(b.node,b.offset),h.addRange(_))}}}}for(f=[],h=a;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof a.focus==\\\"function\\\"&&a.focus(),a=0;a<f.length;a++){var S=f[a];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}oO=!!GG,KG=GG=null}finally{Mr=i,Dr.p=n,ct.T=r}}t.current=e,Us=2}}function S1e(){if(Us===2){Us=0;var t=wg,e=NE,r=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||r){r=ct.T,ct.T=null;var n=Dr.p;Dr.p=2;var i=Mr;Mr|=4;try{r1e(t,e.alternate,e)}finally{Mr=i,Dr.p=n,ct.T=r}}Us=3}}function A1e(){if(Us===4||Us===3){Us=0,yat();var t=wg,e=NE,r=Wh,n=m1e;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Us=5:(Us=0,NE=wg=null,T1e(t,t.pendingLanes));var i=t.pendingLanes;if(i===0&&(bg=null),oK(r),e=e.stateNode,dl&&typeof dl.onCommitFiberRoot==\\\"function\\\")try{dl.onCommitFiberRoot(wS,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=ct.T,i=Dr.p,Dr.p=2,ct.T=null;try{for(var s=t.onRecoverableError,o=0;o<n.length;o++){var a=n[o];s(a.value,{componentStack:a.stack})}}finally{ct.T=e,Dr.p=i}}(Wh&3)!==0&&EO(),Zf(t),i=t.pendingLanes,(r&261930)!==0&&(i&42)!==0?t===$G?rS++:(rS=0,$G=t):rS=0,TS(0,!1)}}function T1e(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,CS(e)))}function EO(){return C1e(),S1e(),A1e(),I1e()}function I1e(){if(Us!==5)return!1;var t=wg,e=qG;qG=0;var r=oK(Wh),n=ct.T,i=Dr.p;try{Dr.p=32>r?32:r,ct.T=null,r=zG,zG=null;var s=wg,o=Wh;if(Us=0,NE=wg=null,Wh=0,(Mr&6)!==0)throw Error(le(331));var a=Mr;if(Mr|=4,f1e(s.current),l1e(s,s.current,o,r),Mr=a,TS(0,!1),dl&&typeof dl.onPostCommitFiberRoot==\\\"function\\\")try{dl.onPostCommitFiberRoot(wS,s)}catch{}return!0}finally{Dr.p=i,ct.T=n,T1e(t,e)}}function U0e(t,e,r){e=du(r,e),e=LG(t.stateNode,e,2),t=yg(t,e,2),t!==null&&(xS(t,2),Zf(t))}function Wr(t,e,r){if(t.tag===3)U0e(t,t,r);else for(;e!==null;){if(e.tag===3){U0e(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError==\\\"function\\\"||typeof n.componentDidCatch==\\\"function\\\"&&(bg===null||!bg.has(n))){t=du(r,t),r=zye(2),n=yg(e,r,2),n!==null&&($ye(r,n,e,t),xS(n,2),Zf(n));break}}e=e.return}}function tG(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new zct;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(HK=!0,i.add(r),t=Kct.bind(null,t,e,r),e.then(t,t))}function Kct(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,cn===t&&(Qt&r)===r&&(Gi===4||Gi===3&&(Qt&62914560)===Qt&&300>ul()-wO?(Mr&2)===0&&kE(t,0):qK|=r,OE===Qt&&(OE=0)),Zf(t)}function R1e(t,e){e===0&&(e=vge()),t=$b(t,e),t!==null&&(xS(t,e),Zf(t))}function Zct(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),R1e(t,r)}function Qct(t,e){var r=0;switch(t.tag){case 31:case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(le(314))}n!==null&&n.delete(e),R1e(t,r)}function Jct(t,e){return iK(t,e)}var XP=null,sE=null,VG=!1,eO=!1,rG=!1,pg=0;function Zf(t){t!==sE&&t.next===null&&(sE===null?XP=sE=t:sE=sE.next=t),eO=!0,VG||(VG=!0,Xct())}function TS(t,e){if(!rG&&eO){rG=!0;do for(var r=!1,n=XP;n!==null;){if(!e)if(t!==0){var i=n.pendingLanes;if(i===0)var s=0;else{var o=n.suspendedLanes,a=n.pingedLanes;s=(1<<31-fl(42|t)+1)-1,s&=i&~(o&~a),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(r=!0,F0e(n,s))}else s=Qt,s=cO(n,n===cn?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||vS(n,s)||(r=!0,F0e(n,s));n=n.next}while(r);rG=!1}}function Yct(){P1e()}function P1e(){eO=VG=!1;var t=0;pg!==0&&alt()&&(t=pg);for(var e=ul(),r=null,n=XP;n!==null;){var i=n.next,s=O1e(n,e);s===0?(n.next=null,r===null?XP=i:r.next=i,i===null&&(sE=r)):(r=n,(t!==0||(s&3)!==0)&&(eO=!0)),n=i}Us!==0&&Us!==5||TS(t,!1),pg!==0&&(pg=0)}function O1e(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes&-62914561;0<s;){var o=31-fl(s),a=1<<o,c=i[o];c===-1?((a&r)===0||(a&n)!==0)&&(i[o]=Sat(a,e)):c<=e&&(t.expiredLanes|=a),s&=~a}if(e=cn,r=Qt,r=cO(t,t===e?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,r===0||t===e&&(Vr===2||Vr===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&OW(n),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||vS(t,r)){if(e=r&-r,e===t.callbackPriority)return e;switch(n!==null&&OW(n),oK(r)){case 2:case 8:r=bge;break;case 32:r=DP;break;case 268435456:r=wge;break;default:r=DP}return n=N1e.bind(null,t),r=iK(r,n),t.callbackPriority=e,t.callbackNode=r,e}return n!==null&&n!==null&&OW(n),t.callbackPriority=2,t.callbackNode=null,2}function N1e(t,e){if(Us!==0&&Us!==5)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(EO()&&t.callbackNode!==r)return null;var n=Qt;return n=cO(t,t===cn?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(y1e(t,n,e),O1e(t,ul()),t.callbackNode!=null&&t.callbackNode===r?N1e.bind(null,t):null)}function F0e(t,e){if(EO())return null;y1e(t,e,!0)}function Xct(){llt(function(){(Mr&6)!==0?iK(yge,Yct):P1e()})}function $K(){if(pg===0){var t=IE;t===0&&(t=tP,tP<<=1,(tP&261888)===0&&(tP=256)),pg=t}return pg}function j0e(t){return t==null||typeof t==\\\"symbol\\\"||typeof t==\\\"boolean\\\"?null:typeof t==\\\"function\\\"?t:wP(\\\"\\\"+t)}function H0e(t,e){var r=e.ownerDocument.createElement(\\\"input\\\");return r.name=e.name,r.value=e.value,t.id&&r.setAttribute(\\\"form\\\",t.id),e.parentNode.insertBefore(r,e),t=new FormData(t),r.parentNode.removeChild(r),t}function elt(t,e,r,n,i){if(e===\\\"submit\\\"&&r&&r.stateNode===i){var s=j0e((i[wc]||null).action),o=n.submitter;o&&(e=(e=o[wc]||null)?j0e(e.formAction):o.getAttribute(\\\"formAction\\\"),e!==null&&(s=e,o=null));var a=new lO(\\\"action\\\",\\\"action\\\",null,n,i);t.push({event:a,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(pg!==0){var c=o?H0e(i,o):new FormData(i);MG(r,{pending:!0,data:c,method:i.method,action:s},null,c)}}else typeof s==\\\"function\\\"&&(a.preventDefault(),c=o?H0e(i,o):new FormData(i),MG(r,{pending:!0,data:c,method:i.method,action:s},s,c))},currentTarget:i}]})}}for(pP=0;pP<_G.length;pP++)hP=_G[pP],q0e=hP.toLowerCase(),z0e=hP[0].toUpperCase()+hP.slice(1),Rd(q0e,\\\"on\\\"+z0e);var hP,q0e,z0e,pP;Rd($ge,\\\"onAnimationEnd\\\");Rd(Vge,\\\"onAnimationIteration\\\");Rd(Wge,\\\"onAnimationStart\\\");Rd(\\\"dblclick\\\",\\\"onDoubleClick\\\");Rd(\\\"focusin\\\",\\\"onFocus\\\");Rd(\\\"focusout\\\",\\\"onBlur\\\");Rd(bct,\\\"onTransitionRun\\\");Rd(wct,\\\"onTransitionStart\\\");Rd(vct,\\\"onTransitionCancel\\\");Rd(Gge,\\\"onTransitionEnd\\\");AE(\\\"onMouseEnter\\\",[\\\"mouseout\\\",\\\"mouseover\\\"]);AE(\\\"onMouseLeave\\\",[\\\"mouseout\\\",\\\"mouseover\\\"]);AE(\\\"onPointerEnter\\\",[\\\"pointerout\\\",\\\"pointerover\\\"]);AE(\\\"onPointerLeave\\\",[\\\"pointerout\\\",\\\"pointerover\\\"]);Hb(\\\"onChange\\\",\\\"change click focusin focusout input keydown keyup selectionchange\\\".split(\\\" \\\"));Hb(\\\"onSelect\\\",\\\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\\\".split(\\\" \\\"));Hb(\\\"onBeforeInput\\\",[\\\"compositionend\\\",\\\"keypress\\\",\\\"textInput\\\",\\\"paste\\\"]);Hb(\\\"onCompositionEnd\\\",\\\"compositionend focusout keydown keypress keyup mousedown\\\".split(\\\" \\\"));Hb(\\\"onCompositionStart\\\",\\\"compositionstart focusout keydown keypress keyup mousedown\\\".split(\\\" \\\"));Hb(\\\"onCompositionUpdate\\\",\\\"compositionupdate focusout keydown keypress keyup mousedown\\\".split(\\\" \\\"));var pS=\\\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\\\".split(\\\" \\\"),tlt=new Set(\\\"beforetoggle cancel close invalid load scroll scrollend toggle\\\".split(\\\" \\\").concat(pS));function k1e(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;s=a,i.currentTarget=l;try{s(i)}catch(d){UP(d)}i.currentTarget=null,s=c}else for(o=0;o<n.length;o++){if(a=n[o],c=a.instance,l=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;s=a,i.currentTarget=l;try{s(i)}catch(d){UP(d)}i.currentTarget=null,s=c}}}}function Wt(t,e){var r=e[mG];r===void 0&&(r=e[mG]=new Set);var n=t+\\\"__bubble\\\";r.has(n)||(B1e(e,t,2,!1),r.add(n))}function nG(t,e,r){var n=0;e&&(n|=4),B1e(r,t,n,e)}var mP=\\\"_reactListening\\\"+Math.random().toString(36).slice(2);function VK(t){if(!t[mP]){t[mP]=!0,Sge.forEach(function(r){r!==\\\"selectionchange\\\"&&(tlt.has(r)||nG(r,!1,t),nG(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[mP]||(e[mP]=!0,nG(\\\"selectionchange\\\",!1,e))}}function B1e(t,e,r,n){switch(G1e(e)){case 2:var i=Rlt;break;case 8:i=Plt;break;default:i=ZK}r=i.bind(null,e,r,t),i=void 0,!vG||e!==\\\"touchstart\\\"&&e!==\\\"touchmove\\\"&&e!==\\\"wheel\\\"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function iG(t,e,r,n,i){var s=n;if((e&1)===0&&(e&2)===0&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;a!==null;){if(o=cE(a),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){n=s=o;continue e}a=a.parentNode}}n=n.return}kge(function(){var l=s,d=lK(r),f=[];e:{var p=Kge.get(t);if(p!==void 0){var h=lO,m=t;switch(t){case\\\"keypress\\\":if(xP(r)===0)break e;case\\\"keydown\\\":case\\\"keyup\\\":h=Qat;break;case\\\"focusin\\\":m=\\\"focus\\\",h=DW;break;case\\\"focusout\\\":m=\\\"blur\\\",h=DW;break;case\\\"beforeblur\\\":case\\\"afterblur\\\":h=DW;break;case\\\"click\\\":if(r.button===2)break e;case\\\"auxclick\\\":case\\\"dblclick\\\":case\\\"mousedown\\\":case\\\"mousemove\\\":case\\\"mouseup\\\":case\\\"mouseout\\\":case\\\"mouseover\\\":case\\\"contextmenu\\\":h=Qme;break;case\\\"drag\\\":case\\\"dragend\\\":case\\\"dragenter\\\":case\\\"dragexit\\\":case\\\"dragleave\\\":case\\\"dragover\\\":case\\\"dragstart\\\":case\\\"drop\\\":h=Uat;break;case\\\"touchcancel\\\":case\\\"touchend\\\":case\\\"touchmove\\\":case\\\"touchstart\\\":h=Xat;break;case $ge:case Vge:case Wge:h=Hat;break;case Gge:h=tct;break;case\\\"scroll\\\":case\\\"scrollend\\\":h=Dat;break;case\\\"wheel\\\":h=nct;break;case\\\"copy\\\":case\\\"cut\\\":case\\\"paste\\\":h=zat;break;case\\\"gotpointercapture\\\":case\\\"lostpointercapture\\\":case\\\"pointercancel\\\":case\\\"pointerdown\\\":case\\\"pointermove\\\":case\\\"pointerout\\\":case\\\"pointerover\\\":case\\\"pointerup\\\":h=Yme;break;case\\\"toggle\\\":case\\\"beforetoggle\\\":h=sct}var g=(e&4)!==0,w=!g&&(t===\\\"scroll\\\"||t===\\\"scrollend\\\"),v=g?p!==null?p+\\\"Capture\\\":null:p;g=[];for(var b=l,_;b!==null;){var S=b;if(_=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||_===null||v===null||(S=sS(b,v),S!=null&&g.push(hS(b,S,_))),w)break;b=b.return}0<g.length&&(p=new h(p,m,null,r,d),f.push({event:p,listeners:g}))}}if((e&7)===0){e:{if(p=t===\\\"mouseover\\\"||t===\\\"pointerover\\\",h=t===\\\"mouseout\\\"||t===\\\"pointerout\\\",p&&r!==wG&&(m=r.relatedTarget||r.fromElement)&&(cE(m)||m[DE]))break e;if((h||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(m=r.relatedTarget||r.toElement,h=l,m=m?cE(m):null,m!==null&&(w=bS(m),g=m.tag,m!==w||g!==5&&g!==27&&g!==6)&&(m=null)):(h=null,m=l),h!==m)){if(g=Qme,S=\\\"onMouseLeave\\\",v=\\\"onMouseEnter\\\",b=\\\"mouse\\\",(t===\\\"pointerout\\\"||t===\\\"pointerover\\\")&&(g=Yme,S=\\\"onPointerLeave\\\",v=\\\"onPointerEnter\\\",b=\\\"pointer\\\"),w=h==null?p:q8(h),_=m==null?p:q8(m),p=new g(S,b+\\\"leave\\\",h,r,d),p.target=w,p.relatedTarget=_,S=null,cE(d)===l&&(g=new g(v,b+\\\"enter\\\",m,r,d),g.target=_,g.relatedTarget=w,S=g),w=S,h&&m)t:{for(g=rlt,v=h,b=m,_=0,S=v;S;S=g(S))_++;S=0;for(var T=b;T;T=g(T))S++;for(;0<_-S;)v=g(v),_--;for(;0<S-_;)b=g(b),S--;for(;_--;){if(v===b||b!==null&&v===b.alternate){g=v;break t}v=g(v),b=g(b)}g=null}else g=null;h!==null&&$0e(f,p,h,g,!1),m!==null&&w!==null&&$0e(f,w,m,g,!0)}}e:{if(p=l?q8(l):window,h=p.nodeName&&p.nodeName.toLowerCase(),h===\\\"select\\\"||h===\\\"input\\\"&&p.type===\\\"file\\\")var N=r0e;else if(t0e(p))if(Fge)N=mct;else{N=pct;var O=fct}else h=p.nodeName,!h||h.toLowerCase()!==\\\"input\\\"||p.type!==\\\"checkbox\\\"&&p.type!==\\\"radio\\\"?l&&cK(l.elementType)&&(N=r0e):N=hct;if(N&&(N=N(t,l))){Uge(f,N,r,d);break e}O&&O(t,p,l),t===\\\"focusout\\\"&&l&&p.type===\\\"number\\\"&&l.memoizedProps.value!=null&&bG(p,\\\"number\\\",p.value)}switch(O=l?q8(l):window,t){case\\\"focusin\\\":(t0e(O)||O.contentEditable===\\\"true\\\")&&(dE=O,xG=l,G8=null);break;case\\\"focusout\\\":G8=xG=dE=null;break;case\\\"mousedown\\\":EG=!0;break;case\\\"contextmenu\\\":case\\\"mouseup\\\":case\\\"dragend\\\":EG=!1,o0e(f,r,d);break;case\\\"selectionchange\\\":if(yct)break;case\\\"keydown\\\":case\\\"keyup\\\":o0e(f,r,d)}var L;if(fK)e:{switch(t){case\\\"compositionstart\\\":var B=\\\"onCompositionStart\\\";break e;case\\\"compositionend\\\":B=\\\"onCompositionEnd\\\";break e;case\\\"compositionupdate\\\":B=\\\"onCompositionUpdate\\\";break e}B=void 0}else uE?Dge(t,r)&&(B=\\\"onCompositionEnd\\\"):t===\\\"keydown\\\"&&r.keyCode===229&&(B=\\\"onCompositionStart\\\");B&&(Mge&&r.locale!==\\\"ko\\\"&&(uE||B!==\\\"onCompositionStart\\\"?B===\\\"onCompositionEnd\\\"&&uE&&(L=Bge()):(ug=d,uK=\\\"value\\\"in ug?ug.value:ug.textContent,uE=!0)),O=tO(l,B),0<O.length&&(B=new Jme(B,t,null,r,d),f.push({event:B,listeners:O}),L?B.data=L:(L=Lge(r),L!==null&&(B.data=L)))),(L=act?cct(t,r):lct(t,r))&&(B=tO(l,\\\"onBeforeInput\\\"),0<B.length&&(O=new Jme(\\\"onBeforeInput\\\",\\\"beforeinput\\\",null,r,d),f.push({event:O,listeners:B}),O.data=L)),elt(f,t,l,r,d)}k1e(f,e)})}function hS(t,e,r){return{instance:t,listener:e,currentTarget:r}}function tO(t,e){for(var r=e+\\\"Capture\\\",n=[];t!==null;){var i=t,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=sS(t,r),i!=null&&n.unshift(hS(t,i,s)),i=sS(t,e),i!=null&&n.push(hS(t,i,s))),t.tag===3)return n;t=t.return}return[]}function rlt(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $0e(t,e,r,n,i){for(var s=e._reactName,o=[];r!==null&&r!==n;){var a=r,c=a.alternate,l=a.stateNode;if(a=a.tag,c!==null&&c===n)break;a!==5&&a!==26&&a!==27||l===null||(c=l,i?(l=sS(r,s),l!=null&&o.unshift(hS(r,l,c))):i||(l=sS(r,s),l!=null&&o.push(hS(r,l,c)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var nlt=/\\\\r\\\\n?/g,ilt=/\\\\u0000|\\\\uFFFD/g;function V0e(t){return(typeof t==\\\"string\\\"?t:\\\"\\\"+t).replace(nlt,`\\n`).replace(ilt,\\\"\\\")}function M1e(t,e){return e=V0e(e),V0e(t)===e}function Yr(t,e,r,n,i,s){switch(r){case\\\"children\\\":typeof n==\\\"string\\\"?e===\\\"body\\\"||e===\\\"textarea\\\"&&n===\\\"\\\"||TE(t,n):(typeof n==\\\"number\\\"||typeof n==\\\"bigint\\\")&&e!==\\\"body\\\"&&TE(t,\\\"\\\"+n);break;case\\\"className\\\":iP(t,\\\"class\\\",n);break;case\\\"tabIndex\\\":iP(t,\\\"tabindex\\\",n);break;case\\\"dir\\\":case\\\"role\\\":case\\\"viewBox\\\":case\\\"width\\\":case\\\"height\\\":iP(t,r,n);break;case\\\"style\\\":Nge(t,n,s);break;case\\\"data\\\":if(e!==\\\"object\\\"){iP(t,\\\"data\\\",n);break}case\\\"src\\\":case\\\"href\\\":if(n===\\\"\\\"&&(e!==\\\"a\\\"||r!==\\\"href\\\")){t.removeAttribute(r);break}if(n==null||typeof n==\\\"function\\\"||typeof n==\\\"symbol\\\"||typeof n==\\\"boolean\\\"){t.removeAttribute(r);break}n=wP(\\\"\\\"+n),t.setAttribute(r,n);break;case\\\"action\\\":case\\\"formAction\\\":if(typeof n==\\\"function\\\"){t.setAttribute(r,\\\"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\\\");break}else typeof s==\\\"function\\\"&&(r===\\\"formAction\\\"?(e!==\\\"input\\\"&&Yr(t,e,\\\"name\\\",i.name,i,null),Yr(t,e,\\\"formEncType\\\",i.formEncType,i,null),Yr(t,e,\\\"formMethod\\\",i.formMethod,i,null),Yr(t,e,\\\"formTarget\\\",i.formTarget,i,null)):(Yr(t,e,\\\"encType\\\",i.encType,i,null),Yr(t,e,\\\"method\\\",i.method,i,null),Yr(t,e,\\\"target\\\",i.target,i,null)));if(n==null||typeof n==\\\"symbol\\\"||typeof n==\\\"boolean\\\"){t.removeAttribute(r);break}n=wP(\\\"\\\"+n),t.setAttribute(r,n);break;case\\\"onClick\\\":n!=null&&(t.onclick=qh);break;case\\\"onScroll\\\":n!=null&&Wt(\\\"scroll\\\",t);break;case\\\"onScrollEnd\\\":n!=null&&Wt(\\\"scrollend\\\",t);break;case\\\"dangerouslySetInnerHTML\\\":if(n!=null){if(typeof n!=\\\"object\\\"||!(\\\"__html\\\"in n))throw Error(le(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(le(60));t.innerHTML=r}}break;case\\\"multiple\\\":t.multiple=n&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\";break;case\\\"muted\\\":t.muted=n&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\";break;case\\\"suppressContentEditableWarning\\\":case\\\"suppressHydrationWarning\\\":case\\\"defaultValue\\\":case\\\"defaultChecked\\\":case\\\"innerHTML\\\":case\\\"ref\\\":break;case\\\"autoFocus\\\":break;case\\\"xlinkHref\\\":if(n==null||typeof n==\\\"function\\\"||typeof n==\\\"boolean\\\"||typeof n==\\\"symbol\\\"){t.removeAttribute(\\\"xlink:href\\\");break}r=wP(\\\"\\\"+n),t.setAttributeNS(\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:href\\\",r);break;case\\\"contentEditable\\\":case\\\"spellCheck\\\":case\\\"draggable\\\":case\\\"value\\\":case\\\"autoReverse\\\":case\\\"externalResourcesRequired\\\":case\\\"focusable\\\":case\\\"preserveAlpha\\\":n!=null&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\"?t.setAttribute(r,\\\"\\\"+n):t.removeAttribute(r);break;case\\\"inert\\\":case\\\"allowFullScreen\\\":case\\\"async\\\":case\\\"autoPlay\\\":case\\\"controls\\\":case\\\"default\\\":case\\\"defer\\\":case\\\"disabled\\\":case\\\"disablePictureInPicture\\\":case\\\"disableRemotePlayback\\\":case\\\"formNoValidate\\\":case\\\"hidden\\\":case\\\"loop\\\":case\\\"noModule\\\":case\\\"noValidate\\\":case\\\"open\\\":case\\\"playsInline\\\":case\\\"readOnly\\\":case\\\"required\\\":case\\\"reversed\\\":case\\\"scoped\\\":case\\\"seamless\\\":case\\\"itemScope\\\":n&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\"?t.setAttribute(r,\\\"\\\"):t.removeAttribute(r);break;case\\\"capture\\\":case\\\"download\\\":n===!0?t.setAttribute(r,\\\"\\\"):n!==!1&&n!=null&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\"?t.setAttribute(r,n):t.removeAttribute(r);break;case\\\"cols\\\":case\\\"rows\\\":case\\\"size\\\":case\\\"span\\\":n!=null&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\"&&!isNaN(n)&&1<=n?t.setAttribute(r,n):t.removeAttribute(r);break;case\\\"rowSpan\\\":case\\\"start\\\":n==null||typeof n==\\\"function\\\"||typeof n==\\\"symbol\\\"||isNaN(n)?t.removeAttribute(r):t.setAttribute(r,n);break;case\\\"popover\\\":Wt(\\\"beforetoggle\\\",t),Wt(\\\"toggle\\\",t),bP(t,\\\"popover\\\",n);break;case\\\"xlinkActuate\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:actuate\\\",n);break;case\\\"xlinkArcrole\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:arcrole\\\",n);break;case\\\"xlinkRole\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:role\\\",n);break;case\\\"xlinkShow\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:show\\\",n);break;case\\\"xlinkTitle\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:title\\\",n);break;case\\\"xlinkType\\\":Bh(t,\\\"http://www.w3.org/1999/xlink\\\",\\\"xlink:type\\\",n);break;case\\\"xmlBase\\\":Bh(t,\\\"http://www.w3.org/XML/1998/namespace\\\",\\\"xml:base\\\",n);break;case\\\"xmlLang\\\":Bh(t,\\\"http://www.w3.org/XML/1998/namespace\\\",\\\"xml:lang\\\",n);break;case\\\"xmlSpace\\\":Bh(t,\\\"http://www.w3.org/XML/1998/namespace\\\",\\\"xml:space\\\",n);break;case\\\"is\\\":bP(t,\\\"is\\\",n);break;case\\\"innerText\\\":case\\\"textContent\\\":break;default:(!(2<r.length)||r[0]!==\\\"o\\\"&&r[0]!==\\\"O\\\"||r[1]!==\\\"n\\\"&&r[1]!==\\\"N\\\")&&(r=Bat.get(r)||r,bP(t,r,n))}}function WG(t,e,r,n,i,s){switch(r){case\\\"style\\\":Nge(t,n,s);break;case\\\"dangerouslySetInnerHTML\\\":if(n!=null){if(typeof n!=\\\"object\\\"||!(\\\"__html\\\"in n))throw Error(le(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(le(60));t.innerHTML=r}}break;case\\\"children\\\":typeof n==\\\"string\\\"?TE(t,n):(typeof n==\\\"number\\\"||typeof n==\\\"bigint\\\")&&TE(t,\\\"\\\"+n);break;case\\\"onScroll\\\":n!=null&&Wt(\\\"scroll\\\",t);break;case\\\"onScrollEnd\\\":n!=null&&Wt(\\\"scrollend\\\",t);break;case\\\"onClick\\\":n!=null&&(t.onclick=qh);break;case\\\"suppressContentEditableWarning\\\":case\\\"suppressHydrationWarning\\\":case\\\"innerHTML\\\":case\\\"ref\\\":break;case\\\"innerText\\\":case\\\"textContent\\\":break;default:if(!Age.hasOwnProperty(r))e:{if(r[0]===\\\"o\\\"&&r[1]===\\\"n\\\"&&(i=r.endsWith(\\\"Capture\\\"),e=r.slice(2,i?r.length-7:void 0),s=t[wc]||null,s=s!=null?s[r]:null,typeof s==\\\"function\\\"&&t.removeEventListener(e,s,i),typeof n==\\\"function\\\")){typeof s!=\\\"function\\\"&&s!==null&&(r in t?t[r]=null:t.hasAttribute(r)&&t.removeAttribute(r)),t.addEventListener(e,n,i);break e}r in t?t[r]=n:n===!0?t.setAttribute(r,\\\"\\\"):bP(t,r,n)}}}function Po(t,e,r){switch(e){case\\\"div\\\":case\\\"span\\\":case\\\"svg\\\":case\\\"path\\\":case\\\"a\\\":case\\\"g\\\":case\\\"p\\\":case\\\"li\\\":break;case\\\"img\\\":Wt(\\\"error\\\",t),Wt(\\\"load\\\",t);var n=!1,i=!1,s;for(s in r)if(r.hasOwnProperty(s)){var o=r[s];if(o!=null)switch(s){case\\\"src\\\":n=!0;break;case\\\"srcSet\\\":i=!0;break;case\\\"children\\\":case\\\"dangerouslySetInnerHTML\\\":throw Error(le(137,e));default:Yr(t,e,s,o,r,null)}}i&&Yr(t,e,\\\"srcSet\\\",r.srcSet,r,null),n&&Yr(t,e,\\\"src\\\",r.src,r,null);return;case\\\"input\\\":Wt(\\\"invalid\\\",t);var a=s=o=i=null,c=null,l=null;for(n in r)if(r.hasOwnProperty(n)){var d=r[n];if(d!=null)switch(n){case\\\"name\\\":i=d;break;case\\\"type\\\":o=d;break;case\\\"checked\\\":c=d;break;case\\\"defaultChecked\\\":l=d;break;case\\\"value\\\":s=d;break;case\\\"defaultValue\\\":a=d;break;case\\\"children\\\":case\\\"dangerouslySetInnerHTML\\\":if(d!=null)throw Error(le(137,e));break;default:Yr(t,e,n,d,r,null)}}Rge(t,s,a,c,l,o,i,!1);return;case\\\"select\\\":Wt(\\\"invalid\\\",t),n=o=s=null;for(i in r)if(r.hasOwnProperty(i)&&(a=r[i],a!=null))switch(i){case\\\"value\\\":s=a;break;case\\\"defaultValue\\\":o=a;break;case\\\"multiple\\\":n=a;default:Yr(t,e,i,a,r,null)}e=s,r=o,t.multiple=!!n,e!=null?wE(t,!!n,e,!1):r!=null&&wE(t,!!n,r,!0);return;case\\\"textarea\\\":Wt(\\\"invalid\\\",t),s=i=n=null;for(o in r)if(r.hasOwnProperty(o)&&(a=r[o],a!=null))switch(o){case\\\"value\\\":n=a;break;case\\\"defaultValue\\\":i=a;break;case\\\"children\\\":s=a;break;case\\\"dangerouslySetInnerHTML\\\":if(a!=null)throw Error(le(91));break;default:Yr(t,e,o,a,r,null)}Oge(t,n,i,s);return;case\\\"option\\\":for(c in r)r.hasOwnProperty(c)&&(n=r[c],n!=null)&&(c===\\\"selected\\\"?t.selected=n&&typeof n!=\\\"function\\\"&&typeof n!=\\\"symbol\\\":Yr(t,e,c,n,r,null));return;case\\\"dialog\\\":Wt(\\\"beforetoggle\\\",t),Wt(\\\"toggle\\\",t),Wt(\\\"cancel\\\",t),Wt(\\\"close\\\",t);break;case\\\"iframe\\\":case\\\"object\\\":Wt(\\\"load\\\",t);break;case\\\"video\\\":case\\\"audio\\\":for(n=0;n<pS.length;n++)Wt(pS[n],t);break;case\\\"image\\\":Wt(\\\"error\\\",t),Wt(\\\"load\\\",t);break;case\\\"details\\\":Wt(\\\"toggle\\\",t);break;case\\\"embed\\\":case\\\"source\\\":case\\\"link\\\":Wt(\\\"error\\\",t),Wt(\\\"load\\\",t);case\\\"area\\\":case\\\"base\\\":case\\\"br\\\":case\\\"col\\\":case\\\"hr\\\":case\\\"keygen\\\":case\\\"meta\\\":case\\\"param\\\":case\\\"track\\\":case\\\"wbr\\\":case\\\"menuitem\\\":for(l in r)if(r.hasOwnProperty(l)&&(n=r[l],n!=null))switch(l){case\\\"children\\\":case\\\"dangerouslySetInnerHTML\\\":throw Error(le(137,e));default:Yr(t,e,l,n,r,null)}return;default:if(cK(e)){for(d in r)r.hasOwnProperty(d)&&(n=r[d],n!==void 0&&WG(t,e,d,n,r,void 0));return}}for(a in r)r.hasOwnProperty(a)&&(n=r[a],n!=null&&Yr(t,e,a,n,r,null))}function slt(t,e,r,n){switch(e){case\\\"div\\\":case\\\"span\\\":case\\\"svg\\\":case\\\"path\\\":case\\\"a\\\":case\\\"g\\\":case\\\"p\\\":case\\\"li\\\":break;case\\\"input\\\":var i=null,s=null,o=null,a=null,c=null,l=null,d=null;for(h in r){var f=r[h];if(r.hasOwnProperty(h)&&f!=null)switch(h){case\\\"checked\\\":break;case\\\"value\\\":break;case\\\"defaultValue\\\":c=f;default:n.hasOwnProperty(h)||Yr(t,e,h,null,n,f)}}for(var p in n){var h=n[p];if(f=r[p],n.hasOwnProperty(p)&&(h!=null||f!=null))switch(p){case\\\"type\\\":s=h;break;case\\\"name\\\":i=h;break;case\\\"checked\\\":l=h;break;case\\\"defaultChecked\\\":d=h;break;case\\\"value\\\":o=h;break;case\\\"defaultValue\\\":a=h;break;case\\\"children\\\":case\\\"dangerouslySetInnerHTML\\\":if(h!=null)throw Error(le(137,e));break;default:h!==f&&Yr(t,e,p,h,n,f)}}yG(t,o,a,c,l,d,s,i);return;case\\\"select\\\":h=o=a=p=null;for(s in r)if(c=r[s],r.hasOwnProperty(s)&&c!=null)switch(s){case\\\"value\\\":break;case\\\"multiple\\\":h=c;default:n.hasOwnProperty(s)||Yr(t,e,s,null,n,c)}for(i in n)if(s=n[i],c=r[i],n.hasOwnProperty(i)&&(s!=null||c!=null))switch(i){case\\\"value\\\":p=s;break;case\\\"defaultValue\\\":a=s;break;case\\\"multiple\\\":o=s;default:s!==c&&Yr(t,e,i,s,n,c)}e=a,r=o,n=h,p!=null?wE(t,!!r,p,!1):!!n!=!!r&&(e!=null?wE(t,!!r,e,!0):wE(t,!!r,r?[]:\\\"\\\",!1));return;case\\\"textarea\\\":h=p=null;for(a in r)if(i=r[a],r.hasOwnProperty(a)&&i!=null&&!n.hasOwnProperty(a))switch(a){case\\\"value\\\":break;case\\\"children\\\":break;default:Yr(t,e,a,null,n,i)}for(o in n)if(i=n[o],s=r[o],n.hasOwnProperty(o)&&(i!=null||s!=null))switch(o){case\\\"value\\\":p=i;break;case\\\"defaultValue\\\":h=i;break;case\\\"children\\\":break;case\\\"dangerouslySetInnerHTML\\\":if(i!=null)throw Error(le(91));break;default:i!==s&&Yr(t,e,o,i,n,s)}Pge(t,p,h);return;case\\\"option\\\":for(var m in r)p=r[m],r.hasOwnProperty(m)&&p!=null&&!n.hasOwnProperty(m)&&(m===\\\"selected\\\"?t.selected=!1:Yr(t,e,m,null,n,p));for(c in n)p=n[c],h=r[c],n.hasOwnProperty(c)&&p!==h&&(p!=null||h!=null)&&(c===\\\"selected\\\"?t.selected=p&&typeof p!=\\\"function\\\"&&typeof p!=\\\"symbol\\\":Yr(t,e,c,p,n,h));return;case\\\"img\\\":case\\\"link\\\":case\\\"area\\\":case\\\"base\\\":case\\\"br\\\":case\\\"col\\\":case\\\"embed\\\":case\\\"hr\\\":case\\\"keygen\\\":case\\\"meta\\\":case\\\"param\\\":case\\\"source\\\":case\\\"track\\\":case\\\"wbr\\\":case\\\"menuitem\\\":for(var g in r)p=r[g],r.hasOwnProperty(g)&&p!=null&&!n.hasOwnProperty(g)&&Yr(t,e,g,null,n,p);for(l in n)if(p=n[l],h=r[l],n.hasOwnProperty(l)&&p!==h&&(p!=null||h!=null))switch(l){case\\\"children\\\":case\\\"dangerouslySetInnerHTML\\\":if(p!=null)throw Error(le(137,e));break;default:Yr(t,e,l,p,n,h)}return;default:if(cK(e)){for(var w in r)p=r[w],r.hasOwnProperty(w)&&p!==void 0&&!n.hasOwnProperty(w)&&WG(t,e,w,void 0,n,p);for(d in n)p=n[d],h=r[d],!n.hasOwnProperty(d)||p===h||p===void 0&&h===void 0||WG(t,e,d,p,n,h);return}}for(var v in r)p=r[v],r.hasOwnProperty(v)&&p!=null&&!n.hasOwnProperty(v)&&Yr(t,e,v,null,n,p);for(f in n)p=n[f],h=r[f],!n.hasOwnProperty(f)||p===h||p==null&&h==null||Yr(t,e,f,p,n,h)}function W0e(t){switch(t){case\\\"css\\\":case\\\"script\\\":case\\\"font\\\":case\\\"img\\\":case\\\"image\\\":case\\\"input\\\":case\\\"link\\\":return!0;default:return!1}}function olt(){if(typeof performance.getEntriesByType==\\\"function\\\"){for(var t=0,e=0,r=performance.getEntriesByType(\\\"resource\\\"),n=0;n<r.length;n++){var i=r[n],s=i.transferSize,o=i.initiatorType,a=i.duration;if(s&&a&&W0e(o)){for(o=0,a=i.responseEnd,n+=1;n<r.length;n++){var c=r[n],l=c.startTime;if(l>a)break;var d=c.transferSize,f=c.initiatorType;d&&W0e(f)&&(c=c.responseEnd,o+=d*(c<a?1:(a-l)/(c-l)))}if(--n,e+=8*(s+o)/(i.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t==\\\"number\\\")?t:5}var GG=null,KG=null;function rO(t){return t.nodeType===9?t:t.ownerDocument}function G0e(t){switch(t){case\\\"http://www.w3.org/2000/svg\\\":return 1;case\\\"http://www.w3.org/1998/Math/MathML\\\":return 2;default:return 0}}function D1e(t,e){if(t===0)switch(e){case\\\"svg\\\":return 1;case\\\"math\\\":return 2;default:return 0}return t===1&&e===\\\"foreignObject\\\"?0:t}function ZG(t,e){return t===\\\"textarea\\\"||t===\\\"noscript\\\"||typeof e.children==\\\"string\\\"||typeof e.children==\\\"number\\\"||typeof e.children==\\\"bigint\\\"||typeof e.dangerouslySetInnerHTML==\\\"object\\\"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var sG=null;function alt(){var t=window.event;return t&&t.type===\\\"popstate\\\"?t===sG?!1:(sG=t,!0):(sG=null,!1)}var L1e=typeof setTimeout==\\\"function\\\"?setTimeout:void 0,clt=typeof clearTimeout==\\\"function\\\"?clearTimeout:void 0,K0e=typeof Promise==\\\"function\\\"?Promise:void 0,llt=typeof queueMicrotask==\\\"function\\\"?queueMicrotask:typeof K0e<\\\"u\\\"?function(t){return K0e.resolve(null).then(t).catch(ult)}:L1e;function ult(t){setTimeout(function(){throw t})}function Ig(t){return t===\\\"head\\\"}function Z0e(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r===\\\"/$\\\"||r===\\\"/&\\\"){if(n===0){t.removeChild(i),ME(e);return}n--}else if(r===\\\"$\\\"||r===\\\"$?\\\"||r===\\\"$~\\\"||r===\\\"$!\\\"||r===\\\"&\\\")n++;else if(r===\\\"html\\\")nS(t.ownerDocument.documentElement);else if(r===\\\"head\\\"){r=t.ownerDocument.head,nS(r);for(var s=r.firstChild;s;){var o=s.nextSibling,a=s.nodeName;s[ES]||a===\\\"SCRIPT\\\"||a===\\\"STYLE\\\"||a===\\\"LINK\\\"&&s.rel.toLowerCase()===\\\"stylesheet\\\"||r.removeChild(s),s=o}}else r===\\\"body\\\"&&nS(t.ownerDocument.body);r=i}while(r);ME(e)}function Q0e(t,e){var r=t;t=0;do{var n=r.nextSibling;if(r.nodeType===1?e?(r._stashedDisplay=r.style.display,r.style.display=\\\"none\\\"):(r.style.display=r._stashedDisplay||\\\"\\\",r.getAttribute(\\\"style\\\")===\\\"\\\"&&r.removeAttribute(\\\"style\\\")):r.nodeType===3&&(e?(r._stashedText=r.nodeValue,r.nodeValue=\\\"\\\"):r.nodeValue=r._stashedText||\\\"\\\"),n&&n.nodeType===8)if(r=n.data,r===\\\"/$\\\"){if(t===0)break;t--}else r!==\\\"$\\\"&&r!==\\\"$?\\\"&&r!==\\\"$~\\\"&&r!==\\\"$!\\\"||t++;r=n}while(r)}function QG(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var r=e;switch(e=e.nextSibling,r.nodeName){case\\\"HTML\\\":case\\\"HEAD\\\":case\\\"BODY\\\":QG(r),aK(r);continue;case\\\"SCRIPT\\\":case\\\"STYLE\\\":continue;case\\\"LINK\\\":if(r.rel.toLowerCase()===\\\"stylesheet\\\")continue}t.removeChild(r)}}function dlt(t,e,r,n){for(;t.nodeType===1;){var i=r;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!==\\\"INPUT\\\"||t.type!==\\\"hidden\\\"))break}else if(n){if(!t[ES])switch(e){case\\\"meta\\\":if(!t.hasAttribute(\\\"itemprop\\\"))break;return t;case\\\"link\\\":if(s=t.getAttribute(\\\"rel\\\"),s===\\\"stylesheet\\\"&&t.hasAttribute(\\\"data-precedence\\\"))break;if(s!==i.rel||t.getAttribute(\\\"href\\\")!==(i.href==null||i.href===\\\"\\\"?null:i.href)||t.getAttribute(\\\"crossorigin\\\")!==(i.crossOrigin==null?null:i.crossOrigin)||t.getAttribute(\\\"title\\\")!==(i.title==null?null:i.title))break;return t;case\\\"style\\\":if(t.hasAttribute(\\\"data-precedence\\\"))break;return t;case\\\"script\\\":if(s=t.getAttribute(\\\"src\\\"),(s!==(i.src==null?null:i.src)||t.getAttribute(\\\"type\\\")!==(i.type==null?null:i.type)||t.getAttribute(\\\"crossorigin\\\")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&t.hasAttribute(\\\"async\\\")&&!t.hasAttribute(\\\"itemprop\\\"))break;return t;default:return t}}else if(e===\\\"input\\\"&&t.type===\\\"hidden\\\"){var s=i.name==null?null:\\\"\\\"+i.name;if(i.type===\\\"hidden\\\"&&t.getAttribute(\\\"name\\\")===s)return t}else return t;if(t=hu(t.nextSibling),t===null)break}return null}function flt(t,e,r){if(e===\\\"\\\")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!==\\\"INPUT\\\"||t.type!==\\\"hidden\\\")&&!r||(t=hu(t.nextSibling),t===null))return null;return t}function U1e(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!==\\\"INPUT\\\"||t.type!==\\\"hidden\\\")&&!e||(t=hu(t.nextSibling),t===null))return null;return t}function JG(t){return t.data===\\\"$?\\\"||t.data===\\\"$~\\\"}function YG(t){return t.data===\\\"$!\\\"||t.data===\\\"$?\\\"&&t.ownerDocument.readyState!==\\\"loading\\\"}function plt(t,e){var r=t.ownerDocument;if(t.data===\\\"$~\\\")t._reactRetry=e;else if(t.data!==\\\"$?\\\"||r.readyState!==\\\"loading\\\")e();else{var n=function(){e(),r.removeEventListener(\\\"DOMContentLoaded\\\",n)};r.addEventListener(\\\"DOMContentLoaded\\\",n),t._reactRetry=n}}function hu(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e===\\\"$\\\"||e===\\\"$!\\\"||e===\\\"$?\\\"||e===\\\"$~\\\"||e===\\\"&\\\"||e===\\\"F!\\\"||e===\\\"F\\\")break;if(e===\\\"/$\\\"||e===\\\"/&\\\")return null}}return t}var XG=null;function J0e(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r===\\\"/$\\\"||r===\\\"/&\\\"){if(e===0)return hu(t.nextSibling);e--}else r!==\\\"$\\\"&&r!==\\\"$!\\\"&&r!==\\\"$?\\\"&&r!==\\\"$~\\\"&&r!==\\\"&\\\"||e++}t=t.nextSibling}return null}function Y0e(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r===\\\"$\\\"||r===\\\"$!\\\"||r===\\\"$?\\\"||r===\\\"$~\\\"||r===\\\"&\\\"){if(e===0)return t;e--}else r!==\\\"/$\\\"&&r!==\\\"/&\\\"||e++}t=t.previousSibling}return null}function F1e(t,e,r){switch(e=rO(r),t){case\\\"html\\\":if(t=e.documentElement,!t)throw Error(le(452));return t;case\\\"head\\\":if(t=e.head,!t)throw Error(le(453));return t;case\\\"body\\\":if(t=e.body,!t)throw Error(le(454));return t;default:throw Error(le(451))}}function nS(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);aK(t)}var mu=new Map,X0e=new Set;function nO(t){return typeof t.getRootNode==\\\"function\\\"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Yh=Dr.d;Dr.d={f:hlt,r:mlt,D:glt,C:ylt,L:blt,m:wlt,X:xlt,S:vlt,M:Elt};function hlt(){var t=Yh.f(),e=vO();return t||e}function mlt(t){var e=LE(t);e!==null&&e.tag===5&&e.type===\\\"form\\\"?Nye(e):Yh.r(t)}var HE=typeof document>\\\"u\\\"?null:document;function j1e(t,e,r){var n=HE;if(n&&typeof e==\\\"string\\\"&&e){var i=uu(e);i='link[rel=\\\"'+t+'\\\"][href=\\\"'+i+'\\\"]',typeof r==\\\"string\\\"&&(i+='[crossorigin=\\\"'+r+'\\\"]'),X0e.has(i)||(X0e.add(i),t={rel:t,crossOrigin:r,href:e},n.querySelector(i)===null&&(e=n.createElement(\\\"link\\\"),Po(e,\\\"link\\\",t),to(e),n.head.appendChild(e)))}}function glt(t){Yh.D(t),j1e(\\\"dns-prefetch\\\",t,null)}function ylt(t,e){Yh.C(t,e),j1e(\\\"preconnect\\\",t,e)}function blt(t,e,r){Yh.L(t,e,r);var n=HE;if(n&&t&&e){var i='link[rel=\\\"preload\\\"][as=\\\"'+uu(e)+'\\\"]';e===\\\"image\\\"&&r&&r.imageSrcSet?(i+='[imagesrcset=\\\"'+uu(r.imageSrcSet)+'\\\"]',typeof r.imageSizes==\\\"string\\\"&&(i+='[imagesizes=\\\"'+uu(r.imageSizes)+'\\\"]')):i+='[href=\\\"'+uu(t)+'\\\"]';var s=i;switch(e){case\\\"style\\\":s=BE(t);break;case\\\"script\\\":s=qE(t)}mu.has(s)||(t=$n({rel:\\\"preload\\\",href:e===\\\"image\\\"&&r&&r.imageSrcSet?void 0:t,as:e},r),mu.set(s,t),n.querySelector(i)!==null||e===\\\"style\\\"&&n.querySelector(IS(s))||e===\\\"script\\\"&&n.querySelector(RS(s))||(e=n.createElement(\\\"link\\\"),Po(e,\\\"link\\\",t),to(e),n.head.appendChild(e)))}}function wlt(t,e){Yh.m(t,e);var r=HE;if(r&&t){var n=e&&typeof e.as==\\\"string\\\"?e.as:\\\"script\\\",i='link[rel=\\\"modulepreload\\\"][as=\\\"'+uu(n)+'\\\"][href=\\\"'+uu(t)+'\\\"]',s=i;switch(n){case\\\"audioworklet\\\":case\\\"paintworklet\\\":case\\\"serviceworker\\\":case\\\"sharedworker\\\":case\\\"worker\\\":case\\\"script\\\":s=qE(t)}if(!mu.has(s)&&(t=$n({rel:\\\"modulepreload\\\",href:t},e),mu.set(s,t),r.querySelector(i)===null)){switch(n){case\\\"audioworklet\\\":case\\\"paintworklet\\\":case\\\"serviceworker\\\":case\\\"sharedworker\\\":case\\\"worker\\\":case\\\"script\\\":if(r.querySelector(RS(s)))return}n=r.createElement(\\\"link\\\"),Po(n,\\\"link\\\",t),to(n),r.head.appendChild(n)}}}function vlt(t,e,r){Yh.S(t,e,r);var n=HE;if(n&&t){var i=bE(n).hoistableStyles,s=BE(t);e=e||\\\"default\\\";var o=i.get(s);if(!o){var a={loading:0,preload:null};if(o=n.querySelector(IS(s)))a.loading=5;else{t=$n({rel:\\\"stylesheet\\\",href:t,\\\"data-precedence\\\":e},r),(r=mu.get(s))&&WK(t,r);var c=o=n.createElement(\\\"link\\\");to(c),Po(c,\\\"link\\\",t),c._p=new Promise(function(l,d){c.onload=l,c.onerror=d}),c.addEventListener(\\\"load\\\",function(){a.loading|=1}),c.addEventListener(\\\"error\\\",function(){a.loading|=2}),a.loading|=4,RP(o,e,n)}o={type:\\\"stylesheet\\\",instance:o,count:1,state:a},i.set(s,o)}}}function xlt(t,e){Yh.X(t,e);var r=HE;if(r&&t){var n=bE(r).hoistableScripts,i=qE(t),s=n.get(i);s||(s=r.querySelector(RS(i)),s||(t=$n({src:t,async:!0},e),(e=mu.get(i))&&GK(t,e),s=r.createElement(\\\"script\\\"),to(s),Po(s,\\\"link\\\",t),r.head.appendChild(s)),s={type:\\\"script\\\",instance:s,count:1,state:null},n.set(i,s))}}function Elt(t,e){Yh.M(t,e);var r=HE;if(r&&t){var n=bE(r).hoistableScripts,i=qE(t),s=n.get(i);s||(s=r.querySelector(RS(i)),s||(t=$n({src:t,async:!0,type:\\\"module\\\"},e),(e=mu.get(i))&&GK(t,e),s=r.createElement(\\\"script\\\"),to(s),Po(s,\\\"link\\\",t),r.head.appendChild(s)),s={type:\\\"script\\\",instance:s,count:1,state:null},n.set(i,s))}}function ege(t,e,r,n){var i=(i=hg.current)?nO(i):null;if(!i)throw Error(le(446));switch(t){case\\\"meta\\\":case\\\"title\\\":return null;case\\\"style\\\":return typeof r.precedence==\\\"string\\\"&&typeof r.href==\\\"string\\\"?(e=BE(r.href),r=bE(i).hoistableStyles,n=r.get(e),n||(n={type:\\\"style\\\",instance:null,count:0,state:null},r.set(e,n)),n):{type:\\\"void\\\",instance:null,count:0,state:null};case\\\"link\\\":if(r.rel===\\\"stylesheet\\\"&&typeof r.href==\\\"string\\\"&&typeof r.precedence==\\\"string\\\"){t=BE(r.href);var s=bE(i).hoistableStyles,o=s.get(t);if(o||(i=i.ownerDocument||i,o={type:\\\"stylesheet\\\",instance:null,count:0,state:{loading:0,preload:null}},s.set(t,o),(s=i.querySelector(IS(t)))&&!s._p&&(o.instance=s,o.state.loading=5),mu.has(t)||(r={rel:\\\"preload\\\",as:\\\"style\\\",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},mu.set(t,r),s||_lt(i,t,r,o.state))),e&&n===null)throw Error(le(528,\\\"\\\"));return o}if(e&&n!==null)throw Error(le(529,\\\"\\\"));return null;case\\\"script\\\":return e=r.async,r=r.src,typeof r==\\\"string\\\"&&e&&typeof e!=\\\"function\\\"&&typeof e!=\\\"symbol\\\"?(e=qE(r),r=bE(i).hoistableScripts,n=r.get(e),n||(n={type:\\\"script\\\",instance:null,count:0,state:null},r.set(e,n)),n):{type:\\\"void\\\",instance:null,count:0,state:null};default:throw Error(le(444,t))}}function BE(t){return'href=\\\"'+uu(t)+'\\\"'}function IS(t){return'link[rel=\\\"stylesheet\\\"]['+t+\\\"]\\\"}function H1e(t){return $n({},t,{\\\"data-precedence\\\":t.precedence,precedence:null})}function _lt(t,e,r,n){t.querySelector('link[rel=\\\"preload\\\"][as=\\\"style\\\"]['+e+\\\"]\\\")?n.loading=1:(e=t.createElement(\\\"link\\\"),n.preload=e,e.addEventListener(\\\"load\\\",function(){return n.loading|=1}),e.addEventListener(\\\"error\\\",function(){return n.loading|=2}),Po(e,\\\"link\\\",r),to(e),t.head.appendChild(e))}function qE(t){return'[src=\\\"'+uu(t)+'\\\"]'}function RS(t){return\\\"script[async]\\\"+t}function tge(t,e,r){if(e.count++,e.instance===null)switch(e.type){case\\\"style\\\":var n=t.querySelector('style[data-href~=\\\"'+uu(r.href)+'\\\"]');if(n)return e.instance=n,to(n),n;var i=$n({},r,{\\\"data-href\\\":r.href,\\\"data-precedence\\\":r.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement(\\\"style\\\"),to(n),Po(n,\\\"style\\\",i),RP(n,r.precedence,t),e.instance=n;case\\\"stylesheet\\\":i=BE(r.href);var s=t.querySelector(IS(i));if(s)return e.state.loading|=4,e.instance=s,to(s),s;n=H1e(r),(i=mu.get(i))&&WK(n,i),s=(t.ownerDocument||t).createElement(\\\"link\\\"),to(s);var o=s;return o._p=new Promise(function(a,c){o.onload=a,o.onerror=c}),Po(s,\\\"link\\\",n),e.state.loading|=4,RP(s,r.precedence,t),e.instance=s;case\\\"script\\\":return s=qE(r.src),(i=t.querySelector(RS(s)))?(e.instance=i,to(i),i):(n=r,(i=mu.get(s))&&(n=$n({},r),GK(n,i)),t=t.ownerDocument||t,i=t.createElement(\\\"script\\\"),to(i),Po(i,\\\"link\\\",n),t.head.appendChild(i),e.instance=i);case\\\"void\\\":return null;default:throw Error(le(443,e.type))}else e.type===\\\"stylesheet\\\"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,RP(n,r.precedence,t));return e.instance}function RP(t,e,r){for(var n=r.querySelectorAll('link[rel=\\\"stylesheet\\\"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,s=i,o=0;o<n.length;o++){var a=n[o];if(a.dataset.precedence===e)s=a;else if(s!==i)break}s?s.parentNode.insertBefore(t,s.nextSibling):(e=r.nodeType===9?r.head:r,e.insertBefore(t,e.firstChild))}function WK(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function GK(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var PP=null;function rge(t,e,r){if(PP===null){var n=new Map,i=PP=new Map;i.set(r,n)}else i=PP,n=i.get(r),n||(n=new Map,i.set(r,n));if(n.has(t))return n;for(n.set(t,null),r=r.getElementsByTagName(t),i=0;i<r.length;i++){var s=r[i];if(!(s[ES]||s[To]||t===\\\"link\\\"&&s.getAttribute(\\\"rel\\\")===\\\"stylesheet\\\")&&s.namespaceURI!==\\\"http://www.w3.org/2000/svg\\\"){var o=s.getAttribute(e)||\\\"\\\";o=t+o;var a=n.get(o);a?a.push(s):n.set(o,[s])}}return n}function nge(t,e,r){t=t.ownerDocument||t,t.head.insertBefore(r,e===\\\"title\\\"?t.querySelector(\\\"head > title\\\"):null)}function Clt(t,e,r){if(r===1||e.itemProp!=null)return!1;switch(t){case\\\"meta\\\":case\\\"title\\\":return!0;case\\\"style\\\":if(typeof e.precedence!=\\\"string\\\"||typeof e.href!=\\\"string\\\"||e.href===\\\"\\\")break;return!0;case\\\"link\\\":if(typeof e.rel!=\\\"string\\\"||typeof e.href!=\\\"string\\\"||e.href===\\\"\\\"||e.onLoad||e.onError)break;return e.rel===\\\"stylesheet\\\"?(t=e.disabled,typeof e.precedence==\\\"string\\\"&&t==null):!0;case\\\"script\\\":if(e.async&&typeof e.async!=\\\"function\\\"&&typeof e.async!=\\\"symbol\\\"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src==\\\"string\\\")return!0}return!1}function q1e(t){return!(t.type===\\\"stylesheet\\\"&&(t.state.loading&3)===0)}function Slt(t,e,r,n){if(r.type===\\\"stylesheet\\\"&&(typeof n.media!=\\\"string\\\"||matchMedia(n.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var i=BE(n.href),s=e.querySelector(IS(i));if(s){e=s._p,e!==null&&typeof e==\\\"object\\\"&&typeof e.then==\\\"function\\\"&&(t.count++,t=iO.bind(t),e.then(t,t)),r.state.loading|=4,r.instance=s,to(s);return}s=e.ownerDocument||e,n=H1e(n),(i=mu.get(i))&&WK(n,i),s=s.createElement(\\\"link\\\"),to(s);var o=s;o._p=new Promise(function(a,c){o.onload=a,o.onerror=c}),Po(s,\\\"link\\\",n),r.instance=s}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,e),(e=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=iO.bind(t),e.addEventListener(\\\"load\\\",r),e.addEventListener(\\\"error\\\",r))}}var oG=0;function Alt(t,e){return t.stylesheets&&t.count===0&&OP(t,t.stylesheets),0<t.count||0<t.imgCount?function(r){var n=setTimeout(function(){if(t.stylesheets&&OP(t,t.stylesheets),t.unsuspend){var s=t.unsuspend;t.unsuspend=null,s()}},6e4+e);0<t.imgBytes&&oG===0&&(oG=62500*olt());var i=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&OP(t,t.stylesheets),t.unsuspend)){var s=t.unsuspend;t.unsuspend=null,s()}},(t.imgBytes>oG?50:800)+e);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function iO(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)OP(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var sO=null;function OP(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,sO=new Map,e.forEach(Tlt,t),sO=null,iO.call(t))}function Tlt(t,e){if(!(e.state.loading&4)){var r=sO.get(t);if(r)var n=r.get(null);else{r=new Map,sO.set(t,r);for(var i=t.querySelectorAll(\\\"link[data-precedence],style[data-precedence]\\\"),s=0;s<i.length;s++){var o=i[s];(o.nodeName===\\\"LINK\\\"||o.getAttribute(\\\"media\\\")!==\\\"not all\\\")&&(r.set(o.dataset.precedence,o),n=o)}n&&r.set(null,n)}i=e.instance,o=i.getAttribute(\\\"data-precedence\\\"),s=r.get(o)||n,s===n&&r.set(null,i),r.set(o,i),this.count++,n=iO.bind(this),i.addEventListener(\\\"load\\\",n),i.addEventListener(\\\"error\\\",n),s?s.parentNode.insertBefore(i,s.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(i,t.firstChild)),e.state.loading|=4}}var mS={$$typeof:Hh,Provider:null,Consumer:null,_currentValue:Ob,_currentValue2:Ob,_threadCount:0};function Ilt(t,e,r,n,i,s,o,a,c){this.tag=1,this.containerInfo=t,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=NW(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=NW(0),this.hiddenUpdates=NW(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function z1e(t,e,r,n,i,s,o,a,c,l,d,f){return t=new Ilt(t,e,r,o,c,l,d,f,a),e=1,s===!0&&(e|=24),s=cl(3,null,null,e),t.current=s,s.stateNode=t,e=wK(),e.refCount++,t.pooledCache=e,e.refCount++,s.memoizedState={element:n,isDehydrated:r,cache:e},EK(s),t}function $1e(t){return t?(t=hE,t):hE}function V1e(t,e,r,n,i,s){i=$1e(i),n.context===null?n.context=i:n.pendingContext=i,n=gg(e),n.payload={element:r},s=s===void 0?null:s,s!==null&&(n.callback=s),r=yg(t,n,e),r!==null&&(bc(r,t,e),Z8(r,t,e))}function ige(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function KK(t,e){ige(t,e),(t=t.alternate)&&ige(t,e)}function W1e(t){if(t.tag===13||t.tag===31){var e=$b(t,67108864);e!==null&&bc(e,t,67108864),KK(t,67108864)}}function sge(t){if(t.tag===13||t.tag===31){var e=pl();e=sK(e);var r=$b(t,e);r!==null&&bc(r,t,e),KK(t,e)}}var oO=!0;function Rlt(t,e,r,n){var i=ct.T;ct.T=null;var s=Dr.p;try{Dr.p=2,ZK(t,e,r,n)}finally{Dr.p=s,ct.T=i}}function Plt(t,e,r,n){var i=ct.T;ct.T=null;var s=Dr.p;try{Dr.p=8,ZK(t,e,r,n)}finally{Dr.p=s,ct.T=i}}function ZK(t,e,r,n){if(oO){var i=eK(n);if(i===null)iG(t,e,n,aO,r),oge(t,n);else if(Nlt(i,t,e,r,n))n.stopPropagation();else if(oge(t,n),e&4&&-1<Olt.indexOf(t)){for(;i!==null;){var s=LE(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Ib(s.pendingLanes);if(o!==0){var a=s;for(a.pendingLanes|=2,a.entangledLanes|=2;o;){var c=1<<31-fl(o);a.entanglements[1]|=c,o&=~c}Zf(s),(Mr&6)===0&&(QP=ul()+500,TS(0,!1))}}break;case 31:case 13:a=$b(s,2),a!==null&&bc(a,s,2),vO(),KK(s,2)}if(s=eK(n),s===null&&iG(t,e,n,aO,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else iG(t,e,n,null,r)}}function eK(t){return t=lK(t),QK(t)}var aO=null;function QK(t){if(aO=null,t=cE(t),t!==null){var e=bS(t);if(e===null)t=null;else{var r=e.tag;if(r===13){if(t=fge(e),t!==null)return t;t=null}else if(r===31){if(t=pge(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return aO=t,null}function G1e(t){switch(t){case\\\"beforetoggle\\\":case\\\"cancel\\\":case\\\"click\\\":case\\\"close\\\":case\\\"contextmenu\\\":case\\\"copy\\\":case\\\"cut\\\":case\\\"auxclick\\\":case\\\"dblclick\\\":case\\\"dragend\\\":case\\\"dragstart\\\":case\\\"drop\\\":case\\\"focusin\\\":case\\\"focusout\\\":case\\\"input\\\":case\\\"invalid\\\":case\\\"keydown\\\":case\\\"keypress\\\":case\\\"keyup\\\":case\\\"mousedown\\\":case\\\"mouseup\\\":case\\\"paste\\\":case\\\"pause\\\":case\\\"play\\\":case\\\"pointercancel\\\":case\\\"pointerdown\\\":case\\\"pointerup\\\":case\\\"ratechange\\\":case\\\"reset\\\":case\\\"resize\\\":case\\\"seeked\\\":case\\\"submit\\\":case\\\"toggle\\\":case\\\"touchcancel\\\":case\\\"touchend\\\":case\\\"touchstart\\\":case\\\"volumechange\\\":case\\\"change\\\":case\\\"selectionchange\\\":case\\\"textInput\\\":case\\\"compositionstart\\\":case\\\"compositionend\\\":case\\\"compositionupdate\\\":case\\\"beforeblur\\\":case\\\"afterblur\\\":case\\\"beforeinput\\\":case\\\"blur\\\":case\\\"fullscreenchange\\\":case\\\"focus\\\":case\\\"hashchange\\\":case\\\"popstate\\\":case\\\"select\\\":case\\\"selectstart\\\":return 2;case\\\"drag\\\":case\\\"dragenter\\\":case\\\"dragexit\\\":case\\\"dragleave\\\":case\\\"dragover\\\":case\\\"mousemove\\\":case\\\"mouseout\\\":case\\\"mouseover\\\":case\\\"pointermove\\\":case\\\"pointerout\\\":case\\\"pointerover\\\":case\\\"scroll\\\":case\\\"touchmove\\\":case\\\"wheel\\\":case\\\"mouseenter\\\":case\\\"mouseleave\\\":case\\\"pointerenter\\\":case\\\"pointerleave\\\":return 8;case\\\"message\\\":switch(bat()){case yge:return 2;case bge:return 8;case DP:case wat:return 32;case wge:return 268435456;default:return 32}default:return 32}}var tK=!1,vg=null,xg=null,Eg=null,gS=new Map,yS=new Map,cg=[],Olt=\\\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\\\".split(\\\" \\\");function oge(t,e){switch(t){case\\\"focusin\\\":case\\\"focusout\\\":vg=null;break;case\\\"dragenter\\\":case\\\"dragleave\\\":xg=null;break;case\\\"mouseover\\\":case\\\"mouseout\\\":Eg=null;break;case\\\"pointerover\\\":case\\\"pointerout\\\":gS.delete(e.pointerId);break;case\\\"gotpointercapture\\\":case\\\"lostpointercapture\\\":yS.delete(e.pointerId)}}function U8(t,e,r,n,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},e!==null&&(e=LE(e),e!==null&&W1e(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Nlt(t,e,r,n,i){switch(e){case\\\"focusin\\\":return vg=U8(vg,t,e,r,n,i),!0;case\\\"dragenter\\\":return xg=U8(xg,t,e,r,n,i),!0;case\\\"mouseover\\\":return Eg=U8(Eg,t,e,r,n,i),!0;case\\\"pointerover\\\":var s=i.pointerId;return gS.set(s,U8(gS.get(s)||null,t,e,r,n,i)),!0;case\\\"gotpointercapture\\\":return s=i.pointerId,yS.set(s,U8(yS.get(s)||null,t,e,r,n,i)),!0}return!1}function K1e(t){var e=cE(t.target);if(e!==null){var r=bS(e);if(r!==null){if(e=r.tag,e===13){if(e=fge(r),e!==null){t.blockedOn=e,zme(t.priority,function(){sge(r)});return}}else if(e===31){if(e=pge(r),e!==null){t.blockedOn=e,zme(t.priority,function(){sge(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function NP(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=eK(t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);wG=n,r.target.dispatchEvent(n),wG=null}else return e=LE(r),e!==null&&W1e(e),t.blockedOn=r,!1;e.shift()}return!0}function age(t,e,r){NP(t)&&r.delete(e)}function klt(){tK=!1,vg!==null&&NP(vg)&&(vg=null),xg!==null&&NP(xg)&&(xg=null),Eg!==null&&NP(Eg)&&(Eg=null),gS.forEach(age),yS.forEach(age)}function gP(t,e){t.blockedOn===e&&(t.blockedOn=null,tK||(tK=!0,Fs.unstable_scheduleCallback(Fs.unstable_NormalPriority,klt)))}var yP=null;function cge(t){yP!==t&&(yP=t,Fs.unstable_scheduleCallback(Fs.unstable_NormalPriority,function(){yP===t&&(yP=null);for(var e=0;e<t.length;e+=3){var r=t[e],n=t[e+1],i=t[e+2];if(typeof n!=\\\"function\\\"){if(QK(n||r)===null)continue;break}var s=LE(r);s!==null&&(t.splice(e,3),e-=3,MG(s,{pending:!0,data:i,method:r.method,action:n},n,i))}}))}function ME(t){function e(c){return gP(c,t)}vg!==null&&gP(vg,t),xg!==null&&gP(xg,t),Eg!==null&&gP(Eg,t),gS.forEach(e),yS.forEach(e);for(var r=0;r<cg.length;r++){var n=cg[r];n.blockedOn===t&&(n.blockedOn=null)}for(;0<cg.length&&(r=cg[0],r.blockedOn===null);)K1e(r),r.blockedOn===null&&cg.shift();if(r=(t.ownerDocument||t).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var i=r[n],s=r[n+1],o=i[wc]||null;if(typeof s==\\\"function\\\")o||cge(r);else if(o){var a=null;if(s&&s.hasAttribute(\\\"formAction\\\")){if(i=s,o=s[wc]||null)a=o.formAction;else if(QK(i)!==null)continue}else a=o.action;typeof a==\\\"function\\\"?r[n+1]=a:(r.splice(n,3),n-=3),cge(r)}}}function Z1e(){function t(s){s.canIntercept&&s.info===\\\"react-transition\\\"&&s.intercept({handler:function(){return new Promise(function(o){return i=o})},focusReset:\\\"manual\\\",scroll:\\\"manual\\\"})}function e(){i!==null&&(i(),i=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:\\\"react-transition\\\",history:\\\"replace\\\"})}}if(typeof navigation==\\\"object\\\"){var n=!1,i=null;return navigation.addEventListener(\\\"navigate\\\",t),navigation.addEventListener(\\\"navigatesuccess\\\",e),navigation.addEventListener(\\\"navigateerror\\\",e),setTimeout(r,100),function(){n=!0,navigation.removeEventListener(\\\"navigate\\\",t),navigation.removeEventListener(\\\"navigatesuccess\\\",e),navigation.removeEventListener(\\\"navigateerror\\\",e),i!==null&&(i(),i=null)}}}function JK(t){this._internalRoot=t}_O.prototype.render=JK.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(le(409));var r=e.current,n=pl();V1e(r,n,t,e,null,null)};_O.prototype.unmount=JK.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;V1e(t.current,2,null,t,null,null),vO(),e[DE]=null}};function _O(t){this._internalRoot=t}_O.prototype.unstable_scheduleHydration=function(t){if(t){var e=Cge();t={blockedOn:null,target:t,priority:e};for(var r=0;r<cg.length&&e!==0&&e<cg[r].priority;r++);cg.splice(r,0,t),r===0&&K1e(t)}};var lge=uge.version;if(lge!==\\\"19.2.4\\\")throw Error(le(527,lge,\\\"19.2.4\\\"));Dr.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render==\\\"function\\\"?Error(le(188)):(t=Object.keys(t).join(\\\",\\\"),Error(le(268,t)));return t=dat(e),t=t!==null?hge(t):null,t=t===null?null:t.stateNode,t};var Blt={bundleType:0,version:\\\"19.2.4\\\",rendererPackageName:\\\"react-dom\\\",currentDispatcherRef:ct,reconcilerVersion:\\\"19.2.4\\\"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\\\"u\\\"&&(F8=__REACT_DEVTOOLS_GLOBAL_HOOK__,!F8.isDisabled&&F8.supportsFiber))try{wS=F8.inject(Blt),dl=F8}catch{}var F8;CO.createRoot=function(t,e){if(!dge(t))throw Error(le(299));var r=!1,n=\\\"\\\",i=jye,s=Hye,o=qye;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(i=e.onUncaughtError),e.onCaughtError!==void 0&&(s=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=z1e(t,1,!1,null,null,r,n,null,i,s,o,Z1e),t[DE]=e.current,VK(t),new JK(e)};CO.hydrateRoot=function(t,e,r){if(!dge(t))throw Error(le(299));var n=!1,i=\\\"\\\",s=jye,o=Hye,a=qye,c=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onUncaughtError!==void 0&&(s=r.onUncaughtError),r.onCaughtError!==void 0&&(o=r.onCaughtError),r.onRecoverableError!==void 0&&(a=r.onRecoverableError),r.formState!==void 0&&(c=r.formState)),e=z1e(t,1,!0,e,r??null,n,i,c,s,o,a,Z1e),e.context=$1e(null),r=e.current,n=pl(),n=sK(n),i=gg(n),i.callback=null,yg(r,i,n),r=n,e.current.lanes=r,xS(e,r),Zf(e),t[DE]=e.current,VK(t),new _O(e)};CO.version=\\\"19.2.4\\\"});var X1e=q((lQt,Y1e)=>{\\\"use strict\\\";u();function J1e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\\\"u\\\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\\\"function\\\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(J1e)}catch(t){console.error(t)}}J1e(),Y1e.exports=Q1e()});var ebe,tbe=x(()=>{u();ebe=\\\"1.2.3\\\"});var as,zE=x(()=>{u();tbe();as=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,s=[e||\\\"An error occurred.\\\",\\\"\\\",...r.metaMessages?[...r.metaMessages,\\\"\\\"]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${ebe}`].join(`\\n`);super(s),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"metaMessages\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiTypeError\\\"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}}});function gl(t,e){return t.exec(e)?.groups}var YK,XK,SO,PS=x(()=>{u();YK=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,XK=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,SO=/^\\\\(.+?\\\\).*?$/});function AO(t){let e=t.type;if(rbe.test(t.type)&&\\\"components\\\"in t){e=\\\"(\\\";let r=t.components.length;for(let i=0;i<r;i++){let s=t.components[i];e+=AO(s),i<r-1&&(e+=\\\", \\\")}let n=gl(rbe,t.type);return e+=`)${n?.array||\\\"\\\"}`,AO({...t,type:e})}return\\\"indexed\\\"in t&&t.indexed&&(e=`${e} indexed`),t.name?`${e} ${t.name}`:e}var rbe,nbe=x(()=>{u();PS();rbe=/^tuple(?<array>(\\\\[(\\\\d*)\\\\])*)$/});function Xh(t){let e=\\\"\\\",r=t.length;for(let n=0;n<r;n++){let i=t[n];e+=AO(i),n!==r-1&&(e+=\\\", \\\")}return e}var eZ=x(()=>{u();nbe()});function Wb(t){return t.type===\\\"function\\\"?`function ${t.name}(${Xh(t.inputs)})${t.stateMutability&&t.stateMutability!==\\\"nonpayable\\\"?` ${t.stateMutability}`:\\\"\\\"}${t.outputs?.length?` returns (${Xh(t.outputs)})`:\\\"\\\"}`:t.type===\\\"event\\\"?`event ${t.name}(${Xh(t.inputs)})`:t.type===\\\"error\\\"?`error ${t.name}(${Xh(t.inputs)})`:t.type===\\\"constructor\\\"?`constructor(${Xh(t.inputs)})${t.stateMutability===\\\"payable\\\"?\\\" payable\\\":\\\"\\\"}`:t.type===\\\"fallback\\\"?`fallback() external${t.stateMutability===\\\"payable\\\"?\\\" payable\\\":\\\"\\\"}`:\\\"receive() external payable\\\"}var ibe=x(()=>{u();eZ()});function obe(t){return sbe.test(t)}function abe(t){return gl(sbe,t)}function lbe(t){return cbe.test(t)}function ube(t){return gl(cbe,t)}function fbe(t){return dbe.test(t)}function pbe(t){return gl(dbe,t)}function Rg(t){return hbe.test(t)}function mbe(t){return gl(hbe,t)}function ybe(t){return gbe.test(t)}function bbe(t){return gl(gbe,t)}function vbe(t){return wbe.test(t)}function xbe(t){return gl(wbe,t)}function Ebe(t){return Mlt.test(t)}var sbe,cbe,dbe,hbe,gbe,wbe,Mlt,tZ,_be,TO,$E=x(()=>{u();PS();sbe=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\\\((?<parameters>.*?)\\\\)$/;cbe=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\\\((?<parameters>.*?)\\\\)$/;dbe=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\\\((?<parameters>.*?)\\\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\\\s?\\\\((?<returns>.*?)\\\\))?$/;hbe=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\\\{(?<properties>.*?)\\\\}$/;gbe=/^constructor\\\\((?<parameters>.*?)\\\\)(?:\\\\s(?<stateMutability>payable{1}))?$/;wbe=/^fallback\\\\(\\\\) external(?:\\\\s(?<stateMutability>payable{1}))?$/;Mlt=/^receive\\\\(\\\\) external payable$/;tZ=new Set([\\\"memory\\\",\\\"indexed\\\",\\\"storage\\\",\\\"calldata\\\"]),_be=new Set([\\\"indexed\\\"]),TO=new Set([\\\"calldata\\\",\\\"memory\\\",\\\"storage\\\"])});var IO,RO,PO,OO=x(()=>{u();zE();IO=class extends as{constructor({signature:e}){super(\\\"Failed to parse ABI item.\\\",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:\\\"/api/human#parseabiitem-1\\\"}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidAbiItemError\\\"})}},RO=class extends as{constructor({type:e}){super(\\\"Unknown type.\\\",{metaMessages:[`Type \\\"${e}\\\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"UnknownTypeError\\\"})}},PO=class extends as{constructor({type:e}){super(\\\"Unknown type.\\\",{metaMessages:[`Type \\\"${e}\\\" is not a valid ABI type.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"UnknownSolidityTypeError\\\"})}}});var NO,kO,BO,MO,DO,LO,UO=x(()=>{u();zE();NO=class extends as{constructor({params:e}){super(\\\"Failed to parse ABI parameters.\\\",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:\\\"/api/human#parseabiparameters-1\\\"}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidAbiParametersError\\\"})}},kO=class extends as{constructor({param:e}){super(\\\"Invalid ABI parameter.\\\",{details:e}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidParameterError\\\"})}},BO=class extends as{constructor({param:e,name:r}){super(\\\"Invalid ABI parameter.\\\",{details:e,metaMessages:[`\\\"${r}\\\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"SolidityProtectedKeywordError\\\"})}},MO=class extends as{constructor({param:e,type:r,modifier:n}){super(\\\"Invalid ABI parameter.\\\",{details:e,metaMessages:[`Modifier \\\"${n}\\\" not allowed${r?` in \\\"${r}\\\" type`:\\\"\\\"}.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidModifierError\\\"})}},DO=class extends as{constructor({param:e,type:r,modifier:n}){super(\\\"Invalid ABI parameter.\\\",{details:e,metaMessages:[`Modifier \\\"${n}\\\" not allowed${r?` in \\\"${r}\\\" type`:\\\"\\\"}.`,`Data location can only be specified for array, struct, or mapping types, but \\\"${n}\\\" was given.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidFunctionModifierError\\\"})}},LO=class extends as{constructor({abiParameter:e}){super(\\\"Invalid ABI parameter.\\\",{details:JSON.stringify(e,null,2),metaMessages:[\\\"ABI parameter type is invalid.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidAbiTypeParameterError\\\"})}}});var Qf,FO,jO,rZ=x(()=>{u();zE();Qf=class extends as{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidSignatureError\\\"})}},FO=class extends as{constructor({signature:e}){super(\\\"Unknown signature.\\\",{details:e}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"UnknownSignatureError\\\"})}},jO=class extends as{constructor({signature:e}){super(\\\"Invalid struct signature.\\\",{details:e,metaMessages:[\\\"No properties exist.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidStructSignatureError\\\"})}}});var HO,Cbe=x(()=>{u();zE();HO=class extends as{constructor({type:e}){super(\\\"Circular reference detected.\\\",{metaMessages:[`Struct \\\"${e}\\\" is a circular reference.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"CircularReferenceError\\\"})}}});var qO,Sbe=x(()=>{u();zE();qO=class extends as{constructor({current:e,depth:r}){super(\\\"Unbalanced parentheses.\\\",{metaMessages:[`\\\"${e.trim()}\\\" has too many ${r>0?\\\"opening\\\":\\\"closing\\\"} parentheses.`],details:`Depth \\\"${r}\\\"`}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"InvalidParenthesisError\\\"})}}});function Abe(t,e,r){let n=\\\"\\\";if(r)for(let i of Object.entries(r)){if(!i)continue;let s=\\\"\\\";for(let o of i[1])s+=`[${o.type}${o.name?`:${o.name}`:\\\"\\\"}]`;n+=`(${i[0]}{${s}})`}return e?`${e}:${t}${n}`:`${t}${n}`}var zO,Tbe=x(()=>{u();zO=new Map([[\\\"address\\\",{type:\\\"address\\\"}],[\\\"bool\\\",{type:\\\"bool\\\"}],[\\\"bytes\\\",{type:\\\"bytes\\\"}],[\\\"bytes32\\\",{type:\\\"bytes32\\\"}],[\\\"int\\\",{type:\\\"int256\\\"}],[\\\"int256\\\",{type:\\\"int256\\\"}],[\\\"string\\\",{type:\\\"string\\\"}],[\\\"uint\\\",{type:\\\"uint256\\\"}],[\\\"uint8\\\",{type:\\\"uint8\\\"}],[\\\"uint16\\\",{type:\\\"uint16\\\"}],[\\\"uint24\\\",{type:\\\"uint24\\\"}],[\\\"uint32\\\",{type:\\\"uint32\\\"}],[\\\"uint64\\\",{type:\\\"uint64\\\"}],[\\\"uint96\\\",{type:\\\"uint96\\\"}],[\\\"uint112\\\",{type:\\\"uint112\\\"}],[\\\"uint160\\\",{type:\\\"uint160\\\"}],[\\\"uint192\\\",{type:\\\"uint192\\\"}],[\\\"uint256\\\",{type:\\\"uint256\\\"}],[\\\"address owner\\\",{type:\\\"address\\\",name:\\\"owner\\\"}],[\\\"address to\\\",{type:\\\"address\\\",name:\\\"to\\\"}],[\\\"bool approved\\\",{type:\\\"bool\\\",name:\\\"approved\\\"}],[\\\"bytes _data\\\",{type:\\\"bytes\\\",name:\\\"_data\\\"}],[\\\"bytes data\\\",{type:\\\"bytes\\\",name:\\\"data\\\"}],[\\\"bytes signature\\\",{type:\\\"bytes\\\",name:\\\"signature\\\"}],[\\\"bytes32 hash\\\",{type:\\\"bytes32\\\",name:\\\"hash\\\"}],[\\\"bytes32 r\\\",{type:\\\"bytes32\\\",name:\\\"r\\\"}],[\\\"bytes32 root\\\",{type:\\\"bytes32\\\",name:\\\"root\\\"}],[\\\"bytes32 s\\\",{type:\\\"bytes32\\\",name:\\\"s\\\"}],[\\\"string name\\\",{type:\\\"string\\\",name:\\\"name\\\"}],[\\\"string symbol\\\",{type:\\\"string\\\",name:\\\"symbol\\\"}],[\\\"string tokenURI\\\",{type:\\\"string\\\",name:\\\"tokenURI\\\"}],[\\\"uint tokenId\\\",{type:\\\"uint256\\\",name:\\\"tokenId\\\"}],[\\\"uint8 v\\\",{type:\\\"uint8\\\",name:\\\"v\\\"}],[\\\"uint256 balance\\\",{type:\\\"uint256\\\",name:\\\"balance\\\"}],[\\\"uint256 tokenId\\\",{type:\\\"uint256\\\",name:\\\"tokenId\\\"}],[\\\"uint256 value\\\",{type:\\\"uint256\\\",name:\\\"value\\\"}],[\\\"event:address indexed from\\\",{type:\\\"address\\\",name:\\\"from\\\",indexed:!0}],[\\\"event:address indexed to\\\",{type:\\\"address\\\",name:\\\"to\\\",indexed:!0}],[\\\"event:uint indexed tokenId\\\",{type:\\\"uint256\\\",name:\\\"tokenId\\\",indexed:!0}],[\\\"event:uint256 indexed tokenId\\\",{type:\\\"uint256\\\",name:\\\"tokenId\\\",indexed:!0}]])});function OS(t,e={}){if(fbe(t))return Dlt(t,e);if(lbe(t))return Llt(t,e);if(obe(t))return Ult(t,e);if(ybe(t))return Flt(t,e);if(vbe(t))return jlt(t);if(Ebe(t))return{type:\\\"receive\\\",stateMutability:\\\"payable\\\"};throw new FO({signature:t})}function Dlt(t,e={}){let r=pbe(t);if(!r)throw new Qf({signature:t,type:\\\"function\\\"});let n=xc(r.parameters),i=[],s=n.length;for(let a=0;a<s;a++)i.push(Pd(n[a],{modifiers:TO,structs:e,type:\\\"function\\\"}));let o=[];if(r.returns){let a=xc(r.returns),c=a.length;for(let l=0;l<c;l++)o.push(Pd(a[l],{modifiers:TO,structs:e,type:\\\"function\\\"}))}return{name:r.name,type:\\\"function\\\",stateMutability:r.stateMutability??\\\"nonpayable\\\",inputs:i,outputs:o}}function Llt(t,e={}){let r=ube(t);if(!r)throw new Qf({signature:t,type:\\\"event\\\"});let n=xc(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(Pd(n[o],{modifiers:_be,structs:e,type:\\\"event\\\"}));return{name:r.name,type:\\\"event\\\",inputs:i}}function Ult(t,e={}){let r=abe(t);if(!r)throw new Qf({signature:t,type:\\\"error\\\"});let n=xc(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(Pd(n[o],{structs:e,type:\\\"error\\\"}));return{name:r.name,type:\\\"error\\\",inputs:i}}function Flt(t,e={}){let r=bbe(t);if(!r)throw new Qf({signature:t,type:\\\"constructor\\\"});let n=xc(r.parameters),i=[],s=n.length;for(let o=0;o<s;o++)i.push(Pd(n[o],{structs:e,type:\\\"constructor\\\"}));return{type:\\\"constructor\\\",stateMutability:r.stateMutability??\\\"nonpayable\\\",inputs:i}}function jlt(t){let e=xbe(t);if(!e)throw new Qf({signature:t,type:\\\"fallback\\\"});return{type:\\\"fallback\\\",stateMutability:e.stateMutability??\\\"nonpayable\\\"}}function Pd(t,e){let r=Abe(t,e?.type,e?.structs);if(zO.has(r))return zO.get(r);let n=SO.test(t),i=gl(n?qlt:Hlt,t);if(!i)throw new kO({param:t});if(i.name&&Vlt(i.name))throw new BO({param:t,name:i.name});let s=i.name?{name:i.name}:{},o=i.modifier===\\\"indexed\\\"?{indexed:!0}:{},a=e?.structs??{},c,l={};if(n){c=\\\"tuple\\\";let f=xc(i.type),p=[],h=f.length;for(let m=0;m<h;m++)p.push(Pd(f[m],{structs:a}));l={components:p}}else if(i.type in a)c=\\\"tuple\\\",l={components:a[i.type]};else if(zlt.test(i.type))c=`${i.type}256`;else if(i.type===\\\"address payable\\\")c=\\\"address\\\";else if(c=i.type,e?.type!==\\\"struct\\\"&&!nZ(c))throw new PO({type:c});if(i.modifier){if(!e?.modifiers?.has?.(i.modifier))throw new MO({param:t,type:e?.type,modifier:i.modifier});if(TO.has(i.modifier)&&!Wlt(c,!!i.array))throw new DO({param:t,type:e?.type,modifier:i.modifier})}let d={type:`${c}${i.array??\\\"\\\"}`,...s,...o,...l};return zO.set(r,d),d}function xc(t,e=[],r=\\\"\\\",n=0){let i=t.trim().length;for(let s=0;s<i;s++){let o=t[s],a=t.slice(s+1);switch(o){case\\\",\\\":return n===0?xc(a,[...e,r.trim()]):xc(a,e,`${r}${o}`,n);case\\\"(\\\":return xc(a,e,`${r}${o}`,n+1);case\\\")\\\":return xc(a,e,`${r}${o}`,n-1);default:return xc(a,e,`${r}${o}`,n)}}if(r===\\\"\\\")return e;if(n!==0)throw new qO({current:r,depth:n});return e.push(r.trim()),e}function nZ(t){return t===\\\"address\\\"||t===\\\"bool\\\"||t===\\\"function\\\"||t===\\\"string\\\"||YK.test(t)||XK.test(t)}function Vlt(t){return t===\\\"address\\\"||t===\\\"bool\\\"||t===\\\"function\\\"||t===\\\"string\\\"||t===\\\"tuple\\\"||YK.test(t)||XK.test(t)||$lt.test(t)}function Wlt(t,e){return e||t===\\\"bytes\\\"||t===\\\"string\\\"||t===\\\"tuple\\\"}var Hlt,qlt,zlt,$lt,VE=x(()=>{u();PS();OO();UO();rZ();Sbe();Tbe();$E();Hlt=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\\\spayable)?)(?<array>(?:\\\\[\\\\d*?\\\\])+?)?(?:\\\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,qlt=/^\\\\((?<type>.+?)\\\\)(?<array>(?:\\\\[\\\\d*?\\\\])+?)?(?:\\\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,zlt=/^u?int$/;$lt=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function WE(t){let e={},r=t.length;for(let o=0;o<r;o++){let a=t[o];if(!Rg(a))continue;let c=mbe(a);if(!c)throw new Qf({signature:a,type:\\\"struct\\\"});let l=c.properties.split(\\\";\\\"),d=[],f=l.length;for(let p=0;p<f;p++){let m=l[p].trim();if(!m)continue;let g=Pd(m,{type:\\\"struct\\\"});d.push(g)}if(!d.length)throw new jO({signature:a});e[c.name]=d}let n={},i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){let[a,c]=i[o];n[a]=Ibe(c,e)}return n}function Ibe(t=[],e={},r=new Set){let n=[],i=t.length;for(let s=0;s<i;s++){let o=t[s];if(SO.test(o.type))n.push(o);else{let c=gl(Glt,o.type);if(!c?.type)throw new LO({abiParameter:o});let{array:l,type:d}=c;if(d in e){if(r.has(d))throw new HO({type:d});n.push({...o,type:`tuple${l??\\\"\\\"}`,components:Ibe(e[d],e,new Set([...r,d]))})}else if(nZ(d))n.push(o);else throw new RO({type:d})}}return n}var Glt,$O=x(()=>{u();PS();OO();UO();rZ();Cbe();$E();VE();Glt=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\\\[\\\\d*?\\\\])+?)?$/});function GE(t){let e=WE(t),r=[],n=t.length;for(let i=0;i<n;i++){let s=t[i];Rg(s)||r.push(OS(s,e))}return r}var Rbe=x(()=>{u();$E();$O();VE()});function VO(t){let e;if(typeof t==\\\"string\\\")e=OS(t);else{let r=WE(t),n=t.length;for(let i=0;i<n;i++){let s=t[i];if(!Rg(s)){e=OS(s,r);break}}}if(!e)throw new IO({signature:t});return e}var Pbe=x(()=>{u();OO();$E();$O();VE()});function WO(t){let e=[];if(typeof t==\\\"string\\\"){let r=xc(t),n=r.length;for(let i=0;i<n;i++)e.push(Pd(r[i],{modifiers:tZ}))}else{let r=WE(t),n=t.length;for(let i=0;i<n;i++){let s=t[i];if(Rg(s))continue;let o=xc(s),a=o.length;for(let c=0;c<a;c++)e.push(Pd(o[c],{modifiers:tZ,structs:r}))}}if(e.length===0)throw new NO({params:t});return e}var Obe=x(()=>{u();UO();$E();$O();VE();VE()});var KE=x(()=>{u();ibe();eZ();Rbe();Pbe();Obe()});function ae(t,e,r){let n=t[e.name];if(typeof n==\\\"function\\\")return n;let i=t[r];return typeof i==\\\"function\\\"?i:s=>e(t,s)}var Ut=x(()=>{u()});function js(t,{includeName:e=!1}={}){if(t.type!==\\\"function\\\"&&t.type!==\\\"event\\\"&&t.type!==\\\"error\\\")throw new GO(t.type);return`${t.name}(${NS(t.inputs,{includeName:e})})`}function NS(t,{includeName:e=!1}={}){return t?t.map(r=>Klt(r,{includeName:e})).join(e?\\\", \\\":\\\",\\\"):\\\"\\\"}function Klt(t,{includeName:e}){return t.type.startsWith(\\\"tuple\\\")?`(${NS(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:\\\"\\\")}var em=x(()=>{u();Ki()});function Ur(t,{strict:e=!0}={}){return!t||typeof t!=\\\"string\\\"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith(\\\"0x\\\")}var gu=x(()=>{u()});function Ot(t){return Ur(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}var Da=x(()=>{u();gu()});var iZ,kbe=x(()=>{u();iZ=\\\"2.47.6\\\"});function Bbe(t,e){return e?.(t)?t:t&&typeof t==\\\"object\\\"&&\\\"cause\\\"in t&&t.cause!==void 0?Bbe(t.cause,e):e?null:t}var sZ,W,st=x(()=>{u();kbe();sZ={getDocsUrl:({docsBaseUrl:t,docsPath:e=\\\"\\\",docsSlug:r})=>e?`${t??\\\"https://viem.sh\\\"}${e}${r?`#${r}`:\\\"\\\"}`:void 0,version:`viem@${iZ}`},W=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,s=sZ.getDocsUrl?.({...r,docsPath:i}),o=[e||\\\"An error occurred.\\\",\\\"\\\",...r.metaMessages?[...r.metaMessages,\\\"\\\"]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...sZ.version?[`Version: ${sZ.version}`]:[]].join(`\\n`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"metaMessages\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"version\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"BaseError\\\"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=iZ}walk(e){return Bbe(this,e)}}});var KO,kS,ZE,yu,ZO,QO,QE,JO,BS,JE,YO,XO,MS,Od,YE,eN,tN,XE,tm,Pg,rN,nN,e5,GO,iN,Ki=x(()=>{u();em();Da();st();KO=class extends W{constructor({docsPath:e}){super([\\\"A constructor was not found on the ABI.\\\",\\\"Make sure you are using the correct ABI and that the constructor exists on it.\\\"].join(`\\n`),{docsPath:e,name:\\\"AbiConstructorNotFoundError\\\"})}},kS=class extends W{constructor({docsPath:e}){super([\\\"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\\\",\\\"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.\\\"].join(`\\n`),{docsPath:e,name:\\\"AbiConstructorParamsNotFoundError\\\"})}},ZE=class extends W{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(`\\n`),{metaMessages:[`Params: (${NS(r,{includeName:!0})})`,`Data:   ${e} (${n} bytes)`],name:\\\"AbiDecodingDataSizeTooSmallError\\\"}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"params\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"size\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}},yu=class extends W{constructor({cause:e}={}){super('Cannot decode zero data (\\\"0x\\\") with ABI parameters.',{name:\\\"AbiDecodingZeroDataError\\\",cause:e})}},ZO=class extends W{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(`\\n`),{name:\\\"AbiEncodingArrayLengthMismatchError\\\"})}},QO=class extends W{constructor({expectedSize:e,value:r}){super(`Size of bytes \\\"${r}\\\" (bytes${Ot(r)}) does not match expected size (bytes${e}).`,{name:\\\"AbiEncodingBytesSizeMismatchError\\\"})}},QE=class extends W{constructor({expectedLength:e,givenLength:r}){super([\\\"ABI encoding params/values length mismatch.\\\",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(`\\n`),{name:\\\"AbiEncodingLengthMismatchError\\\"})}},JO=class extends W{constructor(e,{docsPath:r}){super([`Arguments (\\\\`args\\\\`) were provided to \\\"${e}\\\", but \\\"${e}\\\" on the ABI does not contain any parameters (\\\\`inputs\\\\`).`,\\\"Cannot encode error result without knowing what the parameter types are.\\\",\\\"Make sure you are using the correct ABI and that the inputs exist on it.\\\"].join(`\\n`),{docsPath:r,name:\\\"AbiErrorInputsNotFoundError\\\"})}},BS=class extends W{constructor(e,{docsPath:r}={}){super([`Error ${e?`\\\"${e}\\\" `:\\\"\\\"}not found on ABI.`,\\\"Make sure you are using the correct ABI and that the error exists on it.\\\"].join(`\\n`),{docsPath:r,name:\\\"AbiErrorNotFoundError\\\"})}},JE=class extends W{constructor(e,{docsPath:r,cause:n}){super([`Encoded error signature \\\"${e}\\\" not found on ABI.`,\\\"Make sure you are using the correct ABI and that the error exists on it.\\\",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`\\n`),{docsPath:r,name:\\\"AbiErrorSignatureNotFoundError\\\",cause:n}),Object.defineProperty(this,\\\"signature\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}},YO=class extends W{constructor({docsPath:e}){super(\\\"Cannot extract event signature from empty topics.\\\",{docsPath:e,name:\\\"AbiEventSignatureEmptyTopicsError\\\"})}},XO=class extends W{constructor(e,{docsPath:r}){super([`Encoded event signature \\\"${e}\\\" not found on ABI.`,\\\"Make sure you are using the correct ABI and that the event exists on it.\\\",`You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`\\n`),{docsPath:r,name:\\\"AbiEventSignatureNotFoundError\\\"})}},MS=class extends W{constructor(e,{docsPath:r}={}){super([`Event ${e?`\\\"${e}\\\" `:\\\"\\\"}not found on ABI.`,\\\"Make sure you are using the correct ABI and that the event exists on it.\\\"].join(`\\n`),{docsPath:r,name:\\\"AbiEventNotFoundError\\\"})}},Od=class extends W{constructor(e,{docsPath:r}={}){super([`Function ${e?`\\\"${e}\\\" `:\\\"\\\"}not found on ABI.`,\\\"Make sure you are using the correct ABI and that the function exists on it.\\\"].join(`\\n`),{docsPath:r,name:\\\"AbiFunctionNotFoundError\\\"})}},YE=class extends W{constructor(e,{docsPath:r}){super([`Function \\\"${e}\\\" does not contain any \\\\`outputs\\\\` on ABI.`,\\\"Cannot decode function result without knowing what the parameter types are.\\\",\\\"Make sure you are using the correct ABI and that the function exists on it.\\\"].join(`\\n`),{docsPath:r,name:\\\"AbiFunctionOutputsNotFoundError\\\"})}},eN=class extends W{constructor(e,{docsPath:r}){super([`Encoded function signature \\\"${e}\\\" not found on ABI.`,\\\"Make sure you are using the correct ABI and that the function exists on it.\\\",`You can look up the signature here: https://4byte.sourcify.dev/?q=${e}.`].join(`\\n`),{docsPath:r,name:\\\"AbiFunctionSignatureNotFoundError\\\"})}},tN=class extends W{constructor(e,r){super(\\\"Found ambiguous types in overloaded ABI items.\\\",{metaMessages:[`\\\\`${e.type}\\\\` in \\\\`${js(e.abiItem)}\\\\`, and`,`\\\\`${r.type}\\\\` in \\\\`${js(r.abiItem)}\\\\``,\\\"\\\",\\\"These types encode differently and cannot be distinguished at runtime.\\\",\\\"Remove one of the ambiguous items in the ABI.\\\"],name:\\\"AbiItemAmbiguityError\\\"})}},XE=class extends W{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`,{name:\\\"BytesSizeMismatchError\\\"})}},tm=class extends W{constructor({abiItem:e,data:r,params:n,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(`\\n`),{metaMessages:[`Params: (${NS(n,{includeName:!0})})`,`Data:   ${r} (${i} bytes)`],name:\\\"DecodeLogDataMismatch\\\"}),Object.defineProperty(this,\\\"abiItem\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"params\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"size\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=i}},Pg=class extends W{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` \\\"${r.name}\\\"`:\\\"\\\"} on event \\\"${js(e,{includeName:!0})}\\\".`].join(`\\n`),{name:\\\"DecodeLogTopicsMismatch\\\"}),Object.defineProperty(this,\\\"abiItem\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}},rN=class extends W{constructor(e,{docsPath:r}){super([`Type \\\"${e}\\\" is not a valid encoding type.`,\\\"Please provide a valid ABI type.\\\"].join(`\\n`),{docsPath:r,name:\\\"InvalidAbiEncodingType\\\"})}},nN=class extends W{constructor(e,{docsPath:r}){super([`Type \\\"${e}\\\" is not a valid decoding type.`,\\\"Please provide a valid ABI type.\\\"].join(`\\n`),{docsPath:r,name:\\\"InvalidAbiDecodingType\\\"})}},e5=class extends W{constructor(e){super([`Value \\\"${e}\\\" is not a valid array.`].join(`\\n`),{name:\\\"InvalidArrayError\\\"})}},GO=class extends W{constructor(e){super([`\\\"${e}\\\" is not a valid definition type.`,'Valid types: \\\"function\\\", \\\"event\\\", \\\"error\\\"'].join(`\\n`),{name:\\\"InvalidDefinitionTypeError\\\"})}},iN=class extends W{constructor(e){super(`Type \\\"${e}\\\" is not supported for packed encoding.`,{name:\\\"UnsupportedPackedAbiType\\\"})}}});var sN,Mbe=x(()=>{u();st();sN=class extends W{constructor(e){super(`Filter type \\\"${e}\\\" is not supported.`,{name:\\\"FilterTypeNotSupportedError\\\"})}}});var DS,LS,US,oN=x(()=>{u();st();DS=class extends W{constructor({offset:e,position:r,size:n}){super(`Slice ${r===\\\"start\\\"?\\\"starting\\\":\\\"ending\\\"} at offset \\\"${e}\\\" is out-of-bounds (size: ${n}).`,{name:\\\"SliceOffsetOutOfBoundsError\\\"})}},LS=class extends W{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:\\\"SizeExceedsPaddingSizeError\\\"})}},US=class extends W{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`,{name:\\\"InvalidBytesLengthError\\\"})}}});function Fr(t,{dir:e,size:r=32}={}){return typeof t==\\\"string\\\"?Nd(t,{dir:e,size:r}):oZ(t,{dir:e,size:r})}function Nd(t,{dir:e,size:r=32}={}){if(r===null)return t;let n=t.replace(\\\"0x\\\",\\\"\\\");if(n.length>r*2)throw new LS({size:Math.ceil(n.length/2),targetSize:r,type:\\\"hex\\\"});return`0x${n[e===\\\"right\\\"?\\\"padEnd\\\":\\\"padStart\\\"](r*2,\\\"0\\\")}`}function oZ(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new LS({size:t.length,targetSize:r,type:\\\"bytes\\\"});let n=new Uint8Array(r);for(let i=0;i<r;i++){let s=e===\\\"right\\\";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}var rm=x(()=>{u();oN()});var Og,aN,cN,lN,FS=x(()=>{u();st();Og=class extends W{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number \\\"${s}\\\" is not in safe ${i?`${i*8}-bit ${n?\\\"signed\\\":\\\"unsigned\\\"} `:\\\"\\\"}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:\\\"IntegerOutOfRangeError\\\"})}},aN=class extends W{constructor(e){super(`Bytes value \\\"${e}\\\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:\\\"InvalidBytesBooleanError\\\"})}},cN=class extends W{constructor(e){super(`Hex value \\\"${e}\\\" is not a valid boolean. The hex value must be \\\"0x0\\\" (false) or \\\"0x1\\\" (true).`,{name:\\\"InvalidHexBooleanError\\\"})}},lN=class extends W{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:\\\"SizeOverflowError\\\"})}}});function An(t,{dir:e=\\\"left\\\"}={}){let r=typeof t==\\\"string\\\"?t.replace(\\\"0x\\\",\\\"\\\"):t,n=0;for(let i=0;i<r.length-1&&r[e===\\\"left\\\"?i:r.length-i-1].toString()===\\\"0\\\";i++)n++;return r=e===\\\"left\\\"?r.slice(n):r.slice(0,r.length-n),typeof t==\\\"string\\\"?(r.length===1&&e===\\\"right\\\"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var nm=x(()=>{u()});function La(t,{size:e}){if(Ot(t)>e)throw new lN({givenSize:Ot(t),maxSize:e})}function Ge(t,e={}){let{signed:r}=e;e.size&&La(t,{size:e.size});let n=BigInt(t);if(!r)return n;let i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${\\\"f\\\".padStart(i*2,\\\"f\\\")}`)-1n}function uN(t,e={}){let r=t;if(e.size&&(La(r,{size:e.size}),r=An(r)),An(r)===\\\"0x00\\\")return!1;if(An(r)===\\\"0x01\\\")return!0;throw new cN(r)}function jr(t,e={}){let r=Ge(t,e),n=Number(r);if(!Number.isSafeInteger(n))throw new Og({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${r}n`});return n}function jS(t,e={}){let r=Hr(t);return e.size&&(La(r,{size:e.size}),r=An(r,{dir:\\\"right\\\"})),new TextDecoder().decode(r)}var xi=x(()=>{u();FS();Da();nm();Zi()});function He(t,e={}){return typeof t==\\\"number\\\"||typeof t==\\\"bigint\\\"?Z(t,e):typeof t==\\\"string\\\"?la(t,e):typeof t==\\\"boolean\\\"?Gb(t,e):er(t,e)}function Gb(t,e={}){let r=`0x${Number(t)}`;return typeof e.size==\\\"number\\\"?(La(r,{size:e.size}),Fr(r,{size:e.size})):r}function er(t,e={}){let r=\\\"\\\";for(let i=0;i<t.length;i++)r+=Zlt[t[i]];let n=`0x${r}`;return typeof e.size==\\\"number\\\"?(La(n,{size:e.size}),Fr(n,{dir:\\\"right\\\",size:e.size})):n}function Z(t,e={}){let{signed:r,size:n}=e,i=BigInt(t),s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t==\\\"number\\\"&&(s=BigInt(Number.MAX_SAFE_INTEGER));let o=typeof s==\\\"bigint\\\"&&r?-s-1n:0;if(s&&i>s||i<o){let c=typeof t==\\\"bigint\\\"?\\\"n\\\":\\\"\\\";throw new Og({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}let a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?Fr(a,{size:n}):a}function la(t,e={}){let r=Qlt.encode(t);return er(r,e)}var Zlt,Qlt,qe=x(()=>{u();FS();rm();xi();Zlt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));Qlt=new TextEncoder});function Oo(t,e={}){return typeof t==\\\"number\\\"||typeof t==\\\"bigint\\\"?Ube(t,e):typeof t==\\\"boolean\\\"?Lbe(t,e):Ur(t)?Hr(t,e):Ua(t,e)}function Lbe(t,e={}){let r=new Uint8Array(1);return r[0]=Number(t),typeof e.size==\\\"number\\\"?(La(r,{size:e.size}),Fr(r,{size:e.size})):r}function Dbe(t){if(t>=im.zero&&t<=im.nine)return t-im.zero;if(t>=im.A&&t<=im.F)return t-(im.A-10);if(t>=im.a&&t<=im.f)return t-(im.a-10)}function Hr(t,e={}){let r=t;e.size&&(La(r,{size:e.size}),r=Fr(r,{dir:\\\"right\\\",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){let c=Dbe(n.charCodeAt(a++)),l=Dbe(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new W(`Invalid byte sequence (\\\"${n[a-2]}${n[a-1]}\\\" in \\\"${n}\\\").`);s[o]=c*16+l}return s}function Ube(t,e){let r=Z(t,e);return Hr(r)}function Ua(t,e={}){let r=Jlt.encode(t);return typeof e.size==\\\"number\\\"?(La(r,{size:e.size}),Fr(r,{dir:\\\"right\\\",size:e.size})):r}var Jlt,im,Zi=x(()=>{u();st();gu();rm();xi();qe();Jlt=new TextEncoder;im={zero:48,nine:57,A:65,F:70,a:97,f:102}});function Ylt(t,e=!1){return e?{h:Number(t&dN),l:Number(t>>Fbe&dN)}:{h:Number(t>>Fbe&dN)|0,l:Number(t&dN)|0}}function fN(t,e=!1){let r=t.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){let{h:o,l:a}=Ylt(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}function Jf(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}var dN,Fbe,aZ,cZ,Kb,Zb,HS,qS,jbe,Hbe,qbe,zbe,$be,Vbe,Wbe,Gbe,Kbe,Zbe,lZ=x(()=>{u();dN=BigInt(4294967295),Fbe=BigInt(32);aZ=(t,e,r)=>t>>>r,cZ=(t,e,r)=>t<<32-r|e>>>r,Kb=(t,e,r)=>t>>>r|e<<32-r,Zb=(t,e,r)=>t<<32-r|e>>>r,HS=(t,e,r)=>t<<64-r|e>>>r-32,qS=(t,e,r)=>t>>>r-32|e<<64-r,jbe=(t,e,r)=>t<<r|e>>>32-r,Hbe=(t,e,r)=>e<<r|t>>>32-r,qbe=(t,e,r)=>e<<r-32|t>>>64-r,zbe=(t,e,r)=>t<<r-32|e>>>64-r;$be=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Vbe=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Wbe=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Gbe=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,Kbe=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),Zbe=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0});var Qb,Qbe=x(()=>{u();Qb=typeof globalThis==\\\"object\\\"&&\\\"crypto\\\"in globalThis?globalThis.crypto:void 0});function kg(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function kd(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\\\"positive integer expected, got \\\"+t)}function Fa(t,...e){if(!kg(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function pN(t){if(typeof t!=\\\"function\\\"||typeof t.create!=\\\"function\\\")throw new Error(\\\"Hash should be wrapped by utils.createHasher\\\");kd(t.outputLen),kd(t.blockLen)}function om(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function hN(t,e){Fa(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function Ybe(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function bu(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function mN(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Bd(t,e){return t<<32-e|t>>>e}function tut(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function rut(t){for(let e=0;e<t.length;e++)t[e]=tut(t[e]);return t}function Yf(t){if(Fa(t),Xbe)return t.toHex();let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=nut[t[r]];return e}function Jbe(t){if(t>=sm._0&&t<=sm._9)return t-sm._0;if(t>=sm.A&&t<=sm.F)return t-(sm.A-10);if(t>=sm.a&&t<=sm.f)return t-(sm.a-10)}function Bg(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);if(Xbe)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=Jbe(t.charCodeAt(s)),a=Jbe(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}function dZ(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function Jb(t){return typeof t==\\\"string\\\"&&(t=dZ(t)),Fa(t),t}function Ec(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];Fa(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function t5(t){let e=n=>t().update(Jb(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function am(t=32){if(Qb&&typeof Qb.getRandomValues==\\\"function\\\")return Qb.getRandomValues(new Uint8Array(t));if(Qb&&typeof Qb.randomBytes==\\\"function\\\")return Uint8Array.from(Qb.randomBytes(t));throw new Error(\\\"crypto.getRandomValues must be defined\\\")}var eut,uZ,Xbe,nut,sm,Ng,Md=x(()=>{u();Qbe();eut=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;uZ=eut?t=>t:rut,Xbe=typeof Uint8Array.from([]).toHex==\\\"function\\\"&&typeof Uint8Array.fromHex==\\\"function\\\",nut=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));sm={_0:48,_9:57,A:65,F:70,a:97,f:102};Ng=class{}});function dut(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,l=r[c],d=r[c+1],f=ewe(l,d,1)^r[a],p=twe(l,d,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=p}let i=t[2],s=t[3];for(let o=0;o<24;o++){let a=nwe[o],c=ewe(i,s,a),l=twe(i,s,a),d=rwe[o];i=t[d],s=t[d+1],t[d]=c,t[d+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=lut[n],t[1]^=uut[n]}bu(r)}var iut,zS,sut,out,aut,cut,rwe,nwe,iwe,swe,lut,uut,ewe,twe,fZ,fut,Mg,$S=x(()=>{u();lZ();Md();iut=BigInt(0),zS=BigInt(1),sut=BigInt(2),out=BigInt(7),aut=BigInt(256),cut=BigInt(113),rwe=[],nwe=[],iwe=[];for(let t=0,e=zS,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],rwe.push(2*(5*n+r)),nwe.push((t+1)*(t+2)/2%64);let i=iut;for(let s=0;s<7;s++)e=(e<<zS^(e>>out)*cut)%aut,e&sut&&(i^=zS<<(zS<<BigInt(s))-zS);iwe.push(i)}swe=fN(iwe,!0),lut=swe[0],uut=swe[1],ewe=(t,e,r)=>r>32?qbe(t,e,r):jbe(t,e,r),twe=(t,e,r)=>r>32?zbe(t,e,r):Hbe(t,e,r);fZ=class t extends Ng{constructor(e,r,n,i=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,kd(n),!(0<e&&e<200))throw new Error(\\\"only keccak-f1600 function is supported\\\");this.state=new Uint8Array(200),this.state32=Ybe(this.state)}clone(){return this._cloneInto()}keccak(){uZ(this.state32),dut(this.state32,this.rounds),uZ(this.state32),this.posOut=0,this.pos=0}update(e){om(this),e=Jb(e),Fa(e);let{blockLen:r,state:n}=this,i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){om(this,!1),Fa(e),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error(\\\"XOF is not possible for this instance\\\");return this.writeInto(e)}xof(e){return kd(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(hN(e,this),this.finished)throw new Error(\\\"digest() was already called\\\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,bu(this.state)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},fut=(t,e,r)=>t5(()=>new fZ(e,t,r)),Mg=fut(1,136,256/8)});function Ft(t,e){let r=e||\\\"hex\\\",n=Mg(Ur(t,{strict:!1})?Oo(t):t);return r===\\\"bytes\\\"?n:He(n)}var yl=x(()=>{u();$S();gu();Zi();qe()});function owe(t){return put(t)}var put,awe=x(()=>{u();Zi();yl();put=t=>Ft(Oo(t))});function cwe(t){let e=!0,r=\\\"\\\",n=0,i=\\\"\\\",s=!1;for(let o=0;o<t.length;o++){let a=t[o];if([\\\"(\\\",\\\")\\\",\\\",\\\"].includes(a)&&(e=!0),a===\\\"(\\\"&&n++,a===\\\")\\\"&&n--,!!e){if(n===0){if(a===\\\" \\\"&&[\\\"event\\\",\\\"function\\\",\\\"\\\"].includes(i))i=\\\"\\\";else if(i+=a,a===\\\")\\\"){s=!0;break}continue}if(a===\\\" \\\"){t[o-1]!==\\\",\\\"&&r!==\\\",\\\"&&r!==\\\",(\\\"&&(r=\\\"\\\",e=!1);continue}i+=a,r+=a}}if(!s)throw new W(\\\"Unable to normalize signature.\\\");return i}var lwe=x(()=>{u();st()});var uwe,dwe=x(()=>{u();KE();lwe();uwe=t=>{let e=typeof t==\\\"string\\\"?t:Wb(t);return cwe(e)}});function gN(t){return owe(uwe(t))}var pZ=x(()=>{u();awe();dwe()});var Dg,VS=x(()=>{u();pZ();Dg=gN});var cr,bl=x(()=>{u();st();cr=class extends W{constructor({address:e}){super(`Address \\\"${e}\\\" is invalid.`,{metaMessages:[\\\"- Address must be a hex value of 20 bytes (40 hex characters).\\\",\\\"- Address must match its checksum counterpart.\\\"],name:\\\"InvalidAddressError\\\"})}}});var ua,Lg=x(()=>{u();ua=class extends Map{constructor(e){super(),Object.defineProperty(this,\\\"maxSize\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let r=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,r)),r}set(e,r){if(super.has(e)&&super.delete(e),super.set(e,r),this.maxSize&&this.size>this.maxSize){let n=super.keys().next().value;n!==void 0&&super.delete(n)}return this}}});function Xf(t,e){if(hZ.has(`${t}.${e}`))return hZ.get(`${t}.${e}`);let r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=Ft(Ua(r),\\\"bytes\\\"),i=(e?r.substring(`${e}0x`.length):r).split(\\\"\\\");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());let s=`0x${i.join(\\\"\\\")}`;return hZ.set(`${t}.${e}`,s),s}function _r(t,e){if(!lt(t,{strict:!1}))throw new cr({address:t});return Xf(t,e)}var hZ,Dd=x(()=>{u();bl();Zi();yl();Lg();da();hZ=new ua(8192)});function lt(t,e){let{strict:r=!0}=e??{},n=`${t}.${r}`;if(mZ.has(n))return mZ.get(n);let i=hut.test(t)?t.toLowerCase()===t?!0:r?Xf(t)===t:!0:!1;return mZ.set(n,i),i}var hut,mZ,da=x(()=>{u();Lg();Dd();hut=/^0x[a-fA-F0-9]{40}$/,mZ=new ua(8192)});function Jt(t){return typeof t[0]==\\\"string\\\"?ln(t):mut(t)}function mut(t){let e=0;for(let i of t)e+=i.length;let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}function ln(t){return`0x${t.reduce((e,r)=>e+r.replace(\\\"0x\\\",\\\"\\\"),\\\"\\\")}`}var Ei=x(()=>{u()});function No(t,e,r,{strict:n}={}){return Ur(t,{strict:!1})?WS(t,e,r,{strict:n}):yN(t,e,r,{strict:n})}function fwe(t,e){if(typeof e==\\\"number\\\"&&e>0&&e>Ot(t)-1)throw new DS({offset:e,position:\\\"start\\\",size:Ot(t)})}function pwe(t,e,r){if(typeof e==\\\"number\\\"&&typeof r==\\\"number\\\"&&Ot(t)!==r-e)throw new DS({offset:r,position:\\\"end\\\",size:Ot(t)})}function yN(t,e,r,{strict:n}={}){fwe(t,e);let i=t.slice(e,r);return n&&pwe(i,e,r),i}function WS(t,e,r,{strict:n}={}){fwe(t,e);let i=`0x${t.replace(\\\"0x\\\",\\\"\\\").slice((e??0)*2,(r??t.length)*2)}`;return n&&pwe(i,e,r),i}var ep=x(()=>{u();oN();gu();Da()});var hwe,bN,r5,wN=x(()=>{u();hwe=/^(.*)\\\\[([0-9]*)\\\\]$/,bN=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,r5=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/});function Vn(t,e){if(t.length!==e.length)throw new QE({expectedLength:t.length,givenLength:e.length});let r=gut({params:t,values:e}),n=yZ(r);return n.length===0?\\\"0x\\\":n}function gut({params:t,values:e}){let r=[];for(let n=0;n<t.length;n++)r.push(gZ({param:t[n],value:e[n]}));return r}function gZ({param:t,value:e}){let r=vN(t.type);if(r){let[n,i]=r;return but(e,{length:n,param:{...t,type:i}})}if(t.type===\\\"tuple\\\")return _ut(e,{param:t});if(t.type===\\\"address\\\")return yut(e);if(t.type===\\\"bool\\\")return vut(e);if(t.type.startsWith(\\\"uint\\\")||t.type.startsWith(\\\"int\\\")){let n=t.type.startsWith(\\\"int\\\"),[,,i=\\\"256\\\"]=r5.exec(t.type)??[];return xut(e,{signed:n,size:Number(i)})}if(t.type.startsWith(\\\"bytes\\\"))return wut(e,{param:t});if(t.type===\\\"string\\\")return Eut(e);throw new rN(t.type,{docsPath:\\\"/docs/contract/encodeAbiParameters\\\"})}function yZ(t){let e=0;for(let s=0;s<t.length;s++){let{dynamic:o,encoded:a}=t[s];o?e+=32:e+=Ot(a)}let r=[],n=[],i=0;for(let s=0;s<t.length;s++){let{dynamic:o,encoded:a}=t[s];o?(r.push(Z(e+i,{size:32})),n.push(a),i+=Ot(a)):r.push(a)}return Jt([...r,...n])}function yut(t){if(!lt(t))throw new cr({address:t});return{dynamic:!1,encoded:Nd(t.toLowerCase())}}function but(t,{length:e,param:r}){let n=e===null;if(!Array.isArray(t))throw new e5(t);if(!n&&t.length!==e)throw new ZO({expectedLength:e,givenLength:t.length,type:`${r.type}[${e}]`});let i=!1,s=[];for(let o=0;o<t.length;o++){let a=gZ({param:r,value:t[o]});a.dynamic&&(i=!0),s.push(a)}if(n||i){let o=yZ(s);if(n){let a=Z(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?Jt([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Jt(s.map(({encoded:o})=>o))}}function wut(t,{param:e}){let[,r]=e.type.split(\\\"bytes\\\"),n=Ot(t);if(!r){let i=t;return n%32!==0&&(i=Nd(i,{dir:\\\"right\\\",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Jt([Nd(Z(n,{size:32})),i])}}if(n!==Number.parseInt(r,10))throw new QO({expectedSize:Number.parseInt(r,10),value:t});return{dynamic:!1,encoded:Nd(t,{dir:\\\"right\\\"})}}function vut(t){if(typeof t!=\\\"boolean\\\")throw new W(`Invalid boolean value: \\\"${t}\\\" (type: ${typeof t}). Expected: \\\\`true\\\\` or \\\\`false\\\\`.`);return{dynamic:!1,encoded:Nd(Gb(t))}}function xut(t,{signed:e,size:r=256}){if(typeof r==\\\"number\\\"){let n=2n**(BigInt(r)-(e?1n:0n))-1n,i=e?-n-1n:0n;if(t>n||t<i)throw new Og({max:n.toString(),min:i.toString(),signed:e,size:r/8,value:t.toString()})}return{dynamic:!1,encoded:Z(t,{size:32,signed:e})}}function Eut(t){let e=la(t),r=Math.ceil(Ot(e)/32),n=[];for(let i=0;i<r;i++)n.push(Nd(No(e,i*32,(i+1)*32),{dir:\\\"right\\\"}));return{dynamic:!0,encoded:Jt([Nd(Z(Ot(e),{size:32})),...n])}}function _ut(t,{param:e}){let r=!1,n=[];for(let i=0;i<e.components.length;i++){let s=e.components[i],o=Array.isArray(t)?i:s.name,a=gZ({param:s,value:t[o]});n.push(a),a.dynamic&&(r=!0)}return{dynamic:r,encoded:r?yZ(n):Jt(n.map(({encoded:i})=>i))}}function vN(t){let e=t.match(/^(.*)\\\\[(\\\\d+)?\\\\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}var wu=x(()=>{u();Ki();bl();st();FS();da();Ei();rm();Da();ep();qe();wN()});var tp,n5=x(()=>{u();ep();pZ();tp=t=>No(gN(t),0,4)});function _c(t){let{abi:e,args:r=[],name:n}=t,i=Ur(n,{strict:!1}),s=e.filter(a=>i?a.type===\\\"function\\\"?tp(a)===n:a.type===\\\"event\\\"?Dg(a)===n:!1:\\\"name\\\"in a&&a.name===n);if(s.length===0)return;if(s.length===1)return s[0];let o;for(let a of s){if(!(\\\"inputs\\\"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((l,d)=>{let f=\\\"inputs\\\"in a&&a.inputs[d];return f?bZ(l,f):!1})){if(o&&\\\"inputs\\\"in o&&o.inputs){let l=mwe(a.inputs,o.inputs,r);if(l)throw new tN({abiItem:a,type:l[0]},{abiItem:o,type:l[1]})}o=a}}return o||s[0]}function bZ(t,e){let r=typeof t,n=e.type;switch(n){case\\\"address\\\":return lt(t,{strict:!1});case\\\"bool\\\":return r===\\\"boolean\\\";case\\\"function\\\":return r===\\\"string\\\";case\\\"string\\\":return r===\\\"string\\\";default:return n===\\\"tuple\\\"&&\\\"components\\\"in e?Object.values(e.components).every((i,s)=>r===\\\"object\\\"&&bZ(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r===\\\"number\\\"||r===\\\"bigint\\\":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r===\\\"string\\\"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\\\\[[0-9]{0,}\\\\])+$/.test(n)?Array.isArray(t)&&t.every(i=>bZ(i,{...e,type:n.replace(/(\\\\[[0-9]{0,}\\\\])$/,\\\"\\\")})):!1}}function mwe(t,e,r){for(let n in t){let i=t[n],s=e[n];if(i.type===\\\"tuple\\\"&&s.type===\\\"tuple\\\"&&\\\"components\\\"in i&&\\\"components\\\"in s)return mwe(i.components,s.components,r[n]);let o=[i.type,s.type];if(o.includes(\\\"address\\\")&&o.includes(\\\"bytes20\\\")?!0:o.includes(\\\"address\\\")&&o.includes(\\\"string\\\")?lt(r[n],{strict:!1}):o.includes(\\\"address\\\")&&o.includes(\\\"bytes\\\")?lt(r[n],{strict:!1}):!1)return o}}var Ug=x(()=>{u();Ki();gu();da();VS();n5()});function rp(t){let{abi:e,eventName:r,args:n}=t,i=e[0];if(r){let c=_c({abi:e,name:r});if(!c)throw new MS(r,{docsPath:gwe});i=c}if(i.type!==\\\"event\\\")throw new MS(void 0,{docsPath:gwe});let s=js(i),o=Dg(s),a=[];if(n&&\\\"inputs\\\"in i){let c=i.inputs?.filter(d=>\\\"indexed\\\"in d&&d.indexed),l=Array.isArray(n)?n:Object.values(n).length>0?c?.map(d=>n[d.name])??[]:[];l.length>0&&(a=c?.map((d,f)=>Array.isArray(l[f])?l[f].map((p,h)=>ywe({param:d,value:l[f][h]})):typeof l[f]<\\\"u\\\"&&l[f]!==null?ywe({param:d,value:l[f]}):null)??[])}return[o,...a]}function ywe({param:t,value:e}){if(t.type===\\\"string\\\"||t.type===\\\"bytes\\\")return Ft(Oo(e));if(t.type===\\\"tuple\\\"||t.type.match(/^(.*)\\\\[(\\\\d+)?\\\\]$/))throw new sN(t.type);return Vn([t],[e])}var gwe,i5=x(()=>{u();Ki();Mbe();Zi();yl();VS();wu();em();Ug();gwe=\\\"/docs/contract/encodeEventTopics\\\"});function Fg(t,{method:e}){let r={};return t.transport.type===\\\"fallback\\\"&&t.transport.onResponse?.(({method:n,response:i,status:s,transport:o})=>{s===\\\"success\\\"&&e===n&&(r[i]=o.request)}),(n=>r[n]||t.request)}var GS=x(()=>{u()});async function xN(t,e){let{address:r,abi:n,args:i,eventName:s,fromBlock:o,strict:a,toBlock:c}=e,l=Fg(t,{method:\\\"eth_newFilter\\\"}),d=s?rp({abi:n,args:i,eventName:s}):void 0,f=await t.request({method:\\\"eth_newFilter\\\",params:[{address:r,fromBlock:typeof o==\\\"bigint\\\"?Z(o):o,toBlock:typeof c==\\\"bigint\\\"?Z(c):c,topics:d}]});return{abi:n,args:i,eventName:s,id:f,request:l(f),strict:!!a,type:\\\"event\\\"}}var wZ=x(()=>{u();i5();qe();GS()});function Ze(t){return typeof t==\\\"string\\\"?{address:t,type:\\\"json-rpc\\\"}:t}var en=x(()=>{u()});function wwe(t){let{abi:e,args:r,functionName:n}=t,i=e[0];if(n){let s=_c({abi:e,args:r,name:n});if(!s)throw new Od(n,{docsPath:bwe});i=s}if(i.type!==\\\"function\\\")throw new Od(void 0,{docsPath:bwe});return{abi:[i],functionName:tp(js(i))}}var bwe,vwe=x(()=>{u();Ki();n5();em();Ug();bwe=\\\"/docs/contract/encodeFunctionData\\\"});function At(t){let{args:e}=t,{abi:r,functionName:n}=t.abi.length===1&&t.functionName?.startsWith(\\\"0x\\\")?t:wwe(t),i=r[0],s=n,o=\\\"inputs\\\"in i&&i.inputs?Vn(i.inputs,e??[]):void 0;return ln([s,o??\\\"0x\\\"])}var fa=x(()=>{u();Ei();wu();vwe()});var xwe,EN,Ewe,_N=x(()=>{u();xwe={1:\\\"An `assert` condition failed.\\\",17:\\\"Arithmetic operation resulted in underflow or overflow.\\\",18:\\\"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).\\\",33:\\\"Attempted to convert to an invalid type.\\\",34:\\\"Attempted to access a storage byte array that is incorrectly encoded.\\\",49:\\\"Performed `.pop()` on an empty array\\\",50:\\\"Array index is out of bounds.\\\",65:\\\"Allocated too much memory or created an array which is too large.\\\",81:\\\"Attempted to call a zero-initialized variable of internal function type.\\\"},EN={inputs:[{name:\\\"message\\\",type:\\\"string\\\"}],name:\\\"Error\\\",type:\\\"error\\\"},Ewe={inputs:[{name:\\\"reason\\\",type:\\\"uint256\\\"}],name:\\\"Panic\\\",type:\\\"error\\\"}});var KS,s5,CN,vZ=x(()=>{u();st();KS=class extends W{constructor({offset:e}){super(`Offset \\\\`${e}\\\\` cannot be negative.`,{name:\\\"NegativeOffsetError\\\"})}},s5=class extends W{constructor({length:e,position:r}){super(`Position \\\\`${r}\\\\` is out of bounds (\\\\`0 < position < ${e}\\\\`).`,{name:\\\"PositionOutOfBoundsError\\\"})}},CN=class extends W{constructor({count:e,limit:r}){super(`Recursive read limit of \\\\`${r}\\\\` exceeded (recursive read count: \\\\`${e}\\\\`).`,{name:\\\"RecursiveReadLimitExceededError\\\"})}}});function o5(t,{recursiveReadLimit:e=8192}={}){let r=Object.create(Cut);return r.bytes=t,r.dataView=new DataView(t.buffer??t,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}var Cut,SN=x(()=>{u();vZ();Cut={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new CN({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new s5({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new KS({offset:t});let e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new KS({offset:t});let e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){let r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){let e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){let e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){let e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();let r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();let t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();let t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();let t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();let t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){let e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}}});function _we(t,e={}){typeof e.size<\\\"u\\\"&&La(t,{size:e.size});let r=er(t,e);return Ge(r,e)}function Cwe(t,e={}){let r=t;if(typeof e.size<\\\"u\\\"&&(La(r,{size:e.size}),r=An(r)),r.length>1||r[0]>1)throw new aN(r);return!!r[0]}function np(t,e={}){typeof e.size<\\\"u\\\"&&La(t,{size:e.size});let r=er(t,e);return jr(r,e)}function Swe(t,e={}){let r=t;return typeof e.size<\\\"u\\\"&&(La(r,{size:e.size}),r=An(r,{dir:\\\"right\\\"})),new TextDecoder().decode(r)}var Awe=x(()=>{u();FS();nm();xi();qe()});function Cc(t,e){let r=typeof e==\\\"string\\\"?Hr(e):e,n=o5(r);if(Ot(r)===0&&t.length>0)throw new yu;if(Ot(e)&&Ot(e)<32)throw new ZE({data:typeof e==\\\"string\\\"?e:er(e),params:t,size:Ot(e)});let i=0,s=[];for(let o=0;o<t.length;++o){let a=t[o];n.setPosition(i);let[c,l]=a5(n,a,{staticPosition:0});i+=l,s.push(c)}return s}function a5(t,e,{staticPosition:r}){let n=vN(e.type);if(n){let[i,s]=n;return Aut(t,{...e,type:s},{length:i,staticPosition:r})}if(e.type===\\\"tuple\\\")return Put(t,e,{staticPosition:r});if(e.type===\\\"address\\\")return Sut(t);if(e.type===\\\"bool\\\")return Tut(t);if(e.type.startsWith(\\\"bytes\\\"))return Iut(t,e,{staticPosition:r});if(e.type.startsWith(\\\"uint\\\")||e.type.startsWith(\\\"int\\\"))return Rut(t,e);if(e.type===\\\"string\\\")return Out(t,{staticPosition:r});throw new nN(e.type,{docsPath:\\\"/docs/contract/decodeAbiParameters\\\"})}function Sut(t){let e=t.readBytes(32);return[Xf(er(yN(e,-20))),32]}function Aut(t,e,{length:r,staticPosition:n}){if(!r){let o=np(t.readBytes(xZ)),a=n+o,c=a+Twe;t.setPosition(a);let l=np(t.readBytes(Twe)),d=ZS(e),f=0,p=[];for(let h=0;h<l;++h){t.setPosition(c+(d?h*32:f));let[m,g]=a5(t,e,{staticPosition:c});f+=g,p.push(m)}return t.setPosition(n+32),[p,32]}if(ZS(e)){let o=np(t.readBytes(xZ)),a=n+o,c=[];for(let l=0;l<r;++l){t.setPosition(a+l*32);let[d]=a5(t,e,{staticPosition:a});c.push(d)}return t.setPosition(n+32),[c,32]}let i=0,s=[];for(let o=0;o<r;++o){let[a,c]=a5(t,e,{staticPosition:n+i});i+=c,s.push(a)}return[s,i]}function Tut(t){return[Cwe(t.readBytes(32),{size:32}),32]}function Iut(t,e,{staticPosition:r}){let[n,i]=e.type.split(\\\"bytes\\\");if(!i){let o=np(t.readBytes(32));t.setPosition(r+o);let a=np(t.readBytes(32));if(a===0)return t.setPosition(r+32),[\\\"0x\\\",32];let c=t.readBytes(a);return t.setPosition(r+32),[er(c),32]}return[er(t.readBytes(Number.parseInt(i,10),32)),32]}function Rut(t,e){let r=e.type.startsWith(\\\"int\\\"),n=Number.parseInt(e.type.split(\\\"int\\\")[1]||\\\"256\\\",10),i=t.readBytes(32);return[n>48?_we(i,{signed:r}):np(i,{signed:r}),32]}function Put(t,e,{staticPosition:r}){let n=e.components.length===0||e.components.some(({name:o})=>!o),i=n?[]:{},s=0;if(ZS(e)){let o=np(t.readBytes(xZ)),a=r+o;for(let c=0;c<e.components.length;++c){let l=e.components[c];t.setPosition(a+s);let[d,f]=a5(t,l,{staticPosition:a});s+=f,i[n?c:l?.name]=d}return t.setPosition(r+32),[i,32]}for(let o=0;o<e.components.length;++o){let a=e.components[o],[c,l]=a5(t,a,{staticPosition:r});i[n?o:a?.name]=c,s+=l}return[i,s]}function Out(t,{staticPosition:e}){let r=np(t.readBytes(32)),n=e+r;t.setPosition(n);let i=np(t.readBytes(32));if(i===0)return t.setPosition(e+32),[\\\"\\\",32];let s=t.readBytes(i,32),o=Swe(An(s));return t.setPosition(e+32),[o,32]}function ZS(t){let{type:e}=t;if(e===\\\"string\\\"||e===\\\"bytes\\\"||e.endsWith(\\\"[]\\\"))return!0;if(e===\\\"tuple\\\")return t.components?.some(ZS);let r=vN(t.type);return!!(r&&ZS({...t,type:r[1]}))}var Twe,xZ,c5=x(()=>{u();Ki();Dd();SN();Da();ep();nm();Awe();Zi();qe();wu();Twe=32,xZ=32});function l5(t){let{abi:e,data:r,cause:n}=t,i=No(r,0,4);if(i===\\\"0x\\\")throw new yu({cause:n});let o=[...e||[],EN,Ewe].find(a=>a.type===\\\"error\\\"&&i===tp(js(a)));if(!o)throw new JE(i,{docsPath:\\\"/docs/contract/decodeErrorResult\\\",cause:n});return{abiItem:o,args:\\\"inputs\\\"in o&&o.inputs&&o.inputs.length>0?Cc(o.inputs,No(r,4)):void 0,errorName:o.name}}var AN=x(()=>{u();_N();Ki();ep();n5();c5();em()});var qt,ko=x(()=>{u();qt=(t,e,r)=>JSON.stringify(t,(n,i)=>{let s=typeof i==\\\"bigint\\\"?i.toString():i;return typeof e==\\\"function\\\"?e(n,s):s},r)});function EZ({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if(\\\"name\\\"in t&&\\\"inputs\\\"in t&&t.inputs)return`${r?t.name:\\\"\\\"}(${t.inputs.map((i,s)=>`${n&&i.name?`${i.name}: `:\\\"\\\"}${typeof e[s]==\\\"object\\\"?qt(e[s]):e[s]}`).join(\\\", \\\")})`}var Iwe=x(()=>{u();ko()});var Rwe,Pwe,_Z=x(()=>{u();Rwe={gwei:9,wei:18},Pwe={ether:-9,wei:9}});function cm(t,e){let r=t.toString(),n=r.startsWith(\\\"-\\\");n&&(r=r.slice(1)),r=r.padStart(e,\\\"0\\\");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,\\\"\\\"),`${n?\\\"-\\\":\\\"\\\"}${i||\\\"0\\\"}${s?`.${s}`:\\\"\\\"}`}var TN=x(()=>{u()});function u5(t,e=\\\"wei\\\"){return cm(t,Rwe[e])}var IN=x(()=>{u();_Z();TN()});function Oi(t,e=\\\"wei\\\"){return cm(t,Pwe[e])}var Yb=x(()=>{u();_Z();TN()});function Owe(t){return t.reduce((e,{slot:r,value:n})=>`${e}        ${r}: ${n}\\n`,\\\"\\\")}function Nwe(t){return t.reduce((e,{address:r,...n})=>{let i=`${e}    ${r}:\\n`;return n.nonce&&(i+=`      nonce: ${n.nonce}\\n`),n.balance&&(i+=`      balance: ${n.balance}\\n`),n.code&&(i+=`      code: ${n.code}\\n`),n.state&&(i+=`      state:\\n`,i+=Owe(n.state)),n.stateDiff&&(i+=`      stateDiff:\\n`,i+=Owe(n.stateDiff)),i},`  State Override:\\n`).slice(0,-1)}var RN,PN,CZ=x(()=>{u();st();RN=class extends W{constructor({address:e}){super(`State for account \\\"${e}\\\" is set multiple times.`,{name:\\\"AccountStateConflictError\\\"})}},PN=class extends W{constructor(){super(\\\"state and stateDiff are set on the same account.\\\",{name:\\\"StateAssignmentConflictError\\\"})}}});function lm(t){let e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>`  ${`${n}:`.padEnd(r+1)}  ${i}`).join(`\\n`)}var ON,NN,kN,BN,d5,f5,p5,MN,wl=x(()=>{u();IN();Yb();st();ON=class extends W{constructor({v:e}){super(`Invalid \\\\`v\\\\` value \\\"${e}\\\". Expected 27 or 28.`,{name:\\\"InvalidLegacyVError\\\"})}},NN=class extends W{constructor({transaction:e}){super(\\\"Cannot infer a transaction type from provided transaction.\\\",{metaMessages:[\\\"Provided Transaction:\\\",\\\"{\\\",lm(e),\\\"}\\\",\\\"\\\",\\\"To infer the type, either provide:\\\",\\\"- a `type` to the Transaction, or\\\",\\\"- an EIP-1559 Transaction with `maxFeePerGas`, or\\\",\\\"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or\\\",\\\"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or\\\",\\\"- an EIP-7702 Transaction with `authorizationList`, or\\\",\\\"- a Legacy Transaction with `gasPrice`\\\"],name:\\\"InvalidSerializableTransactionError\\\"})}},kN=class extends W{constructor({storageKey:e}){super(`Size for storage key \\\"${e}\\\" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:\\\"InvalidStorageKeySizeError\\\"})}},BN=class extends W{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:p}){let h=lm({chain:i&&`${i?.name} (id: ${i?.id})`,from:r?.address,to:f,value:typeof p<\\\"u\\\"&&`${u5(p)} ${i?.nativeCurrency?.symbol||\\\"ETH\\\"}`,data:s,gas:o,gasPrice:typeof a<\\\"u\\\"&&`${Oi(a)} gwei`,maxFeePerGas:typeof c<\\\"u\\\"&&`${Oi(c)} gwei`,maxPriorityFeePerGas:typeof l<\\\"u\\\"&&`${Oi(l)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages,\\\" \\\"]:[],\\\"Request Arguments:\\\",h].filter(Boolean),name:\\\"TransactionExecutionError\\\"}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},d5=class extends W{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){let o=\\\"Transaction\\\";n&&s!==void 0&&(o=`Transaction at block time \\\"${n}\\\" at index \\\"${s}\\\"`),e&&s!==void 0&&(o=`Transaction at block hash \\\"${e}\\\" at index \\\"${s}\\\"`),r&&s!==void 0&&(o=`Transaction at block number \\\"${r}\\\" at index \\\"${s}\\\"`),i&&(o=`Transaction with hash \\\"${i}\\\"`),super(`${o} could not be found.`,{name:\\\"TransactionNotFoundError\\\"})}},f5=class extends W{constructor({hash:e}){super(`Transaction receipt with hash \\\"${e}\\\" could not be found. The Transaction may not be processed on a block yet.`,{name:\\\"TransactionReceiptNotFoundError\\\"})}},p5=class extends W{constructor({receipt:e}){super(`Transaction with hash \\\"${e.transactionHash}\\\" reverted.`,{metaMessages:['The receipt marked the transaction as \\\"reverted\\\". This could mean that the function on the contract you are trying to call threw an error.',\\\" \\\",\\\"You can attempt to extract the revert reason by:\\\",\\\"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract\\\",\\\"- using the `call` Action with raw `data`\\\"],name:\\\"TransactionReceiptRevertedError\\\"}),Object.defineProperty(this,\\\"receipt\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}},MN=class extends W{constructor({hash:e}){super(`Timed out while waiting for transaction with hash \\\"${e}\\\" to be confirmed.`,{name:\\\"WaitForTransactionReceiptTimeoutError\\\"})}}});var kwe,Xb,DN=x(()=>{u();kwe=t=>t,Xb=t=>t});var h5,jg,um,m5,LN,ip,dm=x(()=>{u();en();_N();AN();em();Iwe();Ug();IN();Yb();Ki();st();CZ();wl();DN();h5=class extends W{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:p,stateOverride:h}){let m=r?Ze(r):void 0,g=lm({from:m?.address,to:f,value:typeof p<\\\"u\\\"&&`${u5(p)} ${i?.nativeCurrency?.symbol||\\\"ETH\\\"}`,data:s,gas:o,gasPrice:typeof a<\\\"u\\\"&&`${Oi(a)} gwei`,maxFeePerGas:typeof c<\\\"u\\\"&&`${Oi(c)} gwei`,maxPriorityFeePerGas:typeof l<\\\"u\\\"&&`${Oi(l)} gwei`,nonce:d});h&&(g+=`\\n${Nwe(h)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages,\\\" \\\"]:[],\\\"Raw Call Arguments:\\\",g].filter(Boolean),name:\\\"CallExecutionError\\\"}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},jg=class extends W{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:s,functionName:o,sender:a}){let c=_c({abi:r,args:n,name:o}),l=c?EZ({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,d=c?js(c,{includeName:!0}):void 0,f=lm({address:i&&kwe(i),function:d,args:l&&l!==\\\"()\\\"&&`${[...Array(o?.length??0).keys()].map(()=>\\\" \\\").join(\\\"\\\")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function \\\"${o}\\\".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages,\\\" \\\"]:[],f&&\\\"Contract Call:\\\",f].filter(Boolean),name:\\\"ContractFunctionExecutionError\\\"}),Object.defineProperty(this,\\\"abi\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"args\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"contractAddress\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"formattedArgs\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"functionName\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"sender\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}},um=class extends W{constructor({abi:e,data:r,functionName:n,message:i,cause:s}){let o,a,c,l;if(r&&r!==\\\"0x\\\")try{a=l5({abi:e,data:r,cause:s});let{abiItem:f,errorName:p,args:h}=a;if(p===\\\"Error\\\")l=h[0];else if(p===\\\"Panic\\\"){let[m]=h;l=xwe[m]}else{let m=f?js(f,{includeName:!0}):void 0,g=f&&h?EZ({abiItem:f,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[m?`Error: ${m}`:\\\"\\\",g&&g!==\\\"()\\\"?`       ${[...Array(p?.length??0).keys()].map(()=>\\\" \\\").join(\\\"\\\")}${g}`:\\\"\\\"]}}catch(f){o=f}else i&&(l=i);let d;o instanceof JE&&(d=o.signature,c=[`Unable to decode signature \\\"${d}\\\" as it was not found on the provided ABI.`,\\\"Make sure you are using the correct ABI and that the error exists on it.\\\",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${d}.`]),super(l&&l!==\\\"execution reverted\\\"||d?[`The contract function \\\"${n}\\\" reverted with the following ${d?\\\"signature\\\":\\\"reason\\\"}:`,l||d].join(`\\n`):`The contract function \\\"${n}\\\" reverted.`,{cause:o??s,metaMessages:c,name:\\\"ContractFunctionRevertedError\\\"}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"raw\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"reason\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"signature\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=a,this.raw=r,this.reason=l,this.signature=d}},m5=class extends W{constructor({functionName:e,cause:r}){super(`The contract function \\\"${e}\\\" returned no data (\\\"0x\\\").`,{metaMessages:[\\\"This could be due to any of the following:\\\",`  - The contract does not have the function \\\"${e}\\\",`,\\\"  - The parameters passed to the contract function may be invalid, or\\\",\\\"  - The address is not a contract.\\\"],name:\\\"ContractFunctionZeroDataError\\\",cause:r})}},LN=class extends W{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory \\\"${e}\\\".`:\\\"\\\"}`,{metaMessages:[\\\"Please ensure:\\\",\\\"- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).\\\",\\\"- The `factoryData` is a valid encoded function call for contract deployment function on the factory.\\\"],name:\\\"CounterfactualDeploymentFailedError\\\"})}},ip=class extends W{constructor({data:e,message:r}){super(r||\\\"\\\",{name:\\\"RawContractError\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}});var vu,Hg,QS,ew=x(()=>{u();ko();st();DN();vu=class extends W{constructor({body:e,cause:r,details:n,headers:i,status:s,url:o}){super(\\\"HTTP request failed.\\\",{cause:r,details:n,metaMessages:[s&&`Status: ${s}`,`URL: ${Xb(o)}`,e&&`Request body: ${qt(e)}`].filter(Boolean),name:\\\"HttpRequestError\\\"}),Object.defineProperty(this,\\\"body\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"headers\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"status\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"url\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=o}},Hg=class extends W{constructor({body:e,error:r,url:n}){super(\\\"RPC Request failed.\\\",{cause:r,details:r.message,metaMessages:[`URL: ${Xb(n)}`,`Request body: ${qt(e)}`],name:\\\"RpcRequestError\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"url\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data,this.url=n}},QS=class extends W{constructor({body:e,url:r}){super(\\\"The request took too long to respond.\\\",{details:\\\"The request timed out.\\\",metaMessages:[`URL: ${Xb(r)}`,`Request body: ${qt(e)}`],name:\\\"TimeoutError\\\"}),Object.defineProperty(this,\\\"url\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=r}}});var Nut,Bo,Mo,tw,rw,nw,iw,sp,vl,sw,Ld,fm,pm,qg,ow,Cr,aw,cw,lw,uw,Do,hm,dw,fw,pw,hw,mw,mm,zg,JS,$g=x(()=>{u();st();ew();Nut=-1,Bo=class extends W{constructor(e,{code:r,docsPath:n,metaMessages:i,name:s,shortMessage:o}){super(o,{cause:e,docsPath:n,metaMessages:i||e?.metaMessages,name:s||\\\"RpcError\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof Hg?e.code:r??Nut}},Mo=class extends Bo{constructor(e,r){super(e,r),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}},tw=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"ParseRpcError\\\",shortMessage:\\\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\\\"})}};Object.defineProperty(tw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32700});rw=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"InvalidRequestRpcError\\\",shortMessage:\\\"JSON is not a valid request object.\\\"})}};Object.defineProperty(rw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32600});nw=class t extends Bo{constructor(e,{method:r}={}){super(e,{code:t.code,name:\\\"MethodNotFoundRpcError\\\",shortMessage:`The method${r?` \\\"${r}\\\"`:\\\"\\\"} does not exist / is not available.`})}};Object.defineProperty(nw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32601});iw=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"InvalidParamsRpcError\\\",shortMessage:[\\\"Invalid parameters were provided to the RPC method.\\\",\\\"Double check you have provided the correct parameters.\\\"].join(`\\n`)})}};Object.defineProperty(iw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32602});sp=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"InternalRpcError\\\",shortMessage:\\\"An internal error was received.\\\"})}};Object.defineProperty(sp,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32603});vl=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"InvalidInputRpcError\\\",shortMessage:[\\\"Missing or invalid parameters.\\\",\\\"Double check you have provided the correct parameters.\\\"].join(`\\n`)})}};Object.defineProperty(vl,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});sw=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"ResourceNotFoundRpcError\\\",shortMessage:\\\"Requested resource not found.\\\"}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ResourceNotFoundRpcError\\\"})}};Object.defineProperty(sw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32001});Ld=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"ResourceUnavailableRpcError\\\",shortMessage:\\\"Requested resource not available.\\\"})}};Object.defineProperty(Ld,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32002});fm=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"TransactionRejectedRpcError\\\",shortMessage:\\\"Transaction creation failed.\\\"})}};Object.defineProperty(fm,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32003});pm=class t extends Bo{constructor(e,{method:r}={}){super(e,{code:t.code,name:\\\"MethodNotSupportedRpcError\\\",shortMessage:`Method${r?` \\\"${r}\\\"`:\\\"\\\"} is not supported.`})}};Object.defineProperty(pm,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32004});qg=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"LimitExceededRpcError\\\",shortMessage:\\\"Request exceeds defined limit.\\\"})}};Object.defineProperty(qg,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32005});ow=class t extends Bo{constructor(e){super(e,{code:t.code,name:\\\"JsonRpcVersionUnsupportedError\\\",shortMessage:\\\"Version of JSON-RPC protocol is not supported.\\\"})}};Object.defineProperty(ow,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32006});Cr=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"UserRejectedRequestError\\\",shortMessage:\\\"User rejected the request.\\\"})}};Object.defineProperty(Cr,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4001});aw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"UnauthorizedProviderError\\\",shortMessage:\\\"The requested method and/or account has not been authorized by the user.\\\"})}};Object.defineProperty(aw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4100});cw=class t extends Mo{constructor(e,{method:r}={}){super(e,{code:t.code,name:\\\"UnsupportedProviderMethodError\\\",shortMessage:`The Provider does not support the requested method${r?` \\\" ${r}\\\"`:\\\"\\\"}.`})}};Object.defineProperty(cw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4200});lw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"ProviderDisconnectedError\\\",shortMessage:\\\"The Provider is disconnected from all chains.\\\"})}};Object.defineProperty(lw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4900});uw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"ChainDisconnectedError\\\",shortMessage:\\\"The Provider is not connected to the requested chain.\\\"})}};Object.defineProperty(uw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4901});Do=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"SwitchChainError\\\",shortMessage:\\\"An error occurred when attempting to switch chain.\\\"})}};Object.defineProperty(Do,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4902});hm=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"UnsupportedNonOptionalCapabilityError\\\",shortMessage:\\\"This Wallet does not support a capability that was not marked as optional.\\\"})}};Object.defineProperty(hm,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5700});dw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"UnsupportedChainIdError\\\",shortMessage:\\\"This Wallet does not support the requested chain ID.\\\"})}};Object.defineProperty(dw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5710});fw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"DuplicateIdError\\\",shortMessage:\\\"There is already a bundle submitted with this ID.\\\"})}};Object.defineProperty(fw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5720});pw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"UnknownBundleIdError\\\",shortMessage:\\\"This bundle id is unknown / has not been submitted\\\"})}};Object.defineProperty(pw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5730});hw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"BundleTooLargeError\\\",shortMessage:\\\"The call bundle is too large for the Wallet to process.\\\"})}};Object.defineProperty(hw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5740});mw=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"AtomicReadyWalletRejectedUpgradeError\\\",shortMessage:\\\"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.\\\"})}};Object.defineProperty(mw,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5750});mm=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"AtomicityNotSupportedError\\\",shortMessage:\\\"The wallet does not support atomic execution but the request requires it.\\\"})}};Object.defineProperty(mm,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:5760});zg=class t extends Mo{constructor(e){super(e,{code:t.code,name:\\\"WalletConnectSessionSettlementError\\\",shortMessage:\\\"WalletConnect session settlement failed.\\\"})}};Object.defineProperty(zg,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:7e3});JS=class extends Bo{constructor(e){super(e,{name:\\\"UnknownRpcError\\\",shortMessage:\\\"An unknown RPC error occurred.\\\"})}}});function xl(t,{abi:e,address:r,args:n,docsPath:i,functionName:s,sender:o}){let a=t instanceof ip?t:t instanceof W?t.walk(m=>\\\"data\\\"in m)||t.walk():{},{code:c,data:l,details:d,message:f,shortMessage:p}=a,h=t instanceof yu?new m5({functionName:s,cause:t}):[kut,sp.code].includes(c)&&(l||d||f||p)||c===vl.code&&d===\\\"execution reverted\\\"&&l?new um({abi:e,data:typeof l==\\\"object\\\"?l.data:l,functionName:s,message:a instanceof Hg?d:p??f,cause:t}):t;return new jg(h,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o})}var kut,gw=x(()=>{u();Ki();st();dm();ew();$g();kut=3});function Bwe(t){let e=Ft(`0x${t.substring(4)}`).substring(26);return Xf(`0x${e}`)}var Mwe=x(()=>{u();Dd();yl()});function But(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function Dwe(t,e,r){return t&e^~t&r}function Lwe(t,e,r){return t&e^t&r^e&r}var YS,gm,Lo,Uo,Uwe=x(()=>{u();Md();YS=class extends Ng{constructor(e,r,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=mN(this.buffer)}update(e){om(this),e=Jb(e),Fa(e);let{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=mN(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){om(this),hN(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,bu(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;But(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=mN(e),c=this.outputLen;if(c%4)throw new Error(\\\"_sha2: outputLen should be aligned to 32bit\\\");let l=c/4,d=this.get();if(l>d.length)throw new Error(\\\"_sha2: outputLen bigger than state\\\");for(let f=0;f<l;f++)a.setUint32(4*f,d[f],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=a,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}},gm=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Lo=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Uo=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])});var Mut,Vg,UN,Fwe,Dut,Lut,Wg,Gg,FN,SZ,Ud,jwe,Hwe,XS=x(()=>{u();Uwe();lZ();Md();Mut=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Vg=new Uint32Array(64),UN=class extends YS{constructor(e=32){super(64,e,8,!1),this.A=gm[0]|0,this.B=gm[1]|0,this.C=gm[2]|0,this.D=gm[3]|0,this.E=gm[4]|0,this.F=gm[5]|0,this.G=gm[6]|0,this.H=gm[7]|0}get(){let{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Vg[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){let p=Vg[f-15],h=Vg[f-2],m=Bd(p,7)^Bd(p,18)^p>>>3,g=Bd(h,17)^Bd(h,19)^h>>>10;Vg[f]=g+Vg[f-7]+m+Vg[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:d}=this;for(let f=0;f<64;f++){let p=Bd(a,6)^Bd(a,11)^Bd(a,25),h=d+p+Dwe(a,c,l)+Mut[f]+Vg[f]|0,g=(Bd(n,2)^Bd(n,13)^Bd(n,22))+Lwe(n,i,s)|0;d=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+g|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,s,o,a,c,l,d)}roundClean(){bu(Vg)}destroy(){this.set(0,0,0,0,0,0,0,0),bu(this.buffer)}},Fwe=fN([\\\"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))),Dut=Fwe[0],Lut=Fwe[1],Wg=new Uint32Array(80),Gg=new Uint32Array(80),FN=class extends YS{constructor(e=64){super(128,e,16,!1),this.Ah=Uo[0]|0,this.Al=Uo[1]|0,this.Bh=Uo[2]|0,this.Bl=Uo[3]|0,this.Ch=Uo[4]|0,this.Cl=Uo[5]|0,this.Dh=Uo[6]|0,this.Dl=Uo[7]|0,this.Eh=Uo[8]|0,this.El=Uo[9]|0,this.Fh=Uo[10]|0,this.Fl=Uo[11]|0,this.Gh=Uo[12]|0,this.Gl=Uo[13]|0,this.Hh=Uo[14]|0,this.Hl=Uo[15]|0}get(){let{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:m,Hh:g,Hl:w}=this;return[e,r,n,i,s,o,a,c,l,d,f,p,h,m,g,w]}set(e,r,n,i,s,o,a,c,l,d,f,p,h,m,g,w){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=d|0,this.Fh=f|0,this.Fl=p|0,this.Gh=h|0,this.Gl=m|0,this.Hh=g|0,this.Hl=w|0}process(e,r){for(let _=0;_<16;_++,r+=4)Wg[_]=e.getUint32(r),Gg[_]=e.getUint32(r+=4);for(let _=16;_<80;_++){let S=Wg[_-15]|0,T=Gg[_-15]|0,N=Kb(S,T,1)^Kb(S,T,8)^aZ(S,T,7),O=Zb(S,T,1)^Zb(S,T,8)^cZ(S,T,7),L=Wg[_-2]|0,B=Gg[_-2]|0,H=Kb(L,B,19)^HS(L,B,61)^aZ(L,B,6),M=Zb(L,B,19)^qS(L,B,61)^cZ(L,B,6),F=Wbe(O,M,Gg[_-7],Gg[_-16]),R=Gbe(F,N,H,Wg[_-7],Wg[_-16]);Wg[_]=R|0,Gg[_]=F|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:d,Eh:f,El:p,Fh:h,Fl:m,Gh:g,Gl:w,Hh:v,Hl:b}=this;for(let _=0;_<80;_++){let S=Kb(f,p,14)^Kb(f,p,18)^HS(f,p,41),T=Zb(f,p,14)^Zb(f,p,18)^qS(f,p,41),N=f&h^~f&g,O=p&m^~p&w,L=Kbe(b,T,O,Lut[_],Gg[_]),B=Zbe(L,v,S,N,Dut[_],Wg[_]),H=L|0,M=Kb(n,i,28)^HS(n,i,34)^HS(n,i,39),F=Zb(n,i,28)^qS(n,i,34)^qS(n,i,39),R=n&s^n&a^s&a,y=i&o^i&c^o&c;v=g|0,b=w|0,g=h|0,w=m|0,h=f|0,m=p|0,{h:f,l:p}=Jf(l|0,d|0,B|0,H|0),l=a|0,d=c|0,a=s|0,c=o|0,s=n|0,o=i|0;let E=$be(H,F,y);n=Vbe(E,B,M,R),i=E|0}({h:n,l:i}=Jf(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Jf(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Jf(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:d}=Jf(this.Dh|0,this.Dl|0,l|0,d|0),{h:f,l:p}=Jf(this.Eh|0,this.El|0,f|0,p|0),{h,l:m}=Jf(this.Fh|0,this.Fl|0,h|0,m|0),{h:g,l:w}=Jf(this.Gh|0,this.Gl|0,g|0,w|0),{h:v,l:b}=Jf(this.Hh|0,this.Hl|0,v|0,b|0),this.set(n,i,s,o,a,c,l,d,f,p,h,m,g,w,v,b)}roundClean(){bu(Wg,Gg)}destroy(){bu(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},SZ=class extends FN{constructor(){super(48),this.Ah=Lo[0]|0,this.Al=Lo[1]|0,this.Bh=Lo[2]|0,this.Bl=Lo[3]|0,this.Ch=Lo[4]|0,this.Cl=Lo[5]|0,this.Dh=Lo[6]|0,this.Dl=Lo[7]|0,this.Eh=Lo[8]|0,this.El=Lo[9]|0,this.Fh=Lo[10]|0,this.Fl=Lo[11]|0,this.Gh=Lo[12]|0,this.Gl=Lo[13]|0,this.Hh=Lo[14]|0,this.Hl=Lo[15]|0}},Ud=t5(()=>new UN),jwe=t5(()=>new FN),Hwe=t5(()=>new SZ)});var jN,eA,AZ=x(()=>{u();Md();jN=class extends Ng{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,pN(e);let n=Jb(r);if(this.iHash=e.create(),typeof this.iHash.update!=\\\"function\\\")throw new Error(\\\"Expected instance of class which extends utils.Hash\\\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),bu(s)}update(e){return om(this),this.iHash.update(e),this}digestInto(e){om(this),Fa(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},eA=(t,e,r)=>new jN(t,e).update(r).digest();eA.create=(t,e)=>new jN(t,e)});function g5(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function bm(t){if(!g5(t))throw new Error(\\\"Uint8Array expected\\\")}function y5(t,e){if(typeof e!=\\\"boolean\\\")throw new Error(t+\\\" boolean expected, got \\\"+e)}function tA(t){let e=t.toString(16);return e.length&1?\\\"0\\\"+e:e}function $we(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);return t===\\\"\\\"?PZ:BigInt(\\\"0x\\\"+t)}function b5(t){if(bm(t),Vwe)return t.toHex();let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=Uut[t[r]];return e}function qwe(t){if(t>=ym._0&&t<=ym._9)return t-ym._0;if(t>=ym.A&&t<=ym.F)return t-(ym.A-10);if(t>=ym.a&&t<=ym.f)return t-(ym.a-10)}function rA(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);if(Vwe)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=qwe(t.charCodeAt(s)),a=qwe(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}function Sc(t){return $we(b5(t))}function OZ(t){return bm(t),$we(b5(Uint8Array.from(t).reverse()))}function op(t,e){return rA(t.toString(16).padStart(e*2,\\\"0\\\"))}function NZ(t,e){return op(t,e).reverse()}function vs(t,e,r){let n;if(typeof e==\\\"string\\\")try{n=rA(e)}catch(s){throw new Error(t+\\\" must be hex string or Uint8Array, cause: \\\"+s)}else if(g5(e))n=Uint8Array.from(e);else throw new Error(t+\\\" must be hex string or Uint8Array\\\");let i=n.length;if(typeof r==\\\"number\\\"&&i!==r)throw new Error(t+\\\" of length \\\"+r+\\\" expected, got \\\"+i);return n}function ja(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];bm(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function HN(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function yw(t,e,r){return TZ(t)&&TZ(e)&&TZ(r)&&e<=t&&t<r}function wm(t,e,r,n){if(!yw(e,r,n))throw new Error(\\\"expected valid \\\"+t+\\\": \\\"+r+\\\" <= n < \\\"+n+\\\", got \\\"+e)}function Wwe(t){let e;for(e=0;t>PZ;t>>=RZ,e+=1);return e}function Gwe(t,e,r){if(typeof t!=\\\"number\\\"||t<2)throw new Error(\\\"hashLen must be a number\\\");if(typeof e!=\\\"number\\\"||e<2)throw new Error(\\\"qByteLen must be a number\\\");if(typeof r!=\\\"function\\\")throw new Error(\\\"hmacFn must be a function\\\");let n=IZ(t),i=IZ(t),s=0,o=()=>{n.fill(1),i.fill(0),s=0},a=(...f)=>r(i,n,...f),c=(f=IZ(0))=>{i=a(zwe([0]),f),n=a(),f.length!==0&&(i=a(zwe([1]),f),n=a())},l=()=>{if(s++>=1e3)throw new Error(\\\"drbg: tried 1000 values\\\");let f=0,p=[];for(;f<e;){n=a();let h=n.slice();p.push(h),f+=n.length}return ja(...p)};return(f,p)=>{o(),c(f);let h;for(;!(h=p(l()));)c();return o(),h}}function vm(t,e,r={}){let n=(i,s,o)=>{let a=Fut[s];if(typeof a!=\\\"function\\\")throw new Error(\\\"invalid validator function\\\");let c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(\\\"param \\\"+String(i)+\\\" is invalid. Expected \\\"+s+\\\", got \\\"+c)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(r))n(i,s,!0);return t}function kZ(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(i!==void 0)return i;let s=t(r,...n);return e.set(r,s),s}}var PZ,RZ,Vwe,Uut,ym,TZ,bw,IZ,zwe,Fut,w5=x(()=>{u();PZ=BigInt(0),RZ=BigInt(1);Vwe=typeof Uint8Array.from([]).toHex==\\\"function\\\"&&typeof Uint8Array.fromHex==\\\"function\\\",Uut=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));ym={_0:48,_9:57,A:65,F:70,a:97,f:102};TZ=t=>typeof t==\\\"bigint\\\"&&PZ<=t;bw=t=>(RZ<<BigInt(t))-RZ,IZ=t=>new Uint8Array(t),zwe=t=>Uint8Array.from(t);Fut={bigint:t=>typeof t==\\\"bigint\\\",function:t=>typeof t==\\\"function\\\",boolean:t=>typeof t==\\\"boolean\\\",string:t=>typeof t==\\\"string\\\",stringOrUint8Array:t=>typeof t==\\\"string\\\"||g5(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t==\\\"function\\\"&&Number.isSafeInteger(t.outputLen)}});function cs(t,e){let r=t%e;return r>=Ha?r:e+r}function El(t,e,r){let n=t;for(;e-- >Ha;)n*=n,n%=r;return n}function qN(t,e){if(t===Ha)throw new Error(\\\"invert: expected non-zero number\\\");if(e<=Ha)throw new Error(\\\"invert: expected positive modulus, got \\\"+e);let r=cs(t,e),n=e,i=Ha,s=pa,o=pa,a=Ha;for(;r!==Ha;){let l=n/r,d=n%r,f=i-o*l,p=s-a*l;n=r,r=d,i=o,s=a,o=f,a=p}if(n!==pa)throw new Error(\\\"invert: does not exist\\\");return cs(i,e)}function Ywe(t,e){let r=(t.ORDER+pa)/Zwe,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error(\\\"Cannot find square root\\\");return n}function Hut(t,e){let r=(t.ORDER-Qwe)/Jwe,n=t.mul(e,ww),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,ww),i),a=t.mul(s,t.sub(o,t.ONE));if(!t.eql(t.sqr(a),e))throw new Error(\\\"Cannot find square root\\\");return a}function qut(t){if(t<BigInt(3))throw new Error(\\\"sqrt is not defined for small field\\\");let e=t-pa,r=0;for(;e%ww===Ha;)e/=ww,r++;let n=ww,i=nA(t);for(;Kwe(i,n)===1;)if(n++>1e3)throw new Error(\\\"Cannot find square root: probably non-prime P\\\");if(r===1)return Ywe;let s=i.pow(n,e),o=(e+pa)/ww;return function(c,l){if(c.is0(l))return l;if(Kwe(c,l)!==1)throw new Error(\\\"Cannot find square root\\\");let d=r,f=c.mul(c.ONE,s),p=c.pow(l,e),h=c.pow(l,o);for(;!c.eql(p,c.ONE);){if(c.is0(p))return c.ZERO;let m=1,g=c.sqr(p);for(;!c.eql(g,c.ONE);)if(m++,g=c.sqr(g),m===d)throw new Error(\\\"Cannot find square root\\\");let w=pa<<BigInt(d-m-1),v=c.pow(f,w);d=m,f=c.sqr(v),p=c.mul(p,f),h=c.mul(h,v)}return h}}function zut(t){return t%Zwe===jut?Ywe:t%Jwe===Qwe?Hut:qut(t)}function zN(t){let e={ORDER:\\\"bigint\\\",MASK:\\\"bigint\\\",BYTES:\\\"isSafeInteger\\\",BITS:\\\"isSafeInteger\\\"},r=$ut.reduce((n,i)=>(n[i]=\\\"function\\\",n),e);return vm(t,r)}function Vut(t,e,r){if(r<Ha)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r===Ha)return t.ONE;if(r===pa)return e;let n=t.ONE,i=e;for(;r>Ha;)r&pa&&(n=t.mul(n,i)),i=t.sqr(i),r>>=pa;return n}function v5(t,e,r=!1){let n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function Kwe(t,e){let r=(t.ORDER-pa)/ww,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error(\\\"invalid Legendre symbol result\\\");return i?1:s?0:-1}function BZ(t,e){e!==void 0&&kd(e);let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function nA(t,e,r=!1,n={}){if(t<=Ha)throw new Error(\\\"invalid field: expected ORDER > 0, got \\\"+t);let{nBitLength:i,nByteLength:s}=BZ(t,e);if(s>2048)throw new Error(\\\"invalid field: expected ORDER of <= 2048 bytes\\\");let o,a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:bw(i),ZERO:Ha,ONE:pa,create:c=>cs(c,t),isValid:c=>{if(typeof c!=\\\"bigint\\\")throw new Error(\\\"invalid field element: expected bigint, got \\\"+typeof c);return Ha<=c&&c<t},is0:c=>c===Ha,isOdd:c=>(c&pa)===pa,neg:c=>cs(-c,t),eql:(c,l)=>c===l,sqr:c=>cs(c*c,t),add:(c,l)=>cs(c+l,t),sub:(c,l)=>cs(c-l,t),mul:(c,l)=>cs(c*l,t),pow:(c,l)=>Vut(a,c,l),div:(c,l)=>cs(c*qN(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>qN(c,t),sqrt:n.sqrt||(c=>(o||(o=zut(t)),o(a,c))),toBytes:c=>r?NZ(c,s):op(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(\\\"Field.fromBytes: expected \\\"+s+\\\" bytes, got \\\"+c.length);return r?OZ(c):Sc(c)},invertBatch:c=>v5(a,c),cmov:(c,l,d)=>d?l:c});return Object.freeze(a)}function Xwe(t){if(typeof t!=\\\"bigint\\\")throw new Error(\\\"field order must be bigint\\\");let e=t.toString(2).length;return Math.ceil(e/8)}function MZ(t){let e=Xwe(t);return e+Math.ceil(e/2)}function eve(t,e,r=!1){let n=t.length,i=Xwe(e),s=MZ(e);if(n<16||n<s||n>1024)throw new Error(\\\"expected \\\"+s+\\\"-1024 bytes of input, got \\\"+n);let o=r?OZ(t):Sc(t),a=cs(o,e-pa)+pa;return r?NZ(a,i):op(a,i)}var Ha,pa,ww,jut,Zwe,Qwe,Jwe,$ut,iA=x(()=>{u();Md();w5();Ha=BigInt(0),pa=BigInt(1),ww=BigInt(2),jut=BigInt(3),Zwe=BigInt(4),Qwe=BigInt(5),Jwe=BigInt(8);$ut=[\\\"create\\\",\\\"isValid\\\",\\\"is0\\\",\\\"neg\\\",\\\"inv\\\",\\\"sqrt\\\",\\\"sqr\\\",\\\"eql\\\",\\\"add\\\",\\\"sub\\\",\\\"mul\\\",\\\"pow\\\",\\\"div\\\",\\\"addN\\\",\\\"subN\\\",\\\"mulN\\\",\\\"sqrN\\\"]});function DZ(t,e){let r=e.negate();return t?r:e}function nve(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error(\\\"invalid window size, expected [1..\\\"+e+\\\"], got W=\\\"+t)}function LZ(t,e){nve(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=bw(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function rve(t,e,r){let{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r,a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=jZ);let l=e*n,d=l+Math.abs(a)-1,f=a===0,p=a<0,h=e%2!==0;return{nextN:c,offset:d,isZero:f,isNeg:p,isNegF:h,offsetF:l}}function Wut(t,e){if(!Array.isArray(t))throw new Error(\\\"array expected\\\");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error(\\\"invalid point at index \\\"+n)})}function Gut(t,e){if(!Array.isArray(t))throw new Error(\\\"array of scalars expected\\\");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error(\\\"invalid scalar at index \\\"+n)})}function FZ(t){return ive.get(t)||1}function sve(t,e){return{constTimeNegate:DZ,hasPrecomputes(r){return FZ(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>tve;)n&jZ&&(i=i.add(s)),s=s.double(),n>>=jZ;return i},precomputeWindow(r,n){let{windows:i,windowSize:s}=LZ(n,e),o=[],a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let d=1;d<s;d++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let s=t.ZERO,o=t.BASE,a=LZ(r,e);for(let c=0;c<a.windows;c++){let{nextN:l,offset:d,isZero:f,isNeg:p,isNegF:h,offsetF:m}=rve(i,c,a);i=l,f?o=o.add(DZ(h,n[m])):s=s.add(DZ(p,n[d]))}return{p:s,f:o}},wNAFUnsafe(r,n,i,s=t.ZERO){let o=LZ(r,e);for(let a=0;a<o.windows&&i!==tve;a++){let{nextN:c,offset:l,isZero:d,isNeg:f}=rve(i,a,o);if(i=c,!d){let p=n[l];s=s.add(f?p.negate():p)}}return s},getPrecomputes(r,n,i){let s=UZ.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&UZ.set(n,i(s))),s},wNAFCached(r,n,i){let s=FZ(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){let o=FZ(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){nve(n,e),ive.set(r,n),UZ.delete(r)}}}function ove(t,e,r,n){Wut(r,t),Gut(n,e);let i=r.length,s=n.length;if(i!==s)throw new Error(\\\"arrays of points and scalars must have equal length\\\");let o=t.ZERO,a=Wwe(BigInt(i)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let l=bw(c),d=new Array(Number(l)+1).fill(o),f=Math.floor((e.BITS-1)/c)*c,p=o;for(let h=f;h>=0;h-=c){d.fill(o);for(let g=0;g<s;g++){let w=n[g],v=Number(w>>BigInt(h)&l);d[v]=d[v].add(r[g])}let m=o;for(let g=d.length-1,w=o;g>0;g--)w=w.add(d[g]),m=m.add(w);if(p=p.add(m),h!==0)for(let g=0;g<c;g++)p=p.double()}return p}function HZ(t){return zN(t.Fp),vm(t,{n:\\\"bigint\\\",h:\\\"bigint\\\",Gx:\\\"field\\\",Gy:\\\"field\\\"},{nBitLength:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\"}),Object.freeze({...BZ(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}var tve,jZ,UZ,ive,ave=x(()=>{u();iA();w5();tve=BigInt(0),jZ=BigInt(1);UZ=new WeakMap,ive=new WeakMap});function cve(t){t.lowS!==void 0&&y5(\\\"lowS\\\",t.lowS),t.prehash!==void 0&&y5(\\\"prehash\\\",t.prehash)}function Kut(t){let e=HZ(t);vm(e,{a:\\\"field\\\",b:\\\"field\\\"},{allowInfinityPoint:\\\"boolean\\\",allowedPrivateKeyLengths:\\\"array\\\",clearCofactor:\\\"function\\\",fromBytes:\\\"function\\\",isTorsionFree:\\\"function\\\",toBytes:\\\"function\\\",wrapPrivateKey:\\\"boolean\\\"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error(\\\"invalid endo: CURVE.a must be 0\\\");if(typeof r!=\\\"object\\\"||typeof r.beta!=\\\"bigint\\\"||typeof r.splitScalar!=\\\"function\\\")throw new Error('invalid endo: expected \\\"beta\\\": bigint and \\\"splitScalar\\\": function')}return Object.freeze({...e})}function qZ(t,e){return b5(op(t,e))}function Zut(t){let e=Kut(t),{Fp:r}=e,n=nA(e.n,e.nBitLength),i=e.toBytes||((_,S,T)=>{let N=S.toAffine();return ja(Uint8Array.from([4]),r.toBytes(N.x),r.toBytes(N.y))}),s=e.fromBytes||(_=>{let S=_.subarray(1),T=r.fromBytes(S.subarray(0,r.BYTES)),N=r.fromBytes(S.subarray(r.BYTES,2*r.BYTES));return{x:T,y:N}});function o(_){let{a:S,b:T}=e,N=r.sqr(_),O=r.mul(N,_);return r.add(r.add(O,r.mul(_,S)),T)}function a(_,S){let T=r.sqr(S),N=o(_);return r.eql(T,N)}if(!a(e.Gx,e.Gy))throw new Error(\\\"bad curve params: generator point\\\");let c=r.mul(r.pow(e.a,sA),$Z),l=r.mul(r.sqr(e.b),BigInt(27));if(r.is0(r.add(c,l)))throw new Error(\\\"bad curve params: a or b\\\");function d(_){return yw(_,tn,e.n)}function f(_){let{allowedPrivateKeyLengths:S,nByteLength:T,wrapPrivateKey:N,n:O}=e;if(S&&typeof _!=\\\"bigint\\\"){if(g5(_)&&(_=b5(_)),typeof _!=\\\"string\\\"||!S.includes(_.length))throw new Error(\\\"invalid private key\\\");_=_.padStart(T*2,\\\"0\\\")}let L;try{L=typeof _==\\\"bigint\\\"?_:Sc(vs(\\\"private key\\\",_,T))}catch{throw new Error(\\\"invalid private key, expected hex or \\\"+T+\\\" bytes, got \\\"+typeof _)}return N&&(L=cs(L,O)),wm(\\\"private key\\\",L,tn,O),L}function p(_){if(!(_ instanceof g))throw new Error(\\\"ProjectivePoint expected\\\")}let h=kZ((_,S)=>{let{px:T,py:N,pz:O}=_;if(r.eql(O,r.ONE))return{x:T,y:N};let L=_.is0();S==null&&(S=L?r.ONE:r.inv(O));let B=r.mul(T,S),H=r.mul(N,S),M=r.mul(O,S);if(L)return{x:r.ZERO,y:r.ZERO};if(!r.eql(M,r.ONE))throw new Error(\\\"invZ was invalid\\\");return{x:B,y:H}}),m=kZ(_=>{if(_.is0()){if(e.allowInfinityPoint&&!r.is0(_.py))return;throw new Error(\\\"bad point: ZERO\\\")}let{x:S,y:T}=_.toAffine();if(!r.isValid(S)||!r.isValid(T))throw new Error(\\\"bad point: x or y not FE\\\");if(!a(S,T))throw new Error(\\\"bad point: equation left != right\\\");if(!_.isTorsionFree())throw new Error(\\\"bad point: not in prime-order subgroup\\\");return!0});class g{constructor(S,T,N){if(S==null||!r.isValid(S))throw new Error(\\\"x required\\\");if(T==null||!r.isValid(T)||r.is0(T))throw new Error(\\\"y required\\\");if(N==null||!r.isValid(N))throw new Error(\\\"z required\\\");this.px=S,this.py=T,this.pz=N,Object.freeze(this)}static fromAffine(S){let{x:T,y:N}=S||{};if(!S||!r.isValid(T)||!r.isValid(N))throw new Error(\\\"invalid affine point\\\");if(S instanceof g)throw new Error(\\\"projective point not allowed\\\");let O=L=>r.eql(L,r.ZERO);return O(T)&&O(N)?g.ZERO:new g(T,N,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(S){let T=v5(r,S.map(N=>N.pz));return S.map((N,O)=>N.toAffine(T[O])).map(g.fromAffine)}static fromHex(S){let T=g.fromAffine(s(vs(\\\"pointHex\\\",S)));return T.assertValidity(),T}static fromPrivateKey(S){return g.BASE.multiply(f(S))}static msm(S,T){return ove(g,n,S,T)}_setWindowSize(S){b.setWindowSize(this,S)}assertValidity(){m(this)}hasEvenY(){let{y:S}=this.toAffine();if(r.isOdd)return!r.isOdd(S);throw new Error(\\\"Field doesn't support isOdd\\\")}equals(S){p(S);let{px:T,py:N,pz:O}=this,{px:L,py:B,pz:H}=S,M=r.eql(r.mul(T,H),r.mul(L,O)),F=r.eql(r.mul(N,H),r.mul(B,O));return M&&F}negate(){return new g(this.px,r.neg(this.py),this.pz)}double(){let{a:S,b:T}=e,N=r.mul(T,sA),{px:O,py:L,pz:B}=this,H=r.ZERO,M=r.ZERO,F=r.ZERO,R=r.mul(O,O),y=r.mul(L,L),E=r.mul(B,B),C=r.mul(O,L);return C=r.add(C,C),F=r.mul(O,B),F=r.add(F,F),H=r.mul(S,F),M=r.mul(N,E),M=r.add(H,M),H=r.sub(y,M),M=r.add(y,M),M=r.mul(H,M),H=r.mul(C,H),F=r.mul(N,F),E=r.mul(S,E),C=r.sub(R,E),C=r.mul(S,C),C=r.add(C,F),F=r.add(R,R),R=r.add(F,R),R=r.add(R,E),R=r.mul(R,C),M=r.add(M,R),E=r.mul(L,B),E=r.add(E,E),R=r.mul(E,C),H=r.sub(H,R),F=r.mul(E,y),F=r.add(F,F),F=r.add(F,F),new g(H,M,F)}add(S){p(S);let{px:T,py:N,pz:O}=this,{px:L,py:B,pz:H}=S,M=r.ZERO,F=r.ZERO,R=r.ZERO,y=e.a,E=r.mul(e.b,sA),C=r.mul(T,L),I=r.mul(N,B),P=r.mul(O,H),k=r.add(T,N),U=r.add(L,B);k=r.mul(k,U),U=r.add(C,I),k=r.sub(k,U),U=r.add(T,O);let D=r.add(L,H);return U=r.mul(U,D),D=r.add(C,P),U=r.sub(U,D),D=r.add(N,O),M=r.add(B,H),D=r.mul(D,M),M=r.add(I,P),D=r.sub(D,M),R=r.mul(y,U),M=r.mul(E,P),R=r.add(M,R),M=r.sub(I,R),R=r.add(I,R),F=r.mul(M,R),I=r.add(C,C),I=r.add(I,C),P=r.mul(y,P),U=r.mul(E,U),I=r.add(I,P),P=r.sub(C,P),P=r.mul(y,P),U=r.add(U,P),C=r.mul(I,U),F=r.add(F,C),C=r.mul(D,U),M=r.mul(k,M),M=r.sub(M,C),C=r.mul(k,I),R=r.mul(D,R),R=r.add(R,C),new g(M,F,R)}subtract(S){return this.add(S.negate())}is0(){return this.equals(g.ZERO)}wNAF(S){return b.wNAFCached(this,S,g.normalizeZ)}multiplyUnsafe(S){let{endo:T,n:N}=e;wm(\\\"scalar\\\",S,Fd,N);let O=g.ZERO;if(S===Fd)return O;if(this.is0()||S===tn)return this;if(!T||b.hasPrecomputes(this))return b.wNAFCachedUnsafe(this,S,g.normalizeZ);let{k1neg:L,k1:B,k2neg:H,k2:M}=T.splitScalar(S),F=O,R=O,y=this;for(;B>Fd||M>Fd;)B&tn&&(F=F.add(y)),M&tn&&(R=R.add(y)),y=y.double(),B>>=tn,M>>=tn;return L&&(F=F.negate()),H&&(R=R.negate()),R=new g(r.mul(R.px,T.beta),R.py,R.pz),F.add(R)}multiply(S){let{endo:T,n:N}=e;wm(\\\"scalar\\\",S,tn,N);let O,L;if(T){let{k1neg:B,k1:H,k2neg:M,k2:F}=T.splitScalar(S),{p:R,f:y}=this.wNAF(H),{p:E,f:C}=this.wNAF(F);R=b.constTimeNegate(B,R),E=b.constTimeNegate(M,E),E=new g(r.mul(E.px,T.beta),E.py,E.pz),O=R.add(E),L=y.add(C)}else{let{p:B,f:H}=this.wNAF(S);O=B,L=H}return g.normalizeZ([O,L])[0]}multiplyAndAddUnsafe(S,T,N){let O=g.BASE,L=(H,M)=>M===Fd||M===tn||!H.equals(O)?H.multiplyUnsafe(M):H.multiply(M),B=L(this,T).add(L(S,N));return B.is0()?void 0:B}toAffine(S){return h(this,S)}isTorsionFree(){let{h:S,isTorsionFree:T}=e;if(S===tn)return!0;if(T)return T(g,this);throw new Error(\\\"isTorsionFree() has not been declared for the elliptic curve\\\")}clearCofactor(){let{h:S,clearCofactor:T}=e;return S===tn?this:T?T(g,this):this.multiplyUnsafe(e.h)}toRawBytes(S=!0){return y5(\\\"isCompressed\\\",S),this.assertValidity(),i(g,this,S)}toHex(S=!0){return y5(\\\"isCompressed\\\",S),b5(this.toRawBytes(S))}}g.BASE=new g(e.Gx,e.Gy,r.ONE),g.ZERO=new g(r.ZERO,r.ONE,r.ZERO);let{endo:w,nBitLength:v}=e,b=sve(g,w?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:g,normPrivateKeyToScalar:f,weierstrassEquation:o,isWithinCurveOrder:d}}function Qut(t){let e=HZ(t);return vm(e,{hash:\\\"hash\\\",hmac:\\\"function\\\",randomBytes:\\\"function\\\"},{bits2int:\\\"function\\\",bits2int_modN:\\\"function\\\",lowS:\\\"boolean\\\"}),Object.freeze({lowS:!0,...e})}function lve(t){let e=Qut(t),{Fp:r,n,nByteLength:i,nBitLength:s}=e,o=r.BYTES+1,a=2*r.BYTES+1;function c(E){return cs(E,n)}function l(E){return qN(E,n)}let{ProjectivePoint:d,normPrivateKeyToScalar:f,weierstrassEquation:p,isWithinCurveOrder:h}=Zut({...e,toBytes(E,C,I){let P=C.toAffine(),k=r.toBytes(P.x),U=ja;return y5(\\\"isCompressed\\\",I),I?U(Uint8Array.from([C.hasEvenY()?2:3]),k):U(Uint8Array.from([4]),k,r.toBytes(P.y))},fromBytes(E){let C=E.length,I=E[0],P=E.subarray(1);if(C===o&&(I===2||I===3)){let k=Sc(P);if(!yw(k,tn,r.ORDER))throw new Error(\\\"Point is not on curve\\\");let U=p(k),D;try{D=r.sqrt(U)}catch(K){let J=K instanceof Error?\\\": \\\"+K.message:\\\"\\\";throw new Error(\\\"Point is not on curve\\\"+J)}let A=(D&tn)===tn;return(I&1)===1!==A&&(D=r.neg(D)),{x:k,y:D}}else if(C===a&&I===4){let k=r.fromBytes(P.subarray(0,r.BYTES)),U=r.fromBytes(P.subarray(r.BYTES,2*r.BYTES));return{x:k,y:U}}else{let k=o,U=a;throw new Error(\\\"invalid Point, expected length of \\\"+k+\\\", or uncompressed \\\"+U+\\\", got \\\"+C)}}});function m(E){let C=n>>tn;return E>C}function g(E){return m(E)?c(-E):E}let w=(E,C,I)=>Sc(E.slice(C,I));class v{constructor(C,I,P){wm(\\\"r\\\",C,tn,n),wm(\\\"s\\\",I,tn,n),this.r=C,this.s=I,P!=null&&(this.recovery=P),Object.freeze(this)}static fromCompact(C){let I=i;return C=vs(\\\"compactSignature\\\",C,I*2),new v(w(C,0,I),w(C,I,2*I))}static fromDER(C){let{r:I,s:P}=xm.toSig(vs(\\\"DER\\\",C));return new v(I,P)}assertValidity(){}addRecoveryBit(C){return new v(this.r,this.s,C)}recoverPublicKey(C){let{r:I,s:P,recovery:k}=this,U=O(vs(\\\"msgHash\\\",C));if(k==null||![0,1,2,3].includes(k))throw new Error(\\\"recovery id invalid\\\");let D=k===2||k===3?I+e.n:I;if(D>=r.ORDER)throw new Error(\\\"recovery id 2 or 3 invalid\\\");let A=(k&1)===0?\\\"02\\\":\\\"03\\\",j=d.fromHex(A+qZ(D,r.BYTES)),K=l(D),J=c(-U*K),X=c(P*K),re=d.BASE.multiplyAndAddUnsafe(j,J,X);if(!re)throw new Error(\\\"point at infinify\\\");return re.assertValidity(),re}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return rA(this.toDERHex())}toDERHex(){return xm.hexFromSig(this)}toCompactRawBytes(){return rA(this.toCompactHex())}toCompactHex(){let C=i;return qZ(this.r,C)+qZ(this.s,C)}}let b={isValidPrivateKey(E){try{return f(E),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{let E=MZ(e.n);return eve(e.randomBytes(E),e.n)},precompute(E=8,C=d.BASE){return C._setWindowSize(E),C.multiply(BigInt(3)),C}};function _(E,C=!0){return d.fromPrivateKey(E).toRawBytes(C)}function S(E){if(typeof E==\\\"bigint\\\")return!1;if(E instanceof d)return!0;let I=vs(\\\"key\\\",E).length,P=r.BYTES,k=P+1,U=2*P+1;if(!(e.allowedPrivateKeyLengths||i===k))return I===k||I===U}function T(E,C,I=!0){if(S(E)===!0)throw new Error(\\\"first arg must be private key\\\");if(S(C)===!1)throw new Error(\\\"second arg must be public key\\\");return d.fromHex(C).multiply(f(E)).toRawBytes(I)}let N=e.bits2int||function(E){if(E.length>8192)throw new Error(\\\"input is too large\\\");let C=Sc(E),I=E.length*8-s;return I>0?C>>BigInt(I):C},O=e.bits2int_modN||function(E){return c(N(E))},L=bw(s);function B(E){return wm(\\\"num < 2^\\\"+s,E,Fd,L),op(E,i)}function H(E,C,I=M){if([\\\"recovered\\\",\\\"canonical\\\"].some(ce=>ce in I))throw new Error(\\\"sign() legacy options not supported\\\");let{hash:P,randomBytes:k}=e,{lowS:U,prehash:D,extraEntropy:A}=I;U==null&&(U=!0),E=vs(\\\"msgHash\\\",E),cve(I),D&&(E=vs(\\\"prehashed msgHash\\\",P(E)));let j=O(E),K=f(C),J=[B(K),B(j)];if(A!=null&&A!==!1){let ce=A===!0?k(r.BYTES):A;J.push(vs(\\\"extraEntropy\\\",ce))}let X=ja(...J),re=j;function fe(ce){let We=N(ce);if(!h(We))return;let Ue=l(We),je=d.BASE.multiply(We).toAffine(),Lt=c(je.x);if(Lt===Fd)return;let pt=c(Ue*c(re+Lt*K));if(pt===Fd)return;let Ct=(je.x===Lt?0:2)|Number(je.y&tn),jf=pt;return U&&m(pt)&&(jf=g(pt),Ct^=1),new v(Lt,jf,Ct)}return{seed:X,k2sig:fe}}let M={lowS:e.lowS,prehash:!1},F={lowS:e.lowS,prehash:!1};function R(E,C,I=M){let{seed:P,k2sig:k}=H(E,C,I),U=e;return Gwe(U.hash.outputLen,U.nByteLength,U.hmac)(P,k)}d.BASE._setWindowSize(8);function y(E,C,I,P=F){let k=E;C=vs(\\\"msgHash\\\",C),I=vs(\\\"publicKey\\\",I);let{lowS:U,prehash:D,format:A}=P;if(cve(P),\\\"strict\\\"in P)throw new Error(\\\"options.strict was renamed to lowS\\\");if(A!==void 0&&A!==\\\"compact\\\"&&A!==\\\"der\\\")throw new Error(\\\"format must be compact or der\\\");let j=typeof k==\\\"string\\\"||g5(k),K=!j&&!A&&typeof k==\\\"object\\\"&&k!==null&&typeof k.r==\\\"bigint\\\"&&typeof k.s==\\\"bigint\\\";if(!j&&!K)throw new Error(\\\"invalid signature, expected Uint8Array, hex string or Signature instance\\\");let J,X;try{if(K&&(J=new v(k.r,k.s)),j){try{A!==\\\"compact\\\"&&(J=v.fromDER(k))}catch(Ct){if(!(Ct instanceof xm.Err))throw Ct}!J&&A!==\\\"der\\\"&&(J=v.fromCompact(k))}X=d.fromHex(I)}catch{return!1}if(!J||U&&J.hasHighS())return!1;D&&(C=e.hash(C));let{r:re,s:fe}=J,ce=O(C),We=l(fe),Ue=c(ce*We),je=c(re*We),Lt=d.BASE.multiplyAndAddUnsafe(X,Ue,je)?.toAffine();return Lt?c(Lt.x)===re:!1}return{CURVE:e,getPublicKey:_,getSharedSecret:T,sign:R,verify:y,ProjectivePoint:d,Signature:v,utils:b}}function Jut(t,e){let r=t.ORDER,n=Fd;for(let m=r-tn;m%Kg===Fd;m/=Kg)n+=tn;let i=n,s=Kg<<i-tn-tn,o=s*Kg,a=(r-tn)/o,c=(a-tn)/Kg,l=o-tn,d=s,f=t.pow(e,a),p=t.pow(e,(a+tn)/Kg),h=(m,g)=>{let w=f,v=t.pow(g,l),b=t.sqr(v);b=t.mul(b,g);let _=t.mul(m,b);_=t.pow(_,c),_=t.mul(_,v),v=t.mul(_,g),b=t.mul(_,m);let S=t.mul(b,v);_=t.pow(S,d);let T=t.eql(_,t.ONE);v=t.mul(b,p),_=t.mul(S,w),b=t.cmov(v,b,T),S=t.cmov(_,S,T);for(let N=i;N>tn;N--){let O=N-Kg;O=Kg<<O-tn;let L=t.pow(S,O),B=t.eql(L,t.ONE);v=t.mul(b,w),w=t.mul(w,w),L=t.mul(S,w),b=t.cmov(v,b,B),S=t.cmov(L,S,B)}return{isValid:T,value:b}};if(t.ORDER%$Z===sA){let m=(t.ORDER-sA)/$Z,g=t.sqrt(t.neg(e));h=(w,v)=>{let b=t.sqr(v),_=t.mul(w,v);b=t.mul(b,_);let S=t.pow(b,m);S=t.mul(S,_);let T=t.mul(S,g),N=t.mul(t.sqr(S),v),O=t.eql(N,w),L=t.cmov(T,S,O);return{isValid:O,value:L}}}return h}function uve(t,e){if(zN(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error(\\\"mapToCurveSimpleSWU: invalid opts\\\");let r=Jut(t,e.Z);if(!t.isOdd)throw new Error(\\\"Fp.isOdd is not implemented!\\\");return n=>{let i,s,o,a,c,l,d,f;i=t.sqr(n),i=t.mul(i,e.Z),s=t.sqr(i),s=t.add(s,i),o=t.add(s,t.ONE),o=t.mul(o,e.B),a=t.cmov(e.Z,t.neg(s),!t.eql(s,t.ZERO)),a=t.mul(a,e.A),s=t.sqr(o),l=t.sqr(a),c=t.mul(l,e.A),s=t.add(s,c),s=t.mul(s,o),l=t.mul(l,a),c=t.mul(l,e.B),s=t.add(s,c),d=t.mul(i,o);let{isValid:p,value:h}=r(s,l);f=t.mul(i,n),f=t.mul(f,h),d=t.cmov(d,o,p),f=t.cmov(f,h,p);let m=t.isOdd(n)===t.isOdd(f);f=t.cmov(t.neg(f),f,m);let g=v5(t,[a],!0)[0];return d=t.mul(d,g),{x:d,y:f}}}var zZ,xm,Fd,tn,Kg,sA,$Z,VZ=x(()=>{u();ave();iA();w5();zZ=class extends Error{constructor(e=\\\"\\\"){super(e)}},xm={Err:zZ,_tlv:{encode:(t,e)=>{let{Err:r}=xm;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length&1)throw new r(\\\"tlv.encode: unpadded data\\\");let n=e.length/2,i=tA(n);if(i.length/2&128)throw new r(\\\"tlv.encode: long form length too big\\\");let s=n>127?tA(i.length/2|128):\\\"\\\";return tA(t)+s+i+e},decode(t,e){let{Err:r}=xm,n=0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length<2||e[n++]!==t)throw new r(\\\"tlv.decode: wrong tlv\\\");let i=e[n++],s=!!(i&128),o=0;if(!s)o=i;else{let c=i&127;if(!c)throw new r(\\\"tlv.decode(long): indefinite length not supported\\\");if(c>4)throw new r(\\\"tlv.decode(long): byte length is too big\\\");let l=e.subarray(n,n+c);if(l.length!==c)throw new r(\\\"tlv.decode: length bytes not complete\\\");if(l[0]===0)throw new r(\\\"tlv.decode(long): zero leftmost byte\\\");for(let d of l)o=o<<8|d;if(n+=c,o<128)throw new r(\\\"tlv.decode(long): not minimal encoding\\\")}let a=e.subarray(n,n+o);if(a.length!==o)throw new r(\\\"tlv.decode: wrong value length\\\");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=xm;if(t<Fd)throw new e(\\\"integer: negative integers are not allowed\\\");let r=tA(t);if(Number.parseInt(r[0],16)&8&&(r=\\\"00\\\"+r),r.length&1)throw new e(\\\"unexpected DER parsing assertion: unpadded hex\\\");return r},decode(t){let{Err:e}=xm;if(t[0]&128)throw new e(\\\"invalid signature integer: negative\\\");if(t[0]===0&&!(t[1]&128))throw new e(\\\"invalid signature integer: unnecessary leading zero\\\");return Sc(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=xm,i=vs(\\\"signature\\\",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");let{v:a,l:c}=n.decode(2,s),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){let{_tlv:e,_int:r}=xm,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}};Fd=BigInt(0),tn=BigInt(1),Kg=BigInt(2),sA=BigInt(3),$Z=BigInt(4)});function Yut(t){return{hash:t,hmac:(e,...r)=>eA(t,e,Ec(...r)),randomBytes:am}}function dve(t,e){let r=n=>lve({...t,...Yut(n)});return{...r(e),create:r}}var fve=x(()=>{u();AZ();Md();VZ();});function Zg(t,e){if(oA(t),oA(e),t<0||t>=1<<8*e)throw new Error(\\\"invalid I2OSP input: \\\"+t);let r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function edt(t,e){let r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function oA(t){if(!Number.isSafeInteger(t))throw new Error(\\\"number expected\\\")}function tdt(t,e,r,n){bm(t),bm(e),oA(r),e.length>255&&(e=n(ja(HN(\\\"H2C-OVERSIZE-DST-\\\"),e)));let{outputLen:i,blockLen:s}=n,o=Math.ceil(r/i);if(r>65535||o>255)throw new Error(\\\"expand_message_xmd: invalid lenInBytes\\\");let a=ja(e,Zg(e.length,1)),c=Zg(0,s),l=Zg(r,2),d=new Array(o),f=n(ja(c,t,l,Zg(0,1),a));d[0]=n(ja(f,Zg(1,1),a));for(let h=1;h<=o;h++){let m=[edt(f,d[h-1]),Zg(h+1,1),a];d[h]=n(ja(...m))}return ja(...d).slice(0,r)}function rdt(t,e,r,n,i){if(bm(t),bm(e),oA(r),e.length>255){let s=Math.ceil(2*n/8);e=i.create({dkLen:s}).update(HN(\\\"H2C-OVERSIZE-DST-\\\")).update(e).digest()}if(r>65535||e.length>255)throw new Error(\\\"expand_message_xof: invalid lenInBytes\\\");return i.create({dkLen:r}).update(t).update(Zg(r,2)).update(e).update(Zg(e.length,1)).digest()}function pve(t,e,r){vm(r,{DST:\\\"stringOrUint8Array\\\",p:\\\"bigint\\\",m:\\\"isSafeInteger\\\",k:\\\"isSafeInteger\\\",hash:\\\"hash\\\"});let{p:n,k:i,m:s,hash:o,expand:a,DST:c}=r;bm(t),oA(e);let l=typeof c==\\\"string\\\"?HN(c):c,d=n.toString(2).length,f=Math.ceil((d+i)/8),p=e*s*f,h;if(a===\\\"xmd\\\")h=tdt(t,l,p,o);else if(a===\\\"xof\\\")h=rdt(t,l,p,i,o);else if(a===\\\"_internal_pass\\\")h=t;else throw new Error('expand must be \\\"xmd\\\" or \\\"xof\\\"');let m=new Array(e);for(let g=0;g<e;g++){let w=new Array(s);for(let v=0;v<s;v++){let b=f*(v+g*s),_=h.subarray(b,b+f);w[v]=cs(Xut(_),n)}m[g]=w}return m}function hve(t,e){let r=e.map(n=>Array.from(n).reverse());return(n,i)=>{let[s,o,a,c]=r.map(f=>f.reduce((p,h)=>t.add(t.mul(p,n),h))),[l,d]=v5(t,[o,c],!0);return n=t.mul(s,l),i=t.mul(i,t.mul(a,d)),{x:n,y:i}}}function mve(t,e,r){if(typeof e!=\\\"function\\\")throw new Error(\\\"mapToCurve() must be defined\\\");function n(s){return t.fromAffine(e(s))}function i(s){let o=s.clearCofactor();return o.equals(t.ZERO)?t.ZERO:(o.assertValidity(),o)}return{defaults:r,hashToCurve(s,o){let a=pve(s,2,{...r,DST:r.DST,...o}),c=n(a[0]),l=n(a[1]);return i(c.add(l))},encodeToCurve(s,o){let a=pve(s,1,{...r,DST:r.encodeDST,...o});return i(n(a[0]))},mapToCurve(s){if(!Array.isArray(s))throw new Error(\\\"expected array of bigints\\\");for(let o of s)if(typeof o!=\\\"bigint\\\")throw new Error(\\\"expected array of bigints\\\");return i(n(s))}}}var Xut,gve=x(()=>{u();iA();w5();Xut=Sc});var _ve={};ue(_ve,{encodeToCurve:()=>udt,hashToCurve:()=>ldt,schnorr:()=>odt,secp256k1:()=>jd,secp256k1_hasher:()=>YZ});function wve(t){let e=lA,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,d=l*l*t%e,f=El(d,r,e)*d%e,p=El(f,r,e)*d%e,h=El(p,VN,e)*l%e,m=El(h,i,e)*h%e,g=El(m,s,e)*m%e,w=El(g,a,e)*g%e,v=El(w,c,e)*w%e,b=El(v,a,e)*g%e,_=El(b,r,e)*d%e,S=El(_,o,e)*m%e,T=El(S,n,e)*l%e,N=El(T,VN,e);if(!Qg.eql(Qg.sqr(N),t))throw new Error(\\\"Cannot find square root\\\");return N}function WN(t,...e){let r=bve[t];if(r===void 0){let n=Ud(Uint8Array.from(t,i=>i.charCodeAt(0)));r=ja(n,n),bve[t]=r}return Ud(ja(r,...e))}function KZ(t){let e=jd.utils.normPrivateKeyToScalar(t),r=JZ.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:cA(-e),bytes:QZ(r)}}function vve(t){wm(\\\"x\\\",t,aA,lA);let e=WZ(t*t),r=WZ(e*t+BigInt(7)),n=wve(r);n%VN!==ZZ&&(n=WZ(-n));let i=new JZ(t,n,aA);return i.assertValidity(),i}function xve(...t){return cA(x5(WN(\\\"BIP0340/challenge\\\",...t)))}function idt(t){return KZ(t).bytes}function sdt(t,e,r=am(32)){let n=vs(\\\"message\\\",t),{bytes:i,scalar:s}=KZ(e),o=vs(\\\"auxRand\\\",r,32),a=GZ(s^x5(WN(\\\"BIP0340/aux\\\",o))),c=WN(\\\"BIP0340/nonce\\\",a,i,n),l=cA(x5(c));if(l===ZZ)throw new Error(\\\"sign failed: k is zero\\\");let{bytes:d,scalar:f}=KZ(l),p=xve(d,i,n),h=new Uint8Array(64);if(h.set(d,0),h.set(GZ(cA(f+p*s)),32),!Eve(h,n,i))throw new Error(\\\"sign: Invalid signature produced\\\");return h}function Eve(t,e,r){let n=vs(\\\"signature\\\",t,64),i=vs(\\\"message\\\",e),s=vs(\\\"publicKey\\\",r,32);try{let o=vve(x5(s)),a=x5(n.subarray(0,32));if(!yw(a,aA,lA))return!1;let c=x5(n.subarray(32,64));if(!yw(c,aA,$N))return!1;let l=xve(GZ(a),QZ(o),i),d=ndt(o,c,cA(-l));return!(!d||!d.hasEvenY()||d.toAffine().x!==a)}catch{return!1}}var lA,$N,ZZ,aA,VN,yve,Qg,jd,bve,QZ,GZ,WZ,cA,JZ,ndt,x5,odt,adt,cdt,YZ,ldt,udt,uA=x(()=>{u();XS();Md();fve();gve();iA();w5();VZ();lA=BigInt(\\\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\\\"),$N=BigInt(\\\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\\\"),ZZ=BigInt(0),aA=BigInt(1),VN=BigInt(2),yve=(t,e)=>(t+e/VN)/e;Qg=nA(lA,void 0,void 0,{sqrt:wve}),jd=dve({a:ZZ,b:BigInt(7),Fp:Qg,n:$N,Gx:BigInt(\\\"55066263022277343669578718895168534326250603453777594175500187360389116729240\\\"),Gy:BigInt(\\\"32670510020758816978083085130507043184471273380659243275938904335757337482424\\\"),h:BigInt(1),lowS:!0,endo:{beta:BigInt(\\\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\\\"),splitScalar:t=>{let e=$N,r=BigInt(\\\"0x3086d221a7d46bcde86c90e49284eb15\\\"),n=-aA*BigInt(\\\"0xe4437ed6010e88286f547fa90abfe4c3\\\"),i=BigInt(\\\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\\\"),s=r,o=BigInt(\\\"0x100000000000000000000000000000000\\\"),a=yve(s*t,e),c=yve(-n*t,e),l=cs(t-a*r-c*i,e),d=cs(-a*n-c*s,e),f=l>o,p=d>o;if(f&&(l=e-l),p&&(d=e-d),l>o||d>o)throw new Error(\\\"splitScalar: Endomorphism failed, k=\\\"+t);return{k1neg:f,k1:l,k2neg:p,k2:d}}}},Ud),bve={};QZ=t=>t.toRawBytes(!0).slice(1),GZ=t=>op(t,32),WZ=t=>cs(t,lA),cA=t=>cs(t,$N),JZ=jd.ProjectivePoint,ndt=(t,e,r)=>JZ.BASE.multiplyAndAddUnsafe(t,e,r);x5=Sc;odt={getPublicKey:idt,sign:sdt,verify:Eve,utils:{randomPrivateKey:jd.utils.randomPrivateKey,lift_x:vve,pointToBytes:QZ,numberToBytesBE:op,bytesToNumberBE:Sc,taggedHash:WN,mod:cs}},adt=hve(Qg,[[\\\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\\\",\\\"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\\\",\\\"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\\\",\\\"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\\\"],[\\\"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\\\",\\\"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\\\",\\\"0x0000000000000000000000000000000000000000000000000000000000000001\\\"],[\\\"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\\\",\\\"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\\\",\\\"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\\\",\\\"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\\\"],[\\\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\\\",\\\"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\\\",\\\"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\\\",\\\"0x0000000000000000000000000000000000000000000000000000000000000001\\\"]].map(t=>t.map(e=>BigInt(e)))),cdt=uve(Qg,{A:BigInt(\\\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\\\"),B:BigInt(\\\"1771\\\"),Z:Qg.create(BigInt(\\\"-11\\\"))}),YZ=mve(jd.ProjectivePoint,t=>{let{x:e,y:r}=cdt(Qg.create(t[0]));return adt(e,r)},{DST:\\\"secp256k1_XMD:SHA-256_SSWU_RO_\\\",encodeDST:\\\"secp256k1_XMD:SHA-256_SSWU_NU_\\\",p:Qg.ORDER,m:1,k:128,expand:\\\"xmd\\\",hash:Ud}),ldt=YZ.hashToCurve,udt=YZ.encodeToCurve});async function Sve({hash:t,signature:e}){let r=Ur(t)?t:He(t),{secp256k1:n}=await Promise.resolve().then(()=>(uA(),_ve));return`0x${(()=>{if(typeof e==\\\"object\\\"&&\\\"r\\\"in e&&\\\"s\\\"in e){let{r:l,s:d,v:f,yParity:p}=e,h=Number(p??f),m=Cve(h);return new n.Signature(Ge(l),Ge(d)).addRecoveryBit(m)}let o=Ur(e)?e:He(e);if(Ot(o)!==65)throw new Error(\\\"invalid signature length\\\");let a=jr(`0x${o.slice(130)}`),c=Cve(a);return n.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function Cve(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error(\\\"Invalid yParityOrV value\\\")}var Ave=x(()=>{u();gu();Da();xi();qe()});async function ap({hash:t,signature:e}){return Bwe(await Sve({hash:t,signature:e}))}var GN=x(()=>{u();Mwe();Ave()});function qa(t,e=\\\"hex\\\"){let r=Tve(t),n=o5(new Uint8Array(r.length));return r.encode(n),e===\\\"hex\\\"?er(n.bytes):n.bytes}function Tve(t){return Array.isArray(t)?ddt(t.map(e=>Tve(e))):fdt(t)}function ddt(t){let e=t.reduce((i,s)=>i+s.length,0),r=Ive(e);return{length:e<=55?1+e:1+r+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(let{encode:s}of t)s(i)}}}function fdt(t){let e=typeof t==\\\"string\\\"?Hr(t):t,r=Ive(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function Ive(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new W(\\\"Length is too large.\\\")}var E5=x(()=>{u();st();SN();Zi();qe()});function Rve(t){let{chainId:e,nonce:r,to:n}=t,i=t.contractAddress??t.address,s=Ft(ln([\\\"0x05\\\",qa([e?Z(e):\\\"0x\\\",i,r?Z(r):\\\"0x\\\"])]));return n===\\\"bytes\\\"?Hr(s):s}var Pve=x(()=>{u();Ei();Zi();qe();E5();yl()});async function Jg(t){let{authorization:e,signature:r}=t;return ap({hash:Rve(e),signature:r??e})}var dA=x(()=>{u();GN();Pve()});var KN,Ove=x(()=>{u();IN();Yb();st();wl();KN=class extends W{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:p}){let h=lm({from:r?.address,to:f,value:typeof p<\\\"u\\\"&&`${u5(p)} ${i?.nativeCurrency?.symbol||\\\"ETH\\\"}`,data:s,gas:o,gasPrice:typeof a<\\\"u\\\"&&`${Oi(a)} gwei`,maxFeePerGas:typeof c<\\\"u\\\"&&`${Oi(c)} gwei`,maxPriorityFeePerGas:typeof l<\\\"u\\\"&&`${Oi(l)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages,\\\" \\\"]:[],\\\"Estimate Gas Arguments:\\\",h].filter(Boolean),name:\\\"EstimateGasExecutionError\\\"}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}});var Hd,Ac,_5,C5,S5,A5,T5,I5,R5,P5,xu,Eu,cp=x(()=>{u();Yb();st();Hd=class extends W{constructor({cause:e,message:r}={}){let n=r?.replace(\\\"execution reverted: \\\",\\\"\\\")?.replace(\\\"execution reverted\\\",\\\"\\\");super(`Execution reverted ${n?`with reason: ${n}`:\\\"for an unknown reason\\\"}.`,{cause:e,name:\\\"ExecutionRevertedError\\\"})}};Object.defineProperty(Hd,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Hd,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});Ac=class extends W{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\\\\`maxFeePerGas\\\\`${r?` = ${Oi(r)} gwei`:\\\"\\\"}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:\\\"FeeCapTooHighError\\\"})}};Object.defineProperty(Ac,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\\\\^256-1|fee cap higher than 2\\\\^256-1/});_5=class extends W{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\\\\`maxFeePerGas\\\\`${r?` = ${Oi(r)}`:\\\"\\\"} gwei) cannot be lower than the block base fee.`,{cause:e,name:\\\"FeeCapTooLowError\\\"})}};Object.defineProperty(_5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});C5=class extends W{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:\\\"\\\"}is higher than the next one expected.`,{cause:e,name:\\\"NonceTooHighError\\\"})}};Object.defineProperty(C5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});S5=class extends W{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:\\\"\\\"}is lower than the current nonce of the account.`,\\\"Try increasing the nonce or find the latest nonce with `getTransactionCount`.\\\"].join(`\\n`),{cause:e,name:\\\"NonceTooLowError\\\"})}};Object.defineProperty(S5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});A5=class extends W{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:\\\"\\\"}exceeds the maximum allowed nonce.`,{cause:e,name:\\\"NonceMaxValueError\\\"})}};Object.defineProperty(A5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});T5=class extends W{constructor({cause:e}={}){super([\\\"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\\\"].join(`\\n`),{cause:e,metaMessages:[\\\"This error could arise when the account does not have enough funds to:\\\",\\\" - pay for the total gas fee,\\\",\\\" - pay for the value to send.\\\",\\\" \\\",\\\"The cost of the transaction is calculated as `gas * gas fee + value`, where:\\\",\\\" - `gas` is the amount of gas needed for transaction to execute,\\\",\\\" - `gas fee` is the gas fee,\\\",\\\" - `value` is the amount of ether to send to the recipient.\\\"],name:\\\"InsufficientFundsError\\\"})}};Object.defineProperty(T5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});I5=class extends W{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:\\\"\\\"}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:\\\"IntrinsicGasTooHighError\\\"})}};Object.defineProperty(I5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});R5=class extends W{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:\\\"\\\"}provided for the transaction is too low.`,{cause:e,name:\\\"IntrinsicGasTooLowError\\\"})}};Object.defineProperty(R5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});P5=class extends W{constructor({cause:e}){super(\\\"The transaction type is not supported for this chain.\\\",{cause:e,name:\\\"TransactionTypeNotSupportedError\\\"})}};Object.defineProperty(P5,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});xu=class extends W{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\\\\`maxPriorityFeePerGas\\\\`${r?` = ${Oi(r)} gwei`:\\\"\\\"}) cannot be higher than the fee cap (\\\\`maxFeePerGas\\\\`${n?` = ${Oi(n)} gwei`:\\\"\\\"}).`].join(`\\n`),{cause:e,name:\\\"TipAboveFeeCapError\\\"})}};Object.defineProperty(xu,\\\"nodeMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Eu=class extends W{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:\\\"UnknownNodeError\\\"})}}});function Yg(t,e){let r=(t.details||\\\"\\\").toLowerCase(),n=t instanceof W?t.walk(i=>i?.code===Hd.code):t;return n instanceof W?new Hd({cause:t,message:n.details}):Hd.nodeMessage.test(r)?new Hd({cause:t,message:t.details}):Ac.nodeMessage.test(r)?new Ac({cause:t,maxFeePerGas:e?.maxFeePerGas}):_5.nodeMessage.test(r)?new _5({cause:t,maxFeePerGas:e?.maxFeePerGas}):C5.nodeMessage.test(r)?new C5({cause:t,nonce:e?.nonce}):S5.nodeMessage.test(r)?new S5({cause:t,nonce:e?.nonce}):A5.nodeMessage.test(r)?new A5({cause:t,nonce:e?.nonce}):T5.nodeMessage.test(r)?new T5({cause:t}):I5.nodeMessage.test(r)?new I5({cause:t,gas:e?.gas}):R5.nodeMessage.test(r)?new R5({cause:t,gas:e?.gas}):P5.nodeMessage.test(r)?new P5({cause:t}):xu.nodeMessage.test(r)?new xu({cause:t,maxFeePerGas:e?.maxFeePerGas,maxPriorityFeePerGas:e?.maxPriorityFeePerGas}):new Eu({cause:t})}var fA=x(()=>{u();st();cp()});function Nve(t,{docsPath:e,...r}){let n=(()=>{let i=Yg(t,r);return i instanceof Eu?t:i})();return new KN(n,{docsPath:e,...r})}var kve=x(()=>{u();Ove();cp();fA()});function Tc(t,{format:e}){if(!e)return{};let r={};function n(s){let o=Object.keys(s);for(let a of o)a in t&&(r[a]=t[a]),s[a]&&typeof s[a]==\\\"object\\\"&&!Array.isArray(s[a])&&n(s[a])}let i=e(t||{});return n(i),r}var Xg=x(()=>{u()});function ey(t,e){return({exclude:r,format:n})=>({exclude:r,format:(i,s)=>{let o=e(i,s);if(r)for(let a of r)delete o[a];return{...o,...n(i,s)}},type:t})}var pA=x(()=>{u()});function Hs(t,e){let r={};return typeof t.authorizationList<\\\"u\\\"&&(r.authorizationList=hdt(t.authorizationList)),typeof t.accessList<\\\"u\\\"&&(r.accessList=t.accessList),typeof t.blobVersionedHashes<\\\"u\\\"&&(r.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<\\\"u\\\"&&(typeof t.blobs[0]!=\\\"string\\\"?r.blobs=t.blobs.map(n=>er(n)):r.blobs=t.blobs),typeof t.data<\\\"u\\\"&&(r.data=t.data),t.account&&(r.from=t.account.address),typeof t.from<\\\"u\\\"&&(r.from=t.from),typeof t.gas<\\\"u\\\"&&(r.gas=Z(t.gas)),typeof t.gasPrice<\\\"u\\\"&&(r.gasPrice=Z(t.gasPrice)),typeof t.maxFeePerBlobGas<\\\"u\\\"&&(r.maxFeePerBlobGas=Z(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<\\\"u\\\"&&(r.maxFeePerGas=Z(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<\\\"u\\\"&&(r.maxPriorityFeePerGas=Z(t.maxPriorityFeePerGas)),typeof t.nonce<\\\"u\\\"&&(r.nonce=Z(t.nonce)),typeof t.to<\\\"u\\\"&&(r.to=t.to),typeof t.type<\\\"u\\\"&&(r.type=pdt[t.type]),typeof t.value<\\\"u\\\"&&(r.value=Z(t.value)),r}function hdt(t){return t.map(e=>({address:e.address,r:e.r?Z(BigInt(e.r)):e.r,s:e.s?Z(BigInt(e.s)):e.s,chainId:Z(e.chainId),nonce:Z(e.nonce),...typeof e.yParity<\\\"u\\\"?{yParity:Z(e.yParity)}:{},...typeof e.v<\\\"u\\\"&&typeof e.yParity>\\\"u\\\"?{v:Z(e.v)}:{}}))}var pdt,ZN,_u=x(()=>{u();qe();pA();pdt={legacy:\\\"0x0\\\",eip2930:\\\"0x1\\\",eip1559:\\\"0x2\\\",eip4844:\\\"0x3\\\",eip7702:\\\"0x4\\\"};ZN=ey(\\\"transactionRequest\\\",Hs)});function Bve(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new US({size:r.length,targetSize:66,type:\\\"hex\\\"});if(n.length!==66)throw new US({size:n.length,targetSize:66,type:\\\"hex\\\"});return e[r]=n,e},{})}function mdt(t){let{balance:e,nonce:r,state:n,stateDiff:i,code:s}=t,o={};if(s!==void 0&&(o.code=s),e!==void 0&&(o.balance=Z(e)),r!==void 0&&(o.nonce=Z(r)),n!==void 0&&(o.state=Bve(n)),i!==void 0){if(o.state)throw new PN;o.stateDiff=Bve(i)}return o}function ty(t){if(!t)return;let e={};for(let{address:r,...n}of t){if(!lt(r,{strict:!1}))throw new cr({address:r});if(e[r])throw new RN({address:r});e[r]=mdt(n)}return e}var hA=x(()=>{u();bl();oN();CZ();da();qe()});var _ir,Cir,Sir,Air,Tir,Iir,Rir,Pir,Oir,Nir,kir,Bir,Mir,Dir,Lir,Uir,Fir,jir,Hir,qir,zir,$ir,Vir,Wir,Gir,Kir,Zir,Qir,Jir,Yir,Xir,esr,tsr,rsr,nsr,isr,ssr,osr,asr,csr,lsr,usr,dsr,fsr,psr,hsr,msr,gsr,ysr,bsr,wsr,vsr,xsr,Esr,_sr,Csr,Ssr,Asr,Tsr,Isr,Rsr,Psr,Osr,Nsr,ksr,Mve,Bsr,Msr,Dsr,Lsr,Usr,Fsr,jsr,Hsr,qsr,zsr,$sr,Vsr,Wsr,Gsr,Ksr,Zsr,Qsr,Jsr,Ysr,Xsr,eor,tor,ror,nor,ior,sor,oor,aor,cor,ry,mA=x(()=>{u();_ir=2n**(8n-1n)-1n,Cir=2n**(16n-1n)-1n,Sir=2n**(24n-1n)-1n,Air=2n**(32n-1n)-1n,Tir=2n**(40n-1n)-1n,Iir=2n**(48n-1n)-1n,Rir=2n**(56n-1n)-1n,Pir=2n**(64n-1n)-1n,Oir=2n**(72n-1n)-1n,Nir=2n**(80n-1n)-1n,kir=2n**(88n-1n)-1n,Bir=2n**(96n-1n)-1n,Mir=2n**(104n-1n)-1n,Dir=2n**(112n-1n)-1n,Lir=2n**(120n-1n)-1n,Uir=2n**(128n-1n)-1n,Fir=2n**(136n-1n)-1n,jir=2n**(144n-1n)-1n,Hir=2n**(152n-1n)-1n,qir=2n**(160n-1n)-1n,zir=2n**(168n-1n)-1n,$ir=2n**(176n-1n)-1n,Vir=2n**(184n-1n)-1n,Wir=2n**(192n-1n)-1n,Gir=2n**(200n-1n)-1n,Kir=2n**(208n-1n)-1n,Zir=2n**(216n-1n)-1n,Qir=2n**(224n-1n)-1n,Jir=2n**(232n-1n)-1n,Yir=2n**(240n-1n)-1n,Xir=2n**(248n-1n)-1n,esr=2n**(256n-1n)-1n,tsr=-(2n**(8n-1n)),rsr=-(2n**(16n-1n)),nsr=-(2n**(24n-1n)),isr=-(2n**(32n-1n)),ssr=-(2n**(40n-1n)),osr=-(2n**(48n-1n)),asr=-(2n**(56n-1n)),csr=-(2n**(64n-1n)),lsr=-(2n**(72n-1n)),usr=-(2n**(80n-1n)),dsr=-(2n**(88n-1n)),fsr=-(2n**(96n-1n)),psr=-(2n**(104n-1n)),hsr=-(2n**(112n-1n)),msr=-(2n**(120n-1n)),gsr=-(2n**(128n-1n)),ysr=-(2n**(136n-1n)),bsr=-(2n**(144n-1n)),wsr=-(2n**(152n-1n)),vsr=-(2n**(160n-1n)),xsr=-(2n**(168n-1n)),Esr=-(2n**(176n-1n)),_sr=-(2n**(184n-1n)),Csr=-(2n**(192n-1n)),Ssr=-(2n**(200n-1n)),Asr=-(2n**(208n-1n)),Tsr=-(2n**(216n-1n)),Isr=-(2n**(224n-1n)),Rsr=-(2n**(232n-1n)),Psr=-(2n**(240n-1n)),Osr=-(2n**(248n-1n)),Nsr=-(2n**(256n-1n)),ksr=2n**8n-1n,Mve=2n**16n-1n,Bsr=2n**24n-1n,Msr=2n**32n-1n,Dsr=2n**40n-1n,Lsr=2n**48n-1n,Usr=2n**56n-1n,Fsr=2n**64n-1n,jsr=2n**72n-1n,Hsr=2n**80n-1n,qsr=2n**88n-1n,zsr=2n**96n-1n,$sr=2n**104n-1n,Vsr=2n**112n-1n,Wsr=2n**120n-1n,Gsr=2n**128n-1n,Ksr=2n**136n-1n,Zsr=2n**144n-1n,Qsr=2n**152n-1n,Jsr=2n**160n-1n,Ysr=2n**168n-1n,Xsr=2n**176n-1n,eor=2n**184n-1n,tor=2n**192n-1n,ror=2n**200n-1n,nor=2n**208n-1n,ior=2n**216n-1n,sor=2n**224n-1n,oor=2n**232n-1n,aor=2n**240n-1n,cor=2n**248n-1n,ry=2n**256n-1n});function xs(t){let{account:e,maxFeePerGas:r,maxPriorityFeePerGas:n,to:i}=t,s=e?Ze(e):void 0;if(s&&!lt(s.address))throw new cr({address:s.address});if(i&&!lt(i))throw new cr({address:i});if(r&&r>ry)throw new Ac({maxFeePerGas:r});if(n&&r&&n>r)throw new xu({maxFeePerGas:r,maxPriorityFeePerGas:n})}var qd=x(()=>{u();en();mA();bl();cp();da()});var O5,ny,QN,gA=x(()=>{u();Yb();st();O5=class extends W{constructor(){super(\\\"`baseFeeMultiplier` must be greater than 1.\\\",{name:\\\"BaseFeeScalarError\\\"})}},ny=class extends W{constructor(){super(\\\"Chain does not support EIP-1559 fees.\\\",{name:\\\"Eip1559FeesNotSupportedError\\\"})}},QN=class extends W{constructor({maxPriorityFeePerGas:e}){super(`\\\\`maxFeePerGas\\\\` cannot be less than the \\\\`maxPriorityFeePerGas\\\\` (${Oi(e)} gwei).`,{name:\\\"MaxFeePerGasTooLowError\\\"})}}});var N5,XZ=x(()=>{u();st();N5=class extends W{constructor({blockHash:e,blockNumber:r}){let n=\\\"Block\\\";e&&(n=`Block at hash \\\"${e}\\\"`),r&&(n=`Block at number \\\"${r}\\\"`),super(`${n} could not be found.`,{name:\\\"BlockNotFoundError\\\"})}}});function zd(t,e){let r={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?jr(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?jr(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?eQ[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(r.authorizationList=gdt(t.authorizationList)),r.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof r.v==\\\"bigint\\\"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type===\\\"legacy\\\"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type===\\\"eip2930\\\"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type===\\\"eip1559\\\"&&delete r.maxFeePerBlobGas,r}function gdt(t){return t.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}var eQ,k5,iy=x(()=>{u();xi();pA();eQ={\\\"0x0\\\":\\\"legacy\\\",\\\"0x1\\\":\\\"eip2930\\\",\\\"0x2\\\":\\\"eip1559\\\",\\\"0x3\\\":\\\"eip4844\\\",\\\"0x4\\\":\\\"eip7702\\\"};k5=ey(\\\"transaction\\\",zd)});function yA(t,e){let r=(t.transactions??[]).map(n=>typeof n==\\\"string\\\"?n:zd(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:r,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}var B5,M5=x(()=>{u();pA();iy();B5=ey(\\\"block\\\",yA)});async function no(t,{blockHash:e,blockNumber:r,blockTag:n=t.experimental_blockTag??\\\"latest\\\",includeTransactions:i}={}){let s=i??!1,o=r!==void 0?Z(r):void 0,a=null;if(e?a=await t.request({method:\\\"eth_getBlockByHash\\\",params:[e,s]},{dedupe:!0}):a=await t.request({method:\\\"eth_getBlockByNumber\\\",params:[o||n,s]},{dedupe:!!o}),!a)throw new N5({blockHash:e,blockNumber:r});return(t.chain?.formatters?.block?.format||yA)(a,\\\"getBlock\\\")}var sy=x(()=>{u();XZ();qe();M5()});async function D5(t){let e=await t.request({method:\\\"eth_gasPrice\\\"});return BigInt(e)}var JN=x(()=>{u()});async function Dve(t,e){return tQ(t,e)}async function tQ(t,e){let{block:r,chain:n=t.chain,request:i}=e||{};try{let s=n?.fees?.maxPriorityFeePerGas??n?.fees?.defaultPriorityFee;if(typeof s==\\\"function\\\"){let a=r||await ae(t,no,\\\"getBlock\\\")({}),c=await s({block:a,client:t,request:i});if(c===null)throw new Error;return c}if(typeof s<\\\"u\\\")return s;let o=await t.request({method:\\\"eth_maxPriorityFeePerGas\\\"});return Ge(o)}catch{let[s,o]=await Promise.all([r?Promise.resolve(r):ae(t,no,\\\"getBlock\\\")({}),ae(t,D5,\\\"getGasPrice\\\")({})]);if(typeof s.baseFeePerGas!=\\\"bigint\\\")throw new ny;let a=o-s.baseFeePerGas;return a<0n?0n:a}}var rQ=x(()=>{u();gA();xi();Ut();sy();JN()});async function YN(t,e){return XN(t,e)}async function XN(t,e){let{block:r,chain:n=t.chain,request:i,type:s=\\\"eip1559\\\"}=e||{},o=await(async()=>typeof n?.fees?.baseFeeMultiplier==\\\"function\\\"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):n?.fees?.baseFeeMultiplier??1.2)();if(o<1)throw new O5;let c=10**(o.toString().split(\\\".\\\")[1]?.length??0),l=p=>p*BigInt(Math.ceil(o*c))/BigInt(c),d=r||await ae(t,no,\\\"getBlock\\\")({});if(typeof n?.fees?.estimateFeesPerGas==\\\"function\\\"){let p=await n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:i,type:s});if(p!==null)return p}if(s===\\\"eip1559\\\"){if(typeof d.baseFeePerGas!=\\\"bigint\\\")throw new ny;let p=typeof i?.maxPriorityFeePerGas==\\\"bigint\\\"?i.maxPriorityFeePerGas:await tQ(t,{block:d,chain:n,request:i}),h=l(d.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??h+p,maxPriorityFeePerGas:p}}return{gasPrice:i?.gasPrice??l(await ae(t,D5,\\\"getGasPrice\\\")({}))}}var ek=x(()=>{u();gA();Ut();rQ();sy();JN()});async function oy(t,{address:e,blockTag:r=\\\"latest\\\",blockNumber:n}){let i=await t.request({method:\\\"eth_getTransactionCount\\\",params:[e,typeof n==\\\"bigint\\\"?Z(n):r]},{dedupe:!!n});return jr(i)}var bA=x(()=>{u();xi();qe()});function L5(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]==\\\"string\\\"?\\\"hex\\\":\\\"bytes\\\"),n=typeof t.blobs[0]==\\\"string\\\"?t.blobs.map(s=>Hr(s)):t.blobs,i=[];for(let s of n)i.push(Uint8Array.from(e.blobToKzgCommitment(s)));return r===\\\"bytes\\\"?i:i.map(s=>er(s))}var tk=x(()=>{u();Zi();qe()});function U5(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]==\\\"string\\\"?\\\"hex\\\":\\\"bytes\\\"),n=typeof t.blobs[0]==\\\"string\\\"?t.blobs.map(o=>Hr(o)):t.blobs,i=typeof t.commitments[0]==\\\"string\\\"?t.commitments.map(o=>Hr(o)):t.commitments,s=[];for(let o=0;o<n.length;o++){let a=n[o],c=i[o];s.push(Uint8Array.from(e.computeBlobKzgProof(a,c)))}return r===\\\"bytes\\\"?s:s.map(o=>er(o))}var rk=x(()=>{u();Zi();qe()});var nk,nQ=x(()=>{u();XS();nk=Ud});function ik(t,e){let r=e||\\\"hex\\\",n=nk(Ur(t,{strict:!1})?Oo(t):t);return r===\\\"bytes\\\"?n:He(n)}var iQ=x(()=>{u();nQ();gu();Zi();qe()});function Lve(t){let{commitment:e,version:r=1}=t,n=t.to??(typeof e==\\\"string\\\"?\\\"hex\\\":\\\"bytes\\\"),i=ik(e,\\\"bytes\\\");return i.set([r],0),n===\\\"bytes\\\"?i:er(i)}var Uve=x(()=>{u();qe();iQ()});function sk(t){let{commitments:e,version:r}=t,n=t.to??(typeof e[0]==\\\"string\\\"?\\\"hex\\\":\\\"bytes\\\"),i=[];for(let s of e)i.push(Lve({commitment:s,to:n,version:r}));return i}var sQ=x(()=>{u();Uve()});var ok,F5,ak,ck,oQ=x(()=>{u();st();ok=class extends W{constructor({maxSize:e,size:r}){super(\\\"Blob size is too large.\\\",{metaMessages:[`Max: ${e} bytes`,`Given: ${r} bytes`],name:\\\"BlobSizeTooLargeError\\\"})}},F5=class extends W{constructor(){super(\\\"Blob data must not be empty.\\\",{name:\\\"EmptyBlobError\\\"})}},ak=class extends W{constructor({hash:e,size:r}){super(`Versioned hash \\\"${e}\\\" size is invalid.`,{metaMessages:[\\\"Expected: 32\\\",`Received: ${r}`],name:\\\"InvalidVersionedHashSizeError\\\"})}},ck=class extends W{constructor({hash:e,version:r}){super(`Versioned hash \\\"${e}\\\" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:\\\"InvalidVersionedHashVersionError\\\"})}}});function Fve(t){let e=t.to??(typeof t.data==\\\"string\\\"?\\\"hex\\\":\\\"bytes\\\"),r=typeof t.data==\\\"string\\\"?Hr(t.data):t.data,n=Ot(r);if(!n)throw new F5;if(n>761855)throw new ok({maxSize:761855,size:n});let i=[],s=!0,o=0;for(;s;){let a=o5(new Uint8Array(131072)),c=0;for(;c<4096;){let l=r.slice(o,o+31);if(a.pushByte(0),a.pushBytes(l),l.length<31){a.pushByte(128),s=!1;break}c++,o+=31}i.push(a)}return e===\\\"bytes\\\"?i.map(a=>a.bytes):i.map(a=>er(a.bytes))}var jve=x(()=>{u();oQ();SN();Da();Zi();qe()});function lk(t){let{data:e,kzg:r,to:n}=t,i=t.blobs??Fve({data:e,to:n}),s=t.commitments??L5({blobs:i,kzg:r,to:n}),o=t.proofs??U5({blobs:i,commitments:s,kzg:r,to:n}),a=[];for(let c=0;c<i.length;c++)a.push({blob:i[c],commitment:s[c],proof:o[c]});return a}var aQ=x(()=>{u();tk();rk();jve()});function uk(t){if(t.type)return t.type;if(typeof t.authorizationList<\\\"u\\\")return\\\"eip7702\\\";if(typeof t.blobs<\\\"u\\\"||typeof t.blobVersionedHashes<\\\"u\\\"||typeof t.maxFeePerBlobGas<\\\"u\\\"||typeof t.sidecars<\\\"u\\\")return\\\"eip4844\\\";if(typeof t.maxFeePerGas<\\\"u\\\"||typeof t.maxPriorityFeePerGas<\\\"u\\\")return\\\"eip1559\\\";if(typeof t.gasPrice<\\\"u\\\")return typeof t.accessList<\\\"u\\\"?\\\"eip2930\\\":\\\"legacy\\\";throw new NN({transaction:t})}var cQ=x(()=>{u();wl()});function ay(t,{docsPath:e,...r}){let n=(()=>{let i=Yg(t,r);return i instanceof Eu?t:i})();return new BN(n,{docsPath:e,...r})}var wA=x(()=>{u();cp();wl();fA()});async function Es(t){let e=await t.request({method:\\\"eth_chainId\\\"},{dedupe:!0});return jr(e)}var $d=x(()=>{u();xi()});async function j5(t,e){let{account:r=t.account,accessList:n,authorizationList:i,chain:s=t.chain,blobVersionedHashes:o,blobs:a,data:c,gas:l,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:m,nonceManager:g,to:w,type:v,value:b,..._}=e,S=await(async()=>{if(!r||!g||typeof m<\\\"u\\\")return m;let L=Ze(r),B=s?s.id:await ae(t,Es,\\\"getChainId\\\")({});return await g.consume({address:L.address,chainId:B,client:t})})();xs(e);let T=s?.formatters?.transactionRequest?.format,O=(T||Hs)({...Tc(_,{format:T}),account:r?Ze(r):void 0,accessList:n,authorizationList:i,blobs:a,blobVersionedHashes:o,data:c,gas:l,gasPrice:d,maxFeePerBlobGas:f,maxFeePerGas:p,maxPriorityFeePerGas:h,nonce:S,to:w,type:v,value:b},\\\"fillTransaction\\\");try{let L=await t.request({method:\\\"eth_fillTransaction\\\",params:[O]}),H=(s?.formatters?.transaction?.format||zd)(L.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=e.gas??H.gas),H.gasPrice&&(H.gasPrice=e.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=e.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=e.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=e.maxPriorityFeePerGas??H.maxPriorityFeePerGas),H.nonce&&(H.nonce=e.nonce??H.nonce);let M=await(async()=>{if(typeof s?.fees?.baseFeeMultiplier==\\\"function\\\"){let E=await ae(t,no,\\\"getBlock\\\")({});return s.fees.baseFeeMultiplier({block:E,client:t,request:e})}return s?.fees?.baseFeeMultiplier??1.2})();if(M<1)throw new O5;let R=10**(M.toString().split(\\\".\\\")[1]?.length??0),y=E=>E*BigInt(Math.ceil(M*R))/BigInt(R);return H.maxFeePerGas&&!e.maxFeePerGas&&(H.maxFeePerGas=y(H.maxFeePerGas)),H.gasPrice&&!e.gasPrice&&(H.gasPrice=y(H.gasPrice)),{raw:L.raw,transaction:{from:O.from,...H}}}catch(L){throw ay(L,{...e,chain:t.chain})}}var dk=x(()=>{u();en();gA();wA();Xg();iy();_u();Ut();qd();sy();$d()});async function lp(t,e){let r=e;r.account??(r.account=t.account),r.parameters??(r.parameters=vA);let{account:n,chain:i=t.chain,nonceManager:s,parameters:o}=r,a=(()=>{if(typeof i?.prepareTransactionRequest==\\\"function\\\")return{fn:i.prepareTransactionRequest,runAt:[\\\"beforeFillTransaction\\\"]};if(Array.isArray(i?.prepareTransactionRequest))return{fn:i.prepareTransactionRequest[0],runAt:i.prepareTransactionRequest[1].runAt}})(),c;async function l(){return c||(typeof r.chainId<\\\"u\\\"?r.chainId:i?i.id:(c=await ae(t,Es,\\\"getChainId\\\")({}),c))}let d=n&&Ze(n),f=r.nonce;if(o.includes(\\\"nonce\\\")&&typeof f>\\\"u\\\"&&d&&s){let S=await l();f=await s.consume({address:d.address,chainId:S,client:t})}a?.fn&&a.runAt?.includes(\\\"beforeFillTransaction\\\")&&(r=await a.fn({...r,chain:i},{phase:\\\"beforeFillTransaction\\\"}),f??(f=r.nonce));let h=((o.includes(\\\"blobVersionedHashes\\\")||o.includes(\\\"sidecars\\\"))&&r.kzg&&r.blobs||lQ.get(t.uid)===!1||![\\\"fees\\\",\\\"gas\\\"].some(T=>o.includes(T))?!1:!!(o.includes(\\\"chainId\\\")&&typeof r.chainId!=\\\"number\\\"||o.includes(\\\"nonce\\\")&&typeof f!=\\\"number\\\"||o.includes(\\\"fees\\\")&&typeof r.gasPrice!=\\\"bigint\\\"&&(typeof r.maxFeePerGas!=\\\"bigint\\\"||typeof r.maxPriorityFeePerGas!=\\\"bigint\\\")||o.includes(\\\"gas\\\")&&typeof r.gas!=\\\"bigint\\\"))?await ae(t,j5,\\\"fillTransaction\\\")({...r,nonce:f}).then(S=>{let{chainId:T,from:N,gas:O,gasPrice:L,nonce:B,maxFeePerBlobGas:H,maxFeePerGas:M,maxPriorityFeePerGas:F,type:R,...y}=S.transaction;return lQ.set(t.uid,!0),{...r,...N?{from:N}:{},...R&&!r.type?{type:R}:{},...typeof T<\\\"u\\\"?{chainId:T}:{},...typeof O<\\\"u\\\"?{gas:O}:{},...typeof L<\\\"u\\\"?{gasPrice:L}:{},...typeof B<\\\"u\\\"?{nonce:B}:{},...typeof H<\\\"u\\\"&&r.type!==\\\"legacy\\\"&&r.type!==\\\"eip2930\\\"?{maxFeePerBlobGas:H}:{},...typeof M<\\\"u\\\"&&r.type!==\\\"legacy\\\"&&r.type!==\\\"eip2930\\\"?{maxFeePerGas:M}:{},...typeof F<\\\"u\\\"&&r.type!==\\\"legacy\\\"&&r.type!==\\\"eip2930\\\"?{maxPriorityFeePerGas:F}:{},...\\\"nonceKey\\\"in y&&typeof y.nonceKey<\\\"u\\\"?{nonceKey:y.nonceKey}:{}}}).catch(S=>{let T=S;return T.name!==\\\"TransactionExecutionError\\\"||T.walk?.(O=>{let L=O;return L.name===\\\"MethodNotFoundRpcError\\\"||L.name===\\\"MethodNotSupportedRpcError\\\"||L.message?.includes(\\\"eth_fillTransaction is not available\\\")})&&lQ.set(t.uid,!1),r}):r;f??(f=h.nonce),r={...h,...d?{from:d?.address}:{},...f?{nonce:f}:{}};let{blobs:m,gas:g,kzg:w,type:v}=r;a?.fn&&a.runAt?.includes(\\\"beforeFillParameters\\\")&&(r=await a.fn({...r,chain:i},{phase:\\\"beforeFillParameters\\\"}));let b;async function _(){return b||(b=await ae(t,no,\\\"getBlock\\\")({blockTag:\\\"latest\\\"}),b)}if(o.includes(\\\"nonce\\\")&&typeof f>\\\"u\\\"&&d&&!s&&(r.nonce=await ae(t,oy,\\\"getTransactionCount\\\")({address:d.address,blockTag:\\\"pending\\\"})),(o.includes(\\\"blobVersionedHashes\\\")||o.includes(\\\"sidecars\\\"))&&m&&w){let S=L5({blobs:m,kzg:w});if(o.includes(\\\"blobVersionedHashes\\\")){let T=sk({commitments:S,to:\\\"hex\\\"});r.blobVersionedHashes=T}if(o.includes(\\\"sidecars\\\")){let T=U5({blobs:m,commitments:S,kzg:w}),N=lk({blobs:m,commitments:S,proofs:T,to:\\\"hex\\\"});r.sidecars=N}}if(o.includes(\\\"chainId\\\")&&(r.chainId=await l()),(o.includes(\\\"fees\\\")||o.includes(\\\"type\\\"))&&typeof v>\\\"u\\\")try{r.type=uk(r)}catch{let S=Hve.get(t.uid);typeof S>\\\"u\\\"&&(S=typeof(await _())?.baseFeePerGas==\\\"bigint\\\",Hve.set(t.uid,S)),r.type=S?\\\"eip1559\\\":\\\"legacy\\\"}if(o.includes(\\\"fees\\\"))if(r.type!==\\\"legacy\\\"&&r.type!==\\\"eip2930\\\"){if(typeof r.maxFeePerGas>\\\"u\\\"||typeof r.maxPriorityFeePerGas>\\\"u\\\"){let S=await _(),{maxFeePerGas:T,maxPriorityFeePerGas:N}=await XN(t,{block:S,chain:i,request:r});if(typeof r.maxPriorityFeePerGas>\\\"u\\\"&&r.maxFeePerGas&&r.maxFeePerGas<N)throw new QN({maxPriorityFeePerGas:N});r.maxPriorityFeePerGas=N,r.maxFeePerGas=T}}else{if(typeof r.maxFeePerGas<\\\"u\\\"||typeof r.maxPriorityFeePerGas<\\\"u\\\")throw new ny;if(typeof r.gasPrice>\\\"u\\\"){let S=await _(),{gasPrice:T}=await XN(t,{block:S,chain:i,request:r,type:\\\"legacy\\\"});r.gasPrice=T}}return o.includes(\\\"gas\\\")&&typeof g>\\\"u\\\"&&(r.gas=await ae(t,q5,\\\"estimateGas\\\")({...r,account:d,prepare:d?.type===\\\"local\\\"?[]:[\\\"blobVersionedHashes\\\"]})),a?.fn&&a.runAt?.includes(\\\"afterFillParameters\\\")&&(r=await a.fn({...r,chain:i},{phase:\\\"afterFillParameters\\\"})),xs(r),delete r.parameters,r}var vA,Hve,lQ,H5=x(()=>{u();en();ek();fk();sy();bA();gA();tk();rk();sQ();aQ();Ut();Lg();qd();cQ();dk();$d();vA=[\\\"blobVersionedHashes\\\",\\\"chainId\\\",\\\"fees\\\",\\\"gas\\\",\\\"nonce\\\",\\\"type\\\"],Hve=new Map,lQ=new ua(128)});async function q5(t,e){let{account:r=t.account,prepare:n=!0}=e,i=r?Ze(r):void 0,s=(()=>{if(Array.isArray(n))return n;if(i?.type!==\\\"local\\\")return[\\\"blobVersionedHashes\\\"]})();try{let o=await(async()=>{if(e.to)return e.to;if(e.authorizationList&&e.authorizationList.length>0)return await Jg({authorization:e.authorizationList[0]}).catch(()=>{throw new W(\\\"`to` is required. Could not infer from `authorizationList`\\\")})})(),{accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:d,blockNumber:f,blockTag:p,data:h,gas:m,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:b,nonce:_,value:S,stateOverride:T,...N}=n?await lp(t,{...e,parameters:s,to:o}):e;if(m&&e.gas!==m)return m;let L=(typeof f==\\\"bigint\\\"?Z(f):void 0)||p,B=ty(T);xs(e);let H=t.chain?.formatters?.transactionRequest?.format,F=(H||Hs)({...Tc(N,{format:H}),account:i,accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:d,data:h,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:b,nonce:_,to:o,value:S},\\\"estimateGas\\\");return BigInt(await t.request({method:\\\"eth_estimateGas\\\",params:B?[F,L??t.experimental_blockTag??\\\"latest\\\",B]:L?[F,L]:[F]}))}catch(o){throw Nve(o,{...e,account:i,chain:t.chain})}}var fk=x(()=>{u();en();st();dA();qe();kve();Xg();_u();hA();qd();H5()});async function qve(t,e){let{abi:r,address:n,args:i,functionName:s,dataSuffix:o=typeof t.dataSuffix==\\\"string\\\"?t.dataSuffix:t.dataSuffix?.value,...a}=e,c=At({abi:r,args:i,functionName:s});try{return await ae(t,q5,\\\"estimateGas\\\")({data:`${c}${o?o.replace(\\\"0x\\\",\\\"\\\"):\\\"\\\"}`,to:n,...a})}catch(l){let d=a.account?Ze(a.account):void 0;throw xl(l,{abi:r,address:n,args:i,docsPath:\\\"/docs/contract/estimateContractGas\\\",functionName:s,sender:d?.address})}}var zve=x(()=>{u();en();fa();gw();Ut();fk()});function ha(t,e){if(!lt(t,{strict:!1}))throw new cr({address:t});if(!lt(e,{strict:!1}))throw new cr({address:e});return t.toLowerCase()===e.toLowerCase()}var cy=x(()=>{u();bl();da()});function Qi(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,blockTimestamp:t.blockTimestamp?BigInt(t.blockTimestamp):t.blockTimestamp===null?null:void 0,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}var Vd=x(()=>{u()});function vw(t){let{abi:e,data:r,strict:n,topics:i}=t,s=n??!0,[o,...a]=i;if(!o)throw new YO({docsPath:$ve});let c=e.find(v=>v.type===\\\"event\\\"&&o===Dg(js(v)));if(!(c&&\\\"name\\\"in c)||c.type!==\\\"event\\\")throw new XO(o,{docsPath:$ve});let{name:l,inputs:d}=c,f=d?.some(v=>!(\\\"name\\\"in v&&v.name)),p=f?[]:{},h=d.map((v,b)=>[v,b]).filter(([v])=>\\\"indexed\\\"in v&&v.indexed),m=[];for(let v=0;v<h.length;v++){let[b,_]=h[v],S=a[v];if(!S){if(s)throw new Pg({abiItem:c,param:b});m.push([b,_]);continue}p[f?_:b.name||_]=wdt({param:b,value:S})}let g=d.filter(v=>!(\\\"indexed\\\"in v&&v.indexed)),w=s?g:[...m.map(([v])=>v),...g];if(w.length>0){if(r&&r!==\\\"0x\\\")try{let v=Cc(w,r);if(v){let b=0;if(!s)for(let[_,S]of m)p[f?S:_.name||S]=v[b++];if(f)for(let _=0;_<d.length;_++)p[_]===void 0&&b<v.length&&(p[_]=v[b++]);else for(let _=0;_<g.length;_++)p[g[_].name]=v[b++]}}catch(v){if(s)throw v instanceof ZE||v instanceof s5?new tm({abiItem:c,data:r,params:w,size:Ot(r)}):v}else if(s)throw new tm({abiItem:c,data:\\\"0x\\\",params:w,size:0})}return{eventName:l,args:Object.values(p).length>0?p:void 0}}function wdt({param:t,value:e}){return t.type===\\\"string\\\"||t.type===\\\"bytes\\\"||t.type===\\\"tuple\\\"||t.type.match(/^(.*)\\\\[(\\\\d+)?\\\\]$/)?e:(Cc([t],e)||[])[0]}var $ve,pk=x(()=>{u();Ki();vZ();Da();VS();c5();em();$ve=\\\"/docs/contract/decodeEventLog\\\"});function z5(t){let{abi:e,args:r,logs:n,strict:i=!0}=t,s=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})(),o=e.filter(a=>a.type===\\\"event\\\").map(a=>({abi:a,selector:Dg(a)}));return n.map(a=>{let c=typeof a.blockNumber==\\\"string\\\"?Qi(a):a,l=o.filter(p=>c.topics[0]===p.selector);if(l.length===0)return null;let d,f;for(let p of l)try{d=vw({...c,abi:[p.abi],strict:!0}),f=p;break}catch{}if(!d&&!i){f=l[0];try{d=vw({data:c.data,topics:c.topics,abi:[f.abi],strict:!1})}catch{let p=f.abi.inputs?.some(h=>!(\\\"name\\\"in h&&h.name));return{...c,args:p?[]:{},eventName:f.abi.name}}}return!d||!f||s&&!s.includes(d.eventName)||!vdt({args:d.args,inputs:f.abi.inputs,matchArgs:r})?null:{...d,...c}}).filter(Boolean)}function vdt(t){let{args:e,inputs:r,matchArgs:n}=t;if(!n)return!0;if(!e)return!1;function i(s,o,a){try{return s.type===\\\"address\\\"?ha(o,a):s.type===\\\"string\\\"||s.type===\\\"bytes\\\"?Ft(Oo(o))===a:o===a}catch{return!1}}return Array.isArray(e)&&Array.isArray(n)?n.every((s,o)=>{if(s==null)return!0;let a=r[o];return a?(Array.isArray(s)?s:[s]).some(l=>i(a,l,e[o])):!1}):typeof e==\\\"object\\\"&&!Array.isArray(e)&&typeof n==\\\"object\\\"&&!Array.isArray(n)?Object.entries(n).every(([s,o])=>{if(o==null)return!0;let a=r.find(l=>l.name===s);return a?(Array.isArray(o)?o:[o]).some(l=>i(a,l,e[s])):!1}):!1}var hk=x(()=>{u();cy();Zi();Vd();yl();VS();pk()});async function $5(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:s,events:o,args:a,strict:c}={}){let l=c??!1,d=o??(s?[s]:void 0),f=[];d&&(f=[d.flatMap(g=>rp({abi:[g],eventName:g.name,args:o?void 0:a}))],s&&(f=f[0]));let p;r?p=await t.request({method:\\\"eth_getLogs\\\",params:[{address:e,topics:f,blockHash:r}]}):p=await t.request({method:\\\"eth_getLogs\\\",params:[{address:e,topics:f,fromBlock:typeof n==\\\"bigint\\\"?Z(n):n,toBlock:typeof i==\\\"bigint\\\"?Z(i):i}]});let h=p.map(m=>Qi(m));return d?z5({abi:d,args:a,logs:h,strict:l}):h}var mk=x(()=>{u();i5();hk();qe();Vd()});async function gk(t,e){let{abi:r,address:n,args:i,blockHash:s,eventName:o,fromBlock:a,toBlock:c,strict:l}=e,d=o?_c({abi:r,name:o}):void 0,f=d?void 0:r.filter(p=>p.type===\\\"event\\\");return ae(t,$5,\\\"getLogs\\\")({address:n,args:i,blockHash:s,event:d,events:f,fromBlock:a,toBlock:c,strict:l})}var uQ=x(()=>{u();Ug();Ut();mk()});function ma(t){let{abi:e,args:r,functionName:n,data:i}=t,s=e[0];if(n){let a=_c({abi:e,args:r,name:n});if(!a)throw new Od(n,{docsPath:dQ});s=a}if(s.type!==\\\"function\\\")throw new Od(void 0,{docsPath:dQ});if(!s.outputs)throw new YE(s.name,{docsPath:dQ});let o=Cc(s.outputs,i);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}var dQ,Em=x(()=>{u();Ki();c5();Ug();dQ=\\\"/docs/contract/decodeFunctionResult\\\"});var Vve,Wve=x(()=>{u();Vve=\\\"0.1.1\\\"});function Gve(){return Vve}var Kve=x(()=>{u();Wve()});function Zve(t,e){return e?.(t)?t:t&&typeof t==\\\"object\\\"&&\\\"cause\\\"in t&&t.cause?Zve(t.cause,e):e?null:t}var $e,Ic=x(()=>{u();Kve();$e=class t extends Error{static setStaticOptions(e){t.prototype.docsOrigin=e.docsOrigin,t.prototype.showVersion=e.showVersion,t.prototype.version=e.version}constructor(e,r={}){let n=(()=>{if(r.cause instanceof t){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&\\\"details\\\"in r.cause&&typeof r.cause.details==\\\"string\\\"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,s=r.docsOrigin??t.prototype.docsOrigin,o=`${s}${i??\\\"\\\"}`,a=!!(r.version??t.prototype.showVersion),c=r.version??t.prototype.version,l=[e||\\\"An error occurred.\\\",...r.metaMessages?[\\\"\\\",...r.metaMessages]:[],...n||i||a?[\\\"\\\",n?`Details: ${n}`:void 0,i?`See: ${o}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(d=>typeof d==\\\"string\\\").join(`\\n`);super(l,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docs\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsOrigin\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"showVersion\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"version\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"BaseError\\\"}),this.cause=r.cause,this.details=n,this.docs=o,this.docsOrigin=s,this.docsPath=i,this.shortMessage=e,this.showVersion=a,this.version=c}walk(e){return Zve(this,e)}};Object.defineProperty($e,\\\"defaultStaticOptions\\\",{enumerable:!0,configurable:!0,writable:!0,value:{docsOrigin:\\\"https://oxlib.sh\\\",showVersion:!1,version:`ox@${Gve()}`}});$e.setStaticOptions($e.defaultStaticOptions)});function V5(t,e){if(Cu(t)>e)throw new yk({givenSize:Cu(t),maxSize:e})}function Qve(t,e){if(typeof e==\\\"number\\\"&&e>0&&e>Cu(t)-1)throw new xA({offset:e,position:\\\"start\\\",size:Cu(t)})}function Jve(t,e,r){if(typeof e==\\\"number\\\"&&typeof r==\\\"number\\\"&&Cu(t)!==r-e)throw new xA({offset:r,position:\\\"end\\\",size:Cu(t)})}function fQ(t){if(t>=_m.zero&&t<=_m.nine)return t-_m.zero;if(t>=_m.A&&t<=_m.F)return t-(_m.A-10);if(t>=_m.a&&t<=_m.f)return t-(_m.a-10)}function Yve(t,e={}){let{dir:r,size:n=32}=e;if(n===0)return t;if(t.length>n)throw new bk({size:t.length,targetSize:n,type:\\\"Bytes\\\"});let i=new Uint8Array(n);for(let s=0;s<n;s++){let o=r===\\\"right\\\";i[o?s:n-s-1]=t[o?s:t.length-s-1]}return i}function pQ(t,e={}){let{dir:r=\\\"left\\\"}=e,n=t,i=0;for(let s=0;s<n.length-1&&n[r===\\\"left\\\"?s:n.length-s-1].toString()===\\\"0\\\";s++)i++;return n=r===\\\"left\\\"?n.slice(i):n.slice(0,n.length-i),n}var _m,Xve=x(()=>{u();ly();_m={zero:48,nine:57,A:65,F:70,a:97,f:102}});function W5(t,e){if(_i(t)>e)throw new wk({givenSize:_i(t),maxSize:e})}function e2e(t,e){if(typeof e==\\\"number\\\"&&e>0&&e>_i(t)-1)throw new EA({offset:e,position:\\\"start\\\",size:_i(t)})}function t2e(t,e,r){if(typeof e==\\\"number\\\"&&typeof r==\\\"number\\\"&&_i(t)!==r-e)throw new EA({offset:r,position:\\\"end\\\",size:_i(t)})}function hQ(t,e={}){let{dir:r,size:n=32}=e;if(n===0)return t;let i=t.replace(\\\"0x\\\",\\\"\\\");if(i.length>n*2)throw new vk({size:Math.ceil(i.length/2),targetSize:n,type:\\\"Hex\\\"});return`0x${i[r===\\\"right\\\"?\\\"padEnd\\\":\\\"padStart\\\"](n*2,\\\"0\\\")}`}function r2e(t,e={}){let{dir:r=\\\"left\\\"}=e,n=t.replace(\\\"0x\\\",\\\"\\\"),i=0;for(let s=0;s<n.length-1&&n[r===\\\"left\\\"?s:n.length-s-1].toString()===\\\"0\\\";s++)i++;return n=r===\\\"left\\\"?n.slice(i):n.slice(0,n.length-i),n===\\\"0\\\"?\\\"0x\\\":r===\\\"right\\\"&&n.length%2===1?`0x${n}0`:`0x${n}`}var mQ=x(()=>{u();io()});function uy(t,e,r){return JSON.stringify(t,(n,i)=>typeof e==\\\"function\\\"?e(n,i):typeof i==\\\"bigint\\\"?i.toString()+Edt:i,r)}var Edt,_A=x(()=>{u();Edt=\\\"#__bigint\\\"});function Sdt(t){if(!(t instanceof Uint8Array)){if(!t)throw new G5(t);if(typeof t!=\\\"object\\\")throw new G5(t);if(!(\\\"BYTES_PER_ELEMENT\\\"in t))throw new G5(t);if(t.BYTES_PER_ELEMENT!==1||t.constructor.name!==\\\"Uint8Array\\\")throw new G5(t)}}function i2e(t){return t instanceof Uint8Array?t:typeof t==\\\"string\\\"?K5(t):Adt(t)}function Adt(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function K5(t,e={}){let{size:r}=e,n=t;r&&(W5(t,r),n=dp(t,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);let s=i.length/2,o=new Uint8Array(s);for(let a=0,c=0;a<s;a++){let l=fQ(i.charCodeAt(c++)),d=fQ(i.charCodeAt(c++));if(l===void 0||d===void 0)throw new $e(`Invalid byte sequence (\\\"${i[c-2]}${i[c-1]}\\\" in \\\"${i}\\\").`);o[a]=l<<4|d}return o}function s2e(t,e={}){let{size:r}=e,n=Cdt.encode(t);return typeof r==\\\"number\\\"?(V5(n,r),Tdt(n,r)):n}function Tdt(t,e){return Yve(t,{dir:\\\"right\\\",size:e})}function Cu(t){return t.length}function o2e(t,e,r,n={}){let{strict:i}=n;Qve(t,e);let s=t.slice(e,r);return i&&Jve(s,e,r),s}function a2e(t,e={}){let{size:r}=e;typeof r<\\\"u\\\"&&V5(t,r);let n=ls(t,e);return bQ(n,e)}function c2e(t,e={}){let{size:r}=e,n=t;if(typeof r<\\\"u\\\"&&(V5(n,r),n=yQ(n)),n.length>1||n[0]>1)throw new gQ(n);return!!n[0]}function up(t,e={}){let{size:r}=e;typeof r<\\\"u\\\"&&V5(t,r);let n=ls(t,e);return Ek(n,e)}function l2e(t,e={}){let{size:r}=e,n=t;return typeof r<\\\"u\\\"&&(V5(n,r),n=Idt(n)),_dt.decode(n)}function yQ(t){return pQ(t,{dir:\\\"left\\\"})}function Idt(t){return pQ(t,{dir:\\\"right\\\"})}function u2e(t){try{return Sdt(t),!0}catch{return!1}}var _dt,Cdt,gQ,G5,yk,xA,bk,ly=x(()=>{u();Ic();io();Xve();mQ();_A();_dt=new TextDecoder,Cdt=new TextEncoder;gQ=class extends $e{constructor(e){super(`Bytes value \\\\`${e}\\\\` is not a valid boolean.`,{metaMessages:[\\\"The bytes array must contain a single byte of either a `0` or `1` value.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.InvalidBytesBooleanError\\\"})}},G5=class extends $e{constructor(e){super(`Value \\\\`${typeof e==\\\"object\\\"?uy(e):e}\\\\` of type \\\\`${typeof e}\\\\` is an invalid Bytes value.`,{metaMessages:[\\\"Bytes values must be of type `Bytes`.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.InvalidBytesTypeError\\\"})}},yk=class extends $e{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed \\\\`${r}\\\\` bytes. Given size: \\\\`${e}\\\\` bytes.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SizeOverflowError\\\"})}},xA=class extends $e{constructor({offset:e,position:r,size:n}){super(`Slice ${r===\\\"start\\\"?\\\"starting\\\":\\\"ending\\\"} at offset \\\\`${e}\\\\` is out-of-bounds (size: \\\\`${n}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SliceOffsetOutOfBoundsError\\\"})}},bk=class extends $e{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\\\\`${e}\\\\`) exceeds padding size (\\\\`${r}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SizeExceedsPaddingSizeError\\\"})}}});function Odt(t,e={}){let{strict:r=!1}=e;if(!t)throw new _k(t);if(typeof t!=\\\"string\\\")throw new _k(t);if(r&&!/^0x[0-9a-fA-F]*$/.test(t))throw new Ck(t);if(!t.startsWith(\\\"0x\\\"))throw new Ck(t)}function Ni(...t){return`0x${t.reduce((e,r)=>e+r.replace(\\\"0x\\\",\\\"\\\"),\\\"\\\")}`}function Z5(t){return t instanceof Uint8Array?ls(t):Array.isArray(t)?ls(new Uint8Array(t)):t}function Sk(t,e={}){let r=`0x${Number(t)}`;return typeof e.size==\\\"number\\\"?(W5(r,e.size),Cm(r,e.size)):r}function ls(t,e={}){let r=\\\"\\\";for(let i=0;i<t.length;i++)r+=Pdt[t[i]];let n=`0x${r}`;return typeof e.size==\\\"number\\\"?(W5(n,e.size),dp(n,e.size)):n}function Sr(t,e={}){let{signed:r,size:n}=e,i=BigInt(t),s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t==\\\"number\\\"&&(s=BigInt(Number.MAX_SAFE_INTEGER));let o=typeof s==\\\"bigint\\\"&&r?-s-1n:0;if(s&&i>s||i<o){let l=typeof t==\\\"bigint\\\"?\\\"n\\\":\\\"\\\";throw new CA({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${t}${l}`})}let c=`0x${(r&&i<0?BigInt.asUintN(n*8,BigInt(i)):i).toString(16)}`;return n?Cm(c,n):c}function Q5(t,e={}){return ls(Rdt.encode(t),e)}function Cm(t,e){return hQ(t,{dir:\\\"left\\\",size:e})}function dp(t,e){return hQ(t,{dir:\\\"right\\\",size:e})}function Ci(t,e,r,n={}){let{strict:i}=n;e2e(t,e);let s=`0x${t.replace(\\\"0x\\\",\\\"\\\").slice((e??0)*2,(r??t.length)*2)}`;return i&&t2e(s,e,r),s}function _i(t){return Math.ceil((t.length-2)/2)}function wQ(t){return r2e(t,{dir:\\\"left\\\"})}function bQ(t,e={}){let{signed:r}=e;e.size&&W5(t,e.size);let n=BigInt(t);if(!r)return n;let i=(t.length-2)/2,s=(1n<<BigInt(i)*8n)-1n,o=s>>1n;return n<=o?n:n-s-1n}function Ek(t,e={}){let{signed:r,size:n}=e;return Number(!r&&!n?t:bQ(t,e))}function SA(t,e={}){let{strict:r=!1}=e;try{return Odt(t,{strict:r}),!0}catch{return!1}}var Rdt,Pdt,CA,_k,Ck,wk,EA,vk,io=x(()=>{u();Ic();mQ();_A();Rdt=new TextEncoder,Pdt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));CA=class extends $e{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number \\\\`${s}\\\\` is not in safe${i?` ${i*8}-bit`:\\\"\\\"}${n?\\\" signed\\\":\\\" unsigned\\\"} integer range ${e?`(\\\\`${r}\\\\` to \\\\`${e}\\\\`)`:`(above \\\\`${r}\\\\`)`}`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.IntegerOutOfRangeError\\\"})}},_k=class extends $e{constructor(e){super(`Value \\\\`${typeof e==\\\"object\\\"?uy(e):e}\\\\` of type \\\\`${typeof e}\\\\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `\\\"0x${string}\\\"`.']}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidHexTypeError\\\"})}},Ck=class extends $e{constructor(e){super(`Value \\\\`${e}\\\\` is an invalid hex value.`,{metaMessages:['Hex values must start with `\\\"0x\\\"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidHexValueError\\\"})}},wk=class extends $e{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed \\\\`${r}\\\\` bytes. Given size: \\\\`${e}\\\\` bytes.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SizeOverflowError\\\"})}},EA=class extends $e{constructor({offset:e,position:r,size:n}){super(`Slice ${r===\\\"start\\\"?\\\"starting\\\":\\\"ending\\\"} at offset \\\\`${e}\\\\` is out-of-bounds (size: \\\\`${n}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SliceOffsetOutOfBoundsError\\\"})}},vk=class extends $e{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\\\\`${e}\\\\`) exceeds padding size (\\\\`${r}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SizeExceedsPaddingSizeError\\\"})}}});function d2e(t){return{address:t.address,amount:Sr(t.amount),index:Sr(t.index),validatorIndex:Sr(t.validatorIndex)}}var f2e=x(()=>{u();io()});function Ak(t){return{...typeof t.baseFeePerGas==\\\"bigint\\\"&&{baseFeePerGas:Sr(t.baseFeePerGas)},...typeof t.blobBaseFee==\\\"bigint\\\"&&{blobBaseFee:Sr(t.blobBaseFee)},...typeof t.feeRecipient==\\\"string\\\"&&{feeRecipient:t.feeRecipient},...typeof t.gasLimit==\\\"bigint\\\"&&{gasLimit:Sr(t.gasLimit)},...typeof t.number==\\\"bigint\\\"&&{number:Sr(t.number)},...typeof t.prevRandao==\\\"bigint\\\"&&{prevRandao:Sr(t.prevRandao)},...typeof t.time==\\\"bigint\\\"&&{time:Sr(t.time)},...t.withdrawals&&{withdrawals:t.withdrawals.map(d2e)}}}var vQ=x(()=>{u();io();f2e()});var Wd,Tk,h2e,Ik,m2e,xQ,EQ,_Q,AA,CQ,fp=x(()=>{u();Wd=[{inputs:[{components:[{name:\\\"target\\\",type:\\\"address\\\"},{name:\\\"allowFailure\\\",type:\\\"bool\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"}],name:\\\"calls\\\",type:\\\"tuple[]\\\"}],name:\\\"aggregate3\\\",outputs:[{components:[{name:\\\"success\\\",type:\\\"bool\\\"},{name:\\\"returnData\\\",type:\\\"bytes\\\"}],name:\\\"returnData\\\",type:\\\"tuple[]\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"addr\\\",type:\\\"address\\\"}],name:\\\"getEthBalance\\\",outputs:[{name:\\\"balance\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"getCurrentBlockTimestamp\\\",outputs:[{internalType:\\\"uint256\\\",name:\\\"timestamp\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"}],Tk=[{name:\\\"query\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{type:\\\"tuple[]\\\",name:\\\"queries\\\",components:[{type:\\\"address\\\",name:\\\"sender\\\"},{type:\\\"string[]\\\",name:\\\"urls\\\"},{type:\\\"bytes\\\",name:\\\"data\\\"}]}],outputs:[{type:\\\"bool[]\\\",name:\\\"failures\\\"},{type:\\\"bytes[]\\\",name:\\\"responses\\\"}]},{name:\\\"HttpError\\\",type:\\\"error\\\",inputs:[{type:\\\"uint16\\\",name:\\\"status\\\"},{type:\\\"string\\\",name:\\\"message\\\"}]}],h2e=[{inputs:[{name:\\\"dns\\\",type:\\\"bytes\\\"}],name:\\\"DNSDecodingFailed\\\",type:\\\"error\\\"},{inputs:[{name:\\\"ens\\\",type:\\\"string\\\"}],name:\\\"DNSEncodingFailed\\\",type:\\\"error\\\"},{inputs:[],name:\\\"EmptyAddress\\\",type:\\\"error\\\"},{inputs:[{name:\\\"status\\\",type:\\\"uint16\\\"},{name:\\\"message\\\",type:\\\"string\\\"}],name:\\\"HttpError\\\",type:\\\"error\\\"},{inputs:[],name:\\\"InvalidBatchGatewayResponse\\\",type:\\\"error\\\"},{inputs:[{name:\\\"errorData\\\",type:\\\"bytes\\\"}],name:\\\"ResolverError\\\",type:\\\"error\\\"},{inputs:[{name:\\\"name\\\",type:\\\"bytes\\\"},{name:\\\"resolver\\\",type:\\\"address\\\"}],name:\\\"ResolverNotContract\\\",type:\\\"error\\\"},{inputs:[{name:\\\"name\\\",type:\\\"bytes\\\"}],name:\\\"ResolverNotFound\\\",type:\\\"error\\\"},{inputs:[{name:\\\"primary\\\",type:\\\"string\\\"},{name:\\\"primaryAddress\\\",type:\\\"bytes\\\"}],name:\\\"ReverseAddressMismatch\\\",type:\\\"error\\\"},{inputs:[{internalType:\\\"bytes4\\\",name:\\\"selector\\\",type:\\\"bytes4\\\"}],name:\\\"UnsupportedResolverProfile\\\",type:\\\"error\\\"}],Ik=[...h2e,{name:\\\"resolveWithGateways\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"name\\\",type:\\\"bytes\\\"},{name:\\\"data\\\",type:\\\"bytes\\\"},{name:\\\"gateways\\\",type:\\\"string[]\\\"}],outputs:[{name:\\\"\\\",type:\\\"bytes\\\"},{name:\\\"address\\\",type:\\\"address\\\"}]}],m2e=[...h2e,{name:\\\"reverseWithGateways\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{type:\\\"bytes\\\",name:\\\"reverseName\\\"},{type:\\\"uint256\\\",name:\\\"coinType\\\"},{type:\\\"string[]\\\",name:\\\"gateways\\\"}],outputs:[{type:\\\"string\\\",name:\\\"resolvedName\\\"},{type:\\\"address\\\",name:\\\"resolver\\\"},{type:\\\"address\\\",name:\\\"reverseResolver\\\"}]}],xQ=[{name:\\\"text\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"name\\\",type:\\\"bytes32\\\"},{name:\\\"key\\\",type:\\\"string\\\"}],outputs:[{name:\\\"\\\",type:\\\"string\\\"}]}],EQ=[{name:\\\"addr\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"name\\\",type:\\\"bytes32\\\"}],outputs:[{name:\\\"\\\",type:\\\"address\\\"}]},{name:\\\"addr\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"name\\\",type:\\\"bytes32\\\"},{name:\\\"coinType\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"bytes\\\"}]}],_Q=[{name:\\\"isValidSignature\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"hash\\\",type:\\\"bytes32\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],outputs:[{name:\\\"\\\",type:\\\"bytes4\\\"}]}],AA=[{inputs:[{name:\\\"_signer\\\",type:\\\"address\\\"},{name:\\\"_hash\\\",type:\\\"bytes32\\\"},{name:\\\"_signature\\\",type:\\\"bytes\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"constructor\\\"},{inputs:[{name:\\\"_signer\\\",type:\\\"address\\\"},{name:\\\"_hash\\\",type:\\\"bytes32\\\"},{name:\\\"_signature\\\",type:\\\"bytes\\\"}],outputs:[{type:\\\"bool\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\",name:\\\"isValidSig\\\"}],CQ=[{type:\\\"event\\\",name:\\\"Approval\\\",inputs:[{indexed:!0,name:\\\"owner\\\",type:\\\"address\\\"},{indexed:!0,name:\\\"spender\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"value\\\",type:\\\"uint256\\\"}]},{type:\\\"event\\\",name:\\\"Transfer\\\",inputs:[{indexed:!0,name:\\\"from\\\",type:\\\"address\\\"},{indexed:!0,name:\\\"to\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"value\\\",type:\\\"uint256\\\"}]},{type:\\\"function\\\",name:\\\"allowance\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"owner\\\",type:\\\"address\\\"},{name:\\\"spender\\\",type:\\\"address\\\"}],outputs:[{type:\\\"uint256\\\"}]},{type:\\\"function\\\",name:\\\"approve\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"spender\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[{type:\\\"bool\\\"}]},{type:\\\"function\\\",name:\\\"balanceOf\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],outputs:[{type:\\\"uint256\\\"}]},{type:\\\"function\\\",name:\\\"decimals\\\",stateMutability:\\\"view\\\",inputs:[],outputs:[{type:\\\"uint8\\\"}]},{type:\\\"function\\\",name:\\\"name\\\",stateMutability:\\\"view\\\",inputs:[],outputs:[{type:\\\"string\\\"}]},{type:\\\"function\\\",name:\\\"symbol\\\",stateMutability:\\\"view\\\",inputs:[],outputs:[{type:\\\"string\\\"}]},{type:\\\"function\\\",name:\\\"totalSupply\\\",stateMutability:\\\"view\\\",inputs:[],outputs:[{type:\\\"uint256\\\"}]},{type:\\\"function\\\",name:\\\"transfer\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"recipient\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[{type:\\\"bool\\\"}]},{type:\\\"function\\\",name:\\\"transferFrom\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"recipient\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[{type:\\\"bool\\\"}]}]});var g2e,y2e=x(()=>{u();g2e=\\\"0x82ad56cb\\\"});var Rk,b2e,w2e,J5,TA=x(()=>{u();Rk=\\\"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe\\\",b2e=\\\"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe\\\",w2e=\\\"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\\\",J5=\\\"0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033\\\"});var Ew,Pk,Ok,IA,Gd,_w=x(()=>{u();st();Ew=class extends W{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain \\\"${r.name}\\\" does not support contract \\\"${n.name}\\\".`,{metaMessages:[\\\"This could be due to any of the following:\\\",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract \\\"${n.name}\\\" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract \\\"${n.name}\\\" configured.`]],name:\\\"ChainDoesNotSupportContract\\\"})}},Pk=class extends W{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} \\\\u2013 ${e.name}).`,{metaMessages:[`Current Chain ID:  ${r}`,`Expected Chain ID: ${e.id} \\\\u2013 ${e.name}`],name:\\\"ChainMismatchError\\\"})}},Ok=class extends W{constructor(){super([\\\"No chain was provided to the request.\\\",\\\"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.\\\"].join(`\\n`),{name:\\\"ChainNotFoundError\\\"})}},IA=class extends W{constructor(){super(\\\"No chain was provided to the Client.\\\",{name:\\\"ClientChainNotConfiguredError\\\"})}},Gd=class extends W{constructor({chainId:e}){super(typeof e==\\\"number\\\"?`Chain ID \\\"${e}\\\" is invalid.`:\\\"Chain ID is invalid.\\\",{name:\\\"InvalidChainIdError\\\"})}}});function Cw(t){let{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;let i=e.find(o=>\\\"type\\\"in o&&o.type===\\\"constructor\\\");if(!i)throw new KO({docsPath:SQ});if(!(\\\"inputs\\\"in i))throw new kS({docsPath:SQ});if(!i.inputs||i.inputs.length===0)throw new kS({docsPath:SQ});let s=Vn(i.inputs,r);return ln([n,s])}var SQ,Nk=x(()=>{u();Ki();Ei();wu();SQ=\\\"/docs/contract/encodeDeployData\\\"});function Su({blockNumber:t,chain:e,contract:r}){let n=e?.contracts?.[r];if(!n)throw new Ew({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new Ew({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}var Sw=x(()=>{u();_w()});function Y5(t,{docsPath:e,...r}){let n=(()=>{let i=Yg(t,r);return i instanceof Eu?t:i})();return new h5(n,{docsPath:e,...r})}var kk=x(()=>{u();dm();cp();fA()});function X5(){let t=()=>{},e=()=>{};return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}}var Bk=x(()=>{u()});function Mk({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){let s=async()=>{let d=c();o();let f=d.map(({args:p})=>p);f.length!==0&&t(f).then(p=>{i&&Array.isArray(p)&&p.sort(i);for(let h=0;h<d.length;h++){let{resolve:m}=d[h];m?.([p[h],p])}}).catch(p=>{for(let h=0;h<d.length;h++){let{reject:m}=d[h];m?.(p)}})},o=()=>AQ.delete(e),a=()=>c().map(({args:d})=>d),c=()=>AQ.get(e)||[],l=d=>AQ.set(e,[...c(),d]);return{flush:o,async schedule(d){let{promise:f,resolve:p,reject:h}=X5();return r?.([...a(),d])&&s(),c().length>0?(l({args:d,resolve:p,reject:h}),f):(l({args:d,resolve:p,reject:h}),setTimeout(s,n),f)}}}var AQ,TQ=x(()=>{u();Bk();AQ=new Map});var Dk,Lk,Uk,v2e=x(()=>{u();ko();st();DN();Dk=class extends W{constructor({callbackSelector:e,cause:r,data:n,extraData:i,sender:s,urls:o}){super(r.shortMessage||\\\"An error occurred while fetching for an offchain result.\\\",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?\\\"\\\":[],\\\"Offchain Gateway Call:\\\",o&&[\\\"  Gateway URL(s):\\\",...o.map(a=>`    ${Xb(a)}`)],`  Sender: ${s}`,`  Data: ${n}`,`  Callback selector: ${e}`,`  Extra data: ${i}`].flat(),name:\\\"OffchainLookupError\\\"})}},Lk=class extends W{constructor({result:e,url:r}){super(\\\"Offchain gateway response is malformed. Response data must be a hex value.\\\",{metaMessages:[`Gateway URL: ${Xb(r)}`,`Response: ${qt(e)}`],name:\\\"OffchainLookupResponseMalformedError\\\"})}},Uk=class extends W{constructor({sender:e,to:r}){super(\\\"Reverted sender address does not match target contract address (`to`).\\\",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`],name:\\\"OffchainLookupSenderMismatchError\\\"})}}});function Aw(t){let{abi:e,data:r}=t,n=No(r,0,4),i=e.find(s=>s.type===\\\"function\\\"&&n===tp(js(s)));if(!i)throw new eN(n,{docsPath:\\\"/docs/contract/decodeFunctionData\\\"});return{functionName:i.name,args:\\\"inputs\\\"in i&&i.inputs&&i.inputs.length>0?Cc(i.inputs,No(r,4)):void 0}}var IQ=x(()=>{u();Ki();ep();n5();c5();em()});function PQ(t){let{abi:e,errorName:r,args:n}=t,i=e[0];if(r){let c=_c({abi:e,args:n,name:r});if(!c)throw new BS(r,{docsPath:RQ});i=c}if(i.type!==\\\"error\\\")throw new BS(void 0,{docsPath:RQ});let s=js(i),o=tp(s),a=\\\"0x\\\";if(n&&n.length>0){if(!i.inputs)throw new JO(i.name,{docsPath:RQ});a=Vn(i.inputs,n)}return ln([o,a])}var RQ,x2e=x(()=>{u();Ki();Ei();n5();wu();em();Ug();RQ=\\\"/docs/contract/encodeErrorResult\\\"});function E2e(t){let{abi:e,functionName:r,result:n}=t,i=e[0];if(r){let o=_c({abi:e,name:r});if(!o)throw new Od(r,{docsPath:OQ});i=o}if(i.type!==\\\"function\\\")throw new Od(void 0,{docsPath:OQ});if(!i.outputs)throw new YE(i.name,{docsPath:OQ});let s=(()=>{if(i.outputs.length===0)return[];if(i.outputs.length===1)return[n];if(Array.isArray(n))return n;throw new e5(n)})();return Vn(i.outputs,s)}var OQ,_2e=x(()=>{u();Ki();wu();Ug();OQ=\\\"/docs/contract/encodeFunctionResult\\\"});async function NQ(t){let{data:e,ccipRequest:r}=t,{args:[n]}=Aw({abi:Tk,data:e}),i=[],s=[];return await Promise.all(n.map(async(o,a)=>{try{s[a]=o.urls.includes(Sm)?await NQ({data:o.data,ccipRequest:r}):await r(o),i[a]=!1}catch(c){i[a]=!0,s[a]=kdt(c)}})),E2e({abi:Tk,functionName:\\\"query\\\",result:[i,s]})}function kdt(t){return t.name===\\\"HttpRequestError\\\"&&t.status?PQ({abi:Tk,errorName:\\\"HttpError\\\",args:[t.status,t.shortMessage]}):PQ({abi:[EN],errorName:\\\"Error\\\",args:[\\\"shortMessage\\\"in t?t.shortMessage:t.message]})}var Sm,RA=x(()=>{u();fp();_N();IQ();x2e();_2e();Sm=\\\"x-batch-gateway:true\\\"});var A2e={};ue(A2e,{ccipRequest:()=>S2e,offchainLookup:()=>Mdt,offchainLookupAbiItem:()=>C2e,offchainLookupSignature:()=>Bdt});async function Mdt(t,{blockNumber:e,blockTag:r,data:n,to:i}){let{args:s}=l5({data:n,abi:[C2e]}),[o,a,c,l,d]=s,{ccipRead:f}=t,p=f&&typeof f?.request==\\\"function\\\"?f.request:S2e;try{if(!ha(i,o))throw new Uk({sender:o,to:i});let h=a.includes(Sm)?await NQ({data:c,ccipRequest:p}):await p({data:c,sender:o,urls:a}),{data:m}=await Au(t,{blockNumber:e,blockTag:r,data:Jt([l,Vn([{type:\\\"bytes\\\"},{type:\\\"bytes\\\"}],[h,d])]),to:i});return m}catch(h){throw new Dk({callbackSelector:l,cause:h,data:n,extraData:d,sender:o,urls:a})}}async function S2e({data:t,sender:e,urls:r}){let n=new Error(\\\"An unknown error occurred.\\\");for(let i=0;i<r.length;i++){let s=r[i],o=s.includes(\\\"{data}\\\")?\\\"GET\\\":\\\"POST\\\",a=o===\\\"POST\\\"?{data:t,sender:e}:void 0,c=o===\\\"POST\\\"?{\\\"Content-Type\\\":\\\"application/json\\\"}:{};try{let l=await fetch(s.replace(\\\"{sender}\\\",e.toLowerCase()).replace(\\\"{data}\\\",t),{body:JSON.stringify(a),headers:c,method:o}),d;if(l.headers.get(\\\"Content-Type\\\")?.startsWith(\\\"application/json\\\")?d=(await l.json()).data:d=await l.text(),!l.ok){n=new vu({body:a,details:d?.error?qt(d.error):l.statusText,headers:l.headers,status:l.status,url:s});continue}if(!Ur(d)){n=new Lk({result:d,url:s});continue}return d}catch(l){n=new vu({body:a,details:l.message,url:s})}}throw n}var Bdt,C2e,T2e=x(()=>{u();Tw();v2e();ew();AN();wu();cy();Ei();gu();RA();ko();Bdt=\\\"0x556f1830\\\",C2e={name:\\\"OffchainLookup\\\",type:\\\"error\\\",inputs:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"urls\\\",type:\\\"string[]\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callbackFunction\\\",type:\\\"bytes4\\\"},{name:\\\"extraData\\\",type:\\\"bytes\\\"}]}});async function Au(t,e){let{account:r=t.account,authorizationList:n,batch:i=!!t.batch?.multicall,blockNumber:s,blockTag:o=t.experimental_blockTag??\\\"latest\\\",accessList:a,blobs:c,blockOverrides:l,code:d,data:f,factory:p,factoryData:h,gas:m,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:b,nonce:_,to:S,value:T,stateOverride:N,...O}=e,L=r?Ze(r):void 0;if(d&&(p||h))throw new W(\\\"Cannot provide both `code` & `factory`/`factoryData` as parameters.\\\");if(d&&S)throw new W(\\\"Cannot provide both `code` & `to` as parameters.\\\");let B=d&&f,H=p&&h&&S&&f,M=B||H,F=B?I2e({code:d,data:f}):H?Udt({data:f,factory:p,factoryData:h,to:S}):f;try{xs(e);let y=(typeof s==\\\"bigint\\\"?Z(s):void 0)||o,E=l?Ak(l):void 0,C=ty(N),I=t.chain?.formatters?.transactionRequest?.format,k=(I||Hs)({...Tc(O,{format:I}),accessList:a,account:L,authorizationList:n,blobs:c,data:F,gas:m,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:b,nonce:_,to:M?void 0:S,value:T},\\\"call\\\");if(i&&Ddt({request:k})&&!C&&!E)try{return await Ldt(t,{...k,blockNumber:s,blockTag:o})}catch(A){if(!(A instanceof IA)&&!(A instanceof Ew))throw A}let U=(()=>{let A=[k,y];return C&&E?[...A,C,E]:C?[...A,C]:E?[...A,{},E]:A})(),D=await t.request({method:\\\"eth_call\\\",params:U});return D===\\\"0x\\\"?{data:void 0}:{data:D}}catch(R){let y=Fdt(R),{offchainLookup:E,offchainLookupSignature:C}=await Promise.resolve().then(()=>(T2e(),A2e));if(t.ccipRead!==!1&&y?.slice(0,10)===C&&S)return{data:await E(t,{data:y,to:S})};throw M&&y?.slice(0,10)===\\\"0x101bb98d\\\"?new LN({factory:p}):Y5(R,{...e,account:L,chain:t.chain})}}function Ddt({request:t}){let{data:e,to:r,...n}=t;return!(!e||e.startsWith(g2e)||!r||Object.values(n).filter(i=>typeof i<\\\"u\\\").length>0)}async function Ldt(t,e){let{batchSize:r=1024,deployless:n=!1,wait:i=0}=typeof t.batch?.multicall==\\\"object\\\"?t.batch.multicall:{},{blockNumber:s,blockTag:o=t.experimental_blockTag??\\\"latest\\\",data:a,to:c}=e,l=(()=>{if(n)return null;if(e.multicallAddress)return e.multicallAddress;if(t.chain)return Su({blockNumber:s,chain:t.chain,contract:\\\"multicall3\\\"});throw new IA})(),f=(typeof s==\\\"bigint\\\"?Z(s):void 0)||o,{schedule:p}=Mk({id:`${t.uid}.${f}`,wait:i,shouldSplitBatch(g){return g.reduce((v,{data:b})=>v+(b.length-2),0)>r*2},fn:async g=>{let w=g.map(_=>({allowFailure:!0,callData:_.data,target:_.to})),v=At({abi:Wd,args:[w],functionName:\\\"aggregate3\\\"}),b=await t.request({method:\\\"eth_call\\\",params:[{...l===null?{data:I2e({code:J5,data:v})}:{to:l,data:v}},f]});return ma({abi:Wd,args:[w],functionName:\\\"aggregate3\\\",data:b||\\\"0x\\\"})}}),[{returnData:h,success:m}]=await p({data:a,to:c});if(!m)throw new ip({data:h});return h===\\\"0x\\\"?{data:void 0}:{data:h}}function I2e(t){let{code:e,data:r}=t;return Cw({abi:GE([\\\"constructor(bytes, bytes)\\\"]),bytecode:Rk,args:[e,r]})}function Udt(t){let{data:e,factory:r,factoryData:n,to:i}=t;return Cw({abi:GE([\\\"constructor(address, bytes, address, bytes)\\\"]),bytecode:b2e,args:[i,e,r,n]})}function Fdt(t){if(!(t instanceof W))return;let e=t.walk();return typeof e?.data==\\\"object\\\"?e.data?.data:e.data}var Tw=x(()=>{u();KE();vQ();en();fp();y2e();TA();st();_w();dm();Em();Nk();fa();Sw();qe();kk();Xg();_u();TQ();hA();qd()});async function Tn(t,e){let{abi:r,address:n,args:i,functionName:s,...o}=e,a=At({abi:r,args:i,functionName:s});try{let{data:c}=await ae(t,Au,\\\"call\\\")({...o,data:a,to:n});return ma({abi:r,args:i,functionName:s,data:c||\\\"0x\\\"})}catch(c){throw xl(c,{abi:r,address:n,args:i,docsPath:\\\"/docs/contract/readContract\\\",functionName:s})}}var Tu=x(()=>{u();Em();fa();gw();Ut();Tw()});async function R2e(t,e){let{abi:r,address:n,args:i,functionName:s,dataSuffix:o=typeof t.dataSuffix==\\\"string\\\"?t.dataSuffix:t.dataSuffix?.value,...a}=e,c=a.account?Ze(a.account):t.account,l=At({abi:r,args:i,functionName:s});try{let{data:d}=await ae(t,Au,\\\"call\\\")({batch:!1,data:`${l}${o?o.replace(\\\"0x\\\",\\\"\\\"):\\\"\\\"}`,to:n,...a,account:c}),f=ma({abi:r,args:i,functionName:s,data:d||\\\"0x\\\"}),p=r.filter(h=>\\\"name\\\"in h&&h.name===e.functionName);return{result:f,request:{abi:p,address:n,args:i,dataSuffix:o,functionName:s,...a,account:c}}}catch(d){throw xl(d,{abi:r,address:n,args:i,docsPath:\\\"/docs/contract/simulateContract\\\",functionName:s,sender:c?.address})}}var P2e=x(()=>{u();en();Em();fa();gw();Ut();Tw()});function so(t,e,r){let n=++jdt,i=()=>kQ.get(t)||[],s=()=>{let d=i();kQ.set(t,d.filter(f=>f.id!==n))},o=()=>{let d=i();if(!d.some(p=>p.id===n))return;let f=O2e.get(t);if(d.length===1&&f){let p=f();p instanceof Promise&&p.catch(()=>{})}s()},a=i();if(kQ.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;let c={};for(let d in e)c[d]=((...f)=>{let p=i();if(p.length!==0)for(let h of p)h.fns[d]?.(...f)});let l=r(c);return typeof l==\\\"function\\\"&&O2e.set(t,l),o}var kQ,O2e,jdt,Am=x(()=>{u();kQ=new Map,O2e=new Map,jdt=0});async function Iw(t){return new Promise(e=>setTimeout(e,t))}var Fk=x(()=>{u()});function Rc(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0,s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));let c=await r?.(a)??n;await Iw(c);let l=async()=>{i&&(await t({unpoll:s}),await Iw(n),l())};l()})(),s}var dy=x(()=>{u();Fk()});function N2e(t){let e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),r=e(t,Hdt),n=e(t,qdt);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function k2e(t,{cacheKey:e,cacheTime:r=Number.POSITIVE_INFINITY}){let n=N2e(e),i=n.response.get();if(i&&r>0&&Date.now()-i.created.getTime()<r)return i.data;let s=n.promise.get();s||(s=t(),n.promise.set(s));try{let o=await s;return n.response.set({created:new Date,data:o}),o}finally{n.promise.clear()}}var Hdt,qdt,B2e=x(()=>{u();Hdt=new Map,qdt=new Map});async function pp(t,{cacheTime:e=t.cacheTime}={}){let r=await k2e(()=>t.request({method:\\\"eth_blockNumber\\\"}),{cacheKey:zdt(t.uid),cacheTime:e});return BigInt(r)}var zdt,e6=x(()=>{u();B2e();zdt=t=>`blockNumber.${t}`});async function fy(t,{filter:e}){let r=\\\"strict\\\"in e&&e.strict,n=await e.request({method:\\\"eth_getFilterChanges\\\",params:[e.id]});if(typeof n[0]==\\\"string\\\")return n;let i=n.map(s=>Qi(s));return!(\\\"abi\\\"in e)||!e.abi?i:z5({abi:e.abi,logs:i,strict:r})}var PA=x(()=>{u();hk();Vd()});async function py(t,{filter:e}){return e.request({method:\\\"eth_uninstallFilter\\\",params:[e.id]})}var OA=x(()=>{u()});function M2e(t,e){let{abi:r,address:n,args:i,batch:s=!0,eventName:o,fromBlock:a,onError:c,onLogs:l,poll:d,pollingInterval:f=t.pollingInterval,strict:p}=e;return(typeof d<\\\"u\\\"?d:typeof a==\\\"bigint\\\"?!0:!(t.transport.type===\\\"webSocket\\\"||t.transport.type===\\\"ipc\\\"||t.transport.type===\\\"fallback\\\"&&(t.transport.transports[0].config.type===\\\"webSocket\\\"||t.transport.transports[0].config.type===\\\"ipc\\\")))?(()=>{let w=p??!1,v=qt([\\\"watchContractEvent\\\",n,i,s,t.uid,o,f,w,a]);return so(v,{onLogs:l,onError:c},b=>{let _;a!==void 0&&(_=a-1n);let S,T=!1,N=Rc(async()=>{if(!T){try{S=await ae(t,xN,\\\"createContractEventFilter\\\")({abi:r,address:n,args:i,eventName:o,strict:w,fromBlock:a})}catch{}T=!0;return}try{let O;if(S)O=await ae(t,fy,\\\"getFilterChanges\\\")({filter:S});else{let L=await ae(t,pp,\\\"getBlockNumber\\\")({});_&&_<L?O=await ae(t,gk,\\\"getContractEvents\\\")({abi:r,address:n,args:i,eventName:o,fromBlock:_+1n,toBlock:L,strict:w}):O=[],_=L}if(O.length===0)return;if(s)b.onLogs(O);else for(let L of O)b.onLogs([L])}catch(O){S&&O instanceof vl&&(T=!1),b.onError?.(O)}},{emitOnBegin:!0,interval:f});return async()=>{S&&await ae(t,py,\\\"uninstallFilter\\\")({filter:S}),N()}})})():(()=>{let w=p??!1,v=qt([\\\"watchContractEvent\\\",n,i,s,t.uid,o,f,w]),b=!0,_=()=>b=!1;return so(v,{onLogs:l,onError:c},S=>((async()=>{try{let T=(()=>{if(t.transport.type===\\\"fallback\\\"){let L=t.transport.transports.find(B=>B.config.type===\\\"webSocket\\\"||B.config.type===\\\"ipc\\\");return L?L.value:t.transport}return t.transport})(),N=o?rp({abi:r,eventName:o,args:i}):[],{unsubscribe:O}=await T.subscribe({params:[\\\"logs\\\",{address:n,topics:N}],onData(L){if(!b)return;let B=L.result;try{let{eventName:H,args:M}=vw({abi:r,data:B.data,topics:B.topics,strict:p}),F=Qi(B,{args:M,eventName:H});S.onLogs([F])}catch(H){let M,F;if(H instanceof tm||H instanceof Pg){if(p)return;M=H.abiItem.name,F=H.abiItem.inputs?.some(y=>!(\\\"name\\\"in y&&y.name))}let R=Qi(B,{args:F?[]:{},eventName:M});S.onLogs([R])}},onError(L){S.onError?.(L)}});_=O,b||_()}catch(T){c?.(T)}})(),()=>_()))})()}var D2e=x(()=>{u();Ki();$g();pk();i5();Vd();Ut();Am();dy();ko();wZ();e6();uQ();PA();OA()});var In,Iu,Cl=x(()=>{u();st();In=class extends W{constructor({docsPath:e}={}){super([\\\"Could not find an Account to execute with this Action.\\\",\\\"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.\\\"].join(`\\n`),{docsPath:e,docsSlug:\\\"account\\\",name:\\\"AccountNotFoundError\\\"})}},Iu=class extends W{constructor({docsPath:e,metaMessages:r,type:n}){super(`Account type \\\"${n}\\\" is not supported.`,{docsPath:e,metaMessages:r,name:\\\"AccountTypeNotSupportedError\\\"})}}});function t6({chain:t,currentChainId:e}){if(!t)throw new Ok;if(e!==t.id)throw new Pk({chain:t,currentChainId:e})}var jk=x(()=>{u();_w()});async function r6(t,{serializedTransaction:e}){return t.request({method:\\\"eth_sendRawTransaction\\\",params:[e]},{retryCount:0})}var Hk=x(()=>{u()});async function hy(t,e){let{account:r=t.account,assertChainId:n=!0,chain:i=t.chain,accessList:s,authorizationList:o,blobs:a,data:c,dataSuffix:l=typeof t.dataSuffix==\\\"string\\\"?t.dataSuffix:t.dataSuffix?.value,gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,type:w,value:v,...b}=e;if(typeof r>\\\"u\\\")throw new In({docsPath:\\\"/docs/actions/wallet/sendTransaction\\\"});let _=r?Ze(r):null;try{xs(e);let S=await(async()=>{if(e.to)return e.to;if(e.to!==null&&o&&o.length>0)return await Jg({authorization:o[0]}).catch(()=>{throw new W(\\\"`to` is required. Could not infer from `authorizationList`.\\\")})})();if(_?.type===\\\"json-rpc\\\"||_===null){let T;i!==null&&(T=await ae(t,Es,\\\"getChainId\\\")({}),n&&t6({currentChainId:T,chain:i}));let N=t.chain?.formatters?.transactionRequest?.format,L=(N||Hs)({...Tc(b,{format:N}),accessList:s,account:_,authorizationList:o,blobs:a,chainId:T,data:l?Jt([c??\\\"0x\\\",l]):c,gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,to:S,type:w,value:v},\\\"sendTransaction\\\"),B=BQ.get(t.uid),H=B?\\\"wallet_sendTransaction\\\":\\\"eth_sendTransaction\\\";try{return await t.request({method:H,params:[L]},{retryCount:0})}catch(M){if(B===!1)throw M;let F=M;if(F.name===\\\"InvalidInputRpcError\\\"||F.name===\\\"InvalidParamsRpcError\\\"||F.name===\\\"MethodNotFoundRpcError\\\"||F.name===\\\"MethodNotSupportedRpcError\\\")return await t.request({method:\\\"wallet_sendTransaction\\\",params:[L]},{retryCount:0}).then(R=>(BQ.set(t.uid,!0),R)).catch(R=>{let y=R;throw y.name===\\\"MethodNotFoundRpcError\\\"||y.name===\\\"MethodNotSupportedRpcError\\\"?(BQ.set(t.uid,!1),F):y});throw F}}if(_?.type===\\\"local\\\"){let T=await ae(t,lp,\\\"prepareTransactionRequest\\\")({account:_,accessList:s,authorizationList:o,blobs:a,chain:i,data:l?Jt([c??\\\"0x\\\",l]):c,gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,nonceManager:_.nonceManager,parameters:[...vA,\\\"sidecars\\\"],type:w,value:v,...b,to:S}),N=i?.serializers?.transaction,O=await _.signTransaction(T,{serializer:N});return await ae(t,r6,\\\"sendRawTransaction\\\")({serializedTransaction:O})}throw _?.type===\\\"smart\\\"?new Iu({metaMessages:[\\\"Consider using the `sendUserOperation` Action instead.\\\"],docsPath:\\\"/docs/actions/bundler/sendUserOperation\\\",type:\\\"smart\\\"}):new Iu({docsPath:\\\"/docs/actions/wallet/sendTransaction\\\",type:_?.type})}catch(S){throw S instanceof Iu?S:ay(S,{...e,account:_,chain:e.chain||void 0})}}var BQ,NA=x(()=>{u();en();Cl();st();dA();jk();Ei();wA();Xg();_u();Ut();Lg();qd();$d();H5();Hk();BQ=new ua(128)});async function Rw(t,e){return Rw.internal(t,hy,\\\"sendTransaction\\\",e)}var MQ=x(()=>{u();en();Cl();fa();gw();Ut();NA();(function(t){async function e(r,n,i,s){let{abi:o,account:a=r.account,address:c,args:l,functionName:d,...f}=s;if(typeof a>\\\"u\\\")throw new In({docsPath:\\\"/docs/contract/writeContract\\\"});let p=a?Ze(a):null,h=At({abi:o,args:l,functionName:d});try{return await ae(r,n,i)({data:h,to:c,account:p,...f})}catch(m){throw xl(m,{abi:o,address:c,args:l,docsPath:\\\"/docs/contract/writeContract\\\",functionName:d,sender:p?.address})}}t.internal=e})(Rw||(Rw={}))});var qk,L2e=x(()=>{u();st();qk=class extends W{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:\\\"BundleFailedError\\\"}),Object.defineProperty(this,\\\"result\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}});function hp(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{let o=async({count:a=0}={})=>{let c=async({error:l})=>{let d=typeof e==\\\"function\\\"?e({count:a,error:l}):e;d&&await Iw(d),o({count:a+1})};try{let l=await t();i(l)}catch(l){if(a<r&&await n({count:a,error:l}))return c({error:l});s(l)}};o()})}var kA=x(()=>{u();Fk()});function Pw(t,e){let r={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(n=>Qi(n)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?jr(t.transactionIndex):null,status:t.status?DQ[t.status]:null,type:t.type?eQ[t.type]||t.type:null};return t.blobGasPrice&&(r.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(r.blobGasUsed=BigInt(t.blobGasUsed)),r}var DQ,zk,Ow=x(()=>{u();xi();pA();Vd();iy();DQ={\\\"0x0\\\":\\\"reverted\\\",\\\"0x1\\\":\\\"success\\\"};zk=ey(\\\"transactionReceipt\\\",Pw)});async function $k(t,e){let{account:r=t.account,chain:n=t.chain,experimental_fallback:i,experimental_fallbackDelay:s=32,forceAtomic:o=!1,id:a,version:c=\\\"2.0.0\\\"}=e,l=r?Ze(r):null,d=e.capabilities;t.dataSuffix&&!e.capabilities?.dataSuffix&&(typeof t.dataSuffix==\\\"string\\\"?d={...e.capabilities,dataSuffix:{value:t.dataSuffix,optional:!0}}:d={...e.capabilities,dataSuffix:{value:t.dataSuffix.value,...t.dataSuffix.required?{}:{optional:!0}}});let f=e.calls.map(p=>{let h=p,m=h.abi?At({abi:h.abi,functionName:h.functionName,args:h.args}):h.data;return{data:h.dataSuffix&&m?Jt([m,h.dataSuffix]):m,to:h.to,value:h.value?Z(h.value):void 0}});try{let p=await t.request({method:\\\"wallet_sendCalls\\\",params:[{atomicRequired:o,calls:f,capabilities:d,chainId:Z(n.id),from:l?.address,id:a,version:c}]},{retryCount:0});return typeof p==\\\"string\\\"?{id:p}:p}catch(p){let h=p;if(i&&(h.name===\\\"MethodNotFoundRpcError\\\"||h.name===\\\"MethodNotSupportedRpcError\\\"||h.name===\\\"UnknownRpcError\\\"||h.details.toLowerCase().includes(\\\"does not exist / is not available\\\")||h.details.toLowerCase().includes(\\\"missing or invalid. request()\\\")||h.details.toLowerCase().includes(\\\"did not match any variant of untagged enum\\\")||h.details.toLowerCase().includes(\\\"account upgraded to unsupported contract\\\")||h.details.toLowerCase().includes(\\\"eip-7702 not supported\\\")||h.details.toLowerCase().includes(\\\"unsupported wc_ method\\\")||h.details.toLowerCase().includes(\\\"feature toggled misconfigured\\\")||h.details.toLowerCase().includes(\\\"jsonrpcengine: response has no error or result for request\\\"))){if(d&&Object.values(d).some(b=>!b.optional)){let b=\\\"non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.\\\";throw new hm(new W(b,{details:b}))}if(o&&f.length>1){let v=\\\"`forceAtomic` is not supported on fallback to `eth_sendTransaction`.\\\";throw new mm(new W(v,{details:v}))}let m=[];for(let v of f){let b=hy(t,{account:l,chain:n,data:v.data,to:v.to,value:v.value?Ge(v.value):void 0});m.push(b),s>0&&await new Promise(_=>setTimeout(_,s))}let g=await Promise.allSettled(m);if(g.every(v=>v.status===\\\"rejected\\\"))throw g[0].reason;let w=g.map(v=>v.status===\\\"fulfilled\\\"?v.value:UQ);return{id:Jt([...w,Z(n.id,{size:32}),LQ])}}throw ay(p,{...e,account:l,chain:e.chain})}}var LQ,UQ,Vk=x(()=>{u();en();st();$g();fa();Ei();xi();qe();wA();NA();LQ=\\\"0x5792579257925792579257925792579257925792579257925792579257925792\\\",UQ=Z(0,{size:32})});async function Wk(t,e){async function r(d){if(d.endsWith(LQ.slice(2))){let p=An(WS(d,-64,-32)),h=WS(d,0,-64).slice(2).match(/.{1,64}/g),m=await Promise.all(h.map(w=>UQ.slice(2)!==w?t.request({method:\\\"eth_getTransactionReceipt\\\",params:[`0x${w}`]},{dedupe:!0}):void 0)),g=m.some(w=>w===null)?100:m.every(w=>w?.status===\\\"0x1\\\")?200:m.every(w=>w?.status===\\\"0x0\\\")?500:600;return{atomic:!1,chainId:jr(p),receipts:m.filter(Boolean),status:g,version:\\\"2.0.0\\\"}}return t.request({method:\\\"wallet_getCallsStatus\\\",params:[d]})}let{atomic:n=!1,chainId:i,receipts:s,version:o=\\\"2.0.0\\\",...a}=await r(e.id),[c,l]=(()=>{let d=a.status;return d>=100&&d<200?[\\\"pending\\\",d]:d>=200&&d<300?[\\\"success\\\",d]:d>=300&&d<700?[\\\"failure\\\",d]:d===\\\"CONFIRMED\\\"?[\\\"success\\\",200]:d===\\\"PENDING\\\"?[\\\"pending\\\",100]:[void 0,d]})();return{...a,atomic:n,chainId:i?jr(i):void 0,receipts:s?.map(d=>({...d,blockNumber:Ge(d.blockNumber),gasUsed:Ge(d.gasUsed),status:DQ[d.status]}))??[],statusCode:l,status:c,version:o}}var FQ=x(()=>{u();ep();nm();xi();Ow();Vk()});async function Tm(t,e){let{id:r,pollingInterval:n=t.pollingInterval,status:i=({statusCode:g})=>g===200||g>=300,retryCount:s=4,retryDelay:o=({count:g})=>~~(1<<g)*200,timeout:a=6e4,throwOnFailure:c=!1}=e,l=qt([\\\"waitForCallsStatus\\\",t.uid,r]),{promise:d,resolve:f,reject:p}=X5(),h,m=so(l,{resolve:f,reject:p},g=>{let w=Rc(async()=>{let v=b=>{clearTimeout(h),w(),b(),m()};try{let b=await hp(async()=>{let _=await ae(t,Wk,\\\"getCallsStatus\\\")({id:r});if(c&&_.status===\\\"failure\\\")throw new qk(_);return _},{retryCount:s,delay:o});if(!i(b))return;v(()=>g.resolve(b))}catch(b){v(()=>g.reject(b))}},{interval:n,emitOnBegin:!0});return w});return h=a?setTimeout(()=>{m(),clearTimeout(h),p(new jQ({id:r}))},a):void 0,await d}var jQ,Gk=x(()=>{u();st();L2e();Ut();Am();dy();Bk();kA();ko();FQ();jQ=class extends W{constructor({id:e}){super(`Timed out while waiting for call bundle with id \\\"${e}\\\" to be confirmed.`,{name:\\\"WaitForCallsStatusTimeoutError\\\"})}}});function Qk(t=11){if(!Zk||Kk+t>256*2){Zk=\\\"\\\",Kk=0;for(let e=0;e<256;e++)Zk+=(256+Math.random()*256|0).toString(16).substring(1)}return Zk.substring(Kk,Kk+++t)}var Kk,Zk,HQ=x(()=>{u();Kk=256});function Im(t){let{batch:e,chain:r,ccipRead:n,dataSuffix:i,key:s=\\\"base\\\",name:o=\\\"Base Client\\\",type:a=\\\"base\\\"}=t,c=t.experimental_blockTag??(typeof r?.experimental_preconfirmationTime==\\\"number\\\"?\\\"pending\\\":void 0),l=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(l/2),500),4e3),f=t.pollingInterval??d,p=t.cacheTime??f,h=t.account?Ze(t.account):void 0,{config:m,request:g,value:w}=t.transport({account:h,chain:r,pollingInterval:f}),v={...m,...w},b={account:h,batch:e,cacheTime:p,ccipRead:n,chain:r,dataSuffix:i,key:s,name:o,pollingInterval:f,request:g,transport:v,type:a,uid:Qk(),...c?{experimental_blockTag:c}:{}};function _(S){return T=>{let N=T(S);for(let L in b)delete N[L];let O={...S,...N};return Object.assign(O,{extend:_(O)})}}return Object.assign(b,{extend:_(b)})}var Jk=x(()=>{u();en();HQ()});function n6(t){if(!(t instanceof W))return!1;let e=t.walk(r=>r instanceof um);return e instanceof um?e.data?.errorName===\\\"HttpError\\\"||e.data?.errorName===\\\"ResolverError\\\"||e.data?.errorName===\\\"ResolverNotContract\\\"||e.data?.errorName===\\\"ResolverNotFound\\\"||e.data?.errorName===\\\"ReverseAddressMismatch\\\"||e.data?.errorName===\\\"UnsupportedResolverProfile\\\":!1}var Yk=x(()=>{u();st();dm()});function Xk(t){if(t.length!==66||t.indexOf(\\\"[\\\")!==0||t.indexOf(\\\"]\\\")!==65)return null;let e=`0x${t.slice(1,65)}`;return Ur(e)?e:null}var qQ=x(()=>{u();gu()});function BA(t){let e=new Uint8Array(32).fill(0);if(!t)return er(e);let r=t.split(\\\".\\\");for(let n=r.length-1;n>=0;n-=1){let i=Xk(r[n]),s=i?Oo(i):Ft(Ua(r[n]),\\\"bytes\\\");e=Ft(Jt([e,s]),\\\"bytes\\\")}return er(e)}var zQ=x(()=>{u();Ei();Zi();qe();yl();qQ()});function U2e(t){return`[${t.slice(2)}]`}var F2e=x(()=>{u()});function j2e(t){let e=new Uint8Array(32).fill(0);return t?Xk(t)||Ft(Ua(t)):er(e)}var H2e=x(()=>{u();Zi();qe();yl();qQ()});function i6(t){let e=t.replace(/^\\\\.|\\\\.$/gm,\\\"\\\");if(e.length===0)return new Uint8Array(1);let r=new Uint8Array(Ua(e).byteLength+2),n=0,i=e.split(\\\".\\\");for(let s=0;s<i.length;s++){let o=Ua(i[s]);o.byteLength>255&&(o=Ua(U2e(j2e(i[s])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var eB=x(()=>{u();Zi();F2e();H2e()});async function q2e(t,e){let{blockNumber:r,blockTag:n,coinType:i,name:s,gatewayUrls:o,strict:a}=e,{chain:c}=t,l=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!c)throw new Error(\\\"client chain not configured. universalResolverAddress is required.\\\");return Su({blockNumber:r,chain:c,contract:\\\"ensUniversalResolver\\\"})})(),d=c?.ensTlds;if(d&&!d.some(p=>s.endsWith(p)))return null;let f=i!=null?[BA(s),BigInt(i)]:[BA(s)];try{let p=At({abi:EQ,functionName:\\\"addr\\\",args:f}),h={address:l,abi:Ik,functionName:\\\"resolveWithGateways\\\",args:[He(i6(s)),p,o??[Sm]],blockNumber:r,blockTag:n},g=await ae(t,Tn,\\\"readContract\\\")(h);if(g[0]===\\\"0x\\\")return null;let w=ma({abi:EQ,args:f,functionName:\\\"addr\\\",data:g[0]});return w===\\\"0x\\\"||An(w)===\\\"0x00\\\"?null:w}catch(p){if(a)throw p;if(n6(p))return null;throw p}}var z2e=x(()=>{u();fp();Em();fa();Sw();nm();qe();Yk();RA();zQ();eB();Ut();Tu()});var tB,my,s6,rB,$2e=x(()=>{u();st();tB=class extends W{constructor({data:e}){super(\\\"Unable to extract image from metadata. The metadata may be malformed or invalid.\\\",{metaMessages:[\\\"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.\\\",\\\"\\\",`Provided data: ${JSON.stringify(e)}`],name:\\\"EnsAvatarInvalidMetadataError\\\"})}},my=class extends W{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:\\\"EnsAvatarInvalidNftUriError\\\"})}},s6=class extends W{constructor({uri:e}){super(`Unable to resolve ENS avatar URI \\\"${e}\\\". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:\\\"EnsAvatarUriResolutionError\\\"})}},rB=class extends W{constructor({namespace:e}){super(`ENS NFT avatar namespace \\\"${e}\\\" is not supported. Must be \\\"erc721\\\" or \\\"erc1155\\\".`,{name:\\\"EnsAvatarUnsupportedNamespaceError\\\"})}}});async function Kdt(t){try{let e=await fetch(t,{method:\\\"HEAD\\\"});return e.status===200?e.headers.get(\\\"content-type\\\")?.startsWith(\\\"image/\\\"):!1}catch(e){return typeof e==\\\"object\\\"&&typeof e.response<\\\"u\\\"||!Object.hasOwn(globalThis,\\\"Image\\\")?!1:new Promise(r=>{let n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function V2e(t,e){return t?t.endsWith(\\\"/\\\")?t.slice(0,-1):t:e}function $Q({uri:t,gatewayUrls:e}){let r=Wdt.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};let n=V2e(e?.ipfs,\\\"https://ipfs.io\\\"),i=V2e(e?.arweave,\\\"https://arweave.net\\\"),s=t.match($dt),{protocol:o,subpath:a,target:c,subtarget:l=\\\"\\\"}=s?.groups||{},d=o===\\\"ipns:/\\\"||a===\\\"ipns/\\\",f=o===\\\"ipfs:/\\\"||a===\\\"ipfs/\\\"||Vdt.test(t);if(t.startsWith(\\\"http\\\")&&!d&&!f){let h=t;return e?.arweave&&(h=t.replace(/https:\\\\/\\\\/arweave.net/g,e?.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((d||f)&&c)return{uri:`${n}/${d?\\\"ipns\\\":\\\"ipfs\\\"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o===\\\"ar:/\\\"&&c)return{uri:`${i}/${c}${l||\\\"\\\"}`,isOnChain:!1,isEncoded:!1};let p=t.replace(Gdt,\\\"\\\");if(p.startsWith(\\\"<svg\\\")&&(p=`data:image/svg+xml;base64,${btoa(p)}`),p.startsWith(\\\"data:\\\")||p.startsWith(\\\"{\\\"))return{uri:p,isOnChain:!0,isEncoded:!1};throw new s6({uri:t})}function VQ(t){if(typeof t!=\\\"object\\\"||!(\\\"image\\\"in t)&&!(\\\"image_url\\\"in t)&&!(\\\"image_data\\\"in t))throw new tB({data:t});return t.image||t.image_url||t.image_data}async function W2e({gatewayUrls:t,uri:e}){try{let r=await fetch(e).then(i=>i.json());return await nB({gatewayUrls:t,uri:VQ(r)})}catch{throw new s6({uri:e})}}async function nB({gatewayUrls:t,uri:e}){let{uri:r,isOnChain:n}=$Q({uri:e,gatewayUrls:t});if(n||await Kdt(r))return r;throw new s6({uri:e})}function G2e(t){let e=t;e.startsWith(\\\"did:nft:\\\")&&(e=e.replace(\\\"did:nft:\\\",\\\"\\\").replace(/_/g,\\\"/\\\"));let[r,n,i]=e.split(\\\"/\\\"),[s,o]=r.split(\\\":\\\"),[a,c]=n.split(\\\":\\\");if(!s||s.toLowerCase()!==\\\"eip155\\\")throw new my({reason:\\\"Only EIP-155 supported\\\"});if(!o)throw new my({reason:\\\"Chain ID not found\\\"});if(!c)throw new my({reason:\\\"Contract address not found\\\"});if(!i)throw new my({reason:\\\"Token ID not found\\\"});if(!a)throw new my({reason:\\\"ERC namespace not found\\\"});return{chainID:Number.parseInt(o,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function K2e(t,{nft:e}){if(e.namespace===\\\"erc721\\\")return Tn(t,{address:e.contractAddress,abi:[{name:\\\"tokenURI\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"tokenId\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"string\\\"}]}],functionName:\\\"tokenURI\\\",args:[BigInt(e.tokenID)]});if(e.namespace===\\\"erc1155\\\")return Tn(t,{address:e.contractAddress,abi:[{name:\\\"uri\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"_id\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"string\\\"}]}],functionName:\\\"uri\\\",args:[BigInt(e.tokenID)]});throw new rB({namespace:e.namespace})}var $dt,Vdt,Wdt,Gdt,Z2e=x(()=>{u();Tu();$2e();$dt=/(?<protocol>https?:\\\\/\\\\/[^/]*|ipfs:\\\\/|ipns:\\\\/|ar:\\\\/)?(?<root>\\\\/)?(?<subpath>ipfs\\\\/|ipns\\\\/)?(?<target>[\\\\w\\\\-.]+)(?<subtarget>\\\\/.*)?/,Vdt=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\\\/(?<target>[\\\\w\\\\-.]+))?(?<subtarget>\\\\/.*)?$/,Wdt=/^data:([a-zA-Z\\\\-/+]*);base64,([^\\\"].*)/,Gdt=/^data:([a-zA-Z\\\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/});async function Q2e(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?Zdt(t,{gatewayUrls:e,record:r}):nB({uri:r,gatewayUrls:e})}async function Zdt(t,{gatewayUrls:e,record:r}){let n=G2e(r),i=await K2e(t,{nft:n}),{uri:s,isOnChain:o,isEncoded:a}=$Q({uri:i,gatewayUrls:e});if(o&&(s.includes(\\\"data:application/json;base64,\\\")||s.startsWith(\\\"{\\\"))){let l=a?atob(s.replace(\\\"data:application/json;base64,\\\",\\\"\\\")):s,d=JSON.parse(l);return nB({uri:VQ(d),gatewayUrls:e})}let c=n.tokenID;return n.namespace===\\\"erc1155\\\"&&(c=c.replace(\\\"0x\\\",\\\"\\\").padStart(64,\\\"0\\\")),W2e({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}var J2e=x(()=>{u();Z2e()});async function iB(t,e){let{blockNumber:r,blockTag:n,key:i,name:s,gatewayUrls:o,strict:a}=e,{chain:c}=t,l=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!c)throw new Error(\\\"client chain not configured. universalResolverAddress is required.\\\");return Su({blockNumber:r,chain:c,contract:\\\"ensUniversalResolver\\\"})})(),d=c?.ensTlds;if(d&&!d.some(f=>s.endsWith(f)))return null;try{let f={address:l,abi:Ik,args:[He(i6(s)),At({abi:xQ,functionName:\\\"text\\\",args:[BA(s),i]}),o??[Sm]],functionName:\\\"resolveWithGateways\\\",blockNumber:r,blockTag:n},h=await ae(t,Tn,\\\"readContract\\\")(f);if(h[0]===\\\"0x\\\")return null;let m=ma({abi:xQ,functionName:\\\"text\\\",data:h[0]});return m===\\\"\\\"?null:m}catch(f){if(a)throw f;if(n6(f))return null;throw f}}var WQ=x(()=>{u();fp();Em();fa();Sw();qe();Yk();RA();zQ();eB();Ut();Tu()});async function Y2e(t,{blockNumber:e,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){let c=await ae(t,iB,\\\"getEnsText\\\")({blockNumber:e,blockTag:r,key:\\\"avatar\\\",name:i,universalResolverAddress:a,gatewayUrls:s,strict:o});if(!c)return null;try{return await Q2e(t,{record:c,gatewayUrls:n})}catch{return null}}var X2e=x(()=>{u();J2e();Ut();WQ()});async function exe(t,e){let{address:r,blockNumber:n,blockTag:i,coinType:s=60n,gatewayUrls:o,strict:a}=e,{chain:c}=t,l=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!c)throw new Error(\\\"client chain not configured. universalResolverAddress is required.\\\");return Su({blockNumber:n,chain:c,contract:\\\"ensUniversalResolver\\\"})})();try{let d={address:l,abi:m2e,args:[r,s,o??[Sm]],functionName:\\\"reverseWithGateways\\\",blockNumber:n,blockTag:i},f=ae(t,Tn,\\\"readContract\\\"),[p]=await f(d);return p||null}catch(d){if(a)throw d;if(n6(d))return null;throw d}}var txe=x(()=>{u();fp();Sw();Yk();RA();Ut();Tu()});async function rxe(t,e){let{blockNumber:r,blockTag:n,name:i}=e,{chain:s}=t,o=(()=>{if(e.universalResolverAddress)return e.universalResolverAddress;if(!s)throw new Error(\\\"client chain not configured. universalResolverAddress is required.\\\");return Su({blockNumber:r,chain:s,contract:\\\"ensUniversalResolver\\\"})})(),a=s?.ensTlds;if(a&&!a.some(l=>i.endsWith(l)))throw new Error(`${i} is not a valid ENS TLD (${a?.join(\\\", \\\")}) for chain \\\"${s.name}\\\" (id: ${s.id}).`);let[c]=await ae(t,Tn,\\\"readContract\\\")({address:o,abi:[{inputs:[{type:\\\"bytes\\\"}],name:\\\"findResolver\\\",outputs:[{type:\\\"address\\\"},{type:\\\"bytes32\\\"},{type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"}],functionName:\\\"findResolver\\\",args:[He(i6(i))],blockNumber:r,blockTag:n});return c}var nxe=x(()=>{u();Sw();qe();eB();Ut();Tu()});async function sB(t,e){let{account:r=t.account,blockNumber:n,blockTag:i=\\\"latest\\\",blobs:s,data:o,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:f,to:p,value:h,...m}=e,g=r?Ze(r):void 0;try{xs(e);let v=(typeof n==\\\"bigint\\\"?Z(n):void 0)||i,b=t.chain?.formatters?.transactionRequest?.format,S=(b||Hs)({...Tc(m,{format:b}),account:g,blobs:s,data:o,gas:a,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:f,to:p,value:h},\\\"createAccessList\\\"),T=await t.request({method:\\\"eth_createAccessList\\\",params:[S,v]});return{accessList:T.accessList,gasUsed:BigInt(T.gasUsed)}}catch(w){throw Y5(w,{...e,account:g,chain:t.chain})}}var GQ=x(()=>{u();en();qe();kk();Xg();_u();qd()});async function ixe(t){let e=Fg(t,{method:\\\"eth_newBlockFilter\\\"}),r=await t.request({method:\\\"eth_newBlockFilter\\\"});return{id:r,request:e(r),type:\\\"block\\\"}}var sxe=x(()=>{u();GS()});async function oB(t,{address:e,args:r,event:n,events:i,fromBlock:s,strict:o,toBlock:a}={}){let c=i??(n?[n]:void 0),l=Fg(t,{method:\\\"eth_newFilter\\\"}),d=[];c&&(d=[c.flatMap(h=>rp({abi:[h],eventName:h.name,args:r}))],n&&(d=d[0]));let f=await t.request({method:\\\"eth_newFilter\\\",params:[{address:e,fromBlock:typeof s==\\\"bigint\\\"?Z(s):s,toBlock:typeof a==\\\"bigint\\\"?Z(a):a,...d.length?{topics:d}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:l(f),strict:!!o,toBlock:a,type:\\\"event\\\"}}var KQ=x(()=>{u();i5();qe();GS()});async function aB(t){let e=Fg(t,{method:\\\"eth_newPendingTransactionFilter\\\"}),r=await t.request({method:\\\"eth_newPendingTransactionFilter\\\"});return{id:r,request:e(r),type:\\\"transaction\\\"}}var ZQ=x(()=>{u();GS()});async function oxe(t,{address:e,blockNumber:r,blockTag:n=t.experimental_blockTag??\\\"latest\\\"}){if(t.batch?.multicall&&t.chain?.contracts?.multicall3){let o=t.chain.contracts.multicall3.address,a=At({abi:Wd,functionName:\\\"getEthBalance\\\",args:[e]}),{data:c}=await ae(t,Au,\\\"call\\\")({to:o,data:a,blockNumber:r,blockTag:n});return ma({abi:Wd,functionName:\\\"getEthBalance\\\",args:[e],data:c||\\\"0x\\\"})}let i=typeof r==\\\"bigint\\\"?Z(r):void 0,s=await t.request({method:\\\"eth_getBalance\\\",params:[e,i||n]});return BigInt(s)}var axe=x(()=>{u();fp();Em();fa();qe();Ut();Tw()});async function cxe(t){let e=await t.request({method:\\\"eth_blobBaseFee\\\"});return BigInt(e)}var lxe=x(()=>{u()});async function uxe(t,{blockHash:e,blockNumber:r,blockTag:n=\\\"latest\\\"}={}){let i=r!==void 0?Z(r):void 0,s;return e?s=await t.request({method:\\\"eth_getBlockTransactionCountByHash\\\",params:[e]},{dedupe:!0}):s=await t.request({method:\\\"eth_getBlockTransactionCountByNumber\\\",params:[i||n]},{dedupe:!!i}),jr(s)}var dxe=x(()=>{u();xi();qe()});async function Sl(t,{address:e,blockNumber:r,blockTag:n=\\\"latest\\\"}){let i=r!==void 0?Z(r):void 0,s=await t.request({method:\\\"eth_getCode\\\",params:[e,i||n]},{dedupe:!!i});if(s!==\\\"0x\\\")return s}var o6=x(()=>{u();qe()});async function fxe(t,{address:e,blockNumber:r,blockTag:n=\\\"latest\\\"}){let i=await Sl(t,{address:e,...r!==void 0?{blockNumber:r}:{blockTag:n}});if(i&&Ot(i)===23&&i.startsWith(\\\"0xef0100\\\"))return _r(No(i,3,23))}var pxe=x(()=>{u();Dd();Da();ep();o6()});var cB,hxe=x(()=>{u();st();cB=class extends W{constructor({address:e}){super(`No EIP-712 domain found on contract \\\"${e}\\\".`,{metaMessages:[\\\"Ensure that:\\\",`- The contract is deployed at the address \\\"${e}\\\".`,\\\"- `eip712Domain()` function exists on the contract.\\\",\\\"- `eip712Domain()` function matches signature to ERC-5267 specification.\\\"],name:\\\"Eip712DomainNotFoundError\\\"})}}});async function mxe(t,e){let{address:r,factory:n,factoryData:i}=e;try{let[s,o,a,c,l,d,f]=await ae(t,Tn,\\\"readContract\\\")({abi:Qdt,address:r,functionName:\\\"eip712Domain\\\",factory:n,factoryData:i});return{domain:{name:o,version:a,chainId:Number(c),verifyingContract:l,salt:d},extensions:f,fields:s}}catch(s){let o=s;throw o.name===\\\"ContractFunctionExecutionError\\\"&&o.cause.name===\\\"ContractFunctionZeroDataError\\\"?new cB({address:r}):o}}var Qdt,gxe=x(()=>{u();hxe();Ut();Tu();Qdt=[{inputs:[],name:\\\"eip712Domain\\\",outputs:[{name:\\\"fields\\\",type:\\\"bytes1\\\"},{name:\\\"name\\\",type:\\\"string\\\"},{name:\\\"version\\\",type:\\\"string\\\"},{name:\\\"chainId\\\",type:\\\"uint256\\\"},{name:\\\"verifyingContract\\\",type:\\\"address\\\"},{name:\\\"salt\\\",type:\\\"bytes32\\\"},{name:\\\"extensions\\\",type:\\\"uint256[]\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"}]});function yxe(t){return{baseFeePerGas:t.baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:t.reward?.map(e=>e.map(r=>BigInt(r)))}}var bxe=x(()=>{u()});async function wxe(t,{blockCount:e,blockNumber:r,blockTag:n=\\\"latest\\\",rewardPercentiles:i}){let s=typeof r==\\\"bigint\\\"?Z(r):void 0,o=await t.request({method:\\\"eth_feeHistory\\\",params:[Z(e),s||n,i]},{dedupe:!!s});return yxe(o)}var vxe=x(()=>{u();qe();bxe()});async function xxe(t,{filter:e}){let r=e.strict??!1,i=(await e.request({method:\\\"eth_getFilterLogs\\\",params:[e.id]})).map(s=>Qi(s));return e.abi?z5({abi:e.abi,logs:i,strict:r}):i}var Exe=x(()=>{u();hk();Vd()});function QQ(t,e){if(t.length!==e.length)throw new QE({expectedLength:t.length,givenLength:e.length});let r=[];for(let n=0;n<t.length;n++){let i=t[n],s=e[n];r.push(_xe(i,s))}return ln(r)}function _xe(t,e,r=!1){if(t===\\\"address\\\"){let o=e;if(!lt(o))throw new cr({address:o});return Fr(o.toLowerCase(),{size:r?32:null})}if(t===\\\"string\\\")return la(e);if(t===\\\"bytes\\\")return e;if(t===\\\"bool\\\")return Fr(Gb(e),{size:r?32:1});let n=t.match(r5);if(n){let[o,a,c=\\\"256\\\"]=n,l=Number.parseInt(c,10)/8;return Z(e,{size:r?32:l,signed:a===\\\"int\\\"})}let i=t.match(bN);if(i){let[o,a]=i;if(Number.parseInt(a,10)!==(e.length-2)/2)throw new XE({expectedSize:Number.parseInt(a,10),givenSize:(e.length-2)/2});return Fr(e,{dir:\\\"right\\\",size:r?32:null})}let s=t.match(hwe);if(s&&Array.isArray(e)){let[o,a]=s,c=[];for(let l=0;l<e.length;l++)c.push(_xe(a,e[l],!0));return c.length===0?\\\"0x\\\":ln(c)}throw new iN(t)}var Cxe=x(()=>{u();Ki();bl();da();Ei();rm();qe();wN()});function Sxe(t){let{authorizationList:e}=t;if(e)for(let r of e){let{chainId:n}=r,i=r.address;if(!lt(i))throw new cr({address:i});if(n<0)throw new Gd({chainId:n})}lB(t)}function Axe(t){let{blobVersionedHashes:e}=t;if(e){if(e.length===0)throw new F5;for(let r of e){let n=Ot(r),i=jr(No(r,0,1));if(n!==32)throw new ak({hash:r,size:n});if(i!==1)throw new ck({hash:r,version:i})}}lB(t)}function lB(t){let{chainId:e,maxPriorityFeePerGas:r,maxFeePerGas:n,to:i}=t;if(e<=0)throw new Gd({chainId:e});if(i&&!lt(i))throw new cr({address:i});if(n&&n>ry)throw new Ac({maxFeePerGas:n});if(r&&n&&r>n)throw new xu({maxFeePerGas:n,maxPriorityFeePerGas:r})}function Txe(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=t;if(e<=0)throw new Gd({chainId:e});if(s&&!lt(s))throw new cr({address:s});if(r||i)throw new W(\\\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.\\\");if(n&&n>ry)throw new Ac({maxFeePerGas:n})}function Ixe(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s}=t;if(s&&!lt(s))throw new cr({address:s});if(typeof e<\\\"u\\\"&&e<=0)throw new Gd({chainId:e});if(r||i)throw new W(\\\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.\\\");if(n&&n>ry)throw new Ac({maxFeePerGas:n})}var Rxe=x(()=>{u();mA();bl();st();oQ();_w();cp();da();Da();ep();xi()});function Nw(t){if(!t||t.length===0)return[];let e=[];for(let r=0;r<t.length;r++){let{address:n,storageKeys:i}=t[r];for(let s=0;s<i.length;s++)if(i[s].length-2!==64)throw new kN({storageKey:i[s]});if(!lt(n,{strict:!1}))throw new cr({address:n});e.push([n,i])}return e}var JQ=x(()=>{u();bl();wl();da()});function uB(t,e){let r=uk(t);return r===\\\"eip1559\\\"?Xdt(t,e):r===\\\"eip2930\\\"?eft(t,e):r===\\\"eip4844\\\"?Ydt(t,e):r===\\\"eip7702\\\"?Jdt(t,e):tft(t,e)}function Jdt(t,e){let{authorizationList:r,chainId:n,gas:i,nonce:s,to:o,value:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:d,data:f}=t;Sxe(t);let p=Nw(d),h=Pxe(r);return ln([\\\"0x04\\\",qa([Z(n),s?Z(s):\\\"0x\\\",l?Z(l):\\\"0x\\\",c?Z(c):\\\"0x\\\",i?Z(i):\\\"0x\\\",o??\\\"0x\\\",a?Z(a):\\\"0x\\\",f??\\\"0x\\\",p,h,...gy(t,e)])])}function Ydt(t,e){let{chainId:r,gas:n,nonce:i,to:s,value:o,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:d,data:f}=t;Axe(t);let p=t.blobVersionedHashes,h=t.sidecars;if(t.blobs&&(typeof p>\\\"u\\\"||typeof h>\\\"u\\\")){let _=typeof t.blobs[0]==\\\"string\\\"?t.blobs:t.blobs.map(N=>er(N)),S=t.kzg,T=L5({blobs:_,kzg:S});if(typeof p>\\\"u\\\"&&(p=sk({commitments:T})),typeof h>\\\"u\\\"){let N=U5({blobs:_,commitments:T,kzg:S});h=lk({blobs:_,commitments:T,proofs:N})}}let m=Nw(d),g=[Z(r),i?Z(i):\\\"0x\\\",l?Z(l):\\\"0x\\\",c?Z(c):\\\"0x\\\",n?Z(n):\\\"0x\\\",s??\\\"0x\\\",o?Z(o):\\\"0x\\\",f??\\\"0x\\\",m,a?Z(a):\\\"0x\\\",p??[],...gy(t,e)],w=[],v=[],b=[];if(h)for(let _=0;_<h.length;_++){let{blob:S,commitment:T,proof:N}=h[_];w.push(S),v.push(T),b.push(N)}return ln([\\\"0x03\\\",h?qa([g,w,v,b]):qa(g)])}function Xdt(t,e){let{chainId:r,gas:n,nonce:i,to:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:d}=t;lB(t);let f=Nw(l),p=[Z(r),i?Z(i):\\\"0x\\\",c?Z(c):\\\"0x\\\",a?Z(a):\\\"0x\\\",n?Z(n):\\\"0x\\\",s??\\\"0x\\\",o?Z(o):\\\"0x\\\",d??\\\"0x\\\",f,...gy(t,e)];return ln([\\\"0x02\\\",qa(p)])}function eft(t,e){let{chainId:r,gas:n,data:i,nonce:s,to:o,value:a,accessList:c,gasPrice:l}=t;Txe(t);let d=Nw(c),f=[Z(r),s?Z(s):\\\"0x\\\",l?Z(l):\\\"0x\\\",n?Z(n):\\\"0x\\\",o??\\\"0x\\\",a?Z(a):\\\"0x\\\",i??\\\"0x\\\",d,...gy(t,e)];return ln([\\\"0x01\\\",qa(f)])}function tft(t,e){let{chainId:r=0,gas:n,data:i,nonce:s,to:o,value:a,gasPrice:c}=t;Ixe(t);let l=[s?Z(s):\\\"0x\\\",c?Z(c):\\\"0x\\\",n?Z(n):\\\"0x\\\",o??\\\"0x\\\",a?Z(a):\\\"0x\\\",i??\\\"0x\\\"];if(e){let d=(()=>{if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+e.v-27n);let h=27n+(e.v===27n?0n:1n);if(e.v!==h)throw new ON({v:e.v});return h})(),f=An(e.r),p=An(e.s);l=[...l,Z(d),f===\\\"0x00\\\"?\\\"0x\\\":f,p===\\\"0x00\\\"?\\\"0x\\\":p]}else r>0&&(l=[...l,Z(r),\\\"0x\\\",\\\"0x\\\"]);return qa(l)}function gy(t,e){let r=e??t,{v:n,yParity:i}=r;if(typeof r.r>\\\"u\\\")return[];if(typeof r.s>\\\"u\\\")return[];if(typeof n>\\\"u\\\"&&typeof i>\\\"u\\\")return[];let s=An(r.r),o=An(r.s);return[typeof i==\\\"number\\\"?i?Z(1):\\\"0x\\\":n===0n?\\\"0x\\\":n===1n?Z(1):n===27n?\\\"0x\\\":Z(1),s===\\\"0x00\\\"?\\\"0x\\\":s,o===\\\"0x00\\\"?\\\"0x\\\":o]}var MA=x(()=>{u();wl();Oxe();tk();rk();sQ();aQ();Ei();nm();qe();E5();Rxe();cQ();JQ()});function Pxe(t){if(!t||t.length===0)return[];let e=[];for(let r of t){let{chainId:n,nonce:i,...s}=r,o=r.address;e.push([n?He(n):\\\"0x\\\",o,i?He(i):\\\"0x\\\",...gy({},s)])}return e}var Oxe=x(()=>{u();qe();MA()});async function Nxe({address:t,authorization:e,signature:r}){return ha(_r(t),await Jg({authorization:e,signature:r}))}var kxe=x(()=>{u();Dd();cy();dA()});function Bxe(t,{enabled:e=!0,id:r}){if(!e||!r)return t();if(dB.get(r))return dB.get(r);let n=t().finally(()=>dB.delete(r));return dB.set(r,n),n}var dB,Mxe=x(()=>{u();Lg();dB=new ua(8192)});function Dxe(t,e={}){return async(r,n={})=>{let{dedupe:i=!1,methods:s,retryDelay:o=150,retryCount:a=3,uid:c}={...e,...n},{method:l}=r;if(s?.exclude?.includes(l))throw new pm(new Error(\\\"method not supported\\\"),{method:l});if(s?.include&&!s.include.includes(l))throw new pm(new Error(\\\"method not supported\\\"),{method:l});let d=i?la(`${c}.${qt(r)}`):void 0;return Bxe(()=>hp(async()=>{try{return await t(r)}catch(f){let p=f;switch(p.code){case tw.code:throw new tw(p);case rw.code:throw new rw(p);case nw.code:throw new nw(p,{method:r.method});case iw.code:throw new iw(p);case sp.code:throw new sp(p);case vl.code:throw new vl(p);case sw.code:throw new sw(p);case Ld.code:throw new Ld(p);case fm.code:throw new fm(p);case pm.code:throw new pm(p,{method:r.method});case qg.code:throw new qg(p);case ow.code:throw new ow(p);case Cr.code:throw new Cr(p);case aw.code:throw new aw(p);case cw.code:throw new cw(p);case lw.code:throw new lw(p);case uw.code:throw new uw(p);case Do.code:throw new Do(p);case hm.code:throw new hm(p);case dw.code:throw new dw(p);case fw.code:throw new fw(p);case pw.code:throw new pw(p);case hw.code:throw new hw(p);case mw.code:throw new mw(p);case mm.code:throw new mm(p);case 5e3:throw new Cr(p);case zg.code:throw new zg(p);default:throw f instanceof W?f:new JS(p)}}},{delay:({count:f,error:p})=>{if(p&&p instanceof vu){let h=p?.headers?.get(\\\"Retry-After\\\");if(h?.match(/\\\\d/))return Number.parseInt(h,10)*1e3}return~~(1<<f)*o},retryCount:a,shouldRetry:({error:f})=>rft(f)}),{enabled:i,id:d})}}function rft(t){return\\\"code\\\"in t&&typeof t.code==\\\"number\\\"?t.code===-1||t.code===qg.code||t.code===sp.code:t instanceof vu&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}var Lxe=x(()=>{u();st();ew();$g();qe();Mxe();kA();ko()});function Oe(t){let e={formatters:void 0,fees:void 0,serializers:void 0,...t};function r(n){return i=>{let s=typeof i==\\\"function\\\"?i(n):i,o={...n,...s};return Object.assign(o,{extend:r(o)})}}return Object.assign(e,{extend:r(e)})}var Yt=x(()=>{u()});function YQ(t){let{source:e}=t,r=new Map,n=new ua(8192),i=new Map,s=({address:o,chainId:a})=>`${o}.${a}`;return{async consume({address:o,chainId:a,client:c}){let l=s({address:o,chainId:a}),d=this.get({address:o,chainId:a,client:c});this.increment({address:o,chainId:a});let f=await d;return await e.set({address:o,chainId:a},f),n.set(l,f),f},async increment({address:o,chainId:a}){let c=s({address:o,chainId:a}),l=r.get(c)??0;r.set(c,l+1)},async get({address:o,chainId:a,client:c}){let l=s({address:o,chainId:a}),d=i.get(l);return d||(d=(async()=>{try{let p=await e.get({address:o,chainId:a,client:c}),h=n.get(l)??0;return h>0&&p<=h?h+1:(n.delete(l),p)}finally{this.reset({address:o,chainId:a})}})(),i.set(l,d)),(r.get(l)??0)+await d},reset({address:o,chainId:a}){let c=s({address:o,chainId:a});r.delete(c),i.delete(c)}}}function nft(){return{async get(t){let{address:e,client:r}=t;return oy(r,{address:e,blockTag:\\\"pending\\\"})},set(){}}}var Xgr,Uxe=x(()=>{u();bA();Lg();Xgr=YQ({source:nft()})});function DA(t,{errorInstance:e=new Error(\\\"timed out\\\"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{let a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():s(e)},r)),i(await t({signal:a?.signal||null}))}catch(a){a?.name===\\\"AbortError\\\"&&s(e),s(a)}finally{clearTimeout(o)}})()})}var XQ=x(()=>{u()});function ift(){return{current:0,take(){return this.current++},reset(){this.current=0}}}var eJ,Fxe=x(()=>{u();eJ=ift()});function jxe(t,e={}){let{url:r,headers:n}=sft(t);return{async request(i){let{body:s,fetchFn:o=e.fetchFn??fetch,onRequest:a=e.onRequest,onResponse:c=e.onResponse,timeout:l=e.timeout??1e4}=i,d={...e.fetchOptions??{},...i.fetchOptions??{}},{headers:f,method:p,signal:h}=d;try{let m=await DA(async({signal:w})=>{let v={...d,body:Array.isArray(s)?qt(s.map(T=>({jsonrpc:\\\"2.0\\\",id:T.id??eJ.take(),...T}))):qt({jsonrpc:\\\"2.0\\\",id:s.id??eJ.take(),...s}),headers:{...n,\\\"Content-Type\\\":\\\"application/json\\\",...f},method:p||\\\"POST\\\",signal:h||(l>0?w:null)},b=new Request(r,v),_=await a?.(b,v)??{...v,url:r};return await o(_.url??r,_)},{errorInstance:new QS({body:s,url:r}),timeout:l,signal:!0});c&&await c(m);let g;if(m.headers.get(\\\"Content-Type\\\")?.startsWith(\\\"application/json\\\"))g=await m.json();else{g=await m.text();try{g=JSON.parse(g||\\\"{}\\\")}catch(w){if(m.ok)throw w;g={error:g}}}if(!m.ok){if(typeof g.error?.code==\\\"number\\\"&&typeof g.error?.message==\\\"string\\\")return g;throw new vu({body:s,details:qt(g.error)||m.statusText,headers:m.headers,status:m.status,url:r})}return g}catch(m){throw m instanceof vu||m instanceof QS?m:new vu({body:s,cause:m,url:r})}}}}function sft(t){try{let e=new URL(t),r=(()=>{if(e.username){let n=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;return e.username=\\\"\\\",e.password=\\\"\\\",{url:e.toString(),headers:{Authorization:`Basic ${btoa(n)}`}}}})();return{url:e.toString(),...r}}catch{return{url:t}}}var Hxe=x(()=>{u();ew();XQ();ko();Fxe()});var qxe,zxe=x(()=>{u();qxe=`\\u0019Ethereum Signed Message:\\n`});function $xe(t){let e=typeof t==\\\"string\\\"?la(t):typeof t.raw==\\\"string\\\"?t.raw:er(t.raw),r=la(`${qxe}${Ot(e)}`);return Jt([r,e])}var Vxe=x(()=>{u();zxe();Ei();Da();qe()});function Rm(t,e){return Ft($xe(t),e)}var fB=x(()=>{u();yl();Vxe()});var pB,hB,mB,Wxe=x(()=>{u();ko();st();pB=class extends W{constructor({domain:e}){super(`Invalid domain \\\"${qt(e)}\\\".`,{metaMessages:[\\\"Must be a valid EIP-712 domain.\\\"]})}},hB=class extends W{constructor({primaryType:e,types:r}){super(`Invalid primary type \\\\`${e}\\\\` must be one of \\\\`${JSON.stringify(Object.keys(r))}\\\\`.`,{docsPath:\\\"/api/glossary/Errors#typeddatainvalidprimarytypeerror\\\",metaMessages:[\\\"Check that the primary type is a key in `types`.\\\"]})}},mB=class extends W{constructor({type:e}){super(`Struct type \\\"${e}\\\" is invalid.`,{metaMessages:[\\\"Struct type must not be a Solidity type.\\\"],name:\\\"InvalidStructTypeError\\\"})}}});function Gxe(t){let{domain:e,message:r,primaryType:n,types:i}=t,s=(c,l)=>{let d={...l};for(let f of c){let{name:p,type:h}=f;h===\\\"address\\\"&&(d[p]=d[p].toLowerCase())}return d},o=i.EIP712Domain?e?s(i.EIP712Domain,e):{}:{},a=(()=>{if(n!==\\\"EIP712Domain\\\")return s(i[n],r)})();return qt({domain:o,message:a,primaryType:n,types:i})}function gB(t){let{domain:e,message:r,primaryType:n,types:i}=t,s=(o,a)=>{for(let c of o){let{name:l,type:d}=c,f=a[l],p=d.match(r5);if(p&&(typeof f==\\\"number\\\"||typeof f==\\\"bigint\\\")){let[g,w,v]=p;Z(f,{signed:w===\\\"int\\\",size:Number.parseInt(v,10)/8})}if(d===\\\"address\\\"&&typeof f==\\\"string\\\"&&!lt(f))throw new cr({address:f});let h=d.match(bN);if(h){let[g,w]=h;if(w&&Ot(f)!==Number.parseInt(w,10))throw new XE({expectedSize:Number.parseInt(w,10),givenSize:Ot(f)})}let m=i[d];m&&(oft(d),s(m,f))}};if(i.EIP712Domain&&e){if(typeof e!=\\\"object\\\")throw new pB({domain:e});s(i.EIP712Domain,e)}if(n!==\\\"EIP712Domain\\\")if(i[n])s(i[n],r);else throw new hB({primaryType:n,types:i})}function yB({domain:t}){return[typeof t?.name==\\\"string\\\"&&{name:\\\"name\\\",type:\\\"string\\\"},t?.version&&{name:\\\"version\\\",type:\\\"string\\\"},(typeof t?.chainId==\\\"number\\\"||typeof t?.chainId==\\\"bigint\\\")&&{name:\\\"chainId\\\",type:\\\"uint256\\\"},t?.verifyingContract&&{name:\\\"verifyingContract\\\",type:\\\"address\\\"},t?.salt&&{name:\\\"salt\\\",type:\\\"bytes32\\\"}].filter(Boolean)}function oft(t){if(t===\\\"address\\\"||t===\\\"bool\\\"||t===\\\"string\\\"||t.startsWith(\\\"bytes\\\")||t.startsWith(\\\"uint\\\")||t.startsWith(\\\"int\\\"))throw new mB({type:t})}var tJ=x(()=>{u();Ki();bl();Wxe();da();Da();qe();wN();ko()});function mp(t){let{domain:e={},message:r,primaryType:n}=t,i={EIP712Domain:yB({domain:e}),...t.types};gB({domain:e,message:r,primaryType:n,types:i});let s=[\\\"0x1901\\\"];return e&&s.push(Kxe({domain:e,types:i})),n!==\\\"EIP712Domain\\\"&&s.push(rJ({data:r,primaryType:n,types:i})),Ft(Jt(s))}function Kxe({domain:t,types:e}){return rJ({data:t,primaryType:\\\"EIP712Domain\\\",types:e})}function rJ({data:t,primaryType:e,types:r}){let n=Zxe({data:t,primaryType:e,types:r});return Ft(n)}function Zxe({data:t,primaryType:e,types:r}){let n=[{type:\\\"bytes32\\\"}],i=[aft({primaryType:e,types:r})];for(let s of r[e]){let[o,a]=Jxe({types:r,name:s.name,type:s.type,value:t[s.name]});n.push(o),i.push(a)}return Vn(n,i)}function aft({primaryType:t,types:e}){let r=He(cft({primaryType:t,types:e}));return Ft(r)}function cft({primaryType:t,types:e}){let r=\\\"\\\",n=Qxe({primaryType:t,types:e});n.delete(t);let i=[t,...Array.from(n).sort()];for(let s of i)r+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(\\\",\\\")})`;return r}function Qxe({primaryType:t,types:e},r=new Set){let i=t.match(/^\\\\w*/u)?.[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(let s of e[i])Qxe({primaryType:s.type,types:e},r);return r}function Jxe({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:\\\"bytes32\\\"},Ft(Zxe({data:n,primaryType:r,types:t}))];if(r===\\\"bytes\\\")return[{type:\\\"bytes32\\\"},Ft(n)];if(r===\\\"string\\\")return[{type:\\\"bytes32\\\"},Ft(He(n))];if(r.lastIndexOf(\\\"]\\\")===r.length-1){let i=r.slice(0,r.lastIndexOf(\\\"[\\\")),s=n.map(o=>Jxe({name:e,type:i,types:t,value:o}));return[{type:\\\"bytes32\\\"},Ft(Vn(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:r},n]}var bB=x(()=>{u();wu();Ei();qe();yl();tJ()});var Yxe,Xxe=x(()=>{u();Yxe=\\\"0x6492649264926492649264926492649264926492649264926492649264926492\\\"});var wB,eEe=x(()=>{u();wB=class extends Map{constructor(e){super(),Object.defineProperty(this,\\\"maxSize\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}}});var lft,vB,tEe=x(()=>{u();eEe();lft={checksum:new wB(8192)},vB=lft.checksum});function kw(t,e={}){let{as:r=typeof t==\\\"string\\\"?\\\"Hex\\\":\\\"Bytes\\\"}=e,n=Mg(i2e(t));return r===\\\"Bytes\\\"?n:ls(n)}var xB=x(()=>{u();$S();ly();io()});function rEe(t,e={}){let{compressed:r}=e,{prefix:n,x:i,y:s}=t;if(r===!1||typeof i==\\\"bigint\\\"&&typeof s==\\\"bigint\\\"){if(n!==4)throw new EB({prefix:n,cause:new oJ});return}if(r===!0||typeof i==\\\"bigint\\\"&&typeof s>\\\"u\\\"){if(n!==3&&n!==2)throw new EB({prefix:n,cause:new sJ});return}throw new iJ({publicKey:t})}function nEe(t){let e=(()=>{if(SA(t))return iEe(t);if(u2e(t))return dft(t);let{prefix:r,x:n,y:i}=t;return typeof n==\\\"bigint\\\"&&typeof i==\\\"bigint\\\"?{prefix:r??4,x:n,y:i}:{prefix:r,x:n}})();return rEe(e),e}function dft(t){return iEe(ls(t))}function iEe(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new aJ({publicKey:t});if(t.length===130){let n=BigInt(Ci(t,0,32)),i=BigInt(Ci(t,32,64));return{prefix:4,x:n,y:i}}if(t.length===132){let n=Number(Ci(t,0,1)),i=BigInt(Ci(t,1,33)),s=BigInt(Ci(t,33,65));return{prefix:n,x:i,y:s}}let e=Number(Ci(t,0,1)),r=BigInt(Ci(t,1,33));return{prefix:e,x:r}}function cJ(t,e={}){rEe(t);let{prefix:r,x:n,y:i}=t,{includePrefix:s=!0}=e;return Ni(s?Sr(r,{size:1}):\\\"0x\\\",Sr(n,{size:32}),typeof i==\\\"bigint\\\"?Sr(i,{size:32}):\\\"0x\\\")}var iJ,EB,sJ,oJ,aJ,lJ=x(()=>{u();ly();Ic();io();_A();iJ=class extends $e{constructor({publicKey:e}){super(`Value \\\\`${uy(e)}\\\\` is not a valid public key.`,{metaMessages:[\\\"Public key must contain:\\\",\\\"- an `x` and `prefix` value (compressed)\\\",\\\"- an `x`, `y`, and `prefix` value (uncompressed)\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidError\\\"})}},EB=class extends $e{constructor({prefix:e,cause:r}){super(`Prefix \\\"${e}\\\" is invalid.`,{cause:r}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidPrefixError\\\"})}},sJ=class extends $e{constructor(){super(\\\"Prefix must be 2 or 3 for compressed public keys.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidCompressedPrefixError\\\"})}},oJ=class extends $e{constructor(){super(\\\"Prefix must be 4 for uncompressed public keys.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidUncompressedPrefixError\\\"})}},aJ=class extends $e{constructor({publicKey:e}){super(`Value \\\\`${e}\\\\` is an invalid public key size.`,{metaMessages:[\\\"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\\\",`Received ${_i(Z5(e))} bytes.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidSerializedSizeError\\\"})}}});function Bw(t,e={}){let{strict:r=!0}=e;if(!fft.test(t))throw new _B({address:t,cause:new uJ});if(r){if(t.toLowerCase()===t)return;if(CB(t)!==t)throw new _B({address:t,cause:new dJ})}}function CB(t){if(vB.has(t))return vB.get(t);Bw(t,{strict:!1});let e=t.substring(2).toLowerCase(),r=kw(s2e(e),{as:\\\"Bytes\\\"}),n=e.split(\\\"\\\");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(r[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join(\\\"\\\")}`;return vB.set(t,i),i}function pft(t,e={}){let{checksum:r=!1}=e;return Bw(t),r?CB(t):t}function oEe(t,e={}){let r=kw(`0x${cJ(t).slice(4)}`).substring(26);return pft(`0x${r}`,e)}function SB(t,e={}){let{strict:r=!0}=e??{};try{return Bw(t,{strict:r}),!0}catch{return!1}}var fft,_B,uJ,dJ,LA=x(()=>{u();ly();tEe();Ic();xB();lJ();fft=/^0x[a-fA-F0-9]{40}$/;_B=class extends $e{constructor({address:e,cause:r}){super(`Address \\\"${e}\\\" is invalid.`,{cause:r}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidAddressError\\\"})}},uJ=class extends $e{constructor(){super(\\\"Address is not a 20 byte (40 hexadecimal character) value.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidInputError\\\"})}},dJ=class extends $e{constructor(){super(\\\"Address does not match its checksum counterpart.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidChecksumError\\\"})}}});var aEe,cEe,TB,t1r,r1r,n1r,i1r,s1r,o1r,a1r,c1r,l1r,u1r,d1r,f1r,p1r,h1r,m1r,g1r,y1r,b1r,w1r,v1r,x1r,E1r,_1r,C1r,S1r,A1r,T1r,I1r,R1r,P1r,O1r,N1r,k1r,B1r,M1r,D1r,L1r,U1r,F1r,j1r,H1r,q1r,z1r,$1r,V1r,W1r,G1r,K1r,Z1r,Q1r,J1r,Y1r,X1r,ebr,tbr,rbr,nbr,ibr,sbr,obr,abr,cbr,lbr,ubr,dbr,fbr,pbr,hbr,mbr,gbr,ybr,bbr,wbr,vbr,xbr,Ebr,_br,Cbr,Sbr,Abr,Tbr,Ibr,Rbr,Pbr,Obr,Nbr,kbr,Bbr,Mbr,Dbr,Lbr,Ubr,Fbr,jbr,Hbr,fJ,IB=x(()=>{u();aEe=/^(.*)\\\\[([0-9]*)\\\\]$/,cEe=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,TB=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t1r=2n**(8n-1n)-1n,r1r=2n**(16n-1n)-1n,n1r=2n**(24n-1n)-1n,i1r=2n**(32n-1n)-1n,s1r=2n**(40n-1n)-1n,o1r=2n**(48n-1n)-1n,a1r=2n**(56n-1n)-1n,c1r=2n**(64n-1n)-1n,l1r=2n**(72n-1n)-1n,u1r=2n**(80n-1n)-1n,d1r=2n**(88n-1n)-1n,f1r=2n**(96n-1n)-1n,p1r=2n**(104n-1n)-1n,h1r=2n**(112n-1n)-1n,m1r=2n**(120n-1n)-1n,g1r=2n**(128n-1n)-1n,y1r=2n**(136n-1n)-1n,b1r=2n**(144n-1n)-1n,w1r=2n**(152n-1n)-1n,v1r=2n**(160n-1n)-1n,x1r=2n**(168n-1n)-1n,E1r=2n**(176n-1n)-1n,_1r=2n**(184n-1n)-1n,C1r=2n**(192n-1n)-1n,S1r=2n**(200n-1n)-1n,A1r=2n**(208n-1n)-1n,T1r=2n**(216n-1n)-1n,I1r=2n**(224n-1n)-1n,R1r=2n**(232n-1n)-1n,P1r=2n**(240n-1n)-1n,O1r=2n**(248n-1n)-1n,N1r=2n**(256n-1n)-1n,k1r=-(2n**(8n-1n)),B1r=-(2n**(16n-1n)),M1r=-(2n**(24n-1n)),D1r=-(2n**(32n-1n)),L1r=-(2n**(40n-1n)),U1r=-(2n**(48n-1n)),F1r=-(2n**(56n-1n)),j1r=-(2n**(64n-1n)),H1r=-(2n**(72n-1n)),q1r=-(2n**(80n-1n)),z1r=-(2n**(88n-1n)),$1r=-(2n**(96n-1n)),V1r=-(2n**(104n-1n)),W1r=-(2n**(112n-1n)),G1r=-(2n**(120n-1n)),K1r=-(2n**(128n-1n)),Z1r=-(2n**(136n-1n)),Q1r=-(2n**(144n-1n)),J1r=-(2n**(152n-1n)),Y1r=-(2n**(160n-1n)),X1r=-(2n**(168n-1n)),ebr=-(2n**(176n-1n)),tbr=-(2n**(184n-1n)),rbr=-(2n**(192n-1n)),nbr=-(2n**(200n-1n)),ibr=-(2n**(208n-1n)),sbr=-(2n**(216n-1n)),obr=-(2n**(224n-1n)),abr=-(2n**(232n-1n)),cbr=-(2n**(240n-1n)),lbr=-(2n**(248n-1n)),ubr=-(2n**(256n-1n)),dbr=2n**8n-1n,fbr=2n**16n-1n,pbr=2n**24n-1n,hbr=2n**32n-1n,mbr=2n**40n-1n,gbr=2n**48n-1n,ybr=2n**56n-1n,bbr=2n**64n-1n,wbr=2n**72n-1n,vbr=2n**80n-1n,xbr=2n**88n-1n,Ebr=2n**96n-1n,_br=2n**104n-1n,Cbr=2n**112n-1n,Sbr=2n**120n-1n,Abr=2n**128n-1n,Tbr=2n**136n-1n,Ibr=2n**144n-1n,Rbr=2n**152n-1n,Pbr=2n**160n-1n,Obr=2n**168n-1n,Nbr=2n**176n-1n,kbr=2n**184n-1n,Bbr=2n**192n-1n,Mbr=2n**200n-1n,Dbr=2n**208n-1n,Lbr=2n**216n-1n,Ubr=2n**224n-1n,Fbr=2n**232n-1n,jbr=2n**240n-1n,Hbr=2n**248n-1n,fJ=2n**256n-1n});function Mw(t,e,r){let{checksumAddress:n,staticPosition:i}=r,s=mJ(e.type);if(s){let[o,a]=s;return mft(t,{...e,type:a},{checksumAddress:n,length:o,staticPosition:i})}if(e.type===\\\"tuple\\\")return wft(t,e,{checksumAddress:n,staticPosition:i});if(e.type===\\\"address\\\")return hft(t,{checksum:n});if(e.type===\\\"bool\\\")return gft(t);if(e.type.startsWith(\\\"bytes\\\"))return yft(t,e,{staticPosition:i});if(e.type.startsWith(\\\"uint\\\")||e.type.startsWith(\\\"int\\\"))return bft(t,e);if(e.type===\\\"string\\\")return vft(t,{staticPosition:i});throw new a6(e.type)}function hft(t,e={}){let{checksum:r=!1}=e,n=t.readBytes(32);return[(s=>r?CB(s):s)(ls(o2e(n,-20))),32]}function mft(t,e,r){let{checksumAddress:n,length:i,staticPosition:s}=r;if(!i){let c=up(t.readBytes(pJ)),l=s+c,d=l+uEe;t.setPosition(l);let f=up(t.readBytes(uEe)),p=UA(e),h=0,m=[];for(let g=0;g<f;++g){t.setPosition(d+(p?g*32:h));let[w,v]=Mw(t,e,{checksumAddress:n,staticPosition:d});h+=v,m.push(w)}return t.setPosition(s+32),[m,32]}if(UA(e)){let c=up(t.readBytes(pJ)),l=s+c,d=[];for(let f=0;f<i;++f){t.setPosition(l+f*32);let[p]=Mw(t,e,{checksumAddress:n,staticPosition:l});d.push(p)}return t.setPosition(s+32),[d,32]}let o=0,a=[];for(let c=0;c<i;++c){let[l,d]=Mw(t,e,{checksumAddress:n,staticPosition:s+o});o+=d,a.push(l)}return[a,o]}function gft(t){return[c2e(t.readBytes(32),{size:32}),32]}function yft(t,e,{staticPosition:r}){let[n,i]=e.type.split(\\\"bytes\\\");if(!i){let o=up(t.readBytes(32));t.setPosition(r+o);let a=up(t.readBytes(32));if(a===0)return t.setPosition(r+32),[\\\"0x\\\",32];let c=t.readBytes(a);return t.setPosition(r+32),[ls(c),32]}return[ls(t.readBytes(Number.parseInt(i,10),32)),32]}function bft(t,e){let r=e.type.startsWith(\\\"int\\\"),n=Number.parseInt(e.type.split(\\\"int\\\")[1]||\\\"256\\\",10),i=t.readBytes(32);return[n>48?a2e(i,{signed:r}):up(i,{signed:r}),32]}function wft(t,e,r){let{checksumAddress:n,staticPosition:i}=r,s=e.components.length===0||e.components.some(({name:c})=>!c),o=s?[]:{},a=0;if(UA(e)){let c=up(t.readBytes(pJ)),l=i+c;for(let d=0;d<e.components.length;++d){let f=e.components[d];t.setPosition(l+a);let[p,h]=Mw(t,f,{checksumAddress:n,staticPosition:l});a+=h,o[s?d:f?.name]=p}return t.setPosition(i+32),[o,32]}for(let c=0;c<e.components.length;++c){let l=e.components[c],[d,f]=Mw(t,l,{checksumAddress:n,staticPosition:i});o[s?c:l?.name]=d,a+=f}return[o,a]}function vft(t,{staticPosition:e}){let r=up(t.readBytes(32)),n=e+r;t.setPosition(n);let i=up(t.readBytes(32));if(i===0)return t.setPosition(e+32),[\\\"\\\",32];let s=t.readBytes(i,32),o=l2e(yQ(s));return t.setPosition(e+32),[o,32]}function dEe({checksumAddress:t,parameters:e,values:r}){let n=[];for(let i=0;i<e.length;i++)n.push(hJ({checksumAddress:t,parameter:e[i],value:r[i]}));return n}function hJ({checksumAddress:t=!1,parameter:e,value:r}){let n=e,i=mJ(n.type);if(i){let[s,o]=i;return Eft(r,{checksumAddress:t,length:s,parameter:{...n,type:o}})}if(n.type===\\\"tuple\\\")return Tft(r,{checksumAddress:t,parameter:n});if(n.type===\\\"address\\\")return xft(r,{checksum:t});if(n.type===\\\"bool\\\")return Cft(r);if(n.type.startsWith(\\\"uint\\\")||n.type.startsWith(\\\"int\\\")){let s=n.type.startsWith(\\\"int\\\"),[,,o=\\\"256\\\"]=TB.exec(n.type)??[];return Sft(r,{signed:s,size:Number(o)})}if(n.type.startsWith(\\\"bytes\\\"))return _ft(r,{type:n.type});if(n.type===\\\"string\\\")return Aft(r);throw new a6(n.type)}function RB(t){let e=0;for(let s=0;s<t.length;s++){let{dynamic:o,encoded:a}=t[s];o?e+=32:e+=_i(a)}let r=[],n=[],i=0;for(let s=0;s<t.length;s++){let{dynamic:o,encoded:a}=t[s];o?(r.push(Sr(e+i,{size:32})),n.push(a),i+=_i(a)):r.push(a)}return Ni(...r,...n)}function xft(t,e){let{checksum:r=!1}=e;return Bw(t,{strict:r}),{dynamic:!1,encoded:Cm(t.toLowerCase())}}function Eft(t,e){let{checksumAddress:r,length:n,parameter:i}=e,s=n===null;if(!Array.isArray(t))throw new OB(t);if(!s&&t.length!==n)throw new PB({expectedLength:n,givenLength:t.length,type:`${i.type}[${n}]`});let o=!1,a=[];for(let c=0;c<t.length;c++){let l=hJ({checksumAddress:r,parameter:i,value:t[c]});l.dynamic&&(o=!0),a.push(l)}if(s||o){let c=RB(a);if(s){let l=Sr(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Ni(l,c):l}}if(o)return{dynamic:!0,encoded:c}}return{dynamic:!1,encoded:Ni(...a.map(({encoded:c})=>c))}}function _ft(t,{type:e}){let[,r]=e.split(\\\"bytes\\\"),n=_i(t);if(!r){let i=t;return n%32!==0&&(i=dp(i,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:Ni(Cm(Sr(n,{size:32})),i)}}if(n!==Number.parseInt(r,10))throw new FA({expectedSize:Number.parseInt(r,10),value:t});return{dynamic:!1,encoded:dp(t)}}function Cft(t){if(typeof t!=\\\"boolean\\\")throw new $e(`Invalid boolean value: \\\"${t}\\\" (type: ${typeof t}). Expected: \\\\`true\\\\` or \\\\`false\\\\`.`);return{dynamic:!1,encoded:Cm(Sk(t))}}function Sft(t,{signed:e,size:r}){if(typeof r==\\\"number\\\"){let n=2n**(BigInt(r)-(e?1n:0n))-1n,i=e?-n-1n:0n;if(t>n||t<i)throw new CA({max:n.toString(),min:i.toString(),signed:e,size:r/8,value:t.toString()})}return{dynamic:!1,encoded:Sr(t,{size:32,signed:e})}}function Aft(t){let e=Q5(t),r=Math.ceil(_i(e)/32),n=[];for(let i=0;i<r;i++)n.push(dp(Ci(e,i*32,(i+1)*32)));return{dynamic:!0,encoded:Ni(dp(Sr(_i(e),{size:32})),...n)}}function Tft(t,e){let{checksumAddress:r,parameter:n}=e,i=!1,s=[];for(let o=0;o<n.components.length;o++){let a=n.components[o],c=Array.isArray(t)?o:a.name,l=hJ({checksumAddress:r,parameter:a,value:t[c]});s.push(l),l.dynamic&&(i=!0)}return{dynamic:i,encoded:i?RB(s):Ni(...s.map(({encoded:o})=>o))}}function mJ(t){let e=t.match(/^(.*)\\\\[(\\\\d+)?\\\\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function UA(t){let{type:e}=t;if(e===\\\"string\\\"||e===\\\"bytes\\\"||e.endsWith(\\\"[]\\\"))return!0;if(e===\\\"tuple\\\")return t.components?.some(UA);let r=mJ(t.type);return!!(r&&UA({...t,type:r[1]}))}var uEe,pJ,fEe=x(()=>{u();c6();LA();ly();Ic();io();IB();uEe=32,pJ=32});function kB(t,{recursiveReadLimit:e=8192}={}){let r=Object.create(Rft);return r.bytes=t,r.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}var Rft,NB,gJ,yJ,bJ=x(()=>{u();Ic();Rft={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new yJ({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new gJ({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new NB({offset:t});let e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new NB({offset:t});let e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){let r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){let e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){let e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){let e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();let r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();let t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();let t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();let t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();let t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){let e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};NB=class extends $e{constructor({offset:e}){super(`Offset \\\\`${e}\\\\` cannot be negative.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Cursor.NegativeOffsetError\\\"})}},gJ=class extends $e{constructor({length:e,position:r}){super(`Position \\\\`${r}\\\\` is out of bounds (\\\\`0 < position < ${e}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Cursor.PositionOutOfBoundsError\\\"})}},yJ=class extends $e{constructor({count:e,limit:r}){super(`Recursive read limit of \\\\`${r}\\\\` exceeded (recursive read count: \\\\`${e}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Cursor.RecursiveReadLimitExceededError\\\"})}}});function l6(t,e,r={}){let{as:n=\\\"Array\\\",checksumAddress:i=!1}=r,s=typeof e==\\\"string\\\"?K5(e):e,o=kB(s);if(Cu(s)===0&&t.length>0)throw new xJ;if(Cu(s)&&Cu(s)<32)throw new vJ({data:typeof e==\\\"string\\\"?e:ls(e),parameters:t,size:Cu(s)});let a=0,c=n===\\\"Array\\\"?[]:{};for(let l=0;l<t.length;++l){let d=t[l];o.setPosition(a);let[f,p]=Mw(o,d,{checksumAddress:i,staticPosition:0});a+=p,n===\\\"Array\\\"?c.push(f):c[d.name??l]=f}return c}function yy(t,e,r){let{checksumAddress:n=!1}=r??{};if(t.length!==e.length)throw new BB({expectedLength:t.length,givenLength:e.length});let i=dEe({checksumAddress:n,parameters:t,values:e}),s=RB(i);return s.length===0?\\\"0x\\\":s}function wJ(t,e){if(t.length!==e.length)throw new BB({expectedLength:t.length,givenLength:e.length});let r=[];for(let n=0;n<t.length;n++){let i=t[n],s=e[n];r.push(wJ.encode(i,s))}return Ni(...r)}function HA(t){return Array.isArray(t)&&typeof t[0]==\\\"string\\\"?WO(t):typeof t==\\\"string\\\"?WO(t):t}var vJ,xJ,PB,FA,BB,OB,a6,c6=x(()=>{u();KE();LA();ly();Ic();io();fEe();bJ();IB();(function(t){function e(r,n,i=!1){if(r===\\\"address\\\"){let c=n;return Bw(c),Cm(c.toLowerCase(),i?32:0)}if(r===\\\"string\\\")return Q5(n);if(r===\\\"bytes\\\")return n;if(r===\\\"bool\\\")return Cm(Sk(n),i?32:1);let s=r.match(TB);if(s){let[c,l,d=\\\"256\\\"]=s,f=Number.parseInt(d,10)/8;return Sr(n,{size:i?32:f,signed:l===\\\"int\\\"})}let o=r.match(cEe);if(o){let[c,l]=o;if(Number.parseInt(l,10)!==(n.length-2)/2)throw new FA({expectedSize:Number.parseInt(l,10),value:n});return dp(n,i?32:0)}let a=r.match(aEe);if(a&&Array.isArray(n)){let[c,l]=a,d=[];for(let f=0;f<n.length;f++)d.push(e(l,n[f],!0));return d.length===0?\\\"0x\\\":Ni(...d)}throw new a6(r)}t.encode=e})(wJ||(wJ={}));vJ=class extends $e{constructor({data:e,parameters:r,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Xh(r)})`,`Data:   ${e} (${n} bytes)`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.DataSizeTooSmallError\\\"})}},xJ=class extends $e{constructor(){super('Cannot decode zero data (\\\"0x\\\") with ABI parameters.'),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.ZeroDataError\\\"})}},PB=class extends $e{constructor({expectedLength:e,givenLength:r,type:n}){super(`Array length mismatch for type \\\\`${n}\\\\`. Expected: \\\\`${e}\\\\`. Given: \\\\`${r}\\\\`.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.ArrayLengthMismatchError\\\"})}},FA=class extends $e{constructor({expectedSize:e,value:r}){super(`Size of bytes \\\"${r}\\\" (bytes${_i(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.BytesSizeMismatchError\\\"})}},BB=class extends $e{constructor({expectedLength:e,givenLength:r}){super([\\\"ABI encoding parameters/values length mismatch.\\\",`Expected length (parameters): ${e}`,`Given length (values): ${r}`].join(`\\n`)),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.LengthMismatchError\\\"})}},OB=class extends $e{constructor(e){super(`Value \\\\`${e}\\\\` is not a valid array.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.InvalidArrayError\\\"})}},a6=class extends $e{constructor(e){super(`Type \\\\`${e}\\\\` is not a valid ABI Type.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.InvalidTypeError\\\"})}}});function Pft(t,e){let{as:r}=e,n=mEe(t),i=kB(new Uint8Array(n.length));return n.encode(i),r===\\\"Hex\\\"?ls(i.bytes):i.bytes}function hEe(t,e={}){let{as:r=\\\"Hex\\\"}=e;return Pft(t,{as:r})}function mEe(t){return Array.isArray(t)?Oft(t.map(e=>mEe(e))):Nft(t)}function Oft(t){let e=t.reduce((i,s)=>i+s.length,0),r=gEe(e);return{length:e<=55?1+e:1+r+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(let{encode:s}of t)s(i)}}}function Nft(t){let e=typeof t==\\\"string\\\"?K5(t):t,r=gEe(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function gEe(t){if(t<=255)return 1;if(t<=65535)return 2;if(t<=16777215)return 3;if(t<=4294967295)return 4;throw new $e(\\\"Length is too large.\\\")}var yEe=x(()=>{u();ly();Ic();io();bJ()});function AJ(t,e={}){let{recovered:r}=e;if(typeof t.r>\\\"u\\\")throw new qA({signature:t});if(typeof t.s>\\\"u\\\")throw new qA({signature:t});if(r&&typeof t.yParity>\\\"u\\\")throw new qA({signature:t});if(t.r<0n||t.r>fJ)throw new _J({value:t.r});if(t.s<0n||t.s>fJ)throw new CJ({value:t.s});if(typeof t.yParity==\\\"number\\\"&&t.yParity!==0&&t.yParity!==1)throw new zA({value:t.yParity})}function Bft(t){return bEe(ls(t))}function bEe(t){if(t.length!==130&&t.length!==132)throw new EJ({signature:t});let e=BigInt(Ci(t,0,32)),r=BigInt(Ci(t,32,64)),n=(()=>{let i=+`0x${t.slice(130)}`;if(!Number.isNaN(i))try{return RJ(i)}catch{throw new zA({value:i})}})();return typeof n>\\\"u\\\"?{r:e,s:r}:{r:e,s:r,yParity:n}}function TJ(t){if(!(typeof t.r>\\\"u\\\")&&!(typeof t.s>\\\"u\\\"))return IJ(t)}function IJ(t){let e=typeof t==\\\"string\\\"?bEe(t):t instanceof Uint8Array?Bft(t):typeof t.r==\\\"string\\\"?Dft(t):t.v?Mft(t):{r:t.r,s:t.s,...typeof t.yParity<\\\"u\\\"?{yParity:t.yParity}:{}};return AJ(e),e}function Mft(t){return{r:t.r,s:t.s,yParity:RJ(t.v)}}function Dft(t){let e=(()=>{let r=t.v?Number(t.v):void 0,n=t.yParity?Number(t.yParity):void 0;if(typeof r==\\\"number\\\"&&typeof n!=\\\"number\\\"&&(n=RJ(r)),typeof n!=\\\"number\\\")throw new zA({value:t.yParity});return n})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function wEe(t){let{r:e,s:r,yParity:n}=t;return[n?\\\"0x01\\\":\\\"0x\\\",e===0n?\\\"0x\\\":wQ(Sr(e)),r===0n?\\\"0x\\\":wQ(Sr(r))]}function RJ(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new SJ({value:t})}var EJ,qA,_J,CJ,zA,SJ,PJ=x(()=>{u();Ic();io();_A();IB();EJ=class extends $e{constructor({signature:e}){super(`Value \\\\`${e}\\\\` is an invalid signature size.`,{metaMessages:[\\\"Expected: 64 bytes or 65 bytes.\\\",`Received ${_i(Z5(e))} bytes.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidSerializedSizeError\\\"})}},qA=class extends $e{constructor({signature:e}){super(`Signature \\\\`${uy(e)}\\\\` is missing either an \\\\`r\\\\`, \\\\`s\\\\`, or \\\\`yParity\\\\` property.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.MissingPropertiesError\\\"})}},_J=class extends $e{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidRError\\\"})}},CJ=class extends $e{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidSError\\\"})}},zA=class extends $e{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidYParityError\\\"})}},SJ=class extends $e{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidVError\\\"})}}});function xEe(t,e={}){return typeof t.chainId==\\\"string\\\"?Lft(t):{...t,...e.signature}}function Lft(t){let{address:e,chainId:r,nonce:n}=t,i=TJ(t);return{address:e,chainId:Number(r),nonce:BigInt(n),...i}}function EEe(t){return Uft(t,{presign:!0})}function Uft(t,e={}){let{presign:r}=e;return kw(Ni(\\\"0x05\\\",hEe(Fft(r?{address:t.address,chainId:t.chainId,nonce:t.nonce}:t))))}function Fft(t){let{address:e,chainId:r,nonce:n}=t,i=TJ(t);return[r?Sr(r):\\\"0x\\\",e,n?Sr(n):\\\"0x\\\",...i?wEe(i):[]]}var _Ee=x(()=>{u();xB();io();yEe();PJ()});function CEe(t){return oEe(Hft(t))}function Hft(t){let{payload:e,signature:r}=t,{r:n,s:i,yParity:s}=r,a=new jd.Signature(BigInt(n),BigInt(i)).addRecoveryBit(s).recoverPublicKey(Z5(e).substring(2));return nEe(a)}var SEe=x(()=>{u();uA();LA();io();lJ()});var $A={};ue($A,{InvalidWrappedSignatureError:()=>MB,assert:()=>DB,from:()=>zft,magicBytes:()=>OJ,suffixParameters:()=>NJ,unwrap:()=>AEe,validate:()=>Vft,wrap:()=>$ft});function DB(t){if(typeof t==\\\"string\\\"){if(Ci(t,-32)!==OJ)throw new MB(t)}else AJ(t.authorization)}function zft(t){return typeof t==\\\"string\\\"?AEe(t):t}function AEe(t){DB(t);let e=Ek(Ci(t,-64,-32)),r=Ci(t,-e-64,-64),n=Ci(t,0,-e-64),[i,s,o]=l6(NJ,r);return{authorization:xEe({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:n,...o&&o!==\\\"0x\\\"?{data:o,to:s}:{}}}function $ft(t){let{data:e,signature:r}=t;DB(t);let n=CEe({payload:EEe(t.authorization),signature:IJ(t.authorization)}),i=yy(NJ,[{...t.authorization,delegation:t.authorization.address,chainId:BigInt(t.authorization.chainId)},t.to??n,e??\\\"0x\\\"]),s=Sr(_i(i),{size:32});return Ni(r,i,s,OJ)}function Vft(t){try{return DB(t),!0}catch{return!1}}var OJ,NJ,MB,TEe=x(()=>{u();c6();_Ee();Ic();io();SEe();PJ();OJ=\\\"0x8010801080108010801080108010801080108010801080108010801080108010\\\",NJ=HA(\\\"(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data\\\");MB=class extends $e{constructor(e){super(`Value \\\\`${e}\\\\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"SignatureErc8010.InvalidWrappedSignatureError\\\"})}}});var IEe=x(()=>{u();TEe()});function LB(t){let{address:e,data:r,signature:n,to:i=\\\"hex\\\"}=t,s=ln([Vn([{type:\\\"address\\\"},{type:\\\"bytes\\\"},{type:\\\"bytes\\\"}],[e,r,n]),Yxe]);return i===\\\"hex\\\"?s:Hr(s)}var REe=x(()=>{u();Xxe();wu();Ei();Zi()});var Dw=x(()=>{u();en();Dd();rm();xi();qe();Yb()});function Gft(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function PEe(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?jr(t.nonce):void 0,storageProof:t.storageProof?Gft(t.storageProof):void 0}}var OEe=x(()=>{u();Dw()});async function NEe(t,{address:e,blockNumber:r,blockTag:n,storageKeys:i}){let s=n??\\\"latest\\\",o=r!==void 0?Z(r):void 0,a=await t.request({method:\\\"eth_getProof\\\",params:[e,i,o||s]});return PEe(a)}var kEe=x(()=>{u();qe();OEe()});async function BEe(t,{address:e,blockNumber:r,blockTag:n=\\\"latest\\\",slot:i}){let s=r!==void 0?Z(r):void 0;return await t.request({method:\\\"eth_getStorageAt\\\",params:[e,i,s||n]})}var MEe=x(()=>{u();qe()});async function u6(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s,sender:o,nonce:a}){let c=n||\\\"latest\\\",l=r!==void 0?Z(r):void 0,d=null;if(i?d=await t.request({method:\\\"eth_getTransactionByHash\\\",params:[i]},{dedupe:!0}):e?d=await t.request({method:\\\"eth_getTransactionByBlockHashAndIndex\\\",params:[e,Z(s)]},{dedupe:!0}):(l||c)&&typeof s==\\\"number\\\"?d=await t.request({method:\\\"eth_getTransactionByBlockNumberAndIndex\\\",params:[l||c,Z(s)]},{dedupe:!!l}):o&&typeof a==\\\"number\\\"&&(d=await t.request({method:\\\"eth_getTransactionBySenderAndNonce\\\",params:[o,Z(a)]},{dedupe:!0})),!d)throw new d5({blockHash:e,blockNumber:r,blockTag:c,hash:i,index:s});return(t.chain?.formatters?.transaction?.format||zd)(d,\\\"getTransaction\\\")}var UB=x(()=>{u();wl();qe();iy()});async function DEe(t,{hash:e,transactionReceipt:r}){let[n,i]=await Promise.all([ae(t,pp,\\\"getBlockNumber\\\")({}),e?ae(t,u6,\\\"getTransaction\\\")({hash:e}):void 0]),s=r?.blockNumber||i?.blockNumber;return s?n-s+1n:0n}var LEe=x(()=>{u();Ut();e6();UB()});async function d6(t,{hash:e}){let r=await t.request({method:\\\"eth_getTransactionReceipt\\\",params:[e]},{dedupe:!0});if(!r)throw new f5({hash:e});return(t.chain?.formatters?.transactionReceipt?.format||Pw)(r,\\\"getTransactionReceipt\\\")}var kJ=x(()=>{u();wl();Ow()});async function UEe(t,e){let{account:r,authorizationList:n,allowFailure:i=!0,blockNumber:s,blockOverrides:o,blockTag:a,stateOverride:c}=e,l=e.contracts,{batchSize:d=e.batchSize??1024,deployless:f=e.deployless??!1}=typeof t.batch?.multicall==\\\"object\\\"?t.batch.multicall:{},p=(()=>{if(e.multicallAddress)return e.multicallAddress;if(f)return null;if(t.chain)return Su({blockNumber:s,chain:t.chain,contract:\\\"multicall3\\\"});throw new Error(\\\"client chain not configured. multicallAddress is required.\\\")})(),h=[[]],m=0,g=0;for(let b=0;b<l.length;b++){let{abi:_,address:S,args:T,functionName:N}=l[b];try{let O=At({abi:_,args:T,functionName:N});g+=(O.length-2)/2,d>0&&g>d&&h[m].length>0&&(m++,g=(O.length-2)/2,h[m]=[]),h[m]=[...h[m],{allowFailure:!0,callData:O,target:S}]}catch(O){let L=xl(O,{abi:_,address:S,args:T,docsPath:\\\"/docs/contract/multicall\\\",functionName:N,sender:r});if(!i)throw L;h[m]=[...h[m],{allowFailure:!0,callData:\\\"0x\\\",target:S}]}}let w=await Promise.allSettled(h.map(b=>ae(t,Tn,\\\"readContract\\\")({...p===null?{code:J5}:{address:p},abi:Wd,account:r,args:[b],authorizationList:n,blockNumber:s,blockOverrides:o,blockTag:a,functionName:\\\"aggregate3\\\",stateOverride:c}))),v=[];for(let b=0;b<w.length;b++){let _=w[b];if(_.status===\\\"rejected\\\"){if(!i)throw _.reason;for(let T=0;T<h[b].length;T++)v.push({status:\\\"failure\\\",error:_.reason,result:void 0});continue}let S=_.value;for(let T=0;T<S.length;T++){let{returnData:N,success:O}=S[T],{callData:L}=h[b][T],{abi:B,address:H,functionName:M,args:F}=l[v.length];try{if(L===\\\"0x\\\")throw new yu;if(!O)throw new ip({data:N});let R=ma({abi:B,args:F,data:N,functionName:M});v.push(i?{result:R,status:\\\"success\\\"}:R)}catch(R){let y=xl(R,{abi:B,address:H,args:F,docsPath:\\\"/docs/contract/multicall\\\",functionName:M});if(!i)throw y;v.push({error:y,result:void 0,status:\\\"failure\\\"})}}}if(v.length!==l.length)throw new W(\\\"multicall results mismatch\\\");return v}var FEe=x(()=>{u();fp();TA();Ki();st();dm();Em();fa();Sw();gw();Ut();Tu()});async function VA(t,e){let{blockNumber:r,blockTag:n=t.experimental_blockTag??\\\"latest\\\",blocks:i,returnFullTransactions:s,traceTransfers:o,validation:a}=e;try{let c=[];for(let p of i){let h=p.blockOverrides?Ak(p.blockOverrides):void 0,m=p.calls.map(w=>{let v=w,b=v.account?Ze(v.account):void 0,_=v.abi?At(v):v.data,S={...v,account:b,data:v.dataSuffix?Jt([_||\\\"0x\\\",v.dataSuffix]):_,from:v.from??b?.address};return xs(S),Hs(S)}),g=p.stateOverrides?ty(p.stateOverrides):void 0;c.push({blockOverrides:h,calls:m,stateOverrides:g})}let d=(typeof r==\\\"bigint\\\"?Z(r):void 0)||n;return(await t.request({method:\\\"eth_simulateV1\\\",params:[{blockStateCalls:c,returnFullTransactions:s,traceTransfers:o,validation:a},d]})).map((p,h)=>({...yA(p),calls:p.calls.map((m,g)=>{let{abi:w,args:v,functionName:b,to:_}=i[h].calls[g],S=m.error?.data??m.returnData,T=BigInt(m.gasUsed),N=m.logs?.map(H=>Qi(H)),O=m.status===\\\"0x1\\\"?\\\"success\\\":\\\"failure\\\",L=w&&O===\\\"success\\\"&&S!==\\\"0x\\\"?ma({abi:w,data:S,functionName:b}):null,B=(()=>{if(O===\\\"success\\\")return;let H;if(S===\\\"0x\\\"?H=new yu:S&&(H=new ip({data:S})),!!H)return xl(H,{abi:w??[],address:_??\\\"0x\\\",args:v,functionName:b??\\\"<unknown>\\\"})})();return{data:S,gasUsed:T,logs:N,status:O,...O===\\\"success\\\"?{result:L}:{error:B}}})}))}catch(c){let l=c,d=Yg(l,{});throw d instanceof Eu?l:d}}var BJ=x(()=>{u();vQ();en();Ki();dm();cp();Em();fa();Ei();qe();gw();fA();M5();Vd();_u();hA();qd()});function jB(t){let e=!0,r=\\\"\\\",n=0,i=\\\"\\\",s=!1;for(let o=0;o<t.length;o++){let a=t[o];if([\\\"(\\\",\\\")\\\",\\\",\\\"].includes(a)&&(e=!0),a===\\\"(\\\"&&n++,a===\\\")\\\"&&n--,!!e){if(n===0){if(a===\\\" \\\"&&[\\\"event\\\",\\\"function\\\",\\\"error\\\",\\\"\\\"].includes(i))i=\\\"\\\";else if(i+=a,a===\\\")\\\"){s=!0;break}continue}if(a===\\\" \\\"){t[o-1]!==\\\",\\\"&&r!==\\\",\\\"&&r!==\\\",(\\\"&&(r=\\\"\\\",e=!1);continue}i+=a,r+=a}}if(!s)throw new $e(\\\"Unable to normalize signature.\\\");return i}function FB(t,e){let r=typeof t,n=e.type;switch(n){case\\\"address\\\":return SB(t,{strict:!1});case\\\"bool\\\":return r===\\\"boolean\\\";case\\\"function\\\":return r===\\\"string\\\";case\\\"string\\\":return r===\\\"string\\\";default:return n===\\\"tuple\\\"&&\\\"components\\\"in e?Object.values(e.components).every((i,s)=>FB(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r===\\\"number\\\"||r===\\\"bigint\\\":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r===\\\"string\\\"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\\\\[[0-9]{0,}\\\\])+$/.test(n)?Array.isArray(t)&&t.every(i=>FB(i,{...e,type:n.replace(/(\\\\[[0-9]{0,}\\\\])$/,\\\"\\\")})):!1}}function MJ(t,e,r){for(let n in t){let i=t[n],s=e[n];if(i.type===\\\"tuple\\\"&&s.type===\\\"tuple\\\"&&\\\"components\\\"in i&&\\\"components\\\"in s)return MJ(i.components,s.components,r[n]);let o=[i.type,s.type];if(o.includes(\\\"address\\\")&&o.includes(\\\"bytes20\\\")?!0:o.includes(\\\"address\\\")&&o.includes(\\\"string\\\")?SB(r[n],{strict:!1}):o.includes(\\\"address\\\")&&o.includes(\\\"bytes\\\")?SB(r[n],{strict:!1}):!1)return o}}var jEe=x(()=>{u();LA();Ic()});function HB(t,e={}){let{prepare:r=!0}=e,n=Array.isArray(t)?VO(t):typeof t==\\\"string\\\"?VO(t):t;return{...n,...r?{hash:f6(n)}:{}}}function WA(t,e,r){let{args:n=[],prepare:i=!0}=r??{},s=SA(e,{strict:!1}),o=t.filter(l=>s?l.type===\\\"function\\\"||l.type===\\\"error\\\"?LJ(l)===Ci(e,0,4):l.type===\\\"event\\\"?f6(l)===e:!1:\\\"name\\\"in l&&l.name===e);if(o.length===0)throw new by({name:e});if(o.length===1)return{...o[0],...i?{hash:f6(o[0])}:{}};let a;for(let l of o){if(!(\\\"inputs\\\"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return{...l,...i?{hash:f6(l)}:{}};continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((f,p)=>{let h=\\\"inputs\\\"in l&&l.inputs[p];return h?FB(f,h):!1})){if(a&&\\\"inputs\\\"in a&&a.inputs){let f=MJ(l.inputs,a.inputs,n);if(f)throw new DJ({abiItem:l,type:f[0]},{abiItem:a,type:f[1]})}a=l}}let c=(()=>{if(a)return a;let[l,...d]=o;return{...l,overloads:d}})();if(!c)throw new by({name:e});return{...c,...i?{hash:f6(c)}:{}}}function LJ(...t){let e=(()=>{if(Array.isArray(t[0])){let[r,n]=t;return WA(r,n)}return t[0]})();return Ci(f6(e),0,4)}function Zft(...t){let e=(()=>{if(Array.isArray(t[0])){let[n,i]=t;return WA(n,i)}return t[0]})(),r=typeof e==\\\"string\\\"?e:Wb(e);return jB(r)}function f6(...t){let e=(()=>{if(Array.isArray(t[0])){let[r,n]=t;return WA(r,n)}return t[0]})();return typeof e!=\\\"string\\\"&&\\\"hash\\\"in e&&e.hash?e.hash:kw(Q5(Zft(e)))}var DJ,by,UJ=x(()=>{u();KE();Ic();xB();io();jEe();DJ=class extends $e{constructor(e,r){super(\\\"Found ambiguous types in overloaded ABI Items.\\\",{metaMessages:[`\\\\`${e.type}\\\\` in \\\\`${jB(Wb(e.abiItem))}\\\\`, and`,`\\\\`${r.type}\\\\` in \\\\`${jB(Wb(r.abiItem))}\\\\``,\\\"\\\",\\\"These types encode differently and cannot be distinguished at runtime.\\\",\\\"Remove one of the ambiguous items in the ABI.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiItem.AmbiguityError\\\"})}},by=class extends $e{constructor({name:e,data:r,type:n=\\\"item\\\"}){let i=e?` with name \\\"${e}\\\"`:r?` with data \\\"${r}\\\"`:\\\"\\\";super(`ABI ${n}${i} not found.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiItem.NotFoundError\\\"})}}});function qEe(...t){let[e,r]=(()=>{if(Array.isArray(t[0])){let[s,o]=t;return[Qft(s),o]}return t})(),{bytecode:n,args:i}=r;return Ni(n,e.inputs?.length&&i?.length?yy(e.inputs,i):\\\"0x\\\")}function zEe(t){return HB(t)}function Qft(t){let e=t.find(r=>r.type===\\\"constructor\\\");if(!e)throw new by({name:\\\"constructor\\\"});return e}var $Ee=x(()=>{u();UJ();c6();io()});function WEe(...t){let[e,r=[]]=(()=>{if(Array.isArray(t[0])){let[l,d,f]=t;return[VEe(l,d,{args:f}),f]}let[a,c]=t;return[a,c]})(),{overloads:n}=e,i=n?VEe([e,...n],e.name,{args:r}):e,s=Yft(i),o=r.length>0?yy(i.inputs,r):void 0;return o?Ni(s,o):s}function Lw(t,e={}){return HB(t,e)}function VEe(t,e,r){let n=WA(t,e,r);if(n.type!==\\\"function\\\")throw new by({name:e,type:\\\"function\\\"});return n}function Yft(t){return LJ(t)}var GEe=x(()=>{u();UJ();c6();io()});var KEe,Ru,ZEe=x(()=>{u();KEe=\\\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\\\",Ru=\\\"0x0000000000000000000000000000000000000000\\\"});async function QEe(t,e){let{blockNumber:r,blockTag:n,calls:i,stateOverrides:s,traceAssetChanges:o,traceTransfers:a,validation:c}=e,l=e.account?Ze(e.account):void 0;if(o&&!l)throw new W(\\\"`account` is required when `traceAssetChanges` is true\\\");let d=l?qEe(zEe(\\\"constructor(bytes, bytes)\\\"),{bytecode:Rk,args:[ept,WEe(Lw(\\\"function getBalance(address)\\\"),[l.address])]}):void 0,f=o?await Promise.all(e.calls.map(async P=>{if(!P.data&&!P.abi)return;let{accessList:k}=await sB(t,{account:l.address,...P,data:P.abi?At(P):P.data});return k.map(({address:U,storageKeys:D})=>D.length>0?U:null)})).then(P=>P.flat().filter(Boolean)):[],p=await VA(t,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:d}],stateOverrides:s},{calls:f.map((P,k)=>({abi:[Lw(\\\"function balanceOf(address) returns (uint256)\\\")],functionName:\\\"balanceOf\\\",args:[l.address],to:P,from:Ru,nonce:k})),stateOverrides:[{address:Ru,nonce:0}]}]:[],{calls:[...i,{to:Ru}].map(P=>({...P,from:l?.address})),stateOverrides:s},...o?[{calls:[{data:d}]},{calls:f.map((P,k)=>({abi:[Lw(\\\"function balanceOf(address) returns (uint256)\\\")],functionName:\\\"balanceOf\\\",args:[l.address],to:P,from:Ru,nonce:k})),stateOverrides:[{address:Ru,nonce:0}]},{calls:f.map((P,k)=>({to:P,abi:[Lw(\\\"function decimals() returns (uint256)\\\")],functionName:\\\"decimals\\\",from:Ru,nonce:k})),stateOverrides:[{address:Ru,nonce:0}]},{calls:f.map((P,k)=>({to:P,abi:[Lw(\\\"function tokenURI(uint256) returns (string)\\\")],functionName:\\\"tokenURI\\\",args:[0n],from:Ru,nonce:k})),stateOverrides:[{address:Ru,nonce:0}]},{calls:f.map((P,k)=>({to:P,abi:[Lw(\\\"function symbol() returns (string)\\\")],functionName:\\\"symbol\\\",from:Ru,nonce:k})),stateOverrides:[{address:Ru,nonce:0}]}]:[]],traceTransfers:a,validation:c}),h=o?p[2]:p[0],[m,g,,w,v,b,_,S]=o?p:[],{calls:T,...N}=h,O=T.slice(0,-1)??[],L=m?.calls??[],B=g?.calls??[],H=[...L,...B].map(P=>P.status===\\\"success\\\"?Ge(P.data):null),M=w?.calls??[],F=v?.calls??[],R=[...M,...F].map(P=>P.status===\\\"success\\\"?Ge(P.data):null),y=(b?.calls??[]).map(P=>P.status===\\\"success\\\"?P.result:null),E=(S?.calls??[]).map(P=>P.status===\\\"success\\\"?P.result:null),C=(_?.calls??[]).map(P=>P.status===\\\"success\\\"?P.result:null),I=[];for(let[P,k]of R.entries()){let U=H[P];if(typeof k!=\\\"bigint\\\"||typeof U!=\\\"bigint\\\")continue;let D=y[P-1],A=E[P-1],j=C[P-1],K=P===0?{address:KEe,decimals:18,symbol:\\\"ETH\\\"}:{address:f[P-1],decimals:j||D?Number(D??1):void 0,symbol:A??void 0};I.some(J=>J.token.address===K.address)||I.push({token:K,value:{pre:U,post:k,diff:k-U}})}return{assetChanges:I,block:N,results:O}}var ept,JEe=x(()=>{u();$Ee();GEe();en();ZEe();TA();st();fa();Dw();GQ();BJ();ept=\\\"0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033\\\"});var GA={};ue(GA,{InvalidWrappedSignatureError:()=>qB,assert:()=>jJ,from:()=>npt,magicBytes:()=>FJ,universalSignatureValidatorAbi:()=>rpt,universalSignatureValidatorBytecode:()=>tpt,unwrap:()=>YEe,validate:()=>spt,wrap:()=>ipt});function jJ(t){if(Ci(t,-32)!==FJ)throw new qB(t)}function npt(t){return typeof t==\\\"string\\\"?YEe(t):t}function YEe(t){jJ(t);let[e,r,n]=l6(HA(\\\"address, bytes, bytes\\\"),t);return{data:r,signature:n,to:e}}function ipt(t){let{data:e,signature:r,to:n}=t;return Ni(yy(HA(\\\"address, bytes, bytes\\\"),[n,e,r]),FJ)}function spt(t){try{return jJ(t),!0}catch{return!1}}var FJ,tpt,rpt,qB,XEe=x(()=>{u();c6();Ic();io();FJ=\\\"0x6492649264926492649264926492649264926492649264926492649264926492\\\",tpt=\\\"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\\\",rpt=[{inputs:[{name:\\\"_signer\\\",type:\\\"address\\\"},{name:\\\"_hash\\\",type:\\\"bytes32\\\"},{name:\\\"_signature\\\",type:\\\"bytes\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"constructor\\\"},{inputs:[{name:\\\"_signer\\\",type:\\\"address\\\"},{name:\\\"_hash\\\",type:\\\"bytes32\\\"},{name:\\\"_signature\\\",type:\\\"bytes\\\"}],outputs:[{type:\\\"bool\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\",name:\\\"isValidSig\\\"}];qB=class extends $e{constructor(e){super(`Value \\\\`${e}\\\\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"SignatureErc6492.InvalidWrappedSignatureError\\\"})}}});var e5e=x(()=>{u();XEe()});function t5e({r:t,s:e,to:r=\\\"hex\\\",v:n,yParity:i}){let s=(()=>{if(i===0||i===1)return i;if(n&&(n===27n||n===28n||n>=35n))return n%2n===0n?1:0;throw new Error(\\\"Invalid `v` or `yParity` value\\\")})(),o=`0x${new jd.Signature(Ge(t),Ge(e)).toCompactHex()}${s===0?\\\"1b\\\":\\\"1c\\\"}`;return r===\\\"hex\\\"?o:Hr(o)}var r5e=x(()=>{u();uA();xi();Zi()});async function wy(t,e){let{address:r,chain:n=t.chain,hash:i,erc6492VerifierAddress:s=e.universalSignatureVerifierAddress??n?.contracts?.erc6492Verifier?.address,multicallAddress:o=e.multicallAddress??n?.contracts?.multicall3?.address,mode:a=\\\"auto\\\"}=e;if(n?.verifyHash)return await n.verifyHash(t,e);let c=(()=>{let l=e.signature;return Ur(l)?l:typeof l==\\\"object\\\"&&\\\"r\\\"in l&&\\\"s\\\"in l?t5e(l):er(l)})();try{if(a===\\\"eoa\\\")try{if(ha(_r(r),await ap({hash:i,signature:c})))return!0}catch{}return $A.validate(c)?await opt(t,{...e,multicallAddress:o,signature:c}):await apt(t,{...e,verifierAddress:s,signature:c})}catch(l){if(a!==\\\"eoa\\\")try{if(ha(_r(r),await ap({hash:i,signature:c})))return!0}catch{}if(l instanceof Pm)return!1;throw l}}async function opt(t,e){let{address:r,blockNumber:n,blockTag:i,hash:s,multicallAddress:o}=e,{authorization:a,data:c,signature:l,to:d}=$A.unwrap(e.signature);if(await Sl(t,{address:r,blockNumber:n,blockTag:i})===ln([\\\"0xef0100\\\",a.address]))return await cpt(t,{address:r,blockNumber:n,blockTag:i,hash:s,signature:l});let p={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:Z(a.r,{size:32}),s:Z(a.s,{size:32}),yParity:a.yParity};if(!await Nxe({address:r,authorization:p}))throw new Pm;let m=await ae(t,Tn,\\\"readContract\\\")({...o?{address:o}:{code:J5},authorizationList:[p],abi:Wd,blockNumber:n,blockTag:\\\"pending\\\",functionName:\\\"aggregate3\\\",args:[[...c?[{allowFailure:!0,target:d??r,callData:c}]:[],{allowFailure:!0,target:r,callData:At({abi:_Q,functionName:\\\"isValidSignature\\\",args:[s,l]})}]]});if(m[m.length-1]?.returnData?.startsWith(\\\"0x1626ba7e\\\"))return!0;throw new Pm}async function apt(t,e){let{address:r,factory:n,factoryData:i,hash:s,signature:o,verifierAddress:a,...c}=e,l=await(async()=>!n&&!i||GA.validate(o)?o:GA.wrap({data:i,signature:o,to:n}))(),d=a?{to:a,data:At({abi:AA,functionName:\\\"isValidSig\\\",args:[r,s,l]}),...c}:{data:Cw({abi:AA,args:[r,s,l],bytecode:w2e}),...c},{data:f}=await ae(t,Au,\\\"call\\\")(d).catch(p=>{throw p instanceof h5?new Pm:p});if(uN(f??\\\"0x0\\\"))return!0;throw new Pm}async function cpt(t,e){let{address:r,blockNumber:n,blockTag:i,hash:s,signature:o}=e;if((await ae(t,Tn,\\\"readContract\\\")({address:r,abi:_Q,args:[s,o],blockNumber:n,blockTag:i,functionName:\\\"isValidSignature\\\"}).catch(c=>{throw c instanceof jg?new Pm:c})).startsWith(\\\"0x1626ba7e\\\"))return!0;throw new Pm}var Pm,KA=x(()=>{u();e5e();IEe();fp();TA();dm();Nk();fa();Dd();cy();kxe();Ei();gu();xi();qe();Ut();GN();r5e();Tw();o6();Tu();Pm=class extends Error{}});async function n5e(t,{address:e,message:r,factory:n,factoryData:i,signature:s,...o}){let a=Rm(r);return ae(t,wy,\\\"verifyHash\\\")({address:e,factory:n,factoryData:i,hash:a,signature:s,...o})}var i5e=x(()=>{u();Ut();fB();KA()});async function s5e(t,e){let{address:r,factory:n,factoryData:i,signature:s,message:o,primaryType:a,types:c,domain:l,...d}=e,f=mp({message:o,primaryType:a,types:c,domain:l});return ae(t,wy,\\\"verifyHash\\\")({address:r,factory:n,factoryData:i,hash:f,signature:s,...d})}var o5e=x(()=>{u();Ut();bB();KA()});function zB(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:s,pollingInterval:o=t.pollingInterval}){let a=typeof s<\\\"u\\\"?s:!(t.transport.type===\\\"webSocket\\\"||t.transport.type===\\\"ipc\\\"||t.transport.type===\\\"fallback\\\"&&(t.transport.transports[0].config.type===\\\"webSocket\\\"||t.transport.transports[0].config.type===\\\"ipc\\\")),c;return a?(()=>{let f=qt([\\\"watchBlockNumber\\\",t.uid,e,r,o]);return so(f,{onBlockNumber:n,onError:i},p=>Rc(async()=>{try{let h=await ae(t,pp,\\\"getBlockNumber\\\")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let m=c+1n;m<h;m++)p.onBlockNumber(m,c),c=m}(c===void 0||h>c)&&(p.onBlockNumber(h,c),c=h)}catch(h){p.onError?.(h)}},{emitOnBegin:e,interval:o}))})():(()=>{let f=qt([\\\"watchBlockNumber\\\",t.uid,e,r]);return so(f,{onBlockNumber:n,onError:i},p=>{let h=!0,m=()=>h=!1;return(async()=>{try{let g=(()=>{if(t.transport.type===\\\"fallback\\\"){let v=t.transport.transports.find(b=>b.config.type===\\\"webSocket\\\"||b.config.type===\\\"ipc\\\");return v?v.value:t.transport}return t.transport})(),{unsubscribe:w}=await g.subscribe({params:[\\\"newHeads\\\"],onData(v){if(!h)return;let b=Ge(v.result?.number);p.onBlockNumber(b,c),c=b},onError(v){p.onError?.(v)}});m=w,h||m()}catch(g){i?.(g)}})(),()=>m()})})()}var HJ=x(()=>{u();xi();Ut();Am();dy();ko();e6()});async function $B(t,e){let{checkReplacement:r=!0,confirmations:n=1,hash:i,onReplaced:s,retryCount:o=6,retryDelay:a=({count:T})=>~~(1<<T)*200,timeout:c=18e4}=e,l=qt([\\\"waitForTransactionReceipt\\\",t.uid,i]),d=e.pollingInterval?e.pollingInterval:t.chain?.experimental_preconfirmationTime?t.chain.experimental_preconfirmationTime:t.pollingInterval,f,p,h,m=!1,g,w,{promise:v,resolve:b,reject:_}=X5(),S=c?setTimeout(()=>{w?.(),g?.(),_(new MN({hash:i}))},c):void 0;return g=so(l,{onReplaced:s,resolve:b,reject:_},async T=>{if(h=await ae(t,d6,\\\"getTransactionReceipt\\\")({hash:i}).catch(()=>{}),h&&n<=1){clearTimeout(S),T.resolve(h),g?.();return}w=ae(t,zB,\\\"watchBlockNumber\\\")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:d,async onBlockNumber(N){let O=B=>{clearTimeout(S),w?.(),B(),g?.()},L=N;if(!m)try{if(h){if(n>1&&(!h.blockNumber||L-h.blockNumber+1n<n))return;O(()=>T.resolve(h));return}if(r&&!f&&(m=!0,await hp(async()=>{f=await ae(t,u6,\\\"getTransaction\\\")({hash:i}),f.blockNumber&&(L=f.blockNumber)},{delay:a,retryCount:o}),m=!1),h=await ae(t,d6,\\\"getTransactionReceipt\\\")({hash:i}),n>1&&(!h.blockNumber||L-h.blockNumber+1n<n))return;O(()=>T.resolve(h))}catch(B){if(B instanceof d5||B instanceof f5){if(!f){m=!1;return}try{p=f,m=!0;let H=await hp(()=>ae(t,no,\\\"getBlock\\\")({blockNumber:L,includeTransactions:!0}),{delay:a,retryCount:o,shouldRetry:({error:R})=>R instanceof N5});m=!1;let M=H.transactions.find(({from:R,nonce:y})=>R===p.from&&y===p.nonce);if(!M||(h=await ae(t,d6,\\\"getTransactionReceipt\\\")({hash:M.hash}),n>1&&(!h.blockNumber||L-h.blockNumber+1n<n)))return;let F=\\\"replaced\\\";M.to===p.to&&M.value===p.value&&M.input===p.input?F=\\\"repriced\\\":M.from===M.to&&M.value===0n&&(F=\\\"cancelled\\\"),O(()=>{T.onReplaced?.({reason:F,replacedTransaction:p,transaction:M,transactionReceipt:h}),T.resolve(h)})}catch(H){O(()=>T.reject(H))}}else O(()=>T.reject(B))}}})}),v}var qJ=x(()=>{u();XZ();wl();Ut();Am();Bk();kA();ko();sy();UB();kJ();HJ()});function a5e(t,{blockTag:e=t.experimental_blockTag??\\\"latest\\\",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){let l=typeof a<\\\"u\\\"?a:!(t.transport.type===\\\"webSocket\\\"||t.transport.type===\\\"ipc\\\"||t.transport.type===\\\"fallback\\\"&&(t.transport.transports[0].config.type===\\\"webSocket\\\"||t.transport.transports[0].config.type===\\\"ipc\\\")),d=o??!1,f;return l?(()=>{let m=qt([\\\"watchBlocks\\\",t.uid,e,r,n,d,c]);return so(m,{onBlock:i,onError:s},g=>Rc(async()=>{try{let w=await ae(t,no,\\\"getBlock\\\")({blockTag:e,includeTransactions:d});if(w.number!==null&&f?.number!=null){if(w.number===f.number)return;if(w.number-f.number>1&&r)for(let v=f?.number+1n;v<w.number;v++){let b=await ae(t,no,\\\"getBlock\\\")({blockNumber:v,includeTransactions:d});g.onBlock(b,f),f=b}}(f?.number==null||e===\\\"pending\\\"&&w?.number==null||w.number!==null&&w.number>f.number)&&(g.onBlock(w,f),f=w)}catch(w){g.onError?.(w)}},{emitOnBegin:n,interval:c}))})():(()=>{let m=!0,g=!0,w=()=>m=!1;return(async()=>{try{n&&ae(t,no,\\\"getBlock\\\")({blockTag:e,includeTransactions:d}).then(_=>{m&&g&&(i(_,void 0),g=!1)}).catch(s);let v=(()=>{if(t.transport.type===\\\"fallback\\\"){let _=t.transport.transports.find(S=>S.config.type===\\\"webSocket\\\"||S.config.type===\\\"ipc\\\");return _?_.value:t.transport}return t.transport})(),{unsubscribe:b}=await v.subscribe({params:[\\\"newHeads\\\"],async onData(_){if(!m)return;let S=await ae(t,no,\\\"getBlock\\\")({blockNumber:_.result?.number,includeTransactions:d}).catch(()=>{});m&&(i(S,f),g=!1,f=S)},onError(_){s?.(_)}});w=b,m||w()}catch(v){s?.(v)}})(),()=>w()})()}var c5e=x(()=>{u();Ut();Am();dy();ko();sy()});function l5e(t,{address:e,args:r,batch:n=!0,event:i,events:s,fromBlock:o,onError:a,onLogs:c,poll:l,pollingInterval:d=t.pollingInterval,strict:f}){let p=typeof l<\\\"u\\\"?l:typeof o==\\\"bigint\\\"?!0:!(t.transport.type===\\\"webSocket\\\"||t.transport.type===\\\"ipc\\\"||t.transport.type===\\\"fallback\\\"&&(t.transport.transports[0].config.type===\\\"webSocket\\\"||t.transport.transports[0].config.type===\\\"ipc\\\")),h=f??!1;return p?(()=>{let w=qt([\\\"watchEvent\\\",e,r,n,t.uid,i,d,o]);return so(w,{onLogs:c,onError:a},v=>{let b;o!==void 0&&(b=o-1n);let _,S=!1,T=Rc(async()=>{if(!S){try{_=await ae(t,oB,\\\"createEventFilter\\\")({address:e,args:r,event:i,events:s,strict:h,fromBlock:o})}catch{}S=!0;return}try{let N;if(_)N=await ae(t,fy,\\\"getFilterChanges\\\")({filter:_});else{let O=await ae(t,pp,\\\"getBlockNumber\\\")({});b&&b!==O?N=await ae(t,$5,\\\"getLogs\\\")({address:e,args:r,event:i,events:s,fromBlock:b+1n,toBlock:O}):N=[],b=O}if(N.length===0)return;if(n)v.onLogs(N);else for(let O of N)v.onLogs([O])}catch(N){_&&N instanceof vl&&(S=!1),v.onError?.(N)}},{emitOnBegin:!0,interval:d});return async()=>{_&&await ae(t,py,\\\"uninstallFilter\\\")({filter:_}),T()}})})():(()=>{let w=!0,v=()=>w=!1;return(async()=>{try{let b=(()=>{if(t.transport.type===\\\"fallback\\\"){let N=t.transport.transports.find(O=>O.config.type===\\\"webSocket\\\"||O.config.type===\\\"ipc\\\");return N?N.value:t.transport}return t.transport})(),_=s??(i?[i]:void 0),S=[];_&&(S=[_.flatMap(O=>rp({abi:[O],eventName:O.name,args:r}))],i&&(S=S[0]));let{unsubscribe:T}=await b.subscribe({params:[\\\"logs\\\",{address:e,topics:S}],onData(N){if(!w)return;let O=N.result;try{let{eventName:L,args:B}=vw({abi:_??[],data:O.data,topics:O.topics,strict:h}),H=Qi(O,{args:B,eventName:L});c([H])}catch(L){let B,H;if(L instanceof tm||L instanceof Pg){if(f)return;B=L.abiItem.name,H=L.abiItem.inputs?.some(F=>!(\\\"name\\\"in F&&F.name))}let M=Qi(O,{args:H?[]:{},eventName:B});c([M])}},onError(N){a?.(N)}});v=T,w||v()}catch(b){a?.(b)}})(),()=>v()})()}var u5e=x(()=>{u();Ki();$g();pk();i5();Vd();Ut();Am();dy();ko();KQ();e6();PA();mk();OA()});function d5e(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<\\\"u\\\"?i:t.transport.type!==\\\"webSocket\\\"&&t.transport.type!==\\\"ipc\\\")?(()=>{let l=qt([\\\"watchPendingTransactions\\\",t.uid,e,s]);return so(l,{onTransactions:n,onError:r},d=>{let f,p=Rc(async()=>{try{if(!f)try{f=await ae(t,aB,\\\"createPendingTransactionFilter\\\")({});return}catch(m){throw p(),m}let h=await ae(t,fy,\\\"getFilterChanges\\\")({filter:f});if(h.length===0)return;if(e)d.onTransactions(h);else for(let m of h)d.onTransactions([m])}catch(h){d.onError?.(h)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await ae(t,py,\\\"uninstallFilter\\\")({filter:f}),p()}})})():(()=>{let l=!0,d=()=>l=!1;return(async()=>{try{let{unsubscribe:f}=await t.transport.subscribe({params:[\\\"newPendingTransactions\\\"],onData(p){if(!l)return;let h=p.result;n([h])},onError(p){r?.(p)}});d=f,l||d()}catch(f){r?.(f)}})(),()=>d()})()}var f5e=x(()=>{u();Ut();Am();dy();ko();ZQ();PA();OA()});function p5e(t){let{scheme:e,statement:r,...n}=t.match(lpt)?.groups??{},{chainId:i,expirationTime:s,issuedAt:o,notBefore:a,requestId:c,...l}=t.match(upt)?.groups??{},d=t.split(\\\"Resources:\\\")[1]?.split(`\\n- `).slice(1);return{...n,...l,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...o?{issuedAt:new Date(o)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...d?{resources:d}:{},...e?{scheme:e}:{},...r?{statement:r}:{}}}var lpt,upt,h5e=x(()=>{u();lpt=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\\\\/\\\\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\\\n)(?<address>0x[a-fA-F0-9]{40})\\\\n\\\\n(?:(?<statement>.*)\\\\n\\\\n)?/,upt=/(?:URI: (?<uri>.+))\\\\n(?:Version: (?<version>.+))\\\\n(?:Chain ID: (?<chainId>\\\\d+))\\\\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\\\\n(?:Issued At: (?<issuedAt>.+))(?:\\\\nExpiration Time: (?<expirationTime>.+))?(?:\\\\nNot Before: (?<notBefore>.+))?(?:\\\\nRequest ID: (?<requestId>.+))?/});function m5e(t){let{address:e,domain:r,message:n,nonce:i,scheme:s,time:o=new Date}=t;if(r&&n.domain!==r||i&&n.nonce!==i||s&&n.scheme!==s||n.expirationTime&&o>=n.expirationTime||n.notBefore&&o<n.notBefore)return!1;try{if(!n.address||!lt(n.address,{strict:!1})||e&&!ha(n.address,e))return!1}catch{return!1}return!0}var g5e=x(()=>{u();da();cy()});async function y5e(t,e){let{address:r,domain:n,message:i,nonce:s,scheme:o,signature:a,time:c=new Date,...l}=e,d=p5e(i);if(!d.address||!m5e({address:r,domain:n,message:d,nonce:s,scheme:o,time:c}))return!1;let p=Rm(i);return wy(t,{address:d.address,hash:p,signature:a,...l})}var b5e=x(()=>{u();fB();h5e();g5e();KA()});async function p6(t,{serializedTransaction:e,throwOnReceiptRevert:r,timeout:n}){let i=await t.request({method:\\\"eth_sendRawTransactionSync\\\",params:n?[e,n]:[e]},{retryCount:0}),o=(t.chain?.formatters?.transactionReceipt?.format||Pw)(i);if(o.status===\\\"reverted\\\"&&r)throw new p5({receipt:o});return o}var VB=x(()=>{u();wl();Ow()});function h6(t){return{call:e=>Au(t,e),createAccessList:e=>sB(t,e),createBlockFilter:()=>ixe(t),createContractEventFilter:e=>xN(t,e),createEventFilter:e=>oB(t,e),createPendingTransactionFilter:()=>aB(t),estimateContractGas:e=>qve(t,e),estimateGas:e=>q5(t,e),getBalance:e=>oxe(t,e),getBlobBaseFee:()=>cxe(t),getBlock:e=>no(t,e),getBlockNumber:e=>pp(t,e),getBlockTransactionCount:e=>uxe(t,e),getBytecode:e=>Sl(t,e),getChainId:()=>Es(t),getCode:e=>Sl(t,e),getContractEvents:e=>gk(t,e),getDelegation:e=>fxe(t,e),getEip712Domain:e=>mxe(t,e),getEnsAddress:e=>q2e(t,e),getEnsAvatar:e=>Y2e(t,e),getEnsName:e=>exe(t,e),getEnsResolver:e=>rxe(t,e),getEnsText:e=>iB(t,e),getFeeHistory:e=>wxe(t,e),estimateFeesPerGas:e=>YN(t,e),getFilterChanges:e=>fy(t,e),getFilterLogs:e=>xxe(t,e),getGasPrice:()=>D5(t),getLogs:e=>$5(t,e),getProof:e=>NEe(t,e),estimateMaxPriorityFeePerGas:e=>Dve(t,e),fillTransaction:e=>j5(t,e),getStorageAt:e=>BEe(t,e),getTransaction:e=>u6(t,e),getTransactionConfirmations:e=>DEe(t,e),getTransactionCount:e=>oy(t,e),getTransactionReceipt:e=>d6(t,e),multicall:e=>UEe(t,e),prepareTransactionRequest:e=>lp(t,e),readContract:e=>Tn(t,e),sendRawTransaction:e=>r6(t,e),sendRawTransactionSync:e=>p6(t,e),simulate:e=>VA(t,e),simulateBlocks:e=>VA(t,e),simulateCalls:e=>QEe(t,e),simulateContract:e=>R2e(t,e),verifyHash:e=>wy(t,e),verifyMessage:e=>n5e(t,e),verifySiweMessage:e=>y5e(t,e),verifyTypedData:e=>s5e(t,e),uninstallFilter:e=>py(t,e),waitForTransactionReceipt:e=>$B(t,e),watchBlocks:e=>a5e(t,e),watchBlockNumber:e=>zB(t,e),watchContractEvent:e=>M2e(t,e),watchEvent:e=>l5e(t,e),watchPendingTransactions:e=>d5e(t,e)}}var zJ=x(()=>{u();z2e();X2e();txe();nxe();WQ();Tw();GQ();sxe();wZ();KQ();ZQ();zve();ek();fk();rQ();dk();axe();lxe();sy();e6();dxe();$d();o6();uQ();pxe();gxe();vxe();PA();Exe();JN();mk();kEe();MEe();UB();LEe();bA();kJ();FEe();Tu();BJ();JEe();P2e();OA();KA();i5e();o5e();qJ();HJ();c5e();D2e();u5e();f5e();b5e();H5();Hk();VB()});function ZA(t){let{key:e=\\\"public\\\",name:r=\\\"Public Client\\\"}=t;return Im({...t,key:e,name:r,type:\\\"publicClient\\\"}).extend(h6)}var w5e=x(()=>{u();Jk();zJ()});async function v5e(t,{chain:e}){let{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=e;await t.request({method:\\\"wallet_addEthereumChain\\\",params:[{chainId:Z(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}var x5e=x(()=>{u();qe()});function E5e(t,e){let{abi:r,args:n,bytecode:i,...s}=e,o=Cw({abi:r,args:n,bytecode:i});return hy(t,{...s,...s.authorizationList?{to:null}:{},data:o})}var _5e=x(()=>{u();Nk();NA()});async function C5e(t){return t.account?.type===\\\"local\\\"?[t.account.address]:(await t.request({method:\\\"eth_accounts\\\"},{dedupe:!0})).map(r=>Xf(r))}var S5e=x(()=>{u();Dd()});async function A5e(t,e={}){let{account:r=t.account,chainId:n}=e,i=r?Ze(r):void 0,s=n?[i?.address,[Z(n)]]:[i?.address],o=await t.request({method:\\\"wallet_getCapabilities\\\",params:s}),a={};for(let[c,l]of Object.entries(o)){a[Number(c)]={};for(let[d,f]of Object.entries(l))d===\\\"addSubAccount\\\"&&(d=\\\"unstable_addSubAccount\\\"),a[Number(c)][d]=f}return typeof n==\\\"number\\\"?a[n]:a}var T5e=x(()=>{u();en();qe()});async function I5e(t){return await t.request({method:\\\"wallet_getPermissions\\\"},{dedupe:!0})}var R5e=x(()=>{u()});async function Uw(t,e){let{account:r=t.account,chainId:n,nonce:i}=e;if(!r)throw new In({docsPath:\\\"/docs/eip7702/prepareAuthorization\\\"});let s=Ze(r),o=(()=>{if(e.executor)return e.executor===\\\"self\\\"?e.executor:Ze(e.executor)})(),a={address:e.contractAddress??e.address,chainId:n,nonce:i};return typeof a.chainId>\\\"u\\\"&&(a.chainId=t.chain?.id??await ae(t,Es,\\\"getChainId\\\")({})),typeof a.nonce>\\\"u\\\"&&(a.nonce=await ae(t,oy,\\\"getTransactionCount\\\")({address:s.address,blockTag:\\\"pending\\\"}),(o===\\\"self\\\"||o?.address&&ha(o.address,s.address))&&(a.nonce+=1)),a}var WB=x(()=>{u();en();Cl();cy();Ut();$d();bA()});async function P5e(t){return(await t.request({method:\\\"eth_requestAccounts\\\"},{dedupe:!0,retryCount:0})).map(r=>_r(r))}var O5e=x(()=>{u();Dd()});async function N5e(t,e){return t.request({method:\\\"wallet_requestPermissions\\\",params:[e]},{retryCount:0})}var k5e=x(()=>{u()});async function B5e(t,e){let{chain:r=t.chain}=e,n=e.timeout??Math.max((r?.blockTime??0)*3,5e3),i=await ae(t,$k,\\\"sendCalls\\\")(e);return await ae(t,Tm,\\\"waitForCallsStatus\\\")({...e,id:i.id,timeout:n})}var M5e=x(()=>{u();Ut();Vk();Gk()});async function GB(t,e){let{account:r=t.account,assertChainId:n=!0,chain:i=t.chain,accessList:s,authorizationList:o,blobs:a,data:c,dataSuffix:l=typeof t.dataSuffix==\\\"string\\\"?t.dataSuffix:t.dataSuffix?.value,gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,pollingInterval:w,throwOnReceiptRevert:v,type:b,value:_,...S}=e,T=e.timeout??Math.max((i?.blockTime??0)*3,5e3);if(typeof r>\\\"u\\\")throw new In({docsPath:\\\"/docs/actions/wallet/sendTransactionSync\\\"});let N=r?Ze(r):null;try{xs(e);let O=await(async()=>{if(e.to)return e.to;if(e.to!==null&&o&&o.length>0)return await Jg({authorization:o[0]}).catch(()=>{throw new W(\\\"`to` is required. Could not infer from `authorizationList`.\\\")})})();if(N?.type===\\\"json-rpc\\\"||N===null){let L;i!==null&&(L=await ae(t,Es,\\\"getChainId\\\")({}),n&&t6({currentChainId:L,chain:i}));let B=t.chain?.formatters?.transactionRequest?.format,M=(B||Hs)({...Tc(S,{format:B}),accessList:s,account:N,authorizationList:o,blobs:a,chainId:L,data:c&&Jt([c,l??\\\"0x\\\"]),gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,to:O,type:b,value:_},\\\"sendTransaction\\\"),F=$J.get(t.uid),R=F?\\\"wallet_sendTransaction\\\":\\\"eth_sendTransaction\\\",y=await(async()=>{try{return await t.request({method:R,params:[M]},{retryCount:0})}catch(C){if(F===!1)throw C;let I=C;if(I.name===\\\"InvalidInputRpcError\\\"||I.name===\\\"InvalidParamsRpcError\\\"||I.name===\\\"MethodNotFoundRpcError\\\"||I.name===\\\"MethodNotSupportedRpcError\\\")return await t.request({method:\\\"wallet_sendTransaction\\\",params:[M]},{retryCount:0}).then(P=>($J.set(t.uid,!0),P)).catch(P=>{let k=P;throw k.name===\\\"MethodNotFoundRpcError\\\"||k.name===\\\"MethodNotSupportedRpcError\\\"?($J.set(t.uid,!1),I):k});throw I}})(),E=await ae(t,$B,\\\"waitForTransactionReceipt\\\")({checkReplacement:!1,hash:y,pollingInterval:w,timeout:T});if(v&&E.status===\\\"reverted\\\")throw new p5({receipt:E});return E}if(N?.type===\\\"local\\\"){let L=await ae(t,lp,\\\"prepareTransactionRequest\\\")({account:N,accessList:s,authorizationList:o,blobs:a,chain:i,data:c&&Jt([c,l??\\\"0x\\\"]),gas:d,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:h,maxPriorityFeePerGas:m,nonce:g,nonceManager:N.nonceManager,parameters:[...vA,\\\"sidecars\\\"],type:b,value:_,...S,to:O}),B=i?.serializers?.transaction,H=await N.signTransaction(L,{serializer:B});return await ae(t,p6,\\\"sendRawTransactionSync\\\")({serializedTransaction:H,throwOnReceiptRevert:v,timeout:e.timeout})}throw N?.type===\\\"smart\\\"?new Iu({metaMessages:[\\\"Consider using the `sendUserOperation` Action instead.\\\"],docsPath:\\\"/docs/actions/bundler/sendUserOperation\\\",type:\\\"smart\\\"}):new Iu({docsPath:\\\"/docs/actions/wallet/sendTransactionSync\\\",type:N?.type})}catch(O){throw O instanceof Iu?O:ay(O,{...e,account:N,chain:e.chain||void 0})}}var $J,VJ=x(()=>{u();en();Cl();st();wl();dA();jk();Ei();wA();Xg();_u();Ut();Lg();qd();$d();qJ();H5();VB();$J=new ua(128)});async function D5e(t,e){let{id:r}=e;await t.request({method:\\\"wallet_showCallsStatus\\\",params:[r]})}var L5e=x(()=>{u()});async function U5e(t,e){let{account:r=t.account}=e;if(!r)throw new In({docsPath:\\\"/docs/eip7702/signAuthorization\\\"});let n=Ze(r);if(!n.signAuthorization)throw new Iu({docsPath:\\\"/docs/eip7702/signAuthorization\\\",metaMessages:[\\\"The `signAuthorization` Action does not support JSON-RPC Accounts.\\\"],type:n.type});let i=await Uw(t,e);return n.signAuthorization(i)}var F5e=x(()=>{u();en();Cl();WB()});async function j5e(t,{account:e=t.account,message:r}){if(!e)throw new In({docsPath:\\\"/docs/actions/wallet/signMessage\\\"});let n=Ze(e);if(n.signMessage)return n.signMessage({message:r});let i=typeof r==\\\"string\\\"?la(r):r.raw instanceof Uint8Array?He(r.raw):r.raw;return t.request({method:\\\"personal_sign\\\",params:[i,n.address]},{retryCount:0})}var H5e=x(()=>{u();en();Cl();qe()});async function q5e(t,e){let{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new In({docsPath:\\\"/docs/actions/wallet/signTransaction\\\"});let s=Ze(r);xs({account:s,...e});let o=await ae(t,Es,\\\"getChainId\\\")({});n!==null&&t6({currentChainId:o,chain:n});let c=(n?.formatters||t.chain?.formatters)?.transactionRequest?.format||Hs;return s.signTransaction?s.signTransaction({...i,chainId:o},{serializer:t.chain?.serializers?.transaction}):await t.request({method:\\\"eth_signTransaction\\\",params:[{...c({...i,account:s},\\\"signTransaction\\\"),chainId:Z(o),from:s.address}]},{retryCount:0})}var z5e=x(()=>{u();en();Cl();jk();qe();_u();Ut();qd();$d()});async function $5e(t,e){let{account:r=t.account,domain:n,message:i,primaryType:s}=e;if(!r)throw new In({docsPath:\\\"/docs/actions/wallet/signTypedData\\\"});let o=Ze(r),a={EIP712Domain:yB({domain:n}),...e.types};if(gB({domain:n,message:i,primaryType:s,types:a}),o.signTypedData)return o.signTypedData({domain:n,message:i,primaryType:s,types:a});let c=Gxe({domain:n,message:i,primaryType:s,types:a});return t.request({method:\\\"eth_signTypedData_v4\\\",params:[o.address,c]},{retryCount:0})}var V5e=x(()=>{u();en();Cl();tJ()});async function W5e(t,{id:e}){await t.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:Z(e)}]},{retryCount:0})}var G5e=x(()=>{u();qe()});async function K5e(t,e){return await t.request({method:\\\"wallet_watchAsset\\\",params:e},{retryCount:0})}var Z5e=x(()=>{u()});async function Q5e(t,e){return Rw.internal(t,GB,\\\"sendTransactionSync\\\",e)}var J5e=x(()=>{u();VJ();MQ()});function WJ(t){return{addChain:e=>v5e(t,e),deployContract:e=>E5e(t,e),fillTransaction:e=>j5(t,e),getAddresses:()=>C5e(t),getCallsStatus:e=>Wk(t,e),getCapabilities:e=>A5e(t,e),getChainId:()=>Es(t),getPermissions:()=>I5e(t),prepareAuthorization:e=>Uw(t,e),prepareTransactionRequest:e=>lp(t,e),requestAddresses:()=>P5e(t),requestPermissions:e=>N5e(t,e),sendCalls:e=>$k(t,e),sendCallsSync:e=>B5e(t,e),sendRawTransaction:e=>r6(t,e),sendRawTransactionSync:e=>p6(t,e),sendTransaction:e=>hy(t,e),sendTransactionSync:e=>GB(t,e),showCallsStatus:e=>D5e(t,e),signAuthorization:e=>U5e(t,e),signMessage:e=>j5e(t,e),signTransaction:e=>q5e(t,e),signTypedData:e=>$5e(t,e),switchChain:e=>W5e(t,e),waitForCallsStatus:e=>Tm(t,e),watchAsset:e=>K5e(t,e),writeContract:e=>Rw(t,e),writeContractSync:e=>Q5e(t,e)}}var Y5e=x(()=>{u();dk();$d();x5e();_5e();S5e();FQ();T5e();R5e();WB();H5();O5e();k5e();Vk();M5e();Hk();VB();NA();VJ();L5e();F5e();H5e();z5e();V5e();G5e();Gk();Z5e();MQ();J5e()});function m6({key:t,methods:e,name:r,request:n,retryCount:i=3,retryDelay:s=150,timeout:o,type:a},c){let l=Qk();return{config:{key:t,methods:e,name:r,request:n,retryCount:i,retryDelay:s,timeout:o,type:a},request:Dxe(n,{methods:e,retryCount:i,retryDelay:s,uid:l}),value:c}}var KB=x(()=>{u();Lxe();HQ()});function QA(t,e={}){let{key:r=\\\"custom\\\",methods:n,name:i=\\\"Custom Provider\\\",retryDelay:s}=e;return({retryCount:o})=>m6({key:r,methods:n,name:i,request:t.request.bind(t),retryCount:e.retryCount??o,retryDelay:s,type:\\\"custom\\\"})}var X5e=x(()=>{u();KB()});function ZB(t,e={}){let{key:r=\\\"fallback\\\",name:n=\\\"Fallback\\\",rank:i=!1,shouldThrow:s=e6e,retryCount:o,retryDelay:a}=e;return(({chain:c,pollingInterval:l=4e3,timeout:d,...f})=>{let p=t,h=()=>{},m=m6({key:r,name:n,async request({method:g,params:w}){let v,b=async(_=0)=>{let S=p[_]({...f,chain:c,retryCount:0,timeout:d});try{let T=await S.request({method:g,params:w});return h({method:g,params:w,response:T,transport:S,status:\\\"success\\\"}),T}catch(T){if(h({error:T,method:g,params:w,transport:S,status:\\\"error\\\"}),s(T)||_===p.length-1||(v??(v=p.slice(_+1).some(N=>{let{include:O,exclude:L}=N({chain:c}).config.methods||{};return O?O.includes(g):L?!L.includes(g):!0})),!v))throw T;return b(_+1)}};return b()},retryCount:o,retryDelay:a,type:\\\"fallback\\\"},{onResponse:g=>h=g,transports:p.map(g=>g({chain:c,retryCount:0}))});if(i){let g=typeof i==\\\"object\\\"?i:{};dpt({chain:c,interval:g.interval??l,onTransports:w=>p=w,ping:g.ping,sampleCount:g.sampleCount,timeout:g.timeout,transports:p,weights:g.weights})}return m})}function e6e(t){return!!(\\\"code\\\"in t&&typeof t.code==\\\"number\\\"&&(t.code===fm.code||t.code===Cr.code||t.code===zg.code||Hd.nodeMessage.test(t.message)||t.code===5e3))}function dpt({chain:t,interval:e=4e3,onTransports:r,ping:n,sampleCount:i=10,timeout:s=1e3,transports:o,weights:a={}}){let{stability:c=.7,latency:l=.3}=a,d=[],f=async()=>{let p=await Promise.all(o.map(async g=>{let w=g({chain:t,retryCount:0,timeout:s}),v=Date.now(),b,_;try{await(n?n({transport:w}):w.request({method:\\\"net_listening\\\"})),_=1}catch{_=0}finally{b=Date.now()}return{latency:b-v,success:_}}));d.push(p),d.length>i&&d.shift();let h=Math.max(...d.map(g=>Math.max(...g.map(({latency:w})=>w)))),m=o.map((g,w)=>{let v=d.map(N=>N[w].latency),_=1-v.reduce((N,O)=>N+O,0)/v.length/h,S=d.map(N=>N[w].success),T=S.reduce((N,O)=>N+O,0)/S.length;return T===0?[0,w]:[l*_+c*T,w]}).sort((g,w)=>w[0]-g[0]);r(m.map(([,g])=>o[g])),await Iw(e),f()};f()}var t6e=x(()=>{u();cp();$g();Fk();KB()});var QB,r6e=x(()=>{u();st();QB=class extends W{constructor(){super(\\\"No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.\\\",{docsPath:\\\"/docs/clients/intro\\\",name:\\\"UrlRequiredError\\\"})}}});function za(t,e={}){let{batch:r,fetchFn:n,fetchOptions:i,key:s=\\\"http\\\",methods:o,name:a=\\\"HTTP JSON-RPC\\\",onFetchRequest:c,onFetchResponse:l,retryDelay:d,raw:f}=e;return({chain:p,retryCount:h,timeout:m})=>{let{batchSize:g=1e3,wait:w=0}=typeof r==\\\"object\\\"?r:{},v=e.retryCount??h,b=m??e.timeout??1e4,_=t||p?.rpcUrls.default.http[0];if(!_)throw new QB;let S=jxe(_,{fetchFn:n,fetchOptions:i,onRequest:c,onResponse:l,timeout:b});return m6({key:s,methods:o,name:a,async request({method:T,params:N}){let O={method:T,params:N},{schedule:L}=Mk({id:_,wait:w,shouldSplitBatch(F){return F.length>g},fn:F=>S.request({body:F}),sort:(F,R)=>F.id-R.id}),B=async F=>r?L(F):[await S.request({body:F})],[{error:H,result:M}]=await B(O);if(f)return{error:H,result:M};if(H)throw new Hg({body:O,error:H,url:_});return M},retryCount:v,retryDelay:d,timeout:b,type:\\\"http\\\"},{fetchOptions:i,url:_})}}var n6e=x(()=>{u();ew();r6e();TQ();Hxe();KB()});function JB(t){let{r:e,s:r}=jd.Signature.fromCompact(t.slice(2,130)),n=+`0x${t.slice(130)}`,[i,s]=(()=>{if(n===0||n===1)return[void 0,n];if(n===27)return[BigInt(n),0];if(n===28)return[BigInt(n),1];throw new Error(\\\"Invalid yParityOrV value\\\")})();return typeof i<\\\"u\\\"?{r:Z(e,{size:32}),s:Z(r,{size:32}),v:i,yParity:s}:{r:Z(e,{size:32}),s:Z(r,{size:32}),yParity:s}}var i6e=x(()=>{u();uA();qe()});var un=x(()=>{u();Jk();w5e();zJ();Y5e();X5e();t6e();n6e();fp();st();$g();c5();IQ();wu();fa();Cxe();Dd();da();cy();Yt();gu();rm();Da();ep();nm();xi();Zi();qe();yl();kA();XQ();fB();bB();i6e();GN();TN()});var GJ=x(()=>{u();o6();Tu();WB()});function h6e(t){if(typeof window>\\\"u\\\")return;let e=r=>t(r.detail);return window.addEventListener(\\\"eip6963:announceProvider\\\",e),window.dispatchEvent(new CustomEvent(\\\"eip6963:requestProvider\\\")),()=>window.removeEventListener(\\\"eip6963:announceProvider\\\",e)}var m6e=x(()=>{u()});function eY(){let t=new Set,e=[],r=()=>h6e(i=>{e.some(({info:s})=>s.uuid===i.info.uuid)||(e=[...e,i],t.forEach(s=>s(e,{added:[i]})))}),n=r();return{_listeners(){return t},clear(){t.forEach(i=>i([],{removed:[...e]})),e=[]},destroy(){this.clear(),t.clear(),n?.()},findProvider({rdns:i}){return e.find(s=>s.info.rdns===i)},getProviders(){return e},reset(){this.clear(),n?.(),n=r()},subscribe(i,{emitImmediately:s}={}){return t.add(i),s&&i(e,{added:e}),()=>t.delete(i)}}}var g6e=x(()=>{u();m6e()});var y6e=x(()=>{u();g6e()});var E6e=q((KCr,rY)=>{\\\"use strict\\\";u();var gpt=Object.prototype.hasOwnProperty,Va=\\\"~\\\";function XA(){}Object.create&&(XA.prototype=Object.create(null),new XA().__proto__||(Va=!1));function ypt(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function x6e(t,e,r,n,i){if(typeof r!=\\\"function\\\")throw new TypeError(\\\"The listener must be a function\\\");var s=new ypt(r,n||t,i),o=Va?Va+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function oM(t,e){--t._eventsCount===0?t._events=new XA:delete t._events[e]}function ya(){this._events=new XA,this._eventsCount=0}ya.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)gpt.call(r,n)&&e.push(Va?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};ya.prototype.listeners=function(e){var r=Va?Va+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};ya.prototype.listenerCount=function(e){var r=Va?Va+e:e,n=this._events[r];return n?n.fn?1:n.length:0};ya.prototype.emit=function(e,r,n,i,s,o){var a=Va?Va+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,d,f;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,s),!0;case 6:return c.fn.call(c.context,r,n,i,s,o),!0}for(f=1,d=new Array(l-1);f<l;f++)d[f-1]=arguments[f];c.fn.apply(c.context,d)}else{var p=c.length,h;for(f=0;f<p;f++)switch(c[f].once&&this.removeListener(e,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,r);break;case 3:c[f].fn.call(c[f].context,r,n);break;case 4:c[f].fn.call(c[f].context,r,n,i);break;default:if(!d)for(h=1,d=new Array(l-1);h<l;h++)d[h-1]=arguments[h];c[f].fn.apply(c[f].context,d)}}return!0};ya.prototype.on=function(e,r,n){return x6e(this,e,r,n,!1)};ya.prototype.once=function(e,r,n){return x6e(this,e,r,n,!0)};ya.prototype.removeListener=function(e,r,n,i){var s=Va?Va+e:e;if(!this._events[s])return this;if(!r)return oM(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&oM(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:oM(this,s)}return this};ya.prototype.removeAllListeners=function(e){var r;return e?(r=Va?Va+e:e,this._events[r]&&oM(this,r)):(this._events=new XA,this._eventsCount=0),this};ya.prototype.off=ya.prototype.removeListener;ya.prototype.addListener=ya.prototype.on;ya.prefixed=Va;ya.EventEmitter=ya;typeof rY<\\\"u\\\"&&(rY.exports=ya)});var _6,aM=x(()=>{u();_6=Me(E6e(),1)});var k6e=q(N6e=>{\\\"use strict\\\";u();var C6=Vi();function xpt(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ept=typeof Object.is==\\\"function\\\"?Object.is:xpt,_pt=C6.useState,Cpt=C6.useEffect,Spt=C6.useLayoutEffect,Apt=C6.useDebugValue;function Tpt(t,e){var r=e(),n=_pt({inst:{value:r,getSnapshot:e}}),i=n[0].inst,s=n[1];return Spt(function(){i.value=r,i.getSnapshot=e,dY(i)&&s({inst:i})},[t,r,e]),Cpt(function(){return dY(i)&&s({inst:i}),t(function(){dY(i)&&s({inst:i})})},[t]),Apt(r),r}function dY(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Ept(t,r)}catch{return!0}}function Ipt(t,e){return e()}var Rpt=typeof window>\\\"u\\\"||typeof window.document>\\\"u\\\"||typeof window.document.createElement>\\\"u\\\"?Ipt:Tpt;N6e.useSyncExternalStore=C6.useSyncExternalStore!==void 0?C6.useSyncExternalStore:Rpt});var M6e=q((_8r,B6e)=>{\\\"use strict\\\";u();B6e.exports=k6e()});var L6e=q(D6e=>{\\\"use strict\\\";u();var mM=Vi(),Ppt=M6e();function Opt(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Npt=typeof Object.is==\\\"function\\\"?Object.is:Opt,kpt=Ppt.useSyncExternalStore,Bpt=mM.useRef,Mpt=mM.useEffect,Dpt=mM.useMemo,Lpt=mM.useDebugValue;D6e.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var s=Bpt(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Dpt(function(){function c(h){if(!l){if(l=!0,d=h,h=n(h),i!==void 0&&o.hasValue){var m=o.value;if(i(m,h))return f=m}return f=h}if(m=f,Npt(d,h))return m;var g=n(h);return i!==void 0&&i(m,g)?(d=h,m):(d=h,f=g)}var l=!1,d,f,p=r===void 0?null:r;return[function(){return c(e())},p===null?void 0:function(){return c(p())}]},[e,r,n,i]);var a=kpt(t,s[0],s[1]);return Mpt(function(){o.hasValue=!0,o.value=a},[a]),Lpt(a),a}});var F6e=q((T8r,U6e)=>{\\\"use strict\\\";u();U6e.exports=L6e()});var _3e=q(AM=>{\\\"use strict\\\";u();var Zpt=Symbol.for(\\\"react.transitional.element\\\"),Qpt=Symbol.for(\\\"react.fragment\\\");function E3e(t,e,r){var n=null;if(r!==void 0&&(n=\\\"\\\"+r),e.key!==void 0&&(n=\\\"\\\"+e.key),\\\"key\\\"in e){r={};for(var i in e)i!==\\\"key\\\"&&(r[i]=e[i])}else r=e;return e=r.ref,{$$typeof:Zpt,type:t,key:n,ref:e!==void 0?e:null,props:r}}AM.Fragment=Qpt;AM.jsx=E3e;AM.jsxs=E3e});var Tl=q((bTr,C3e)=>{\\\"use strict\\\";u();C3e.exports=_3e()});var z6,GY,hT=x(()=>{u();mA();z6=50000n,GY=Mve*32n});var KY,K3e=x(()=>{u();xi();Zi();qe();M5();Vd();iy();Ow();_u();hT();KY={block:B5({format(t){let e=t.transactions?.map(r=>{if(typeof r==\\\"string\\\")return r;let n=KY.transaction?.format(r);return n.typeHex===\\\"0x71\\\"?n.type=\\\"eip712\\\":n.typeHex===\\\"0xff\\\"&&(n.type=\\\"priority\\\"),n});return{l1BatchNumber:t.l1BatchNumber?Ge(t.l1BatchNumber):null,l1BatchTimestamp:t.l1BatchTimestamp?Ge(t.l1BatchTimestamp):null,transactions:e}}}),transaction:k5({format(t){let e={};return t.type===\\\"0x71\\\"?e.type=\\\"eip712\\\":t.type===\\\"0xff\\\"&&(e.type=\\\"priority\\\"),{...e,l1BatchNumber:t.l1BatchNumber?Ge(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?Ge(t.l1BatchTxIndex):null}}}),transactionReceipt:zk({format(t){return{l1BatchNumber:t.l1BatchNumber?Ge(t.l1BatchNumber):null,l1BatchTxIndex:t.l1BatchTxIndex?Ge(t.l1BatchTxIndex):null,logs:t.logs.map(e=>({...Qi(e),l1BatchNumber:e.l1BatchNumber?Ge(e.l1BatchNumber):null,transactionLogIndex:jr(e.transactionLogIndex),logType:e.logType})),l2ToL1Logs:t.l2ToL1Logs.map(e=>({blockNumber:Ge(e.blockHash),blockHash:e.blockHash,l1BatchNumber:e.l1BatchNumber?Ge(e.l1BatchNumber):null,transactionIndex:Ge(e.transactionIndex),shardId:Ge(e.shardId),isService:e.isService,sender:e.sender,key:e.key,value:e.value,transactionHash:e.transactionHash,logIndex:Ge(e.logIndex)}))}}}),transactionRequest:ZN({exclude:[\\\"customSignature\\\",\\\"factoryDeps\\\",\\\"gasPerPubdata\\\",\\\"paymaster\\\",\\\"paymasterInput\\\"],format(t){return t.gasPerPubdata||t.paymaster&&t.paymasterInput||t.factoryDeps||t.customSignature?{eip712Meta:{...t.gasPerPubdata?{gasPerPubdata:He(t.gasPerPubdata)}:{gasPerPubdata:He(z6)},...t.paymaster&&t.paymasterInput?{paymasterParams:{paymaster:t.paymaster,paymasterInput:Array.from(Hr(t.paymasterInput))}}:{},...t.factoryDeps?{factoryDeps:t.factoryDeps.map(e=>Array.from(Hr(e)))}:{},...t.customSignature?{customSignature:Array.from(Hr(t.customSignature))}:{}},type:\\\"0x71\\\"}:{}}})}});var RM,Z3e=x(()=>{u();st();RM=class extends W{constructor(){super([\\\"Transaction is not an EIP712 transaction.\\\",\\\"\\\",\\\"Transaction must:\\\",'  - include `type: \\\"eip712\\\"`',\\\"  - include one of the following: `customSignature`, `paymaster`, `paymasterInput`, `gasPerPubdata`, `factoryDeps`\\\"].join(`\\n`),{name:\\\"InvalidEip712TransactionError\\\"})}}});function PM(t){return!!(t.type===\\\"eip712\\\"||\\\"customSignature\\\"in t&&t.customSignature||\\\"paymaster\\\"in t&&t.paymaster||\\\"paymasterInput\\\"in t&&t.paymasterInput||\\\"gasPerPubdata\\\"in t&&typeof t.gasPerPubdata==\\\"bigint\\\"||\\\"factoryDeps\\\"in t&&t.factoryDeps)}var ZY=x(()=>{u()});function OM(t){let{chainId:e,to:r,from:n,paymaster:i,paymasterInput:s}=t;if(!PM(t))throw new RM;if(!e||e<=0)throw new Gd({chainId:e});if(r&&!lt(r))throw new cr({address:r});if(n&&!lt(n))throw new cr({address:n});if(i&&!lt(i))throw new cr({address:i});if(i&&!s)throw new W(\\\"`paymasterInput` must be provided when `paymaster` is defined\\\");if(!i&&s)throw new W(\\\"`paymaster` must be provided when `paymasterInput` is defined\\\")}var QY=x(()=>{u();bl();st();_w();da();Z3e();ZY()});function tht(t,e){return PM(t)?rht(t):uB(t,e)}function rht(t){let{chainId:e,gas:r,nonce:n,to:i,from:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,customSignature:l,factoryDeps:d,paymaster:f,paymasterInput:p,gasPerPubdata:h,data:m}=t;OM(t);let g=[n?He(n):\\\"0x\\\",c?He(c):\\\"0x\\\",a?He(a):\\\"0x\\\",r?He(r):\\\"0x\\\",i??\\\"0x\\\",o?He(o):\\\"0x\\\",m??\\\"0x\\\",He(e),He(\\\"\\\"),He(\\\"\\\"),He(e),s??\\\"0x\\\",h?He(h):He(z6),d??[],l??\\\"0x\\\",f&&p?[f,p]:[]];return ln([\\\"0x71\\\",qa(g)])}var Q3e,J3e=x(()=>{u();Ei();qe();E5();MA();hT();QY();ZY();Q3e={transaction:tht}});var NM,kM,BM,Y3e=x(()=>{u();st();NM=class extends W{constructor({givenLength:e,maxBytecodeSize:r}){super(`Bytecode cannot be longer than ${r} bytes. Given length: ${e}`,{name:\\\"BytecodeLengthExceedsMaxSizeError\\\"})}},kM=class extends W{constructor({givenLengthInWords:e}){super(`Bytecode length in 32-byte words must be odd. Given length in words: ${e}`,{name:\\\"BytecodeLengthInWordsMustBeOddError\\\"})}},BM=class extends W{constructor({givenLength:e}){super(`The bytecode length in bytes must be divisible by 32. Given length: ${e}`,{name:\\\"BytecodeLengthMustBeDivisibleBy32Error\\\"})}}});function X3e(t){let e=Oo(t);if(e.length%32!==0)throw new BM({givenLength:e.length});if(e.length>GY)throw new NM({givenLength:e.length,maxBytecodeSize:GY});let r=ik(e),n=Oo(r),i=e.length/32;if(i%2===0)throw new kM({givenLengthInWords:i});let s=Oo(i),o=Fr(s,{size:2}),a=new Uint8Array([1,0]);return n.set(a,0),n.set(o,2),n}var e_e=x(()=>{u();rm();Zi();iQ();hT();Y3e()});function nht(t){let{gas:e,nonce:r,to:n,from:i,value:s,maxFeePerGas:o,maxPriorityFeePerGas:a,factoryDeps:c,paymaster:l,paymasterInput:d,gasPerPubdata:f,data:p}=t;return{txType:113n,from:BigInt(i),to:n?BigInt(n):0n,gasLimit:e??0n,gasPerPubdataByteLimit:f??z6,maxFeePerGas:o??0n,maxPriorityFeePerGas:a??0n,paymaster:l?BigInt(l):0n,nonce:r?BigInt(r):0n,value:s??0n,data:p??\\\"0x\\\",factoryDeps:c?.map(h=>He(X3e(h)))??[],paymasterInput:d||\\\"0x\\\"}}var t_e,r_e=x(()=>{u();qe();hT();QY();e_e();t_e=t=>{OM(t);let e=nht(t);return{domain:{name:\\\"zkSync\\\",version:\\\"2\\\",chainId:t.chainId},types:{Transaction:[{name:\\\"txType\\\",type:\\\"uint256\\\"},{name:\\\"from\\\",type:\\\"uint256\\\"},{name:\\\"to\\\",type:\\\"uint256\\\"},{name:\\\"gasLimit\\\",type:\\\"uint256\\\"},{name:\\\"gasPerPubdataByteLimit\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymaster\\\",type:\\\"uint256\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"value\\\",type:\\\"uint256\\\"},{name:\\\"data\\\",type:\\\"bytes\\\"},{name:\\\"factoryDeps\\\",type:\\\"bytes32[]\\\"},{name:\\\"paymasterInput\\\",type:\\\"bytes\\\"}]},primaryType:\\\"Transaction\\\",message:e}}});var MM,JY=x(()=>{u();K3e();J3e();r_e();MM={blockTime:1e3,formatters:KY,serializers:Q3e,custom:{getEip712Domain:t_e}}});var DM,YY=x(()=>{u();DM={gasPriceOracle:{address:\\\"0x420000000000000000000000000000000000000F\\\"},l1Block:{address:\\\"0x4200000000000000000000000000000000000015\\\"},l2CrossDomainMessenger:{address:\\\"0x4200000000000000000000000000000000000007\\\"},l2Erc721Bridge:{address:\\\"0x4200000000000000000000000000000000000014\\\"},l2StandardBridge:{address:\\\"0x4200000000000000000000000000000000000010\\\"},l2ToL1MessagePasser:{address:\\\"0x4200000000000000000000000000000000000016\\\"}}});var n_e,i_e=x(()=>{u();xi();M5();iy();Ow();n_e={block:B5({format(t){return{transactions:t.transactions?.map(r=>{if(typeof r==\\\"string\\\")return r;let n=zd(r);return n.typeHex===\\\"0x7e\\\"&&(n.isSystemTx=r.isSystemTx,n.mint=r.mint?Ge(r.mint):void 0,n.sourceHash=r.sourceHash,n.type=\\\"deposit\\\"),n}),stateRoot:t.stateRoot}}}),transaction:k5({format(t){let e={};return t.type===\\\"0x7e\\\"&&(e.isSystemTx=t.isSystemTx,e.mint=t.mint?Ge(t.mint):void 0,e.sourceHash=t.sourceHash,e.type=\\\"deposit\\\"),e}}),transactionReceipt:zk({format(t){return{l1GasPrice:t.l1GasPrice?Ge(t.l1GasPrice):null,l1GasUsed:t.l1GasUsed?Ge(t.l1GasUsed):null,l1Fee:t.l1Fee?Ge(t.l1Fee):null,l1FeeScalar:t.l1FeeScalar?Number(t.l1FeeScalar):null}}})}});function XY(t,e){return sht(t)?iht(t):uB(t,e)}function iht(t){oht(t);let{sourceHash:e,data:r,from:n,gas:i,isSystemTx:s,mint:o,to:a,value:c}=t,l=[e,n,a??\\\"0x\\\",o?He(o):\\\"0x\\\",c?He(c):\\\"0x\\\",i?He(i):\\\"0x\\\",s?\\\"0x1\\\":\\\"0x\\\",r??\\\"0x\\\"];return ln([\\\"0x7e\\\",qa(l)])}function sht(t){return t.type===\\\"deposit\\\"||typeof t.sourceHash<\\\"u\\\"}function oht(t){let{from:e,to:r}=t;if(e&&!lt(e))throw new cr({address:e});if(r&&!lt(r))throw new cr({address:r})}var s_e,eX=x(()=>{u();bl();da();Ei();qe();E5();MA();s_e={transaction:XY}});var Si,Fm=x(()=>{u();YY();i_e();eX();Si={blockTime:2e3,contracts:DM,formatters:n_e,serializers:s_e}});var LM,o_e=x(()=>{u();Yt();LM=Oe({id:42161,name:\\\"Arbitrum One\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},blockTime:250,rpcUrls:{default:{http:[\\\"https://arb1.arbitrum.io/rpc\\\"]}},blockExplorers:{default:{name:\\\"Arbiscan\\\",url:\\\"https://arbiscan.io\\\",apiUrl:\\\"https://api.arbiscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:7654707}}})});var UM,a_e=x(()=>{u();Yt();UM=Oe({id:421614,name:\\\"Arbitrum Sepolia\\\",blockTime:250,nativeCurrency:{name:\\\"Arbitrum Sepolia Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia-rollup.arbitrum.io/rpc\\\"]}},blockExplorers:{default:{name:\\\"Arbiscan\\\",url:\\\"https://sepolia.arbiscan.io\\\",apiUrl:\\\"https://api-sepolia.arbiscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:81930}},testnet:!0})});var FM,c_e=x(()=>{u();Yt();FM=Oe({id:43114,name:\\\"Avalanche\\\",blockTime:1700,nativeCurrency:{decimals:18,name:\\\"Avalanche\\\",symbol:\\\"AVAX\\\"},rpcUrls:{default:{http:[\\\"https://api.avax.network/ext/bc/C/rpc\\\"]}},blockExplorers:{default:{name:\\\"SnowTrace\\\",url:\\\"https://snowtrace.io\\\",apiUrl:\\\"https://api.snowtrace.io\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:11907934}}})});var jM,l_e=x(()=>{u();Yt();jM=Oe({id:43113,name:\\\"Avalanche Fuji\\\",nativeCurrency:{decimals:18,name:\\\"Avalanche Fuji\\\",symbol:\\\"AVAX\\\"},rpcUrls:{default:{http:[\\\"https://api.avax-test.network/ext/bc/C/rpc\\\"]}},blockExplorers:{default:{name:\\\"SnowTrace\\\",url:\\\"https://testnet.snowtrace.io\\\",apiUrl:\\\"https://api-testnet.snowtrace.io\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:7096959}},testnet:!0})});var mT,Qw,aht,u_e=x(()=>{u();Fm();Yt();mT=1,Qw=Oe({...Si,id:8453,name:\\\"Base\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://mainnet.base.org\\\"]}},blockExplorers:{default:{name:\\\"Basescan\\\",url:\\\"https://basescan.org\\\",apiUrl:\\\"https://api.basescan.org/api\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[mT]:{address:\\\"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e\\\"}},l2OutputOracle:{[mT]:{address:\\\"0x56315b90c40730925ec5485cf004d835058518A0\\\"}},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:5022},portal:{[mT]:{address:\\\"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e\\\",blockCreated:17482143}},l1StandardBridge:{[mT]:{address:\\\"0x3154Cf16ccdb4C6d922629664174b904d80F2C35\\\",blockCreated:17482143}}},sourceId:mT}),aht=Oe({...Qw,experimental_preconfirmationTime:200,rpcUrls:{default:{http:[\\\"https://mainnet-preconf.base.org\\\"]}}})});var gT,yT,cht,d_e=x(()=>{u();Fm();Yt();gT=11155111,yT=Oe({...Si,id:84532,network:\\\"base-sepolia\\\",name:\\\"Base Sepolia\\\",nativeCurrency:{name:\\\"Sepolia Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia.base.org\\\"]}},blockExplorers:{default:{name:\\\"Basescan\\\",url:\\\"https://sepolia.basescan.org\\\",apiUrl:\\\"https://api-sepolia.basescan.org/api\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[gT]:{address:\\\"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1\\\"}},l2OutputOracle:{[gT]:{address:\\\"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254\\\"}},portal:{[gT]:{address:\\\"0x49f53e41452c74589e85ca1677426ba426459e85\\\",blockCreated:4446677}},l1StandardBridge:{[gT]:{address:\\\"0xfd0Bf71F60660E2f608ed56e1659C450eB113120\\\",blockCreated:4446677}},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:1059647}},testnet:!0,sourceId:gT}),cht=Oe({...yT,experimental_preconfirmationTime:200,rpcUrls:{default:{http:[\\\"https://sepolia-preconf.base.org\\\"]}}})});var HM,qM,f_e=x(()=>{u();Fm();Yt();HM=1,qM=Oe({...Si,id:81457,name:\\\"Blast\\\",nativeCurrency:{decimals:18,name:\\\"Ether\\\",symbol:\\\"ETH\\\"},rpcUrls:{default:{http:[\\\"https://rpc.blast.io\\\"]}},blockExplorers:{default:{name:\\\"Blastscan\\\",url:\\\"https://blastscan.io\\\",apiUrl:\\\"https://api.blastscan.io/api\\\"}},contracts:{...Si.contracts,multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:212929},l2OutputOracle:{[HM]:{address:\\\"0x826D1B0D4111Ad9146Eb8941D7Ca2B6a44215c76\\\",blockCreated:19300358}},portal:{[HM]:{address:\\\"0x0Ec68c5B10F21EFFb74f2A5C61DFe6b08C0Db6Cb\\\",blockCreated:19300357}},l1StandardBridge:{[HM]:{address:\\\"0x697402166Fbf2F22E970df8a6486Ef171dbfc524\\\",blockCreated:19300360}}},sourceId:HM})});var lht,zM,p_e=x(()=>{u();Yt();lht=11155111,zM=Oe({id:168587773,name:\\\"Blast Sepolia\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia.blast.io\\\"]}},blockExplorers:{default:{name:\\\"Blastscan\\\",url:\\\"https://sepolia.blastscan.io\\\",apiUrl:\\\"https://api-sepolia.blastscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:756690}},testnet:!0,sourceId:lht})});var $M,h_e=x(()=>{u();Yt();$M=Oe({id:56,name:\\\"BNB Smart Chain\\\",blockTime:750,nativeCurrency:{decimals:18,name:\\\"BNB\\\",symbol:\\\"BNB\\\"},rpcUrls:{default:{http:[\\\"https://56.rpc.thirdweb.com\\\"]}},blockExplorers:{default:{name:\\\"BscScan\\\",url:\\\"https://bscscan.com\\\",apiUrl:\\\"https://api.bscscan.com/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:15921452}}})});var VM,m_e=x(()=>{u();Yt();VM=Oe({id:97,name:\\\"BNB Smart Chain Testnet\\\",nativeCurrency:{decimals:18,name:\\\"BNB\\\",symbol:\\\"tBNB\\\"},rpcUrls:{default:{http:[\\\"https://data-seed-prebsc-1-s1.bnbchain.org:8545\\\"]}},blockExplorers:{default:{name:\\\"BscScan\\\",url:\\\"https://testnet.bscscan.com\\\",apiUrl:\\\"https://api-testnet.bscscan.com/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:17422483}},testnet:!0})});async function uht(t,e){let r=await t.request({method:\\\"eth_gasPrice\\\",params:[e]});return BigInt(r)}async function dht(t,e){let r=await t.request({method:\\\"eth_maxPriorityFeePerGas\\\",params:[e]});return BigInt(r)}var g_e,y_e=x(()=>{u();g_e={estimateFeesPerGas:async t=>{if(!t.request?.feeCurrency)return null;let[e,r]=await Promise.all([uht(t.client,t.request.feeCurrency),dht(t.client,t.request.feeCurrency)]);return{maxFeePerGas:t.multiply(e-r)+r,maxPriorityFeePerGas:r}}}});function tX(t){return t===0||t===0n||t===void 0||t===null||t===\\\"0\\\"||t===\\\"\\\"||typeof t==\\\"string\\\"&&(An(t).toLowerCase()===\\\"0x\\\"||An(t).toLowerCase()===\\\"0x00\\\")}function $6(t){return!tX(t)}function fht(t){return typeof t.maxFeePerGas<\\\"u\\\"&&typeof t.maxPriorityFeePerGas<\\\"u\\\"}function WM(t){return t.type===\\\"cip64\\\"?!0:fht(t)&&$6(t.feeCurrency)}var rX=x(()=>{u();nm()});var b_e,w_e=x(()=>{u();xi();M5();iy();_u();rX();b_e={block:B5({format(t){return{transactions:t.transactions?.map(r=>typeof r==\\\"string\\\"?r:{...zd(r),...r.gatewayFee?{gatewayFee:Ge(r.gatewayFee),gatewayFeeRecipient:r.gatewayFeeRecipient}:{},feeCurrency:r.feeCurrency})}}}),transaction:k5({format(t){if(t.type===\\\"0x7e\\\")return{isSystemTx:t.isSystemTx,mint:t.mint?Ge(t.mint):void 0,sourceHash:t.sourceHash,type:\\\"deposit\\\"};let e={feeCurrency:t.feeCurrency};return t.type===\\\"0x7b\\\"?e.type=\\\"cip64\\\":(t.type===\\\"0x7c\\\"&&(e.type=\\\"cip42\\\"),e.gatewayFee=t.gatewayFee?Ge(t.gatewayFee):null,e.gatewayFeeRecipient=t.gatewayFeeRecipient),e}}),transactionRequest:ZN({format(t){let e={};return t.feeCurrency&&(e.feeCurrency=t.feeCurrency),WM(t)&&(e.type=\\\"0x7b\\\"),e}})}});function pht(t,e){return WM(t)?hht(t,e):XY(t,e)}function hht(t,e){ght(t);let{chainId:r,gas:n,nonce:i,to:s,value:o,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,feeCurrency:d,data:f}=t,p=[He(r),i?He(i):\\\"0x\\\",c?He(c):\\\"0x\\\",a?He(a):\\\"0x\\\",n?He(n):\\\"0x\\\",s??\\\"0x\\\",o?He(o):\\\"0x\\\",f??\\\"0x\\\",Nw(l),d,...gy(t,e)];return ln([\\\"0x7b\\\",qa(p)])}function ght(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:s,feeCurrency:o}=t;if(e<=0)throw new Gd({chainId:e});if(s&&!lt(s))throw new cr({address:s});if(n)throw new W(\\\"`gasPrice` is not a valid CIP-64 Transaction attribute.\\\");if($6(i)&&i>mht)throw new Ac({maxFeePerGas:i});if($6(r)&&$6(i)&&r>i)throw new xu({maxFeePerGas:i,maxPriorityFeePerGas:r});if($6(o)&&!lt(o))throw new W(\\\"`feeCurrency` MUST be a token address for CIP-64 transactions.\\\");if(tX(o))throw new W(\\\"`feeCurrency` must be provided for CIP-64 transactions.\\\")}var v_e,mht,x_e=x(()=>{u();mA();bl();st();_w();cp();eX();da();Ei();qe();E5();JQ();MA();rX();v_e={transaction:pht};mht=ry});var E_e,__e=x(()=>{u();YY();y_e();w_e();x_e();E_e={blockTime:1e3,contracts:DM,formatters:b_e,serializers:v_e,fees:g_e}});var GM,C_e=x(()=>{u();__e();Yt();GM=Oe({...E_e,id:42220,name:\\\"Celo\\\",nativeCurrency:{decimals:18,name:\\\"CELO\\\",symbol:\\\"CELO\\\"},rpcUrls:{default:{http:[\\\"https://forno.celo.org\\\"]}},blockExplorers:{default:{name:\\\"Celo Explorer\\\",url:\\\"https://celoscan.io\\\",apiUrl:\\\"https://api.celoscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:13112599}},testnet:!1})});var KM,S_e=x(()=>{u();Yt();KM=Oe({id:1030,name:\\\"Conflux eSpace\\\",nativeCurrency:{name:\\\"Conflux\\\",symbol:\\\"CFX\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://evm.confluxrpc.com\\\"],webSocket:[\\\"wss://evm.confluxrpc.com/ws\\\"]}},blockExplorers:{default:{name:\\\"ConfluxScan\\\",url:\\\"https://evm.confluxscan.org\\\"}},contracts:{multicall3:{address:\\\"0xEFf0078910f638cd81996cc117bccD3eDf2B072F\\\",blockCreated:68602935}}})});var ZM,A_e=x(()=>{u();Yt();ZM=Oe({id:250,name:\\\"Fantom\\\",nativeCurrency:{decimals:18,name:\\\"Fantom\\\",symbol:\\\"FTM\\\"},rpcUrls:{default:{http:[\\\"https://250.rpc.thirdweb.com\\\"]}},blockExplorers:{default:{name:\\\"FTMScan\\\",url:\\\"https://ftmscan.com\\\",apiUrl:\\\"https://api.ftmscan.com/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:33001987}}})});var QM,T_e=x(()=>{u();Yt();QM=Oe({id:14,name:\\\"Flare Mainnet\\\",nativeCurrency:{decimals:18,name:\\\"Flare\\\",symbol:\\\"FLR\\\"},rpcUrls:{default:{http:[\\\"https://flare-api.flare.network/ext/C/rpc\\\"]}},blockExplorers:{default:{name:\\\"Flare Explorer\\\",url:\\\"https://flare-explorer.flare.network\\\",apiUrl:\\\"https://flare-explorer.flare.network/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:3002461}}})});var JM,I_e=x(()=>{u();Yt();JM=Oe({id:100,name:\\\"Gnosis\\\",nativeCurrency:{decimals:18,name:\\\"xDAI\\\",symbol:\\\"XDAI\\\"},blockTime:5e3,rpcUrls:{default:{http:[\\\"https://rpc.gnosischain.com\\\"],webSocket:[\\\"wss://rpc.gnosischain.com/wss\\\"]}},blockExplorers:{default:{name:\\\"Gnosisscan\\\",url:\\\"https://gnosisscan.io\\\",apiUrl:\\\"https://api.gnosisscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:21022491}}})});async function R_e(t,e){let{account:r=t.account}=e;if(!r)throw new In;let n=Ze(r);try{let{accessList:i,blockNumber:s,blockTag:o,data:a,gas:c,gasPrice:l,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:p,to:h,value:m,...g}=e,v=(typeof s==\\\"bigint\\\"?Z(s):void 0)||o;xs(e);let b=t.chain?.formatters?.transactionRequest?.format,S=(b||Hs)({...Tc(g,{format:b}),account:n,accessList:i,data:a,gas:c,gasPrice:l,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:p,to:h,value:m},\\\"estimateGas\\\"),{baseFeePerGas:T,gasLimit:N,priorityFeePerGas:O}=await t.request({method:\\\"linea_estimateGas\\\",params:v?[S,v]:[S]});return{baseFeePerGas:BigInt(T),gasLimit:BigInt(N),priorityFeePerGas:BigInt(O)}}catch(i){throw Y5(i,{...e,account:n,chain:t.chain})}}var P_e=x(()=>{u();en();Cl();qe();kk();Xg();_u();qd()});async function O_e({client:t,multiply:e,request:r,type:n}){try{let i=await R_e(t,{...r,account:r?.account}),{priorityFeePerGas:s}=i,a=e(BigInt(i.baseFeePerGas))+s;return n===\\\"legacy\\\"?{gasPrice:a}:{maxFeePerGas:a,maxPriorityFeePerGas:s}}catch{return null}}var YM,nX=x(()=>{u();P_e();YM={fees:{estimateFeesPerGas:O_e,async maxPriorityFeePerGas({block:t,client:e,request:r}){let n=await O_e({block:t,client:e,multiply:i=>i,request:r,type:\\\"eip1559\\\"});return n?.maxPriorityFeePerGas?n.maxPriorityFeePerGas:null}}}});var XM,N_e=x(()=>{u();nX();Yt();XM=Oe({...YM,id:59144,name:\\\"Linea Mainnet\\\",blockTime:2e3,nativeCurrency:{name:\\\"Linea Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.linea.build\\\"],webSocket:[\\\"wss://rpc.linea.build\\\"]}},blockExplorers:{default:{name:\\\"Etherscan\\\",url:\\\"https://lineascan.build\\\",apiUrl:\\\"https://api.lineascan.build/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:42},ensRegistry:{address:\\\"0x50130b669B28C339991d8676FA73CF122a121267\\\",blockCreated:6682888},ensUniversalResolver:{address:\\\"0x4D41762915F83c76EcaF6776d9b08076aA32b492\\\",blockCreated:22222151}},ensTlds:[\\\".linea.eth\\\"],testnet:!1})});var eD,k_e=x(()=>{u();nX();Yt();eD=Oe({...YM,id:59141,name:\\\"Linea Sepolia Testnet\\\",nativeCurrency:{name:\\\"Linea Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.sepolia.linea.build\\\"],webSocket:[\\\"wss://rpc.sepolia.linea.build\\\"]}},blockExplorers:{default:{name:\\\"Etherscan\\\",url:\\\"https://sepolia.lineascan.build\\\",apiUrl:\\\"https://api-sepolia.lineascan.build/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:227427},ensRegistry:{address:\\\"0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7\\\",blockCreated:2395094},ensUniversalResolver:{address:\\\"0x4D41762915F83c76EcaF6776d9b08076aA32b492\\\",blockCreated:17168484}},ensTlds:[\\\".linea.eth\\\"],testnet:!0})});var tD,B_e=x(()=>{u();Yt();tD=Oe({id:1,name:\\\"Ethereum\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},blockTime:12e3,rpcUrls:{default:{http:[\\\"https://eth.merkle.io\\\"]}},blockExplorers:{default:{name:\\\"Etherscan\\\",url:\\\"https://etherscan.io\\\",apiUrl:\\\"https://api.etherscan.io/api\\\"}},contracts:{ensUniversalResolver:{address:\\\"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\\\",blockCreated:23085558},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:14353601}}})});var rD,M_e=x(()=>{u();Yt();rD=Oe({id:5e3,name:\\\"Mantle\\\",nativeCurrency:{decimals:18,name:\\\"MNT\\\",symbol:\\\"MNT\\\"},rpcUrls:{default:{http:[\\\"https://rpc.mantle.xyz\\\"]}},blockExplorers:{default:{name:\\\"Mantle Explorer\\\",url:\\\"https://mantlescan.xyz/\\\",apiUrl:\\\"https://api.mantlescan.xyz/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:304717}}})});var nD,D_e=x(()=>{u();Yt();nD=Oe({id:5003,name:\\\"Mantle Sepolia Testnet\\\",nativeCurrency:{decimals:18,name:\\\"MNT\\\",symbol:\\\"MNT\\\"},rpcUrls:{default:{http:[\\\"https://rpc.sepolia.mantle.xyz\\\"]}},blockExplorers:{default:{name:\\\"Mantle Testnet Explorer\\\",url:\\\"https://explorer.sepolia.mantle.xyz/\\\",apiUrl:\\\"https://explorer.sepolia.mantle.xyz/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:4584012}},testnet:!0})});var bT,iD,L_e=x(()=>{u();Fm();Yt();bT=1,iD=Oe({...Si,id:34443,name:\\\"Mode Mainnet\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://mainnet.mode.network\\\"]}},blockExplorers:{default:{name:\\\"Modescan\\\",url:\\\"https://modescan.io\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[bT]:{address:\\\"0x6f13EFadABD9269D6cEAd22b448d434A1f1B433E\\\"}},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:2465882},l2OutputOracle:{[bT]:{address:\\\"0x4317ba146D4933D889518a3e5E11Fe7a53199b04\\\"}},portal:{[bT]:{address:\\\"0x8B34b14c7c7123459Cf3076b8Cb929BE097d0C07\\\"}},l1StandardBridge:{[bT]:{address:\\\"0x735aDBbE72226BD52e818E7181953f42E3b0FF21\\\"}}},sourceId:bT})});var wT,sD,U_e=x(()=>{u();Fm();Yt();wT=1,sD=Oe({...Si,id:10,name:\\\"OP Mainnet\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://mainnet.optimism.io\\\"]}},blockExplorers:{default:{name:\\\"Optimism Explorer\\\",url:\\\"https://optimistic.etherscan.io\\\",apiUrl:\\\"https://api-optimistic.etherscan.io/api\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[wT]:{address:\\\"0xe5965Ab5962eDc7477C8520243A95517CD252fA9\\\"}},l2OutputOracle:{[wT]:{address:\\\"0xdfe97868233d1aa22e815a266982f2cf17685a27\\\"}},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:4286263},portal:{[wT]:{address:\\\"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed\\\"}},l1StandardBridge:{[wT]:{address:\\\"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1\\\"}}},sourceId:wT})});var vT,oD,F_e=x(()=>{u();Fm();Yt();vT=11155111,oD=Oe({...Si,id:11155420,name:\\\"OP Sepolia\\\",nativeCurrency:{name:\\\"Sepolia Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia.optimism.io\\\"]}},blockExplorers:{default:{name:\\\"Blockscout\\\",url:\\\"https://optimism-sepolia.blockscout.com\\\",apiUrl:\\\"https://optimism-sepolia.blockscout.com/api\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[vT]:{address:\\\"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1\\\"}},l2OutputOracle:{[vT]:{address:\\\"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F\\\"}},multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:1620204},portal:{[vT]:{address:\\\"0x16Fc5058F25648194471939df75CF27A2fdC48BC\\\"}},l1StandardBridge:{[vT]:{address:\\\"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1\\\"}}},testnet:!0,sourceId:vT})});var aD,j_e=x(()=>{u();Yt();aD=Oe({id:137,name:\\\"Polygon\\\",blockTime:2e3,nativeCurrency:{name:\\\"POL\\\",symbol:\\\"POL\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://polygon.drpc.org\\\"]}},blockExplorers:{default:{name:\\\"PolygonScan\\\",url:\\\"https://polygonscan.com\\\",apiUrl:\\\"https://api.etherscan.io/v2/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:25770160}}})});var cD,H_e=x(()=>{u();Yt();cD=Oe({id:80002,name:\\\"Polygon Amoy\\\",nativeCurrency:{name:\\\"POL\\\",symbol:\\\"POL\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc-amoy.polygon.technology\\\"]}},blockExplorers:{default:{name:\\\"PolygonScan\\\",url:\\\"https://amoy.polygonscan.com\\\",apiUrl:\\\"https://api.etherscan.io/v2/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:3127388}},testnet:!0})});var lD,q_e=x(()=>{u();Yt();lD=Oe({id:30,name:\\\"Rootstock Mainnet\\\",network:\\\"rootstock\\\",nativeCurrency:{decimals:18,name:\\\"Rootstock Bitcoin\\\",symbol:\\\"RBTC\\\"},rpcUrls:{default:{http:[\\\"https://public-node.rsk.co\\\"]}},blockExplorers:{default:{name:\\\"RSK Explorer\\\",url:\\\"https://explorer.rsk.co\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:4249540}}})});var uD,z_e=x(()=>{u();Yt();uD=Oe({id:534352,name:\\\"Scroll\\\",blockTime:3e3,nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.scroll.io\\\"],webSocket:[\\\"wss://wss-rpc.scroll.io/ws\\\"]}},blockExplorers:{default:{name:\\\"Scrollscan\\\",url:\\\"https://scrollscan.com\\\",apiUrl:\\\"https://api.scrollscan.com/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:14}},testnet:!1})});var dD,$_e=x(()=>{u();Yt();dD=Oe({id:534351,name:\\\"Scroll Sepolia\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia-rpc.scroll.io\\\"]}},blockExplorers:{default:{name:\\\"Scrollscan\\\",url:\\\"https://sepolia.scrollscan.com\\\",apiUrl:\\\"https://api-sepolia.scrollscan.com/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:9473}},testnet:!0})});var fD,V_e=x(()=>{u();Yt();fD=Oe({id:1329,name:\\\"Sei Network\\\",nativeCurrency:{name:\\\"Sei\\\",symbol:\\\"SEI\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://evm-rpc.sei-apis.com/\\\"],webSocket:[\\\"wss://evm-ws.sei-apis.com/\\\"]}},blockExplorers:{default:{name:\\\"Seiscan\\\",url:\\\"https://seiscan.io\\\",apiUrl:\\\"https://api.etherscan.io/v2/api\\\"}},contracts:{multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\"}}})});var pD,W_e=x(()=>{u();Yt();pD=Oe({id:11155111,name:\\\"Sepolia\\\",nativeCurrency:{name:\\\"Sepolia Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://11155111.rpc.thirdweb.com\\\"]}},blockExplorers:{default:{name:\\\"Etherscan\\\",url:\\\"https://sepolia.etherscan.io\\\",apiUrl:\\\"https://api-sepolia.etherscan.io/api\\\"}},contracts:{multicall3:{address:\\\"0xca11bde05977b3631167028862be2a173976ca11\\\",blockCreated:751532},ensUniversalResolver:{address:\\\"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\\\",blockCreated:8928790}},testnet:!0})});var xT,G_e=x(()=>{u();Yt();JY();xT=Oe({...MM,blockTime:200,id:324,name:\\\"ZKsync Era\\\",network:\\\"zksync-era\\\",nativeCurrency:{decimals:18,name:\\\"Ether\\\",symbol:\\\"ETH\\\"},rpcUrls:{default:{http:[\\\"https://mainnet.era.zksync.io\\\"],webSocket:[\\\"wss://mainnet.era.zksync.io/ws\\\"]}},blockExplorers:{default:{name:\\\"ZKsync Explorer\\\",url:\\\"https://explorer.zksync.io/\\\",apiUrl:\\\"https://block-explorer-api.mainnet.zksync.io/api\\\"}},contracts:{multicall3:{address:\\\"0xF9cda624FBC7e059355ce98a31693d299FACd963\\\",blockCreated:3908235},erc6492Verifier:{address:\\\"0xfB688330379976DA81eB64Fe4BF50d7401763B9C\\\",blockCreated:45659388}}})});var ET,K_e=x(()=>{u();Yt();JY();ET=Oe({...MM,blockTime:200,id:300,name:\\\"ZKsync Sepolia Testnet\\\",network:\\\"zksync-sepolia-testnet\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://sepolia.era.zksync.dev\\\"],webSocket:[\\\"wss://sepolia.era.zksync.dev/ws\\\"]}},blockExplorers:{default:{name:\\\"ZKsync Explorer\\\",url:\\\"https://sepolia.explorer.zksync.io/\\\",blockExplorerApi:\\\"https://block-explorer-api.sepolia.zksync.dev/api\\\"}},contracts:{multicall3:{address:\\\"0xF9cda624FBC7e059355ce98a31693d299FACd963\\\"},erc6492Verifier:{address:\\\"0xfB688330379976DA81eB64Fe4BF50d7401763B9C\\\",blockCreated:3855712}},testnet:!0})});var _T,hD,Z_e=x(()=>{u();Fm();Yt();_T=1,hD=Oe({...Si,id:7777777,name:\\\"Zora\\\",nativeCurrency:{decimals:18,name:\\\"Ether\\\",symbol:\\\"ETH\\\"},rpcUrls:{default:{http:[\\\"https://rpc.zora.energy\\\"],webSocket:[\\\"wss://rpc.zora.energy\\\"]}},blockExplorers:{default:{name:\\\"Explorer\\\",url:\\\"https://explorer.zora.energy\\\",apiUrl:\\\"https://explorer.zora.energy/api\\\"}},contracts:{...Si.contracts,disputeGameFactory:{[_T]:{address:\\\"0xB0F15106fa1e473Ddb39790f197275BC979Aa37e\\\"}},l2OutputOracle:{[_T]:{address:\\\"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c\\\"}},multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:5882},portal:{[_T]:{address:\\\"0x1a0ad011913A150f69f6A19DF447A0CfD9551054\\\"}},l1StandardBridge:{[_T]:{address:\\\"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631\\\"}}},sourceId:_T})});var mD,gD,Q_e=x(()=>{u();Fm();Yt();mD=11155111,gD=Oe({...Si,id:999999999,name:\\\"Zora Sepolia\\\",network:\\\"zora-sepolia\\\",nativeCurrency:{decimals:18,name:\\\"Zora Sepolia\\\",symbol:\\\"ETH\\\"},rpcUrls:{default:{http:[\\\"https://sepolia.rpc.zora.energy\\\"],webSocket:[\\\"wss://sepolia.rpc.zora.energy\\\"]}},blockExplorers:{default:{name:\\\"Zora Sepolia Explorer\\\",url:\\\"https://sepolia.explorer.zora.energy/\\\",apiUrl:\\\"https://sepolia.explorer.zora.energy/api\\\"}},contracts:{...Si.contracts,l2OutputOracle:{[mD]:{address:\\\"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9\\\"}},multicall3:{address:\\\"0xcA11bde05977b3631167028862bE2a173976CA11\\\",blockCreated:83160},portal:{[mD]:{address:\\\"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f\\\"}},l1StandardBridge:{[mD]:{address:\\\"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB\\\"}}},sourceId:mD,testnet:!0})});var iX=x(()=>{u();o_e();a_e();c_e();l_e();u_e();d_e();f_e();p_e();h_e();m_e();C_e();S_e();A_e();T_e();I_e();N_e();k_e();B_e();M_e();D_e();L_e();U_e();F_e();j_e();H_e();q_e();z_e();$_e();V_e();W_e();G_e();K_e();Z_e();Q_e()});function V6(t,{strict:e=!0}={}){return!t||typeof t!=\\\"string\\\"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith(\\\"0x\\\")}var yD=x(()=>{u()});function sX(t){return V6(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}var dCe=x(()=>{u();yD()});var oX,fCe=x(()=>{u();oX=\\\"2.47.6\\\"});function pCe(t,e){return e?.(t)?t:t&&typeof t==\\\"object\\\"&&\\\"cause\\\"in t&&t.cause!==void 0?pCe(t.cause,e):e?null:t}var aX,Qd,ST=x(()=>{u();fCe();aX={getDocsUrl:({docsBaseUrl:t,docsPath:e=\\\"\\\",docsSlug:r})=>e?`${t??\\\"https://viem.sh\\\"}${e}${r?`#${r}`:\\\"\\\"}`:void 0,version:`viem@${oX}`},Qd=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,s=aX.getDocsUrl?.({...r,docsPath:i}),o=[e||\\\"An error occurred.\\\",\\\"\\\",...r.metaMessages?[...r.metaMessages,\\\"\\\"]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...aX.version?[`Version: ${aX.version}`]:[]].join(`\\n`);super(o,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"metaMessages\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"version\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"BaseError\\\"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=oX}walk(e){return pCe(this,e)}}});var AT,hCe=x(()=>{u();ST();AT=class extends Qd{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:\\\"SizeExceedsPaddingSizeError\\\"})}}});function Ny(t,{dir:e,size:r=32}={}){return typeof t==\\\"string\\\"?bht(t,{dir:e,size:r}):wht(t,{dir:e,size:r})}function bht(t,{dir:e,size:r=32}={}){if(r===null)return t;let n=t.replace(\\\"0x\\\",\\\"\\\");if(n.length>r*2)throw new AT({size:Math.ceil(n.length/2),targetSize:r,type:\\\"hex\\\"});return`0x${n[e===\\\"right\\\"?\\\"padEnd\\\":\\\"padStart\\\"](r*2,\\\"0\\\")}`}function wht(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new AT({size:t.length,targetSize:r,type:\\\"bytes\\\"});let n=new Uint8Array(r);for(let i=0;i<r;i++){let s=e===\\\"right\\\";n[s?i:r-i-1]=t[s?i:t.length-i-1]}return n}var cX=x(()=>{u();hCe()});var TT,bD,lX=x(()=>{u();ST();TT=class extends Qd{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number \\\"${s}\\\" is not in safe ${i?`${i*8}-bit ${n?\\\"signed\\\":\\\"unsigned\\\"} `:\\\"\\\"}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:\\\"IntegerOutOfRangeError\\\"})}},bD=class extends Qd{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:\\\"SizeOverflowError\\\"})}}});function Jw(t,{size:e}){if(sX(t)>e)throw new bD({givenSize:sX(t),maxSize:e})}var uX=x(()=>{u();lX();dCe()});function IT(t,e={}){return typeof t==\\\"number\\\"||typeof t==\\\"bigint\\\"?wD(t,e):typeof t==\\\"string\\\"?gCe(t,e):typeof t==\\\"boolean\\\"?mCe(t,e):dX(t,e)}function mCe(t,e={}){let r=`0x${Number(t)}`;return typeof e.size==\\\"number\\\"?(Jw(r,{size:e.size}),Ny(r,{size:e.size})):r}function dX(t,e={}){let r=\\\"\\\";for(let i=0;i<t.length;i++)r+=vht[t[i]];let n=`0x${r}`;return typeof e.size==\\\"number\\\"?(Jw(n,{size:e.size}),Ny(n,{dir:\\\"right\\\",size:e.size})):n}function wD(t,e={}){let{signed:r,size:n}=e,i=BigInt(t),s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t==\\\"number\\\"&&(s=BigInt(Number.MAX_SAFE_INTEGER));let o=typeof s==\\\"bigint\\\"&&r?-s-1n:0;if(s&&i>s||i<o){let c=typeof t==\\\"bigint\\\"?\\\"n\\\":\\\"\\\";throw new TT({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:r,size:n,value:`${t}${c}`})}let a=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?Ny(a,{size:n}):a}function gCe(t,e={}){let r=xht.encode(t);return dX(r,e)}var vht,xht,vD=x(()=>{u();lX();cX();uX();vht=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));xht=new TextEncoder});function bCe(t,e={}){return typeof t==\\\"number\\\"||typeof t==\\\"bigint\\\"?Cht(t,e):typeof t==\\\"boolean\\\"?_ht(t,e):V6(t)?wCe(t,e):fX(t,e)}function _ht(t,e={}){let r=new Uint8Array(1);return r[0]=Number(t),typeof e.size==\\\"number\\\"?(Jw(r,{size:e.size}),Ny(r,{size:e.size})):r}function yCe(t){if(t>=jm.zero&&t<=jm.nine)return t-jm.zero;if(t>=jm.A&&t<=jm.F)return t-(jm.A-10);if(t>=jm.a&&t<=jm.f)return t-(jm.a-10)}function wCe(t,e={}){let r=t;e.size&&(Jw(r,{size:e.size}),r=Ny(r,{dir:\\\"right\\\",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){let c=yCe(n.charCodeAt(a++)),l=yCe(n.charCodeAt(a++));if(c===void 0||l===void 0)throw new Qd(`Invalid byte sequence (\\\"${n[a-2]}${n[a-1]}\\\" in \\\"${n}\\\").`);s[o]=c*16+l}return s}function Cht(t,e){let r=wD(t,e);return wCe(r)}function fX(t,e={}){let r=Eht.encode(t);return typeof e.size==\\\"number\\\"?(Jw(r,{size:e.size}),Ny(r,{dir:\\\"right\\\",size:e.size})):r}var Eht,jm,pX=x(()=>{u();ST();yD();cX();uX();vD();Eht=new TextEncoder;jm={zero:48,nine:57,A:65,F:70,a:97,f:102}});function vCe(t,e){let r=e||\\\"hex\\\",n=Mg(V6(t,{strict:!1})?bCe(t):t);return r===\\\"bytes\\\"?n:IT(n)}var xCe=x(()=>{u();$S();yD();pX();vD()});var xD,ECe=x(()=>{u();ST();xD=class extends Qd{constructor({address:e}){super(`Address \\\"${e}\\\" is invalid.`,{metaMessages:[\\\"- Address must be a hex value of 20 bytes (40 hex characters).\\\",\\\"- Address must match its checksum counterpart.\\\"],name:\\\"InvalidAddressError\\\"})}}});var W6,hX=x(()=>{u();W6=class extends Map{constructor(e){super(),Object.defineProperty(this,\\\"maxSize\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let r=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,r)),r}set(e,r){if(super.has(e)&&super.delete(e),super.set(e,r),this.maxSize&&this.size>this.maxSize){let n=super.keys().next().value;n!==void 0&&super.delete(n)}return this}}});function ED(t,e){if(mX.has(`${t}.${e}`))return mX.get(`${t}.${e}`);let r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=vCe(fX(r),\\\"bytes\\\"),i=(e?r.substring(`${e}0x`.length):r).split(\\\"\\\");for(let o=0;o<40;o+=2)n[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(n[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());let s=`0x${i.join(\\\"\\\")}`;return mX.set(`${t}.${e}`,s),s}function Jd(t,e){if(!_Ce(t,{strict:!1}))throw new xD({address:t});return ED(t,e)}var mX,gX=x(()=>{u();ECe();pX();xCe();hX();CCe();mX=new W6(8192)});function _Ce(t,e){let{strict:r=!0}=e??{},n=`${t}.${r}`;if(yX.has(n))return yX.get(n);let i=Sht.test(t)?t.toLowerCase()===t?!0:r?ED(t)===t:!0:!1;return yX.set(n,i),i}var Sht,yX,CCe=x(()=>{u();hX();gX();Sht=/^0x[a-fA-F0-9]{40}$/,yX=new W6(8192)});function RX(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var s;let o=c=>c===null?null:JSON.parse(c,e?.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,e?.replacer)),removeItem:i=>r.removeItem(i)}}var IX,Jmt,r4e,n4e=x(()=>{u();IX=t=>e=>{try{let r=t(e);return r instanceof Promise?r:{then(n){return IX(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return IX(n)(r)}}}},Jmt=(t,e)=>(r,n,i)=>{let s={storage:RX(()=>localStorage),partialize:g=>g,version:0,merge:(g,w)=>({...w,...g}),...e},o=!1,a=new Set,c=new Set,l=s.storage;if(!l)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...g)},n,i);let d=()=>{let g=s.partialize({...n()});return l.setItem(s.name,{state:g,version:s.version})},f=i.setState;i.setState=(g,w)=>{f(g,w),d()};let p=t((...g)=>{r(...g),d()},n,i);i.getInitialState=()=>p;let h,m=()=>{var g,w;if(!l)return;o=!1,a.forEach(b=>{var _;return b((_=n())!=null?_:p)});let v=((w=s.onRehydrateStorage)==null?void 0:w.call(s,(g=n())!=null?g:p))||void 0;return IX(l.getItem.bind(l))(s.name).then(b=>{if(b)if(typeof b.version==\\\"number\\\"&&b.version!==s.version){if(s.migrate){let _=s.migrate(b.state,b.version);return _ instanceof Promise?_.then(S=>[!0,S]):[!0,_]}console.error(\\\"State loaded from storage couldn't be migrated since no migrate function was provided\\\")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var _;let[S,T]=b;if(h=s.merge(T,(_=n())!=null?_:p),r(h,!0),S)return d()}).then(()=>{v?.(h,void 0),h=n(),o=!0,c.forEach(b=>b(h))}).catch(b=>{v?.(void 0,b)})};return i.persist={setOptions:g=>{s={...s,...g},g.storage&&(l=g.storage)},clearStorage:()=>{l?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},s.skipHydration||m(),h||p},r4e=Jmt});var i4e,t3,PD=x(()=>{u();i4e=t=>{let e,r=new Set,n=(l,d)=>{let f=typeof l==\\\"function\\\"?l(e):l;if(!Object.is(f,e)){let p=e;e=d??(typeof f!=\\\"object\\\"||f===null)?f:Object.assign({},e,f),r.forEach(h=>h(e,p))}},i=()=>e,a={setState:n,getState:i,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=e=t(n,i,a);return a},t3=t=>t?i4e(t):i4e});var Mu,OD,hv=x(()=>{u();Mu=\\\"4.3.6\\\",OD=\\\"@coinbase/wallet-sdk\\\"});var Ymt,Xmt,e0t,t0t,r0t,n0t,i0t,us,s0t,o0t,a0t,c0t,l0t,u0t,PX,d0t,Ee,Du=x(()=>{u();n4e();PD();hv();Ymt=()=>({chains:[]}),Xmt=()=>({keys:{}}),e0t=()=>({account:{}}),t0t=()=>({subAccount:void 0}),r0t=()=>({subAccountConfig:{}}),n0t=()=>({spendPermissions:[]}),i0t=()=>({config:{version:Mu}}),us=t3(r4e((...t)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ymt(...t)),Xmt(...t)),e0t(...t)),t0t(...t)),n0t(...t)),i0t(...t)),r0t(...t)),{name:\\\"cbwsdk.store\\\",storage:RX(()=>localStorage),partialize:t=>({chains:t.chains,keys:t.keys,account:t.account,subAccount:t.subAccount,spendPermissions:t.spendPermissions,config:t.config})})),s0t={get:()=>us.getState().subAccountConfig,set:t=>{us.setState(e=>({subAccountConfig:Object.assign(Object.assign({},e.subAccountConfig),t)}))},clear:()=>{us.setState({subAccountConfig:{}})}},o0t={get:()=>us.getState().subAccount,set:t=>{us.setState(e=>({subAccount:e.subAccount?Object.assign(Object.assign({},e.subAccount),t):Object.assign({address:t.address},t)}))},clear:()=>{us.setState({subAccount:void 0})}},a0t={get:()=>us.getState().spendPermissions,set:t=>{us.setState({spendPermissions:t})},clear:()=>{us.setState({spendPermissions:[]})}},c0t={get:()=>us.getState().account,set:t=>{us.setState(e=>({account:Object.assign(Object.assign({},e.account),t)}))},clear:()=>{us.setState({account:{}})}},l0t={get:()=>us.getState().chains,set:t=>{us.setState({chains:t})},clear:()=>{us.setState({chains:[]})}},u0t={get:t=>us.getState().keys[t],set:(t,e)=>{us.setState(r=>({keys:Object.assign(Object.assign({},r.keys),{[t]:e})}))},clear:()=>{us.setState({keys:{}})}},PX={get:()=>us.getState().config,set:t=>{us.setState(e=>({config:Object.assign(Object.assign({},e.config),t)}))}},d0t={subAccounts:o0t,subAccountsConfig:s0t,spendPermissions:a0t,account:c0t,chains:l0t,keys:u0t,config:PX},Ee=Object.assign(Object.assign({},us),d0t)});var s4e,o4e=x(()=>{u();s4e='!function(e,t){\\\"object\\\"==typeof exports&&\\\"object\\\"==typeof module?module.exports=t():\\\"function\\\"==typeof define&&define.amd?define([],t):\\\"object\\\"==typeof exports?exports.ClientAnalytics=t():e.ClientAnalytics=t()}(this,(function(){return(()=>{var e={792:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join(\\\"\\\")}}};e.exports=t},562:e=>{var t,n;t=\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join(\\\"\\\")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(i>>>6*(3-a)&63)):n.push(\\\"=\\\");return n.join(\\\"\\\")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\\\\\\\\/]/gi,\\\"\\\");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}},e.exports=n},335:e=>{function t(e){return!!e.constructor&&\\\"function\\\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return\\\"function\\\"==typeof e.readFloatLE&&\\\"function\\\"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},762:(e,t,n)=>{var r,i,a,o,s;r=n(562),i=n(792).utf8,a=n(335),o=n(792).bin,(s=function(e,t){e.constructor==String?e=t&&\\\"binary\\\"===t.encoding?o.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,d=-1732584194,p=271733878,m=0;m<n.length;m++)n[m]=16711935&(n[m]<<8|n[m]>>>24)|4278255360&(n[m]<<24|n[m]>>>8);n[c>>>5]|=128<<c%32,n[14+(c+64>>>9<<4)]=c;var f=s._ff,v=s._gg,g=s._hh,b=s._ii;for(m=0;m<n.length;m+=16){var h=u,w=l,y=d,T=p;u=f(u,l,d,p,n[m+0],7,-680876936),p=f(p,u,l,d,n[m+1],12,-389564586),d=f(d,p,u,l,n[m+2],17,606105819),l=f(l,d,p,u,n[m+3],22,-1044525330),u=f(u,l,d,p,n[m+4],7,-176418897),p=f(p,u,l,d,n[m+5],12,1200080426),d=f(d,p,u,l,n[m+6],17,-1473231341),l=f(l,d,p,u,n[m+7],22,-45705983),u=f(u,l,d,p,n[m+8],7,1770035416),p=f(p,u,l,d,n[m+9],12,-1958414417),d=f(d,p,u,l,n[m+10],17,-42063),l=f(l,d,p,u,n[m+11],22,-1990404162),u=f(u,l,d,p,n[m+12],7,1804603682),p=f(p,u,l,d,n[m+13],12,-40341101),d=f(d,p,u,l,n[m+14],17,-1502002290),u=v(u,l=f(l,d,p,u,n[m+15],22,1236535329),d,p,n[m+1],5,-165796510),p=v(p,u,l,d,n[m+6],9,-1069501632),d=v(d,p,u,l,n[m+11],14,643717713),l=v(l,d,p,u,n[m+0],20,-373897302),u=v(u,l,d,p,n[m+5],5,-701558691),p=v(p,u,l,d,n[m+10],9,38016083),d=v(d,p,u,l,n[m+15],14,-660478335),l=v(l,d,p,u,n[m+4],20,-405537848),u=v(u,l,d,p,n[m+9],5,568446438),p=v(p,u,l,d,n[m+14],9,-1019803690),d=v(d,p,u,l,n[m+3],14,-187363961),l=v(l,d,p,u,n[m+8],20,1163531501),u=v(u,l,d,p,n[m+13],5,-1444681467),p=v(p,u,l,d,n[m+2],9,-51403784),d=v(d,p,u,l,n[m+7],14,1735328473),u=g(u,l=v(l,d,p,u,n[m+12],20,-1926607734),d,p,n[m+5],4,-378558),p=g(p,u,l,d,n[m+8],11,-2022574463),d=g(d,p,u,l,n[m+11],16,1839030562),l=g(l,d,p,u,n[m+14],23,-35309556),u=g(u,l,d,p,n[m+1],4,-1530992060),p=g(p,u,l,d,n[m+4],11,1272893353),d=g(d,p,u,l,n[m+7],16,-155497632),l=g(l,d,p,u,n[m+10],23,-1094730640),u=g(u,l,d,p,n[m+13],4,681279174),p=g(p,u,l,d,n[m+0],11,-358537222),d=g(d,p,u,l,n[m+3],16,-722521979),l=g(l,d,p,u,n[m+6],23,76029189),u=g(u,l,d,p,n[m+9],4,-640364487),p=g(p,u,l,d,n[m+12],11,-421815835),d=g(d,p,u,l,n[m+15],16,530742520),u=b(u,l=g(l,d,p,u,n[m+2],23,-995338651),d,p,n[m+0],6,-198630844),p=b(p,u,l,d,n[m+7],10,1126891415),d=b(d,p,u,l,n[m+14],15,-1416354905),l=b(l,d,p,u,n[m+5],21,-57434055),u=b(u,l,d,p,n[m+12],6,1700485571),p=b(p,u,l,d,n[m+3],10,-1894986606),d=b(d,p,u,l,n[m+10],15,-1051523),l=b(l,d,p,u,n[m+1],21,-2054922799),u=b(u,l,d,p,n[m+8],6,1873313359),p=b(p,u,l,d,n[m+15],10,-30611744),d=b(d,p,u,l,n[m+6],15,-1560198380),l=b(l,d,p,u,n[m+13],21,1309151649),u=b(u,l,d,p,n[m+4],6,-145523070),p=b(p,u,l,d,n[m+11],10,-1120210379),d=b(d,p,u,l,n[m+2],15,718787259),l=b(l,d,p,u,n[m+9],21,-343485551),u=u+h>>>0,l=l+w>>>0,d=d+y>>>0,p=p+T>>>0}return r.endian([u,l,d,p])})._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error(\\\"Illegal argument \\\"+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?o.bytesToString(n):r.bytesToHex(n)}},2:(e,t,n)=>{\\\"use strict\\\";n.r(t),n.d(t,{Perfume:()=>ze,incrementUjNavigation:()=>Le,markStep:()=>Re,markStepOnce:()=>qe});var r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{},enableNavigationTracking:!0},o=window,s=o.console,c=o.navigator,u=o.performance,l=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},p=\\\"mark.\\\",m=function(){return u&&!!u.getEntriesByType&&!!u.now&&!!u.mark},f=\\\"4g\\\",v=!1,g={},b={value:0},h={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},w={value:0},y={value:0},T={},k={isHidden:!1,didChange:!1},_=function(){k.isHidden=!1,document.hidden&&(k.isHidden=document.hidden,k.didChange=!0)},S=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){s.warn(\\\"Perfume.js:\\\",e)}return null},E=function(){return!!(d()&&d()<=4)||!!(l()&&l()<=4)},x=function(e,t){switch(e){case\\\"slow-2g\\\":case\\\"2g\\\":case\\\"3g\\\":return!0;default:return E()||t}},O=function(e){return parseFloat(e.toFixed(4))},j=function(e){return\\\"number\\\"!=typeof e?null:O(e/Math.pow(1024,2))},N=function(e,t,n,r,i){var s,u=function(){a.analyticsTracker&&(k.isHidden&&![\\\"CLS\\\",\\\"INP\\\"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:l()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:\\\"serviceWorker\\\"in c?c.serviceWorker.controller?\\\"controlled\\\":\\\"supported\\\":\\\"unsupported\\\",isLowEndDevice:E(),isLowEndExperience:x(f,v)}:{},rating:n,navigationType:i}))};[\\\"CLS\\\",\\\"INP\\\"].includes(e)?u():(s=u,\\\"requestIdleCallback\\\"in o?o.requestIdleCallback(s,{timeout:3e3}):s())},I=function(e){e.forEach((function(e){if(!(\\\"self\\\"!==e.name||e.startTime<b.value)){var t=e.duration-50;t>0&&(w.value+=t,y.value+=t)}}))};!function(e){e.instant=\\\"instant\\\",e.quick=\\\"quick\\\",e.moderate=\\\"moderate\\\",e.slow=\\\"slow\\\",e.unavoidable=\\\"unavoidable\\\"}(r||(r={}));var P,M,B,C,D,A=((i={})[r.instant]={vitalsThresholds:[100,200],maxOutlierThreshold:1e4},i[r.quick]={vitalsThresholds:[200,500],maxOutlierThreshold:1e4},i[r.moderate]={vitalsThresholds:[500,1e3],maxOutlierThreshold:1e4},i[r.slow]={vitalsThresholds:[1e3,2e3],maxOutlierThreshold:1e4},i[r.unavoidable]={vitalsThresholds:[2e3,5e3],maxOutlierThreshold:2e4},i),L={RT:[100,200],TBT:[200,600],NTBT:[200,600]},U=function(e,t){return L[e]?t<=L[e][0]?\\\"good\\\":t<=L[e][1]?\\\"needsImprovement\\\":\\\"poor\\\":null},R=function(e,t,n){Object.keys(t).forEach((function(e){\\\"number\\\"==typeof t[e]&&(t[e]=O(t[e]))})),N(e,t,null,n||{})},q=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value,o=e.navigationType;\\\"FCP\\\"===n&&(b.value=i),[\\\"FCP\\\",\\\"LCP\\\"].includes(n)&&!T[0]&&(T[0]=S(\\\"longtask\\\",I)),\\\"FID\\\"===n&&setTimeout((function(){k.didChange||(q({attribution:t,name:\\\"TBT\\\",rating:U(\\\"TBT\\\",w.value),value:w.value,navigationType:o}),R(\\\"dataConsumption\\\",h.value))}),1e4);var s=O(i);s<=a.maxTime&&s>=0&&N(n,s,r,t,o)},F=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType(\\\"navigation\\\")[0]},z=function(e){if(\\\"loading\\\"===document.readyState)return\\\"loading\\\";var t=F();if(t){if(e<t.domInteractive)return\\\"loading\\\";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return\\\"dom-interactive\\\";if(0===t.domComplete||e<t.domComplete)return\\\"dom-content-loaded\\\"}return\\\"complete\\\"},K=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,\\\"\\\")},$=function(e,t){var n=\\\"\\\";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?\\\"#\\\"+r.id:K(r)+(r.className&&r.className.length?\\\".\\\"+r.className.replace(/\\\\\\\\s+/g,\\\".\\\"):\\\"\\\");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+\\\">\\\"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Q=-1,W=function(){return Q},H=function(e){addEventListener(\\\"pageshow\\\",(function(t){t.persisted&&(Q=t.timeStamp,e(t))}),!0)},V=function(){var e=F();return e&&e.activationStart||0},J=function(e,t){var n=F(),r=\\\"navigate\\\";return W()>=0?r=\\\"back-forward-cache\\\":n&&(r=document.prerendering||V()>0?\\\"prerender\\\":document.wasDiscarded?\\\"restore\\\":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}},X=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},G=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)},Z=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?\\\"poor\\\":e>t[0]?\\\"needs-improvement\\\":\\\"good\\\"}(t.value,n),e(t))}},Y=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ee=function(e){document.prerendering?addEventListener(\\\"prerenderingchange\\\",(function(){return e()}),!0):e()},te=-1,ne=function(){return\\\"hidden\\\"!==document.visibilityState||document.prerendering?1/0:0},re=function(e){\\\"hidden\\\"===document.visibilityState&&te>-1&&(te=\\\"visibilitychange\\\"===e.type?e.timeStamp:0,ae())},ie=function(){addEventListener(\\\"visibilitychange\\\",re,!0),addEventListener(\\\"prerenderingchange\\\",re,!0)},ae=function(){removeEventListener(\\\"visibilitychange\\\",re,!0),removeEventListener(\\\"prerenderingchange\\\",re,!0)},oe=function(){return te<0&&(te=ne(),ie(),H((function(){setTimeout((function(){te=ne(),ie()}),0)}))),{get firstHiddenTime(){return te}}},se=function(e,t){t=t||{},ee((function(){var n,r=[1800,3e3],i=oe(),a=J(\\\"FCP\\\"),o=X(\\\"paint\\\",(function(e){e.forEach((function(e){\\\"first-contentful-paint\\\"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-V(),0),a.entries.push(e),n(!0)))}))}));o&&(n=Z(e,a,r,t.reportAllChanges),H((function(i){a=J(\\\"FCP\\\"),n=Z(e,a,r,t.reportAllChanges),Y((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ce={passive:!0,capture:!0},ue=new Date,le=function(e,t){P||(P=t,M=e,B=new Date,me(removeEventListener),de())},de=function(){if(M>=0&&M<B-ue){var e={entryType:\\\"first-input\\\",name:P.type,target:P.target,cancelable:P.cancelable,startTime:P.timeStamp,processingStart:P.timeStamp+M};C.forEach((function(t){t(e)})),C=[]}},pe=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\\\"pointerdown\\\"==e.type?function(e,t){var n=function(){le(e,t),i()},r=function(){i()},i=function(){removeEventListener(\\\"pointerup\\\",n,ce),removeEventListener(\\\"pointercancel\\\",r,ce)};addEventListener(\\\"pointerup\\\",n,ce),addEventListener(\\\"pointercancel\\\",r,ce)}(t,e):le(t,e)}},me=function(e){[\\\"mousedown\\\",\\\"keydown\\\",\\\"touchstart\\\",\\\"pointerdown\\\"].forEach((function(t){return e(t,pe,ce)}))},fe=0,ve=1/0,ge=0,be=function(e){e.forEach((function(e){e.interactionId&&(ve=Math.min(ve,e.interactionId),ge=Math.max(ge,e.interactionId),fe=ge?(ge-ve)/7+1:0)}))},he=function(){return D?fe:performance.interactionCount||0},we=0,ye=function(){return he()-we},Te=[],ke={},_e=function(e){var t=Te[Te.length-1],n=ke[e.interactionId];if(n||Te.length<10||e.duration>t.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]};ke[r.id]=r,Te.push(r)}Te.sort((function(e,t){return t.latency-e.latency})),Te.splice(10).forEach((function(e){delete ke[e.id]}))}},Se={},Ee=function e(t){document.prerendering?ee((function(){return e(t)})):\\\"complete\\\"!==document.readyState?addEventListener(\\\"load\\\",(function(){return e(t)}),!0):setTimeout(t,0)},xe=function(e,t){t=t||{};var n=[800,1800],r=J(\\\"TTFB\\\"),i=Z(e,r,n,t.reportAllChanges);Ee((function(){var a=F();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-V(),0),r.entries=[a],i(!0),H((function(){r=J(\\\"TTFB\\\",0),(i=Z(e,r,n,t.reportAllChanges))(!0)}))}}))},Oe=function(e){e.forEach((function(e){e.identifier&&q({attribution:{identifier:e.identifier},name:\\\"ET\\\",rating:null,value:e.startTime})}))},je=function(e){e.forEach((function(e){if(a.isResourceTiming&&R(\\\"resourceTiming\\\",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;h.value[e.initiatorType]+=t,h.value.total+=t}}))},Ne=function(){!function(e,t){xe((function(e){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),function(e){e.value>0&&q(e)}(e)}),t)}(0,a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},ee((function(){var e,n=[.1,.25],r=J(\\\"CLS\\\"),i=-1,a=0,o=[],s=function(e){i>-1&&function(e){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:$(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:z(t.startTime)})}}var r;e.attribution={}}(e),function(e){q(e)}(e)}(e)},c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var n=o[0],i=o[o.length-1];a&&t.startTime-i.startTime<1e3&&t.startTime-n.startTime<5e3?(a+=t.value,o.push(t)):(a=t.value,o=[t]),a>r.value&&(r.value=a,r.entries=o,e())}}))},u=X(\\\"layout-shift\\\",c);u&&(e=Z(s,r,n,t.reportAllChanges),se((function(t){i=t.value,r.value<0&&(r.value=0,e())})),G((function(){c(u.takeRecords()),e(!0)})),H((function(){a=0,i=-1,r=J(\\\"CLS\\\",0),e=Z(s,r,n,t.reportAllChanges),Y((function(){return e()}))})))}))}(0,t)}(0,a.reportOptions.cls),function(e,t){se((function(e){!function(e){if(e.entries.length){var t=F(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:z(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:z(W())}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[100,300],i=oe(),a=J(\\\"FID\\\"),o=function(e){e.startTime<i.firstHiddenTime&&(a.value=e.processingStart-e.startTime,a.entries.push(e),n(!0))},s=function(e){e.forEach(o)},c=X(\\\"first-input\\\",s);n=Z(e,a,r,t.reportAllChanges),c&&G((function(){s(c.takeRecords()),c.disconnect()}),!0),c&&H((function(){var i;a=J(\\\"FID\\\"),n=Z(e,a,r,t.reportAllChanges),C=[],M=-1,P=null,me(addEventListener),i=o,C.push(i),de()}))}))}((function(e){!function(e){var t=e.entries[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[2500,4e3],i=oe(),a=J(\\\"LCP\\\"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-V(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},s=X(\\\"largest-contentful-paint\\\",o);if(s){n=Z(e,a,r,t.reportAllChanges);var c=function(){Se[a.id]||(o(s.takeRecords()),s.disconnect(),Se[a.id]=!0,n(!0))};[\\\"keydown\\\",\\\"click\\\"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),G(c,!0),H((function(i){a=J(\\\"LCP\\\"),n=Z(e,a,r,t.reportAllChanges),Y((function(){a.value=performance.now()-i.timeStamp,Se[a.id]=!0,n(!0)}))}))}}))}((function(e){!function(e){if(e.entries.length){var t=F();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType(\\\"resource\\\").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),s=Math.max(o,i?i.responseEnd-n:0),c=Math.max(s,r?r.startTime-n:0),u={element:$(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:s-o,elementRenderDelay:c-s,navigationEntry:t,lcpEntry:r};return r.url&&(u.url=r.url),i&&(u.lcpResourceEntry=i),void(e.attribution=u)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.lcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n=[200,500];\\\"interactionCount\\\"in performance||D||(D=X(\\\"event\\\",be,{type:\\\"event\\\",buffered:!0,durationThreshold:0}));var r,i=J(\\\"INP\\\"),a=function(e){e.forEach((function(e){e.interactionId&&_e(e),\\\"first-input\\\"===e.entryType&&!Te.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&_e(e)}));var t,n=(t=Math.min(Te.length-1,Math.floor(ye()/50)),Te[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=X(\\\"event\\\",a,{durationThreshold:t.durationThreshold||40});r=Z(e,i,n,t.reportAllChanges),o&&(o.observe({type:\\\"first-input\\\",buffered:!0}),G((function(){a(o.takeRecords()),i.value<0&&ye()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){Te=[],we=he(),i=J(\\\"INP\\\"),r=Z(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}else e.attribution={}}(t),e(t)}),t)}((function(e){return q(e)}),a.reportOptions.inp),a.isResourceTiming&&S(\\\"resource\\\",je),a.isElementTiming&&S(\\\"element\\\",Oe)},Ie=function(e){var t=\\\"usageDetails\\\"in e?e.usageDetails:{};R(\\\"storageEstimate\\\",{quota:j(e.quota),usage:j(e.usage),caches:j(t.caches),indexedDB:j(t.indexedDB),serviceWorker:j(t.serviceWorkerRegistrations)})},Pe={finalMarkToStepsMap:{},startMarkToStepsMap:{},active:{},navigationSteps:{}},Me=function(e){delete Pe.active[e]},Be=function(){return Pe.navigationSteps},Ce=function(e){var t;return null!==(t=Be()[e])&&void 0!==t?t:{}},De=function(e,t,n){var r=\\\"step.\\\"+e,i=u.getEntriesByName(p+t).length>0;if(u.getEntriesByName(p+n).length>0&&a.steps){var o=A[a.steps[e].threshold],s=o.maxOutlierThreshold,c=o.vitalsThresholds;if(i){var l=u.measure(r,p+t,p+n),d=l.duration;if(d<=s){var m=function(e,t){return e<=t[0]?\\\"good\\\":e<=t[1]?\\\"needsImprovement\\\":\\\"poor\\\"}(d,c);d>=0&&(N(\\\"userJourneyStep\\\",d,m,{stepName:e},void 0),u.measure(\\\"step.\\\".concat(e,\\\"_vitals_\\\").concat(m),{start:l.startTime+l.duration,end:l.startTime+l.duration,detail:{type:\\\"stepVital\\\",duration:d}}))}}}},Ae=function(){var e=Be(),t=Pe.startMarkToStepsMap,n=Object.keys(e).length;if(0===n)return{};var r={},i=n-1,a=Ce(i);if(Object.keys(a).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))})),n>1){var o=Ce(i-1);Object.keys(o).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))}))}return r},Le=function(){var e,t=Object.keys(Pe.navigationSteps).length;Pe.navigationSteps[t]={};var n=Ae();null===(e=a.onMarkStep)||void 0===e||e.call(a,\\\"\\\",Object.keys(n))},Ue=function(e){var t,n,r,i,o,s,c;if(Pe.finalMarkToStepsMap[e]){!function(e){var t=Pe.navigationSteps,n=Pe.finalMarkToStepsMap,r=Object.keys(t).length;if(0!==r){var i=r-1,a=Ce(i);if(a&&n[e]){var o=n[e];o&&Object.keys(o).forEach((function(e){if(a[e]){var n=Ce(i)||{};n[e]=!1,t[i]=n}if(r>1){var o=i-1,s=Ce(o);s[e]&&(s[e]=!1,t[o]=s)}}))}}}(e);var u=Pe.finalMarkToStepsMap[e];Object.keys(u).forEach((function(t){var n=u[t];n.forEach(Me),Promise.all(n.map((function(n){return function(e,t,n,r){return new(n||(n=Promise))((function(e,t){function i(e){try{o(r.next(e))}catch(e){t(e)}}function a(e){try{o(r.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}o((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function(){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},\\\"function\\\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError(\\\"Generator is already executing.\\\");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(r){switch(r.label){case 0:return[4,De(n,t,e)];case 1:return r.sent(),[2]}}))}))}))).catch((function(){}))}))}else r=e,i=Pe.navigationSteps,o=Object.keys(i).length,(c=Ce(s=(o>0?o:1)-1)||[])[r]=!0,i[s]=c,function(e){var t,n=null!==(t=Pe.startMarkToStepsMap[e])&&void 0!==t?t:[];Object.keys(n).forEach((function(e){Pe.active[e]||(Pe.active[e]=!0)}))}(e);if(a.enableNavigationTracking){var l=Ae();null===(t=a.onMarkStep)||void 0===t||t.call(a,e,Object.keys(l))}else null===(n=a.onMarkStep)||void 0===n||n.call(a,e,Object.keys(Pe.active))},Re=function(e){u.mark(p+e),Ue(e)},qe=function(e){0===u.getEntriesByName(p+e).length&&(u.mark(p+e),Ue(e))},Fe=0,ze=function(){function e(e){if(void 0===e&&(e={}),this.v=\\\"9.0.0-rc.3\\\",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,a.steps=e.steps,a.onMarkStep=e.onMarkStep,a.enableNavigationTracking=e.enableNavigationTracking,m()){\\\"PerformanceObserver\\\"in o&&Ne(),void 0!==document.hidden&&document.addEventListener(\\\"visibilitychange\\\",_);var t=function(){if(!m())return{};var e=u.getEntriesByType(\\\"navigation\\\")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();R(\\\"navigationTiming\\\",t),t.redirectTime&&q({attribution:{},name:\\\"RT\\\",rating:U(\\\"RT\\\",t.redirectTime),value:t.redirectTime}),R(\\\"networkInformation\\\",function(){if(\\\"connection\\\"in c){var e=c.connection;return\\\"object\\\"!=typeof e?{}:(f=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&\\\"function\\\"==typeof c.storage.estimate&&c.storage.estimate().then(Ie),a.steps&&a.steps&&(Pe.startMarkToStepsMap={},Pe.finalMarkToStepsMap={},Pe.active={},Pe.navigationSteps={},Object.entries(a.steps).forEach((function(e){var t,n,r=e[0],i=e[1].marks,a=i[0],o=i[1],s=null!==(n=Pe.startMarkToStepsMap[a])&&void 0!==n?n:{};if(s[r]=!0,Pe.startMarkToStepsMap[a]=s,Pe.finalMarkToStepsMap[o]){var c=Pe.finalMarkToStepsMap[o][a]||[];c.push(r),Pe.finalMarkToStepsMap[o][a]=c}else Pe.finalMarkToStepsMap[o]=((t={})[a]=[r],t)})))}}return e.prototype.start=function(e){m()&&!g[e]&&(g[e]=!0,u.mark(\\\"mark_\\\".concat(e,\\\"_start\\\")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),m()&&g[e]){u.mark(\\\"mark_\\\".concat(e,\\\"_end\\\")),delete g[e];var r=function(e){u.measure(e,\\\"mark_\\\".concat(e,\\\"_start\\\"),\\\"mark_\\\".concat(e,\\\"_end\\\"));var t=u.getEntriesByName(e).pop();return t&&\\\"measure\\\"===t.entryType?t.duration:-1}(e);n&&R(e,O(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete g[e],u.clearMarks&&(u.clearMarks(\\\"mark_\\\".concat(e,\\\"_start\\\")),u.clearMarks(\\\"mark_\\\".concat(e,\\\"_end\\\")))},e.prototype.markNTBT=function(){var e=this;this.start(\\\"ntbt\\\"),y.value=0,clearTimeout(Fe),Fe=setTimeout((function(){e.end(\\\"ntbt\\\",{},!1),q({attribution:{},name:\\\"NTBT\\\",rating:U(\\\"NTBT\\\",y.value),value:y.value}),y.value=0}),2e3)},e}()},426:(e,t)=>{\\\"use strict\\\";Symbol.for(\\\"react.element\\\"),Symbol.for(\\\"react.portal\\\"),Symbol.for(\\\"react.fragment\\\"),Symbol.for(\\\"react.strict_mode\\\"),Symbol.for(\\\"react.profiler\\\"),Symbol.for(\\\"react.provider\\\"),Symbol.for(\\\"react.context\\\"),Symbol.for(\\\"react.forward_ref\\\"),Symbol.for(\\\"react.suspense\\\"),Symbol.for(\\\"react.memo\\\"),Symbol.for(\\\"react.lazy\\\"),Symbol.iterator;var n={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r=Object.assign,i={};function a(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}function o(){}function s(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(\\\"object\\\"!=typeof e&&\\\"function\\\"!=typeof e&&null!=e)throw Error(\\\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\\\");this.updater.enqueueSetState(this,e,t,\\\"setState\\\")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\\\"forceUpdate\\\")},o.prototype=a.prototype;var c=s.prototype=new o;c.constructor=s,r(c,a.prototype),c.isPureReactComponent=!0;Array.isArray,Object.prototype.hasOwnProperty;var u={current:null};t.useCallback=function(e,t){return u.current.useCallback(e,t)},t.useEffect=function(e,t){return u.current.useEffect(e,t)},t.useRef=function(e){return u.current.useRef(e)}},784:(e,t,n)=>{\\\"use strict\\\";e.exports=n(426)},353:function(e,t,n){var r;!function(i,a){\\\"use strict\\\";var o=\\\"function\\\",s=\\\"undefined\\\",c=\\\"object\\\",u=\\\"string\\\",l=\\\"major\\\",d=\\\"model\\\",p=\\\"name\\\",m=\\\"type\\\",f=\\\"vendor\\\",v=\\\"version\\\",g=\\\"architecture\\\",b=\\\"console\\\",h=\\\"mobile\\\",w=\\\"tablet\\\",y=\\\"smarttv\\\",T=\\\"wearable\\\",k=\\\"embedded\\\",_=\\\"Amazon\\\",S=\\\"Apple\\\",E=\\\"ASUS\\\",x=\\\"BlackBerry\\\",O=\\\"Browser\\\",j=\\\"Chrome\\\",N=\\\"Firefox\\\",I=\\\"Google\\\",P=\\\"Huawei\\\",M=\\\"LG\\\",B=\\\"Microsoft\\\",C=\\\"Motorola\\\",D=\\\"Opera\\\",A=\\\"Samsung\\\",L=\\\"Sharp\\\",U=\\\"Sony\\\",R=\\\"Xiaomi\\\",q=\\\"Zebra\\\",F=\\\"Facebook\\\",z=\\\"Chromium OS\\\",K=\\\"Mac OS\\\",$=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Q=function(e,t){return typeof e===u&&-1!==W(t).indexOf(W(e))},W=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===u)return e=e.replace(/^\\\\\\\\s\\\\\\\\s*/,\\\"\\\"),typeof t===s?e:e.substring(0,350)},V=function(e,t){for(var n,r,i,s,u,l,d=0;d<t.length&&!u;){var p=t[d],m=t[d+1];for(n=r=0;n<p.length&&!u&&p[n];)if(u=p[n++].exec(e))for(i=0;i<m.length;i++)l=u[++r],typeof(s=m[i])===c&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Q(t[n][r],e))return\\\"?\\\"===n?a:n}else if(Q(t[n],e))return\\\"?\\\"===n?a:n;return e},X={ME:\\\"4.90\\\",\\\"NT 3.11\\\":\\\"NT3.51\\\",\\\"NT 4.0\\\":\\\"NT4.0\\\",2e3:\\\"NT 5.0\\\",XP:[\\\"NT 5.1\\\",\\\"NT 5.2\\\"],Vista:\\\"NT 6.0\\\",7:\\\"NT 6.1\\\",8:\\\"NT 6.2\\\",8.1:\\\"NT 6.3\\\",10:[\\\"NT 6.4\\\",\\\"NT 10.0\\\"],RT:\\\"ARM\\\"},G={browser:[[/\\\\\\\\b(?:crmo|crios)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Chrome\\\"]],[/edg(?:e|ios|a)?\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Edge\\\"]],[/(opera mini)\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)/i,/(opera [mobiletab]{3,6})\\\\\\\\b.+version\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)/i,/(opera)(?:.+version\\\\\\\\/|[\\\\\\\\/ ]+)([\\\\\\\\w\\\\\\\\.]+)/i],[p,v],[/opios[\\\\\\\\/ ]+([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,D+\\\" Mini\\\"]],[/\\\\\\\\bopr\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,D]],[/(kindle)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]*)/i,/(ba?idubrowser)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]+)/i,/(?:ms|\\\\\\\\()(ie) ([\\\\\\\\w\\\\\\\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)/i,/(heytap|ovi)browser\\\\\\\\/([\\\\\\\\d\\\\\\\\.]+)/i,/(weibo)__([\\\\\\\\d\\\\\\\\.]+)/i],[p,v],[/(?:\\\\\\\\buc? ?browser|(?:juc.+)ucweb)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"UC\\\"+O]],[/microm.+\\\\\\\\bqbcore\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/\\\\\\\\bqbcore\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+).+microm/i],[v,[p,\\\"WeChat(Win) Desktop\\\"]],[/micromessenger\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"WeChat\\\"]],[/konqueror\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Konqueror\\\"]],[/trident.+rv[: ]([\\\\\\\\w\\\\\\\\.]{1,9})\\\\\\\\b.+like gecko/i],[v,[p,\\\"IE\\\"]],[/ya(?:search)?browser\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Yandex\\\"]],[/(avast|avg)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[[p,/(.+)/,\\\"$1 Secure \\\"+O],v],[/\\\\\\\\bfocus\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,N+\\\" Focus\\\"]],[/\\\\\\\\bopt\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,D+\\\" Touch\\\"]],[/coc_coc\\\\\\\\w+\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Coc Coc\\\"]],[/dolfin\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Dolphin\\\"]],[/coast\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,D+\\\" Coast\\\"]],[/miuibrowser\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"MIUI \\\"+O]],[/fxios\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,N]],[/\\\\\\\\bqihu|(qi?ho?o?|360)browser/i],[[p,\\\"360 \\\"+O]],[/(oculus|samsung|sailfish|huawei)browser\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[[p,/(.+)/,\\\"$1 \\\"+O],v],[/(comodo_dragon)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[[p,/_/g,\\\" \\\"],v],[/(electron)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\\\\\\\/(20\\\\\\\\d\\\\\\\\d\\\\\\\\.[-\\\\\\\\w\\\\\\\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]+)/i],[p,v],[/(metasr)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]+)/i,/(lbbrowser)/i,/\\\\\\\\[(linkedin)app\\\\\\\\]/i],[p],[/((?:fban\\\\\\\\/fbios|fb_iab\\\\\\\\/fb4a)(?!.+fbav)|;fbav\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+);)/i],[[p,F],v],[/(kakao(?:talk|story))[\\\\\\\\/ ]([\\\\\\\\w\\\\\\\\.]+)/i,/(naver)\\\\\\\\(.*?(\\\\\\\\d+\\\\\\\\.[\\\\\\\\w\\\\\\\\.]+).*\\\\\\\\)/i,/safari (line)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/\\\\\\\\b(line)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)\\\\\\\\/iab/i,/(chromium|instagram)[\\\\\\\\/ ]([-\\\\\\\\w\\\\\\\\.]+)/i],[p,v],[/\\\\\\\\bgsa\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+) .*safari\\\\\\\\//i],[v,[p,\\\"GSA\\\"]],[/musical_ly(?:.+app_?version\\\\\\\\/|_)([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"TikTok\\\"]],[/headlesschrome(?:\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)| )/i],[v,[p,j+\\\" Headless\\\"]],[/ wv\\\\\\\\).+(chrome)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[[p,j+\\\" WebView\\\"],v],[/droid.+ version\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)\\\\\\\\b.+(?:mobile safari|safari)/i],[v,[p,\\\"Android \\\"+O]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\\\\\\\/v?([\\\\\\\\w\\\\\\\\.]+)/i],[p,v],[/version\\\\\\\\/([\\\\\\\\w\\\\\\\\.\\\\\\\\,]+) .*mobile\\\\\\\\/\\\\\\\\w+ (safari)/i],[v,[p,\\\"Mobile Safari\\\"]],[/version\\\\\\\\/([\\\\\\\\w(\\\\\\\\.|\\\\\\\\,)]+) .*(mobile ?safari|safari)/i],[v,p],[/webkit.+?(mobile ?safari|safari)(\\\\\\\\/[\\\\\\\\w\\\\\\\\.]+)/i],[p,[v,J,{\\\"1.0\\\":\\\"/8\\\",1.2:\\\"/1\\\",1.3:\\\"/3\\\",\\\"2.0\\\":\\\"/412\\\",\\\"2.0.2\\\":\\\"/416\\\",\\\"2.0.3\\\":\\\"/417\\\",\\\"2.0.4\\\":\\\"/419\\\",\\\"?\\\":\\\"/\\\"}]],[/(webkit|khtml)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[p,v],[/(navigator|netscape\\\\\\\\d?)\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)/i],[[p,\\\"Netscape\\\"],v],[/mobile vr; rv:([\\\\\\\\w\\\\\\\\.]+)\\\\\\\\).+firefox/i],[v,[p,N+\\\" Reality\\\"]],[/ekiohf.+(flow)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.\\\\\\\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\\\\\\\/([-\\\\\\\\w\\\\\\\\.]+)$/i,/(firefox)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(mozilla)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+) .+rv\\\\\\\\:.+gecko\\\\\\\\/\\\\\\\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\\\\\\\. ]?browser)[-\\\\\\\\/ ]?v?([\\\\\\\\w\\\\\\\\.]+)/i,/(links) \\\\\\\\(([\\\\\\\\w\\\\\\\\.]+)/i,/panasonic;(viera)/i],[p,v],[/(cobalt)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[p,[v,/master.|lts./,\\\"\\\"]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\\\\\\\)]/i],[[g,\\\"amd64\\\"]],[/(ia32(?=;))/i],[[g,W]],[/((?:i[346]|x)86)[;\\\\\\\\)]/i],[[g,\\\"ia32\\\"]],[/\\\\\\\\b(aarch64|arm(v?8e?l?|_?64))\\\\\\\\b/i],[[g,\\\"arm64\\\"]],[/\\\\\\\\b(arm(?:v[67])?ht?n?[fl]p?)\\\\\\\\b/i],[[g,\\\"armhf\\\"]],[/windows (ce|mobile); ppc;/i],[[g,\\\"arm\\\"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\\\\\\\))/i],[[g,/ower/,\\\"\\\",W]],[/(sun4\\\\\\\\w)[;\\\\\\\\)]/i],[[g,\\\"sparc\\\"]],[/((?:avr32|ia64(?=;))|68k(?=\\\\\\\\))|\\\\\\\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\\\\\\\b|pa-risc)/i],[[g,W]]],device:[[/\\\\\\\\b(sch-i[89]0\\\\\\\\d|shw-m380s|sm-[ptx]\\\\\\\\w{2,4}|gt-[pn]\\\\\\\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[f,A],[m,w]],[/\\\\\\\\b((?:s[cgp]h|gt|sm)-\\\\\\\\w+|sc[g-]?[\\\\\\\\d]+a?|galaxy nexus)/i,/samsung[- ]([-\\\\\\\\w]+)/i,/sec-(sgh\\\\\\\\w+)/i],[d,[f,A],[m,h]],[/(?:\\\\\\\\/|\\\\\\\\()(ip(?:hone|od)[\\\\\\\\w, ]*)(?:\\\\\\\\/|;)/i],[d,[f,S],[m,h]],[/\\\\\\\\((ipad);[-\\\\\\\\w\\\\\\\\),; ]+apple/i,/applecoremedia\\\\\\\\/[\\\\\\\\w\\\\\\\\.]+ \\\\\\\\((ipad)/i,/\\\\\\\\b(ipad)\\\\\\\\d\\\\\\\\d?,\\\\\\\\d\\\\\\\\d?[;\\\\\\\\]].+ios/i],[d,[f,S],[m,w]],[/(macintosh);/i],[d,[f,S]],[/\\\\\\\\b(sh-?[altvz]?\\\\\\\\d\\\\\\\\d[a-ekm]?)/i],[d,[f,L],[m,h]],[/\\\\\\\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\\\\\\\d{2})\\\\\\\\b(?!.+d\\\\\\\\/s)/i],[d,[f,P],[m,w]],[/(?:huawei|honor)([-\\\\\\\\w ]+)[;\\\\\\\\)]/i,/\\\\\\\\b(nexus 6p|\\\\\\\\w{2,4}e?-[atu]?[ln][\\\\\\\\dx][012359c][adn]?)\\\\\\\\b(?!.+d\\\\\\\\/s)/i],[d,[f,P],[m,h]],[/\\\\\\\\b(poco[\\\\\\\\w ]+)(?: bui|\\\\\\\\))/i,/\\\\\\\\b; (\\\\\\\\w+) build\\\\\\\\/hm\\\\\\\\1/i,/\\\\\\\\b(hm[-_ ]?note?[_ ]?(?:\\\\\\\\d\\\\\\\\w)?) bui/i,/\\\\\\\\b(redmi[\\\\\\\\-_ ]?(?:note|k)?[\\\\\\\\w_ ]+)(?: bui|\\\\\\\\))/i,/\\\\\\\\b(mi[-_ ]?(?:a\\\\\\\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\\\\\\\d?\\\\\\\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\\\\\\\))/i],[[d,/_/g,\\\" \\\"],[f,R],[m,h]],[/\\\\\\\\b(mi[-_ ]?(?:pad)(?:[\\\\\\\\w_ ]+))(?: bui|\\\\\\\\))/i],[[d,/_/g,\\\" \\\"],[f,R],[m,w]],[/; (\\\\\\\\w+) bui.+ oppo/i,/\\\\\\\\b(cph[12]\\\\\\\\d{3}|p(?:af|c[al]|d\\\\\\\\w|e[ar])[mt]\\\\\\\\d0|x9007|a101op)\\\\\\\\b/i],[d,[f,\\\"OPPO\\\"],[m,h]],[/vivo (\\\\\\\\w+)(?: bui|\\\\\\\\))/i,/\\\\\\\\b(v[12]\\\\\\\\d{3}\\\\\\\\w?[at])(?: bui|;)/i],[d,[f,\\\"Vivo\\\"],[m,h]],[/\\\\\\\\b(rmx[12]\\\\\\\\d{3})(?: bui|;|\\\\\\\\))/i],[d,[f,\\\"Realme\\\"],[m,h]],[/\\\\\\\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\\\\\\\b[\\\\\\\\w ]+build\\\\\\\\//i,/\\\\\\\\bmot(?:orola)?[- ](\\\\\\\\w*)/i,/((?:moto[\\\\\\\\w\\\\\\\\(\\\\\\\\) ]+|xt\\\\\\\\d{3,4}|nexus 6)(?= bui|\\\\\\\\)))/i],[d,[f,C],[m,h]],[/\\\\\\\\b(mz60\\\\\\\\d|xoom[2 ]{0,2}) build\\\\\\\\//i],[d,[f,C],[m,w]],[/((?=lg)?[vl]k\\\\\\\\-?\\\\\\\\d{3}) bui| 3\\\\\\\\.[-\\\\\\\\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[f,M],[m,w]],[/(lm(?:-?f100[nv]?|-[\\\\\\\\w\\\\\\\\.]+)(?= bui|\\\\\\\\))|nexus [45])/i,/\\\\\\\\blg[-e;\\\\\\\\/ ]+((?!browser|netcast|android tv)\\\\\\\\w+)/i,/\\\\\\\\blg-?([\\\\\\\\d\\\\\\\\w]+) bui/i],[d,[f,M],[m,h]],[/(ideatab[-\\\\\\\\w ]+)/i,/lenovo ?(s[56]000[-\\\\\\\\w]+|tab(?:[\\\\\\\\w ]+)|yt[-\\\\\\\\d\\\\\\\\w]{6}|tb[-\\\\\\\\d\\\\\\\\w]{6})/i],[d,[f,\\\"Lenovo\\\"],[m,w]],[/(?:maemo|nokia).*(n900|lumia \\\\\\\\d+)/i,/nokia[-_ ]?([-\\\\\\\\w\\\\\\\\.]*)/i],[[d,/_/g,\\\" \\\"],[f,\\\"Nokia\\\"],[m,h]],[/(pixel c)\\\\\\\\b/i],[d,[f,I],[m,w]],[/droid.+; (pixel[\\\\\\\\daxl ]{0,6})(?: bui|\\\\\\\\))/i],[d,[f,I],[m,h]],[/droid.+ (a?\\\\\\\\d[0-2]{2}so|[c-g]\\\\\\\\d{4}|so[-gl]\\\\\\\\w+|xq-a\\\\\\\\w[4-7][12])(?= bui|\\\\\\\\).+chrome\\\\\\\\/(?![1-6]{0,1}\\\\\\\\d\\\\\\\\.))/i],[d,[f,U],[m,h]],[/sony tablet [ps]/i,/\\\\\\\\b(?:sony)?sgp\\\\\\\\w+(?: bui|\\\\\\\\))/i],[[d,\\\"Xperia Tablet\\\"],[f,U],[m,w]],[/ (kb2005|in20[12]5|be20[12][59])\\\\\\\\b/i,/(?:one)?(?:plus)? (a\\\\\\\\d0\\\\\\\\d\\\\\\\\d)(?: b|\\\\\\\\))/i],[d,[f,\\\"OnePlus\\\"],[m,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\\\\\\\\))/i,/(kf[a-z]+)( bui|\\\\\\\\)).+silk\\\\\\\\//i],[d,[f,_],[m,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\\\\\\\)).+silk\\\\\\\\//i],[[d,/(.+)/g,\\\"Fire Phone $1\\\"],[f,_],[m,h]],[/(playbook);[-\\\\\\\\w\\\\\\\\),; ]+(rim)/i],[d,f,[m,w]],[/\\\\\\\\b((?:bb[a-f]|st[hv])100-\\\\\\\\d)/i,/\\\\\\\\(bb10; (\\\\\\\\w+)/i],[d,[f,x],[m,h]],[/(?:\\\\\\\\b|asus_)(transfo[prime ]{4,10} \\\\\\\\w+|eeepc|slider \\\\\\\\w+|nexus 7|padfone|p00[cj])/i],[d,[f,E],[m,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \\\\\\\\d\\\\\\\\w?)\\\\\\\\b/i],[d,[f,E],[m,h]],[/(nexus 9)/i],[d,[f,\\\"HTC\\\"],[m,w]],[/(htc)[-;_ ]{1,2}([\\\\\\\\w ]+(?=\\\\\\\\)| bui)|\\\\\\\\w+)/i,/(zte)[- ]([\\\\\\\\w ]+?)(?: bui|\\\\\\\\/|\\\\\\\\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\\\\\\\\.))|sony(?!-bra))[-_ ]?([-\\\\\\\\w]*)/i],[f,[d,/_/g,\\\" \\\"],[m,h]],[/droid.+; ([ab][1-7]-?[0178a]\\\\\\\\d\\\\\\\\d?)/i],[d,[f,\\\"Acer\\\"],[m,w]],[/droid.+; (m[1-5] note) bui/i,/\\\\\\\\bmz-([-\\\\\\\\w]{2,})/i],[d,[f,\\\"Meizu\\\"],[m,h]],[/(blackberry|benq|palm(?=\\\\\\\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\\\\\\\w]*)/i,/(hp) ([\\\\\\\\w ]+\\\\\\\\w)/i,/(asus)-?(\\\\\\\\w+)/i,/(microsoft); (lumia[\\\\\\\\w ]+)/i,/(lenovo)[-_ ]?([-\\\\\\\\w]+)/i,/(jolla)/i,/(oppo) ?([\\\\\\\\w ]+) bui/i],[f,d,[m,h]],[/(kobo)\\\\\\\\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(nook)[\\\\\\\\w ]+build\\\\\\\\/(\\\\\\\\w+)/i,/(dell) (strea[kpr\\\\\\\\d ]*[\\\\\\\\dko])/i,/(le[- ]+pan)[- ]+(\\\\\\\\w{1,9}) bui/i,/(trinity)[- ]*(t\\\\\\\\d{3}) bui/i,/(gigaset)[- ]+(q\\\\\\\\w{1,9}) bui/i,/(vodafone) ([\\\\\\\\w ]+)(?:\\\\\\\\)| bui)/i],[f,d,[m,w]],[/(surface duo)/i],[d,[f,B],[m,w]],[/droid [\\\\\\\\d\\\\\\\\.]+; (fp\\\\\\\\du?)(?: b|\\\\\\\\))/i],[d,[f,\\\"Fairphone\\\"],[m,h]],[/(u304aa)/i],[d,[f,\\\"AT&T\\\"],[m,h]],[/\\\\\\\\bsie-(\\\\\\\\w*)/i],[d,[f,\\\"Siemens\\\"],[m,h]],[/\\\\\\\\b(rct\\\\\\\\w+) b/i],[d,[f,\\\"RCA\\\"],[m,w]],[/\\\\\\\\b(venue[\\\\\\\\d ]{2,7}) b/i],[d,[f,\\\"Dell\\\"],[m,w]],[/\\\\\\\\b(q(?:mv|ta)\\\\\\\\w+) b/i],[d,[f,\\\"Verizon\\\"],[m,w]],[/\\\\\\\\b(?:barnes[& ]+noble |bn[rt])([\\\\\\\\w\\\\\\\\+ ]*) b/i],[d,[f,\\\"Barnes & Noble\\\"],[m,w]],[/\\\\\\\\b(tm\\\\\\\\d{3}\\\\\\\\w+) b/i],[d,[f,\\\"NuVision\\\"],[m,w]],[/\\\\\\\\b(k88) b/i],[d,[f,\\\"ZTE\\\"],[m,w]],[/\\\\\\\\b(nx\\\\\\\\d{3}j) b/i],[d,[f,\\\"ZTE\\\"],[m,h]],[/\\\\\\\\b(gen\\\\\\\\d{3}) b.+49h/i],[d,[f,\\\"Swiss\\\"],[m,h]],[/\\\\\\\\b(zur\\\\\\\\d{3}) b/i],[d,[f,\\\"Swiss\\\"],[m,w]],[/\\\\\\\\b((zeki)?tb.*\\\\\\\\b) b/i],[d,[f,\\\"Zeki\\\"],[m,w]],[/\\\\\\\\b([yr]\\\\\\\\d{2}) b/i,/\\\\\\\\b(dragon[- ]+touch |dt)(\\\\\\\\w{5}) b/i],[[f,\\\"Dragon Touch\\\"],d,[m,w]],[/\\\\\\\\b(ns-?\\\\\\\\w{0,9}) b/i],[d,[f,\\\"Insignia\\\"],[m,w]],[/\\\\\\\\b((nxa|next)-?\\\\\\\\w{0,9}) b/i],[d,[f,\\\"NextBook\\\"],[m,w]],[/\\\\\\\\b(xtreme\\\\\\\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,\\\"Voice\\\"],d,[m,h]],[/\\\\\\\\b(lvtel\\\\\\\\-)?(v1[12]) b/i],[[f,\\\"LvTel\\\"],d,[m,h]],[/\\\\\\\\b(ph-1) /i],[d,[f,\\\"Essential\\\"],[m,h]],[/\\\\\\\\b(v(100md|700na|7011|917g).*\\\\\\\\b) b/i],[d,[f,\\\"Envizen\\\"],[m,w]],[/\\\\\\\\b(trio[-\\\\\\\\w\\\\\\\\. ]+) b/i],[d,[f,\\\"MachSpeed\\\"],[m,w]],[/\\\\\\\\btu_(1491) b/i],[d,[f,\\\"Rotor\\\"],[m,w]],[/(shield[\\\\\\\\w ]+) b/i],[d,[f,\\\"Nvidia\\\"],[m,w]],[/(sprint) (\\\\\\\\w+)/i],[f,d,[m,h]],[/(kin\\\\\\\\.[onetw]{3})/i],[[d,/\\\\\\\\./g,\\\" \\\"],[f,B],[m,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\\\\\\\)/i],[d,[f,q],[m,w]],[/droid.+; (ec30|ps20|tc[2-8]\\\\\\\\d[kx])\\\\\\\\)/i],[d,[f,q],[m,h]],[/smart-tv.+(samsung)/i],[f,[m,y]],[/hbbtv.+maple;(\\\\\\\\d+)/i],[[d,/^/,\\\"SmartTV\\\"],[f,A],[m,y]],[/(nux; netcast.+smarttv|lg (netcast\\\\\\\\.tv-201\\\\\\\\d|android tv))/i],[[f,M],[m,y]],[/(apple) ?tv/i],[f,[d,S+\\\" TV\\\"],[m,y]],[/crkey/i],[[d,j+\\\"cast\\\"],[f,I],[m,y]],[/droid.+aft(\\\\\\\\w)( bui|\\\\\\\\))/i],[d,[f,_],[m,y]],[/\\\\\\\\(dtv[\\\\\\\\);].+(aquos)/i,/(aquos-tv[\\\\\\\\w ]+)\\\\\\\\)/i],[d,[f,L],[m,y]],[/(bravia[\\\\\\\\w ]+)( bui|\\\\\\\\))/i],[d,[f,U],[m,y]],[/(mitv-\\\\\\\\w{5}) bui/i],[d,[f,R],[m,y]],[/Hbbtv.*(technisat) (.*);/i],[f,d,[m,y]],[/\\\\\\\\b(roku)[\\\\\\\\dx]*[\\\\\\\\)\\\\\\\\/]((?:dvp-)?[\\\\\\\\d\\\\\\\\.]*)/i,/hbbtv\\\\\\\\/\\\\\\\\d+\\\\\\\\.\\\\\\\\d+\\\\\\\\.\\\\\\\\d+ +\\\\\\\\([\\\\\\\\w\\\\\\\\+ ]*; *([\\\\\\\\w\\\\\\\\d][^;]*);([^;]*)/i],[[f,H],[d,H],[m,y]],[/\\\\\\\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\\\\\\\b/i],[[m,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,d,[m,b]],[/droid.+; (shield) bui/i],[d,[f,\\\"Nvidia\\\"],[m,b]],[/(playstation [345portablevi]+)/i],[d,[f,U],[m,b]],[/\\\\\\\\b(xbox(?: one)?(?!; xbox))[\\\\\\\\); ]/i],[d,[f,B],[m,b]],[/((pebble))app/i],[f,d,[m,T]],[/(watch)(?: ?os[,\\\\\\\\/]|\\\\\\\\d,\\\\\\\\d\\\\\\\\/)[\\\\\\\\d\\\\\\\\.]+/i],[d,[f,S],[m,T]],[/droid.+; (glass) \\\\\\\\d/i],[d,[f,I],[m,T]],[/droid.+; (wt63?0{2,3})\\\\\\\\)/i],[d,[f,q],[m,T]],[/(quest( 2| pro)?)/i],[d,[f,F],[m,T]],[/(tesla)(?: qtcarbrowser|\\\\\\\\/[-\\\\\\\\w\\\\\\\\.]+)/i],[f,[m,k]],[/(aeobc)\\\\\\\\b/i],[d,[f,_],[m,k]],[/droid .+?; ([^;]+?)(?: bui|\\\\\\\\) applew).+? mobile safari/i],[d,[m,h]],[/droid .+?; ([^;]+?)(?: bui|\\\\\\\\) applew).+?(?! mobile) safari/i],[d,[m,w]],[/\\\\\\\\b((tablet|tab)[;\\\\\\\\/]|focus\\\\\\\\/\\\\\\\\d(?!.+mobile))/i],[[m,w]],[/(phone|mobile(?:[;\\\\\\\\/]| [ \\\\\\\\w\\\\\\\\/\\\\\\\\.]*safari)|pda(?=.+windows ce))/i],[[m,h]],[/(android[-\\\\\\\\w\\\\\\\\. ]{0,9});.+buil/i],[d,[f,\\\"Generic\\\"]]],engine:[[/windows.+ edge\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"EdgeHTML\\\"]],[/webkit\\\\\\\\/537\\\\\\\\.36.+chrome\\\\\\\\/(?!27)([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"Blink\\\"]],[/(presto)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/ekioh(flow)\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i,/(khtml|tasman|links)[\\\\\\\\/ ]\\\\\\\\(?([\\\\\\\\w\\\\\\\\.]+)/i,/(icab)[\\\\\\\\/ ]([23]\\\\\\\\.[\\\\\\\\d\\\\\\\\.]+)/i,/\\\\\\\\b(libweb)/i],[p,v],[/rv\\\\\\\\:([\\\\\\\\w\\\\\\\\.]{1,9})\\\\\\\\b.+(gecko)/i],[v,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,v],[/(windows) nt 6\\\\\\\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\\\\\\\/ ]?([\\\\\\\\d\\\\\\\\.\\\\\\\\w ]*)/i,/(windows)[\\\\\\\\/ ]?([ntce\\\\\\\\d\\\\\\\\. ]+\\\\\\\\w)(?!.+xbox)/i],[p,[v,J,X]],[/(win(?=3|9|n)|win 9x )([nt\\\\\\\\d\\\\\\\\.]+)/i],[[p,\\\"Windows\\\"],[v,J,X]],[/ip[honead]{2,4}\\\\\\\\b(?:.*os ([\\\\\\\\w]+) like mac|; opera)/i,/ios;fbsv\\\\\\\\/([\\\\\\\\d\\\\\\\\.]+)/i,/cfnetwork\\\\\\\\/.+darwin/i],[[v,/_/g,\\\".\\\"],[p,\\\"iOS\\\"]],[/(mac os x) ?([\\\\\\\\w\\\\\\\\. ]*)/i,/(macintosh|mac_powerpc\\\\\\\\b)(?!.+haiku)/i],[[p,K],[v,/_/g,\\\".\\\"]],[/droid ([\\\\\\\\w\\\\\\\\.]+)\\\\\\\\b.+(android[- ]x86|harmonyos)/i],[v,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]*)/i,/(blackberry)\\\\\\\\w*\\\\\\\\/([\\\\\\\\w\\\\\\\\.]*)/i,/(tizen|kaios)[\\\\\\\\/ ]([\\\\\\\\w\\\\\\\\.]+)/i,/\\\\\\\\((series40);/i],[p,v],[/\\\\\\\\(bb(10);/i],[v,[p,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]*)/i],[v,[p,\\\"Symbian\\\"]],[/mozilla\\\\\\\\/[\\\\\\\\d\\\\\\\\.]+ \\\\\\\\((?:mobile|tablet|tv|mobile; [\\\\\\\\w ]+); rv:.+ gecko\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,N+\\\" OS\\\"]],[/web0s;.+rt(tv)/i,/\\\\\\\\b(?:hp)?wos(?:browser)?\\\\\\\\/([\\\\\\\\w\\\\\\\\.]+)/i],[v,[p,\\\"webOS\\\"]],[/watch(?: ?os[,\\\\\\\\/]|\\\\\\\\d,\\\\\\\\d\\\\\\\\/)([\\\\\\\\d\\\\\\\\.]+)/i],[v,[p,\\\"watchOS\\\"]],[/crkey\\\\\\\\/([\\\\\\\\d\\\\\\\\.]+)/i],[v,[p,j+\\\"cast\\\"]],[/(cros) [\\\\\\\\w]+(?:\\\\\\\\)| ([\\\\\\\\w\\\\\\\\.]+)\\\\\\\\b)/i],[[p,z],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\\\\\\\\/(\\\\\\\\d+\\\\\\\\.[\\\\\\\\w\\\\\\\\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\\\\\\\);]+)/i,/\\\\\\\\b(joli|palm)\\\\\\\\b ?(?:os)?\\\\\\\\/?([\\\\\\\\w\\\\\\\\.]*)/i,/(mint)[\\\\\\\\/\\\\\\\\(\\\\\\\\) ]?(\\\\\\\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\\\\\\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\\\\\\\/ ]?(?!chrom|package)([-\\\\\\\\w\\\\\\\\.]*)/i,/(hurd|linux) ?([\\\\\\\\w\\\\\\\\.]*)/i,/(gnu) ?([\\\\\\\\w\\\\\\\\.]*)/i,/\\\\\\\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\\\\\\\/ ]?(?!amd|[ix346]{1,2}86)([\\\\\\\\w\\\\\\\\.]*)/i,/(haiku) (\\\\\\\\w+)/i],[p,v],[/(sunos) ?([\\\\\\\\w\\\\\\\\.\\\\\\\\d]*)/i],[[p,\\\"Solaris\\\"],v],[/((?:open)?solaris)[-\\\\\\\\/ ]?([\\\\\\\\w\\\\\\\\.]*)/i,/(aix) ((\\\\\\\\d)(?=\\\\\\\\.|\\\\\\\\)| )[\\\\\\\\w\\\\\\\\.])*/i,/\\\\\\\\b(beos|os\\\\\\\\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\\\\\\\\w\\\\\\\\.]*)/i],[p,v]]},Z=function(e,t){if(typeof e===c&&(t=e,e=a),!(this instanceof Z))return new Z(e,t).getResult();var n=typeof i!==s&&i.navigator?i.navigator:a,r=e||(n&&n.userAgent?n.userAgent:\\\"\\\"),b=n&&n.userAgentData?n.userAgentData:a,y=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(G,t):G,T=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[p]=a,t[v]=a,V.call(t,r,y.browser),t[l]=typeof(e=t[v])===u?e.replace(/[^\\\\\\\\d\\\\\\\\.]/g,\\\"\\\").split(\\\".\\\")[0]:a,T&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[p]=\\\"Brave\\\"),t},this.getCPU=function(){var e={};return e[g]=a,V.call(e,r,y.cpu),e},this.getDevice=function(){var e={};return e[f]=a,e[d]=a,e[m]=a,V.call(e,r,y.device),T&&!e[m]&&b&&b.mobile&&(e[m]=h),T&&\\\"Macintosh\\\"==e[d]&&n&&typeof n.standalone!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]=\\\"iPad\\\",e[m]=w),e},this.getEngine=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.engine),e},this.getOS=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.os),T&&!e[p]&&b&&\\\"Unknown\\\"!=b.platform&&(e[p]=b.platform.replace(/chrome os/i,z).replace(/macos/i,K)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?H(e,350):e,this},this.setUA(r),this};Z.VERSION=\\\"1.0.35\\\",Z.BROWSER=$([p,v,l]),Z.CPU=$([g]),Z.DEVICE=$([d,f,m,b,h,y,w,T,k]),Z.ENGINE=Z.OS=$([p,v]),typeof t!==s?(e.exports&&(t=e.exports=Z),t.UAParser=Z):n.amdO?(r=function(){return Z}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=Z);var Y=typeof i!==s&&(i.jQuery||i.Zepto);if(Y&&!Y.ua){var ee=new Z;Y.ua=ee.getResult(),Y.ua.get=function(){return ee.getUA()},Y.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Y.ua[n]=t[n]}}}(\\\"object\\\"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\\\"undefined\\\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\\\"Module\\\"}),Object.defineProperty(e,\\\"__esModule\\\",{value:!0})};var r={};return(()=>{\\\"use strict\\\";n.r(r),n.d(r,{ActionType:()=>f,AmplitudePlatformName:()=>g,AnalyticsEventImportance:()=>l,AnalyticsQueries:()=>e,AuthStatus:()=>b,ComponentType:()=>m,IThresholdTier:()=>Jt,MetricType:()=>d,PlatformName:()=>v,SessionActions:()=>h,SessionAutomatedEvents:()=>w,SessionRank:()=>y,SubjectType:()=>p,UserTypeCommerce:()=>c,UserTypeInsto:()=>i,UserTypeRetail:()=>t,UserTypeRetailBusinessBanking:()=>s,UserTypeRetailEmployeeInternal:()=>a,UserTypeRetailEmployeePersonal:()=>o,UserTypeWallet:()=>u,automatedEvents:()=>xn,automatedMappingConfig:()=>In,clearMarkEntry:()=>Vn,clearPerformanceMarkEntries:()=>Xn,config:()=>A,createEventConfig:()=>On,createNewSpan:()=>Ln,createNewTrace:()=>Un,device:()=>W,endPerfMark:()=>Jn,exposeExperiment:()=>wn,flushQueue:()=>or,generateUUID:()=>V,getAnalyticsHeaders:()=>sr,getReferrerData:()=>le,getTracingHeaders:()=>An,getTracingId:()=>Dn,getUrlHostname:()=>pe,getUrlParams:()=>me,getUrlPathname:()=>fe,getUserContext:()=>ar,identify:()=>Tn,identifyFlow:()=>xe,identity:()=>H,identityFlow:()=>Se,incrementUjNavigation:()=>an,init:()=>yn,initNextJsTrackPageview:()=>_n,initTrackPageview:()=>kn,isEventKeyFormatValid:()=>we,isSessionEnded:()=>pt,location:()=>re,logEvent:()=>$t,logMetric:()=>Ht,logPageView:()=>on,logTrace:()=>Rn,markNTBT:()=>tn,markStep:()=>nn,markStepOnce:()=>rn,onVisibilityChange:()=>ln,optIn:()=>En,optOut:()=>Sn,perfMark:()=>Wn,persistentData:()=>oe,postMessage:()=>K,recordSessionDuration:()=>pn,removeFromIdentifyFlow:()=>Ee,savePersistentData:()=>st,sendScheduledEvents:()=>Bt,setBreadcrumbs:()=>ie,setConfig:()=>U,setLocation:()=>ae,setPagePath:()=>ve,setPageview:()=>Kt,setPersistentData:()=>se,setSessionStart:()=>dt,setTime:()=>Ue,startPerfMark:()=>Hn,timeStone:()=>Le,useEventLogger:()=>Yn,useLogEventOnMount:()=>tr,usePerformanceMarks:()=>rr});let e=function(e){return e.fbclid=\\\"fbclid\\\",e.gclid=\\\"gclid\\\",e.msclkid=\\\"msclkid\\\",e.ptclid=\\\"ptclid\\\",e.ttclid=\\\"ttclid\\\",e.utm_source=\\\"utm_source\\\",e.utm_medium=\\\"utm_medium\\\",e.utm_campaign=\\\"utm_campaign\\\",e.utm_term=\\\"utm_term\\\",e.utm_content=\\\"utm_content\\\",e}({});const t=0,i=1,a=2,o=3,s=4,c=5,u=6;let l=function(e){return e.low=\\\"low\\\",e.high=\\\"high\\\",e}({}),d=function(e){return e.count=\\\"count\\\",e.rate=\\\"rate\\\",e.gauge=\\\"gauge\\\",e.distribution=\\\"distribution\\\",e.histogram=\\\"histogram\\\",e}({}),p=function(e){return e.commerce_merchant=\\\"commerce_merchant\\\",e.device=\\\"device\\\",e.edp_fingerprint_id=\\\"edp_fingerprint_id\\\",e.nft_user=\\\"nft_user\\\",e.user=\\\"user\\\",e.wallet_user=\\\"wallet_user\\\",e.uuid=\\\"user_uuid\\\",e}({}),m=function(e){return e.unknown=\\\"unknown\\\",e.banner=\\\"banner\\\",e.button=\\\"button\\\",e.card=\\\"card\\\",e.chart=\\\"chart\\\",e.content_script=\\\"content_script\\\",e.dropdown=\\\"dropdown\\\",e.link=\\\"link\\\",e.page=\\\"page\\\",e.modal=\\\"modal\\\",e.table=\\\"table\\\",e.search_bar=\\\"search_bar\\\",e.service_worker=\\\"service_worker\\\",e.text=\\\"text\\\",e.text_input=\\\"text_input\\\",e.tray=\\\"tray\\\",e.checkbox=\\\"checkbox\\\",e.icon=\\\"icon\\\",e}({}),f=function(e){return e.unknown=\\\"unknown\\\",e.blur=\\\"blur\\\",e.click=\\\"click\\\",e.change=\\\"change\\\",e.dismiss=\\\"dismiss\\\",e.focus=\\\"focus\\\",e.hover=\\\"hover\\\",e.select=\\\"select\\\",e.measurement=\\\"measurement\\\",e.move=\\\"move\\\",e.process=\\\"process\\\",e.render=\\\"render\\\",e.scroll=\\\"scroll\\\",e.view=\\\"view\\\",e.search=\\\"search\\\",e.keyPress=\\\"keyPress\\\",e}({}),v=function(e){return e.unknown=\\\"unknown\\\",e.web=\\\"web\\\",e.android=\\\"android\\\",e.ios=\\\"ios\\\",e.mobile_web=\\\"mobile_web\\\",e.tablet_web=\\\"tablet_web\\\",e.server=\\\"server\\\",e.windows=\\\"windows\\\",e.macos=\\\"macos\\\",e.extension=\\\"extension\\\",e}({}),g=function(e){return e.web=\\\"Web\\\",e.ios=\\\"iOS\\\",e.android=\\\"Android\\\",e}({}),b=function(e){return e[e.notLoggedIn=0]=\\\"notLoggedIn\\\",e[e.loggedIn=1]=\\\"loggedIn\\\",e}({}),h=function(e){return e.ac=\\\"ac\\\",e.af=\\\"af\\\",e.ah=\\\"ah\\\",e.al=\\\"al\\\",e.am=\\\"am\\\",e.ar=\\\"ar\\\",e.as=\\\"as\\\",e}({}),w=function(e){return e.pv=\\\"pv\\\",e}({}),y=function(e){return e.xs=\\\"xs\\\",e.s=\\\"s\\\",e.m=\\\"m\\\",e.l=\\\"l\\\",e.xl=\\\"xl\\\",e.xxl=\\\"xxl\\\",e}({});const T=\\\"https://analytics-service-dev.cbhq.net\\\",k=3e5,_=5e3,S=\\\"analytics-db\\\",E=\\\"experiment-exposure-db\\\",x=\\\"Analytics SDK:\\\",O=Object.values(e),j=\\\"pageview\\\",N=\\\"session_duration\\\",I={navigationTiming:{eventName:\\\"perf_navigation_timing\\\"},redirectTime:{eventName:\\\"perf_redirect_time\\\"},RT:{eventName:\\\"perf_redirect_time\\\"},TTFB:{eventName:\\\"perf_time_to_first_byte\\\"},networkInformation:{eventName:\\\"perf_network_information\\\"},storageEstimate:{eventName:\\\"perf_storage_estimate\\\"},FCP:{eventName:\\\"perf_first_contentful_paint\\\"},FID:{eventName:\\\"perf_first_input_delay\\\"},LCP:{eventName:\\\"perf_largest_contentful_paint\\\"},CLS:{eventName:\\\"perf_cumulative_layout_shift\\\"},TBT:{eventName:\\\"perf_total_blocking_time\\\"},NTBT:{eventName:\\\"perf_navigation_total_blocking_time\\\"},INP:{eventName:\\\"perf_interact_to_next_paint\\\"},ET:{eventName:\\\"perf_element_timing\\\"},userJourneyStep:{eventName:\\\"perf_user_journey_step\\\"}},P=\\\"1\\\",M=\\\"web\\\";function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}const C=/^(https?:\\\\\\\\/\\\\\\\\/)/;function D(e){return{eventsEndpoint:e+\\\"/amp\\\",metricsEndPoint:e+\\\"/metrics\\\",exposureEndpoint:e+\\\"/track-exposures\\\",tracesEndpoint:e+\\\"/traces\\\"}}const A=B({authCookie:\\\"logged_in\\\",amplitudeApiKey:\\\"\\\",batchEventsPeriod:_,batchEventsThreshold:30,batchMetricsPeriod:_,batchMetricsThreshold:30,batchTracesPeriod:_,batchTracesThreshold:30,headers:{},interactionManager:null,isAlwaysAuthed:!1,isProd:!1,isInternalApplication:!1,onError:(e,t)=>{console.error(x,e,t)},platform:v.unknown,projectName:\\\"\\\",ricTimeoutScheduleEvent:1e3,ricTimeoutSetDevice:500,showDebugLogging:!1,trackUserId:!1,version:null,apiEndpoint:T},D(T),{steps:{}}),L=[].reduce(((e,t)=>n=>e(t(n))),(e=>{if(!e.isProd)return e.isInternalApplication?(e.apiEndpoint=\\\"https://analytics-service-internal-dev.cbhq.net\\\",B({},e,D(e.apiEndpoint))):e;const t=(e=>e.apiEndpoint?C.test(e.apiEndpoint)?e.apiEndpoint:`https://${e.apiEndpoint}`:e.isInternalApplication?\\\"https://analytics-service-internal.cbhq.net\\\":\\\"https://as.coinbase.com\\\")(e);return B({},e,{apiEndpoint:t},D(t))})),U=e=>{const{batchEventsThreshold:t,batchMetricsThreshold:n,batchTracesThreshold:r}=e,i=[t,n,r];for(const e of i)if((e||0)>30){console.warn(\\\"You are setting the threshhold for the batch limit to be greater than 30. This may cause request overload.\\\");break}Object.assign(A,L(e))},R=[v.web,v.mobile_web,v.tablet_web];function q(){return\\\"android\\\"===A.platform}function F(){return\\\"ios\\\"===A.platform}function z(){return R.includes(A.platform)}function K(e){if(z()&&navigator&&\\\"serviceWorker\\\"in navigator&&navigator.serviceWorker.controller)try{navigator.serviceWorker.controller.postMessage(e)}catch(e){e instanceof Error&&A.onError(e)}}var $=n(353),Q=n.n($);const W={amplitudeOSName:null,amplitudeOSVersion:null,amplitudeDeviceModel:null,amplitudePlatform:null,browserName:null,browserMajor:null,osName:null,userAgent:null,width:null,height:null},H={countryCode:null,deviceId:null,device_os:null,isOptOut:!1,languageCode:null,locale:null,jwt:null,session_lcc_id:null,userAgent:null,userId:null},V=e=>e?(e^16*Math.random()>>e/4).toString(16):\\\"10000000-1000-4000-8000-100000000000\\\".replace(/[018]/g,V),J=()=>A.isAlwaysAuthed||!!H.userId,X=()=>{const e={};return H.countryCode&&(e.country_code=H.countryCode),e},G=()=>{const{platform:e}=A;if(e===v.web)switch(!0){case window.matchMedia(\\\"(max-width: 560px)\\\").matches:return v.mobile_web;case window.matchMedia(\\\"(max-width: 1024px, min-width: 561px)\\\").matches:return v.tablet_web}return e},Z=()=>{var e,t,n,r,i;z()?(\\\"requestIdleCallback\\\"in window?window.requestIdleCallback(ne,{timeout:A.ricTimeoutSetDevice}):ne(),W.amplitudePlatform=g.web,W.userAgent=(null==(e=window)||null==(e=e.navigator)?void 0:e.userAgent)||null,ee({height:null!=(t=null==(n=window)?void 0:n.innerHeight)?t:null,width:null!=(r=null==(i=window)?void 0:i.innerWidth)?r:null})):F()?(W.amplitudePlatform=g.ios,W.userAgent=H.userAgent,W.userAgent&&ne()):q()&&(W.userAgent=H.userAgent,W.amplitudePlatform=g.android,W.userAgent&&ne())},Y=e=>{Object.assign(H,e),z()&&K({identity:{isAuthed:!!H.userId,locale:H.locale||null}})},ee=e=>{W.height=e.height,W.width=e.width},te=()=>{U({platform:G()}),z()&&K({config:{platform:A.platform}})},ne=()=>{var e;performance.mark&&performance.mark(\\\"ua_parser_start\\\");const t=new(Q())(null!=(e=W.userAgent)?e:\\\"\\\").getResult();W.browserName=t.browser.name||null,W.browserMajor=t.browser.major||null,W.osName=t.os.name||null,W.amplitudeOSName=W.browserName,W.amplitudeOSVersion=W.browserMajor,W.amplitudeDeviceModel=W.osName,K({device:{browserName:W.browserName,osName:W.osName}}),performance.mark&&(performance.mark(\\\"ua_parser_end\\\"),performance.measure(\\\"ua_parser\\\",\\\"ua_parser_start\\\",\\\"ua_parser_end\\\"))},re={breadcrumbs:[],initialUAAData:{},pageKey:\\\"\\\",pageKeyRegex:{},pagePath:\\\"\\\",prevPageKey:\\\"\\\",prevPagePath:\\\"\\\"};function ie(e){Object.assign(re,{breadcrumbs:e})}function ae(e){Object.assign(re,e)}const oe={eventId:0,sequenceNumber:0,sessionId:0,lastEventTime:0,sessionStart:0,sessionUUID:null,userId:null,ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0};function se(e){Object.assign(oe,e)}function ce(){var e,t;return null!=(e=null==(t=document)?void 0:t.referrer)?e:\\\"\\\"}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(this,arguments)}const le=()=>{const e=ce();if(!e)return{};const t=new URL(e);return t.hostname===pe()?{}:{referrer:e,referring_domain:t.hostname}},de=()=>{const e=new URLSearchParams(me()),t={};return O.forEach((n=>{e.has(n)&&(t[n]=(e.get(n)||\\\"\\\").toLowerCase())})),t},pe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.hostname)||\\\"\\\"},me=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.search)||\\\"\\\"},fe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.pathname)||\\\"\\\"},ve=()=>{const e=A.overrideWindowLocation?re.pagePath:fe()+me();e&&e!==re.pagePath&&(e!==re.pagePath&&ge(),re.pagePath=e,re.pageKeyRegex&&Object.keys(re.pageKeyRegex).some((e=>{if(re.pageKeyRegex[e].test(re.pagePath))return re.pageKey=e,!0})))},ge=()=>{if(z()){const e=ce();if(!re.prevPagePath&&e){const t=new URL(e);if(t.hostname===pe())return void(re.prevPagePath=t.pathname)}}re.prevPagePath=re.pagePath,re.prevPageKey=re.pageKey},be=e=>{z()&&Object.assign(e,z()?(Object.keys(re.initialUAAData).length>0||(new URLSearchParams(me()),re.initialUAAData=ue({},(()=>{const e={};return O.forEach((t=>{oe[t]&&(e[t]=oe[t])})),e})(),de(),le())),re.initialUAAData):re.initialUAAData)},he=/^[a-zd]+(_[a-zd]+)*$/;function we(e){return he.test(e)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye.apply(this,arguments)}const Te=[\\\"action\\\",\\\"component_type\\\",\\\"component_name\\\",\\\"context\\\",\\\"logging_id\\\"],ke=[\\\"num_non_hardware_accounts\\\",\\\"ujs\\\"],_e=\\\"ujs_\\\",Se={};function Ee(e){e.forEach((e=>{ke.includes(e)&&delete Se[e]}))}function xe(e){var t;const n=Object.entries(e).reduce(((e,t)=>{const[n,r]=t;return!Te.includes(n)&&ke.includes(n)?we(n)?ye({},e,{[n]:r}):(A.onError(new Error(\\\"IdentityFlow property names must have snake case format\\\"),{[n]:r}),e):e}),{});null!=(t=n.ujs)&&t.length&&(n.ujs=n.ujs.map((e=>`${_e}${e}`))),Object.assign(Se,n)}function Oe(){return A.platform!==v.unknown||(A.onError(new Error(\\\"SDK platform not initialized\\\")),!1)}const je={eventsQueue:[],eventsScheduled:!1,metricsQueue:[],metricsScheduled:!1,tracesQueue:[],tracesScheduled:!1};function Ne(e){Object.assign(je,e)}const Ie={ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0},Pe={ac:20,af:5,ah:1,al:1,am:0,ar:10,as:20},Me={pv:25},Be={xs:0,s:1,m:1,l:2,xl:2,xxl:2},Ce=e=>e<15?y.xs:e<60?y.s:e<240?y.m:e<960?y.l:e<3840?y.xl:y.xxl,De=e=>{Object.assign(Ie,e)};function Ae(){return(new Date).getTime()}const Le={timeStart:Ae(),timeOnPagePath:0,timeOnPageKey:0,prevTimeOnPagePath:0,prevTimeOnPageKey:0,sessionDuration:0,sessionEnd:0,sessionStart:0,prevSessionDuration:0};function Ue(e){Object.assign(Le,e)}const Re=(e,t)=>t.some((t=>e instanceof t));let qe,Fe;const ze=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Qe=new WeakMap,We=new WeakMap;let He={get(e,t,n){if(e instanceof IDBTransaction){if(\\\"done\\\"===t)return Ke.get(e);if(\\\"objectStoreNames\\\"===t)return e.objectStoreNames||$e.get(e);if(\\\"store\\\"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Je(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&(\\\"done\\\"===t||\\\"store\\\"===t)||t in e};function Ve(e){return\\\"function\\\"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||\\\"objectStoreNames\\\"in IDBTransaction.prototype?(Fe||(Fe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(Xe(this),e),Je(ze.get(this))}:function(...e){return Je(t.apply(Xe(this),e))}:function(e,...n){const r=t.call(Xe(this),e,...n);return $e.set(r,e.sort?e.sort():[e]),Je(r)}:(e instanceof IDBTransaction&&function(e){if(Ke.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener(\\\"complete\\\",i),e.removeEventListener(\\\"error\\\",a),e.removeEventListener(\\\"abort\\\",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(\\\"AbortError\\\",\\\"AbortError\\\")),r()};e.addEventListener(\\\"complete\\\",i),e.addEventListener(\\\"error\\\",a),e.addEventListener(\\\"abort\\\",a)}));Ke.set(e,t)}(e),Re(e,qe||(qe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,He):e);var t}function Je(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener(\\\"success\\\",i),e.removeEventListener(\\\"error\\\",a)},i=()=>{t(Je(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(\\\"success\\\",i),e.addEventListener(\\\"error\\\",a)}));return t.then((t=>{t instanceof IDBCursor&&ze.set(t,e)})).catch((()=>{})),We.set(t,e),t}(e);if(Qe.has(e))return Qe.get(e);const t=Ve(e);return t!==e&&(Qe.set(e,t),We.set(t,e)),t}const Xe=e=>We.get(e),Ge=[\\\"get\\\",\\\"getKey\\\",\\\"getAll\\\",\\\"getAllKeys\\\",\\\"count\\\"],Ze=[\\\"put\\\",\\\"add\\\",\\\"delete\\\",\\\"clear\\\"],Ye=new Map;function et(e,t){if(!(e instanceof IDBDatabase)||t in e||\\\"string\\\"!=typeof t)return;if(Ye.get(t))return Ye.get(t);const n=t.replace(/FromIndex$/,\\\"\\\"),r=t!==n,i=Ze.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Ge.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?\\\"readwrite\\\":\\\"readonly\\\");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Ye.set(t,a),a}var tt;tt=He,He={...tt,get:(e,t,n)=>et(e,t)||tt.get(e,t,n),has:(e,t)=>!!et(e,t)||tt.has(e,t)};const nt={isReady:!1,idbKeyval:null};function rt(e){Object.assign(nt,e)}const it={},at=async e=>{if(!nt.idbKeyval)return Promise.resolve(null);try{return await nt.idbKeyval.get(e)}catch(e){return A.onError(new Error(\\\"IndexedDB:Get:InternalError\\\")),Promise.resolve(null)}},ot=async(e,t)=>{if(nt.idbKeyval)try{await nt.idbKeyval.set(e,t)}catch(e){A.onError(new Error(\\\"IndexedDB:Set:InternalError\\\"))}},st=()=>{\\\"server\\\"!==A.platform&&(se({sessionStart:Le.sessionStart,ac:Ie.ac,af:Ie.af,ah:Ie.ah,al:Ie.al,am:Ie.am,ar:Ie.ar,as:Ie.as,pv:Ie.pv}),H.userId&&se({userId:H.userId}),ot(S,oe))},ct=\\\"rgb(5,177,105)\\\",ut=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`%c ${x}`,a=`color:${ct};font-size:11px;`,o=`Importance: ${r}`;console.group(i,a,t,o),n.forEach((e=>{e.event_type?console.log(e.event_type,e):console.log(e)})),console.groupEnd()},lt=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`color:${ct};font-size:11px;`,a=`%c ${x}`,o=`Importance: ${r}`;console.log(a,i,t,n,o)},dt=()=>{const e=Ae();oe.sessionId&&oe.lastEventTime&&oe.sessionUUID&&!pt(e)||(oe.sessionId=e,oe.sessionUUID=V(),Ue({sessionStart:e}),lt({metricName:\\\"Started new session:\\\",data:{persistentData:oe,timeStone:Le}})),oe.lastEventTime=e},pt=e=>e-oe.lastEventTime>18e5;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}const ft=e=>{var t;(e=>{switch(e.action){case f.click:Ie.ac+=1;break;case f.focus:Ie.af+=1;break;case f.hover:Ie.ah+=1;break;case f.move:Ie.am+=1;break;case f.scroll:Ie.al+=1;break;case f.search:Ie.ar+=1;break;case f.select:Ie.as+=1}})(t=e),t.event_type!==j?t.event_type===N&&((e=>{if(!e.session_rank)return;const t=e.session_rank;Object.values(h).forEach((e=>{Ie.sqs+=Ie[e]*Pe[e]})),Object.values(w).forEach((e=>{Ie.sqs+=Ie[e]*Me[e]})),Ie.sqs*=Be[t]})(t),Object.assign(t,Ie),De({ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0})):Ie.pv+=1;const n=e.event_type;delete e.event_type;const r=e.deviceId?e.deviceId:null,i=e.timestamp;return delete e.timestamp,se({eventId:oe.eventId+1}),se({sequenceNumber:oe.sequenceNumber+1}),dt(),st(),{device_id:H.deviceId||r||null,user_id:H.userId,timestamp:i,event_id:oe.eventId,session_id:oe.sessionId||-1,event_type:n,version_name:A.version||null,platform:W.amplitudePlatform,os_name:W.amplitudeOSName,os_version:W.amplitudeOSVersion,device_model:W.amplitudeDeviceModel,language:H.languageCode,event_properties:mt({},e,{session_uuid:oe.sessionUUID,height:W.height,width:W.width}),user_properties:X(),uuid:V(),library:{name:\\\"@cbhq/client-analytics\\\",version:\\\"10.6.0\\\"},sequence_number:oe.sequenceNumber,user_agent:W.userAgent||H.userAgent}},vt=e=>e.map((e=>ft(e)));function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gt.apply(this,arguments)}const bt=e=>e.map((e=>(e=>{const t=e.tags||{},n=gt({authed:J()?\\\"true\\\":\\\"false\\\",platform:A.platform},t,{project_name:A.projectName,version_name:A.version||null});return{metric_name:e.metricName,page_path:e.pagePath||null,value:e.value,tags:n,type:e.metricType}})(e))),ht=e=>0!==je.metricsQueue.length&&(je.metricsQueue.length>=A.batchMetricsThreshold||(je.metricsScheduled||(je.metricsScheduled=!0,setTimeout((()=>{je.metricsScheduled=!1,e(bt(je.metricsQueue)),je.metricsQueue=[]}),A.batchMetricsPeriod)),!1)),wt=e=>0!==je.tracesQueue.length&&(je.tracesQueue.length>=A.batchTracesThreshold||(je.tracesScheduled||(je.tracesScheduled=!0,setTimeout((()=>{je.tracesScheduled=!1,e(je.tracesQueue),je.tracesQueue=[]}),A.batchTracesPeriod)),!1)),yt=e=>{var t;z()&&null!=(t=window)&&t.requestIdleCallback?window.requestIdleCallback(e,{timeout:A.ricTimeoutScheduleEvent}):(q()||F())&&A.interactionManager?A.interactionManager.runAfterInteractions(e):e()};function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tt.apply(this,arguments)}const kt=\\\"application/x-www-form-urlencoded; charset=UTF-8\\\",_t=e=>{const{data:t,importance:n,isJSON:r,onError:i,url:a}=e,o=r?\\\"application/json\\\":kt,s=n||l.low,c=r?JSON.stringify(t):new URLSearchParams(t).toString();function u(){const e=new XMLHttpRequest;e.open(\\\"POST\\\",a,!0),Object.keys(A.headers||{}).forEach((t=>{e.setRequestHeader(t,A.headers[t])})),e.setRequestHeader(\\\"Content-Type\\\",kt),H.jwt&&e.setRequestHeader(\\\"authorization\\\",`Bearer ${H.jwt}`),e.send(c)}if(!z()||r||!(\\\"sendBeacon\\\"in navigator)||s!==l.low||A.headers&&0!==Object.keys(A.headers).length)if(z()&&!r)u();else{const e=Tt({},A.headers,{\\\"Content-Type\\\":o});H.jwt&&(e.Authorization=`Bearer ${H.jwt}`),fetch(a,{method:\\\"POST\\\",mode:\\\"no-cors\\\",headers:e,body:c}).catch((e=>{i(e,{context:\\\"AnalyticsSDKApiError\\\"})}))}else{const e=new Blob([c],{type:kt});try{navigator.sendBeacon.bind(navigator)(a,e)||u()}catch(e){console.error(e),u()}}};var St=n(762),Et=n.n(St);const xt=(e,t,n)=>{const r=e||\\\"\\\";return Et()(\\\"2\\\"+r+t+n)};function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}class jt extends Error{constructor(e){super(e),this.name=\\\"CircularJsonReference\\\",this.message=e,\\\"function\\\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}class Nt extends jt{constructor(...e){super(...e),this.name=\\\"DomReferenceInAnalyticsEvent\\\"}}function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}const Pt=(e,t=l.low)=>{var n;e&&je.eventsQueue.push(e),nt.isReady&&(!A.trackUserId||H.userId?(t===l.high||(n=Mt,0!==je.eventsQueue.length&&(je.eventsQueue.length>=A.batchEventsThreshold||(je.eventsScheduled||(je.eventsScheduled=!0,setTimeout((()=>{je.eventsScheduled=!1,n(vt(je.eventsQueue)),je.eventsQueue=[]}),A.batchEventsPeriod)),0))))&&Bt():je.eventsQueue.length>10&&(A.trackUserId=!1,A.onError(new Error(\\\"userId not set in Logged-in\\\"))))},Mt=(e,t=l.low)=>{if(H.isOptOut||0===e.length)return;let n;try{n=JSON.stringify(e)}catch(t){const r=e.map((e=>e.event_type)).join(\\\", \\\"),[i,a]=(e=>{try{const n=[];for(const r of e){const e=Ot({},r);r.event_properties&&(e.event_properties=Ot({},e.event_properties,{currentTarget:null,target:null,relatedTarget:null,_dispatchInstances:null,_targetInst:null,view:(t=r.event_properties.view,[\\\"string\\\",\\\"number\\\",\\\"boolean\\\"].includes(typeof t)?r.event_properties.view:null)})),n.push(e)}return[!0,JSON.stringify(n)]}catch(e){return[!1,\\\"\\\"]}var t})(e);if(!i)return void A.onError(new jt(t instanceof Error?t.message:\\\"unknown\\\"),{listEventType:r});n=a,A.onError(new Nt(\\\"Found DOM element reference\\\"),{listEventType:r,stringifiedEventData:n})}const r=Ae().toString(),i=It({},{e:n,v:\\\"2\\\",upload_time:r},{client:A.amplitudeApiKey,checksum:xt(A.amplitudeApiKey,n,r)});_t({url:A.eventsEndpoint,data:i,importance:t,onError:A.onError}),ut({metricName:\\\"Batch Events\\\",data:e,importance:t})},Bt=()=>{Mt(vt(je.eventsQueue)),Ne({eventsQueue:[]})};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ct.apply(this,arguments)}const Dt=Object.values(f),At=Object.values(m),Lt=e=>Dt.includes(e)?e:f.unknown,Ut=e=>At.includes(e)?e:m.unknown,Rt=(e,t,n)=>{const r={auth:J()?b.loggedIn:b.notLoggedIn,action:Lt(e),component_type:Ut(t),logging_id:n,platform:A.platform,project_name:A.projectName};return\\\"number\\\"==typeof H.userTypeEnum&&(r.user_type_enum=H.userTypeEnum),r},qt=e=>{const t=Ae();if(!e)return A.onError(new Error(\\\"missing logData\\\")),Ct({},Rt(f.unknown,m.unknown),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});const n=Ct({},e,Rt(e.action,e.componentType,e.loggingId),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});return delete n.componentType,delete n.loggingId,n},Ft={blacklistRegex:[],isEnabled:!1};function zt(){return{page_key:re.pageKey,page_path:re.pagePath,prev_page_key:re.prevPageKey,prev_page_path:re.prevPagePath}}function Kt(e){Object.assign(Ft,e)}function $t(e,t,n=l.low){if(H.isOptOut)return;if(!Oe())return;const r=qt(t);!function(e){Ft.isEnabled&&(ve(),Object.assign(e,zt()))}(r),be(r),function(e){Object.keys(Se).length>0&&Object.assign(e,Se)}(r),r.has_double_fired=!1,r.event_type=e,n===l.high?Pt(r,n):yt((()=>{Pt(r)}))}function Qt(e,t=!1){t?_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError})})),ut({metricName:\\\"Batch Metrics\\\",data:e})}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}function Ht(e){if(!Oe())return;v.server!==A.platform&&!e.pagePath&&re.pagePath&&(e.pagePath=re.pagePath);const t=Object.keys(Se).length?Wt({},e.tags,Se):e.tags;t&&Object.assign(e,{tags:t}),je.metricsQueue.push(e),ht(Qt)&&(Qt(bt(je.metricsQueue)),je.metricsQueue=[])}function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vt.apply(this,arguments)}let Jt=function(e){return e.instant=\\\"instant\\\",e.quick=\\\"quick\\\",e.moderate=\\\"moderate\\\",e.slow=\\\"slow\\\",e.unavoidable=\\\"unavoidable\\\",e}({});function Xt(e){return e.toLowerCase()}let Gt={};const Zt=(e,t)=>{null!=A&&A.onMarkStep&&A.onMarkStep(e,t),xe({ujs:t})};let Yt;const en={Perfume:()=>{},markStep:e=>{},markStepOnce:e=>{},incrementUjNavigation:()=>{}},tn=()=>{z()&&Yt&&Yt.markNTBT&&Yt.markNTBT()},nn=e=>{z()&&Yt&&en.markStep&&en.markStep(e)},rn=e=>{z()&&Yt&&en.markStepOnce&&en.markStepOnce(e)},an=()=>{z()&&Yt&&en.incrementUjNavigation&&en.incrementUjNavigation()};function on(e={callMarkNTBT:!0}){\\\"unknown\\\"!==A.platform&&(Ft.blacklistRegex.some((e=>e.test(fe())))||($t(j,{action:f.render,componentType:m.page}),e.callMarkNTBT&&tn()))}let sn=!1,cn=!1;const un=e=>{sn=!e.persisted},ln=(e,t=\\\"hidden\\\",n=!1)=>{cn||(addEventListener(\\\"pagehide\\\",un),addEventListener(\\\"beforeunload\\\",(()=>{})),cn=!0),addEventListener(\\\"visibilitychange\\\",(({timeStamp:n})=>{document.visibilityState===t&&e({timeStamp:n,isUnloading:sn})}),{capture:!0,once:n})},dn=36e3;function pn(){const e=pt(Ae());if(e&&(O.forEach((e=>{oe[e]&&delete oe[e]})),st()),!oe.lastEventTime||!Le.sessionStart||!e)return;const t=Math.round((oe.lastEventTime-Le.sessionStart)/1e3);if(t<1||t>dn)return;const n=Ce(t);$t(N,{action:f.measurement,componentType:m.page,session_duration:t,session_end:oe.lastEventTime,session_start:Le.sessionStart,session_rank:n})}function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mn.apply(this,arguments)}const fn=[],vn=[],gn=()=>{const e=fn.shift();e&&e()},bn=()=>{const e=vn.shift();e&&e()};let hn={};function wn(e){const t=function(e){return{test_name:e.testName,group_name:e.group,subject_id:e.subjectId,exposed_at:Ae(),subject_type:e.subjectType,platform:A.platform}}(e);hn[e.testName]=hn[e.testName]||0,hn[e.testName]+k>Ae()?lt({metricName:`Event: exposeExperiment ${e.testName} not sent`,data:t}):(hn[e.testName]=Ae(),ot(E,hn),lt({metricName:`Event: exposeExperiment ${e.testName} sent`,data:t}),_t({url:A.exposureEndpoint,data:[t],onError:(t,n)=>{hn[e.testName]=0,ot(E,hn),A.onError(t,n)},isJSON:!0,importance:l.high}))}const yn=e=>{var t,r,i;U(e),z()&&(H.languageCode=(null==(t=navigator)?void 0:t.languages[0])||(null==(r=navigator)?void 0:r.language)||\\\"\\\"),te(),(()=>{var e;if(z()&&null!=(e=window)&&e.indexedDB){const e=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Je(o);return r&&o.addEventListener(\\\"upgradeneeded\\\",(e=>{r(Je(o.result),e.oldVersion,e.newVersion,Je(o.transaction),e)})),n&&o.addEventListener(\\\"blocked\\\",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener(\\\"close\\\",(()=>a())),i&&e.addEventListener(\\\"versionchange\\\",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}(\\\"keyval-store\\\",1,{upgrade(e){e.createObjectStore(\\\"keyval\\\")}});rt({idbKeyval:{get:async t=>(await e).get(\\\"keyval\\\",t),set:async(t,n)=>(await e).put(\\\"keyval\\\",n,t),delete:async t=>(await e).delete(\\\"keyval\\\",t),keys:async()=>(await e).getAllKeys(\\\"keyval\\\")}})}else rt({idbKeyval:{get:async e=>new Promise((t=>{t(it[e])})),set:async(e,t)=>new Promise((n=>{it[e]=t,n(e)})),delete:async e=>new Promise((()=>{delete it[e]})),keys:async()=>new Promise((e=>{e(Object.keys(it))}))}})})(),lt({metricName:\\\"Initialized Analytics:\\\",data:{deviceId:H.deviceId}}),fn.push((()=>{Pt()})),(async()=>{const e=await at(S);rt({isReady:!0}),gn(),e&&(bn(),se({eventId:e.eventId||oe.eventId,sequenceNumber:e.sequenceNumber||oe.sequenceNumber,sessionId:e.sessionId||oe.sessionId,lastEventTime:e.lastEventTime||oe.lastEventTime,sessionUUID:e.sessionUUID||oe.sessionUUID}),function(e){se(mn({},function(e){const t={};return O.forEach((n=>{e[n]&&(t[n]=e[n])})),t}(e),de()))}(e),Ue({sessionStart:e.sessionStart||oe.sessionStart}),De({ac:e.ac||Ie.ac,af:e.af||Ie.af,ah:e.ah||Ie.ah,al:e.al||Ie.al,am:e.am||Ie.am,ar:e.ar||Ie.ar,as:e.as||Ie.as,pv:e.pv||Ie.pv}),A.trackUserId&&Y({userId:e.userId||H.userId}),pn(),lt({metricName:\\\"Initialized Analytics IndexedDB:\\\",data:e}))})(),async function(){at(E).then((e=>{hn=null!=e?e:{}})).catch((e=>{e instanceof Error&&A.onError(e)}))}(),Z(),z()&&(ln((()=>{se({lastEventTime:Ae()}),st(),Bt()}),\\\"hidden\\\"),ln((()=>{pn()}),\\\"visible\\\")),z()&&(i=()=>{var e,t,n,r;te(),ee({width:null!=(e=null==(t=window)?void 0:t.innerWidth)?e:null,height:null!=(n=null==(r=window)?void 0:r.innerHeight)?n:null})},addEventListener(\\\"resize\\\",(()=>{requestAnimationFrame((()=>{i()}))}))),(()=>{if(z())try{const e=n(2);en.markStep=e.markStep,en.markStepOnce=e.markStepOnce,en.incrementUjNavigation=e.incrementUjNavigation,Yt=new e.Perfume({analyticsTracker:e=>{const{data:t,attribution:n,metricName:r,navigatorInformation:i,rating:a}=e,o=I[r],s=(null==n?void 0:n.category)||null;if(!o&&!s)return;const c=(null==i?void 0:i.deviceMemory)||0,u=(null==i?void 0:i.hardwareConcurrency)||0,l=(null==i?void 0:i.isLowEndDevice)||!1,p=(null==i?void 0:i.isLowEndExperience)||!1,v=(null==i?void 0:i.serviceWorkerStatus)||\\\"unsupported\\\",g=Vt({deviceMemory:c,hardwareConcurrency:u,isLowEndDevice:l,isLowEndExperience:p,serviceWorkerStatus:v},Gt),b={is_low_end_device:l,is_low_end_experience:p,page_key:re.pageKey||\\\"\\\",save_data:t.saveData||!1,service_worker:v,is_perf_metric:!0};if(\\\"navigationTiming\\\"===r)t&&\\\"number\\\"==typeof t.redirectTime&&Ht({metricName:I.redirectTime.eventName,metricType:d.histogram,tags:b,value:t.redirectTime||0});else if(\\\"TTFB\\\"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),Ht({metricName:I.TTFB.eventName,metricType:d.histogram,tags:Vt({},b),value:t}),a&&Ht({metricName:`perf_web_vitals_ttfb_${a}`,metricType:d.count,tags:b,value:1});else if(\\\"networkInformation\\\"===r)null!=t&&t.effectiveType&&(Gt=t,$t(o.eventName,{action:f.measurement,componentType:m.page,networkInformationDownlink:t.downlink,networkInformationEffectiveType:t.effectiveType,networkInformationRtt:t.rtt,networkInformationSaveData:t.saveData,navigatorDeviceMemory:c,navigatorHardwareConcurrency:u}));else if(\\\"storageEstimate\\\"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page},t,g)),Ht({metricName:\\\"perf_storage_estimate_caches\\\",metricType:d.histogram,tags:b,value:t.caches}),Ht({metricName:\\\"perf_storage_estimate_indexed_db\\\",metricType:d.histogram,tags:b,value:t.indexedDB});else if(\\\"CLS\\\"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,score:100*t||null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_cls_${a}`,metricType:d.count,tags:b,value:1});else if(\\\"FID\\\"===r){const e=(null==n?void 0:n.performanceEntry)||null,r=parseInt((null==e?void 0:e.processingStart)||\\\"\\\");$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,processingStart:null!=e&&e.processingStart?r:null,startTime:null!=e&&e.startTime?parseInt(e.startTime):null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_fidVitals_${a}`,metricType:d.count,tags:b,value:1})}else\\\"userJourneyStep\\\"===r?($t(\\\"perf_user_journey_step\\\",Vt({action:f.measurement,componentType:m.page,duration:t||null,rating:null!=a?a:null,step_name:(null==n?void 0:n.stepName)||\\\"\\\"},g)),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||\\\"\\\"}_vitals_${a}`,metricType:d.count,tags:b,value:1}),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||\\\"\\\"}`,metricType:d.distribution,tags:b,value:t||null})):I[r]&&t&&($t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),a&&(Ht({metricName:`perf_web_vitals_${Xt(r)}_${a}`,metricType:d.count,tags:b,value:1}),\\\"LCP\\\"===r&&Ht({metricName:`perf_web_vitals_${Xt(r)}`,metricType:d.distribution,tags:b,value:t})))},maxMeasureTime:3e4,steps:A.steps,onMarkStep:Zt})}catch(e){e instanceof Error&&A.onError(e)}})()},Tn=e=>{Y(e),e.userAgent&&Z(),lt({metricName:\\\"Identify:\\\",data:{countryCode:H.countryCode,deviceId:H.deviceId,userId:H.userId}})},kn=({blacklistRegex:e,pageKeyRegex:t,browserHistory:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.listen((()=>{on()}))},_n=({blacklistRegex:e,pageKeyRegex:t,nextJsRouter:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.events.on(\\\"routeChangeComplete\\\",(()=>{on()}))},Sn=()=>{Y({isOptOut:!0}),ot(S,{})},En=()=>{Y({isOptOut:!1})},xn={Button:{label:\\\"cb_button\\\",uuid:\\\"e921a074-40e6-4371-8700-134d5cd633e6\\\",componentType:m.button}};function On(e,t,n){return{componentName:e,actions:t,data:n}}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jn.apply(this,arguments)}function Nn(e,t,n){const{componentName:r,data:i}=n;$t(e.label,jn({componentType:e.componentType,action:t,loggingId:e.uuid,component_name:r},i))}const In={actionMapping:{onPress:f.click,onHover:f.hover},handlers:{Button:{[f.click]:e=>Nn(xn.Button,f.click,e),[f.hover]:e=>Nn(xn.Button,f.hover,e)}}};function Pn(e,t=!1){t?_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError})})),ut({metricName:\\\"Batch Traces\\\",data:e})}function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}const Bn=1e6;function Cn(e){return e*Bn}function Dn(e=function(){var e;return null==(e=window)?void 0:e.crypto}()){const t=new Uint32Array(2);return null==e||e.getRandomValues(t),((BigInt(t[0])<<BigInt(32))+BigInt(t[1])).toString()}function An(e,t){return{\\\"x-datadog-origin\\\":\\\"rum\\\",\\\"x-datadog-parent-id\\\":t,\\\"x-datadog-sampling-priority\\\":\\\"1\\\",\\\"x-datadog-trace-id\\\":e}}function Ln(e){var t;const{name:n,traceId:r,spanId:i,start:a,duration:o,resource:s,meta:c}=e;return{duration:o?Cn(o):0,name:n,resource:s,service:A.projectName,span_id:null!=i?i:Dn(),start:a?Cn(a):0,trace_id:null!=r?r:Dn(),parent_id:P,type:M,meta:Mn({platform:A.platform},re.pageKey?{page_key:re.pageKey}:{},null!=(t=Se.ujs)&&t.length?{last_ujs:Se.ujs[Se.ujs.length-1]}:{},null!=c?c:{})}}function Un(e){return[Ln(e)]}function Rn(e,t){Oe()&&function(e){return e.length>0}(e)&&(t&&function(e,t){e.forEach((e=>function(e,t){const n=Mn({},e.meta,t.meta),r={start:t.start?Cn(t.start):e.start,duration:t.duration?Cn(t.duration):e.duration};Object.assign(e,t,Mn({meta:n},r))}(e,t)))}(e,t),je.tracesQueue.push(e),wt(Pn)&&(Pn(je.tracesQueue),je.tracesQueue=[]))}function qn(e){var t=function(e,t){if(\\\"object\\\"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,\\\"string\\\");if(\\\"object\\\"!=typeof r)return r;throw new TypeError(\\\"@@toPrimitive must return a primitive value.\\\")}return String(e)}(e);return\\\"symbol\\\"==typeof t?t:String(t)}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fn.apply(this,arguments)}function zn(){return void 0!==typeof window&&\\\"performance\\\"in window&&\\\"mark\\\"in performance&&\\\"getEntriesByName\\\"in performance}function Kn(e,t){return`perf_${e}${null!=t&&t.label?`_${t.label}`:\\\"\\\"}`}function $n(e,t,n){return`${Kn(e,n)}__${t}`}let Qn={};function Wn(e,t,n){if(!zn())return;const r=$n(e,t,n);if(performance.mark(r),\\\"end\\\"===t){const t=Kn(e,n);!function(e,t,n){try{performance.measure(e,t,n)}catch(e){A.onError(e)}}(t,$n(e,\\\"start\\\",n),r);const i=performance.getEntriesByName(t).pop();i&&Ht(Fn({metricName:e,metricType:d.distribution,value:i.duration},null!=n&&n.tags?{tags:n.tags}:{}))}}function Hn(e,t){if(!zn())return;const n=$n(e,\\\"start\\\",t);Qn[n]||(Wn(e,\\\"start\\\",t),Qn[n]=!0)}function Vn(e,t){const n=$n(e,\\\"start\\\",t),r=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(Qn,[n].map(qn));Qn=r}function Jn(e,t){if(!zn())return;const n=$n(e,\\\"start\\\",t);Qn[n]&&(Wn(e,\\\"end\\\",t),Vn(e,t))}function Xn(){zn()&&(performance.clearMarks(),Qn={})}var Gn=n(784);function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zn.apply(this,arguments)}function Yn(e,t,n=l.low){const r=(0,Gn.useRef)(t);return(0,Gn.useEffect)((()=>{r.current=t}),[t]),(0,Gn.useCallback)((t=>{$t(e,Zn({},r.current,t),n)}),[e,n])}function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},er.apply(this,arguments)}function tr(e,t,n=l.low){(0,Gn.useEffect)((()=>{const r=er({},t,{action:f.render});$t(e,r,n)}),[])}function nr(){return nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nr.apply(this,arguments)}const rr=function(e,t){return{markStartPerf:(0,Gn.useCallback)((()=>Hn(e,t)),[e,t]),markEndPerf:(0,Gn.useCallback)((n=>Jn(e,nr({},t,n))),[e,t])}};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ir.apply(this,arguments)}function ar(){return Object.entries(ir({},Se,zt(),{sessionUUID:oe.sessionUUID,userId:oe.userId})).reduce(((e,t)=>{return null!=(n=t[1])&&\\\"\\\"!==n?ir({},e,{[t[0]]:t[1]}):e;var n}),{})}async function or(){return new Promise((e=>{Mt(vt(je.eventsQueue)),Qt(bt(je.metricsQueue),!0),Pn(je.tracesQueue,!0),Ne({eventsQueue:[],metricsQueue:[],tracesQueue:[]}),e()}))}function sr(){return{\\\"X-CB-Device-ID\\\":H.deviceId||\\\"unknown\\\",\\\"X-CB-Is-Logged-In\\\":H.userId?\\\"true\\\":\\\"false\\\",\\\"X-CB-Pagekey\\\":re.pageKey||\\\"unknown\\\",\\\"X-CB-UJS\\\":(e=Se.ujs,void 0===e||0===e.length?\\\"\\\":e.join(\\\",\\\")),\\\"X-CB-Platform\\\":A.platform||\\\"unknown\\\",\\\"X-CB-Project-Name\\\":A.projectName||\\\"unknown\\\",\\\"X-CB-Session-UUID\\\":oe.sessionUUID||\\\"unknown\\\",\\\"X-CB-Version-Name\\\":A.version?String(A.version):\\\"unknown\\\"};var e}})(),r})()}));'});var ND,f0t,OX=x(()=>{u();Du();o4e();ND=()=>new Promise((t,e)=>{if(window.ClientAnalytics)return t();try{let r=document.createElement(\\\"script\\\");r.textContent=s4e,r.type=\\\"text/javascript\\\",document.head.appendChild(r),f0t(),document.head.removeChild(r),t()}catch{console.error(\\\"Failed to execute inlined telemetry script\\\"),e()}}),f0t=()=>{var t,e,r;if(typeof window<\\\"u\\\"){let n=(r=(t=Ee.config.get().deviceId)!==null&&t!==void 0?t:(e=window.crypto)===null||e===void 0?void 0:e.randomUUID())!==null&&r!==void 0?r:\\\"\\\";if(window.ClientAnalytics){let{init:i,identify:s,PlatformName:o}=window.ClientAnalytics;i({isProd:!0,amplitudeApiKey:\\\"c66737ad47ec354ced777935b0af822e\\\",platform:o.web,projectName:\\\"base_account_sdk\\\",showDebugLogging:!1,version:\\\"1.0.0\\\",apiEndpoint:\\\"https://cca-lite.coinbase.com\\\"}),s({deviceId:n}),Ee.config.set({deviceId:n})}}}});var Wn,kD,BT=x(()=>{u();Wn={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},kD={\\\"-32700\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\\\"},\\\"-32600\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The JSON sent is not a valid Request object.\\\"},\\\"-32601\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The method does not exist / is not available.\\\"},\\\"-32602\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid method parameter(s).\\\"},\\\"-32603\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Internal JSON-RPC error.\\\"},\\\"-32000\\\":{standard:\\\"EIP-1474\\\",message:\\\"Invalid input.\\\"},\\\"-32001\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource not found.\\\"},\\\"-32002\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource unavailable.\\\"},\\\"-32003\\\":{standard:\\\"EIP-1474\\\",message:\\\"Transaction rejected.\\\"},\\\"-32004\\\":{standard:\\\"EIP-1474\\\",message:\\\"Method not supported.\\\"},\\\"-32005\\\":{standard:\\\"EIP-1474\\\",message:\\\"Request limit exceeded.\\\"},4001:{standard:\\\"EIP-1193\\\",message:\\\"User rejected the request.\\\"},4100:{standard:\\\"EIP-1193\\\",message:\\\"The requested account and/or method has not been authorized by the user.\\\"},4200:{standard:\\\"EIP-1193\\\",message:\\\"The requested method is not supported by this Ethereum provider.\\\"},4900:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from all chains.\\\"},4901:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from the specified chain.\\\"},4902:{standard:\\\"EIP-3085\\\",message:\\\"Unrecognized chain ID.\\\"}}});function BD(t,e=l4e){if(t&&Number.isInteger(t)){let r=t.toString();if(NX(kD,r))return kD[r].message;if(d4e(t))return p0t}return e}function h0t(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(kD[e]||d4e(t))}function u4e(t,{shouldIncludeStack:e=!1}={}){let r={};if(t&&typeof t==\\\"object\\\"&&!Array.isArray(t)&&NX(t,\\\"code\\\")&&h0t(t.code)){let n=t;r.code=n.code,n.message&&typeof n.message==\\\"string\\\"?(r.message=n.message,NX(n,\\\"data\\\")&&(r.data=n.data)):(r.message=BD(r.code),r.data={originalError:a4e(t)})}else r.code=Wn.rpc.internal,r.message=c4e(t,\\\"message\\\")?t.message:l4e,r.data={originalError:a4e(t)};return e&&(r.stack=c4e(t,\\\"stack\\\")?t.stack:void 0),r}function d4e(t){return t>=-32099&&t<=-32e3}function a4e(t){return t&&typeof t==\\\"object\\\"&&!Array.isArray(t)?Object.assign({},t):t}function NX(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c4e(t,e){return typeof t==\\\"object\\\"&&t!==null&&e in t&&typeof t[e]==\\\"string\\\"}var l4e,p0t,kX=x(()=>{u();BT();l4e=\\\"Unspecified error message.\\\",p0t=\\\"Unspecified server error.\\\"});function Lu(t,e){let[r,n]=f4e(e);return new MT(t,r||BD(t),n)}function r3(t,e){let[r,n]=f4e(e);return new MD(t,r||BD(t),n)}function f4e(t){if(t){if(typeof t==\\\"string\\\")return[t];if(typeof t==\\\"object\\\"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!=\\\"string\\\")throw new Error(\\\"Must specify string message.\\\");return[e||void 0,r]}}return[]}function m0t(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function BX(t){return typeof t==\\\"object\\\"&&t!==null&&\\\"code\\\"in t&&\\\"data\\\"in t&&t.code===-32090&&typeof t.data==\\\"object\\\"&&t.data!==null&&\\\"type\\\"in t.data&&t.data.type===\\\"INSUFFICIENT_FUNDS\\\"}function DD(t){return typeof t==\\\"object\\\"&&t!==null&&\\\"details\\\"in t}function p4e(t){try{let e=JSON.parse(t.details);return new MT(e.code,e.message,e.data)}catch{return null}}var pe,MT,MD,va=x(()=>{u();BT();kX();pe={rpc:{parse:t=>Lu(Wn.rpc.parse,t),invalidRequest:t=>Lu(Wn.rpc.invalidRequest,t),invalidParams:t=>Lu(Wn.rpc.invalidParams,t),methodNotFound:t=>Lu(Wn.rpc.methodNotFound,t),internal:t=>Lu(Wn.rpc.internal,t),server:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum RPC Server errors must provide single object argument.\\\");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('\\\"code\\\" must be an integer such that: -32099 <= code <= -32005');return Lu(e,t)},invalidInput:t=>Lu(Wn.rpc.invalidInput,t),resourceNotFound:t=>Lu(Wn.rpc.resourceNotFound,t),resourceUnavailable:t=>Lu(Wn.rpc.resourceUnavailable,t),transactionRejected:t=>Lu(Wn.rpc.transactionRejected,t),methodNotSupported:t=>Lu(Wn.rpc.methodNotSupported,t),limitExceeded:t=>Lu(Wn.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>r3(Wn.provider.userRejectedRequest,t),unauthorized:t=>r3(Wn.provider.unauthorized,t),unsupportedMethod:t=>r3(Wn.provider.unsupportedMethod,t),disconnected:t=>r3(Wn.provider.disconnected,t),chainDisconnected:t=>r3(Wn.provider.chainDisconnected,t),unsupportedChain:t=>r3(Wn.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum Provider custom errors must provide single object argument.\\\");let{code:e,message:r,data:n}=t;if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string');return new MD(e,r,n)}}};MT=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('\\\"code\\\" must be an integer.');if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},MD=class extends MT{constructor(e,r,n){if(!m0t(e))throw new Error('\\\"code\\\" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}});function MX(){return t=>t}function Xd(t){return Math.floor(t)}var n3,h4e,g0t,DX=x(()=>{u();n3=MX(),h4e=MX();g0t=MX()});function Wm(t){return DT(crypto.getRandomValues(new Uint8Array(t)))}function DT(t){return[...t].map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")}function i3(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>Number.parseInt(e,16)))}function mv(t,e=!1){let r=t.toString(\\\"hex\\\");return n3(e?`0x${r}`:r)}function LD(t){return mv(jD(t),!0)}function ef(t){return h4e(t.toString(10))}function Gm(t){return n3(`0x${BigInt(t).toString(16)}`)}function y4e(t){return t.startsWith(\\\"0x\\\")||t.startsWith(\\\"0X\\\")}function LX(t){return y4e(t)?t.slice(2):t}function UX(t){return y4e(t)?`0x${t.slice(2)}`:`0x${t}`}function UD(t){if(typeof t!=\\\"string\\\")return!1;let e=LX(t).toLowerCase();return g4e.test(e)}function FD(t,e=!1){if(typeof t==\\\"string\\\"){let r=LX(t).toLowerCase();if(g4e.test(r))return n3(e?`0x${r}`:r)}throw pe.rpc.invalidParams(`\\\"${String(t)}\\\" is not a hexadecimal string`)}function FX(t,e=!1){let r=FD(t,!1);return r.length%2===1&&(r=n3(`0${r}`)),e?n3(`0x${r}`):r}function Km(t){if(typeof t==\\\"string\\\"){let e=LX(t).toLowerCase();if(UD(e)&&e.length===40)return UX(e)}throw pe.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}function jD(t){if(globalThis.Buffer.isBuffer(t))return t;if(typeof t==\\\"string\\\"){if(UD(t)){let e=FX(t,!1);return globalThis.Buffer.from(e,\\\"hex\\\")}return globalThis.Buffer.from(t,\\\"utf8\\\")}throw pe.rpc.invalidParams(`Not binary data: ${String(t)}`)}function gv(t){if(typeof t==\\\"number\\\"&&Number.isInteger(t))return Xd(t);if(typeof t==\\\"string\\\"){if(m4e.test(t))return Xd(Number(t));if(UD(t))return Xd(Number(BigInt(FX(t,!0))))}throw pe.rpc.invalidParams(`Not an integer: ${String(t)}`)}function s3(t){if(t!==null&&(typeof t==\\\"bigint\\\"||y0t(t)))return BigInt(t.toString(10));if(typeof t==\\\"number\\\")return BigInt(gv(t));if(typeof t==\\\"string\\\"){if(m4e.test(t))return BigInt(t);if(UD(t))return BigInt(FX(t,!0))}throw pe.rpc.invalidParams(`Not an integer: ${String(t)}`)}function b4e(t){if(typeof t==\\\"string\\\")return JSON.parse(t);if(typeof t==\\\"object\\\")return t;throw pe.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}function y0t(t){if(t==null||typeof t.constructor!=\\\"function\\\")return!1;let{constructor:e}=t;return typeof e.config==\\\"function\\\"&&typeof e.EUCLID==\\\"number\\\"}function w4e(){let t=document.querySelector('link[sizes=\\\"192x192\\\"]')||document.querySelector('link[sizes=\\\"180x180\\\"]')||document.querySelector('link[rel=\\\"icon\\\"]')||document.querySelector('link[rel=\\\"shortcut icon\\\"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute(\\\"href\\\"):null;return!n||n.startsWith(\\\"javascript:\\\")||n.startsWith(\\\"vbscript:\\\")?`${e}//${r}/favicon.ico`:n.startsWith(\\\"http://\\\")||n.startsWith(\\\"https://\\\")||n.startsWith(\\\"data:\\\")?n:n.startsWith(\\\"//\\\")?e+n:`${e}//${r}${n}`}var m4e,g4e,tf=x(()=>{u();va();DX();m4e=/^[0-9]*$/,g4e=/^[a-f0-9]*$/});var b0t,w0t,HD,v4e,qD=x(()=>{u();b0t=`Coinbase Wallet SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Coinbase Smart Wallet app.\\n\\nPlease see https://www.smartwallet.dev/guides/tips/popup-tips#cross-origin-opener-policy for more information.`,w0t=()=>{let t;return{getCrossOriginOpenerPolicy:()=>t===void 0?\\\"undefined\\\":t,checkCrossOriginOpenerPolicy:async()=>{if(typeof window>\\\"u\\\"){t=\\\"non-browser-env\\\";return}try{let e=`${window.location.origin}${window.location.pathname}`,r=await fetch(e,{method:\\\"HEAD\\\"});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);let n=r.headers.get(\\\"Cross-Origin-Opener-Policy\\\");t=n??\\\"null\\\",t===\\\"same-origin\\\"&&console.error(b0t)}catch(e){console.error(\\\"Error checking Cross-Origin-Opener-Policy:\\\",e.message),t=\\\"error\\\"}}}},{checkCrossOriginOpenerPolicy:HD,getCrossOriginOpenerPolicy:v4e}=w0t()});async function Ly(t,e){let r=Object.assign(Object.assign({},t),{jsonrpc:\\\"2.0\\\",id:crypto.randomUUID()}),n=await window.fetch(e,{method:\\\"POST\\\",body:JSON.stringify(r),mode:\\\"cors\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\",\\\"X-Cbw-Sdk-Version\\\":Mu,\\\"X-Cbw-Sdk-Platform\\\":OD}}),{result:i,error:s}=await n.json();if(s)throw s;return i}function v0t(){return globalThis.coinbaseWalletExtension}function x0t(){var t,e;try{let r=globalThis;return(t=r.ethereum)!==null&&t!==void 0?t:(e=r.top)===null||e===void 0?void 0:e.ethereum}catch{return}}function zD({metadata:t,preference:e}){var r,n;let{appName:i,appLogoUrl:s,appChainIds:o}=t;if(e.options!==\\\"smartWalletOnly\\\"){let c=v0t();if(c)return(r=c.setAppInfo)===null||r===void 0||r.call(c,i,s,o,e),c}let a=x0t();if(a?.isCoinbaseBrowser)return(n=a.setAppInfo)===null||n===void 0||n.call(a,i,s,o,e),a}function x4e(t){if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw pe.rpc.invalidParams({message:\\\"Expected a single, non-array, object argument.\\\",data:t});let{method:e,params:r}=t;if(typeof e!=\\\"string\\\"||e.length===0)throw pe.rpc.invalidParams({message:\\\"'args.method' must be a non-empty string.\\\",data:t});if(r!==void 0&&!Array.isArray(r)&&(typeof r!=\\\"object\\\"||r===null))throw pe.rpc.invalidParams({message:\\\"'args.params' must be an object or array if provided.\\\",data:t});switch(e){case\\\"eth_sign\\\":case\\\"eth_signTypedData_v2\\\":case\\\"eth_subscribe\\\":case\\\"eth_unsubscribe\\\":throw pe.provider.unsupportedMethod()}}var o3=x(()=>{u();hv();va()});function $D(t){if(t){if(![\\\"all\\\",\\\"smartWalletOnly\\\",\\\"eoaOnly\\\"].includes(t.options))throw new Error(`Invalid options: ${t.options}`);if(t.attribution&&t.attribution.auto!==void 0&&t.attribution.dataSuffix!==void 0)throw new Error(\\\"Attribution cannot contain both auto and dataSuffix properties\\\");if(t.telemetry&&typeof t.telemetry!=\\\"boolean\\\")throw new Error(\\\"Telemetry must be a boolean\\\")}}function jX(t){if(typeof t!=\\\"function\\\")throw new Error(\\\"toAccount is not a function\\\")}var HX=x(()=>{u()});var E4e,VD,qX,_4e,a3=x(()=>{u();E4e=\\\"https://keys.coinbase.com/connect\\\",VD=\\\"https://rpc.wallet.coinbase.com\\\",qX=\\\"https://www.walletlink.org\\\",_4e=\\\"https://go.cb-w.com/walletlink\\\"});function It(t,e,r){var n,i,s,o;window.ClientAnalytics&&((n=window.ClientAnalytics)===null||n===void 0||n.logEvent(t,Object.assign(Object.assign({},e),{sdkVersion:Mu,appName:(s=(i=Ee.config.get().metadata)===null||i===void 0?void 0:i.appName)!==null&&s!==void 0?s:\\\"\\\",appOrigin:window.location.origin,appPreferredSigner:(o=Ee.config.get().preference)===null||o===void 0?void 0:o.options}),r))}var yt,bt,wt,Uy=x(()=>{u();Du();hv();(function(t){t.unknown=\\\"unknown\\\",t.banner=\\\"banner\\\",t.button=\\\"button\\\",t.card=\\\"card\\\",t.chart=\\\"chart\\\",t.content_script=\\\"content_script\\\",t.dropdown=\\\"dropdown\\\",t.link=\\\"link\\\",t.page=\\\"page\\\",t.modal=\\\"modal\\\",t.table=\\\"table\\\",t.search_bar=\\\"search_bar\\\",t.service_worker=\\\"service_worker\\\",t.text=\\\"text\\\",t.text_input=\\\"text_input\\\",t.tray=\\\"tray\\\",t.checkbox=\\\"checkbox\\\",t.icon=\\\"icon\\\"})(yt||(yt={}));(function(t){t.unknown=\\\"unknown\\\",t.blur=\\\"blur\\\",t.click=\\\"click\\\",t.change=\\\"change\\\",t.dismiss=\\\"dismiss\\\",t.focus=\\\"focus\\\",t.hover=\\\"hover\\\",t.select=\\\"select\\\",t.measurement=\\\"measurement\\\",t.move=\\\"move\\\",t.process=\\\"process\\\",t.render=\\\"render\\\",t.scroll=\\\"scroll\\\",t.view=\\\"view\\\",t.search=\\\"search\\\",t.keyPress=\\\"keyPress\\\",t.error=\\\"error\\\"})(bt||(bt={}));(function(t){t.low=\\\"low\\\",t.high=\\\"high\\\"})(wt||(wt={}))});var C4e,S4e,A4e,T4e=x(()=>{u();Uy();C4e=()=>{It(\\\"communicator.popup_setup.started\\\",{action:bt.unknown,componentType:yt.unknown},wt.high)},S4e=()=>{It(\\\"communicator.popup_setup.completed\\\",{action:bt.unknown,componentType:yt.unknown},wt.high)},A4e=()=>{It(\\\"communicator.popup_unload.received\\\",{action:bt.unknown,componentType:yt.unknown},wt.high)}});var c3,Zm,WD=x(()=>{u();Uy();c3=({snackbarContext:t})=>{It(`snackbar.${t}.shown`,{action:bt.render,componentType:yt.modal,snackbarContext:t},wt.high)},Zm=({snackbarContext:t,snackbarAction:e})=>{It(`snackbar.${t}.action_clicked`,{action:bt.click,componentType:yt.button,snackbarContext:t,snackbarAction:e},wt.high)}});var I4e,R4e=x(()=>{u();I4e='@namespace svg \\\"http://www.w3.org/2000/svg\\\";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Helvetica Neue\\\",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:\\\"\\\\\\\\201C\\\" \\\"\\\\\\\\201D\\\" \\\"\\\\\\\\2018\\\" \\\"\\\\\\\\2019\\\";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Helvetica Neue\\\",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'});function GD(){let t=document.createElement(\\\"style\\\");t.type=\\\"text/css\\\",t.appendChild(document.createTextNode(I4e)),document.documentElement.appendChild(t)}var zX=x(()=>{u();R4e()});var l3={};ue(l3,{clsx:()=>Qm,default:()=>E0t});function P4e(t){var e,r,n=\\\"\\\";if(typeof t==\\\"string\\\"||typeof t==\\\"number\\\")n+=t;else if(typeof t==\\\"object\\\")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=P4e(t[e]))&&(n&&(n+=\\\" \\\"),n+=r);else for(e in t)t[e]&&(n&&(n+=\\\" \\\"),n+=e);return n}function Qm(){for(var t,e,r=0,n=\\\"\\\";r<arguments.length;)(t=arguments[r++])&&(e=P4e(t))&&(n&&(n+=\\\" \\\"),n+=e);return n}var E0t,Fy=x(()=>{u();E0t=Qm});function jy(t,e){for(var r in e)t[r]=e[r];return t}function U4e(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function zr(t,e,r){var n,i,s,o={};for(s in e)s==\\\"key\\\"?n=e[s]:s==\\\"ref\\\"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?YD.call(arguments,2):r),typeof t==\\\"function\\\"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return ZD(t,o,n,i,null)}function ZD(t,e,r,n,i){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++M4e,__i:-1,__u:0};return i==null&&Rn.vnode!=null&&Rn.vnode(s),s}function XD(t){return t.children}function QD(t,e){this.props=t,this.context=e}function u3(t,e){if(e==null)return t.__?u3(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type==\\\"function\\\"?u3(t):null}function F4e(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return F4e(t)}}function N4e(t){(!t.__d&&(t.__d=!0)&&yv.push(t)&&!JD.__r++||O4e!==Rn.debounceRendering)&&((O4e=Rn.debounceRendering)||D4e)(JD)}function JD(){var t,e,r,n,i,s,o,a;for(yv.sort($X);t=yv.shift();)t.__d&&(e=yv.length,n=void 0,s=(i=(r=t).__v).__e,o=[],a=[],r.__P&&((n=jy({},i)).__v=i.__v+1,Rn.vnode&&Rn.vnode(n),ZX(r.__P,n,i,r.__n,r.__P.namespaceURI,32&i.__u?[s]:null,o,s??u3(i),!!(32&i.__u),a),n.__v=i.__v,n.__.__k[n.__i]=n,q4e(o,n,a),n.__e!=s&&F4e(n)),yv.length>e&&yv.sort($X));JD.__r=0}function j4e(t,e,r,n,i,s,o,a,c,l,d){var f,p,h,m,g,w=n&&n.__k||L4e,v=e.length;for(r.__d=c,A0t(r,e,w),c=r.__d,f=0;f<v;f++)(h=r.__k[f])!=null&&(p=h.__i===-1?LT:w[h.__i]||LT,h.__i=f,ZX(t,h,p,i,s,o,a,c,l,d),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&QX(p.ref,null,h),d.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),65536&h.__u||p.__k===h.__k?c=H4e(h,c,t):typeof h.type==\\\"function\\\"&&h.__d!==void 0?c=h.__d:m&&(c=m.nextSibling),h.__d=void 0,h.__u&=-196609);r.__d=c,r.__e=g}function A0t(t,e,r){var n,i,s,o,a,c=e.length,l=r.length,d=l,f=0;for(t.__k=[],n=0;n<c;n++)(i=e[n])!=null&&typeof i!=\\\"boolean\\\"&&typeof i!=\\\"function\\\"?(o=n+f,(i=t.__k[n]=typeof i==\\\"string\\\"||typeof i==\\\"number\\\"||typeof i==\\\"bigint\\\"||i.constructor==String?ZD(null,i,null,null,null):KX(i)?ZD(XD,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?ZD(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,s=null,(a=i.__i=T0t(i,r,o,d))!==-1&&(d--,(s=r[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&f--,typeof i.type!=\\\"function\\\"&&(i.__u|=65536)):a!==o&&(a==o-1?f--:a==o+1?f++:(a>o?f--:f++,i.__u|=65536))):i=t.__k[n]=null;if(d)for(n=0;n<l;n++)(s=r[n])!=null&&(131072&s.__u)==0&&(s.__e==t.__d&&(t.__d=u3(s)),z4e(s,s))}function H4e(t,e,r){var n,i;if(typeof t.type==\\\"function\\\"){for(n=t.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=t,e=H4e(n[i],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=u3(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function T0t(t,e,r,n){var i=t.key,s=t.type,o=r-1,a=r+1,c=e[r];if(c===null||c&&i==c.key&&s===c.type&&(131072&c.__u)==0)return r;if(n>(c!=null&&(131072&c.__u)==0?1:0))for(;o>=0||a<e.length;){if(o>=0){if((c=e[o])&&(131072&c.__u)==0&&i==c.key&&s===c.type)return o;o--}if(a<e.length){if((c=e[a])&&(131072&c.__u)==0&&i==c.key&&s===c.type)return a;a++}}return-1}function k4e(t,e,r){e[0]===\\\"-\\\"?t.setProperty(e,r??\\\"\\\"):t[e]=r==null?\\\"\\\":typeof r!=\\\"number\\\"||S0t.test(e)?r:r+\\\"px\\\"}function KD(t,e,r,n,i){var s;e:if(e===\\\"style\\\")if(typeof r==\\\"string\\\")t.style.cssText=r;else{if(typeof n==\\\"string\\\"&&(t.style.cssText=n=\\\"\\\"),n)for(e in n)r&&e in r||k4e(t.style,e,\\\"\\\");if(r)for(e in r)n&&r[e]===n[e]||k4e(t.style,e,r[e])}else if(e[0]===\\\"o\\\"&&e[1]===\\\"n\\\")s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,\\\"$1\\\")),e=e.toLowerCase()in t||e===\\\"onFocusOut\\\"||e===\\\"onFocusIn\\\"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r.u=n.u:(r.u=GX,t.addEventListener(e,s?WX:VX,s)):t.removeEventListener(e,s?WX:VX,s);else{if(i==\\\"http://www.w3.org/2000/svg\\\")e=e.replace(/xlink(H|:h)/,\\\"h\\\").replace(/sName$/,\\\"s\\\");else if(e!=\\\"width\\\"&&e!=\\\"height\\\"&&e!=\\\"href\\\"&&e!=\\\"list\\\"&&e!=\\\"form\\\"&&e!=\\\"tabIndex\\\"&&e!=\\\"download\\\"&&e!=\\\"rowSpan\\\"&&e!=\\\"colSpan\\\"&&e!=\\\"role\\\"&&e!=\\\"popover\\\"&&e in t)try{t[e]=r??\\\"\\\";break e}catch{}typeof r==\\\"function\\\"||(r==null||r===!1&&e[4]!==\\\"-\\\"?t.removeAttribute(e):t.setAttribute(e,e==\\\"popover\\\"&&r==1?\\\"\\\":r))}}function B4e(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=GX++;else if(e.t<r.u)return;return r(Rn.event?Rn.event(e):e)}}}function ZX(t,e,r,n,i,s,o,a,c,l){var d,f,p,h,m,g,w,v,b,_,S,T,N,O,L,B,H=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[a=e.__e=r.__e]),(d=Rn.__b)&&d(e);e:if(typeof H==\\\"function\\\")try{if(v=e.props,b=\\\"prototype\\\"in H&&H.prototype.render,_=(d=H.contextType)&&n[d.__c],S=d?_?_.props.value:d.__:n,r.__c?w=(f=e.__c=r.__c).__=f.__E:(b?e.__c=f=new H(v,S):(e.__c=f=new QD(v,S),f.constructor=H,f.render=R0t),_&&_.sub(f),f.props=v,f.state||(f.state={}),f.context=S,f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),b&&f.__s==null&&(f.__s=f.state),b&&H.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=jy({},f.__s)),jy(f.__s,H.getDerivedStateFromProps(v,f.__s))),h=f.props,m=f.state,f.__v=e,p)b&&H.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),b&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(b&&H.getDerivedStateFromProps==null&&v!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,S),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(v,f.__s,S)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(f.props=v,f.state=f.__s,f.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(M){M&&(M.__=e)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&o.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,S),b&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,m,g)})}if(f.context=S,f.props=v,f.__P=t,f.__e=!1,N=Rn.__r,O=0,b){for(f.state=f.__s,f.__d=!1,N&&N(e),d=f.render(f.props,f.state,f.context),L=0;L<f._sb.length;L++)f.__h.push(f._sb[L]);f._sb=[]}else do f.__d=!1,N&&N(e),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++O<25);f.state=f.__s,f.getChildContext!=null&&(n=jy(jy({},n),f.getChildContext())),b&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(h,m)),j4e(t,KX(B=d!=null&&d.type===XD&&d.key==null?d.props.children:d)?B:[B],e,r,n,i,s,o,a,c,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),w&&(f.__E=f.__=null)}catch(M){if(e.__v=null,c||s!=null){for(e.__u|=c?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else e.__e=r.__e,e.__k=r.__k;Rn.__e(M,e,r)}else s==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=I0t(r.__e,e,r,n,i,s,o,c,l);(d=Rn.diffed)&&d(e)}function q4e(t,e,r){e.__d=void 0;for(var n=0;n<r.length;n++)QX(r[n],r[++n],r[++n]);Rn.__c&&Rn.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){Rn.__e(s,i.__v)}})}function I0t(t,e,r,n,i,s,o,a,c){var l,d,f,p,h,m,g,w=r.props,v=e.props,b=e.type;if(b===\\\"svg\\\"?i=\\\"http://www.w3.org/2000/svg\\\":b===\\\"math\\\"?i=\\\"http://www.w3.org/1998/Math/MathML\\\":i||(i=\\\"http://www.w3.org/1999/xhtml\\\"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&\\\"setAttribute\\\"in h==!!b&&(b?h.localName===b:h.nodeType===3)){t=h,s[l]=null;break}}if(t==null){if(b===null)return document.createTextNode(v);t=document.createElementNS(i,b,v.is&&v),a&&(Rn.__m&&Rn.__m(e,s),a=!1),s=null}if(b===null)w===v||a&&t.data===v||(t.data=v);else{if(s=s&&YD.call(t.childNodes),w=r.props||LT,!a&&s!=null)for(w={},l=0;l<t.attributes.length;l++)w[(h=t.attributes[l]).name]=h.value;for(l in w)if(h=w[l],l!=\\\"children\\\"){if(l==\\\"dangerouslySetInnerHTML\\\")f=h;else if(!(l in v)){if(l==\\\"value\\\"&&\\\"defaultValue\\\"in v||l==\\\"checked\\\"&&\\\"defaultChecked\\\"in v)continue;KD(t,l,null,h,i)}}for(l in v)h=v[l],l==\\\"children\\\"?p=h:l==\\\"dangerouslySetInnerHTML\\\"?d=h:l==\\\"value\\\"?m=h:l==\\\"checked\\\"?g=h:a&&typeof h!=\\\"function\\\"||w[l]===h||KD(t,l,h,w[l],i);if(d)a||f&&(d.__html===f.__html||d.__html===t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(f&&(t.innerHTML=\\\"\\\"),j4e(t,KX(p)?p:[p],e,r,n,b===\\\"foreignObject\\\"?\\\"http://www.w3.org/1999/xhtml\\\":i,s,o,s?s[0]:r.__k&&u3(r,0),a,c),s!=null)for(l=s.length;l--;)U4e(s[l]);a||(l=\\\"value\\\",b===\\\"progress\\\"&&m==null?t.removeAttribute(\\\"value\\\"):m!==void 0&&(m!==t[l]||b===\\\"progress\\\"&&!m||b===\\\"option\\\"&&m!==w[l])&&KD(t,l,m,w[l],i),l=\\\"checked\\\",g!==void 0&&g!==t[l]&&KD(t,l,g,w[l],i))}return t}function QX(t,e,r){try{if(typeof t==\\\"function\\\"){var n=typeof t.__u==\\\"function\\\";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){Rn.__e(i,r)}}function z4e(t,e,r){var n,i;if(Rn.unmount&&Rn.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||QX(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){Rn.__e(s,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&z4e(n[i],e,r||typeof t.type!=\\\"function\\\");r||U4e(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function R0t(t,e,r){return this.constructor(t,r)}function UT(t,e,r){var n,i,s,o;Rn.__&&Rn.__(t,e),i=(n=typeof r==\\\"function\\\")?null:r&&r.__k||e.__k,s=[],o=[],ZX(e,t=(!n&&r||e).__k=zr(XD,null,[t]),i||LT,LT,e.namespaceURI,!n&&r?[r]:i?null:e.firstChild?YD.call(e.childNodes):null,s,!n&&r?r:i?i.__e:e.firstChild,n,o),q4e(s,t,o)}var YD,Rn,M4e,_0t,yv,O4e,D4e,$X,GX,VX,WX,C0t,LT,L4e,S0t,KX,d3=x(()=>{u();LT={},L4e=[],S0t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,KX=Array.isArray;YD=L4e.slice,Rn={__e:function(t,e,r,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},M4e=0,_0t=function(t){return t!=null&&t.constructor==null},QD.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=jy({},this.state),typeof t==\\\"function\\\"&&(t=t(jy({},r),this.props)),t&&jy(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),N4e(this))},QD.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),N4e(this))},QD.prototype.render=XD,yv=[],D4e=typeof Promise==\\\"function\\\"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$X=function(t,e){return t.__v.__b-e.__v.__b},JD.__r=0,GX=0,VX=B4e(!1),WX=B4e(!0),C0t=0});function X4e(t,e){Cs.__h&&Cs.__h(ds,t,YX||e),YX=0;var r=ds.__H||(ds.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function eee(t){return YX=1,P0t(t8e,t)}function P0t(t,e,r){var n=X4e(tL++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):t8e(void 0,e),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=ds,!ds.u)){var i=function(a,c,l){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var f=!1;return d.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(f=!0)}}),!(!f&&n.__c.props===a)&&(!s||s.call(this,a,c,l))};ds.u=!0;var s=ds.shouldComponentUpdate,o=ds.componentWillUpdate;ds.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,i(a,c,l),s=d}o&&o.call(this,a,c,l)},ds.shouldComponentUpdate=i}return n.__N||n.__}function e8e(t,e){var r=X4e(tL++,3);!Cs.__s&&k0t(r.__H,e)&&(r.__=t,r.i=e,ds.__H.__h.push(r))}function O0t(){for(var t;t=Y4e.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(eL),t.__H.__h.forEach(XX),t.__H.__h=[]}catch(e){t.__H.__h=[],Cs.__e(e,t.__v)}}function N0t(t){var e,r=function(){clearTimeout(n),J4e&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);J4e&&(e=requestAnimationFrame(r))}function eL(t){var e=ds,r=t.__c;typeof r==\\\"function\\\"&&(t.__c=void 0,r()),ds=e}function XX(t){var e=ds;t.__c=t.__(),ds=e}function k0t(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function t8e(t,e){return typeof e==\\\"function\\\"?e(t):e}var tL,ds,JX,$4e,YX,Y4e,Cs,V4e,W4e,G4e,K4e,Z4e,Q4e,J4e,r8e=x(()=>{u();d3();YX=0,Y4e=[],Cs=Rn,V4e=Cs.__b,W4e=Cs.__r,G4e=Cs.diffed,K4e=Cs.__c,Z4e=Cs.unmount,Q4e=Cs.__;Cs.__b=function(t){ds=null,V4e&&V4e(t)},Cs.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Q4e&&Q4e(t,e)},Cs.__r=function(t){W4e&&W4e(t),tL=0;var e=(ds=t.__c).__H;e&&(JX===ds?(e.__h=[],ds.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(eL),e.__h.forEach(XX),e.__h=[],tL=0)),JX=ds},Cs.diffed=function(t){G4e&&G4e(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Y4e.push(e)!==1&&$4e===Cs.requestAnimationFrame||(($4e=Cs.requestAnimationFrame)||N0t)(O0t)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),JX=ds=null},Cs.__c=function(t,e){e.some(function(r){try{r.__h.forEach(eL),r.__h=r.__h.filter(function(n){return!n.__||XX(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Cs.__e(n,r.__v)}}),K4e&&K4e(t,e)},Cs.unmount=function(t){Z4e&&Z4e(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{eL(n)}catch(i){e=i}}),r.__H=void 0,e&&Cs.__e(e,r.__v))};J4e=typeof requestAnimationFrame==\\\"function\\\"});function B0t(){try{return window.frameElement!==null}catch{return!1}}function n8e(){try{return B0t()&&window.top?window.top.location:window.location}catch{return window.location}}function i8e(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}function rL(){var t,e;return(e=(t=window?.matchMedia)===null||t===void 0?void 0:t.call(window,\\\"(prefers-color-scheme: dark)\\\").matches)!==null&&e!==void 0?e:!1}var FT=x(()=>{u()});var s8e,o8e=x(()=>{u();s8e=\\\".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}\\\"});var M0t,D0t,f3,tee,L0t,nL=x(()=>{u();Fy();d3();d3();r8e();FT();o8e();M0t=\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+\\\",D0t=\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=\\\",f3=class{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=rL()}attach(e){this.root=document.createElement(\\\"div\\\"),this.root.className=\\\"-cbwsdk-snackbar-root\\\",e.appendChild(this.root),this.render()}presentItem(e){let r=this.nextItemKey++;return this.items.set(r,e),this.render(),()=>{this.items.delete(r),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&UT(zr(\\\"div\\\",null,zr(tee,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>zr(L0t,Object.assign({},r,{key:e}))))),this.root)}},tee=t=>zr(\\\"div\\\",{class:Qm(\\\"-cbwsdk-snackbar-container\\\")},zr(\\\"style\\\",null,s8e),zr(\\\"div\\\",{class:\\\"-cbwsdk-snackbar\\\"},t.children)),L0t=({autoExpand:t,message:e,menuItems:r})=>{let[n,i]=eee(!0),[s,o]=eee(t??!1);e8e(()=>{let c=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{o(!0)},1e4)];return()=>{c.forEach(window.clearTimeout)}});let a=()=>{o(!s)};return zr(\\\"div\\\",{class:Qm(\\\"-cbwsdk-snackbar-instance\\\",n&&\\\"-cbwsdk-snackbar-instance-hidden\\\",s&&\\\"-cbwsdk-snackbar-instance-expanded\\\")},zr(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-header\\\",onClick:a},zr(\\\"img\\\",{src:M0t,class:\\\"-cbwsdk-snackbar-instance-header-cblogo\\\"}),\\\" \\\",zr(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-header-message\\\"},e),zr(\\\"div\\\",{class:\\\"-gear-container\\\"},!s&&zr(\\\"svg\\\",{width:\\\"24\\\",height:\\\"24\\\",viewBox:\\\"0 0 24 24\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},zr(\\\"circle\\\",{cx:\\\"12\\\",cy:\\\"12\\\",r:\\\"12\\\",fill:\\\"#F5F7F8\\\"})),zr(\\\"img\\\",{src:D0t,class:\\\"-gear-icon\\\",title:\\\"Expand\\\"}))),r&&r.length>0&&zr(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-menu\\\"},r.map((c,l)=>zr(\\\"div\\\",{class:Qm(\\\"-cbwsdk-snackbar-instance-menu-item\\\",c.isRed&&\\\"-cbwsdk-snackbar-instance-menu-item-is-red\\\"),onClick:c.onClick,key:l},zr(\\\"svg\\\",{width:c.svgWidth,height:c.svgHeight,viewBox:\\\"0 0 10 11\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},zr(\\\"path\\\",{\\\"fill-rule\\\":c.defaultFillRule,\\\"clip-rule\\\":c.defaultClipRule,d:c.path,fill:\\\"#AAAAAA\\\"})),zr(\\\"span\\\",{class:Qm(\\\"-cbwsdk-snackbar-instance-menu-item-info\\\",c.isRed&&\\\"-cbwsdk-snackbar-instance-menu-item-info-is-red\\\")},c.info)))))}});var ree,iL,nee=x(()=>{u();zX();nL();ree=\\\"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z\\\",iL=class{constructor(){this.attached=!1,this.snackbar=new f3}attach(){if(this.attached)throw new Error(\\\"Coinbase Wallet SDK UI is already attached\\\");let e=document.documentElement,r=document.createElement(\\\"div\\\");r.className=\\\"-cbwsdk-css-reset\\\",e.appendChild(r),this.snackbar.attach(r),this.attached=!0,GD()}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:\\\"Connection lost\\\",menuItems:[{isRed:!1,info:\\\"Reset connection\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:e.onResetConnection}]}:r={message:\\\"Confirm on phone\\\",menuItems:[{isRed:!0,info:\\\"Cancel transaction\\\",svgWidth:\\\"11\\\",svgHeight:\\\"11\\\",path:\\\"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z\\\",defaultFillRule:\\\"inherit\\\",defaultClipRule:\\\"inherit\\\",onClick:e.onCancel},{isRed:!1,info:\\\"Reset connection\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:ree,defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}}});function l8e(t){let e=(window.innerWidth-a8e)/2+window.screenX,r=(window.innerHeight-c8e)/2+window.screenY;j0t(t);function n(){let s=`wallet_${crypto.randomUUID()}`,o=window.open(t,s,`width=${a8e}, height=${c8e}, left=${e}, top=${r}`);return o?.focus(),o||null}let i=n();if(!i){let s=jT();return new Promise((o,a)=>{c3({snackbarContext:\\\"popup_blocked\\\"}),s.presentItem({autoExpand:!0,message:F0t,menuItems:[Object.assign(Object.assign({},U0t),{onClick:()=>{Zm({snackbarContext:\\\"popup_blocked\\\",snackbarAction:\\\"confirm\\\"}),i=n(),i?o(i):a(pe.rpc.internal(\\\"Popup window was blocked\\\")),s.clear()}})]})})}return Promise.resolve(i)}function u8e(t){t&&!t.closed&&t.close()}function j0t(t){let e={sdkName:OD,sdkVersion:Mu,origin:window.location.origin,coop:v4e()};for(let[r,n]of Object.entries(e))t.searchParams.has(r)||t.searchParams.append(r,n.toString())}function jT(){if(!sL){let t=document.createElement(\\\"div\\\");t.className=\\\"-cbwsdk-css-reset\\\",document.body.appendChild(t),sL=new f3,sL.attach(t)}return sL}var a8e,c8e,U0t,F0t,sL,oL=x(()=>{u();va();WD();nee();nL();hv();qD();a8e=420,c8e=700,U0t={isRed:!1,info:\\\"Retry\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:ree,defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\"},F0t=\\\"Popup was blocked. Try again.\\\",sL=null});var aL,d8e=x(()=>{u();a3();va();T4e();oL();hv();aL=class{constructor({url:e=E4e,metadata:r,preference:n}){this.popup=null,this.listeners=new Map,this.postMessage=async i=>{(await this.waitForPopupLoaded()).postMessage(i,this.url.origin)},this.postRequestAndWaitForResponse=async i=>{let s=this.onMessage(({requestId:o})=>o===i.id);return this.postMessage(i),await s},this.onMessage=async i=>new Promise((s,o)=>{let a=c=>{if(c.origin!==this.url.origin)return;let l=c.data;i(l)&&(s(l),window.removeEventListener(\\\"message\\\",a),this.listeners.delete(a))};window.addEventListener(\\\"message\\\",a),this.listeners.set(a,{reject:o})}),this.disconnect=()=>{u8e(this.popup),this.popup=null,this.listeners.forEach(({reject:i},s)=>{i(pe.provider.userRejectedRequest(\\\"Request rejected\\\")),window.removeEventListener(\\\"message\\\",s)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(C4e(),this.popup=await l8e(this.url),this.onMessage(({event:i})=>i===\\\"PopupUnload\\\").then(()=>{this.disconnect(),A4e()}).catch(()=>{}),this.onMessage(({event:i})=>i===\\\"PopupLoaded\\\").then(i=>{this.postMessage({requestId:i.id,data:{version:Mu,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw pe.rpc.internal();return S4e(),this.popup})),this.url=new URL(e),this.metadata=r,this.preference=n}}});function Ss(t){return t.errorMessage!==void 0}var cL=x(()=>{u()});function f8e(t){let e=u4e(H0t(t),{shouldIncludeStack:!0}),r=new URL(\\\"https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\\\");return r.searchParams.set(\\\"version\\\",Mu),r.searchParams.set(\\\"code\\\",e.code.toString()),r.searchParams.set(\\\"message\\\",e.message),Object.assign(Object.assign({},e),{docUrl:r.href})}function H0t(t){var e;if(typeof t==\\\"string\\\")return{message:t,code:Wn.rpc.internal};if(Ss(t)){let r=t.errorMessage,n=(e=t.errorCode)!==null&&e!==void 0?e:r.match(/(denied|rejected)/i)?Wn.provider.userRejectedRequest:void 0;return Object.assign(Object.assign({},t),{message:r,code:n,data:{method:t.method}})}return t}var p8e=x(()=>{u();hv();cL();BT();kX()});var lL,h8e=x(()=>{u();aM();lL=class extends _6.default{}});var Sp,HT=x(()=>{u();Sp=class t{constructor(e,r){this.scope=e,this.module=r}storeObject(e,r){this.setItem(e,JSON.stringify(r))}loadObject(e){let r=this.getItem(e);return r?JSON.parse(r):void 0}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(\\\"\\\"),r=[];for(let n=0;n<localStorage.length;n++){let i=localStorage.key(n);typeof i==\\\"string\\\"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:\\\"\\\"}:${e}`}static clearAll(){new t(\\\"CBWSDK\\\").clear(),new t(\\\"walletlink\\\").clear()}}});var m8e,g8e,y8e,b8e,w8e,v8e=x(()=>{u();Uy();m8e=({signerType:t})=>{It(\\\"provider.signer.loaded_from_storage\\\",{action:bt.measurement,componentType:yt.unknown,signerType:t},wt.low)},g8e=({method:t,correlationId:e})=>{It(\\\"provider.request.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e},wt.high)},y8e=({method:t,correlationId:e,signerType:r,errorMessage:n})=>{It(\\\"provider.request.error\\\",{action:bt.error,componentType:yt.unknown,method:t,signerType:r,correlationId:e,errorMessage:n},wt.high)},b8e=({method:t,signerType:e,correlationId:r})=>{It(\\\"provider.request.responded\\\",{action:bt.unknown,componentType:yt.unknown,method:t,signerType:e,correlationId:r},wt.high)},w8e=()=>{It(\\\"provider.enable_function.called\\\",{action:bt.measurement,componentType:yt.unknown},wt.high)}});var x8e,E8e,_8e=x(()=>{u();Uy();x8e=()=>{It(\\\"signer.selection.requested\\\",{action:bt.unknown,componentType:yt.unknown},wt.high)},E8e=t=>{It(\\\"signer.selection.responded\\\",{action:bt.unknown,componentType:yt.unknown,signerType:t},wt.high)}});var uL,Uc,dL=x(()=>{u();PD();uL=t3(()=>({correlationIds:new Map})),Uc={get:t=>uL.getState().correlationIds.get(t),set:(t,e)=>{uL.setState(r=>{let n=new Map(r.correlationIds);return n.set(t,e),{correlationIds:n}})},delete:t=>{uL.setState(e=>{let r=new Map(e.correlationIds);return r.delete(t),{correlationIds:r}})},clear:()=>{uL.setState({correlationIds:new Map})}}});var C8e,S8e,A8e,T8e,I8e,R8e,P8e=x(()=>{u();Du();Uy();C8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_signer.handshake.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},S8e=({method:t,correlationId:e,errorMessage:r})=>{var n;It(\\\"scw_signer.handshake.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r,enableAutoSubAccounts:(n=Ee.subAccountsConfig.get())===null||n===void 0?void 0:n.enableAutoSubAccounts},wt.high)},A8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_signer.handshake.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},T8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_signer.request.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},I8e=({method:t,correlationId:e,errorMessage:r})=>{var n;It(\\\"scw_signer.request.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r,enableAutoSubAccounts:(n=Ee.subAccountsConfig.get())===null||n===void 0?void 0:n.enableAutoSubAccounts},wt.high)},R8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_signer.request.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)}});var O8e,N8e,k8e,B8e,M8e,D8e,L8e,U8e,F8e,j8e=x(()=>{u();Du();Uy();O8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.request.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},N8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.request.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},k8e=({method:t,correlationId:e,errorMessage:r})=>{var n;It(\\\"scw_sub_account.request.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r,enableAutoSubAccounts:(n=Ee.subAccountsConfig.get())===null||n===void 0?void 0:n.enableAutoSubAccounts},wt.high)},B8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.add_owner.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},M8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.add_owner.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},D8e=({method:t,correlationId:e,errorMessage:r})=>{var n;It(\\\"scw_sub_account.add_owner.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r,enableAutoSubAccounts:(n=Ee.subAccountsConfig.get())===null||n===void 0?void 0:n.enableAutoSubAccounts},wt.high)},L8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.insufficient_balance.error_handling.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},U8e=({method:t,correlationId:e})=>{var r;It(\\\"scw_sub_account.insufficient_balance.error_handling.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e,enableAutoSubAccounts:(r=Ee.subAccountsConfig.get())===null||r===void 0?void 0:r.enableAutoSubAccounts},wt.high)},F8e=({method:t,correlationId:e,errorMessage:r})=>{var n;It(\\\"scw_sub_account.insufficient_balance.error_handling.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r,enableAutoSubAccounts:(n=Ee.subAccountsConfig.get())===null||n===void 0?void 0:n.enableAutoSubAccounts},wt.high)}});var Jm,iee=x(()=>{u();Jm=t=>\\\"message\\\"in t&&typeof t.message==\\\"string\\\"?t.message:\\\"\\\"});var see,H8e=x(()=>{u();see=[{inputs:[{name:\\\"preOpGas\\\",type:\\\"uint256\\\"},{name:\\\"paid\\\",type:\\\"uint256\\\"},{name:\\\"validAfter\\\",type:\\\"uint48\\\"},{name:\\\"validUntil\\\",type:\\\"uint48\\\"},{name:\\\"targetSuccess\\\",type:\\\"bool\\\"},{name:\\\"targetResult\\\",type:\\\"bytes\\\"}],name:\\\"ExecutionResult\\\",type:\\\"error\\\"},{inputs:[{name:\\\"opIndex\\\",type:\\\"uint256\\\"},{name:\\\"reason\\\",type:\\\"string\\\"}],name:\\\"FailedOp\\\",type:\\\"error\\\"},{inputs:[{name:\\\"sender\\\",type:\\\"address\\\"}],name:\\\"SenderAddressResult\\\",type:\\\"error\\\"},{inputs:[{name:\\\"aggregator\\\",type:\\\"address\\\"}],name:\\\"SignatureValidationFailed\\\",type:\\\"error\\\"},{inputs:[{components:[{name:\\\"preOpGas\\\",type:\\\"uint256\\\"},{name:\\\"prefund\\\",type:\\\"uint256\\\"},{name:\\\"sigFailed\\\",type:\\\"bool\\\"},{name:\\\"validAfter\\\",type:\\\"uint48\\\"},{name:\\\"validUntil\\\",type:\\\"uint48\\\"},{name:\\\"paymasterContext\\\",type:\\\"bytes\\\"}],name:\\\"returnInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"senderInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"factoryInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"paymasterInfo\\\",type:\\\"tuple\\\"}],name:\\\"ValidationResult\\\",type:\\\"error\\\"},{inputs:[{components:[{name:\\\"preOpGas\\\",type:\\\"uint256\\\"},{name:\\\"prefund\\\",type:\\\"uint256\\\"},{name:\\\"sigFailed\\\",type:\\\"bool\\\"},{name:\\\"validAfter\\\",type:\\\"uint48\\\"},{name:\\\"validUntil\\\",type:\\\"uint48\\\"},{name:\\\"paymasterContext\\\",type:\\\"bytes\\\"}],name:\\\"returnInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"senderInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"factoryInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"paymasterInfo\\\",type:\\\"tuple\\\"},{components:[{name:\\\"aggregator\\\",type:\\\"address\\\"},{components:[{name:\\\"stake\\\",type:\\\"uint256\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"stakeInfo\\\",type:\\\"tuple\\\"}],name:\\\"aggregatorInfo\\\",type:\\\"tuple\\\"}],name:\\\"ValidationResultWithAggregation\\\",type:\\\"error\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"userOpHash\\\",type:\\\"bytes32\\\"},{indexed:!0,name:\\\"sender\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"factory\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"paymaster\\\",type:\\\"address\\\"}],name:\\\"AccountDeployed\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[],name:\\\"BeforeExecution\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"account\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"totalDeposit\\\",type:\\\"uint256\\\"}],name:\\\"Deposited\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"aggregator\\\",type:\\\"address\\\"}],name:\\\"SignatureAggregatorChanged\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"account\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"totalStaked\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"unstakeDelaySec\\\",type:\\\"uint256\\\"}],name:\\\"StakeLocked\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"account\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"withdrawTime\\\",type:\\\"uint256\\\"}],name:\\\"StakeUnlocked\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"account\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"withdrawAddress\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"amount\\\",type:\\\"uint256\\\"}],name:\\\"StakeWithdrawn\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"userOpHash\\\",type:\\\"bytes32\\\"},{indexed:!0,name:\\\"sender\\\",type:\\\"address\\\"},{indexed:!0,name:\\\"paymaster\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"nonce\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"success\\\",type:\\\"bool\\\"},{indexed:!1,name:\\\"actualGasCost\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"actualGasUsed\\\",type:\\\"uint256\\\"}],name:\\\"UserOperationEvent\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"userOpHash\\\",type:\\\"bytes32\\\"},{indexed:!0,name:\\\"sender\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"nonce\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"revertReason\\\",type:\\\"bytes\\\"}],name:\\\"UserOperationRevertReason\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"account\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"withdrawAddress\\\",type:\\\"address\\\"},{indexed:!1,name:\\\"amount\\\",type:\\\"uint256\\\"}],name:\\\"Withdrawn\\\",type:\\\"event\\\"},{inputs:[],name:\\\"SIG_VALIDATION_FAILED\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"}],name:\\\"_validateSenderAndPaymaster\\\",outputs:[],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"unstakeDelaySec\\\",type:\\\"uint32\\\"}],name:\\\"addStake\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],name:\\\"balanceOf\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],name:\\\"depositTo\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"\\\",type:\\\"address\\\"}],name:\\\"deposits\\\",outputs:[{name:\\\"deposit\\\",type:\\\"uint112\\\"},{name:\\\"staked\\\",type:\\\"bool\\\"},{name:\\\"stake\\\",type:\\\"uint112\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint32\\\"},{name:\\\"withdrawTime\\\",type:\\\"uint48\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],name:\\\"getDepositInfo\\\",outputs:[{components:[{name:\\\"deposit\\\",type:\\\"uint112\\\"},{name:\\\"staked\\\",type:\\\"bool\\\"},{name:\\\"stake\\\",type:\\\"uint112\\\"},{name:\\\"unstakeDelaySec\\\",type:\\\"uint32\\\"},{name:\\\"withdrawTime\\\",type:\\\"uint48\\\"}],name:\\\"info\\\",type:\\\"tuple\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"key\\\",type:\\\"uint192\\\"}],name:\\\"getNonce\\\",outputs:[{name:\\\"nonce\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"initCode\\\",type:\\\"bytes\\\"}],name:\\\"getSenderAddress\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"userOp\\\",type:\\\"tuple\\\"}],name:\\\"getUserOpHash\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{components:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"userOps\\\",type:\\\"tuple[]\\\"},{name:\\\"aggregator\\\",type:\\\"address\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"opsPerAggregator\\\",type:\\\"tuple[]\\\"},{name:\\\"beneficiary\\\",type:\\\"address\\\"}],name:\\\"handleAggregatedOps\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"ops\\\",type:\\\"tuple[]\\\"},{name:\\\"beneficiary\\\",type:\\\"address\\\"}],name:\\\"handleOps\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"key\\\",type:\\\"uint192\\\"}],name:\\\"incrementNonce\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"callData\\\",type:\\\"bytes\\\"},{components:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"paymaster\\\",type:\\\"address\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"}],name:\\\"mUserOp\\\",type:\\\"tuple\\\"},{name:\\\"userOpHash\\\",type:\\\"bytes32\\\"},{name:\\\"prefund\\\",type:\\\"uint256\\\"},{name:\\\"contextOffset\\\",type:\\\"uint256\\\"},{name:\\\"preOpGas\\\",type:\\\"uint256\\\"}],name:\\\"opInfo\\\",type:\\\"tuple\\\"},{name:\\\"context\\\",type:\\\"bytes\\\"}],name:\\\"innerHandleOp\\\",outputs:[{name:\\\"actualGasCost\\\",type:\\\"uint256\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"\\\",type:\\\"address\\\"},{name:\\\"\\\",type:\\\"uint192\\\"}],name:\\\"nonceSequenceNumber\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"op\\\",type:\\\"tuple\\\"},{name:\\\"target\\\",type:\\\"address\\\"},{name:\\\"targetCallData\\\",type:\\\"bytes\\\"}],name:\\\"simulateHandleOp\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"userOp\\\",type:\\\"tuple\\\"}],name:\\\"simulateValidation\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[],name:\\\"unlockStake\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"withdrawAddress\\\",type:\\\"address\\\"}],name:\\\"withdrawStake\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"withdrawAddress\\\",type:\\\"address\\\"},{name:\\\"withdrawAmount\\\",type:\\\"uint256\\\"}],name:\\\"withdrawTo\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{stateMutability:\\\"payable\\\",type:\\\"receive\\\"}]});var oee,q8e=x(()=>{u();oee=\\\"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\\\"});function fL(t,e={}){let{forHash:r}=e,{authorization:n,factory:i,factoryData:s}=t;return r&&(i===\\\"0x7702\\\"||i===\\\"0x7702000000000000000000000000000000000000\\\")?n?Jt([n.address,s??\\\"0x\\\"]):\\\"0x7702000000000000000000000000000000000000\\\":i?Jt([i,s??\\\"0x\\\"]):\\\"0x\\\"}var aee=x(()=>{u();Ei()});function pL(t,e={}){let{callGasLimit:r,callData:n,maxPriorityFeePerGas:i,maxFeePerGas:s,paymaster:o,paymasterData:a,paymasterPostOpGasLimit:c,paymasterSignature:l,paymasterVerificationGasLimit:d,sender:f,signature:p=\\\"0x\\\",verificationGasLimit:h}=t,m=Jt([Fr(Z(h||0n),{size:16}),Fr(Z(r||0n),{size:16})]),g=fL(t,e),w=Jt([Fr(Z(i||0n),{size:16}),Fr(Z(s||0n),{size:16})]),v=t.nonce??0n,b=o?Jt([o,Fr(Z(d||0n),{size:16}),Fr(Z(c||0n),{size:16}),a||\\\"0x\\\",...l?e.forHash?[z8e]:[l,Fr(Z(Ot(l)),{size:2}),z8e]:[]]):\\\"0x\\\",_=t.preVerificationGas??0n;return{accountGasLimits:m,callData:n,initCode:g,gasFees:w,nonce:v,paymasterAndData:b,preVerificationGas:_,sender:f,signature:p}}var z8e,cee=x(()=>{u();Ei();rm();Da();Dw();aee();z8e=\\\"0x22e325a297439656\\\"});function $8e(t){let{chainId:e,entryPointAddress:r,userOperation:n}=t,i=pL(n,{forHash:!0});return{types:q0t,primaryType:\\\"PackedUserOperation\\\",domain:{name:\\\"ERC4337\\\",version:\\\"1\\\",chainId:e,verifyingContract:r},message:i}}var q0t,V8e=x(()=>{u();cee();q0t={PackedUserOperation:[{type:\\\"address\\\",name:\\\"sender\\\"},{type:\\\"uint256\\\",name:\\\"nonce\\\"},{type:\\\"bytes\\\",name:\\\"initCode\\\"},{type:\\\"bytes\\\",name:\\\"callData\\\"},{type:\\\"bytes32\\\",name:\\\"accountGasLimits\\\"},{type:\\\"uint256\\\",name:\\\"preVerificationGas\\\"},{type:\\\"bytes32\\\",name:\\\"gasFees\\\"},{type:\\\"bytes\\\",name:\\\"paymasterAndData\\\"}]}});function lee(t){let{chainId:e,entryPointAddress:r,entryPointVersion:n}=t,i=t.userOperation,{authorization:s,callData:o=\\\"0x\\\",callGasLimit:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,paymasterAndData:f=\\\"0x\\\",preVerificationGas:p,sender:h,verificationGasLimit:m}=i;if(n===\\\"0.8\\\"||n===\\\"0.9\\\")return mp($8e({chainId:e,entryPointAddress:r,userOperation:i}));let g=(()=>{if(n===\\\"0.6\\\"){let w=i.initCode?.slice(0,42),v=i.initCode?.slice(42),b=fL({authorization:s,factory:w,factoryData:v},{forHash:!0});return Vn([{type:\\\"address\\\"},{type:\\\"uint256\\\"},{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"},{type:\\\"uint256\\\"},{type:\\\"uint256\\\"},{type:\\\"uint256\\\"},{type:\\\"uint256\\\"},{type:\\\"uint256\\\"},{type:\\\"bytes32\\\"}],[h,d,Ft(b),Ft(o),a,m,p,c,l,Ft(f)])}if(n===\\\"0.7\\\"){let w=pL(i,{forHash:!0});return Vn([{type:\\\"address\\\"},{type:\\\"uint256\\\"},{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"},{type:\\\"uint256\\\"},{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"}],[w.sender,w.nonce,Ft(w.initCode),Ft(w.callData),w.accountGasLimits,w.preVerificationGas,w.gasFees,Ft(w.paymasterAndData)])}throw new Error(`entryPointVersion \\\"${n}\\\" not supported.`)})();return Ft(Vn([{type:\\\"bytes32\\\"},{type:\\\"address\\\"},{type:\\\"uint256\\\"}],[Ft(g),r,BigInt(e)]))}var W8e=x(()=>{u();wu();yl();bB();aee();V8e();cee()});async function uee(t){let{extend:e,nonceKeyManager:r=YQ({source:{get(){return Date.now()},set(){}}}),...n}=t,i=!1,s=await t.getAddress();return{...e,...n,address:s,async getFactoryArgs(){return\\\"isDeployed\\\"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:t.getFactoryArgs()},async getNonce(o){let a=o?.key??BigInt(await r.consume({address:s,chainId:t.client.chain.id,client:t.client}));return t.getNonce?await t.getNonce({...o,key:a}):await Tn(t.client,{abi:GE([\\\"function getNonce(address, uint192) pure returns (uint256)\\\"]),address:t.entryPoint.address,functionName:\\\"getNonce\\\",args:[s,a]})},async isDeployed(){return i?!0:(i=!!await ae(t.client,Sl,\\\"getCode\\\")({address:s}),i)},...t.sign?{async sign(o){let[{factory:a,factoryData:c},l]=await Promise.all([this.getFactoryArgs(),t.sign(o)]);return a&&c?LB({address:a,data:c,signature:l}):l}}:{},async signMessage(o){let[{factory:a,factoryData:c},l]=await Promise.all([this.getFactoryArgs(),t.signMessage(o)]);return a&&c&&a!==\\\"0x7702\\\"?LB({address:a,data:c,signature:l}):l},async signTypedData(o){let[{factory:a,factoryData:c},l]=await Promise.all([this.getFactoryArgs(),t.signTypedData(o)]);return a&&c&&a!==\\\"0x7702\\\"?LB({address:a,data:c,signature:l}):l},type:\\\"smart\\\"}}var G8e=x(()=>{u();KE();o6();Tu();Ut();Uxe();REe()});var K8e=x(()=>{u();});var p3,Ap,h3,m3,g3,y3,b3,w3,v3,x3,E3,_3,C3,bv,S3,Tp,A3,T3,wv,vv,I3,R3,xv,P3,Ev,O3,N3,k3,B3,_v,Cv,Sv,Av,hL,M3,D3,dee=x(()=>{u();st();p3=class extends W{constructor({cause:e}){super(\\\"Smart Account is not deployed.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.\\\",\\\"- An incorrect `sender` address is provided.\\\"],name:\\\"AccountNotDeployedError\\\"})}};Object.defineProperty(p3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});Ap=class extends W{constructor({cause:e,data:r,message:n}={}){let i=n?.replace(\\\"execution reverted: \\\",\\\"\\\")?.replace(\\\"execution reverted\\\",\\\"\\\");super(`Execution reverted ${i?`with reason: ${i}`:\\\"for an unknown reason\\\"}.`,{cause:e,name:\\\"ExecutionRevertedError\\\"}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r}};Object.defineProperty(Ap,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32521});Object.defineProperty(Ap,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});h3=class extends W{constructor({cause:e}){super(\\\"Failed to send funds to beneficiary.\\\",{cause:e,name:\\\"FailedToSendToBeneficiaryError\\\"})}};Object.defineProperty(h3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});m3=class extends W{constructor({cause:e}){super(\\\"Gas value overflowed.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- one of the gas values exceeded 2**120 (uint120)\\\"].filter(Boolean),name:\\\"GasValuesOverflowError\\\"})}};Object.defineProperty(m3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});g3=class extends W{constructor({cause:e}){super(\\\"The `handleOps` function was called by the Bundler with a gas limit too low.\\\",{cause:e,name:\\\"HandleOpsOutOfGasError\\\"})}};Object.defineProperty(g3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});y3=class extends W{constructor({cause:e,factory:r,factoryData:n,initCode:i}){super(\\\"Failed to simulate deployment for Smart Account.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- Invalid `factory`/`factoryData` or `initCode` properties are present\\\",\\\"- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)\\\",`- Smart Account deployment execution reverted with an error\\n`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,i&&`initCode: ${i}`].filter(Boolean),name:\\\"InitCodeFailedError\\\"})}};Object.defineProperty(y3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});b3=class extends W{constructor({cause:e,factory:r,factoryData:n,initCode:i}){super(\\\"Smart Account initialization implementation did not create an account.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- `factory`/`factoryData` or `initCode` properties are invalid\\\",`- Smart Account initialization implementation is incorrect\\n`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,i&&`initCode: ${i}`].filter(Boolean),name:\\\"InitCodeMustCreateSenderError\\\"})}};Object.defineProperty(b3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});w3=class extends W{constructor({cause:e,factory:r,factoryData:n,initCode:i,sender:s}){super(\\\"Smart Account initialization implementation does not return the expected sender.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",`Smart Account initialization implementation does not return a sender address\\n`,r&&`factory: ${r}`,n&&`factoryData: ${n}`,i&&`initCode: ${i}`,s&&`sender: ${s}`].filter(Boolean),name:\\\"InitCodeMustReturnSenderError\\\"})}};Object.defineProperty(w3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});v3=class extends W{constructor({cause:e}){super(\\\"Smart Account does not have sufficient funds to execute the User Operation.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the Smart Account does not have sufficient funds to cover the required prefund, or\\\",\\\"- a Paymaster was not provided\\\"].filter(Boolean),name:\\\"InsufficientPrefundError\\\"})}};Object.defineProperty(v3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});x3=class extends W{constructor({cause:e}){super(\\\"Bundler attempted to call an invalid function on the EntryPoint.\\\",{cause:e,name:\\\"InternalCallOnlyError\\\"})}};Object.defineProperty(x3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});E3=class extends W{constructor({cause:e}){super(\\\"Bundler used an invalid aggregator for handling aggregated User Operations.\\\",{cause:e,name:\\\"InvalidAggregatorError\\\"})}};Object.defineProperty(E3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});_3=class extends W{constructor({cause:e,nonce:r}){super(\\\"Invalid Smart Account nonce used for User Operation.\\\",{cause:e,metaMessages:[r&&`nonce: ${r}`].filter(Boolean),name:\\\"InvalidAccountNonceError\\\"})}};Object.defineProperty(_3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});C3=class extends W{constructor({cause:e}){super(\\\"Bundler has not set a beneficiary address.\\\",{cause:e,name:\\\"InvalidBeneficiaryError\\\"})}};Object.defineProperty(C3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});bv=class extends W{constructor({cause:e}){super(\\\"Invalid fields set on User Operation.\\\",{cause:e,name:\\\"InvalidFieldsError\\\"})}};Object.defineProperty(bv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32602});S3=class extends W{constructor({cause:e,paymasterAndData:r}){super(\\\"Paymaster properties provided are invalid.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `paymasterAndData` property is of an incorrect length\\\\n\\\",r&&`paymasterAndData: ${r}`].filter(Boolean),name:\\\"InvalidPaymasterAndDataError\\\"})}};Object.defineProperty(S3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});Tp=class extends W{constructor({cause:e}){super(\\\"Paymaster deposit for the User Operation is too low.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the Paymaster has deposited less than the expected amount via the `deposit` function\\\"].filter(Boolean),name:\\\"PaymasterDepositTooLowError\\\"})}};Object.defineProperty(Tp,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32508});Object.defineProperty(Tp,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});A3=class extends W{constructor({cause:e}){super(\\\"The `validatePaymasterUserOp` function on the Paymaster reverted.\\\",{cause:e,name:\\\"PaymasterFunctionRevertedError\\\"})}};Object.defineProperty(A3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});T3=class extends W{constructor({cause:e}){super(\\\"The Paymaster contract has not been deployed.\\\",{cause:e,name:\\\"PaymasterNotDeployedError\\\"})}};Object.defineProperty(T3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});wv=class extends W{constructor({cause:e}){super(\\\"UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.\\\",{cause:e,name:\\\"PaymasterRateLimitError\\\"})}};Object.defineProperty(wv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32504});vv=class extends W{constructor({cause:e}){super(\\\"UserOperation rejected because paymaster (or signature aggregator) stake or unstake-delay is too low.\\\",{cause:e,name:\\\"PaymasterStakeTooLowError\\\"})}};Object.defineProperty(vv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32505});I3=class extends W{constructor({cause:e}){super(\\\"Paymaster `postOp` function reverted.\\\",{cause:e,name:\\\"PaymasterPostOpFunctionRevertedError\\\"})}};Object.defineProperty(I3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});R3=class extends W{constructor({cause:e,factory:r,factoryData:n,initCode:i}){super(\\\"Smart Account has already been deployed.\\\",{cause:e,metaMessages:[\\\"Remove the following properties and try again:\\\",r&&\\\"`factory`\\\",n&&\\\"`factoryData`\\\",i&&\\\"`initCode`\\\"].filter(Boolean),name:\\\"SenderAlreadyConstructedError\\\"})}};Object.defineProperty(R3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});xv=class extends W{constructor({cause:e}){super(\\\"UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).\\\",{cause:e,name:\\\"SignatureCheckFailedError\\\"})}};Object.defineProperty(xv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32507});P3=class extends W{constructor({cause:e}){super(\\\"The `validateUserOp` function on the Smart Account reverted.\\\",{cause:e,name:\\\"SmartAccountFunctionRevertedError\\\"})}};Object.defineProperty(P3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});Ev=class extends W{constructor({cause:e}){super(\\\"UserOperation rejected because account specified unsupported signature aggregator.\\\",{cause:e,name:\\\"UnsupportedSignatureAggregatorError\\\"})}};Object.defineProperty(Ev,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32506});O3=class extends W{constructor({cause:e}){super(\\\"User Operation expired.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied\\\"].filter(Boolean),name:\\\"UserOperationExpiredError\\\"})}};Object.defineProperty(O3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});N3=class extends W{constructor({cause:e}){super(\\\"Paymaster for User Operation expired.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied\\\"].filter(Boolean),name:\\\"UserOperationPaymasterExpiredError\\\"})}};Object.defineProperty(N3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});k3=class extends W{constructor({cause:e}){super(\\\"Signature provided for the User Operation is invalid.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account\\\"].filter(Boolean),name:\\\"UserOperationSignatureError\\\"})}};Object.defineProperty(k3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});B3=class extends W{constructor({cause:e}){super(\\\"Signature provided for the User Operation is invalid.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster\\\"].filter(Boolean),name:\\\"UserOperationPaymasterSignatureError\\\"})}};Object.defineProperty(B3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});_v=class extends W{constructor({cause:e}){super(\\\"User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.\\\",{cause:e,name:\\\"UserOperationRejectedByEntryPointError\\\"})}};Object.defineProperty(_v,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32500});Cv=class extends W{constructor({cause:e}){super(\\\"User Operation rejected by Paymaster's `validatePaymasterUserOp`.\\\",{cause:e,name:\\\"UserOperationRejectedByPaymasterError\\\"})}};Object.defineProperty(Cv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32501});Sv=class extends W{constructor({cause:e}){super(\\\"User Operation rejected with op code validation error.\\\",{cause:e,name:\\\"UserOperationRejectedByOpCodeError\\\"})}};Object.defineProperty(Sv,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32502});Av=class extends W{constructor({cause:e}){super(\\\"UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).\\\",{cause:e,name:\\\"UserOperationOutOfTimeRangeError\\\"})}};Object.defineProperty(Av,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32503});hL=class extends W{constructor({cause:e}){super(`An error occurred while executing user operation: ${e?.shortMessage}`,{cause:e,name:\\\"UnknownBundlerError\\\"})}},M3=class extends W{constructor({cause:e}){super(\\\"User Operation verification gas limit exceeded.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the gas used for verification exceeded the `verificationGasLimit`\\\"].filter(Boolean),name:\\\"VerificationGasLimitExceededError\\\"})}};Object.defineProperty(M3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});D3=class extends W{constructor({cause:e}){super(\\\"User Operation verification gas limit is too low.\\\",{cause:e,metaMessages:[\\\"This could arise when:\\\",\\\"- the `verificationGasLimit` is too low to verify the User Operation\\\"].filter(Boolean),name:\\\"VerificationGasLimitTooLowError\\\"})}};Object.defineProperty(D3,\\\"message\\\",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/})});var mL,gL,yL,qT,zT=x(()=>{u();st();wl();Dw();mL=class extends W{constructor(e,{callData:r,callGasLimit:n,docsPath:i,factory:s,factoryData:o,initCode:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,paymaster:f,paymasterAndData:p,paymasterData:h,paymasterPostOpGasLimit:m,paymasterVerificationGasLimit:g,preVerificationGas:w,sender:v,signature:b,verificationGasLimit:_}){let S=lm({callData:r,callGasLimit:n,factory:s,factoryData:o,initCode:a,maxFeePerGas:typeof c<\\\"u\\\"&&`${Oi(c)} gwei`,maxPriorityFeePerGas:typeof l<\\\"u\\\"&&`${Oi(l)} gwei`,nonce:d,paymaster:f,paymasterAndData:p,paymasterData:h,paymasterPostOpGasLimit:m,paymasterVerificationGasLimit:g,preVerificationGas:w,sender:v,signature:b,verificationGasLimit:_});super(e.shortMessage,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages,\\\" \\\"]:[],\\\"Request Arguments:\\\",S].filter(Boolean),name:\\\"UserOperationExecutionError\\\"}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},gL=class extends W{constructor({hash:e}){super(`User Operation receipt with hash \\\"${e}\\\" could not be found. The User Operation may not have been processed yet.`,{name:\\\"UserOperationReceiptNotFoundError\\\"})}},yL=class extends W{constructor({hash:e}){super(`User Operation with hash \\\"${e}\\\" could not be found.`,{name:\\\"UserOperationNotFoundError\\\"})}},qT=class extends W{constructor({hash:e}){super(`Timed out while waiting for User Operation with hash \\\"${e}\\\" to be confirmed.`,{name:\\\"WaitForUserOperationReceiptTimeoutError\\\"})}}});function Z8e(t,e){let r=(t.details||\\\"\\\").toLowerCase();if(p3.message.test(r))return new p3({cause:t});if(h3.message.test(r))return new h3({cause:t});if(m3.message.test(r))return new m3({cause:t});if(g3.message.test(r))return new g3({cause:t});if(y3.message.test(r))return new y3({cause:t,factory:e.factory,factoryData:e.factoryData,initCode:e.initCode});if(b3.message.test(r))return new b3({cause:t,factory:e.factory,factoryData:e.factoryData,initCode:e.initCode});if(w3.message.test(r))return new w3({cause:t,factory:e.factory,factoryData:e.factoryData,initCode:e.initCode,sender:e.sender});if(v3.message.test(r))return new v3({cause:t});if(x3.message.test(r))return new x3({cause:t});if(_3.message.test(r))return new _3({cause:t,nonce:e.nonce});if(E3.message.test(r))return new E3({cause:t});if(C3.message.test(r))return new C3({cause:t});if(S3.message.test(r))return new S3({cause:t});if(Tp.message.test(r))return new Tp({cause:t});if(A3.message.test(r))return new A3({cause:t});if(T3.message.test(r))return new T3({cause:t});if(I3.message.test(r))return new I3({cause:t});if(P3.message.test(r))return new P3({cause:t});if(R3.message.test(r))return new R3({cause:t,factory:e.factory,factoryData:e.factoryData,initCode:e.initCode});if(O3.message.test(r))return new O3({cause:t});if(N3.message.test(r))return new N3({cause:t});if(B3.message.test(r))return new B3({cause:t});if(k3.message.test(r))return new k3({cause:t});if(M3.message.test(r))return new M3({cause:t});if(D3.message.test(r))return new D3({cause:t});let n=t.walk(i=>z0t.some(s=>s.code===i.code));if(n){if(n.code===Ap.code)return new Ap({cause:t,data:n.data,message:n.details});if(n.code===bv.code)return new bv({cause:t});if(n.code===Tp.code)return new Tp({cause:t});if(n.code===wv.code)return new wv({cause:t});if(n.code===vv.code)return new vv({cause:t});if(n.code===xv.code)return new xv({cause:t});if(n.code===Ev.code)return new Ev({cause:t});if(n.code===Av.code)return new Av({cause:t});if(n.code===_v.code)return new _v({cause:t});if(n.code===Cv.code)return new Cv({cause:t});if(n.code===Sv.code)return new Sv({cause:t})}return new hL({cause:t})}var z0t,Q8e=x(()=>{u();dee();z0t=[Ap,bv,Tp,wv,vv,xv,Ev,Av,_v,Cv,Sv]});function bL(t,{calls:e,docsPath:r,...n}){let i=(()=>{let s=Z8e(t,n);if(e&&s instanceof Ap){let o=$0t(s),a=e?.filter(c=>c.abi);if(o&&a.length>0)return V0t({calls:a,revertData:o})}return s})();return new mL(i,{docsPath:r,...n})}function $0t(t){let e;return t.walk(r=>{let n=r;if(typeof n.data==\\\"string\\\"||typeof n.data?.revertData==\\\"string\\\"||!(n instanceof W)&&typeof n.message==\\\"string\\\"){let i=(n.data?.revertData||n.data||n.message).match?.(/(0x[A-Za-z0-9]*)/);if(i)return e=i[1],!0}return!1}),e}function V0t(t){let{calls:e,revertData:r}=t,{abi:n,functionName:i,args:s,to:o}=(()=>{let c=e?.filter(d=>!!d.abi);if(c.length===1)return c[0];let l=c.filter(d=>{try{return!!l5({abi:d.abi,data:r})}catch{return!1}});return l.length===1?l[0]:{abi:[],functionName:c.reduce((d,f)=>`${d?`${d} | `:\\\"\\\"}${f.functionName}`,\\\"\\\"),args:void 0,to:void 0}})(),a=r===\\\"0x\\\"?new m5({functionName:i}):new um({abi:n,data:r,functionName:i});return new jg(a,{abi:n,args:s,contractAddress:o,functionName:i})}var fee=x(()=>{u();st();dm();AN();dee();zT();Q8e()});function J8e(t){let e={};return t.callGasLimit&&(e.callGasLimit=BigInt(t.callGasLimit)),t.preVerificationGas&&(e.preVerificationGas=BigInt(t.preVerificationGas)),t.verificationGasLimit&&(e.verificationGasLimit=BigInt(t.verificationGasLimit)),t.paymasterPostOpGasLimit&&(e.paymasterPostOpGasLimit=BigInt(t.paymasterPostOpGasLimit)),t.paymasterVerificationGasLimit&&(e.paymasterVerificationGasLimit=BigInt(t.paymasterVerificationGasLimit)),e}var Y8e=x(()=>{u()});function Hy(t){let e={};return typeof t.callData<\\\"u\\\"&&(e.callData=t.callData),typeof t.callGasLimit<\\\"u\\\"&&(e.callGasLimit=Z(t.callGasLimit)),typeof t.factory<\\\"u\\\"&&(e.factory=t.factory),typeof t.factoryData<\\\"u\\\"&&(e.factoryData=t.factoryData),typeof t.initCode<\\\"u\\\"&&(e.initCode=t.initCode),typeof t.maxFeePerGas<\\\"u\\\"&&(e.maxFeePerGas=Z(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<\\\"u\\\"&&(e.maxPriorityFeePerGas=Z(t.maxPriorityFeePerGas)),typeof t.nonce<\\\"u\\\"&&(e.nonce=Z(t.nonce)),typeof t.paymaster<\\\"u\\\"&&(e.paymaster=t.paymaster),typeof t.paymasterAndData<\\\"u\\\"&&(e.paymasterAndData=t.paymasterAndData||\\\"0x\\\"),typeof t.paymasterData<\\\"u\\\"&&(e.paymasterData=t.paymasterData),typeof t.paymasterPostOpGasLimit<\\\"u\\\"&&(e.paymasterPostOpGasLimit=Z(t.paymasterPostOpGasLimit)),typeof t.paymasterSignature<\\\"u\\\"&&(e.paymasterSignature=t.paymasterSignature),typeof t.paymasterVerificationGasLimit<\\\"u\\\"&&(e.paymasterVerificationGasLimit=Z(t.paymasterVerificationGasLimit)),typeof t.preVerificationGas<\\\"u\\\"&&(e.preVerificationGas=Z(t.preVerificationGas)),typeof t.sender<\\\"u\\\"&&(e.sender=t.sender),typeof t.signature<\\\"u\\\"&&(e.signature=t.signature),typeof t.verificationGasLimit<\\\"u\\\"&&(e.verificationGasLimit=Z(t.verificationGasLimit)),typeof t.authorization<\\\"u\\\"&&(e.eip7702Auth=W0t(t.authorization)),e}function W0t(t){return{address:t.address,chainId:Z(t.chainId),nonce:Z(t.nonce),r:t.r?Z(BigInt(t.r),{size:32}):Fr(\\\"0x\\\",{size:32}),s:t.s?Z(BigInt(t.s),{size:32}):Fr(\\\"0x\\\",{size:32}),yParity:t.yParity?Z(t.yParity,{size:1}):Fr(\\\"0x\\\",{size:32})}}var $T=x(()=>{u();qe();Dw()});async function X8e(t,e){let{chainId:r,entryPointAddress:n,context:i,...s}=e,o=Hy(s),{paymasterPostOpGasLimit:a,paymasterVerificationGasLimit:c,...l}=await t.request({method:\\\"pm_getPaymasterData\\\",params:[{...o,callGasLimit:o.callGasLimit??\\\"0x0\\\",verificationGasLimit:o.verificationGasLimit??\\\"0x0\\\",preVerificationGas:o.preVerificationGas??\\\"0x0\\\"},n,Z(r),i]});return{...l,...a&&{paymasterPostOpGasLimit:Ge(a)},...c&&{paymasterVerificationGasLimit:Ge(c)}}}var eSe=x(()=>{u();xi();qe();$T()});async function tSe(t,e){let{chainId:r,entryPointAddress:n,context:i,...s}=e,o=Hy(s),{paymasterPostOpGasLimit:a,paymasterVerificationGasLimit:c,...l}=await t.request({method:\\\"pm_getPaymasterStubData\\\",params:[{...o,callGasLimit:o.callGasLimit??\\\"0x0\\\",verificationGasLimit:o.verificationGasLimit??\\\"0x0\\\",preVerificationGas:o.preVerificationGas??\\\"0x0\\\"},n,Z(r),i]});return{...l,...a&&{paymasterPostOpGasLimit:Ge(a)},...c&&{paymasterVerificationGasLimit:Ge(c)}}}var rSe=x(()=>{u();xi();qe();$T()});async function L3(t,e){let r=e,{account:n=t.account,dataSuffix:i=typeof t.dataSuffix==\\\"string\\\"?t.dataSuffix:t.dataSuffix?.value,parameters:s=G0t,stateOverride:o}=r;if(!n)throw new In;let a=Ze(n),c=t,l=r.paymaster??c?.paymaster,d=typeof l==\\\"string\\\"?l:void 0,{getPaymasterStubData:f,getPaymasterData:p}=(()=>{if(l===!0)return{getPaymasterStubData:O=>ae(c,tSe,\\\"getPaymasterStubData\\\")(O),getPaymasterData:O=>ae(c,X8e,\\\"getPaymasterData\\\")(O)};if(typeof l==\\\"object\\\"){let{getPaymasterStubData:O,getPaymasterData:L}=l;return{getPaymasterStubData:L&&O?O:L,getPaymasterData:L&&O?L:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),h=r.paymasterContext?r.paymasterContext:c?.paymasterContext,m={...r,paymaster:d,sender:a.address},[g,w,v,b,_]=await Promise.all([(async()=>r.calls?a.encodeCalls(r.calls.map(O=>{let L=O;return L.abi?{data:At(L),to:L.to,value:L.value}:L})):r.callData)(),(async()=>{if(!s.includes(\\\"factory\\\"))return;if(r.initCode)return{initCode:r.initCode};if(r.factory&&r.factoryData)return{factory:r.factory,factoryData:r.factoryData};let{factory:O,factoryData:L}=await a.getFactoryArgs();return a.entryPoint.version===\\\"0.6\\\"?{initCode:O&&L?Jt([O,L]):void 0}:{factory:O,factoryData:L}})(),(async()=>{if(s.includes(\\\"fees\\\")){if(typeof r.maxFeePerGas==\\\"bigint\\\"&&typeof r.maxPriorityFeePerGas==\\\"bigint\\\")return m;if(c?.userOperation?.estimateFeesPerGas){let O=await c.userOperation.estimateFeesPerGas({account:a,bundlerClient:c,userOperation:m});return{...m,...O}}try{let O=c.client??t,L=await ae(O,YN,\\\"estimateFeesPerGas\\\")({chain:O.chain,type:\\\"eip1559\\\"});return{maxFeePerGas:typeof r.maxFeePerGas==\\\"bigint\\\"?r.maxFeePerGas:BigInt(2n*L.maxFeePerGas),maxPriorityFeePerGas:typeof r.maxPriorityFeePerGas==\\\"bigint\\\"?r.maxPriorityFeePerGas:BigInt(2n*L.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(s.includes(\\\"nonce\\\"))return typeof r.nonce==\\\"bigint\\\"?r.nonce:a.getNonce()})(),(async()=>{if(s.includes(\\\"authorization\\\")){if(typeof r.authorization==\\\"object\\\")return r.authorization;if(a.authorization&&!await a.isDeployed())return{...await Uw(a.client,a.authorization),r:\\\"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000\\\",s:\\\"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\\",yParity:1}}})()]);typeof g<\\\"u\\\"&&(m.callData=i?Jt([g,i]):g),typeof w<\\\"u\\\"&&(m={...m,...w}),typeof v<\\\"u\\\"&&(m={...m,...v}),typeof b<\\\"u\\\"&&(m.nonce=b),typeof _<\\\"u\\\"&&(m.authorization=_),s.includes(\\\"signature\\\")&&(typeof r.signature<\\\"u\\\"?m.signature=r.signature:m.signature=await a.getStubSignature(m)),a.entryPoint.version===\\\"0.6\\\"&&!m.initCode&&(m.initCode=\\\"0x\\\");let S;async function T(){return S||(t.chain?t.chain.id:(S=await ae(t,Es,\\\"getChainId\\\")({}),S))}let N=!1;if(s.includes(\\\"paymaster\\\")&&f&&!d&&!r.paymasterAndData){let{isFinal:O=!1,sponsor:L,...B}=await f({chainId:await T(),entryPointAddress:a.entryPoint.address,context:h,...m});N=O,m={...m,...B}}if(a.entryPoint.version===\\\"0.6\\\"&&!m.paymasterAndData&&(m.paymasterAndData=\\\"0x\\\"),s.includes(\\\"gas\\\")){if(a.userOperation?.estimateGas){let O=await a.userOperation.estimateGas(m);m={...m,...O}}if(typeof m.callGasLimit>\\\"u\\\"||typeof m.preVerificationGas>\\\"u\\\"||typeof m.verificationGasLimit>\\\"u\\\"||m.paymaster&&typeof m.paymasterPostOpGasLimit>\\\"u\\\"||m.paymaster&&typeof m.paymasterVerificationGasLimit>\\\"u\\\"){let O=await ae(c,vL,\\\"estimateUserOperationGas\\\")({account:a,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:o,...m.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...m});m={...m,callGasLimit:m.callGasLimit??O.callGasLimit,preVerificationGas:m.preVerificationGas??O.preVerificationGas,verificationGasLimit:m.verificationGasLimit??O.verificationGasLimit,paymasterPostOpGasLimit:m.paymasterPostOpGasLimit??O.paymasterPostOpGasLimit,paymasterVerificationGasLimit:m.paymasterVerificationGasLimit??O.paymasterVerificationGasLimit}}}if(s.includes(\\\"paymaster\\\")&&p&&!d&&!r.paymasterAndData&&!N){let O=await p({chainId:await T(),entryPointAddress:a.entryPoint.address,context:h,...m});m={...m,...O}}return delete m.calls,delete m.parameters,delete m.paymasterContext,typeof m.paymaster!=\\\"string\\\"&&delete m.paymaster,m}var G0t,wL=x(()=>{u();en();GJ();ek();$d();Cl();fa();Ei();Ut();eSe();rSe();pee();G0t=[\\\"factory\\\",\\\"fees\\\",\\\"gas\\\",\\\"paymaster\\\",\\\"nonce\\\",\\\"signature\\\",\\\"authorization\\\"]});async function vL(t,e){let{account:r=t.account,entryPointAddress:n,stateOverride:i}=e;if(!r&&!e.sender)throw new In;let s=r?Ze(r):void 0,o=ty(i),a=s?await ae(t,L3,\\\"prepareUserOperation\\\")({...e,parameters:[\\\"authorization\\\",\\\"factory\\\",\\\"nonce\\\",\\\"paymaster\\\",\\\"signature\\\"]}):e;try{let c=[Hy(a),n??s?.entryPoint?.address],l=await t.request({method:\\\"eth_estimateUserOperationGas\\\",params:o?[...c,o]:[...c]});return J8e(l)}catch(c){let l=e.calls;throw bL(c,{...a,...l?{calls:l}:{}})}}var pee=x(()=>{u();en();Cl();Ut();hA();fee();Y8e();$T();wL()});function nSe(t){return t.request({method:\\\"eth_supportedEntryPoints\\\"})}var iSe=x(()=>{u()});function sSe(t){let e={...t};return t.callGasLimit&&(e.callGasLimit=BigInt(t.callGasLimit)),t.maxFeePerGas&&(e.maxFeePerGas=BigInt(t.maxFeePerGas)),t.maxPriorityFeePerGas&&(e.maxPriorityFeePerGas=BigInt(t.maxPriorityFeePerGas)),t.nonce&&(e.nonce=BigInt(t.nonce)),t.paymasterPostOpGasLimit&&(e.paymasterPostOpGasLimit=BigInt(t.paymasterPostOpGasLimit)),t.paymasterVerificationGasLimit&&(e.paymasterVerificationGasLimit=BigInt(t.paymasterVerificationGasLimit)),t.preVerificationGas&&(e.preVerificationGas=BigInt(t.preVerificationGas)),t.verificationGasLimit&&(e.verificationGasLimit=BigInt(t.verificationGasLimit)),e}var oSe=x(()=>{u()});async function aSe(t,{hash:e}){let r=await t.request({method:\\\"eth_getUserOperationByHash\\\",params:[e]},{dedupe:!0});if(!r)throw new yL({hash:e});let{blockHash:n,blockNumber:i,entryPoint:s,transactionHash:o,userOperation:a}=r;return{blockHash:n,blockNumber:BigInt(i),entryPoint:s,transactionHash:o,userOperation:sSe(a)}}var cSe=x(()=>{u();zT();oSe()});function lSe(t){let e={...t};return t.actualGasCost&&(e.actualGasCost=BigInt(t.actualGasCost)),t.actualGasUsed&&(e.actualGasUsed=BigInt(t.actualGasUsed)),t.logs&&(e.logs=t.logs.map(r=>Qi(r))),t.receipt&&(e.receipt=Pw(e.receipt)),e}var uSe=x(()=>{u();Vd();Ow()});async function xL(t,{hash:e}){let r=await t.request({method:\\\"eth_getUserOperationReceipt\\\",params:[e]},{dedupe:!0});if(!r)throw new gL({hash:e});return lSe(r)}var hee=x(()=>{u();zT();uSe()});async function dSe(t,e){let{account:r=t.account,entryPointAddress:n}=e;if(!r&&!e.sender)throw new In;let i=r?Ze(r):void 0,s=i?await ae(t,L3,\\\"prepareUserOperation\\\")(e):e,o=e.signature||await i?.signUserOperation?.(s),a=Hy({...s,signature:o});try{return await t.request({method:\\\"eth_sendUserOperation\\\",params:[a,n??i?.entryPoint?.address]},{retryCount:0})}catch(c){let l=e.calls;throw bL(c,{...s,...l?{calls:l}:{},signature:o})}}var fSe=x(()=>{u();en();Cl();Ut();fee();$T();wL()});function pSe(t,e){let{hash:r,pollingInterval:n=t.pollingInterval,retryCount:i,timeout:s=12e4}=e,o=0,a=qt([\\\"waitForUserOperationReceipt\\\",t.uid,r]);return new Promise((c,l)=>{let d=so(a,{resolve:c,reject:l},f=>{let p=g=>{m(),g(),d()},h=s?setTimeout(()=>p(()=>f.reject(new qT({hash:r}))),s):void 0,m=Rc(async()=>{i&&o>=i&&(clearTimeout(h),p(()=>f.reject(new qT({hash:r}))));try{let g=await ae(t,xL,\\\"getUserOperationReceipt\\\")({hash:r});clearTimeout(h),p(()=>f.resolve(g))}catch(g){let w=g;w.name!==\\\"UserOperationReceiptNotFoundError\\\"&&(clearTimeout(h),p(()=>f.reject(w)))}o++},{emitOnBegin:!0,interval:n});return m})})}var hSe=x(()=>{u();Ut();Am();dy();ko();zT();hee()});function mSe(t){return{estimateUserOperationGas:e=>vL(t,e),getChainId:()=>Es(t),getSupportedEntryPoints:()=>nSe(t),getUserOperation:e=>aSe(t,e),getUserOperationReceipt:e=>xL(t,e),prepareUserOperation:e=>L3(t,e),sendUserOperation:e=>dSe(t,e),waitForUserOperationReceipt:e=>pSe(t,e)}}var gSe=x(()=>{u();$d();pee();iSe();cSe();hee();wL();fSe();hSe()});function mee(t){let{client:e,dataSuffix:r,key:n=\\\"bundler\\\",name:i=\\\"Bundler Client\\\",paymaster:s,paymasterContext:o,transport:a,userOperation:c}=t;return Object.assign(Im({...t,chain:t.chain??e?.chain,key:n,name:i,transport:a,type:\\\"bundlerClient\\\"}),{client:e,dataSuffix:r??e?.dataSuffix,paymaster:s,paymasterContext:o,userOperation:c}).extend(mSe)}var ySe=x(()=>{u();Jk();gSe()});var gee=x(()=>{u();G8e();ySe();H8e();q8e();W8e()});var yee,bSe=x(()=>{u();PD();yee=t3(()=>({}))});function bee(t){t.forEach(e=>{var r,n,i,s,o,a,c,l;if(!e.rpcUrl)return;let d=Oe({id:e.id,rpcUrls:{default:{http:[e.rpcUrl]}},name:(n=(r=e.nativeCurrency)===null||r===void 0?void 0:r.name)!==null&&n!==void 0?n:\\\"\\\",nativeCurrency:{name:(s=(i=e.nativeCurrency)===null||i===void 0?void 0:i.name)!==null&&s!==void 0?s:\\\"\\\",symbol:(a=(o=e.nativeCurrency)===null||o===void 0?void 0:o.symbol)!==null&&a!==void 0?a:\\\"\\\",decimals:(l=(c=e.nativeCurrency)===null||c===void 0?void 0:c.decimal)!==null&&l!==void 0?l:18}}),f=ZA({chain:d,transport:za(e.rpcUrl)}),p=mee({client:f,transport:za(e.rpcUrl)});yee.setState({[e.id]:{client:f,bundlerClient:p}})})}function EL(t){var e;return(e=yee.getState()[t])===null||e===void 0?void 0:e.client}var wee=x(()=>{u();un();gee();bSe()});function co(t,e,r){if(t==null)throw e??pe.rpc.invalidParams({message:r??\\\"value must be present\\\",data:t})}function Ip(t,e){if(!Array.isArray(t))throw pe.rpc.invalidParams({message:e??\\\"value must be an array\\\",data:t})}var U3=x(()=>{u();va()});function VT(t){if(typeof t!=\\\"object\\\"||t===null)throw pe.rpc.internal(\\\"sub account info is not an object\\\");if(!(\\\"address\\\"in t))throw pe.rpc.internal(\\\"sub account is invalid\\\");if(\\\"address\\\"in t&&typeof t.address==\\\"string\\\"&&!lt(t.address))throw pe.rpc.internal(\\\"sub account address is invalid\\\");if(\\\"factory\\\"in t&&typeof t.factory==\\\"string\\\"&&!lt(t.factory))throw pe.rpc.internal(\\\"sub account factory address is invalid\\\");if(\\\"factoryData\\\"in t&&typeof t.factoryData==\\\"string\\\"&&!Ur(t.factoryData))throw pe.rpc.internal(\\\"sub account factory data is invalid\\\")}var wSe=x(()=>{u();un();va()});async function vSe(){return crypto.subtle.generateKey({name:\\\"ECDH\\\",namedCurve:\\\"P-256\\\"},!0,[\\\"deriveKey\\\"])}async function xSe(t,e){return crypto.subtle.deriveKey({name:\\\"ECDH\\\",public:e},t,{name:\\\"AES-GCM\\\",length:256},!1,[\\\"encrypt\\\",\\\"decrypt\\\"])}async function K0t(t,e){let r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:\\\"AES-GCM\\\",iv:r},t,new TextEncoder().encode(e));return{iv:r,cipherText:n}}async function Z0t(t,{iv:e,cipherText:r}){let n=await crypto.subtle.decrypt({name:\\\"AES-GCM\\\",iv:e},t,r);return new TextDecoder().decode(n)}function ESe(t){switch(t){case\\\"public\\\":return\\\"spki\\\";case\\\"private\\\":return\\\"pkcs8\\\"}}async function _L(t,e){let r=ESe(t),n=await crypto.subtle.exportKey(r,e);return DT(new Uint8Array(n))}async function CL(t,e){let r=ESe(t),n=i3(e).buffer;return await crypto.subtle.importKey(r,new Uint8Array(n),{name:\\\"ECDH\\\",namedCurve:\\\"P-256\\\"},!0,t===\\\"private\\\"?[\\\"deriveKey\\\"]:[])}async function _Se(t,e){let r=JSON.stringify(t,(n,i)=>{if(!(i instanceof Error))return i;let s=i;return Object.assign(Object.assign({},s.code?{code:s.code}:{}),{message:s.message})});return K0t(e,r)}async function CSe(t,e){return JSON.parse(await Z0t(e,t))}var vee=x(()=>{u();tf()});var SSe=x(()=>{u()});var ASe,TSe=x(()=>{u();ASe=\\\"0.1.1\\\"});function ISe(){return ASe}var RSe=x(()=>{u();TSe()});function PSe(t,e){return e?.(t)?t:t&&typeof t==\\\"object\\\"&&\\\"cause\\\"in t&&t.cause?PSe(t.cause,e):e?null:t}var Nt,Ym=x(()=>{u();RSe();Nt=class t extends Error{constructor(e,r={}){let n=(()=>{if(r.cause instanceof t){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,o=`https://oxlib.sh${i??\\\"\\\"}`,a=[e||\\\"An error occurred.\\\",...r.metaMessages?[\\\"\\\",...r.metaMessages]:[],...n||i?[\\\"\\\",n?`Details: ${n}`:void 0,i?`See: ${o}`:void 0]:[]].filter(c=>typeof c==\\\"string\\\").join(`\\n`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docs\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"cause\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"BaseError\\\"}),Object.defineProperty(this,\\\"version\\\",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${ISe()}`}),this.cause=r.cause,this.details=n,this.docs=o,this.docsPath=i,this.shortMessage=e}walk(e){return PSe(this,e)}}});function WT(t,e=\\\"\\\"){if(typeof t!=\\\"boolean\\\"){let r=e&&`\\\"${e}\\\"`;throw new Error(r+\\\"expected boolean, got type=\\\"+typeof t)}return t}function zy(t,e,r=\\\"\\\"){let n=kg(t),i=t?.length,s=e!==void 0;if(!n||s&&i!==e){let o=r&&`\\\"${r}\\\" `,a=s?` of length ${e}`:\\\"\\\",c=n?`length=${i}`:`type=${typeof t}`;throw new Error(o+\\\"expected Uint8Array\\\"+a+\\\", got \\\"+c)}return t}function F3(t){let e=t.toString(16);return e.length&1?\\\"0\\\"+e:e}function Cee(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);return t===\\\"\\\"?_ee:BigInt(\\\"0x\\\"+t)}function Tv(t){return Cee(Yf(t))}function SL(t){return Fa(t),Cee(Yf(Uint8Array.from(t).reverse()))}function GT(t,e){return Bg(t.toString(16).padStart(e*2,\\\"0\\\"))}function AL(t,e){return GT(t,e).reverse()}function Ho(t,e,r){let n;if(typeof e==\\\"string\\\")try{n=Bg(e)}catch(s){throw new Error(t+\\\" must be hex string or Uint8Array, cause: \\\"+s)}else if(kg(e))n=Uint8Array.from(e);else throw new Error(t+\\\" must be hex string or Uint8Array\\\");let i=n.length;if(typeof r==\\\"number\\\"&&i!==r)throw new Error(t+\\\" of length \\\"+r+\\\" expected, got \\\"+i);return n}function OSe(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function See(t,e,r){return xee(t)&&xee(e)&&xee(r)&&e<=t&&t<r}function Aee(t,e,r,n){if(!See(e,r,n))throw new Error(\\\"expected valid \\\"+t+\\\": \\\"+r+\\\" <= n < \\\"+n+\\\", got \\\"+e)}function KT(t){let e;for(e=0;t>_ee;t>>=Eee,e+=1);return e}function Tee(t,e,r){if(typeof t!=\\\"number\\\"||t<2)throw new Error(\\\"hashLen must be a number\\\");if(typeof e!=\\\"number\\\"||e<2)throw new Error(\\\"qByteLen must be a number\\\");if(typeof r!=\\\"function\\\")throw new Error(\\\"hmacFn must be a function\\\");let n=h=>new Uint8Array(h),i=h=>Uint8Array.of(h),s=n(t),o=n(t),a=0,c=()=>{s.fill(1),o.fill(0),a=0},l=(...h)=>r(o,s,...h),d=(h=n(0))=>{o=l(i(0),h),s=l(),h.length!==0&&(o=l(i(1),h),s=l())},f=()=>{if(a++>=1e3)throw new Error(\\\"drbg: tried 1000 values\\\");let h=0,m=[];for(;h<e;){s=l();let g=s.slice();m.push(g),h+=s.length}return Ec(...m)};return(h,m)=>{c(),d(h);let g;for(;!(g=m(f()));)d();return c(),g}}function ZT(t,e,r={}){if(!t||typeof t!=\\\"object\\\")throw new Error(\\\"expected valid options object\\\");function n(i,s,o){let a=t[i];if(o&&a===void 0)return;let c=typeof a;if(c!==s||a===null)throw new Error(`param \\\"${i}\\\" is invalid: expected ${s}, got ${c}`)}Object.entries(e).forEach(([i,s])=>n(i,s,!1)),Object.entries(r).forEach(([i,s])=>n(i,s,!0))}function TL(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(i!==void 0)return i;let s=t(r,...n);return e.set(r,s),s}}var _ee,Eee,xee,Xm,QT=x(()=>{u();Md();Md();_ee=BigInt(0),Eee=BigInt(1);xee=t=>typeof t==\\\"bigint\\\"&&_ee<=t;Xm=t=>(Eee<<BigInt(t))-Eee});var NSe,kSe=x(()=>{u();QT();NSe=OSe});function $y(t,e,r){return JSON.stringify(t,(n,i)=>typeof e==\\\"function\\\"?e(n,i):typeof i==\\\"bigint\\\"?i.toString()+egt:i,r)}var egt,j3=x(()=>{u();egt=\\\"#__bigint\\\"});function YT(t,e){if(Iv(t)>e)throw new IL({givenSize:Iv(t),maxSize:e})}function BSe(t,e){if(typeof e==\\\"number\\\"&&e>0&&e>Iv(t)-1)throw new XT({offset:e,position:\\\"start\\\",size:Iv(t)})}function MSe(t,e,r){if(typeof e==\\\"number\\\"&&typeof r==\\\"number\\\"&&Iv(t)!==r-e)throw new XT({offset:r,position:\\\"end\\\",size:Iv(t)})}function Iee(t){if(t>=e0.zero&&t<=e0.nine)return t-e0.zero;if(t>=e0.A&&t<=e0.F)return t-(e0.A-10);if(t>=e0.a&&t<=e0.f)return t-(e0.a-10)}function DSe(t,e={}){let{dir:r,size:n=32}=e;if(n===0)return t;if(t.length>n)throw new RL({size:t.length,targetSize:n,type:\\\"Bytes\\\"});let i=new Uint8Array(n);for(let s=0;s<n;s++){let o=r===\\\"right\\\";i[o?s:n-s-1]=t[o?s:t.length-s-1]}return i}function LSe(t,e={}){let{dir:r=\\\"left\\\"}=e,n=t,i=0;for(let s=0;s<n.length-1&&n[r===\\\"left\\\"?s:n.length-s-1].toString()===\\\"0\\\";s++)i++;return n=r===\\\"left\\\"?n.slice(i):n.slice(0,n.length-i),n}var e0,Ree=x(()=>{u();Uu();e0={zero:48,nine:57,A:65,F:70,a:97,f:102}});function Rv(t,e){if(Ga(t)>e)throw new eI({givenSize:Ga(t),maxSize:e})}function FSe(t,e){if(typeof e==\\\"number\\\"&&e>0&&e>Ga(t)-1)throw new H3({offset:e,position:\\\"start\\\",size:Ga(t)})}function jSe(t,e,r){if(typeof e==\\\"number\\\"&&typeof r==\\\"number\\\"&&Ga(t)!==r-e)throw new H3({offset:r,position:\\\"end\\\",size:Ga(t)})}function Pee(t,e={}){let{dir:r,size:n=32}=e;if(n===0)return t;let i=t.replace(\\\"0x\\\",\\\"\\\");if(i.length>n*2)throw new tI({size:Math.ceil(i.length/2),targetSize:n,type:\\\"Hex\\\"});return`0x${i[r===\\\"right\\\"?\\\"padEnd\\\":\\\"padStart\\\"](n*2,\\\"0\\\")}`}function Oee(t,e={}){let{dir:r=\\\"left\\\"}=e,n=t.replace(\\\"0x\\\",\\\"\\\"),i=0;for(let s=0;s<n.length-1&&n[r===\\\"left\\\"?s:n.length-s-1].toString()===\\\"0\\\";s++)i++;return n=r===\\\"left\\\"?n.slice(i):n.slice(0,n.length-i),n===\\\"0\\\"?\\\"0x\\\":r===\\\"right\\\"&&n.length%2===1?`0x${n}0`:`0x${n}`}var Nee=x(()=>{u();Rp()});var Ka={};ue(Ka,{IntegerOutOfRangeError:()=>PL,InvalidHexBooleanError:()=>OL,InvalidHexTypeError:()=>rI,InvalidHexValueError:()=>nI,InvalidLengthError:()=>kee,SizeExceedsPaddingSizeError:()=>tI,SizeOverflowError:()=>eI,SliceOffsetOutOfBoundsError:()=>H3,assert:()=>qSe,concat:()=>nf,from:()=>q3,fromBoolean:()=>Bee,fromBytes:()=>Xi,fromNumber:()=>As,fromString:()=>z3,isEqual:()=>ngt,padLeft:()=>$3,padRight:()=>V3,random:()=>igt,size:()=>Ga,slice:()=>Fu,toBigInt:()=>NL,toBoolean:()=>ogt,toBytes:()=>agt,toNumber:()=>zSe,toString:()=>cgt,trimLeft:()=>iI,trimRight:()=>sgt,validate:()=>kL});function qSe(t,e={}){let{strict:r=!1}=e;if(!t)throw new rI(t);if(typeof t!=\\\"string\\\")throw new rI(t);if(r&&!/^0x[0-9a-fA-F]*$/.test(t))throw new nI(t);if(!t.startsWith(\\\"0x\\\"))throw new nI(t)}function nf(...t){return`0x${t.reduce((e,r)=>e+r.replace(\\\"0x\\\",\\\"\\\"),\\\"\\\")}`}function q3(t){return t instanceof Uint8Array?Xi(t):Array.isArray(t)?Xi(new Uint8Array(t)):t}function Bee(t,e={}){let r=`0x${Number(t)}`;return typeof e.size==\\\"number\\\"?(Rv(r,e.size),$3(r,e.size)):r}function Xi(t,e={}){let r=\\\"\\\";for(let i=0;i<t.length;i++)r+=rgt[t[i]];let n=`0x${r}`;return typeof e.size==\\\"number\\\"?(Rv(n,e.size),V3(n,e.size)):n}function As(t,e={}){let{signed:r,size:n}=e,i=BigInt(t),s;n?r?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof t==\\\"number\\\"&&(s=BigInt(Number.MAX_SAFE_INTEGER));let o=typeof s==\\\"bigint\\\"&&r?-s-1n:0;if(s&&i>s||i<o){let l=typeof t==\\\"bigint\\\"?\\\"n\\\":\\\"\\\";throw new PL({max:s?`${s}${l}`:void 0,min:`${o}${l}`,signed:r,size:n,value:`${t}${l}`})}let c=`0x${(r&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?$3(c,n):c}function z3(t,e={}){return Xi(tgt.encode(t),e)}function ngt(t,e){return NSe(lo(t),lo(e))}function $3(t,e){return Pee(t,{dir:\\\"left\\\",size:e})}function V3(t,e){return Pee(t,{dir:\\\"right\\\",size:e})}function igt(t){return Xi($Se(t))}function Fu(t,e,r,n={}){let{strict:i}=n;FSe(t,e);let s=`0x${t.replace(\\\"0x\\\",\\\"\\\").slice((e??0)*2,(r??t.length)*2)}`;return i&&jSe(s,e,r),s}function Ga(t){return Math.ceil((t.length-2)/2)}function iI(t){return Oee(t,{dir:\\\"left\\\"})}function sgt(t){return Oee(t,{dir:\\\"right\\\"})}function NL(t,e={}){let{signed:r}=e;e.size&&Rv(t,e.size);let n=BigInt(t);if(!r)return n;let i=(t.length-2)/2,s=(1n<<BigInt(i)*8n)-1n,o=s>>1n;return n<=o?n:n-s-1n}function ogt(t,e={}){e.size&&Rv(t,e.size);let r=iI(t);if(r===\\\"0x\\\")return!1;if(r===\\\"0x1\\\")return!0;throw new OL(t)}function agt(t,e={}){return lo(t,e)}function zSe(t,e={}){let{signed:r,size:n}=e;return Number(!r&&!n?t:NL(t,e))}function cgt(t,e={}){let{size:r}=e,n=lo(t);return r&&(YT(n,r),n=VSe(n)),new TextDecoder().decode(n)}function kL(t,e={}){let{strict:r=!1}=e;try{return qSe(t,{strict:r}),!0}catch{return!1}}var tgt,rgt,PL,OL,rI,nI,kee,eI,H3,tI,Rp=x(()=>{u();kSe();Uu();Ym();j3();Ree();Nee();tgt=new TextEncoder,rgt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));PL=class extends Nt{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number \\\\`${s}\\\\` is not in safe${i?` ${i*8}-bit`:\\\"\\\"}${n?\\\" signed\\\":\\\" unsigned\\\"} integer range ${e?`(\\\\`${r}\\\\` to \\\\`${e}\\\\`)`:`(above \\\\`${r}\\\\`)`}`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.IntegerOutOfRangeError\\\"})}},OL=class extends Nt{constructor(e){super(`Hex value \\\\`\\\"${e}\\\"\\\\` is not a valid boolean.`,{metaMessages:['The hex value must be `\\\"0x0\\\"` (false) or `\\\"0x1\\\"` (true).']}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidHexBooleanError\\\"})}},rI=class extends Nt{constructor(e){super(`Value \\\\`${typeof e==\\\"object\\\"?$y(e):e}\\\\` of type \\\\`${typeof e}\\\\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `\\\"0x${string}\\\"`.']}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidHexTypeError\\\"})}},nI=class extends Nt{constructor(e){super(`Value \\\\`${e}\\\\` is an invalid hex value.`,{metaMessages:['Hex values must start with `\\\"0x\\\"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidHexValueError\\\"})}},kee=class extends Nt{constructor(e){super(`Hex value \\\\`\\\"${e}\\\"\\\\` is an odd length (${e.length-2} nibbles).`,{metaMessages:[\\\"It must be an even length.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.InvalidLengthError\\\"})}},eI=class extends Nt{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed \\\\`${r}\\\\` bytes. Given size: \\\\`${e}\\\\` bytes.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SizeOverflowError\\\"})}},H3=class extends Nt{constructor({offset:e,position:r,size:n}){super(`Slice ${r===\\\"start\\\"?\\\"starting\\\":\\\"ending\\\"} at offset \\\\`${e}\\\\` is out-of-bounds (size: \\\\`${n}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SliceOffsetOutOfBoundsError\\\"})}},tI=class extends Nt{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\\\\`${e}\\\\`) exceeds padding size (\\\\`${r}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Hex.SizeExceedsPaddingSizeError\\\"})}}});function ugt(t){if(!(t instanceof Uint8Array)){if(!t)throw new W3(t);if(typeof t!=\\\"object\\\")throw new W3(t);if(!(\\\"BYTES_PER_ELEMENT\\\"in t))throw new W3(t);if(t.BYTES_PER_ELEMENT!==1||t.constructor.name!==\\\"Uint8Array\\\")throw new W3(t)}}function BL(...t){let e=0;for(let n of t)e+=n.length;let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function G3(t){return t instanceof Uint8Array?t:typeof t==\\\"string\\\"?lo(t):Mee(t)}function Mee(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function lo(t,e={}){let{size:r}=e,n=t;r&&(Rv(t,r),n=V3(t,r));let i=n.slice(2);i.length%2&&(i=`0${i}`);let s=i.length/2,o=new Uint8Array(s);for(let a=0,c=0;a<s;a++){let l=Iee(i.charCodeAt(c++)),d=Iee(i.charCodeAt(c++));if(l===void 0||d===void 0)throw new Nt(`Invalid byte sequence (\\\"${i[c-2]}${i[c-1]}\\\" in \\\"${i}\\\").`);o[a]=l*16+d}return o}function Dee(t,e){let r=As(t,e);return lo(r)}function K3(t,e={}){let{size:r}=e,n=lgt.encode(t);return typeof r==\\\"number\\\"?(YT(n,r),dgt(n,r)):n}function dgt(t,e){return DSe(t,{dir:\\\"right\\\",size:e})}function $Se(t){return crypto.getRandomValues(new Uint8Array(t))}function Iv(t){return t.length}function Lee(t,e,r,n={}){let{strict:i}=n;BSe(t,e);let s=t.slice(e,r);return i&&MSe(s,e,r),s}function Uee(t,e={}){let{size:r}=e;typeof r<\\\"u\\\"&&YT(t,r);let n=Xi(t,e);return NL(n,e)}function VSe(t){return LSe(t,{dir:\\\"right\\\"})}function WSe(t){try{return ugt(t),!0}catch{return!1}}var lgt,W3,IL,XT,RL,Uu=x(()=>{u();Ym();Rp();j3();Ree();Nee();lgt=new TextEncoder;W3=class extends Nt{constructor(e){super(`Value \\\\`${typeof e==\\\"object\\\"?$y(e):e}\\\\` of type \\\\`${typeof e}\\\\` is an invalid Bytes value.`,{metaMessages:[\\\"Bytes values must be of type `Bytes`.\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.InvalidBytesTypeError\\\"})}},IL=class extends Nt{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed \\\\`${r}\\\\` bytes. Given size: \\\\`${e}\\\\` bytes.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SizeOverflowError\\\"})}},XT=class extends Nt{constructor({offset:e,position:r,size:n}){super(`Slice ${r===\\\"start\\\"?\\\"starting\\\":\\\"ending\\\"} at offset \\\\`${e}\\\\` is out-of-bounds (size: \\\\`${n}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SliceOffsetOutOfBoundsError\\\"})}},RL=class extends Nt{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\\\\`${e}\\\\`) exceeds padding size (\\\\`${r}\\\\`).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Bytes.SizeExceedsPaddingSizeError\\\"})}}});function ML(t,e={}){let{as:r=typeof t==\\\"string\\\"?\\\"Hex\\\":\\\"Bytes\\\"}=e,n=Mg(G3(t));return r===\\\"Bytes\\\"?n:Xi(n)}function DL(t,e={}){let{as:r=typeof t==\\\"string\\\"?\\\"Hex\\\":\\\"Bytes\\\"}=e,n=nk(G3(t));return r===\\\"Bytes\\\"?n:Xi(n)}var LL=x(()=>{u();$S();nQ();Uu();Rp()});var UL,GSe=x(()=>{u();UL=class extends Map{constructor(e){super(),Object.defineProperty(this,\\\"maxSize\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let r=super.get(e);return super.has(e)&&r!==void 0&&(this.delete(e),super.set(e,r)),r}set(e,r){if(super.set(e,r),this.maxSize&&this.size>this.maxSize){let n=this.keys().next().value;n&&this.delete(n)}return this}}});var fgt,FL,jee=x(()=>{u();GSe();fgt={checksum:new UL(8192)},FL=fgt.checksum});var Pp={};ue(Pp,{InvalidCompressedPrefixError:()=>HL,InvalidError:()=>jL,InvalidPrefixError:()=>sI,InvalidSerializedSizeError:()=>zL,InvalidUncompressedPrefixError:()=>qL,assert:()=>$L,compress:()=>pgt,from:()=>Pv,fromBytes:()=>ZSe,fromHex:()=>Hee,toBytes:()=>qee,toHex:()=>VL,validate:()=>hgt});function $L(t,e={}){let{compressed:r}=e,{prefix:n,x:i,y:s}=t;if(r===!1||typeof i==\\\"bigint\\\"&&typeof s==\\\"bigint\\\"){if(n!==4)throw new sI({prefix:n,cause:new qL});return}if(r===!0||typeof i==\\\"bigint\\\"&&typeof s>\\\"u\\\"){if(n!==3&&n!==2)throw new sI({prefix:n,cause:new HL});return}throw new jL({publicKey:t})}function pgt(t){let{x:e,y:r}=t;return{prefix:r%2n===0n?2:3,x:e}}function Pv(t){let e=(()=>{if(kL(t))return Hee(t);if(WSe(t))return ZSe(t);let{prefix:r,x:n,y:i}=t;return typeof n==\\\"bigint\\\"&&typeof i==\\\"bigint\\\"?{prefix:r??4,x:n,y:i}:{prefix:r,x:n}})();return $L(e),e}function ZSe(t){return Hee(Xi(t))}function Hee(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new zL({publicKey:t});if(t.length===130){let n=BigInt(Fu(t,0,32)),i=BigInt(Fu(t,32,64));return{prefix:4,x:n,y:i}}if(t.length===132){let n=Number(Fu(t,0,1)),i=BigInt(Fu(t,1,33)),s=BigInt(Fu(t,33,65));return{prefix:n,x:i,y:s}}let e=Number(Fu(t,0,1)),r=BigInt(Fu(t,1,33));return{prefix:e,x:r}}function qee(t,e={}){return lo(VL(t,e))}function VL(t,e={}){$L(t);let{prefix:r,x:n,y:i}=t,{includePrefix:s=!0}=e;return nf(s?As(r,{size:1}):\\\"0x\\\",As(n,{size:32}),typeof i==\\\"bigint\\\"?As(i,{size:32}):\\\"0x\\\")}function hgt(t,e={}){try{return $L(t,e),!0}catch{return!1}}var jL,sI,HL,qL,zL,oI=x(()=>{u();Uu();Ym();Rp();j3();jL=class extends Nt{constructor({publicKey:e}){super(`Value \\\\`${$y(e)}\\\\` is not a valid public key.`,{metaMessages:[\\\"Public key must contain:\\\",\\\"- an `x` and `prefix` value (compressed)\\\",\\\"- an `x`, `y`, and `prefix` value (uncompressed)\\\"]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidError\\\"})}},sI=class extends Nt{constructor({prefix:e,cause:r}){super(`Prefix \\\"${e}\\\" is invalid.`,{cause:r}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidPrefixError\\\"})}},HL=class extends Nt{constructor(){super(\\\"Prefix must be 2 or 3 for compressed public keys.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidCompressedPrefixError\\\"})}},qL=class extends Nt{constructor(){super(\\\"Prefix must be 4 for uncompressed public keys.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidUncompressedPrefixError\\\"})}},zL=class extends Nt{constructor({publicKey:e}){super(`Value \\\\`${e}\\\\` is an invalid public key size.`,{metaMessages:[\\\"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\\\",`Received ${Ga(q3(e))} bytes.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"PublicKey.InvalidSerializedSizeError\\\"})}}});function Vee(t,e={}){let{strict:r=!0}=e;if(!mgt.test(t))throw new WL({address:t,cause:new zee});if(r){if(t.toLowerCase()===t)return;if(ggt(t)!==t)throw new WL({address:t,cause:new $ee})}}function ggt(t){if(FL.has(t))return FL.get(t);Vee(t,{strict:!1});let e=t.substring(2).toLowerCase(),r=ML(K3(e),{as:\\\"Bytes\\\"}),n=e.split(\\\"\\\");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(r[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join(\\\"\\\")}`;return FL.set(t,i),i}var mgt,WL,zee,$ee,Wee=x(()=>{u();Uu();jee();Ym();LL();mgt=/^0x[a-fA-F0-9]{40}$/;WL=class extends Nt{constructor({address:e,cause:r}){super(`Address \\\"${e}\\\" is invalid.`,{cause:r}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidAddressError\\\"})}},zee=class extends Nt{constructor(){super(\\\"Address is not a 20 byte (40 hexadecimal character) value.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidInputError\\\"})}},$ee=class extends Nt{constructor(){super(\\\"Address does not match its checksum counterpart.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Address.InvalidChecksumError\\\"})}}});var JSe=x(()=>{u()});var YSe,XSe,eAe,eqr,tqr,rqr,nqr,iqr,sqr,oqr,aqr,cqr,lqr,uqr,dqr,fqr,pqr,hqr,mqr,gqr,yqr,bqr,wqr,vqr,xqr,Eqr,_qr,Cqr,Sqr,Aqr,Tqr,Iqr,Rqr,Pqr,Oqr,Nqr,kqr,Bqr,Mqr,Dqr,Lqr,Uqr,Fqr,jqr,Hqr,qqr,zqr,$qr,Vqr,Wqr,Gqr,Kqr,Zqr,Qqr,Jqr,Yqr,Xqr,ezr,tzr,rzr,nzr,izr,szr,ozr,azr,czr,lzr,uzr,dzr,fzr,pzr,hzr,mzr,gzr,yzr,bzr,wzr,vzr,xzr,Ezr,_zr,Czr,Szr,Azr,Tzr,Izr,Rzr,Pzr,Ozr,Nzr,kzr,Bzr,Mzr,Dzr,Lzr,Uzr,Fzr,jzr,Gee,GL=x(()=>{u();YSe=/^(.*)\\\\[([0-9]*)\\\\]$/,XSe=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,eAe=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,eqr=2n**(8n-1n)-1n,tqr=2n**(16n-1n)-1n,rqr=2n**(24n-1n)-1n,nqr=2n**(32n-1n)-1n,iqr=2n**(40n-1n)-1n,sqr=2n**(48n-1n)-1n,oqr=2n**(56n-1n)-1n,aqr=2n**(64n-1n)-1n,cqr=2n**(72n-1n)-1n,lqr=2n**(80n-1n)-1n,uqr=2n**(88n-1n)-1n,dqr=2n**(96n-1n)-1n,fqr=2n**(104n-1n)-1n,pqr=2n**(112n-1n)-1n,hqr=2n**(120n-1n)-1n,mqr=2n**(128n-1n)-1n,gqr=2n**(136n-1n)-1n,yqr=2n**(144n-1n)-1n,bqr=2n**(152n-1n)-1n,wqr=2n**(160n-1n)-1n,vqr=2n**(168n-1n)-1n,xqr=2n**(176n-1n)-1n,Eqr=2n**(184n-1n)-1n,_qr=2n**(192n-1n)-1n,Cqr=2n**(200n-1n)-1n,Sqr=2n**(208n-1n)-1n,Aqr=2n**(216n-1n)-1n,Tqr=2n**(224n-1n)-1n,Iqr=2n**(232n-1n)-1n,Rqr=2n**(240n-1n)-1n,Pqr=2n**(248n-1n)-1n,Oqr=2n**(256n-1n)-1n,Nqr=-(2n**(8n-1n)),kqr=-(2n**(16n-1n)),Bqr=-(2n**(24n-1n)),Mqr=-(2n**(32n-1n)),Dqr=-(2n**(40n-1n)),Lqr=-(2n**(48n-1n)),Uqr=-(2n**(56n-1n)),Fqr=-(2n**(64n-1n)),jqr=-(2n**(72n-1n)),Hqr=-(2n**(80n-1n)),qqr=-(2n**(88n-1n)),zqr=-(2n**(96n-1n)),$qr=-(2n**(104n-1n)),Vqr=-(2n**(112n-1n)),Wqr=-(2n**(120n-1n)),Gqr=-(2n**(128n-1n)),Kqr=-(2n**(136n-1n)),Zqr=-(2n**(144n-1n)),Qqr=-(2n**(152n-1n)),Jqr=-(2n**(160n-1n)),Yqr=-(2n**(168n-1n)),Xqr=-(2n**(176n-1n)),ezr=-(2n**(184n-1n)),tzr=-(2n**(192n-1n)),rzr=-(2n**(200n-1n)),nzr=-(2n**(208n-1n)),izr=-(2n**(216n-1n)),szr=-(2n**(224n-1n)),ozr=-(2n**(232n-1n)),azr=-(2n**(240n-1n)),czr=-(2n**(248n-1n)),lzr=-(2n**(256n-1n)),uzr=2n**8n-1n,dzr=2n**16n-1n,fzr=2n**24n-1n,pzr=2n**32n-1n,hzr=2n**40n-1n,mzr=2n**48n-1n,gzr=2n**56n-1n,yzr=2n**64n-1n,bzr=2n**72n-1n,wzr=2n**80n-1n,vzr=2n**88n-1n,xzr=2n**96n-1n,Ezr=2n**104n-1n,_zr=2n**112n-1n,Czr=2n**120n-1n,Szr=2n**128n-1n,Azr=2n**136n-1n,Tzr=2n**144n-1n,Izr=2n**152n-1n,Rzr=2n**160n-1n,Pzr=2n**168n-1n,Ozr=2n**176n-1n,Nzr=2n**184n-1n,kzr=2n**192n-1n,Bzr=2n**200n-1n,Mzr=2n**208n-1n,Dzr=2n**216n-1n,Lzr=2n**224n-1n,Uzr=2n**232n-1n,Fzr=2n**240n-1n,jzr=2n**248n-1n,Gee=2n**256n-1n});function Zee(t,e){if(t.length!==e.length)throw new Jee({expectedLength:t.length,givenLength:e.length});let r=[];for(let n=0;n<t.length;n++){let i=t[n],s=e[n];r.push(Zee.encode(i,s))}return nf(...r)}var Qee,Jee,Yee,tAe=x(()=>{u();Wee();Ym();Rp();GL();(function(t){function e(r,n,i=!1){if(r===\\\"address\\\"){let c=n;return Vee(c),$3(c.toLowerCase(),i?32:0)}if(r===\\\"string\\\")return z3(n);if(r===\\\"bytes\\\")return n;if(r===\\\"bool\\\")return $3(Bee(n),i?32:1);let s=r.match(eAe);if(s){let[c,l,d=\\\"256\\\"]=s,f=Number.parseInt(d)/8;return As(n,{size:i?32:f,signed:l===\\\"int\\\"})}let o=r.match(XSe);if(o){let[c,l]=o;if(Number.parseInt(l)!==(n.length-2)/2)throw new Qee({expectedSize:Number.parseInt(l),value:n});return V3(n,i?32:0)}let a=r.match(YSe);if(a&&Array.isArray(n)){let[c,l]=a,d=[];for(let f=0;f<n.length;f++)d.push(e(l,n[f],!0));return d.length===0?\\\"0x\\\":nf(...d)}throw new Yee(r)}t.encode=e})(Zee||(Zee={}));Qee=class extends Nt{constructor({expectedSize:e,value:r}){super(`Size of bytes \\\"${r}\\\" (bytes${Ga(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.BytesSizeMismatchError\\\"})}},Jee=class extends Nt{constructor({expectedLength:e,givenLength:r}){super([\\\"ABI encoding parameters/values length mismatch.\\\",`Expected length (parameters): ${e}`,`Given length (values): ${r}`].join(`\\n`)),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.LengthMismatchError\\\"})}},Yee=class extends Nt{constructor(e){super(`Type \\\\`${e}\\\\` is not a valid ABI Type.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"AbiParameters.InvalidTypeError\\\"})}}});var rAe=x(()=>{u()});var nAe=x(()=>{u()});var iAe=x(()=>{u()});var sAe=x(()=>{u()});var oAe=x(()=>{u()});var aAe=x(()=>{u()});var cAe=x(()=>{u()});var lAe=x(()=>{u()});function ju(t,e){let r=t%e;return r>=Za?r:e+r}function Il(t,e,r){let n=t;for(;e-- >Za;)n*=n,n%=r;return n}function uAe(t,e){if(t===Za)throw new Error(\\\"invert: expected non-zero number\\\");if(e<=Za)throw new Error(\\\"invert: expected positive modulus, got \\\"+e);let r=ju(t,e),n=e,i=Za,s=xa,o=xa,a=Za;for(;r!==Za;){let l=n/r,d=n%r,f=i-o*l,p=s-a*l;n=r,r=d,i=o,s=a,o=f,a=p}if(n!==xa)throw new Error(\\\"invert: does not exist\\\");return ju(i,e)}function Xee(t,e,r){if(!t.eql(t.sqr(e),r))throw new Error(\\\"Cannot find square root\\\")}function yAe(t,e){let r=(t.ORDER+xa)/pAe,n=t.pow(e,r);return Xee(t,n,e),n}function Igt(t,e){let r=(t.ORDER-hAe)/mAe,n=t.mul(e,Ov),i=t.pow(n,r),s=t.mul(e,i),o=t.mul(t.mul(s,Ov),i),a=t.mul(s,t.sub(o,t.ONE));return Xee(t,a,e),a}function Rgt(t){let e=Hu(t),r=bAe(t),n=r(e,e.neg(e.ONE)),i=r(e,n),s=r(e,e.neg(n)),o=(t+Agt)/gAe;return(a,c)=>{let l=a.pow(c,o),d=a.mul(l,n),f=a.mul(l,i),p=a.mul(l,s),h=a.eql(a.sqr(d),c),m=a.eql(a.sqr(f),c);l=a.cmov(l,d,h),d=a.cmov(p,f,m);let g=a.eql(a.sqr(d),c),w=a.cmov(l,d,g);return Xee(a,w,c),w}}function bAe(t){if(t<fAe)throw new Error(\\\"sqrt is not defined for small field\\\");let e=t-xa,r=0;for(;e%Ov===Za;)e/=Ov,r++;let n=Ov,i=Hu(t);for(;dAe(i,n)===1;)if(n++>1e3)throw new Error(\\\"Cannot find square root: probably non-prime P\\\");if(r===1)return yAe;let s=i.pow(n,e),o=(e+xa)/Ov;return function(c,l){if(c.is0(l))return l;if(dAe(c,l)!==1)throw new Error(\\\"Cannot find square root\\\");let d=r,f=c.mul(c.ONE,s),p=c.pow(l,e),h=c.pow(l,o);for(;!c.eql(p,c.ONE);){if(c.is0(p))return c.ZERO;let m=1,g=c.sqr(p);for(;!c.eql(g,c.ONE);)if(m++,g=c.sqr(g),m===d)throw new Error(\\\"Cannot find square root\\\");let w=xa<<BigInt(d-m-1),v=c.pow(f,w);d=m,f=c.sqr(v),p=c.mul(p,f),h=c.mul(h,v)}return h}}function Pgt(t){return t%pAe===fAe?yAe:t%mAe===hAe?Igt:t%gAe===Tgt?Rgt(t):bAe(t)}function ete(t){let e={ORDER:\\\"bigint\\\",MASK:\\\"bigint\\\",BYTES:\\\"number\\\",BITS:\\\"number\\\"},r=Ogt.reduce((n,i)=>(n[i]=\\\"function\\\",n),e);return ZT(t,r),t}function Ngt(t,e,r){if(r<Za)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r===Za)return t.ONE;if(r===xa)return e;let n=t.ONE,i=e;for(;r>Za;)r&xa&&(n=t.mul(n,i)),i=t.sqr(i),r>>=xa;return n}function KL(t,e,r=!1){let n=new Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((o,a,c)=>t.is0(a)?o:(n[c]=o,t.mul(o,a)),t.ONE),s=t.inv(i);return e.reduceRight((o,a,c)=>t.is0(a)?o:(n[c]=t.mul(o,n[c]),t.mul(o,a)),s),n}function dAe(t,e){let r=(t.ORDER-xa)/Ov,n=t.pow(e,r),i=t.eql(n,t.ONE),s=t.eql(n,t.ZERO),o=t.eql(n,t.neg(t.ONE));if(!i&&!s&&!o)throw new Error(\\\"invalid Legendre symbol result\\\");return i?1:s?0:-1}function ZL(t,e){e!==void 0&&kd(e);let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Hu(t,e,r=!1,n={}){if(t<=Za)throw new Error(\\\"invalid field: expected ORDER > 0, got \\\"+t);let i,s,o=!1,a;if(typeof e==\\\"object\\\"&&e!=null){if(n.sqrt||r)throw new Error(\\\"cannot specify opts in two arguments\\\");let p=e;p.BITS&&(i=p.BITS),p.sqrt&&(s=p.sqrt),typeof p.isLE==\\\"boolean\\\"&&(r=p.isLE),typeof p.modFromBytes==\\\"boolean\\\"&&(o=p.modFromBytes),a=p.allowedLengths}else typeof e==\\\"number\\\"&&(i=e),n.sqrt&&(s=n.sqrt);let{nBitLength:c,nByteLength:l}=ZL(t,i);if(l>2048)throw new Error(\\\"invalid field: expected ORDER of <= 2048 bytes\\\");let d,f=Object.freeze({ORDER:t,isLE:r,BITS:c,BYTES:l,MASK:Xm(c),ZERO:Za,ONE:xa,allowedLengths:a,create:p=>ju(p,t),isValid:p=>{if(typeof p!=\\\"bigint\\\")throw new Error(\\\"invalid field element: expected bigint, got \\\"+typeof p);return Za<=p&&p<t},is0:p=>p===Za,isValidNot0:p=>!f.is0(p)&&f.isValid(p),isOdd:p=>(p&xa)===xa,neg:p=>ju(-p,t),eql:(p,h)=>p===h,sqr:p=>ju(p*p,t),add:(p,h)=>ju(p+h,t),sub:(p,h)=>ju(p-h,t),mul:(p,h)=>ju(p*h,t),pow:(p,h)=>Ngt(f,p,h),div:(p,h)=>ju(p*uAe(h,t),t),sqrN:p=>p*p,addN:(p,h)=>p+h,subN:(p,h)=>p-h,mulN:(p,h)=>p*h,inv:p=>uAe(p,t),sqrt:s||(p=>(d||(d=Pgt(t)),d(f,p))),toBytes:p=>r?AL(p,l):GT(p,l),fromBytes:(p,h=!0)=>{if(a){if(!a.includes(p.length)||p.length>l)throw new Error(\\\"Field.fromBytes: expected \\\"+a+\\\" bytes, got \\\"+p.length);let g=new Uint8Array(l);g.set(p,r?0:g.length-p.length),p=g}if(p.length!==l)throw new Error(\\\"Field.fromBytes: expected \\\"+l+\\\" bytes, got \\\"+p.length);let m=r?SL(p):Tv(p);if(o&&(m=ju(m,t)),!h&&!f.isValid(m))throw new Error(\\\"invalid field element: outside of range 0..ORDER\\\");return m},invertBatch:p=>KL(f,p),cmov:(p,h,m)=>m?h:p});return Object.freeze(f)}function wAe(t){if(typeof t!=\\\"bigint\\\")throw new Error(\\\"field order must be bigint\\\");let e=t.toString(2).length;return Math.ceil(e/8)}function tte(t){let e=wAe(t);return e+Math.ceil(e/2)}function rte(t,e,r=!1){let n=t.length,i=wAe(e),s=tte(e);if(n<16||n<s||n>1024)throw new Error(\\\"expected \\\"+s+\\\"-1024 bytes of input, got \\\"+n);let o=r?SL(t):Tv(t),a=ju(o,e-xa)+xa;return r?AL(a,i):GT(a,i)}var Za,xa,Ov,fAe,pAe,hAe,Agt,mAe,Tgt,gAe,Ogt,aI=x(()=>{u();QT();Za=BigInt(0),xa=BigInt(1),Ov=BigInt(2),fAe=BigInt(3),pAe=BigInt(4),hAe=BigInt(5),Agt=BigInt(7),mAe=BigInt(8),Tgt=BigInt(9),gAe=BigInt(16);Ogt=[\\\"create\\\",\\\"isValid\\\",\\\"is0\\\",\\\"neg\\\",\\\"inv\\\",\\\"sqrt\\\",\\\"sqr\\\",\\\"eql\\\",\\\"add\\\",\\\"sub\\\",\\\"mul\\\",\\\"pow\\\",\\\"div\\\",\\\"addN\\\",\\\"subN\\\",\\\"mulN\\\",\\\"sqrN\\\"]});function cI(t,e){let r=e.negate();return t?r:e}function JL(t,e){let r=KL(t.Fp,e.map(n=>n.Z));return e.map((n,i)=>t.fromAffine(n.toAffine(r[i])))}function _Ae(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error(\\\"invalid window size, expected [1..\\\"+e+\\\"], got W=\\\"+t)}function nte(t,e){_Ae(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,s=Xm(t),o=BigInt(t);return{windows:r,windowSize:n,mask:s,maxNumber:i,shiftBy:o}}function vAe(t,e,r){let{windowSize:n,mask:i,maxNumber:s,shiftBy:o}=r,a=Number(t&i),c=t>>o;a>n&&(a-=s,c+=Nv);let l=e*n,d=l+Math.abs(a)-1,f=a===0,p=a<0,h=e%2!==0;return{nextN:c,offset:d,isZero:f,isNeg:p,isNegF:h,offsetF:l}}function kgt(t,e){if(!Array.isArray(t))throw new Error(\\\"array expected\\\");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error(\\\"invalid point at index \\\"+n)})}function Bgt(t,e){if(!Array.isArray(t))throw new Error(\\\"array of scalars expected\\\");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error(\\\"invalid scalar at index \\\"+n)})}function ste(t){return CAe.get(t)||1}function xAe(t){if(t!==Z3)throw new Error(\\\"invalid wNAF\\\")}function SAe(t,e,r,n){let i=e,s=t.ZERO,o=t.ZERO;for(;r>Z3||n>Z3;)r&Nv&&(s=s.add(i)),n&Nv&&(o=o.add(i)),i=i.double(),r>>=Nv,n>>=Nv;return{p1:s,p2:o}}function AAe(t,e,r,n){kgt(r,t),Bgt(n,e);let i=r.length,s=n.length;if(i!==s)throw new Error(\\\"arrays of points and scalars must have equal length\\\");let o=t.ZERO,a=KT(BigInt(i)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let l=Xm(c),d=new Array(Number(l)+1).fill(o),f=Math.floor((e.BITS-1)/c)*c,p=o;for(let h=f;h>=0;h-=c){d.fill(o);for(let g=0;g<s;g++){let w=n[g],v=Number(w>>BigInt(h)&l);d[v]=d[v].add(r[g])}let m=o;for(let g=d.length-1,w=o;g>0;g--)w=w.add(d[g]),m=m.add(w);if(p=p.add(m),h!==0)for(let g=0;g<c;g++)p=p.double()}return p}function EAe(t,e,r){if(e){if(e.ORDER!==t)throw new Error(\\\"Field.ORDER must match order: Fp == p, Fn == n\\\");return ete(e),e}else return Hu(t,{isLE:r})}function TAe(t,e,r={},n){if(n===void 0&&(n=t===\\\"edwards\\\"),!e||typeof e!=\\\"object\\\")throw new Error(`expected valid ${t} CURVE object`);for(let c of[\\\"p\\\",\\\"n\\\",\\\"h\\\"]){let l=e[c];if(!(typeof l==\\\"bigint\\\"&&l>Z3))throw new Error(`CURVE.${c} must be positive bigint`)}let i=EAe(e.p,r.Fp,n),s=EAe(e.n,r.Fn,n),a=[\\\"Gx\\\",\\\"Gy\\\",\\\"a\\\",t===\\\"weierstrass\\\"?\\\"b\\\":\\\"d\\\"];for(let c of a)if(!i.isValid(e[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return e=Object.freeze(Object.assign({},e)),{CURVE:e,Fp:i,Fn:s}}var Z3,Nv,ite,CAe,QL,IAe=x(()=>{u();QT();aI();Z3=BigInt(0),Nv=BigInt(1);ite=new WeakMap,CAe=new WeakMap;QL=class{constructor(e,r){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=r}_unsafeLadder(e,r,n=this.ZERO){let i=e;for(;r>Z3;)r&Nv&&(n=n.add(i)),i=i.double(),r>>=Nv;return n}precomputeWindow(e,r){let{windows:n,windowSize:i}=nte(r,this.bits),s=[],o=e,a=o;for(let c=0;c<n;c++){a=o,s.push(a);for(let l=1;l<i;l++)a=a.add(o),s.push(a);o=a.double()}return s}wNAF(e,r,n){if(!this.Fn.isValid(n))throw new Error(\\\"invalid scalar\\\");let i=this.ZERO,s=this.BASE,o=nte(e,this.bits);for(let a=0;a<o.windows;a++){let{nextN:c,offset:l,isZero:d,isNeg:f,isNegF:p,offsetF:h}=vAe(n,a,o);n=c,d?s=s.add(cI(p,r[h])):i=i.add(cI(f,r[l]))}return xAe(n),{p:i,f:s}}wNAFUnsafe(e,r,n,i=this.ZERO){let s=nte(e,this.bits);for(let o=0;o<s.windows&&n!==Z3;o++){let{nextN:a,offset:c,isZero:l,isNeg:d}=vAe(n,o,s);if(n=a,!l){let f=r[c];i=i.add(d?f.negate():f)}}return xAe(n),i}getPrecomputes(e,r,n){let i=ite.get(r);return i||(i=this.precomputeWindow(r,e),e!==1&&(typeof n==\\\"function\\\"&&(i=n(i)),ite.set(r,i))),i}cached(e,r,n){let i=ste(e);return this.wNAF(i,this.getPrecomputes(i,e,n),r)}unsafe(e,r,n,i){let s=ste(e);return s===1?this._unsafeLadder(e,r,i):this.wNAFUnsafe(s,this.getPrecomputes(s,e,n),r,i)}createCache(e,r){_Ae(r,this.bits),CAe.set(e,r),ite.delete(e)}hasCache(e){return ste(e)!==1}}});function Mgt(t,e,r){let[[n,i],[s,o]]=e,a=RAe(o*t,r),c=RAe(-i*t,r),l=t-a*n-c*s,d=-a*i-c*o,f=l<r0,p=d<r0;f&&(l=-l),p&&(d=-d);let h=Xm(Math.ceil(KT(r)/2))+J3;if(l<r0||l>=h||d<r0||d>=h)throw new Error(\\\"splitScalar (endomorphism): failed, k=\\\"+t);return{k1neg:f,k1:l,k2neg:p,k2:d}}function ate(t){if(![\\\"compact\\\",\\\"recovered\\\",\\\"der\\\"].includes(t))throw new Error('Signature format must be \\\"compact\\\", \\\"recovered\\\", or \\\"der\\\"');return t}function ote(t,e){let r={};for(let n of Object.keys(e))r[n]=t[n]===void 0?e[n]:t[n];return WT(r.lowS,\\\"lowS\\\"),WT(r.prehash,\\\"prehash\\\"),r.format!==void 0&&ate(r.format),r}function Q3(t,e){let{BYTES:r}=t,n;if(typeof e==\\\"bigint\\\")n=e;else{let i=Ho(\\\"private key\\\",e);try{n=t.fromBytes(i)}catch{throw new Error(`invalid private key: expected ui8a of size ${r}, got ${typeof e}`)}}if(!t.isValidNot0(n))throw new Error(\\\"invalid private key: out of range [1..N-1]\\\");return n}function Lgt(t,e={}){let r=TAe(\\\"weierstrass\\\",t,e),{Fp:n,Fn:i}=r,s=r.CURVE,{h:o,n:a}=s;ZT(e,{},{allowInfinityPoint:\\\"boolean\\\",clearCofactor:\\\"function\\\",isTorsionFree:\\\"function\\\",fromBytes:\\\"function\\\",toBytes:\\\"function\\\",endo:\\\"object\\\",wrapPrivateKey:\\\"boolean\\\"});let{endo:c}=e;if(c&&(!n.is0(s.a)||typeof c.beta!=\\\"bigint\\\"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected \\\"beta\\\": bigint and \\\"basises\\\": array');let l=NAe(n,i);function d(){if(!n.isOdd)throw new Error(\\\"compression is not supported: Field does not have .isOdd()\\\")}function f(F,R,y){let{x:E,y:C}=R.toAffine(),I=n.toBytes(E);if(WT(y,\\\"isCompressed\\\"),y){d();let P=!n.isOdd(C);return Ec(OAe(P),I)}else return Ec(Uint8Array.of(4),I,n.toBytes(C))}function p(F){zy(F,void 0,\\\"Point\\\");let{publicKey:R,publicKeyUncompressed:y}=l,E=F.length,C=F[0],I=F.subarray(1);if(E===R&&(C===2||C===3)){let P=n.fromBytes(I);if(!n.isValid(P))throw new Error(\\\"bad point: is not on curve, wrong x\\\");let k=g(P),U;try{U=n.sqrt(k)}catch(j){let K=j instanceof Error?\\\": \\\"+j.message:\\\"\\\";throw new Error(\\\"bad point: is not on curve, sqrt error\\\"+K)}d();let D=n.isOdd(U);return(C&1)===1!==D&&(U=n.neg(U)),{x:P,y:U}}else if(E===y&&C===4){let P=n.BYTES,k=n.fromBytes(I.subarray(0,P)),U=n.fromBytes(I.subarray(P,P*2));if(!w(k,U))throw new Error(\\\"bad point: is not on curve\\\");return{x:k,y:U}}else throw new Error(`bad point: got length ${E}, expected compressed=${R} or uncompressed=${y}`)}let h=e.toBytes||f,m=e.fromBytes||p;function g(F){let R=n.sqr(F),y=n.mul(R,F);return n.add(n.add(y,n.mul(F,s.a)),s.b)}function w(F,R){let y=n.sqr(R),E=g(F);return n.eql(y,E)}if(!w(s.Gx,s.Gy))throw new Error(\\\"bad curve params: generator point\\\");let v=n.mul(n.pow(s.a,YL),Dgt),b=n.mul(n.sqr(s.b),BigInt(27));if(n.is0(n.add(v,b)))throw new Error(\\\"bad curve params: a or b\\\");function _(F,R,y=!1){if(!n.isValid(R)||y&&n.is0(R))throw new Error(`bad point coordinate ${F}`);return R}function S(F){if(!(F instanceof B))throw new Error(\\\"ProjectivePoint expected\\\")}function T(F){if(!c||!c.basises)throw new Error(\\\"no endo\\\");return Mgt(F,c.basises,i.ORDER)}let N=TL((F,R)=>{let{X:y,Y:E,Z:C}=F;if(n.eql(C,n.ONE))return{x:y,y:E};let I=F.is0();R==null&&(R=I?n.ONE:n.inv(C));let P=n.mul(y,R),k=n.mul(E,R),U=n.mul(C,R);if(I)return{x:n.ZERO,y:n.ZERO};if(!n.eql(U,n.ONE))throw new Error(\\\"invZ was invalid\\\");return{x:P,y:k}}),O=TL(F=>{if(F.is0()){if(e.allowInfinityPoint&&!n.is0(F.Y))return;throw new Error(\\\"bad point: ZERO\\\")}let{x:R,y}=F.toAffine();if(!n.isValid(R)||!n.isValid(y))throw new Error(\\\"bad point: x or y not field elements\\\");if(!w(R,y))throw new Error(\\\"bad point: equation left != right\\\");if(!F.isTorsionFree())throw new Error(\\\"bad point: not in prime-order subgroup\\\");return!0});function L(F,R,y,E,C){return y=new B(n.mul(y.X,F),y.Y,y.Z),R=cI(E,R),y=cI(C,y),R.add(y)}class B{constructor(R,y,E){this.X=_(\\\"x\\\",R),this.Y=_(\\\"y\\\",y,!0),this.Z=_(\\\"z\\\",E),Object.freeze(this)}static CURVE(){return s}static fromAffine(R){let{x:y,y:E}=R||{};if(!R||!n.isValid(y)||!n.isValid(E))throw new Error(\\\"invalid affine point\\\");if(R instanceof B)throw new Error(\\\"projective point not allowed\\\");return n.is0(y)&&n.is0(E)?B.ZERO:new B(y,E,n.ONE)}static fromBytes(R){let y=B.fromAffine(m(zy(R,void 0,\\\"point\\\")));return y.assertValidity(),y}static fromHex(R){return B.fromBytes(Ho(\\\"pointHex\\\",R))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(R=8,y=!0){return M.createCache(this,R),y||this.multiply(YL),this}assertValidity(){O(this)}hasEvenY(){let{y:R}=this.toAffine();if(!n.isOdd)throw new Error(\\\"Field doesn't support isOdd\\\");return!n.isOdd(R)}equals(R){S(R);let{X:y,Y:E,Z:C}=this,{X:I,Y:P,Z:k}=R,U=n.eql(n.mul(y,k),n.mul(I,C)),D=n.eql(n.mul(E,k),n.mul(P,C));return U&&D}negate(){return new B(this.X,n.neg(this.Y),this.Z)}double(){let{a:R,b:y}=s,E=n.mul(y,YL),{X:C,Y:I,Z:P}=this,k=n.ZERO,U=n.ZERO,D=n.ZERO,A=n.mul(C,C),j=n.mul(I,I),K=n.mul(P,P),J=n.mul(C,I);return J=n.add(J,J),D=n.mul(C,P),D=n.add(D,D),k=n.mul(R,D),U=n.mul(E,K),U=n.add(k,U),k=n.sub(j,U),U=n.add(j,U),U=n.mul(k,U),k=n.mul(J,k),D=n.mul(E,D),K=n.mul(R,K),J=n.sub(A,K),J=n.mul(R,J),J=n.add(J,D),D=n.add(A,A),A=n.add(D,A),A=n.add(A,K),A=n.mul(A,J),U=n.add(U,A),K=n.mul(I,P),K=n.add(K,K),A=n.mul(K,J),k=n.sub(k,A),D=n.mul(K,j),D=n.add(D,D),D=n.add(D,D),new B(k,U,D)}add(R){S(R);let{X:y,Y:E,Z:C}=this,{X:I,Y:P,Z:k}=R,U=n.ZERO,D=n.ZERO,A=n.ZERO,j=s.a,K=n.mul(s.b,YL),J=n.mul(y,I),X=n.mul(E,P),re=n.mul(C,k),fe=n.add(y,E),ce=n.add(I,P);fe=n.mul(fe,ce),ce=n.add(J,X),fe=n.sub(fe,ce),ce=n.add(y,C);let We=n.add(I,k);return ce=n.mul(ce,We),We=n.add(J,re),ce=n.sub(ce,We),We=n.add(E,C),U=n.add(P,k),We=n.mul(We,U),U=n.add(X,re),We=n.sub(We,U),A=n.mul(j,ce),U=n.mul(K,re),A=n.add(U,A),U=n.sub(X,A),A=n.add(X,A),D=n.mul(U,A),X=n.add(J,J),X=n.add(X,J),re=n.mul(j,re),ce=n.mul(K,ce),X=n.add(X,re),re=n.sub(J,re),re=n.mul(j,re),ce=n.add(ce,re),J=n.mul(X,ce),D=n.add(D,J),J=n.mul(We,ce),U=n.mul(fe,U),U=n.sub(U,J),J=n.mul(fe,X),A=n.mul(We,A),A=n.add(A,J),new B(U,D,A)}subtract(R){return this.add(R.negate())}is0(){return this.equals(B.ZERO)}multiply(R){let{endo:y}=e;if(!i.isValidNot0(R))throw new Error(\\\"invalid scalar: out of range\\\");let E,C,I=P=>M.cached(this,P,k=>JL(B,k));if(y){let{k1neg:P,k1:k,k2neg:U,k2:D}=T(R),{p:A,f:j}=I(k),{p:K,f:J}=I(D);C=j.add(J),E=L(y.beta,A,K,P,U)}else{let{p:P,f:k}=I(R);E=P,C=k}return JL(B,[E,C])[0]}multiplyUnsafe(R){let{endo:y}=e,E=this;if(!i.isValid(R))throw new Error(\\\"invalid scalar: out of range\\\");if(R===r0||E.is0())return B.ZERO;if(R===J3)return E;if(M.hasCache(this))return this.multiply(R);if(y){let{k1neg:C,k1:I,k2neg:P,k2:k}=T(R),{p1:U,p2:D}=SAe(B,E,I,k);return L(y.beta,U,D,C,P)}else return M.unsafe(E,R)}multiplyAndAddUnsafe(R,y,E){let C=this.multiplyUnsafe(y).add(R.multiplyUnsafe(E));return C.is0()?void 0:C}toAffine(R){return N(this,R)}isTorsionFree(){let{isTorsionFree:R}=e;return o===J3?!0:R?R(B,this):M.unsafe(this,a).is0()}clearCofactor(){let{clearCofactor:R}=e;return o===J3?this:R?R(B,this):this.multiplyUnsafe(o)}isSmallOrder(){return this.multiplyUnsafe(o).is0()}toBytes(R=!0){return WT(R,\\\"isCompressed\\\"),this.assertValidity(),h(B,this,R)}toHex(R=!0){return Yf(this.toBytes(R))}toString(){return`<Point ${this.is0()?\\\"ZERO\\\":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(R=!0){return this.toBytes(R)}_setWindowSize(R){this.precompute(R)}static normalizeZ(R){return JL(B,R)}static msm(R,y){return AAe(B,i,R,y)}static fromPrivateKey(R){return B.BASE.multiply(Q3(i,R))}}B.BASE=new B(s.Gx,s.Gy,n.ONE),B.ZERO=new B(n.ZERO,n.ONE,n.ZERO),B.Fp=n,B.Fn=i;let H=i.BITS,M=new QL(B,e.endo?Math.ceil(H/2):H);return B.BASE.precompute(8),B}function OAe(t){return Uint8Array.of(t?2:3)}function NAe(t,e){return{secretKey:e.BYTES,publicKey:1+t.BYTES,publicKeyUncompressed:1+2*t.BYTES,publicKeyHasPrefix:!0,signature:2*e.BYTES}}function Ugt(t,e={}){let{Fn:r}=t,n=e.randomBytes||am,i=Object.assign(NAe(t.Fp,r),{seed:tte(r.ORDER)});function s(h){try{return!!Q3(r,h)}catch{return!1}}function o(h,m){let{publicKey:g,publicKeyUncompressed:w}=i;try{let v=h.length;return m===!0&&v!==g||m===!1&&v!==w?!1:!!t.fromBytes(h)}catch{return!1}}function a(h=n(i.seed)){return rte(zy(h,i.seed,\\\"seed\\\"),r.ORDER)}function c(h,m=!0){return t.BASE.multiply(Q3(r,h)).toBytes(m)}function l(h){let m=a(h);return{secretKey:m,publicKey:c(m)}}function d(h){if(typeof h==\\\"bigint\\\")return!1;if(h instanceof t)return!0;let{secretKey:m,publicKey:g,publicKeyUncompressed:w}=i;if(r.allowedLengths||m===g)return;let v=Ho(\\\"key\\\",h).length;return v===g||v===w}function f(h,m,g=!0){if(d(h)===!0)throw new Error(\\\"first arg must be private key\\\");if(d(m)===!1)throw new Error(\\\"second arg must be public key\\\");let w=Q3(r,h);return t.fromHex(m).multiply(w).toBytes(g)}return Object.freeze({getPublicKey:c,getSharedSecret:f,keygen:l,Point:t,utils:{isValidSecretKey:s,isValidPublicKey:o,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:h=>Q3(r,h),precompute(h=8,m=t.BASE){return m.precompute(h,!1)}},lengths:i})}function Fgt(t,e,r={}){pN(e),ZT(r,{},{hmac:\\\"function\\\",lowS:\\\"boolean\\\",randomBytes:\\\"function\\\",bits2int:\\\"function\\\",bits2int_modN:\\\"function\\\"});let n=r.randomBytes||am,i=r.hmac||((y,...E)=>eA(e,y,Ec(...E))),{Fp:s,Fn:o}=t,{ORDER:a,BITS:c}=o,{keygen:l,getPublicKey:d,getSharedSecret:f,utils:p,lengths:h}=Ugt(t,r),m={prehash:!1,lowS:typeof r.lowS==\\\"boolean\\\"?r.lowS:!1,format:void 0,extraEntropy:!1},g=\\\"compact\\\";function w(y){let E=a>>J3;return y>E}function v(y,E){if(!o.isValidNot0(E))throw new Error(`invalid signature ${y}: out of range 1..Point.Fn.ORDER`);return E}function b(y,E){ate(E);let C=h.signature,I=E===\\\"compact\\\"?C:E===\\\"recovered\\\"?C+1:void 0;return zy(y,I,`${E} signature`)}class _{constructor(E,C,I){this.r=v(\\\"r\\\",E),this.s=v(\\\"s\\\",C),I!=null&&(this.recovery=I),Object.freeze(this)}static fromBytes(E,C=g){b(E,C);let I;if(C===\\\"der\\\"){let{r:D,s:A}=t0.toSig(zy(E));return new _(D,A)}C===\\\"recovered\\\"&&(I=E[0],C=\\\"compact\\\",E=E.subarray(1));let P=o.BYTES,k=E.subarray(0,P),U=E.subarray(P,P*2);return new _(o.fromBytes(k),o.fromBytes(U),I)}static fromHex(E,C){return this.fromBytes(Bg(E),C)}addRecoveryBit(E){return new _(this.r,this.s,E)}recoverPublicKey(E){let C=s.ORDER,{r:I,s:P,recovery:k}=this;if(k==null||![0,1,2,3].includes(k))throw new Error(\\\"recovery id invalid\\\");if(a*PAe<C&&k>1)throw new Error(\\\"recovery id is ambiguous for h>1 curve\\\");let D=k===2||k===3?I+a:I;if(!s.isValid(D))throw new Error(\\\"recovery id 2 or 3 invalid\\\");let A=s.toBytes(D),j=t.fromBytes(Ec(OAe((k&1)===0),A)),K=o.inv(D),J=T(Ho(\\\"msgHash\\\",E)),X=o.create(-J*K),re=o.create(P*K),fe=t.BASE.multiplyUnsafe(X).add(j.multiplyUnsafe(re));if(fe.is0())throw new Error(\\\"point at infinify\\\");return fe.assertValidity(),fe}hasHighS(){return w(this.s)}toBytes(E=g){if(ate(E),E===\\\"der\\\")return Bg(t0.hexFromSig(this));let C=o.toBytes(this.r),I=o.toBytes(this.s);if(E===\\\"recovered\\\"){if(this.recovery==null)throw new Error(\\\"recovery bit must be present\\\");return Ec(Uint8Array.of(this.recovery),C,I)}return Ec(C,I)}toHex(E){return Yf(this.toBytes(E))}assertValidity(){}static fromCompact(E){return _.fromBytes(Ho(\\\"sig\\\",E),\\\"compact\\\")}static fromDER(E){return _.fromBytes(Ho(\\\"sig\\\",E),\\\"der\\\")}normalizeS(){return this.hasHighS()?new _(this.r,o.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes(\\\"der\\\")}toDERHex(){return Yf(this.toBytes(\\\"der\\\"))}toCompactRawBytes(){return this.toBytes(\\\"compact\\\")}toCompactHex(){return Yf(this.toBytes(\\\"compact\\\"))}}let S=r.bits2int||function(E){if(E.length>8192)throw new Error(\\\"input is too large\\\");let C=Tv(E),I=E.length*8-c;return I>0?C>>BigInt(I):C},T=r.bits2int_modN||function(E){return o.create(S(E))},N=Xm(c);function O(y){return Aee(\\\"num < 2^\\\"+c,y,r0,N),o.toBytes(y)}function L(y,E){return zy(y,void 0,\\\"message\\\"),E?zy(e(y),void 0,\\\"prehashed message\\\"):y}function B(y,E,C){if([\\\"recovered\\\",\\\"canonical\\\"].some(X=>X in C))throw new Error(\\\"sign() legacy options not supported\\\");let{lowS:I,prehash:P,extraEntropy:k}=ote(C,m);y=L(y,P);let U=T(y),D=Q3(o,E),A=[O(D),O(U)];if(k!=null&&k!==!1){let X=k===!0?n(h.secretKey):k;A.push(Ho(\\\"extraEntropy\\\",X))}let j=Ec(...A),K=U;function J(X){let re=S(X);if(!o.isValidNot0(re))return;let fe=o.inv(re),ce=t.BASE.multiply(re).toAffine(),We=o.create(ce.x);if(We===r0)return;let Ue=o.create(fe*o.create(K+We*D));if(Ue===r0)return;let je=(ce.x===We?0:2)|Number(ce.y&J3),Lt=Ue;return I&&w(Ue)&&(Lt=o.neg(Ue),je^=1),new _(We,Lt,je)}return{seed:j,k2sig:J}}function H(y,E,C={}){y=Ho(\\\"message\\\",y);let{seed:I,k2sig:P}=B(y,E,C);return Tee(e.outputLen,o.BYTES,i)(I,P)}function M(y){let E,C=typeof y==\\\"string\\\"||kg(y),I=!C&&y!==null&&typeof y==\\\"object\\\"&&typeof y.r==\\\"bigint\\\"&&typeof y.s==\\\"bigint\\\";if(!C&&!I)throw new Error(\\\"invalid signature, expected Uint8Array, hex string or Signature instance\\\");if(I)E=new _(y.r,y.s);else if(C){try{E=_.fromBytes(Ho(\\\"sig\\\",y),\\\"der\\\")}catch(P){if(!(P instanceof t0.Err))throw P}if(!E)try{E=_.fromBytes(Ho(\\\"sig\\\",y),\\\"compact\\\")}catch{return!1}}return E||!1}function F(y,E,C,I={}){let{lowS:P,prehash:k,format:U}=ote(I,m);if(C=Ho(\\\"publicKey\\\",C),E=L(Ho(\\\"message\\\",E),k),\\\"strict\\\"in I)throw new Error(\\\"options.strict was renamed to lowS\\\");let D=U===void 0?M(y):_.fromBytes(Ho(\\\"sig\\\",y),U);if(D===!1)return!1;try{let A=t.fromBytes(C);if(P&&D.hasHighS())return!1;let{r:j,s:K}=D,J=T(E),X=o.inv(K),re=o.create(J*X),fe=o.create(j*X),ce=t.BASE.multiplyUnsafe(re).add(A.multiplyUnsafe(fe));return ce.is0()?!1:o.create(ce.x)===j}catch{return!1}}function R(y,E,C={}){let{prehash:I}=ote(C,m);return E=L(E,I),_.fromBytes(y,\\\"recovered\\\").recoverPublicKey(E).toBytes()}return Object.freeze({keygen:l,getPublicKey:d,getSharedSecret:f,utils:p,lengths:h,Point:t,sign:H,verify:F,recoverPublicKey:R,Signature:_,hash:e})}function jgt(t){let e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},r=t.Fp,n=t.allowedPrivateKeyLengths?Array.from(new Set(t.allowedPrivateKeyLengths.map(o=>Math.ceil(o/2)))):void 0,i=Hu(e.n,{BITS:t.nBitLength,allowedLengths:n,modFromBytes:t.wrapPrivateKey}),s={Fp:r,Fn:i,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:s}}function Hgt(t){let{CURVE:e,curveOpts:r}=jgt(t),n={hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:r,hash:t.hash,ecdsaOpts:n}}function qgt(t,e){let r=e.Point;return Object.assign({},e,{ProjectivePoint:r,CURVE:Object.assign({},t,ZL(r.Fn.ORDER,r.Fn.BITS))})}function kAe(t){let{CURVE:e,curveOpts:r,hash:n,ecdsaOpts:i}=Hgt(t),s=Lgt(e,r),o=Fgt(s,n,i);return qgt(t,o)}var RAe,cte,t0,r0,J3,PAe,YL,Dgt,BAe=x(()=>{u();AZ();Md();QT();IAe();aI();RAe=(t,e)=>(t+(t>=0?e:-e)/PAe)/e;cte=class extends Error{constructor(e=\\\"\\\"){super(e)}},t0={Err:cte,_tlv:{encode:(t,e)=>{let{Err:r}=t0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length&1)throw new r(\\\"tlv.encode: unpadded data\\\");let n=e.length/2,i=F3(n);if(i.length/2&128)throw new r(\\\"tlv.encode: long form length too big\\\");let s=n>127?F3(i.length/2|128):\\\"\\\";return F3(t)+s+i+e},decode(t,e){let{Err:r}=t0,n=0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length<2||e[n++]!==t)throw new r(\\\"tlv.decode: wrong tlv\\\");let i=e[n++],s=!!(i&128),o=0;if(!s)o=i;else{let c=i&127;if(!c)throw new r(\\\"tlv.decode(long): indefinite length not supported\\\");if(c>4)throw new r(\\\"tlv.decode(long): byte length is too big\\\");let l=e.subarray(n,n+c);if(l.length!==c)throw new r(\\\"tlv.decode: length bytes not complete\\\");if(l[0]===0)throw new r(\\\"tlv.decode(long): zero leftmost byte\\\");for(let d of l)o=o<<8|d;if(n+=c,o<128)throw new r(\\\"tlv.decode(long): not minimal encoding\\\")}let a=e.subarray(n,n+o);if(a.length!==o)throw new r(\\\"tlv.decode: wrong value length\\\");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=t0;if(t<r0)throw new e(\\\"integer: negative integers are not allowed\\\");let r=F3(t);if(Number.parseInt(r[0],16)&8&&(r=\\\"00\\\"+r),r.length&1)throw new e(\\\"unexpected DER parsing assertion: unpadded hex\\\");return r},decode(t){let{Err:e}=t0;if(t[0]&128)throw new e(\\\"invalid signature integer: negative\\\");if(t[0]===0&&!(t[1]&128))throw new e(\\\"invalid signature integer: unnecessary leading zero\\\");return Tv(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=t0,i=Ho(\\\"signature\\\",t),{v:s,l:o}=n.decode(48,i);if(o.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");let{v:a,l:c}=n.decode(2,s),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){let{_tlv:e,_int:r}=t0,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},r0=BigInt(0),J3=BigInt(1),PAe=BigInt(2),YL=BigInt(3),Dgt=BigInt(4)});function Y3(t,e){let r=n=>kAe({...t,hash:n});return{...r(e),create:r}}var lte=x(()=>{u();BAe();});function $gt(t){let e=dte.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,d=l*l*t%e,f=Il(d,r,e)*d%e,p=Il(f,r,e)*d%e,h=Il(p,MAe,e)*l%e,m=Il(h,i,e)*h%e,g=Il(m,s,e)*m%e,w=Il(g,a,e)*g%e,v=Il(w,c,e)*w%e,b=Il(v,a,e)*g%e,_=Il(b,r,e)*d%e,S=Il(_,o,e)*m%e,T=Il(S,n,e)*l%e,N=Il(T,MAe,e);if(!ute.eql(ute.sqr(N),t))throw new Error(\\\"Cannot find square root\\\");return N}var dte,zgt,MAe,ute,XL,DAe=x(()=>{u();XS();lte();aI();dte={p:BigInt(\\\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\\\"),n:BigInt(\\\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\\\"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt(\\\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\\\"),Gy:BigInt(\\\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\\\")},zgt={beta:BigInt(\\\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\\\"),basises:[[BigInt(\\\"0x3086d221a7d46bcde86c90e49284eb15\\\"),-BigInt(\\\"0xe4437ed6010e88286f547fa90abfe4c3\\\")],[BigInt(\\\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\\\"),BigInt(\\\"0x3086d221a7d46bcde86c90e49284eb15\\\")]]},MAe=BigInt(2);ute=Hu(dte.p,{sqrt:$gt}),XL=Y3({...dte,Fp:ute,lowS:!0,endo:zgt},Ud)});var Bv={};ue(Bv,{InvalidRError:()=>tU,InvalidSError:()=>rU,InvalidSerializedSizeError:()=>eU,InvalidVError:()=>nU,InvalidYParityError:()=>kv,MissingPropertiesError:()=>X3,assert:()=>iU,extract:()=>Vgt,from:()=>fte,fromBytes:()=>LAe,fromDerBytes:()=>Wgt,fromDerHex:()=>UAe,fromHex:()=>lI,fromLegacy:()=>FAe,fromRpc:()=>jAe,fromTuple:()=>Ggt,toBytes:()=>Kgt,toDerBytes:()=>Zgt,toDerHex:()=>Qgt,toHex:()=>HAe,toLegacy:()=>Jgt,toRpc:()=>Ygt,toTuple:()=>Xgt,vToYParity:()=>sU,validate:()=>eyt,yParityToV:()=>pte});function iU(t,e={}){let{recovered:r}=e;if(typeof t.r>\\\"u\\\")throw new X3({signature:t});if(typeof t.s>\\\"u\\\")throw new X3({signature:t});if(r&&typeof t.yParity>\\\"u\\\")throw new X3({signature:t});if(t.r<0n||t.r>Gee)throw new tU({value:t.r});if(t.s<0n||t.s>Gee)throw new rU({value:t.s});if(typeof t.yParity==\\\"number\\\"&&t.yParity!==0&&t.yParity!==1)throw new kv({value:t.yParity})}function LAe(t){return lI(Xi(t))}function lI(t){if(t.length!==130&&t.length!==132)throw new eU({signature:t});let e=BigInt(Fu(t,0,32)),r=BigInt(Fu(t,32,64)),n=(()=>{let i=+`0x${t.slice(130)}`;if(!Number.isNaN(i))try{return sU(i)}catch{throw new kv({value:i})}})();return typeof n>\\\"u\\\"?{r:e,s:r}:{r:e,s:r,yParity:n}}function Vgt(t){if(!(typeof t.r>\\\"u\\\")&&!(typeof t.s>\\\"u\\\"))return fte(t)}function fte(t){let e=typeof t==\\\"string\\\"?lI(t):t instanceof Uint8Array?LAe(t):typeof t.r==\\\"string\\\"?jAe(t):t.v?FAe(t):{r:t.r,s:t.s,...typeof t.yParity<\\\"u\\\"?{yParity:t.yParity}:{}};return iU(e),e}function Wgt(t){return UAe(Xi(t))}function UAe(t){let{r:e,s:r}=XL.Signature.fromDER(q3(t).slice(2));return{r:e,s:r}}function FAe(t){return{r:t.r,s:t.s,yParity:sU(t.v)}}function jAe(t){let e=(()=>{let r=t.v?Number(t.v):void 0,n=t.yParity?Number(t.yParity):void 0;if(typeof r==\\\"number\\\"&&typeof n!=\\\"number\\\"&&(n=sU(r)),typeof n!=\\\"number\\\")throw new kv({value:t.yParity});return n})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Ggt(t){let[e,r,n]=t;return fte({r:r===\\\"0x\\\"?0n:BigInt(r),s:n===\\\"0x\\\"?0n:BigInt(n),yParity:e===\\\"0x\\\"?0:Number(e)})}function Kgt(t){return lo(HAe(t))}function HAe(t){iU(t);let e=t.r,r=t.s;return nf(As(e,{size:32}),As(r,{size:32}),typeof t.yParity==\\\"number\\\"?As(pte(t.yParity),{size:1}):\\\"0x\\\")}function Zgt(t){return new XL.Signature(t.r,t.s).toDERRawBytes()}function Qgt(t){return`0x${new XL.Signature(t.r,t.s).toDERHex()}`}function Jgt(t){return{r:t.r,s:t.s,v:pte(t.yParity)}}function Ygt(t){let{r:e,s:r,yParity:n}=t;return{r:As(e,{size:32}),s:As(r,{size:32}),yParity:n===0?\\\"0x0\\\":\\\"0x1\\\"}}function Xgt(t){let{r:e,s:r,yParity:n}=t;return[n?\\\"0x01\\\":\\\"0x\\\",e===0n?\\\"0x\\\":iI(As(e)),r===0n?\\\"0x\\\":iI(As(r))]}function eyt(t,e={}){try{return iU(t,e),!0}catch{return!1}}function sU(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new nU({value:t})}function pte(t){if(t===0)return 27;if(t===1)return 28;throw new kv({value:t})}var eU,X3,tU,rU,kv,nU,hte=x(()=>{u();DAe();Uu();Ym();Rp();j3();GL();eU=class extends Nt{constructor({signature:e}){super(`Value \\\\`${e}\\\\` is an invalid signature size.`,{metaMessages:[\\\"Expected: 64 bytes or 65 bytes.\\\",`Received ${Ga(q3(e))} bytes.`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidSerializedSizeError\\\"})}},X3=class extends Nt{constructor({signature:e}){super(`Signature \\\\`${$y(e)}\\\\` is missing either an \\\\`r\\\\`, \\\\`s\\\\`, or \\\\`yParity\\\\` property.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.MissingPropertiesError\\\"})}},tU=class extends Nt{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidRError\\\"})}},rU=class extends Nt{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidSError\\\"})}},kv=class extends Nt{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidYParityError\\\"})}},nU=class extends Nt{constructor({value:e}){super(`Value \\\\`${e}\\\\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Signature.InvalidVError\\\"})}}});var qAe=x(()=>{u()});var zAe=x(()=>{u()});function syt(t,e={}){let{pad:r=!0,url:n=!1}=e,i=new Uint8Array(Math.ceil(t.length/3)*4);for(let c=0,l=0;l<t.length;c+=4,l+=3){let d=(t[l]<<16)+(t[l+1]<<8)+(t[l+2]|0);i[c]=oU[d>>18],i[c+1]=oU[d>>12&63],i[c+2]=oU[d>>6&63],i[c+3]=oU[d&63]}let s=t.length%3,o=Math.floor(t.length/3)*4+(s&&s+1),a=iyt.decode(new Uint8Array(i.buffer,0,o));return r&&s===1&&(a+=\\\"==\\\"),r&&s===2&&(a+=\\\"=\\\"),n&&(a=a.replaceAll(\\\"+\\\",\\\"-\\\").replaceAll(\\\"/\\\",\\\"_\\\")),a}function $Ae(t,e={}){return syt(lo(t),e)}function cU(t){let e=t.replace(/=+$/,\\\"\\\"),r=e.length,n=new Uint8Array(r+3);nyt.encodeInto(e+\\\"===\\\",n);for(let s=0,o=0;s<e.length;s+=4,o+=3){let a=(aU[n[s]]<<18)+(aU[n[s+1]]<<12)+(aU[n[s+2]]<<6)+aU[n[s+3]];n[o]=a>>16,n[o+1]=a>>8&255,n[o+2]=a&255}let i=(r>>2)*3+(r%4&&r%4-1);return new Uint8Array(n.buffer,0,i)}var nyt,iyt,oU,aU,mte=x(()=>{u();Uu();nyt=new TextEncoder,iyt=new TextDecoder,oU=Object.fromEntries(Array.from(\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\").map((t,e)=>[e,t.charCodeAt(0)])),aU={...Object.fromEntries(Array.from(\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\").map((t,e)=>[t.charCodeAt(0),e])),61:0,45:62,95:63}});var WAe=x(()=>{u()});var GAe=x(()=>{u()});var KAe,cyt,ZAe,lyt,T$r,QAe=x(()=>{u();KAe=6,cyt=32,ZAe=4096,lyt=cyt*ZAe,T$r=lyt*KAe-1-1*ZAe*KAe});var JAe=x(()=>{u()});var YAe=x(()=>{u()});var XAe=x(()=>{u()});var eTe=x(()=>{u()});var tTe=x(()=>{u()});var rTe=x(()=>{u()});var nTe=x(()=>{u()});var iTe=x(()=>{u()});var wyt,vyt,xyt,Eyt,sTe,oTe,aTe,_yt,Cyt,L$r,U$r,F$r,j$r,cTe=x(()=>{u();wyt=44032,vyt=4352,xyt=4449,Eyt=4519,sTe=19,oTe=21,aTe=28,_yt=oTe*aTe,Cyt=sTe*_yt,L$r=wyt+Cyt,U$r=vyt+sTe,F$r=xyt+oTe,j$r=Eyt+aTe});var lTe=x(()=>{u();cTe()});var uTe=x(()=>{u()});var dTe=x(()=>{u()});var fTe=x(()=>{u()});var pTe=x(()=>{u()});var hTe=x(()=>{u()});var mTe=x(()=>{u();K8e()});var gTe=x(()=>{u()});var Fc,gte,yte,bte,wte,vte,xte,Ete,_te,Cte,Ste,Ate,Tte,yTe=x(()=>{u();Fc=class extends Error{constructor(e){let{code:r,message:n,data:i}=e;super(n),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.BaseError\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"data\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r,this.data=i}},gte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Missing or invalid parameters.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32e3}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.InvalidInputError\\\"})}};Object.defineProperty(gte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});yte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Requested resource not found.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32001}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.ResourceNotFoundError\\\"})}};Object.defineProperty(yte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32001});bte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Requested resource not available.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32002}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.ResourceUnavailableError\\\"})}};Object.defineProperty(bte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32002});wte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Transaction creation failed.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32003}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.TransactionRejectedError\\\"})}};Object.defineProperty(wte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32003});vte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Method is not implemented.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32004}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.MethodNotSupportedError\\\"})}};Object.defineProperty(vte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32004});xte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Rate limit exceeded.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32005}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.LimitExceededError\\\"})}};Object.defineProperty(xte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32005});Ete=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"JSON-RPC version not supported.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32006}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.VersionNotSupportedError\\\"})}};Object.defineProperty(Ete,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32006});_te=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Input is not a valid JSON-RPC request.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32600}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.InvalidRequestError\\\"})}};Object.defineProperty(_te,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32600});Cte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Method does not exist.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32601}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.MethodNotFoundError\\\"})}};Object.defineProperty(Cte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32601});Ste=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Invalid method parameters.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32602}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.InvalidParamsError\\\"})}};Object.defineProperty(Ste,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32602});Ate=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Internal JSON-RPC error.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32603}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.InternalError\\\"})}};Object.defineProperty(Ate,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32603});Tte=class t extends Fc{constructor(e={}){super({code:t.code,data:e.data,message:e.message??\\\"Failed to parse JSON-RPC response.\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32700}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"RpcResponse.ParseError\\\"})}};Object.defineProperty(Tte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:-32700})});var Mv,Ite,Rte,Pte,Ote,Nte,bTe=x(()=>{u();aM();Mv=class extends Error{constructor(e,r){super(r),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ProviderRpcError\\\"}),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=r}},Ite=class extends Mv{constructor({message:e=\\\"The user rejected the request.\\\"}={}){super(4001,e),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4001}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Provider.UserRejectedRequestError\\\"})}};Object.defineProperty(Ite,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4001});Rte=class extends Mv{constructor({message:e=\\\"The requested method and/or account has not been authorized by the user.\\\"}={}){super(4100,e),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4100}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Provider.UnauthorizedError\\\"})}};Object.defineProperty(Rte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4100});Pte=class extends Mv{constructor({message:e=\\\"The provider does not support the requested method.\\\"}={}){super(4200,e),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4200}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Provider.UnsupportedMethodError\\\"})}};Object.defineProperty(Pte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4200});Ote=class extends Mv{constructor({message:e=\\\"The provider is disconnected from all chains.\\\"}={}){super(4900,e),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4900}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Provider.DisconnectedError\\\"})}};Object.defineProperty(Ote,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4900});Nte=class extends Mv{constructor({message:e=\\\"The provider is not connected to the requested chain.\\\"}={}){super(4901,e),Object.defineProperty(this,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4901}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"Provider.ChainDisconnectedError\\\"})}};Object.defineProperty(Nte,\\\"code\\\",{enumerable:!0,configurable:!0,writable:!0,value:4901})});var wTe=x(()=>{u()});var vTe=x(()=>{u()});var xTe=x(()=>{u()});var ETe,_Te,CTe,Lyt,Uyt,Fyt,kte,fVr,pVr,STe=x(()=>{u();XS();lte();aI();ETe={p:BigInt(\\\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\\\"),n:BigInt(\\\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\\\"),h:BigInt(1),a:BigInt(\\\"0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc\\\"),b:BigInt(\\\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\\\"),Gx:BigInt(\\\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\\\"),Gy:BigInt(\\\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\\\")},_Te={p:BigInt(\\\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff\\\"),n:BigInt(\\\"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973\\\"),h:BigInt(1),a:BigInt(\\\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc\\\"),b:BigInt(\\\"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef\\\"),Gx:BigInt(\\\"0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7\\\"),Gy:BigInt(\\\"0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f\\\")},CTe={p:BigInt(\\\"0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\\"),n:BigInt(\\\"0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409\\\"),h:BigInt(1),a:BigInt(\\\"0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc\\\"),b:BigInt(\\\"0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00\\\"),Gx:BigInt(\\\"0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66\\\"),Gy:BigInt(\\\"0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650\\\")},Lyt=Hu(ETe.p),Uyt=Hu(_Te.p),Fyt=Hu(CTe.p),kte=Y3({...ETe,Fp:Lyt,lowS:!1},Ud),fVr=Y3({..._Te,Fp:Uyt,lowS:!1},Hwe),pVr=Y3({...CTe,Fp:Fyt,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},jwe)});var e_,ATe,lU=x(()=>{u();STe();e_=kte,ATe=kte});function TTe(t){let{hash:e,payload:r,publicKey:n,signature:i}=t;return ATe.verify(i,r instanceof Uint8Array?r:lo(r),VL(n).substring(2),...e?[{prehash:!0,lowS:!0}]:[])}var Bte=x(()=>{u();lU();Uu();oI()});var RTe=x(()=>{u()});var PTe=x(()=>{u()});var OTe=x(()=>{u()});var NTe=x(()=>{u()});var kTe=x(()=>{u()});var BTe=x(()=>{u()});var MTe=x(()=>{u()});var DTe=x(()=>{u()});var LTe=x(()=>{u()});var UTe=x(()=>{u()});var FTe=x(()=>{u()});var jTe=x(()=>{u()});var HTe=x(()=>{u()});function qTe(t){let e=t[4]===0?5:4,r=e+32,n=t[r+2]===0?r+3:r+2,i=BigInt(Xi(t.slice(e,r))),s=BigInt(Xi(t.slice(n)));return{r:i,s:s>e_.CURVE.n/2n?e_.CURVE.n-s:s}}async function zTe(t){try{let e=t.getPublicKey();if(!e)throw new Vy;let r=new Uint8Array(e),n=await crypto.subtle.importKey(\\\"spki\\\",new Uint8Array(r),{name:\\\"ECDSA\\\",namedCurve:\\\"P-256\\\",hash:\\\"SHA-256\\\"},!0,[\\\"verify\\\"]),i=new Uint8Array(await crypto.subtle.exportKey(\\\"raw\\\",n));return Pv(i)}catch(e){if(e.message!==\\\"Permission denied to access object\\\")throw e;let r=new Uint8Array(t.attestationObject),n=32,i=88,s=c=>{let l=new Uint8Array([c,i,n]);for(let d=0;d<r.length-l.length;d++)if(l.every((f,p)=>r[d+p]===f))return d+l.length;throw new Vy},o=s(33),a=s(34);return Pv(new Uint8Array([4,...r.slice(o,o+n),...r.slice(a,a+n)]))}}var $Te=x(()=>{u();lU();Rp();oI();Mte()});var uU={};ue(uU,{CredentialCreationFailedError:()=>Vy,CredentialRequestFailedError:()=>uI,createChallenge:()=>VTe,createCredential:()=>e1t,getAuthenticatorData:()=>WTe,getClientDataJSON:()=>GTe,getCredentialCreationOptions:()=>KTe,getCredentialRequestOptions:()=>ZTe,getSignPayload:()=>t1t,sign:()=>r1t,verify:()=>n1t});async function e1t(t){let{createFn:e=window.navigator.credentials.create.bind(window.navigator.credentials),...r}=t,n=KTe(r);try{let i=await e(n);if(!i)throw new Vy;let s=i.response,o=await zTe(s);return{id:i.id,publicKey:o,raw:i}}catch(i){throw new Vy({cause:i})}}function WTe(t={}){let{flag:e=5,rpId:r=window.location.hostname,signCount:n=0}=t,i=DL(z3(r)),s=As(e,{size:1}),o=As(n,{size:4});return nf(i,s,o)}function GTe(t){let{challenge:e,crossOrigin:r=!1,extraClientData:n,origin:i=window.location.origin}=t;return JSON.stringify({type:\\\"webauthn.get\\\",challenge:$Ae(e,{url:!0,pad:!1}),origin:i,crossOrigin:r,...n})}function KTe(t){let{attestation:e=\\\"none\\\",authenticatorSelection:r={residentKey:\\\"preferred\\\",requireResidentKey:!1,userVerification:\\\"required\\\"},challenge:n=VTe,excludeCredentialIds:i,name:s,rp:o={id:window.location.hostname,name:window.document.title},user:a,extensions:c}=t,l=a?.name??s;return{publicKey:{attestation:e,authenticatorSelection:r,challenge:n,...i?{excludeCredentials:i?.map(d=>({id:cU(d),type:\\\"public-key\\\"}))}:{},pubKeyCredParams:[{type:\\\"public-key\\\",alg:-7}],rp:o,user:{id:a?.id??ML(K3(l),{as:\\\"Bytes\\\"}),name:l,displayName:a?.displayName??l},extensions:c}}}function ZTe(t){let{credentialId:e,challenge:r,rpId:n=window.location.hostname,userVerification:i=\\\"required\\\"}=t;return{publicKey:{...e?{allowCredentials:[{id:cU(e),type:\\\"public-key\\\"}]}:{},challenge:lo(r),rpId:n,userVerification:i}}}function t1t(t){let{challenge:e,crossOrigin:r,extraClientData:n,flag:i,origin:s,rpId:o,signCount:a,userVerification:c=\\\"required\\\"}=t,l=WTe({flag:i,rpId:o,signCount:a}),d=GTe({challenge:e,crossOrigin:r,extraClientData:n,origin:s}),f=DL(z3(d)),p=d.indexOf('\\\"challenge\\\"'),h=d.indexOf('\\\"type\\\"'),m={authenticatorData:l,clientDataJSON:d,challengeIndex:p,typeIndex:h,userVerificationRequired:c===\\\"required\\\"},g=nf(l,f);return{metadata:m,payload:g}}async function r1t(t){let{getFn:e=window.navigator.credentials.get.bind(window.navigator.credentials),...r}=t,n=ZTe(r);try{let i=await e(n);if(!i)throw new uI;let s=i.response,o=String.fromCharCode(...new Uint8Array(s.clientDataJSON)),a=o.indexOf('\\\"challenge\\\"'),c=o.indexOf('\\\"type\\\"'),l=qTe(new Uint8Array(s.signature));return{metadata:{authenticatorData:Xi(new Uint8Array(s.authenticatorData)),clientDataJSON:o,challengeIndex:a,typeIndex:c,userVerificationRequired:n.publicKey.userVerification===\\\"required\\\"},signature:l,raw:i}}catch(i){throw new uI({cause:i})}}function n1t(t){let{challenge:e,hash:r=!0,metadata:n,publicKey:i,signature:s}=t,{authenticatorData:o,challengeIndex:a,clientDataJSON:c,typeIndex:l,userVerificationRequired:d}=n,f=lo(o);if(f.length<37)return!1;let p=f[32];if((p&1)!==1||d&&(p&4)!==4||(p&8)!==8&&(p&16)===16)return!1;let h='\\\"type\\\":\\\"webauthn.get\\\"';if(h!==c.slice(Number(l),h.length+1))return!1;let m=c.slice(Number(a)).match(/^\\\"challenge\\\":\\\"(.*?)\\\"/);if(!m)return!1;let[g,w]=m;if(Xi(cU(w))!==e)return!1;let v=DL(K3(c),{as:\\\"Bytes\\\"}),b=BL(f,v);return TTe({hash:r,payload:b,publicKey:i,signature:s})}var VTe,Vy,uI,Mte=x(()=>{u();mte();Uu();Ym();LL();Rp();Bte();$Te();VTe=Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);Vy=class extends Nt{constructor({cause:e}={}){super(\\\"Failed to create credential.\\\",{cause:e}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"WebAuthnP256.CredentialCreationFailedError\\\"})}},uI=class extends Nt{constructor({cause:e}={}){super(\\\"Failed to request credential.\\\",{cause:e}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"WebAuthnP256.CredentialRequestFailedError\\\"})}}});var dI={};ue(dI,{createKeyPair:()=>i1t,sign:()=>s1t,verify:()=>o1t});async function i1t(t={}){let{extractable:e=!1}=t,r=await globalThis.crypto.subtle.generateKey({name:\\\"ECDSA\\\",namedCurve:\\\"P-256\\\"},e,[\\\"sign\\\",\\\"verify\\\"]),n=await globalThis.crypto.subtle.exportKey(\\\"raw\\\",r.publicKey),i=Pv(new Uint8Array(n));return{privateKey:r.privateKey,publicKey:i}}async function s1t(t){let{payload:e,privateKey:r}=t,n=await globalThis.crypto.subtle.sign({name:\\\"ECDSA\\\",hash:\\\"SHA-256\\\"},r,G3(e)),i=Mee(new Uint8Array(n)),s=Uee(Lee(i,0,32)),o=Uee(Lee(i,32,64));return o>e_.CURVE.n/2n&&(o=e_.CURVE.n-o),{r:s,s:o}}async function o1t(t){let{payload:e,signature:r}=t,n=await globalThis.crypto.subtle.importKey(\\\"raw\\\",qee(t.publicKey),{name:\\\"ECDSA\\\",namedCurve:\\\"P-256\\\"},!0,[\\\"verify\\\"]);return await globalThis.crypto.subtle.verify({name:\\\"ECDSA\\\",hash:\\\"SHA-256\\\"},n,BL(Dee(r.r),Dee(r.s)),G3(e))}var QTe=x(()=>{u();lU();Uu();oI()});var Dte=x(()=>{u();SSe();rAe();nAe();iAe();sAe();JSe();tAe();oAe();aAe();Wee();cAe();qAe();zAe();mte();WAe();QAe();XAe();eTe();tTe();rTe();nTe();Uu();jee();iTe();lTe();Ym();uTe();LL();fTe();Rp();pTe();j3();GAe();hTe();mTe();gTe();bTe();oI();lAe();wTe();vTe();yTe();xTe();dTe();Bte();hte();RTe();GL();PTe();JAe();NTe();kTe();BTe();MTe();DTe();LTe();UTe();FTe();jTe();HTe();OTe();Mte();QTe();YAe()});function dU(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function Ute(t,e){let r=indexedDB.open(t);r.onupgradeneeded=()=>r.result.createObjectStore(e);let n=dU(r);return(i,s)=>n.then(o=>s(o.transaction(e,i).objectStore(e)))}function Fte(){return Lte||(Lte=Ute(\\\"keyval-store\\\",\\\"keyval\\\")),Lte}function JTe(t,e=Fte()){return e(\\\"readonly\\\",r=>dU(r.get(t)))}function YTe(t,e,r=Fte()){return r(\\\"readwrite\\\",n=>(n.put(e,t),dU(n.transaction)))}function XTe(t,e=Fte()){return e(\\\"readwrite\\\",r=>(r.delete(t),dU(r.transaction)))}var Lte,eIe=x(()=>{u()});function tIe(t,e){let r=typeof indexedDB<\\\"u\\\"?Ute(t,e):void 0;return{getItem:async n=>{let i=await JTe(n,r);return i||null},removeItem:async n=>XTe(n,r),setItem:async(n,i)=>YTe(n,i,r)}}var rIe=x(()=>{u();eIe()});async function l1t(){let t=await dI.createKeyPair({extractable:!1}),e=Ka.slice(Pp.toHex(t.publicKey),1);return await Wy.setItem(e,t),await Wy.setItem(fU,e),t}async function nIe(){let t=await Wy.getItem(fU);if(!t)return null;let e=await Wy.getItem(t);return e||null}async function u1t(){let t=await nIe();if(!t){let e=await l1t(),r=Ka.slice(Pp.toHex(e.publicKey),1);return await Wy.setItem(r,e),await Wy.setItem(fU,r),e}return t}async function d1t(){let t=await u1t(),e=Ka.slice(Pp.toHex(t.publicKey),1),r=async n=>{let{payload:i,metadata:s}=uU.getSignPayload({challenge:n,origin:\\\"https://keys.coinbase.com\\\",userVerification:\\\"preferred\\\"}),o=await dI.sign({payload:i,privateKey:t.privateKey});return{signature:Bv.toHex(o),raw:{},webauthn:s}};return{id:e,publicKey:e,async sign({hash:n}){return r(n)},async signMessage({message:n}){return r(Rm(n))},async signTypedData(n){return r(mp(n))},type:\\\"webAuthn\\\"}}async function Dv(){return{account:await d1t()}}async function iIe(){let t=await nIe();t&&(await Wy.removeItem(Ka.slice(Pp.toHex(t.publicKey),1)),await Wy.removeItem(fU))}var a1t,c1t,fU,Wy,pU=x(()=>{u();Dte();un();rIe();a1t=\\\"cbwsdk\\\",c1t=\\\"keys\\\",fU=\\\"activeId\\\",Wy=tIe(a1t,c1t)});var sIe,oIe,aIe,hU,cIe=x(()=>{u();Du();vee();sIe={storageKey:\\\"ownPrivateKey\\\",keyType:\\\"private\\\"},oIe={storageKey:\\\"ownPublicKey\\\",keyType:\\\"public\\\"},aIe={storageKey:\\\"peerPublicKey\\\",keyType:\\\"public\\\"},hU=class{constructor(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(aIe,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,Ee.keys.clear()}async generateKeyPair(){let e=await vSe();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(sIe,e.privateKey),await this.storeKey(oIe,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(sIe)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(oIe)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(aIe)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await xSe(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){let r=Ee.keys.get(e.storageKey);return r?CL(e.keyType,r):null}async storeKey(e,r){let n=await _L(e.keyType,r);Ee.keys.set(e.storageKey,n)}}});function Lv(t,e){if(!(typeof t!=\\\"object\\\"||t===null))return e.split(/[.[\\\\]]+/).filter(Boolean).reduce((r,n)=>{if(typeof r==\\\"object\\\"&&r!==null)return r[n]},t)}var jte=x(()=>{u()});var Hte=x(()=>{u();Gk()});var mU,qte,Ea,gU,Uv=x(()=>{u();mU=\\\"0x0ba5ed0c6aa8c49038f819e587e2633c4a9f428a\\\",qte=\\\"0xf85210B21cC50302F477BA56686d2019dC9b67Ad\\\",Ea=[{inputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"constructor\\\"},{inputs:[{name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"AlreadyOwner\\\",type:\\\"error\\\"},{inputs:[],name:\\\"Initialized\\\",type:\\\"error\\\"},{inputs:[{name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"InvalidEthereumAddressOwner\\\",type:\\\"error\\\"},{inputs:[{name:\\\"key\\\",type:\\\"uint256\\\"}],name:\\\"InvalidNonceKey\\\",type:\\\"error\\\"},{inputs:[{name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"InvalidOwnerBytesLength\\\",type:\\\"error\\\"},{inputs:[],name:\\\"LastOwner\\\",type:\\\"error\\\"},{inputs:[{name:\\\"index\\\",type:\\\"uint256\\\"}],name:\\\"NoOwnerAtIndex\\\",type:\\\"error\\\"},{inputs:[{name:\\\"ownersRemaining\\\",type:\\\"uint256\\\"}],name:\\\"NotLastOwner\\\",type:\\\"error\\\"},{inputs:[{name:\\\"selector\\\",type:\\\"bytes4\\\"}],name:\\\"SelectorNotAllowed\\\",type:\\\"error\\\"},{inputs:[],name:\\\"Unauthorized\\\",type:\\\"error\\\"},{inputs:[],name:\\\"UnauthorizedCallContext\\\",type:\\\"error\\\"},{inputs:[],name:\\\"UpgradeFailed\\\",type:\\\"error\\\"},{inputs:[{name:\\\"index\\\",type:\\\"uint256\\\"},{name:\\\"expectedOwner\\\",type:\\\"bytes\\\"},{name:\\\"actualOwner\\\",type:\\\"bytes\\\"}],name:\\\"WrongOwnerAtIndex\\\",type:\\\"error\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"index\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"AddOwner\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"index\\\",type:\\\"uint256\\\"},{indexed:!1,name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"RemoveOwner\\\",type:\\\"event\\\"},{anonymous:!1,inputs:[{indexed:!0,name:\\\"implementation\\\",type:\\\"address\\\"}],name:\\\"Upgraded\\\",type:\\\"event\\\"},{stateMutability:\\\"payable\\\",type:\\\"fallback\\\"},{inputs:[],name:\\\"REPLAYABLE_NONCE_KEY\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"owner\\\",type:\\\"address\\\"}],name:\\\"addOwnerAddress\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"x\\\",type:\\\"bytes32\\\"},{name:\\\"y\\\",type:\\\"bytes32\\\"}],name:\\\"addOwnerPublicKey\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"functionSelector\\\",type:\\\"bytes4\\\"}],name:\\\"canSkipChainIdValidation\\\",outputs:[{name:\\\"\\\",type:\\\"bool\\\"}],stateMutability:\\\"pure\\\",type:\\\"function\\\"},{inputs:[],name:\\\"domainSeparator\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"eip712Domain\\\",outputs:[{name:\\\"fields\\\",type:\\\"bytes1\\\"},{name:\\\"name\\\",type:\\\"string\\\"},{name:\\\"version\\\",type:\\\"string\\\"},{name:\\\"chainId\\\",type:\\\"uint256\\\"},{name:\\\"verifyingContract\\\",type:\\\"address\\\"},{name:\\\"salt\\\",type:\\\"bytes32\\\"},{name:\\\"extensions\\\",type:\\\"uint256[]\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"entryPoint\\\",outputs:[{name:\\\"\\\",type:\\\"address\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"target\\\",type:\\\"address\\\"},{name:\\\"value\\\",type:\\\"uint256\\\"},{name:\\\"data\\\",type:\\\"bytes\\\"}],name:\\\"execute\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"target\\\",type:\\\"address\\\"},{name:\\\"value\\\",type:\\\"uint256\\\"},{name:\\\"data\\\",type:\\\"bytes\\\"}],name:\\\"calls\\\",type:\\\"tuple[]\\\"}],name:\\\"executeBatch\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"calls\\\",type:\\\"bytes[]\\\"}],name:\\\"executeWithoutChainIdValidation\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"userOp\\\",type:\\\"tuple\\\"}],name:\\\"getUserOpHashWithoutChainId\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"implementation\\\",outputs:[{name:\\\"$\\\",type:\\\"address\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"owners\\\",type:\\\"bytes[]\\\"}],name:\\\"initialize\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],name:\\\"isOwnerAddress\\\",outputs:[{name:\\\"\\\",type:\\\"bool\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"account\\\",type:\\\"bytes\\\"}],name:\\\"isOwnerBytes\\\",outputs:[{name:\\\"\\\",type:\\\"bool\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"x\\\",type:\\\"bytes32\\\"},{name:\\\"y\\\",type:\\\"bytes32\\\"}],name:\\\"isOwnerPublicKey\\\",outputs:[{name:\\\"\\\",type:\\\"bool\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"hash\\\",type:\\\"bytes32\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"isValidSignature\\\",outputs:[{name:\\\"result\\\",type:\\\"bytes4\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"nextOwnerIndex\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"index\\\",type:\\\"uint256\\\"}],name:\\\"ownerAtIndex\\\",outputs:[{name:\\\"\\\",type:\\\"bytes\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"ownerCount\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"proxiableUUID\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"index\\\",type:\\\"uint256\\\"},{name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"removeLastOwner\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"index\\\",type:\\\"uint256\\\"},{name:\\\"owner\\\",type:\\\"bytes\\\"}],name:\\\"removeOwnerAtIndex\\\",outputs:[],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{inputs:[],name:\\\"removedOwnersCount\\\",outputs:[{name:\\\"\\\",type:\\\"uint256\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"hash\\\",type:\\\"bytes32\\\"}],name:\\\"replaySafeHash\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[{name:\\\"newImplementation\\\",type:\\\"address\\\"},{name:\\\"data\\\",type:\\\"bytes\\\"}],name:\\\"upgradeToAndCall\\\",outputs:[],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{components:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"},{name:\\\"initCode\\\",type:\\\"bytes\\\"},{name:\\\"callData\\\",type:\\\"bytes\\\"},{name:\\\"callGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"verificationGasLimit\\\",type:\\\"uint256\\\"},{name:\\\"preVerificationGas\\\",type:\\\"uint256\\\"},{name:\\\"maxFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"maxPriorityFeePerGas\\\",type:\\\"uint256\\\"},{name:\\\"paymasterAndData\\\",type:\\\"bytes\\\"},{name:\\\"signature\\\",type:\\\"bytes\\\"}],name:\\\"userOp\\\",type:\\\"tuple\\\"},{name:\\\"userOpHash\\\",type:\\\"bytes32\\\"},{name:\\\"missingAccountFunds\\\",type:\\\"uint256\\\"}],name:\\\"validateUserOp\\\",outputs:[{name:\\\"validationData\\\",type:\\\"uint256\\\"}],stateMutability:\\\"nonpayable\\\",type:\\\"function\\\"},{stateMutability:\\\"payable\\\",type:\\\"receive\\\"}],gU=[{inputs:[{name:\\\"implementation_\\\",type:\\\"address\\\"}],stateMutability:\\\"payable\\\",type:\\\"constructor\\\"},{inputs:[],name:\\\"OwnerRequired\\\",type:\\\"error\\\"},{inputs:[{name:\\\"owners\\\",type:\\\"bytes[]\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"}],name:\\\"createAccount\\\",outputs:[{name:\\\"account\\\",type:\\\"address\\\"}],stateMutability:\\\"payable\\\",type:\\\"function\\\"},{inputs:[{name:\\\"owners\\\",type:\\\"bytes[]\\\"},{name:\\\"nonce\\\",type:\\\"uint256\\\"}],name:\\\"getAddress\\\",outputs:[{name:\\\"\\\",type:\\\"address\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"implementation\\\",outputs:[{name:\\\"\\\",type:\\\"address\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"},{inputs:[],name:\\\"initCodeHash\\\",outputs:[{name:\\\"\\\",type:\\\"bytes32\\\"}],stateMutability:\\\"view\\\",type:\\\"function\\\"}]});function zte(t){var e;if(!Array.isArray(t.params))return null;switch(t.method){case\\\"personal_sign\\\":return t.params[1];case\\\"eth_signTypedData_v4\\\":return t.params[0];case\\\"eth_signTransaction\\\":case\\\"eth_sendTransaction\\\":case\\\"wallet_sendCalls\\\":return(e=t.params[0])===null||e===void 0?void 0:e.from;default:return null}}function lIe(t,e){if(!Array.isArray(t.params))throw pe.rpc.invalidParams();let r=[...t.params];switch(t.method){case\\\"eth_signTransaction\\\":case\\\"eth_sendTransaction\\\":case\\\"wallet_sendCalls\\\":r[0].from=e;break;case\\\"eth_signTypedData_v4\\\":r[0]=e;break;case\\\"personal_sign\\\":r[1]=e;break;default:break}return Object.assign(Object.assign({},t),{params:r})}function $te(t){var e;if(!t||!Array.isArray(t)||!(!((e=t[0])===null||e===void 0)&&e.chainId))throw pe.rpc.invalidParams();if(typeof t[0].chainId!=\\\"string\\\"&&typeof t[0].chainId!=\\\"number\\\")throw pe.rpc.invalidParams()}function uIe(t){if(!t||!Array.isArray(t)||t.length!==1&&t.length!==2)throw pe.rpc.invalidParams();if(typeof t[0]!=\\\"string\\\"||!lt(t[0]))throw pe.rpc.invalidParams();if(t.length===2){if(!Array.isArray(t[1]))throw pe.rpc.invalidParams();for(let e of t[1])if(typeof e!=\\\"string\\\"||!e.startsWith(\\\"0x\\\"))throw pe.rpc.invalidParams()}}function t_(t,e){let r=Object.assign({},t);if(e&&t.method.startsWith(\\\"wallet_\\\")){let n=Lv(r,\\\"params.0.capabilities\\\");if(typeof n>\\\"u\\\"&&(n={}),typeof n!=\\\"object\\\")throw pe.rpc.invalidParams();n=Object.assign(Object.assign({},e),n),r.params&&Array.isArray(r.params)&&(r.params[0]=Object.assign(Object.assign({},r.params[0]),{capabilities:n}))}return r}async function yU(){var t;let e=(t=Ee.subAccountsConfig.get())!==null&&t!==void 0?t:{},r={};if(e.enableAutoSubAccounts){let{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await Dv();if(!n)throw pe.provider.unauthorized(\\\"No owner account found\\\");r.addSubAccount={account:{type:\\\"create\\\",keys:[{type:n.address?\\\"address\\\":\\\"webauthn-p256\\\",publicKey:n.address||n.publicKey}]}}}Ee.subAccountsConfig.set({capabilities:r})}function dIe(t){if(!(t.method===\\\"coinbase_fetchPermissions\\\"&&t.params===void 0)){if(t.method===\\\"coinbase_fetchPermissions\\\"&&Array.isArray(t.params)&&t.params.length===1&&typeof t.params[0]==\\\"object\\\"){if(typeof t.params[0].account!=\\\"string\\\"||!t.params[0].chainId.startsWith(\\\"0x\\\"))throw pe.rpc.invalidParams(\\\"FetchPermissions - Invalid params: params[0].account must be a hex string\\\");if(typeof t.params[0].chainId!=\\\"string\\\"||!t.params[0].chainId.startsWith(\\\"0x\\\"))throw pe.rpc.invalidParams(\\\"FetchPermissions - Invalid params: params[0].chainId must be a hex string\\\");if(typeof t.params[0].spender!=\\\"string\\\"||!t.params[0].spender.startsWith(\\\"0x\\\"))throw pe.rpc.invalidParams(\\\"FetchPermissions - Invalid params: params[0].spender must be a hex string\\\");return}throw pe.rpc.invalidParams()}}function fIe(t){var e,r,n;if(t.params!==void 0)return t;let i=(e=Ee.getState().account.accounts)===null||e===void 0?void 0:e[0],s=(r=Ee.getState().account.chain)===null||r===void 0?void 0:r.id,o=(n=Ee.getState().subAccount)===null||n===void 0?void 0:n.address;if(!i||!o||!s)throw pe.rpc.invalidParams(\\\"FetchPermissions - one or more of account, sub account, or chain id is missing, connect to sub account via wallet_connect first\\\");return{method:\\\"coinbase_fetchPermissions\\\",params:[{account:i,chainId:Z(s),spender:o}]}}function pIe({spendPermission:t,chainId:e}){return{domain:{name:\\\"Spend Permission Manager\\\",version:\\\"1\\\",chainId:e,verifyingContract:qte},types:{SpendPermission:[{name:\\\"account\\\",type:\\\"address\\\"},{name:\\\"spender\\\",type:\\\"address\\\"},{name:\\\"token\\\",type:\\\"address\\\"},{name:\\\"allowance\\\",type:\\\"uint160\\\"},{name:\\\"period\\\",type:\\\"uint48\\\"},{name:\\\"start\\\",type:\\\"uint48\\\"},{name:\\\"end\\\",type:\\\"uint48\\\"},{name:\\\"salt\\\",type:\\\"uint256\\\"},{name:\\\"extraData\\\",type:\\\"bytes\\\"}]},primaryType:\\\"SpendPermission\\\",message:{account:t.account,spender:t.spender,token:t.token,allowance:t.allowance,period:t.period,start:t.start,end:t.end,salt:t.salt,extraData:t.extraData}}}function hIe({spendPermissionBatch:t,chainId:e}){return{domain:{name:\\\"Spend Permission Manager\\\",version:\\\"1\\\",chainId:e,verifyingContract:qte},types:{SpendPermissionBatch:[{name:\\\"account\\\",type:\\\"address\\\"},{name:\\\"period\\\",type:\\\"uint48\\\"},{name:\\\"start\\\",type:\\\"uint48\\\"},{name:\\\"end\\\",type:\\\"uint48\\\"},{name:\\\"permissions\\\",type:\\\"PermissionDetails[]\\\"}],PermissionDetails:[{name:\\\"spender\\\",type:\\\"address\\\"},{name:\\\"token\\\",type:\\\"address\\\"},{name:\\\"allowance\\\",type:\\\"uint160\\\"},{name:\\\"salt\\\",type:\\\"uint256\\\"},{name:\\\"extraData\\\",type:\\\"bytes\\\"}]},primaryType:\\\"SpendPermissionBatch\\\",message:{account:t.account,period:t.period,start:t.start,end:t.end,permissions:t.permissions.map(r=>({spender:r.spender,token:r.token,allowance:r.allowance,salt:r.salt,extraData:r.extraData}))}}}async function bU({client:t,id:e}){var r;let n=await Tm(t,{id:e});if(n.status===\\\"success\\\")return(r=n.receipts)===null||r===void 0?void 0:r[0].transactionHash;throw pe.rpc.internal(\\\"failed to send transaction\\\")}function wU({calls:t,from:e,chainId:r,capabilities:n}){let i=PX.get().paymasterUrls,s={method:\\\"wallet_sendCalls\\\",params:[{version:\\\"1.0\\\",calls:t,chainId:Z(r),from:e,atomicRequired:!0,capabilities:n}]};return i?.[r]&&(s=t_(s,{paymasterService:{url:i?.[r]}})),s}async function mIe(){let t=jT();return await new Promise(r=>{c3({snackbarContext:\\\"sub_account_insufficient_balance\\\"}),t.presentItem({autoExpand:!0,message:\\\"Insufficient spend permission. Choose how to proceed:\\\",menuItems:[{isRed:!1,info:\\\"Create new Spend Permission\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:()=>{Zm({snackbarContext:\\\"sub_account_insufficient_balance\\\",snackbarAction:\\\"create_permission\\\"}),t.clear(),r(\\\"update_permission\\\")}},{isRed:!1,info:\\\"Continue in Popup\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:()=>{Zm({snackbarContext:\\\"sub_account_insufficient_balance\\\",snackbarAction:\\\"continue_in_popup\\\"}),t.clear(),r(\\\"continue_popup\\\")}},{isRed:!0,info:\\\"Cancel\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:()=>{Zm({snackbarContext:\\\"sub_account_insufficient_balance\\\",snackbarAction:\\\"cancel\\\"}),t.clear(),r(\\\"cancel\\\")}}]})})}function gIe({errorData:t,sourceAddress:e}){var r;let n=[];for(let[i,{amount:s,sources:o}]of Object.entries((r=t?.required)!==null&&r!==void 0?r:{})){if(o.filter(c=>Ge(c.balance)>=Ge(s)&&c.address.toLowerCase()===e?.toLowerCase()).length===0)throw new Error(\\\"Source address has insufficient balance for a token\\\");n.push({token:i,requiredAmount:Ge(s)})}return n}function yIe(t){return typeof t==\\\"object\\\"&&t!==null&&\\\"calls\\\"in t}function bIe(t){return Array.isArray(t)&&t.length===1&&typeof t[0]==\\\"object\\\"&&t[0]!==null&&\\\"to\\\"in t[0]}function f1t(t){return No(Ft(He(t)),0,16)}function wIe({attribution:t,dappOrigin:e}){if(t){if(\\\"auto\\\"in t&&t.auto&&e)return f1t(e);if(\\\"dataSuffix\\\"in t)return t.dataSuffix}}function vIe(t,e){var r;if(!Array.isArray(t?.params))return!1;let n=(r=t.params[0])===null||r===void 0?void 0:r.capabilities;return!n||typeof n!=\\\"object\\\"?!1:e in n}function fI(t,e){let r=t.filter(n=>n!==e);return[e,...r]}function pI(t,e){return[...t.filter(n=>n!==e),e]}async function xIe(){let t=Ee.spendPermissions.get(),e=Ee.subAccounts.get(),r=Ee.account.get().accounts;return r?{accounts:r?.map(i=>({address:i,capabilities:{subAccounts:e?[e]:void 0,spendPermissions:t.length>0?{permissions:t}:void 0}}))}:null}var vU=x(()=>{u();un();un();va();WD();Du();jte();oL();Hte();pU();Uv()});function p1t(t){return t.replaceAll(\\\"+\\\",\\\"-\\\").replaceAll(\\\"/\\\",\\\"_\\\").replace(/=+$/,\\\"\\\")}function xU(t){let e=btoa(String.fromCharCode(...new Uint8Array(t)));return p1t(e)}function EIe({webauthn:t,signature:e,id:r}){let n=Bv.fromHex(e);return{id:r,rawId:xU(Ua(r)),response:{authenticatorData:xU(Hr(t.authenticatorData)),clientDataJSON:xU(Ua(t.clientDataJSON)),signature:xU(h1t(n.r,n.s))},type:JSON.parse(t.clientDataJSON).type}}function h1t(t,e){let r=Hr(An(Z(t))),n=Hr(An(Z(e))),i=r.length,s=n.length,o=i+s+4,a=new Uint8Array(o+2);return a[0]=48,a[1]=o,a[2]=2,a[3]=i,a.set(r,4),a[i+4]=2,a[i+5]=s,a.set(n,i+6),a}var _Ie=x(()=>{u();Dte();un()});async function CIe(t){let{owner:e,ownerIndex:r,address:n,client:i,factoryData:s}=t,o={abi:see,address:oee,version:\\\"0.6\\\"},a={abi:gU,address:mU};return uee({client:i,entryPoint:o,extend:{abi:Ea,factory:a},async decodeCalls(c){let l=Aw({abi:Ea,data:c});if(l.functionName===\\\"execute\\\")return[{to:l.args[0],value:l.args[1],data:l.args[2]}];if(l.functionName===\\\"executeBatch\\\")return l.args[0].map(d=>({to:d.target,value:d.value,data:d.data}));throw new W(`unable to decode calls for \\\"${l.functionName}\\\"`)},async encodeCalls(c){var l,d;return c.length===1?At({abi:Ea,functionName:\\\"execute\\\",args:[c[0].to,(l=c[0].value)!==null&&l!==void 0?l:BigInt(0),(d=c[0].data)!==null&&d!==void 0?d:\\\"0x\\\"]}):At({abi:Ea,functionName:\\\"executeBatch\\\",args:[c.map(f=>{var p,h;return{data:(p=f.data)!==null&&p!==void 0?p:\\\"0x\\\",target:f.to,value:(h=f.value)!==null&&h!==void 0?h:BigInt(0)}})]})},async getAddress(){return n},async getFactoryArgs(){return s?{factory:a.address,factoryData:s}:{factory:a.address,factoryData:s}},async getStubSignature(){return e.type===\\\"webAuthn\\\"?\\\"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000\\\":hI({ownerIndex:r,signature:\\\"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\\\"})},async sign(c){let l=await this.getAddress(),d=Vte({address:l,chainId:i.chain.id,hash:c.hash}),f=await EU({hash:d,owner:e});return hI({ownerIndex:r,signature:f})},async signMessage(c){let{message:l}=c,d=await this.getAddress(),f=Vte({address:d,chainId:i.chain.id,hash:Rm(l)}),p=await EU({hash:f,owner:e});return hI({ownerIndex:r,signature:p})},async signTypedData(c){let{domain:l,types:d,primaryType:f,message:p}=c,h=await this.getAddress(),m=Vte({address:h,chainId:i.chain.id,hash:mp({domain:l,message:p,primaryType:f,types:d})}),g=await EU({hash:m,owner:e});return hI({ownerIndex:r,signature:g})},async signUserOperation(c){let{chainId:l=i.chain.id}=c,d=m1t(c,[\\\"chainId\\\"]),f=await this.getAddress(),p=lee({chainId:l,entryPointAddress:o.address,entryPointVersion:o.version,userOperation:Object.assign(Object.assign({},d),{sender:f})}),h=await EU({hash:p,owner:e});return hI({ownerIndex:r,signature:h})},userOperation:{async estimateGas(c){var l;if(e.type===\\\"webAuthn\\\")return{verificationGasLimit:BigInt(Math.max(Number((l=c.verificationGasLimit)!==null&&l!==void 0?l:BigInt(0)),8e5))}}}})}async function EU({hash:t,owner:e}){if(e.type===\\\"webAuthn\\\"){let{signature:r,webauthn:n}=await e.sign({hash:t});return g1t({signature:r,webauthn:n})}if(e.sign)return e.sign({hash:t});throw new W(\\\"`owner` does not support raw sign.\\\")}function Vte({address:t,chainId:e,hash:r}){return mp({domain:{chainId:e,name:\\\"Coinbase Smart Wallet\\\",verifyingContract:t,version:\\\"1\\\"},types:{CoinbaseSmartWalletMessage:[{name:\\\"hash\\\",type:\\\"bytes32\\\"}]},primaryType:\\\"CoinbaseSmartWalletMessage\\\",message:{hash:r}})}function g1t({webauthn:t,signature:e}){let{r,s:n}=lI(e);return Vn([{components:[{name:\\\"authenticatorData\\\",type:\\\"bytes\\\"},{name:\\\"clientDataJSON\\\",type:\\\"bytes\\\"},{name:\\\"challengeIndex\\\",type:\\\"uint256\\\"},{name:\\\"typeIndex\\\",type:\\\"uint256\\\"},{name:\\\"r\\\",type:\\\"uint256\\\"},{name:\\\"s\\\",type:\\\"uint256\\\"}],type:\\\"tuple\\\"}],[{authenticatorData:t.authenticatorData,clientDataJSON:la(t.clientDataJSON),challengeIndex:BigInt(t.challengeIndex),typeIndex:BigInt(t.typeIndex),r,s:n}])}function hI(t){let{ownerIndex:e=0}=t,r=(()=>{if(Ot(t.signature)!==65)return t.signature;let n=JB(t.signature);return QQ([\\\"bytes32\\\",\\\"bytes32\\\",\\\"uint8\\\"],[n.r,n.s,n.yParity===0?27:28])})();return Vn([{components:[{name:\\\"ownerIndex\\\",type:\\\"uint8\\\"},{name:\\\"signatureData\\\",type:\\\"bytes\\\"}],type:\\\"tuple\\\"}],[{ownerIndex:e,signatureData:r}])}var m1t,SIe=x(()=>{u();hte();un();gee();Uv();m1t=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols==\\\"function\\\")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}});async function AIe({address:t,client:e,factory:r,factoryData:n,owner:i,ownerIndex:s,parentAddress:o,attribution:a}){var c;let l={address:t,factory:r,factoryData:n},d=(c=e.chain)===null||c===void 0?void 0:c.id;if(!d)throw pe.rpc.internal(\\\"chainId not found\\\");let f=await CIe({owner:i,ownerIndex:s??1,address:t,client:e,factoryData:n}),p=async h=>{var m,g,w,v,b,_;try{switch(h.method){case\\\"wallet_addSubAccount\\\":return l;case\\\"eth_accounts\\\":return[l.address];case\\\"eth_coinbase\\\":return l.address;case\\\"net_version\\\":return d.toString();case\\\"eth_chainId\\\":return Z(d);case\\\"eth_sendTransaction\\\":{Ip(h.params);let S=h.params[0];co(S.to,pe.rpc.invalidParams(\\\"to is required\\\"));let T={to:S.to,data:FD((m=S.data)!==null&&m!==void 0?m:\\\"0x\\\",!0),value:FD((g=S.value)!==null&&g!==void 0?g:\\\"0x\\\",!0),from:(w=S.from)!==null&&w!==void 0?w:l.address},N=wU({calls:[T],chainId:d,from:T.from}),O=await p(N);return bU({client:e,id:O})}case\\\"wallet_sendCalls\\\":{Ip(h.params);let S=Lv(h.params[0],\\\"chainId\\\");if(!S)throw pe.rpc.invalidParams(\\\"chainId is required\\\");if(!Ur(S))throw pe.rpc.invalidParams(\\\"chainId must be a hex encoded integer\\\");if(!h.params[0])throw pe.rpc.invalidParams(\\\"params are required\\\");if(!(\\\"calls\\\"in h.params[0]))throw pe.rpc.invalidParams(\\\"calls are required\\\");let T={method:\\\"wallet_prepareCalls\\\",params:[{version:\\\"1.0\\\",calls:h.params[0].calls,chainId:S,from:l.address,capabilities:\\\"capabilities\\\"in h.params[0]?h.params[0].capabilities:{}}]};o&&(T=t_(T,{funding:[{type:\\\"spendPermission\\\",data:{autoApply:!0,sources:[o],preference:\\\"PREFER_DIRECT_BALANCE\\\"}}]}));let N=await p(T),O=await((b=(v=i).sign)===null||b===void 0?void 0:b.call(v,{hash:jS(N.signatureRequest.hash)})),L;if(!O)throw pe.rpc.internal(\\\"signature not found\\\");return Ur(O)?L={type:\\\"secp256k1\\\",data:{address:i.address,signature:O}}:L={type:\\\"webauthn\\\",data:{signature:JSON.stringify(EIe(Object.assign({id:(_=i.id)!==null&&_!==void 0?_:\\\"1\\\"},O))),publicKey:i.publicKey}},(await p({method:\\\"wallet_sendPreparedCalls\\\",params:[{version:\\\"1.0\\\",type:N.type,data:N.userOp,chainId:N.chainId,signature:L}]}))[0]}case\\\"wallet_sendPreparedCalls\\\":{Ip(h.params);let S=Lv(h.params[0],\\\"chainId\\\");if(!S)throw pe.rpc.invalidParams(\\\"chainId is required\\\");if(!Ur(S))throw pe.rpc.invalidParams(\\\"chainId must be a hex encoded integer\\\");return await e.request({method:\\\"wallet_sendPreparedCalls\\\",params:h.params})}case\\\"wallet_prepareCalls\\\":{Ip(h.params);let S=Lv(h.params[0],\\\"chainId\\\");if(!S)throw pe.rpc.invalidParams(\\\"chainId is required\\\");if(!Ur(S))throw pe.rpc.invalidParams(\\\"chainId must be a hex encoded integer\\\");if(!h.params[0])throw pe.rpc.invalidParams(\\\"params are required\\\");if(!Lv(h.params[0],\\\"calls\\\"))throw pe.rpc.invalidParams(\\\"calls are required\\\");let T=h.params[0];return a&&T.capabilities&&!(\\\"attribution\\\"in T.capabilities)&&(T.capabilities.attribution=a),await e.request({method:\\\"wallet_prepareCalls\\\",params:[Object.assign(Object.assign({},h.params[0]),{chainId:S})]})}case\\\"personal_sign\\\":{if(Ip(h.params),!Ur(h.params[0]))throw pe.rpc.invalidParams(\\\"message must be a hex encoded string\\\");let S=jS(h.params[0]);return f.signMessage({message:S})}case\\\"eth_signTypedData_v4\\\":{Ip(h.params);let S=typeof h.params[1]==\\\"string\\\"?JSON.parse(h.params[1]):h.params[1];return f.signTypedData(S)}default:throw pe.rpc.methodNotSupported()}}catch(S){if(DD(S)){let T=p4e(S);if(T)throw T}throw S}};return{request:p}}var TIe=x(()=>{u();va();tf();U3();_Ie();jte();un();vU();SIe()});async function _U({address:t,client:e,publicKey:r,factory:n,factoryData:i}){if(!await Sl(e,{address:t})&&n&&i){if(_r(n)!==_r(mU))throw pe.rpc.internal(\\\"unknown factory address\\\");let a=Aw({abi:gU,data:i});if(a.functionName!==\\\"createAccount\\\")throw pe.rpc.internal(\\\"unknown factory function\\\");let[c]=a.args;return c.findIndex(l=>l.toLowerCase()===IIe(r).toLowerCase())}let o=await Tn(e,{address:t,abi:Ea,functionName:\\\"ownerCount\\\"});for(let a=Number(o)-1;a>=0;a--){let c=await Tn(e,{address:t,abi:Ea,functionName:\\\"ownerAtIndex\\\",args:[BigInt(a)]}),l=IIe(r);if(c.toLowerCase()===l.toLowerCase())return a}return-1}function IIe(t){return lt(t)?Fr(t):t}var Wte=x(()=>{u();va();un();GJ();Uv()});async function RIe(){let t=jT();return new Promise(e=>{c3({snackbarContext:\\\"sub_account_add_owner\\\"}),t.presentItem({autoExpand:!0,message:\\\"App requires a signer update\\\",menuItems:[{isRed:!1,info:\\\"Confirm\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:()=>{Zm({snackbarContext:\\\"sub_account_add_owner\\\",snackbarAction:\\\"confirm\\\"}),t.clear(),e(\\\"authenticate\\\")}},{isRed:!0,info:\\\"Cancel\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:()=>{Zm({snackbarContext:\\\"sub_account_add_owner\\\",snackbarAction:\\\"cancel\\\"}),t.clear(),e(\\\"cancel\\\")}}]})})}var PIe=x(()=>{u();WD();oL()});async function OIe({ownerAccount:t,globalAccountRequest:e}){var r,n;let i=Ee.account.get(),s=Ee.subAccounts.get(),o=(r=i.accounts)===null||r===void 0?void 0:r.find(m=>m.toLowerCase()!==s?.address.toLowerCase());co(o,pe.provider.unauthorized(\\\"no global account\\\")),co((n=i.chain)===null||n===void 0?void 0:n.id,pe.provider.unauthorized(\\\"no chain id\\\")),co(s?.address,pe.provider.unauthorized(\\\"no sub account\\\"));let a=[];if(t.type===\\\"local\\\"&&t.address&&a.push({to:s.address,data:At({abi:Ea,functionName:\\\"addOwnerAddress\\\",args:[t.address]}),value:He(0)}),t.publicKey){let[m,g]=Cc([{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"}],t.publicKey);a.push({to:s.address,data:At({abi:Ea,functionName:\\\"addOwnerPublicKey\\\",args:[m,g]}),value:He(0)})}let c={method:\\\"wallet_sendCalls\\\",params:[{version:\\\"1\\\",calls:a,chainId:Z(84532),from:o}]};if(await RIe()===\\\"cancel\\\")throw pe.provider.unauthorized(\\\"user cancelled\\\");let d=await e(c),f=EL(i.chain.id);if(co(f,pe.rpc.internal(`client not found for chainId ${i.chain.id}`)),(await Tm(f,{id:d})).status!==\\\"success\\\")throw pe.rpc.internal(\\\"add owner call failed\\\");let h=await _U({address:s.address,publicKey:t.type===\\\"local\\\"&&t.address?t.address:t.publicKey,client:f});if(h===-1)throw pe.rpc.internal(\\\"failed to find owner index\\\");return h}var NIe=x(()=>{u();va();wee();Du();U3();un();Hte();Uv();Wte();PIe()});async function kIe({errorData:t,globalAccountAddress:e,subAccountAddress:r,client:n,request:i,subAccountRequest:s,globalAccountRequest:o}){var a;let c=(a=n.chain)===null||a===void 0?void 0:a.id;co(c,pe.rpc.internal(\\\"invalid chainId\\\"));let l=gIe({errorData:t,sourceAddress:e}),d=await mIe();if(d===\\\"cancel\\\")throw new Error(\\\"User cancelled funding\\\");let f,p=3600*24,h=3;if(d===\\\"update_permission\\\"){if(l.length===1){let _=l[0],S=pIe({spendPermission:{token:_.token,allowance:Z(_.requiredAmount*BigInt(h)),period:p,account:e,spender:r,start:0,end:0xffffffffffff,salt:Z(BigInt(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),extraData:\\\"0x\\\"},chainId:c});f={method:\\\"eth_signTypedData_v4\\\",params:[e,S]}}else{let _=hIe({spendPermissionBatch:{account:e,period:p,start:0,end:0xffffffffffff,permissions:l.map(S=>({token:S.token,allowance:Z(S.requiredAmount*BigInt(h)),period:p,account:e,spender:r,salt:\\\"0x0\\\",extraData:\\\"0x\\\"}))},chainId:c});f={method:\\\"eth_signTypedData_v4\\\",params:[e,_]}}try{await o(f)}catch(_){throw console.error(_),new Error(\\\"User denied spend permission request\\\")}return s(i)}let m=l.map(_=>_.token.toLowerCase()===\\\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\\\".toLowerCase()?{to:r,value:Z(_.requiredAmount),data:\\\"0x\\\"}:{to:_.token,value:\\\"0x0\\\",data:At({abi:CQ,functionName:\\\"transfer\\\",args:[r,_.requiredAmount]})}),g;if(i.method===\\\"wallet_sendCalls\\\"&&yIe(i.params))g=i.params[0];else if(i.method===\\\"eth_sendTransaction\\\"&&bIe(i.params))g=wU({calls:[i.params[0]],chainId:c,from:i.params[0].from}).params[0];else throw new Error(\\\"Could not get original call\\\");let w=At({abi:Ea,functionName:\\\"executeBatch\\\",args:[g.calls.map(_=>{var S,T;return{target:_.to,value:Ge((S=_.value)!==null&&S!==void 0?S:\\\"0x0\\\"),data:(T=_.data)!==null&&T!==void 0?T:\\\"0x\\\"}})]}),v=[...m,{data:w,to:r,value:\\\"0x0\\\"}],b=await o({method:\\\"wallet_sendCalls\\\",params:[Object.assign(Object.assign({},g),{calls:v,from:e})]});return i.method===\\\"eth_sendTransaction\\\"?bU({client:n,id:b}):b}var BIe=x(()=>{u();va();U3();un();vU();Uv()});var mI,MIe=x(()=>{u();a3();un();va();P8e();j8e();iee();tf();wee();dL();Du();U3();wSe();vee();o3();pU();cIe();vU();TIe();Wte();NIe();BIe();mI=class{constructor(e){var r,n,i,s;this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new hU;let{account:o,chains:a}=Ee.getState();this.accounts=(r=o.accounts)!==null&&r!==void 0?r:[],this.chain=(n=o.chain)!==null&&n!==void 0?n:{id:(s=(i=e.metadata.appChainIds)===null||i===void 0?void 0:i[0])!==null&&s!==void 0?s:1},a&&bee(a)}async handshake(e){var r,n,i;let s=Uc.get(e);C8e({method:e.method,correlationId:s});try{await((n=(r=this.communicator).waitForPopupLoaded)===null||n===void 0?void 0:n.call(r));let o=await this.createRequestMessage({handshake:{method:e.method,params:(i=e.params)!==null&&i!==void 0?i:[]}},s),a=await this.communicator.postRequestAndWaitForResponse(o);if(\\\"failure\\\"in a.content)throw a.content.failure;let c=await CL(\\\"public\\\",a.sender);await this.keyManager.setPeerPublicKey(c);let l=await this.decryptResponseMessage(a);this.handleResponse(e,l),A8e({method:e.method,correlationId:s})}catch(o){throw S8e({method:e.method,correlationId:s,errorMessage:Jm(o)}),o}}async request(e){let r=Uc.get(e);T8e({method:e.method,correlationId:r});try{let n=await this._request(e);return R8e({method:e.method,correlationId:r}),n}catch(n){throw I8e({method:e.method,correlationId:r,errorMessage:Jm(n)}),n}}async _request(e){var r,n,i,s,o,a,c,l,d,f,p,h,m,g;if(this.accounts.length===0)switch(e.method){case\\\"eth_requestAccounts\\\":return await((n=(r=this.communicator).waitForPopupLoaded)===null||n===void 0?void 0:n.call(r)),await yU(),await this.request({method:\\\"wallet_connect\\\",params:[{version:\\\"1\\\",capabilities:Object.assign({},(s=(i=Ee.subAccountsConfig.get())===null||i===void 0?void 0:i.capabilities)!==null&&s!==void 0?s:{})}]}),this.accounts;case\\\"wallet_switchEthereumChain\\\":{$te(e.params),this.chain.id=Number(e.params[0].chainId);return}case\\\"wallet_connect\\\":{await((a=(o=this.communicator).waitForPopupLoaded)===null||a===void 0?void 0:a.call(o)),await yU();let w={};vIe(e,\\\"addSubAccount\\\")&&(w=(l=(c=Ee.subAccountsConfig.get())===null||c===void 0?void 0:c.capabilities)!==null&&l!==void 0?l:{});let v=t_(e,w);return this.sendRequestToPopup(v)}case\\\"wallet_sendCalls\\\":case\\\"wallet_sign\\\":return this.sendRequestToPopup(e);default:throw pe.provider.unauthorized()}if(this.shouldRequestUseSubAccountSigner(e)){let w=Uc.get(e);O8e({method:e.method,correlationId:w});try{let v=await this.sendRequestToSubAccountSigner(e);return N8e({method:e.method,correlationId:w}),v}catch(v){throw k8e({method:e.method,correlationId:w,errorMessage:Jm(v)}),v}}switch(e.method){case\\\"eth_requestAccounts\\\":case\\\"eth_accounts\\\":{let w=Ee.subAccounts.get(),v=Ee.subAccountsConfig.get();return w?.address&&(this.accounts=v?.enableAutoSubAccounts?fI(this.accounts,w.address):pI(this.accounts,w.address)),(d=this.callback)===null||d===void 0||d.call(this,\\\"connect\\\",{chainId:Z(this.chain.id)}),this.accounts}case\\\"eth_coinbase\\\":return this.accounts[0];case\\\"net_version\\\":return this.chain.id;case\\\"eth_chainId\\\":return Z(this.chain.id);case\\\"wallet_getCapabilities\\\":return this.handleGetCapabilitiesRequest(e);case\\\"wallet_switchEthereumChain\\\":return this.handleSwitchChainRequest(e);case\\\"eth_ecRecover\\\":case\\\"personal_sign\\\":case\\\"wallet_sign\\\":case\\\"personal_ecRecover\\\":case\\\"eth_signTransaction\\\":case\\\"eth_sendTransaction\\\":case\\\"eth_signTypedData_v1\\\":case\\\"eth_signTypedData_v3\\\":case\\\"eth_signTypedData_v4\\\":case\\\"eth_signTypedData\\\":case\\\"wallet_addEthereumChain\\\":case\\\"wallet_watchAsset\\\":case\\\"wallet_sendCalls\\\":case\\\"wallet_showCallsStatus\\\":case\\\"wallet_grantPermissions\\\":return this.sendRequestToPopup(e);case\\\"wallet_connect\\\":{let w=await xIe();if(w)return w;await((p=(f=this.communicator).waitForPopupLoaded)===null||p===void 0?void 0:p.call(f)),await yU();let v=Ee.subAccountsConfig.get(),b=t_(e,(h=v?.capabilities)!==null&&h!==void 0?h:{});return(m=this.callback)===null||m===void 0||m.call(this,\\\"connect\\\",{chainId:Z(this.chain.id)}),this.sendRequestToPopup(b)}case\\\"wallet_getSubAccounts\\\":{let w=Ee.subAccounts.get();if(w?.address)return{subAccounts:[w]};if(!this.chain.rpcUrl)throw pe.rpc.internal(\\\"No RPC URL set for chain\\\");let v=await Ly(e,this.chain.rpcUrl);if(Ip(v.subAccounts,\\\"subAccounts\\\"),v.subAccounts.length>0){VT(v.subAccounts[0]);let b=v.subAccounts[0];Ee.subAccounts.set({address:b.address,factory:b.factory,factoryData:b.factoryData})}return v}case\\\"wallet_addSubAccount\\\":return this.addSubAccount(e);case\\\"coinbase_fetchPermissions\\\":{dIe(e);let w=fIe(e),v=await Ly(w,VD),b=jr((g=w.params)===null||g===void 0?void 0:g[0].chainId);return Ee.spendPermissions.set(v.permissions.map(_=>Object.assign(Object.assign({},_),{chainId:b}))),v}default:if(!this.chain.rpcUrl)throw pe.rpc.internal(\\\"No RPC URL set for chain\\\");return Ly(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){var r,n;await((n=(r=this.communicator).waitForPopupLoaded)===null||n===void 0?void 0:n.call(r));let i=await this.sendEncryptedRequest(e),s=await this.decryptResponseMessage(i);return this.handleResponse(e,s)}async handleResponse(e,r){var n,i,s,o,a;let c=r.result;if(\\\"error\\\"in c)throw c.error;switch(e.method){case\\\"eth_requestAccounts\\\":{let l=c.value;this.accounts=l,Ee.account.set({accounts:l,chain:this.chain}),(n=this.callback)===null||n===void 0||n.call(this,\\\"accountsChanged\\\",l);break}case\\\"wallet_connect\\\":{let l=c.value,d=l.accounts.map(v=>v.address);this.accounts=d,Ee.account.set({accounts:d});let f=l.accounts.at(0),p=f?.capabilities;if(p?.subAccounts){let v=p?.subAccounts;Ip(v,\\\"subAccounts\\\"),VT(v[0]),Ee.subAccounts.set({address:v[0].address,factory:v[0].factory,factoryData:v[0].factoryData})}let h=[this.accounts[0]],m=Ee.subAccounts.get(),g=Ee.subAccountsConfig.get();m?.address&&(this.accounts=g?.enableAutoSubAccounts?fI(this.accounts,m.address):pI(this.accounts,m.address));let w=(s=(i=l?.accounts)===null||i===void 0?void 0:i[0].capabilities)===null||s===void 0?void 0:s.spendPermissions;w&&\\\"permissions\\\"in w&&Ee.spendPermissions.set(w?.permissions),(o=this.callback)===null||o===void 0||o.call(this,\\\"accountsChanged\\\",h);break}case\\\"wallet_addSubAccount\\\":{VT(c.value);let l=c.value;Ee.subAccounts.set(l);let d=Ee.subAccountsConfig.get();this.accounts=d?.enableAutoSubAccounts?fI(this.accounts,l.address):pI(this.accounts,l.address),(a=this.callback)===null||a===void 0||a.call(this,\\\"accountsChanged\\\",this.accounts);break}default:break}return c.value}async cleanup(){var e,r;let n=Ee.config.get().metadata;await this.keyManager.clear(),Ee.account.clear(),Ee.subAccounts.clear(),Ee.spendPermissions.clear(),Ee.chains.clear(),this.accounts=[],this.chain={id:(r=(e=n?.appChainIds)===null||e===void 0?void 0:e[0])!==null&&r!==void 0?r:1}}async handleSwitchChainRequest(e){$te(e.params);let r=gv(e.params[0].chainId);if(this.updateChain(r))return null;let i=await this.sendRequestToPopup(e);return i===null&&this.updateChain(r),i}async handleGetCapabilitiesRequest(e){uIe(e.params);let r=e.params[0],n=e.params[1];if(!this.accounts.some(a=>ha(a,r)))throw pe.provider.unauthorized(\\\"no active account found when getting capabilities\\\");let i=Ee.getState().account.capabilities;if(!i)return{};if(!n||n.length===0)return i;let s=new Set(n.map(a=>jr(a)));return Object.fromEntries(Object.entries(i).filter(([a])=>{try{let c=jr(a);return s.has(c)}catch{return!1}}))}async sendEncryptedRequest(e){let r=await this.keyManager.getSharedSecret();if(!r)throw pe.provider.unauthorized(\\\"No shared secret found when encrypting request\\\");let n=await _Se({action:e,chainId:this.chain.id},r),i=Uc.get(e),s=await this.createRequestMessage({encrypted:n},i);return this.communicator.postRequestAndWaitForResponse(s)}async createRequestMessage(e,r){let n=await _L(\\\"public\\\",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),correlationId:r,sender:n,content:e,timestamp:new Date}}async decryptResponseMessage(e){var r,n,i;let s=e.content;if(\\\"failure\\\"in s)throw s.failure;let o=await this.keyManager.getSharedSecret();if(!o)throw pe.provider.unauthorized(\\\"Invalid session: no shared secret found when decrypting response\\\");let a=await CSe(s.encrypted,o),c=(r=a.data)===null||r===void 0?void 0:r.chains;if(c){let d=(n=a.data)===null||n===void 0?void 0:n.nativeCurrencies,f=Object.entries(c).map(([p,h])=>{let m=d?.[Number(p)];return Object.assign({id:Number(p),rpcUrl:h},m?{nativeCurrency:m}:{})});Ee.chains.set(f),this.updateChain(this.chain.id,f),bee(f)}let l=(i=a.data)===null||i===void 0?void 0:i.capabilities;return l&&Ee.account.set({capabilities:l}),a}updateChain(e,r){var n;let i=Ee.getState(),s=r??i.chains,o=s?.find(a=>a.id===e);return o?(o!==this.chain&&(this.chain=o,Ee.account.set({chain:o}),(n=this.callback)===null||n===void 0||n.call(this,\\\"chainChanged\\\",Gm(o.id))),!0):!1}async addSubAccount(e){var r,n,i,s;let a=Ee.getState().subAccount,c=Ee.subAccountsConfig.get();if(a?.address)return this.accounts=c?.enableAutoSubAccounts?fI(this.accounts,a.address):pI(this.accounts,a.address),(r=this.callback)===null||r===void 0||r.call(this,\\\"accountsChanged\\\",this.accounts),a;if(await((i=(n=this.communicator).waitForPopupLoaded)===null||i===void 0?void 0:i.call(n)),Array.isArray(e.params)&&e.params.length>0&&e.params[0].account&&e.params[0].account.type===\\\"create\\\"){let d;if(e.params[0].account.keys&&e.params[0].account.keys.length>0)d=e.params[0].account.keys;else{let f=(s=Ee.subAccountsConfig.get())!==null&&s!==void 0?s:{},{account:p}=f.toOwnerAccount?await f.toOwnerAccount():await Dv();if(!p)throw pe.provider.unauthorized(\\\"could not get subaccount owner account when adding sub account\\\");d=[{type:p.address?\\\"address\\\":\\\"webauthn-p256\\\",publicKey:p.address||p.publicKey}]}e.params[0].account.keys=d}let l=await this.sendRequestToPopup(e);return VT(l),l}shouldRequestUseSubAccountSigner(e){let r=zte(e),n=Ee.subAccounts.get();return r?r.toLowerCase()===n?.address.toLowerCase():!1}async sendRequestToSubAccountSigner(e){var r;let n=Ee.subAccounts.get(),i=Ee.subAccountsConfig.get(),s=Ee.config.get();co(n?.address,pe.provider.unauthorized(\\\"no active sub account when sending request to sub account signer\\\"));let o=i?.toOwnerAccount?await i.toOwnerAccount():await Dv();co(o?.account,pe.provider.unauthorized(\\\"no active sub account owner when sending request to sub account signer\\\")),zte(e)===void 0&&(e=lIe(e,n.address));let c=EL(this.chain.id);co(c,pe.rpc.internal(`client not found for chainId ${this.chain.id} when sending request to sub account signer`));let l=this.accounts.find(m=>m.toLowerCase()!==n.address.toLowerCase());co(l,pe.provider.unauthorized(\\\"no global account found when sending request to sub account signer\\\"));let d=wIe({attribution:(r=s.preference)===null||r===void 0?void 0:r.attribution,dappOrigin:window.location.origin}),f=o.account.type===\\\"local\\\"?o.account.address:o.account.publicKey,p=await _U({address:n.address,factory:n.factory,factoryData:n.factoryData,publicKey:f,client:c});if(p===-1){let m=Uc.get(e);B8e({method:e.method,correlationId:m});try{p=await OIe({ownerAccount:o.account,globalAccountRequest:this.sendRequestToPopup.bind(this)}),M8e({method:e.method,correlationId:m})}catch(g){return D8e({method:e.method,correlationId:m,errorMessage:Jm(g)}),pe.provider.unauthorized(\\\"failed to add sub account owner when sending request to sub account signer\\\")}}let{request:h}=await AIe({address:n.address,owner:o.account,client:c,factory:n.factory,factoryData:n.factoryData,parentAddress:l,attribution:d?{suffix:d}:void 0,ownerIndex:p});try{return await h(e)}catch(m){let g;if(DD(m))g=JSON.parse(m.details);else if(BX(m))g=m;else throw m;if(!(BX(g)&&g.data)||!g.data)throw m;let w=Uc.get(e);L8e({method:e.method,correlationId:w});try{let v=await kIe({errorData:g.data,globalAccountAddress:l,subAccountAddress:n.address,client:c,request:e,subAccountRequest:h,globalAccountRequest:this.request.bind(this)});return U8e({method:e.method,correlationId:w}),v}catch(v){throw console.error(v),F8e({method:e.method,correlationId:w,errorMessage:Jm(v)}),m}}}}});var DIe,LIe,UIe,FIe,jIe,HIe,Gte,qIe,Kte=x(()=>{u();Uy();DIe=({method:t,correlationId:e})=>{It(\\\"walletlink_signer.handshake.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e},wt.high)},LIe=({method:t,correlationId:e,errorMessage:r})=>{It(\\\"walletlink_signer.handshake.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r},wt.high)},UIe=({method:t,correlationId:e})=>{It(\\\"walletlink_signer.handshake.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e},wt.high)},FIe=({method:t,correlationId:e})=>{It(\\\"walletlink_signer.request.started\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e},wt.high)},jIe=({method:t,correlationId:e,errorMessage:r})=>{It(\\\"walletlink_signer.request.error\\\",{action:bt.error,componentType:yt.unknown,method:t,correlationId:e,errorMessage:r},wt.high)},HIe=({method:t,correlationId:e})=>{It(\\\"walletlink_signer.request.completed\\\",{action:bt.unknown,componentType:yt.unknown,method:t,correlationId:e},wt.high)},Gte=()=>{It(\\\"walletlink_signer.walletlink_connection.connection_failed\\\",{action:bt.measurement,componentType:yt.unknown},wt.high)},qIe=()=>{It(\\\"walletlink_signer.walletlink_connection.fetch_unseen_events_failed\\\",{action:bt.measurement,componentType:yt.unknown},wt.high)}});var Qte=q(qo=>{\\\"use strict\\\";u();Object.defineProperty(qo,\\\"__esModule\\\",{value:!0});qo.output=qo.exists=qo.hash=qo.bytes=qo.bool=qo.number=qo.isBytes=void 0;function CU(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}qo.number=CU;function zIe(t){if(typeof t!=\\\"boolean\\\")throw new Error(`boolean expected, not ${t}`)}qo.bool=zIe;function $Ie(t){return t instanceof Uint8Array||t!=null&&typeof t==\\\"object\\\"&&t.constructor.name===\\\"Uint8Array\\\"}qo.isBytes=$Ie;function Zte(t,...e){if(!$Ie(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}qo.bytes=Zte;function VIe(t){if(typeof t!=\\\"function\\\"||typeof t.create!=\\\"function\\\")throw new Error(\\\"Hash should be wrapped by utils.wrapConstructor\\\");CU(t.outputLen),CU(t.blockLen)}qo.hash=VIe;function WIe(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}qo.exists=WIe;function GIe(t,e){Zte(t);let r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}qo.output=GIe;var y1t={number:CU,bool:zIe,bytes:Zte,hash:VIe,exists:WIe,output:GIe};qo.default=y1t});var m9e=q(ut=>{\\\"use strict\\\";u();Object.defineProperty(ut,\\\"__esModule\\\",{value:!0});ut.add5L=ut.add5H=ut.add4H=ut.add4L=ut.add3H=ut.add3L=ut.add=ut.rotlBL=ut.rotlBH=ut.rotlSL=ut.rotlSH=ut.rotr32L=ut.rotr32H=ut.rotrBL=ut.rotrBH=ut.rotrSL=ut.rotrSH=ut.shrSL=ut.shrSH=ut.toBig=ut.split=ut.fromBig=void 0;var SU=BigInt(2**32-1),Jte=BigInt(32);function Yte(t,e=!1){return e?{h:Number(t&SU),l:Number(t>>Jte&SU)}:{h:Number(t>>Jte&SU)|0,l:Number(t&SU)|0}}ut.fromBig=Yte;function KIe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:o}=Yte(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}ut.split=KIe;var ZIe=(t,e)=>BigInt(t>>>0)<<Jte|BigInt(e>>>0);ut.toBig=ZIe;var QIe=(t,e,r)=>t>>>r;ut.shrSH=QIe;var JIe=(t,e,r)=>t<<32-r|e>>>r;ut.shrSL=JIe;var YIe=(t,e,r)=>t>>>r|e<<32-r;ut.rotrSH=YIe;var XIe=(t,e,r)=>t<<32-r|e>>>r;ut.rotrSL=XIe;var e9e=(t,e,r)=>t<<64-r|e>>>r-32;ut.rotrBH=e9e;var t9e=(t,e,r)=>t>>>r-32|e<<64-r;ut.rotrBL=t9e;var r9e=(t,e)=>e;ut.rotr32H=r9e;var n9e=(t,e)=>t;ut.rotr32L=n9e;var i9e=(t,e,r)=>t<<r|e>>>32-r;ut.rotlSH=i9e;var s9e=(t,e,r)=>e<<r|t>>>32-r;ut.rotlSL=s9e;var o9e=(t,e,r)=>e<<r-32|t>>>64-r;ut.rotlBH=o9e;var a9e=(t,e,r)=>t<<r-32|e>>>64-r;ut.rotlBL=a9e;function c9e(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}ut.add=c9e;var l9e=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0);ut.add3L=l9e;var u9e=(t,e,r,n)=>e+r+n+(t/2**32|0)|0;ut.add3H=u9e;var d9e=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0);ut.add4L=d9e;var f9e=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0;ut.add4H=f9e;var p9e=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0);ut.add5L=p9e;var h9e=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0;ut.add5H=h9e;var b1t={fromBig:Yte,split:KIe,toBig:ZIe,shrSH:QIe,shrSL:JIe,rotrSH:YIe,rotrSL:XIe,rotrBH:e9e,rotrBL:t9e,rotr32H:r9e,rotr32L:n9e,rotlSH:i9e,rotlSL:s9e,rotlBH:o9e,rotlBL:a9e,add:c9e,add3L:l9e,add3H:u9e,add4L:d9e,add4H:f9e,add5H:h9e,add5L:p9e};ut.default=b1t});var g9e=q(AU=>{\\\"use strict\\\";u();Object.defineProperty(AU,\\\"__esModule\\\",{value:!0});AU.crypto=void 0;AU.crypto=typeof globalThis==\\\"object\\\"&&\\\"crypto\\\"in globalThis?globalThis.crypto:void 0});var w9e=q(tt=>{\\\"use strict\\\";u();Object.defineProperty(tt,\\\"__esModule\\\",{value:!0});tt.randomBytes=tt.wrapXOFConstructorWithOpts=tt.wrapConstructorWithOpts=tt.wrapConstructor=tt.checkOpts=tt.Hash=tt.concatBytes=tt.toBytes=tt.utf8ToBytes=tt.asyncLoop=tt.nextTick=tt.hexToBytes=tt.bytesToHex=tt.byteSwap32=tt.byteSwapIfBE=tt.byteSwap=tt.isLE=tt.rotl=tt.rotr=tt.createView=tt.u32=tt.u8=tt.isBytes=void 0;var Xte=g9e(),tre=Qte();function w1t(t){return t instanceof Uint8Array||t!=null&&typeof t==\\\"object\\\"&&t.constructor.name===\\\"Uint8Array\\\"}tt.isBytes=w1t;var v1t=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength);tt.u8=v1t;var x1t=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));tt.u32=x1t;var E1t=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);tt.createView=E1t;var _1t=(t,e)=>t<<32-e|t>>>e;tt.rotr=_1t;var C1t=(t,e)=>t<<e|t>>>32-e>>>0;tt.rotl=C1t;tt.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;var S1t=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;tt.byteSwap=S1t;tt.byteSwapIfBE=tt.isLE?t=>t:t=>(0,tt.byteSwap)(t);function A1t(t){for(let e=0;e<t.length;e++)t[e]=(0,tt.byteSwap)(t[e])}tt.byteSwap32=A1t;var T1t=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));function I1t(t){(0,tre.bytes)(t);let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=T1t[t[r]];return e}tt.bytesToHex=I1t;var n0={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function y9e(t){if(t>=n0._0&&t<=n0._9)return t-n0._0;if(t>=n0._A&&t<=n0._F)return t-(n0._A-10);if(t>=n0._a&&t<=n0._f)return t-(n0._a-10)}function R1t(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"padded hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=y9e(t.charCodeAt(s)),a=y9e(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}tt.hexToBytes=R1t;var P1t=async()=>{};tt.nextTick=P1t;async function O1t(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);let s=Date.now()-n;s>=0&&s<e||(await(0,tt.nextTick)(),n+=s)}}tt.asyncLoop=O1t;function b9e(t){if(typeof t!=\\\"string\\\")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}tt.utf8ToBytes=b9e;function TU(t){return typeof t==\\\"string\\\"&&(t=b9e(t)),(0,tre.bytes)(t),t}tt.toBytes=TU;function N1t(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];(0,tre.bytes)(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}tt.concatBytes=N1t;var ere=class{clone(){return this._cloneInto()}};tt.Hash=ere;var k1t={}.toString;function B1t(t,e){if(e!==void 0&&k1t.call(e)!==\\\"[object Object]\\\")throw new Error(\\\"Options should be object or undefined\\\");return Object.assign(t,e)}tt.checkOpts=B1t;function M1t(t){let e=n=>t().update(TU(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}tt.wrapConstructor=M1t;function D1t(t){let e=(n,i)=>t(i).update(TU(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}tt.wrapConstructorWithOpts=D1t;function L1t(t){let e=(n,i)=>t(i).update(TU(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}tt.wrapXOFConstructorWithOpts=L1t;function U1t(t=32){if(Xte.crypto&&typeof Xte.crypto.getRandomValues==\\\"function\\\")return Xte.crypto.getRandomValues(new Uint8Array(t));throw new Error(\\\"crypto.getRandomValues must be defined\\\")}tt.randomBytes=U1t});var T9e=q(Pn=>{\\\"use strict\\\";u();Object.defineProperty(Pn,\\\"__esModule\\\",{value:!0});Pn.shake256=Pn.shake128=Pn.keccak_512=Pn.keccak_384=Pn.keccak_256=Pn.keccak_224=Pn.sha3_512=Pn.sha3_384=Pn.sha3_256=Pn.sha3_224=Pn.Keccak=Pn.keccakP=void 0;var r_=Qte(),yI=m9e(),i0=w9e(),E9e=[],_9e=[],C9e=[],F1t=BigInt(0),gI=BigInt(1),j1t=BigInt(2),H1t=BigInt(7),q1t=BigInt(256),z1t=BigInt(113);for(let t=0,e=gI,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],E9e.push(2*(5*n+r)),_9e.push((t+1)*(t+2)/2%64);let i=F1t;for(let s=0;s<7;s++)e=(e<<gI^(e>>H1t)*z1t)%q1t,e&j1t&&(i^=gI<<(gI<<BigInt(s))-gI);C9e.push(i)}var[$1t,V1t]=(0,yI.split)(C9e,!0),v9e=(t,e,r)=>r>32?(0,yI.rotlBH)(t,e,r):(0,yI.rotlSH)(t,e,r),x9e=(t,e,r)=>r>32?(0,yI.rotlBL)(t,e,r):(0,yI.rotlSL)(t,e,r);function S9e(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,l=r[c],d=r[c+1],f=v9e(l,d,1)^r[a],p=x9e(l,d,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=p}let i=t[2],s=t[3];for(let o=0;o<24;o++){let a=_9e[o],c=v9e(i,s,a),l=x9e(i,s,a),d=E9e[o];i=t[d],s=t[d+1],t[d]=c,t[d+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=$1t[n],t[1]^=V1t[n]}r.fill(0)}Pn.keccakP=S9e;var bI=class t extends i0.Hash{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,r_.number)(n),0>=this.blockLen||this.blockLen>=200)throw new Error(\\\"Sha3 supports only keccak-f1600 function\\\");this.state=new Uint8Array(200),this.state32=(0,i0.u32)(this.state)}keccak(){i0.isLE||(0,i0.byteSwap32)(this.state32),S9e(this.state32,this.rounds),i0.isLE||(0,i0.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(e){(0,r_.exists)(this);let{blockLen:r,state:n}=this;e=(0,i0.toBytes)(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){(0,r_.exists)(this,!1),(0,r_.bytes)(e),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error(\\\"XOF is not possible for this instance\\\");return this.writeInto(e)}xof(e){return(0,r_.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,r_.output)(e,this),this.finished)throw new Error(\\\"digest() was already called\\\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}};Pn.Keccak=bI;var Gy=(t,e,r)=>(0,i0.wrapConstructor)(()=>new bI(e,t,r));Pn.sha3_224=Gy(6,144,224/8);Pn.sha3_256=Gy(6,136,256/8);Pn.sha3_384=Gy(6,104,384/8);Pn.sha3_512=Gy(6,72,512/8);Pn.keccak_224=Gy(1,144,224/8);Pn.keccak_256=Gy(1,136,256/8);Pn.keccak_384=Gy(1,104,384/8);Pn.keccak_512=Gy(1,72,512/8);var A9e=(t,e,r)=>(0,i0.wrapXOFConstructorWithOpts)((n={})=>new bI(e,t,n.dkLen===void 0?r:n.dkLen,!0));Pn.shake128=A9e(31,168,128/8);Pn.shake256=A9e(31,136,256/8)});var rre=q((XGr,B9e)=>{u();var{keccak_256:W1t}=T9e();function I9e(t){return globalThis.Buffer.allocUnsafe(t).fill(0)}function G1t(t){return`0x${t.toString(16)}`}function K1t(t){let e=G1t(t);return new globalThis.Buffer(O9e(e.slice(2)),\\\"hex\\\")}function Z1t(t){return t.toString(2).length}function R9e(t,e){let r=t.toString(16);r.length%2!==0&&(r=\\\"0\\\"+r);let n=r.match(/.{1,2}/g).map(i=>parseInt(i,16));for(;n.length<e;)n.unshift(0);return globalThis.Buffer.from(n)}function Q1t(t,e){let r=t<0n,n;if(r){let i=(1n<<BigInt(e))-1n;n=(~t&i)+1n}else n=t;return n&=(1n<<BigInt(e))-1n,n}function P9e(t,e,r){let n=I9e(e);return t=IU(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function J1t(t,e){return P9e(t,e,!0)}function IU(t){if(!globalThis.Buffer.isBuffer(t))if(Array.isArray(t))t=globalThis.Buffer.from(t);else if(typeof t==\\\"string\\\")N9e(t)?t=globalThis.Buffer.from(O9e(k9e(t)),\\\"hex\\\"):t=globalThis.Buffer.from(t);else if(typeof t==\\\"number\\\")t=K1t(t);else if(t==null)t=globalThis.Buffer.allocUnsafe(0);else if(typeof t==\\\"bigint\\\")t=R9e(t);else if(t.toArray)t=globalThis.Buffer.from(t.toArray());else throw new Error(\\\"invalid type\\\");return t}function Y1t(t){return t=IU(t),\\\"0x\\\"+t.toString(\\\"hex\\\")}function X1t(t,e){if(t=IU(t),e||(e=256),e!==256)throw new Error(\\\"unsupported\\\");return globalThis.Buffer.from(W1t(new Uint8Array(t)))}function O9e(t){return t.length%2?\\\"0\\\"+t:t}function N9e(t){return typeof t==\\\"string\\\"&&t.match(/^0x[0-9A-Fa-f]*$/)}function k9e(t){return typeof t==\\\"string\\\"&&t.startsWith(\\\"0x\\\")?t.slice(2):t}B9e.exports={zeros:I9e,setLength:P9e,setLengthRight:J1t,isHexString:N9e,stripHexPrefix:k9e,toBuffer:IU,bufferToHex:Y1t,keccak:X1t,bitLengthFromBigInt:Z1t,bufferBEFromBigInt:R9e,twosFromBigInt:Q1t}});var j9e=q((tKr,F9e)=>{u();var Qa=rre();function D9e(t){return t.startsWith(\\\"int[\\\")?\\\"int256\\\"+t.slice(3):t===\\\"int\\\"?\\\"int256\\\":t.startsWith(\\\"uint[\\\")?\\\"uint256\\\"+t.slice(4):t===\\\"uint\\\"?\\\"uint256\\\":t.startsWith(\\\"fixed[\\\")?\\\"fixed128x128\\\"+t.slice(5):t===\\\"fixed\\\"?\\\"fixed128x128\\\":t.startsWith(\\\"ufixed[\\\")?\\\"ufixed128x128\\\"+t.slice(6):t===\\\"ufixed\\\"?\\\"ufixed128x128\\\":t}function n_(t){return Number.parseInt(/^\\\\D+(\\\\d+)$/.exec(t)[1],10)}function M9e(t){var e=/^\\\\D+(\\\\d+)x(\\\\d+)$/.exec(t);return[Number.parseInt(e[1],10),Number.parseInt(e[2],10)]}function L9e(t){var e=t.match(/(.*)\\\\[(.*?)\\\\]$/);return e?e[2]===\\\"\\\"?\\\"dynamic\\\":Number.parseInt(e[2],10):null}function Fv(t){var e=typeof t;if(e===\\\"string\\\"||e===\\\"number\\\")return BigInt(t);if(e===\\\"bigint\\\")return t;throw new Error(\\\"Argument is not a number\\\")}function Op(t,e){var r,n,i,s;if(t===\\\"address\\\")return Op(\\\"uint160\\\",Fv(e));if(t===\\\"bool\\\")return Op(\\\"uint8\\\",e?1:0);if(t===\\\"string\\\")return Op(\\\"bytes\\\",new globalThis.Buffer(e,\\\"utf8\\\"));if(tbt(t)){if(typeof e.length>\\\"u\\\")throw new Error(\\\"Not an array?\\\");if(r=L9e(t),r!==\\\"dynamic\\\"&&r!==0&&e.length>r)throw new Error(\\\"Elements exceed array size: \\\"+r);i=[],t=t.slice(0,t.lastIndexOf(\\\"[\\\")),typeof e==\\\"string\\\"&&(e=JSON.parse(e));for(s in e)i.push(Op(t,e[s]));if(r===\\\"dynamic\\\"){var o=Op(\\\"uint256\\\",e.length);i.unshift(o)}return globalThis.Buffer.concat(i)}else{if(t===\\\"bytes\\\")return e=new globalThis.Buffer(e),i=globalThis.Buffer.concat([Op(\\\"uint256\\\",e.length),e]),e.length%32!==0&&(i=globalThis.Buffer.concat([i,Qa.zeros(32-e.length%32)])),i;if(t.startsWith(\\\"bytes\\\")){if(r=n_(t),r<1||r>32)throw new Error(\\\"Invalid bytes<N> width: \\\"+r);return Qa.setLengthRight(e,32)}else if(t.startsWith(\\\"uint\\\")){if(r=n_(t),r%8||r<8||r>256)throw new Error(\\\"Invalid uint<N> width: \\\"+r);n=Fv(e);let a=Qa.bitLengthFromBigInt(n);if(a>r)throw new Error(\\\"Supplied uint exceeds width: \\\"+r+\\\" vs \\\"+a);if(n<0)throw new Error(\\\"Supplied uint is negative\\\");return Qa.bufferBEFromBigInt(n,32)}else if(t.startsWith(\\\"int\\\")){if(r=n_(t),r%8||r<8||r>256)throw new Error(\\\"Invalid int<N> width: \\\"+r);n=Fv(e);let a=Qa.bitLengthFromBigInt(n);if(a>r)throw new Error(\\\"Supplied int exceeds width: \\\"+r+\\\" vs \\\"+a);let c=Qa.twosFromBigInt(n,256);return Qa.bufferBEFromBigInt(c,32)}else if(t.startsWith(\\\"ufixed\\\")){if(r=M9e(t),n=Fv(e),n<0)throw new Error(\\\"Supplied ufixed is negative\\\");return Op(\\\"uint256\\\",n*BigInt(2)**BigInt(r[1]))}else if(t.startsWith(\\\"fixed\\\"))return r=M9e(t),Op(\\\"int256\\\",Fv(e)*BigInt(2)**BigInt(r[1]))}throw new Error(\\\"Unsupported or invalid type: \\\"+t)}function ebt(t){return t===\\\"string\\\"||t===\\\"bytes\\\"||L9e(t)===\\\"dynamic\\\"}function tbt(t){return t.lastIndexOf(\\\"]\\\")===t.length-1}function rbt(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=D9e(t[s]),a=e[s],c=Op(o,a);ebt(o)?(r.push(Op(\\\"uint256\\\",i)),n.push(c),i+=c.length):r.push(c)}return globalThis.Buffer.concat(r.concat(n))}function U9e(t,e){if(t.length!==e.length)throw new Error(\\\"Number of types are not matching the values\\\");for(var r,n,i=[],s=0;s<t.length;s++){var o=D9e(t[s]),a=e[s];if(o===\\\"bytes\\\")i.push(a);else if(o===\\\"string\\\")i.push(new globalThis.Buffer(a,\\\"utf8\\\"));else if(o===\\\"bool\\\")i.push(new globalThis.Buffer(a?\\\"01\\\":\\\"00\\\",\\\"hex\\\"));else if(o===\\\"address\\\")i.push(Qa.setLength(a,20));else if(o.startsWith(\\\"bytes\\\")){if(r=n_(o),r<1||r>32)throw new Error(\\\"Invalid bytes<N> width: \\\"+r);i.push(Qa.setLengthRight(a,r))}else if(o.startsWith(\\\"uint\\\")){if(r=n_(o),r%8||r<8||r>256)throw new Error(\\\"Invalid uint<N> width: \\\"+r);n=Fv(a);let c=Qa.bitLengthFromBigInt(n);if(c>r)throw new Error(\\\"Supplied uint exceeds width: \\\"+r+\\\" vs \\\"+c);i.push(Qa.bufferBEFromBigInt(n,r/8))}else if(o.startsWith(\\\"int\\\")){if(r=n_(o),r%8||r<8||r>256)throw new Error(\\\"Invalid int<N> width: \\\"+r);n=Fv(a);let c=Qa.bitLengthFromBigInt(n);if(c>r)throw new Error(\\\"Supplied int exceeds width: \\\"+r+\\\" vs \\\"+c);let l=Qa.twosFromBigInt(n,r);i.push(Qa.bufferBEFromBigInt(l,r/8))}else throw new Error(\\\"Unsupported or invalid type: \\\"+o)}return globalThis.Buffer.concat(i)}function nbt(t,e){return Qa.keccak(U9e(t,e))}F9e.exports={rawEncode:rbt,solidityPack:U9e,soliditySHA3:nbt}});var z9e=q((nKr,q9e)=>{u();var sf=rre(),wI=j9e(),H9e={type:\\\"object\\\",properties:{types:{type:\\\"object\\\",additionalProperties:{type:\\\"array\\\",items:{type:\\\"object\\\",properties:{name:{type:\\\"string\\\"},type:{type:\\\"string\\\"}},required:[\\\"name\\\",\\\"type\\\"]}}},primaryType:{type:\\\"string\\\"},domain:{type:\\\"object\\\"},message:{type:\\\"object\\\"}},required:[\\\"types\\\",\\\"primaryType\\\",\\\"domain\\\",\\\"message\\\"]},nre={encodeData(t,e,r,n=!0){let i=[\\\"bytes32\\\"],s=[this.hashType(t,r)];if(n){let o=(a,c,l)=>{if(r[c]!==void 0)return[\\\"bytes32\\\",l==null?\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\":sf.keccak(this.encodeData(c,l,r,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c===\\\"bytes\\\")return[\\\"bytes32\\\",sf.keccak(l)];if(c===\\\"string\\\")return typeof l==\\\"string\\\"&&(l=globalThis.Buffer.from(l,\\\"utf8\\\")),[\\\"bytes32\\\",sf.keccak(l)];if(c.lastIndexOf(\\\"]\\\")===c.length-1){let d=c.slice(0,c.lastIndexOf(\\\"[\\\")),f=l.map(p=>o(a,d,p));return[\\\"bytes32\\\",sf.keccak(wI.rawEncode(f.map(([p])=>p),f.map(([,p])=>p)))]}return[c,l]};for(let a of r[t]){let[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(let o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type===\\\"bytes\\\")i.push(\\\"bytes32\\\"),a=sf.keccak(a),s.push(a);else if(o.type===\\\"string\\\")i.push(\\\"bytes32\\\"),typeof a==\\\"string\\\"&&(a=globalThis.Buffer.from(a,\\\"utf8\\\")),a=sf.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push(\\\"bytes32\\\"),a=sf.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf(\\\"]\\\")===o.type.length-1)throw new Error(\\\"Arrays currently unimplemented in encodeData\\\");i.push(o.type),s.push(a)}}return wI.rawEncode(i,s)},encodeType(t,e){let r=\\\"\\\",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(let i of n){if(!e[i])throw new Error(\\\"No type definition specified: \\\"+i);r+=i+\\\"(\\\"+e[i].map(({name:o,type:a})=>a+\\\" \\\"+o).join(\\\",\\\")+\\\")\\\"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\\\\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(let n of e[t])for(let i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return sf.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return sf.keccak(this.encodeType(t,e))},sanitizeData(t){let e={};for(let r in H9e.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){let r=this.sanitizeData(t),n=[globalThis.Buffer.from(\\\"1901\\\",\\\"hex\\\")];return n.push(this.hashStruct(\\\"EIP712Domain\\\",r.domain,r.types,e)),r.primaryType!==\\\"EIP712Domain\\\"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),sf.keccak(globalThis.Buffer.concat(n))}};q9e.exports={TYPED_MESSAGE_SCHEMA:H9e,TypedDataUtils:nre,hashForSignTypedDataLegacy:function(t){return ibt(t.data)},hashForSignTypedData_v3:function(t){return nre.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return nre.hash(t.data)}};function ibt(t){let e=new Error(\\\"Expect argument to be non-empty array\\\");if(typeof t!=\\\"object\\\"||!t.length)throw e;let r=t.map(function(s){return s.type===\\\"bytes\\\"?sf.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+\\\" \\\"+s.name});return wI.soliditySHA3([\\\"bytes32\\\",\\\"bytes32\\\"],[wI.soliditySHA3(new Array(t.length).fill(\\\"string\\\"),i),wI.soliditySHA3(n,r)])}});var $9e,vI,V9e,RU=x(()=>{u();$9e=\\\"walletUsername\\\",vI=\\\"Addresses\\\",V9e=\\\"AppVersion\\\"});var PU,W9e=x(()=>{u();tf();PU=class{constructor(e){this.secret=e}async encrypt(e){let r=this.secret;if(r.length!==64)throw new Error(\\\"secret must be 256 bits\\\");let n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey(\\\"raw\\\",i3(r),{name:\\\"aes-gcm\\\"},!1,[\\\"encrypt\\\",\\\"decrypt\\\"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:\\\"AES-GCM\\\",iv:n},i,s.encode(e)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),d=new Uint8Array(c),f=new Uint8Array(l),p=new Uint8Array([...n,...d,...f]);return DT(p)}async decrypt(e){let r=this.secret;if(r.length!==64)throw new Error(\\\"secret must be 256 bits\\\");return new Promise((n,i)=>{(async()=>{let s=await crypto.subtle.importKey(\\\"raw\\\",i3(r),{name:\\\"aes-gcm\\\"},!1,[\\\"encrypt\\\",\\\"decrypt\\\"]),o=i3(e),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),d=new Uint8Array([...l,...c]),f={name:\\\"AES-GCM\\\",iv:new Uint8Array(a)};try{let p=await window.crypto.subtle.decrypt(f,s,d),h=new TextDecoder;n(h.decode(p))}catch(p){i(p)}})()})}}});var OU,G9e=x(()=>{u();OU=class{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;let i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:\\\"POST\\\",headers:{Authorization:this.auth}}))).catch(r=>console.error(\\\"Unable to mark events as seen:\\\",r))}async fetchUnseenEvents(){var e;let r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){let{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let s=(e=n?.filter(o=>o.event===\\\"Web3Response\\\").map(o=>({type:\\\"Event\\\",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${r.status}`)}}});var of,jv,K9e=x(()=>{u();(function(t){t[t.DISCONNECTED=0]=\\\"DISCONNECTED\\\",t[t.CONNECTING=1]=\\\"CONNECTING\\\",t[t.CONNECTED=2]=\\\"CONNECTED\\\"})(of||(of={}));jv=class t{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.isDisconnecting=!1,this.url=e.replace(/^http/,\\\"ws\\\"),this.instanceId=t.instanceCounter++,t.activeInstances.add(this.instanceId)}async connect(){if(this.webSocket)throw new Error(\\\"webSocket object is not null\\\");if(this.isDisconnecting)throw new Error(\\\"WebSocket is disconnecting, cannot reconnect on same instance\\\");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){r(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,of.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),i.readyState!==WebSocket.OPEN&&r(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,of.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,of.CONNECTED),t.pendingData.length>0&&([...t.pendingData].forEach(c=>this.sendData(c)),t.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data===\\\"h\\\")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:\\\"Heartbeat\\\"});else try{let c=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var e;let{webSocket:r}=this;if(r){this.isDisconnecting=!0,this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,of.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:r}=this;if(!r){t.pendingData.push(e),this.isDisconnecting||this.connect();return}if(r.readyState!==WebSocket.OPEN){t.pendingData.push(e);return}r.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}cleanup(){t.activeInstances.delete(this.instanceId)}};jv.instanceCounter=0;jv.activeInstances=new Set;jv.pendingData=[]});var Z9e,sbt,NU,Q9e=x(()=>{u();Kte();DX();RU();W9e();G9e();K9e();Z9e=1e4,sbt=6e4,NU=class{constructor({session:e,linkAPIUrl:r,listener:n}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=Xd(1),this.reconnectAttempts=0,this.isReconnecting=!1,this._connected=!1,this._linked=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=s=>{if(!s)return;new Map([[\\\"__destroyed\\\",this.handleDestroyed],[\\\"EthereumAddress\\\",this.handleAccountUpdated],[\\\"WalletUsername\\\",this.handleWalletUsernameUpdated],[\\\"AppVersion\\\",this.handleAppVersionUpdated],[\\\"ChainId\\\",a=>s.JsonRpcUrl&&this.handleChainUpdated(a,s.JsonRpcUrl)]]).forEach((a,c)=>{let l=s[c];l!==void 0&&a(l)})},this.handleDestroyed=s=>{var o;s===\\\"1\\\"&&((o=this.listener)===null||o===void 0||o.resetAndReload())},this.handleAccountUpdated=async s=>{var o;try{let a=await this.cipher.decrypt(s);(o=this.listener)===null||o===void 0||o.accountUpdated(a)}catch{}},this.handleMetadataUpdated=async(s,o)=>{var a;try{let c=await this.cipher.decrypt(o);(a=this.listener)===null||a===void 0||a.metadataUpdated(s,c)}catch{}},this.handleWalletUsernameUpdated=async s=>{this.handleMetadataUpdated($9e,s)},this.handleAppVersionUpdated=async s=>{this.handleMetadataUpdated(V9e,s)},this.handleChainUpdated=async(s,o)=>{var a;try{let c=await this.cipher.decrypt(s),l=await this.cipher.decrypt(o);(a=this.listener)===null||a===void 0||a.chainUpdated(c,l)}catch{}},this.session=e,this.cipher=new PU(e.secret),this.listener=n,this.linkAPIUrl=r,this.WebSocketClass=WebSocket;let i=this.createWebSocket();this.ws=i,this.http=new OU(r,e.id,e.key),this.setupVisibilityChangeHandler()}createWebSocket(){let e=new jv(`${this.linkAPIUrl}/rpc`,this.WebSocketClass);return this.activeWsInstance=e,e.setConnectionStateListener(async r=>{if(e!==this.activeWsInstance)return;let n=!1;switch(r){case of.DISCONNECTED:this.heartbeatIntervalId&&(clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=void 0),this.lastHeartbeatResponse=0,n=!1,this.destroyed||(async()=>{if(this.isReconnecting)return;this.isReconnecting=!0;let s=this.reconnectAttempts===0?0:3e3;await new Promise(o=>setTimeout(o,s)),!this.destroyed&&e===this.activeWsInstance?(this.reconnectAttempts++,\\\"cleanup\\\"in this.ws&&typeof this.ws.cleanup==\\\"function\\\"&&this.ws.cleanup(),this.ws=this.createWebSocket(),this.ws.connect().catch(()=>{Gte()}).finally(()=>{this.isReconnecting=!1})):this.isReconnecting=!1})();break;case of.CONNECTED:this.reconnectAttempts=0;try{n=await this.handleConnected(),this.fetchUnseenEventsAPI().catch(()=>{})}catch{break}this.connected=n,this.updateLastHeartbeat(),this.heartbeatIntervalId&&clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=window.setInterval(()=>{this.heartbeat()},Z9e),setTimeout(()=>{this.heartbeat()},100);break;case of.CONNECTING:break}r!==of.CONNECTED&&(this.connected=n)}),e.setIncomingDataListener(r=>{var n;switch(r.type){case\\\"Heartbeat\\\":this.updateLastHeartbeat();return;case\\\"IsLinkedOK\\\":case\\\"Linked\\\":{let i=r.type===\\\"IsLinkedOK\\\"?r.linked:void 0;this.linked=i||r.onlineGuests>0;break}case\\\"GetSessionConfigOK\\\":case\\\"SessionConfigUpdated\\\":{this.handleSessionMetadataUpdated(r.metadata);break}case\\\"Event\\\":{this.handleIncomingEvent(r);break}}r.id!==void 0&&((n=this.requestResolutions.get(r.id))===null||n===void 0||n(r))}),e}setupVisibilityChangeHandler(){this.visibilityChangeHandler=()=>{!document.hidden&&!this.destroyed&&(this.connected?this.heartbeat():this.reconnectWithFreshWebSocket())},this.focusHandler=()=>{!this.destroyed&&!this.connected&&this.reconnectWithFreshWebSocket()},document.addEventListener(\\\"visibilitychange\\\",this.visibilityChangeHandler),window.addEventListener(\\\"focus\\\",this.focusHandler),window.addEventListener(\\\"pageshow\\\",e=>{e.persisted&&this.focusHandler&&this.focusHandler()})}reconnectWithFreshWebSocket(){if(this.destroyed)return;let e=this.ws;this.activeWsInstance=void 0,e.disconnect(),\\\"cleanup\\\"in e&&typeof e.cleanup==\\\"function\\\"&&e.cleanup(),this.ws=this.createWebSocket(),this.ws.connect().catch(()=>{Gte()})}connect(){if(this.destroyed)throw new Error(\\\"instance is destroyed\\\");this.ws.connect()}async destroy(){this.destroyed||(await this.makeRequest({type:\\\"SetSessionConfig\\\",id:Xd(this.nextReqId++),sessionId:this.session.id,metadata:{__destroyed:\\\"1\\\"}},{timeout:1e3}),this.destroyed=!0,this.activeWsInstance=void 0,this.heartbeatIntervalId&&(clearInterval(this.heartbeatIntervalId),this.heartbeatIntervalId=void 0),this.visibilityChangeHandler&&document.removeEventListener(\\\"visibilitychange\\\",this.visibilityChangeHandler),this.focusHandler&&window.removeEventListener(\\\"focus\\\",this.focusHandler),this.ws.disconnect(),\\\"cleanup\\\"in this.ws&&typeof this.ws.cleanup==\\\"function\\\"&&this.ws.cleanup(),this.listener=void 0)}get connected(){return this._connected}set connected(e){this._connected=e}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(e){var r;if(!(e.type!==\\\"Event\\\"||e.event!==\\\"Web3Response\\\"))try{let n=await this.cipher.decrypt(e.data),i=JSON.parse(n);if(i.type!==\\\"WEB3_RESPONSE\\\")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i.id,i.response)}catch{}}async checkUnseenEvents(){await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error(\\\"Unable to check for unseen events\\\",e)}}async fetchUnseenEventsAPI(){try{(await this.http.fetchUnseenEvents()).forEach(r=>{this.handleIncomingEvent(r)})}catch{qIe()}}async publishEvent(e,r,n=!1){let i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,location:location.href,relaySource:\\\"coinbaseWalletExtension\\\"in window&&window.coinbaseWalletExtension?\\\"injected_sdk\\\":\\\"sdk\\\"}))),s={type:\\\"PublishEvent\\\",id:Xd(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{let o=await this.makeRequest(s);if(o.type===\\\"Fail\\\")throw new Error(o.error||\\\"failed to publish event\\\");return o.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Z9e*2){this.ws.disconnect();return}if(this.connected)try{this.ws.sendData(\\\"h\\\")}catch{}}async makeRequest(e,r={timeout:sbt}){let n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,o)=>{i=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r.timeout)}),new Promise(s=>{this.requestResolutions.set(n,o=>{clearTimeout(i),s(o),this.requestResolutions.delete(n)})})])}async handleConnected(){return(await this.makeRequest({type:\\\"HostSession\\\",id:Xd(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key})).type===\\\"Fail\\\"?!1:(this.sendData({type:\\\"IsLinked\\\",id:Xd(this.nextReqId++),sessionId:this.session.id}),this.sendData({type:\\\"GetSessionConfig\\\",id:Xd(this.nextReqId++),sessionId:this.session.id}),!0)}}});var kU,J9e=x(()=>{u();tf();kU=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=UX(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}}});function obt(t){return t instanceof Uint8Array||t!=null&&typeof t==\\\"object\\\"&&t.constructor.name===\\\"Uint8Array\\\"}function BU(t,...e){if(!obt(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function ire(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function Y9e(t,e){BU(t);let r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var sre=x(()=>{u()});function X9e(t){BU(t);let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=abt[t[r]];return e}function cbt(t){if(typeof t!=\\\"string\\\")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function ore(t){return typeof t==\\\"string\\\"&&(t=cbt(t)),BU(t),t}function e7e(t){let e=n=>t().update(ore(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}var DU,af,IKr,abt,MU,RKr,LU=x(()=>{u();sre();DU=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),af=(t,e)=>t<<32-e|t>>>e,IKr=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,abt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));MU=class{clone(){return this._cloneInto()}},RKr={}.toString});function lbt(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}var t7e,r7e,UU,n7e=x(()=>{u();sre();LU();t7e=(t,e,r)=>t&e^~t&r,r7e=(t,e,r)=>t&e^t&r^e&r,UU=class extends MU{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=DU(this.buffer)}update(e){ire(this);let{view:r,buffer:n,blockLen:i}=this;e=ore(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=DU(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ire(this),Y9e(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;lbt(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=DU(e),c=this.outputLen;if(c%4)throw new Error(\\\"_sha2: outputLen should be aligned to 32bit\\\");let l=c/4,d=this.get();if(l>d.length)throw new Error(\\\"_sha2: outputLen bigger than state\\\");for(let f=0;f<l;f++)a.setUint32(4*f,d[f],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}}});var ubt,Ky,Zy,are,i7e,s7e=x(()=>{u();n7e();LU();ubt=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]),Ky=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Zy=new Uint32Array(64),are=class extends UU{constructor(){super(64,32,8,!1),this.A=Ky[0]|0,this.B=Ky[1]|0,this.C=Ky[2]|0,this.D=Ky[3]|0,this.E=Ky[4]|0,this.F=Ky[5]|0,this.G=Ky[6]|0,this.H=Ky[7]|0}get(){let{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Zy[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){let p=Zy[f-15],h=Zy[f-2],m=af(p,7)^af(p,18)^p>>>3,g=af(h,17)^af(h,19)^h>>>10;Zy[f]=g+Zy[f-7]+m+Zy[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:d}=this;for(let f=0;f<64;f++){let p=af(a,6)^af(a,11)^af(a,25),h=d+p+t7e(a,c,l)+ubt[f]+Zy[f]|0,g=(af(n,2)^af(n,13)^af(n,22))+r7e(n,i,s)|0;d=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+g|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,s,o,a,c,l,d)}roundClean(){Zy.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},i7e=e7e(()=>new are)});var o7e,a7e,c7e,i_,l7e=x(()=>{u();s7e();LU();tf();o7e=\\\"session:id\\\",a7e=\\\"session:secret\\\",c7e=\\\"session:linked\\\",i_=class t{constructor(e,r,n,i=!1){this.storage=e,this.id=r,this.secret=n,this.key=X9e(i7e(`${r}, ${n} WalletLink`)),this._linked=!!i}static create(e){let r=Wm(16),n=Wm(32);return new t(e,r,n).save()}static load(e){let r=e.getItem(o7e),n=e.getItem(c7e),i=e.getItem(a7e);return r&&i?new t(e,r,i,n===\\\"1\\\"):null}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this.storage.setItem(o7e,this.id),this.storage.setItem(a7e,this.secret),this.persistLinked(),this}persistLinked(){this.storage.setItem(c7e,this._linked?\\\"1\\\":\\\"0\\\")}}});var u7e,d7e=x(()=>{u();u7e=\\\".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}\\\"});var FU,dbt,f7e=x(()=>{u();Fy();d3();d3();zX();nL();FT();d7e();FU=class{constructor(){this.root=null,this.darkMode=rL()}attach(){let e=document.documentElement;this.root=document.createElement(\\\"div\\\"),this.root.className=\\\"-cbwsdk-css-reset\\\",e.appendChild(this.root),GD()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&(UT(null,this.root),e&&UT(zr(dbt,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}},dbt=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{let s=r?\\\"dark\\\":\\\"light\\\";return zr(tee,{darkMode:r},zr(\\\"div\\\",{class:\\\"-cbwsdk-redirect-dialog\\\"},zr(\\\"style\\\",null,u7e),zr(\\\"div\\\",{class:\\\"-cbwsdk-redirect-dialog-backdrop\\\",onClick:i}),zr(\\\"div\\\",{class:Qm(\\\"-cbwsdk-redirect-dialog-box\\\",s)},zr(\\\"p\\\",null,t),zr(\\\"button\\\",{onClick:n},e))))}});var xI,p7e=x(()=>{u();a3();f7e();FT();xI=class{constructor(){this.attached=!1,this.redirectDialog=new FU}attach(){if(this.attached)throw new Error(\\\"Coinbase Wallet SDK UI is already attached\\\");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let r=new URL(_4e);r.searchParams.append(\\\"redirect_url\\\",n8e().href),e&&r.searchParams.append(\\\"wl_url\\\",e);let n=document.createElement(\\\"a\\\");n.target=\\\"cbw-opener\\\",n.href=r.href,n.rel=\\\"noreferrer noopener\\\",n.click()}openCoinbaseWalletDeeplink(e){this.redirectToCoinbaseWallet(e),setTimeout(()=>{this.redirectDialog.present({title:\\\"Redirecting to Coinbase Wallet...\\\",buttonText:\\\"Open\\\",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}})},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}}});var EI,h7e=x(()=>{u();va();HT();tf();Q9e();RU();J9e();l7e();cL();FT();nee();p7e();EI=class t{constructor(e){this.chainCallbackParams={chainId:\\\"\\\",jsonRpcUrl:\\\"\\\"},this.isMobileWeb=i8e(),this.linkedUpdated=s=>{this.isLinked=s;let o=this.storage.getItem(vI);if(s&&(this._session.linked=s),this.isUnlinkedErrorState=!1,o){let a=o.split(\\\" \\\"),c=this.storage.getItem(\\\"IsStandaloneSigning\\\")===\\\"true\\\";a[0]!==\\\"\\\"&&!s&&this._session.linked&&!c&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(s,o)=>{this.storage.setItem(s,o)},this.chainUpdated=(s,o)=>{this.chainCallbackParams.chainId===s&&this.chainCallbackParams.jsonRpcUrl===o||(this.chainCallbackParams={chainId:s,jsonRpcUrl:o},this.chainCallback&&this.chainCallback(o,Number.parseInt(s,10)))},this.accountUpdated=s=>{this.accountsCallback&&this.accountsCallback([s]),t.accountRequestCallbackIds.size>0&&(Array.from(t.accountRequestCallbackIds.values()).forEach(o=>{this.invokeCallback(o,{method:\\\"requestEthereumAccounts\\\",result:[s]})}),t.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.metadata=e.metadata,this.accountsCallback=e.accountsCallback,this.chainCallback=e.chainCallback;let{session:r,ui:n,connection:i}=this.subscribe();this._session=r,this.connection=i,this.relayEventManager=new kU,this.ui=n,this.ui.attach()}subscribe(){let e=i_.load(this.storage)||i_.create(this.storage),{linkAPIUrl:r}=this,n=new NU({session:e,linkAPIUrl:r,listener:this}),i=this.isMobileWeb?new xI:new iL;return n.connect(),{session:e,ui:i,connection:n}}resetAndReload(){this.connection.destroy().then(()=>{let e=i_.load(this.storage);e?.id===this._session.id&&Sp.clearAll(),document.location.reload()}).catch(e=>{})}signEthereumTransaction(e){return this.sendRequest({method:\\\"signEthereumTransaction\\\",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:ef(e.weiValue),data:mv(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?ef(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?ef(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?ef(e.gasPriceInWei):null,gasLimit:e.gasLimit?ef(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:\\\"signEthereumTransaction\\\",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:ef(e.weiValue),data:mv(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?ef(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?ef(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?ef(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?ef(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:\\\"submitEthereumTransaction\\\",params:{signedTransaction:mv(e,!0),chainId:r}})}getWalletLinkSession(){return this._session}sendRequest(e){let r=null,n=Wm(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,s),r?.()};return new Promise((s,o)=>{r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,a=>{if(r?.(),Ss(a))return o(new Error(a.errorMessage));s(a)}),this.publishWeb3RequestEvent(n,e)})}publishWeb3RequestEvent(e,r){let n={type:\\\"WEB3_REQUEST\\\",id:e,request:r};this.publishEvent(\\\"Web3Request\\\",n,!0).then(i=>{}).catch(i=>{this.handleWeb3ResponseMessage(n.id,{method:r.method,errorMessage:i.message})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(r.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof xI)switch(e){case\\\"requestEthereumAccounts\\\":case\\\"switchEthereumChain\\\":return;default:window.addEventListener(\\\"blur\\\",()=>{window.addEventListener(\\\"focus\\\",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){let r={type:\\\"WEB3_REQUEST_CANCELED\\\",id:e};this.publishEvent(\\\"Web3RequestCanceled\\\",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e,r){if(r.method===\\\"requestEthereumAccounts\\\"){t.accountRequestCallbackIds.forEach(n=>this.invokeCallback(n,r)),t.accountRequestCallbackIds.clear();return}this.invokeCallback(e,r)}handleErrorResponse(e,r,n){var i;let s=(i=n?.message)!==null&&i!==void 0?i:\\\"Unspecified error message.\\\";this.handleWeb3ResponseMessage(e,{method:r,errorMessage:s})}invokeCallback(e,r){let n=this.relayEventManager.callbacks.get(e);n&&(n(r),this.relayEventManager.callbacks.delete(e))}requestEthereumAccounts(){let{appName:e,appLogoUrl:r}=this.metadata,n={method:\\\"requestEthereumAccounts\\\",params:{appName:e,appLogoUrl:r}},i=null,s=Wm(8);return new Promise((o,a)=>{this.relayEventManager.callbacks.set(s,c=>{if(i?.(),Ss(c))return a(new Error(c.errorMessage));o(c)}),t.accountRequestCallbackIds.add(s),this.publishWeb3RequestEvent(s,n)})}watchAsset(e,r,n,i,s,o){let a={method:\\\"watchAsset\\\",params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}},c=null,l=Wm(8),d=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c?.()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}),new Promise((f,p)=>{this.relayEventManager.callbacks.set(l,h=>{if(c?.(),Ss(h))return p(new Error(h.errorMessage));f(h)}),this.publishWeb3RequestEvent(l,a)})}addEthereumChain(e,r,n,i,s,o){let a={method:\\\"addEthereumChain\\\",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}},c=null,l=Wm(8),d=f=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,f),c?.()};return c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}),new Promise((f,p)=>{this.relayEventManager.callbacks.set(l,h=>{if(c?.(),Ss(h))return p(new Error(h.errorMessage));f(h)}),this.publishWeb3RequestEvent(l,a)})}switchEthereumChain(e,r){let n={method:\\\"switchEthereumChain\\\",params:Object.assign({chainId:e},{address:r})},i=null,s=Wm(8),o=a=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,n.method,a),i?.()};return i=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:o,onResetConnection:this.resetAndReload}),new Promise((a,c)=>{this.relayEventManager.callbacks.set(s,l=>{if(i?.(),Ss(l)&&l.errorCode)return c(pe.provider.custom({code:l.errorCode,message:\\\"Unrecognized chain ID. Try adding the chain using addEthereumChain first.\\\"}));if(Ss(l))return c(new Error(l.errorMessage));a(l)}),this.publishWeb3RequestEvent(s,n)})}};EI.accountRequestCallbackIds=new Set});var _I,m7e,g7e,CI,y7e=x(()=>{u();a3();va();HT();Kte();iee();tf();dL();o3();_I=Me(z9e(),1);h7e();RU();cL();m7e=\\\"DefaultChainId\\\",g7e=\\\"DefaultJsonRpcUrl\\\",CI=class{constructor(e){this._relay=null,this._addresses=[],this.metadata=e.metadata,this._storage=new Sp(\\\"walletlink\\\",qX),this.callback=e.callback||null;let r=this._storage.getItem(vI);if(r){let n=r.split(\\\" \\\");n[0]!==\\\"\\\"&&(this._addresses=n.map(i=>Km(i)))}this.initializeRelay()}getSession(){let e=this.initializeRelay(),{id:r,secret:n}=e.getWalletLinkSession();return{id:r,secret:n}}async handshake(e){let r=\\\"eth_requestAccounts\\\",n=Uc.get(e);DIe({method:r,correlationId:n});try{await this._eth_requestAccounts(),UIe({method:r,correlationId:n})}catch(i){throw LIe({method:r,correlationId:n,errorMessage:Jm(i)}),i}}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(g7e))!==null&&e!==void 0?e:void 0}set jsonRpcUrl(e){this._storage.setItem(g7e,e)}updateProviderInfo(e,r){var n;this.jsonRpcUrl=e;let i=this.getChainId();this._storage.setItem(m7e,r.toString(10)),gv(r)!==i&&((n=this.callback)===null||n===void 0||n.call(this,\\\"chainChanged\\\",Gm(r)))}async watchAsset(e){let r=Array.isArray(e)?e[0]:e;if(!r.type)throw pe.rpc.invalidParams(\\\"Type is required\\\");if(r?.type!==\\\"ERC20\\\")throw pe.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw pe.rpc.invalidParams(\\\"Options are required\\\");if(!r?.options.address)throw pe.rpc.invalidParams(\\\"Address is required\\\");let n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=r.options,l=await this.initializeRelay().watchAsset(r.type,i,s,a,o,n?.toString());return Ss(l)?!1:!!l.result}async addEthereumChain(e){var r,n;let i=e[0];if(((r=i.rpcUrls)===null||r===void 0?void 0:r.length)===0)throw pe.rpc.invalidParams(\\\"please pass in at least 1 rpcUrl\\\");if(!i.chainName||i.chainName.trim()===\\\"\\\")throw pe.rpc.invalidParams(\\\"chainName is a required field\\\");if(!i.nativeCurrency)throw pe.rpc.invalidParams(\\\"nativeCurrency is a required field\\\");let s=Number.parseInt(i.chainId,16);if(s===this.getChainId())return!1;let o=this.initializeRelay(),{rpcUrls:a=[],blockExplorerUrls:c=[],chainName:l,iconUrls:d=[],nativeCurrency:f}=i,p=await o.addEthereumChain(s.toString(),a,d,c,l,f);if(Ss(p))return!1;if(((n=p.result)===null||n===void 0?void 0:n.isApproved)===!0)return this.updateProviderInfo(a[0],s),null;throw pe.rpc.internal(\\\"unable to add ethereum chain\\\")}async switchEthereumChain(e){let r=e[0],n=Number.parseInt(r.chainId,16),s=await this.initializeRelay().switchEthereumChain(n.toString(10),this.selectedAddress||void 0);if(Ss(s))throw s;let o=s.result;return o.isApproved&&o.rpcUrl.length>0&&this.updateProviderInfo(o.rpcUrl,n),null}async cleanup(){this.callback=null,this._relay&&this._relay.resetAndReload(),this._storage.clear()}_setAddresses(e,r){var n;if(!Array.isArray(e))throw new Error(\\\"addresses is not an array\\\");let i=e.map(s=>Km(s));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,(n=this.callback)===null||n===void 0||n.call(this,\\\"accountsChanged\\\",i),this._storage.setItem(vI,i.join(\\\" \\\")))}async request(e){let r=Uc.get(e);FIe({method:e.method,correlationId:r});try{let n=await this._request(e);return HIe({method:e.method,correlationId:r}),n}catch(n){throw jIe({method:e.method,correlationId:r,errorMessage:Jm(n)}),n}}async _request(e){let r=e.params||[];switch(e.method){case\\\"eth_accounts\\\":return[...this._addresses];case\\\"eth_coinbase\\\":return this.selectedAddress||null;case\\\"net_version\\\":return this.getChainId().toString(10);case\\\"eth_chainId\\\":return Gm(this.getChainId());case\\\"eth_requestAccounts\\\":return this._eth_requestAccounts();case\\\"eth_ecRecover\\\":case\\\"personal_ecRecover\\\":return this.ecRecover(e);case\\\"personal_sign\\\":return this.personalSign(e);case\\\"eth_signTransaction\\\":return this._eth_signTransaction(r);case\\\"eth_sendRawTransaction\\\":return this._eth_sendRawTransaction(r);case\\\"eth_sendTransaction\\\":return this._eth_sendTransaction(r);case\\\"eth_signTypedData_v1\\\":case\\\"eth_signTypedData_v3\\\":case\\\"eth_signTypedData_v4\\\":case\\\"eth_signTypedData\\\":return this.signTypedData(e);case\\\"wallet_addEthereumChain\\\":return this.addEthereumChain(r);case\\\"wallet_switchEthereumChain\\\":return this.switchEthereumChain(r);case\\\"wallet_watchAsset\\\":return this.watchAsset(r);default:if(!this.jsonRpcUrl)throw pe.rpc.internal(\\\"No RPC URL set for chain\\\");return Ly(e,this.jsonRpcUrl)}}_ensureKnownAddress(e){let r=Km(e);if(!this._addresses.map(i=>Km(i)).includes(r))throw new Error(\\\"Unknown Ethereum address\\\")}_prepareTransactionParams(e){let r=e.from?Km(e.from):this.selectedAddress;if(!r)throw new Error(\\\"Ethereum address is unavailable\\\");this._ensureKnownAddress(r);let n=e.to?Km(e.to):null,i=e.value!=null?s3(e.value):BigInt(0),s=e.data?jD(e.data):globalThis.Buffer.alloc(0),o=e.nonce!=null?gv(e.nonce):null,a=e.gasPrice!=null?s3(e.gasPrice):null,c=e.maxFeePerGas!=null?s3(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?s3(e.maxPriorityFeePerGas):null,d=e.gas!=null?s3(e.gas):null,f=e.chainId?gv(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:d,chainId:f}}async ecRecover(e){let{method:r,params:n}=e;if(!Array.isArray(n))throw pe.rpc.invalidParams();let s=await this.initializeRelay().sendRequest({method:\\\"ethereumAddressFromSignedMessage\\\",params:{message:LD(n[0]),signature:LD(n[1]),addPrefix:r===\\\"personal_ecRecover\\\"}});if(Ss(s))throw s;return s.result}getChainId(){var e;return Number.parseInt((e=this._storage.getItem(m7e))!==null&&e!==void 0?e:\\\"1\\\",10)}async _eth_requestAccounts(){var e,r;if(this._addresses.length>0)return(e=this.callback)===null||e===void 0||e.call(this,\\\"connect\\\",{chainId:Gm(this.getChainId())}),this._addresses;let i=await this.initializeRelay().requestEthereumAccounts();if(Ss(i))throw i;if(!i.result)throw new Error(\\\"accounts received is empty\\\");return this._setAddresses(i.result),(r=this.callback)===null||r===void 0||r.call(this,\\\"connect\\\",{chainId:Gm(this.getChainId())}),this._addresses}async personalSign({params:e}){if(!Array.isArray(e))throw pe.rpc.invalidParams();let r=e[1],n=e[0];this._ensureKnownAddress(r);let s=await this.initializeRelay().sendRequest({method:\\\"signEthereumMessage\\\",params:{address:Km(r),message:LD(n),addPrefix:!0,typedDataJson:null}});if(Ss(s))throw s;return s.result}async _eth_signTransaction(e){let r=this._prepareTransactionParams(e[0]||{}),i=await this.initializeRelay().signEthereumTransaction(r);if(Ss(i))throw i;return i.result}async _eth_sendRawTransaction(e){let r=jD(e[0]),i=await this.initializeRelay().submitEthereumTransaction(r,this.getChainId());if(Ss(i))throw i;return i.result}async _eth_sendTransaction(e){let r=this._prepareTransactionParams(e[0]||{}),i=await this.initializeRelay().signAndSubmitEthereumTransaction(r);if(Ss(i))throw i;return i.result}async signTypedData(e){let{method:r,params:n}=e;if(!Array.isArray(n))throw pe.rpc.invalidParams();let i=l=>{let d={eth_signTypedData_v1:_I.default.hashForSignTypedDataLegacy,eth_signTypedData_v3:_I.default.hashForSignTypedData_v3,eth_signTypedData_v4:_I.default.hashForSignTypedData_v4,eth_signTypedData:_I.default.hashForSignTypedData_v4};return mv(d[r]({data:b4e(l)}),!0)},s=n[r===\\\"eth_signTypedData_v1\\\"?1:0],o=n[r===\\\"eth_signTypedData_v1\\\"?0:1];this._ensureKnownAddress(s);let c=await this.initializeRelay().sendRequest({method:\\\"signEthereumMessage\\\",params:{address:Km(s),message:i(o),typedDataJson:JSON.stringify(o,null,2),addPrefix:!1}});if(Ss(c))throw c;return c.result}initializeRelay(){return this._relay||(this._relay=new EI({linkAPIUrl:qX,storage:this._storage,metadata:this.metadata,accountsCallback:this._setAddresses.bind(this),chainCallback:this.updateProviderInfo.bind(this)})),this._relay}}});function v7e(){return w7e.getItem(b7e)}function x7e(t){w7e.setItem(b7e,t)}function cre(t){if(t)return t instanceof mI?\\\"scw\\\":\\\"walletlink\\\"}async function E7e(t){let{communicator:e,metadata:r,handshakeRequest:n,callback:i}=t;fbt(e,r,i,n).catch(()=>{});let s={id:crypto.randomUUID(),event:\\\"selectSignerType\\\",data:Object.assign(Object.assign({},t.preference),{handshakeRequest:n})},{data:o}=await e.postRequestAndWaitForResponse(s);return o}function _7e(t){let{signerType:e,metadata:r,communicator:n,callback:i}=t;switch(e){case\\\"scw\\\":return new mI({metadata:r,callback:i,communicator:n});case\\\"walletlink\\\":return new CI({metadata:r,callback:i})}}async function fbt(t,e,r,n){await t.onMessage(({event:s})=>s===\\\"WalletLinkSessionRequest\\\");let i=new CI({metadata:e,callback:r});t.postMessage({event:\\\"WalletLinkUpdate\\\",data:{session:i.getSession()}}),await i.handshake(n),t.postMessage({event:\\\"WalletLinkUpdate\\\",data:{connected:!0}})}var b7e,w7e,C7e=x(()=>{u();HT();MIe();y7e();b7e=\\\"SignerType\\\",w7e=new Sp(\\\"CBWSDK\\\",\\\"SignerConfigurator\\\")});var pbt,s_,lre=x(()=>{u();d8e();a3();BT();va();p8e();h8e();HT();v8e();_8e();tf();dL();Du();o3();C7e();pbt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols==\\\"function\\\")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},s_=class extends lL{constructor(e){var{metadata:r}=e,n=e.preference,{keysUrl:i}=n,s=pbt(n,[\\\"keysUrl\\\"]);super(),this.signer=null,this.isCoinbaseWallet=!0,this.metadata=r,this.preference=s,this.communicator=new aL({url:i,metadata:r,preference:s});let o=v7e();o&&(this.signer=this.initSigner(o),m8e({signerType:o}))}async request(e){let r=crypto.randomUUID();Uc.set(e,r),g8e({method:e.method,correlationId:r});try{let n=await this._request(e);return b8e({method:e.method,signerType:cre(this.signer),correlationId:r}),n}catch(n){throw y8e({method:e.method,correlationId:r,signerType:cre(this.signer),errorMessage:n instanceof Error?n.message:\\\"\\\"}),n}finally{Uc.delete(e)}}async _request(e){try{if(x4e(e),!this.signer)switch(e.method){case\\\"eth_requestAccounts\\\":{let n,i=Ee.subAccountsConfig.get();i?.enableAutoSubAccounts?n=\\\"scw\\\":n=await this.requestSignerSelection(e);let s=this.initSigner(n);n===\\\"scw\\\"&&i?.enableAutoSubAccounts?(await s.handshake({method:\\\"handshake\\\"}),await s.request(e)):await s.handshake(e),this.signer=s,x7e(n);break}case\\\"wallet_connect\\\":{let n=this.initSigner(\\\"scw\\\");await n.handshake({method:\\\"handshake\\\"});let i=await n.request(e);return this.signer=n,i}case\\\"wallet_sendCalls\\\":case\\\"wallet_sign\\\":{let n=this.initSigner(\\\"scw\\\");await n.handshake({method:\\\"handshake\\\"});let i=await n.request(e);return await n.cleanup(),i}case\\\"wallet_getCallsStatus\\\":return await Ly(e,VD);case\\\"net_version\\\":return 1;case\\\"eth_chainId\\\":return Gm(1);default:throw pe.provider.unauthorized(\\\"Must call 'eth_requestAccounts' before other methods\\\")}return await this.signer.request(e)}catch(r){let{code:n}=r;return n===Wn.provider.unauthorized&&this.disconnect(),Promise.reject(f8e(r))}}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: \\\"eth_requestAccounts\\\" }) instead.'),w8e(),await this.request({method:\\\"eth_requestAccounts\\\"})}async disconnect(){var e;await((e=this.signer)===null||e===void 0?void 0:e.cleanup()),this.signer=null,Sp.clearAll(),Uc.clear(),this.emit(\\\"disconnect\\\",pe.provider.disconnected(\\\"User initiated disconnection\\\"))}async requestSignerSelection(e){x8e();let r=await E7e({communicator:this.communicator,preference:this.preference,metadata:this.metadata,handshakeRequest:e,callback:this.emit.bind(this)});return E8e(r),r}initSigner(e){return _7e({signerType:e,metadata:this.metadata,communicator:this.communicator,callback:this.emit.bind(this)})}}});var S7e,A7e=x(()=>{u();S7e=(t,e)=>{let r;switch(t){case\\\"standard\\\":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case\\\"circle\\\":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case\\\"text\\\":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case\\\"textWithLogo\\\":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case\\\"textLight\\\":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case\\\"textWithLogoLight\\\":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}}});var o_,ure=x(()=>{u();OX();tf();Du();qD();o3();HX();lre();A7e();o_=class{constructor(e){Ee.persist.rehydrate(),this.metadata={appName:e.appName||\\\"Dapp\\\",appLogoUrl:e.appLogoUrl||w4e(),appChainIds:e.appChainIds||[]},Ee.config.set({metadata:this.metadata}),HD()}makeWeb3Provider(e={options:\\\"all\\\"}){var r;$D(e),e.telemetry!==!1&&ND(),Ee.config.set({preference:e});let n={metadata:this.metadata,preference:e};return(r=zD(n))!==null&&r!==void 0?r:new s_(n)}getCoinbaseWalletLogo(e,r=240){return S7e(e,r)}}});function T7e(t){var e;let r={metadata:t.metadata,preference:t.preference};return(e=zD(r))!==null&&e!==void 0?e:new s_(r)}var I7e=x(()=>{u();o3();lre()});function R7e(t){var e,r,n,i;let s={metadata:{appName:t.appName||\\\"Dapp\\\",appLogoUrl:t.appLogoUrl||\\\"\\\",appChainIds:t.appChainIds||[]},preference:Object.assign(hbt,(e=t.preference)!==null&&e!==void 0?e:{}),paymasterUrls:t.paymasterUrls};!((r=t.subAccounts)===null||r===void 0)&&r.toOwnerAccount&&jX(t.subAccounts.toOwnerAccount),Ee.subAccountsConfig.set({toOwnerAccount:(n=t.subAccounts)===null||n===void 0?void 0:n.toOwnerAccount,enableAutoSubAccounts:(i=t.subAccounts)===null||i===void 0?void 0:i.enableAutoSubAccounts}),Ee.config.set(s),Ee.persist.rehydrate(),HD(),s.preference.telemetry!==!1&&ND(),$D(s.preference);let o=null,a={getProvider(){return o||(o=T7e(s)),o.sdk=a,o},subAccount:{async create(c){var l,d;let f=Ee.getState();return co((l=f.subAccount)===null||l===void 0?void 0:l.address,new Error(\\\"subaccount already exists\\\")),await((d=a.getProvider())===null||d===void 0?void 0:d.request({method:\\\"wallet_addSubAccount\\\",params:[{version:\\\"1\\\",account:c}]}))},async get(){var c,l;let d=Ee.subAccounts.get();if(d?.address)return d;let p=(l=(await((c=a.getProvider())===null||c===void 0?void 0:c.request({method:\\\"wallet_connect\\\",params:[{version:\\\"1\\\",capabilities:{}}]}))).accounts[0].capabilities)===null||l===void 0?void 0:l.subAccounts;return Array.isArray(p)?p[0]:null},async addOwner({address:c,publicKey:l,chainId:d}){var f,p;let h=Ee.subAccounts.get(),m=Ee.account.get();co(m,new Error(\\\"account does not exist\\\")),co(h?.address,new Error(\\\"subaccount does not exist\\\"));let g=[];if(l){let[w,v]=Cc([{type:\\\"bytes32\\\"},{type:\\\"bytes32\\\"}],l);g.push({to:h.address,data:At({abi:Ea,functionName:\\\"addOwnerPublicKey\\\",args:[w,v]}),value:He(0)})}return c&&g.push({to:h.address,data:At({abi:Ea,functionName:\\\"addOwnerAddress\\\",args:[c]}),value:He(0)}),await((f=a.getProvider())===null||f===void 0?void 0:f.request({method:\\\"wallet_sendCalls\\\",params:[{calls:g,chainId:He(d),from:(p=m.accounts)===null||p===void 0?void 0:p[0],version:\\\"1\\\"}]}))},setToOwnerAccount(c){jX(c),Ee.subAccountsConfig.set({toOwnerAccount:c})}}};return a}var hbt,P7e=x(()=>{u();un();OX();Uv();U3();qD();HX();I7e();Du();hbt={options:\\\"all\\\"}});var O7e={};ue(O7e,{CoinbaseWalletSDK:()=>o_,createCoinbaseWalletSDK:()=>R7e,default:()=>mbt,getCryptoKeyAccount:()=>Dv,removeCryptoKey:()=>iIe});var mbt,N7e=x(()=>{u();ure();ure();P7e();pU();mbt=o_});var k7e=q(jU=>{\\\"use strict\\\";u();Object.defineProperty(jU,\\\"__esModule\\\",{value:!0});jU.walletLogo=void 0;var gbt=(t,e)=>{let r;switch(t){case\\\"standard\\\":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case\\\"circle\\\":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case\\\"text\\\":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case\\\"textWithLogo\\\":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case\\\"textLight\\\":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case\\\"textWithLogoLight\\\":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};jU.walletLogo=gbt});var B7e=q(HU=>{\\\"use strict\\\";u();Object.defineProperty(HU,\\\"__esModule\\\",{value:!0});HU.LINK_API_URL=void 0;HU.LINK_API_URL=\\\"https://www.walletlink.org\\\"});var M7e=q(()=>{u()});var SI=q((D7e,dre)=>{u();(function(t,e){\\\"use strict\\\";function r(R,y){if(!R)throw new Error(y||\\\"Assertion failed\\\")}function n(R,y){R.super_=y;var E=function(){};E.prototype=y.prototype,R.prototype=new E,R.prototype.constructor=R}function i(R,y,E){if(i.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((y===\\\"le\\\"||y===\\\"be\\\")&&(E=y,y=10),this._init(R||0,y||10,E||\\\"be\\\"))}typeof t==\\\"object\\\"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var s;try{typeof window<\\\"u\\\"&&typeof window.Buffer<\\\"u\\\"?s=window.Buffer:s=M7e().Buffer}catch{}i.isBN=function(y){return y instanceof i?!0:y!==null&&typeof y==\\\"object\\\"&&y.constructor.wordSize===i.wordSize&&Array.isArray(y.words)},i.max=function(y,E){return y.cmp(E)>0?y:E},i.min=function(y,E){return y.cmp(E)<0?y:E},i.prototype._init=function(y,E,C){if(typeof y==\\\"number\\\")return this._initNumber(y,E,C);if(typeof y==\\\"object\\\")return this._initArray(y,E,C);E===\\\"hex\\\"&&(E=16),r(E===(E|0)&&E>=2&&E<=36),y=y.toString().replace(/\\\\s+/g,\\\"\\\");var I=0;y[0]===\\\"-\\\"&&(I++,this.negative=1),I<y.length&&(E===16?this._parseHex(y,I,C):(this._parseBase(y,E,I),C===\\\"le\\\"&&this._initArray(this.toArray(),E,C)))},i.prototype._initNumber=function(y,E,C){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(r(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),C===\\\"le\\\"&&this._initArray(this.toArray(),E,C)},i.prototype._initArray=function(y,E,C){if(r(typeof y.length==\\\"number\\\"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var P,k,U=0;if(C===\\\"be\\\")for(I=y.length-1,P=0;I>=0;I-=3)k=y[I]|y[I-1]<<8|y[I-2]<<16,this.words[P]|=k<<U&67108863,this.words[P+1]=k>>>26-U&67108863,U+=24,U>=26&&(U-=26,P++);else if(C===\\\"le\\\")for(I=0,P=0;I<y.length;I+=3)k=y[I]|y[I+1]<<8|y[I+2]<<16,this.words[P]|=k<<U&67108863,this.words[P+1]=k>>>26-U&67108863,U+=24,U>=26&&(U-=26,P++);return this._strip()};function o(R,y){var E=R.charCodeAt(y);if(E>=48&&E<=57)return E-48;if(E>=65&&E<=70)return E-55;if(E>=97&&E<=102)return E-87;r(!1,\\\"Invalid character in \\\"+R)}function a(R,y,E){var C=o(R,E);return E-1>=y&&(C|=o(R,E-1)<<4),C}i.prototype._parseHex=function(y,E,C){this.length=Math.ceil((y.length-E)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var P=0,k=0,U;if(C===\\\"be\\\")for(I=y.length-1;I>=E;I-=2)U=a(y,E,I)<<P,this.words[k]|=U&67108863,P>=18?(P-=18,k+=1,this.words[k]|=U>>>26):P+=8;else{var D=y.length-E;for(I=D%2===0?E+1:E;I<y.length;I+=2)U=a(y,E,I)<<P,this.words[k]|=U&67108863,P>=18?(P-=18,k+=1,this.words[k]|=U>>>26):P+=8}this._strip()};function c(R,y,E,C){for(var I=0,P=0,k=Math.min(R.length,E),U=y;U<k;U++){var D=R.charCodeAt(U)-48;I*=C,D>=49?P=D-49+10:D>=17?P=D-17+10:P=D,r(D>=0&&P<C,\\\"Invalid character\\\"),I+=P}return I}i.prototype._parseBase=function(y,E,C){this.words=[0],this.length=1;for(var I=0,P=1;P<=67108863;P*=E)I++;I--,P=P/E|0;for(var k=y.length-C,U=k%I,D=Math.min(k,k-U)+C,A=0,j=C;j<D;j+=I)A=c(y,j,j+I,E),this.imuln(P),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);if(U!==0){var K=1;for(A=c(y,j,y.length,E),j=0;j<U;j++)K*=E;this.imuln(K),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A)}this._strip()},i.prototype.copy=function(y){y.words=new Array(this.length);for(var E=0;E<this.length;E++)y.words[E]=this.words[E];y.length=this.length,y.negative=this.negative,y.red=this.red};function l(R,y){R.words=y.words,R.length=y.length,R.negative=y.negative,R.red=y.red}if(i.prototype._move=function(y){l(y,this)},i.prototype.clone=function(){var y=new i(null);return this.copy(y),y},i.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<\\\"u\\\"&&typeof Symbol.for==\\\"function\\\")try{i.prototype[Symbol.for(\\\"nodejs.util.inspect.custom\\\")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?\\\"<BN-R: \\\":\\\"<BN: \\\")+this.toString(16)+\\\">\\\"}var f=[\\\"\\\",\\\"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\\\"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(y,E){y=y||10,E=E|0||1;var C;if(y===16||y===\\\"hex\\\"){C=\\\"\\\";for(var I=0,P=0,k=0;k<this.length;k++){var U=this.words[k],D=((U<<I|P)&16777215).toString(16);P=U>>>24-I&16777215,I+=2,I>=26&&(I-=26,k--),P!==0||k!==this.length-1?C=f[6-D.length]+D+C:C=D+C}for(P!==0&&(C=P.toString(16)+C);C.length%E!==0;)C=\\\"0\\\"+C;return this.negative!==0&&(C=\\\"-\\\"+C),C}if(y===(y|0)&&y>=2&&y<=36){var A=p[y],j=h[y];C=\\\"\\\";var K=this.clone();for(K.negative=0;!K.isZero();){var J=K.modrn(j).toString(y);K=K.idivn(j),K.isZero()?C=J+C:C=f[A-J.length]+J+C}for(this.isZero()&&(C=\\\"0\\\"+C);C.length%E!==0;)C=\\\"0\\\"+C;return this.negative!==0&&(C=\\\"-\\\"+C),C}r(!1,\\\"Base should be between 2 and 36\\\")},i.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,\\\"Number can only safely store up to 53 bits\\\"),this.negative!==0?-y:y},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(y,E){return this.toArrayLike(s,y,E)}),i.prototype.toArray=function(y,E){return this.toArrayLike(Array,y,E)};var m=function(y,E){return y.allocUnsafe?y.allocUnsafe(E):new y(E)};i.prototype.toArrayLike=function(y,E,C){this._strip();var I=this.byteLength(),P=C||Math.max(1,I);r(I<=P,\\\"byte array longer than desired length\\\"),r(P>0,\\\"Requested array length <= 0\\\");var k=m(y,P),U=E===\\\"le\\\"?\\\"LE\\\":\\\"BE\\\";return this[\\\"_toArrayLike\\\"+U](k,I),k},i.prototype._toArrayLikeLE=function(y,E){for(var C=0,I=0,P=0,k=0;P<this.length;P++){var U=this.words[P]<<k|I;y[C++]=U&255,C<y.length&&(y[C++]=U>>8&255),C<y.length&&(y[C++]=U>>16&255),k===6?(C<y.length&&(y[C++]=U>>24&255),I=0,k=0):(I=U>>>24,k+=2)}if(C<y.length)for(y[C++]=I;C<y.length;)y[C++]=0},i.prototype._toArrayLikeBE=function(y,E){for(var C=y.length-1,I=0,P=0,k=0;P<this.length;P++){var U=this.words[P]<<k|I;y[C--]=U&255,C>=0&&(y[C--]=U>>8&255),C>=0&&(y[C--]=U>>16&255),k===6?(C>=0&&(y[C--]=U>>24&255),I=0,k=0):(I=U>>>24,k+=2)}if(C>=0)for(y[C--]=I;C>=0;)y[C--]=0},Math.clz32?i.prototype._countBits=function(y){return 32-Math.clz32(y)}:i.prototype._countBits=function(y){var E=y,C=0;return E>=4096&&(C+=13,E>>>=13),E>=64&&(C+=7,E>>>=7),E>=8&&(C+=4,E>>>=4),E>=2&&(C+=2,E>>>=2),C+E},i.prototype._zeroBits=function(y){if(y===0)return 26;var E=y,C=0;return(E&8191)===0&&(C+=13,E>>>=13),(E&127)===0&&(C+=7,E>>>=7),(E&15)===0&&(C+=4,E>>>=4),(E&3)===0&&(C+=2,E>>>=2),(E&1)===0&&C++,C},i.prototype.bitLength=function(){var y=this.words[this.length-1],E=this._countBits(y);return(this.length-1)*26+E};function g(R){for(var y=new Array(R.bitLength()),E=0;E<y.length;E++){var C=E/26|0,I=E%26;y[E]=R.words[C]>>>I&1}return y}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,E=0;E<this.length;E++){var C=this._zeroBits(this.words[E]);if(y+=C,C!==26)break}return y},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},i.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var E=0;E<y.length;E++)this.words[E]=this.words[E]|y.words[E];return this._strip()},i.prototype.ior=function(y){return r((this.negative|y.negative)===0),this.iuor(y)},i.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},i.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},i.prototype.iuand=function(y){var E;this.length>y.length?E=y:E=this;for(var C=0;C<E.length;C++)this.words[C]=this.words[C]&y.words[C];return this.length=E.length,this._strip()},i.prototype.iand=function(y){return r((this.negative|y.negative)===0),this.iuand(y)},i.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},i.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},i.prototype.iuxor=function(y){var E,C;this.length>y.length?(E=this,C=y):(E=y,C=this);for(var I=0;I<C.length;I++)this.words[I]=E.words[I]^C.words[I];if(this!==E)for(;I<E.length;I++)this.words[I]=E.words[I];return this.length=E.length,this._strip()},i.prototype.ixor=function(y){return r((this.negative|y.negative)===0),this.iuxor(y)},i.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},i.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},i.prototype.inotn=function(y){r(typeof y==\\\"number\\\"&&y>=0);var E=Math.ceil(y/26)|0,C=y%26;this._expand(E),C>0&&E--;for(var I=0;I<E;I++)this.words[I]=~this.words[I]&67108863;return C>0&&(this.words[I]=~this.words[I]&67108863>>26-C),this._strip()},i.prototype.notn=function(y){return this.clone().inotn(y)},i.prototype.setn=function(y,E){r(typeof y==\\\"number\\\"&&y>=0);var C=y/26|0,I=y%26;return this._expand(C+1),E?this.words[C]=this.words[C]|1<<I:this.words[C]=this.words[C]&~(1<<I),this._strip()},i.prototype.iadd=function(y){var E;if(this.negative!==0&&y.negative===0)return this.negative=0,E=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,E=this.isub(y),y.negative=1,E._normSign();var C,I;this.length>y.length?(C=this,I=y):(C=y,I=this);for(var P=0,k=0;k<I.length;k++)E=(C.words[k]|0)+(I.words[k]|0)+P,this.words[k]=E&67108863,P=E>>>26;for(;P!==0&&k<C.length;k++)E=(C.words[k]|0)+P,this.words[k]=E&67108863,P=E>>>26;if(this.length=C.length,P!==0)this.words[this.length]=P,this.length++;else if(C!==this)for(;k<C.length;k++)this.words[k]=C.words[k];return this},i.prototype.add=function(y){var E;return y.negative!==0&&this.negative===0?(y.negative=0,E=this.sub(y),y.negative^=1,E):y.negative===0&&this.negative!==0?(this.negative=0,E=y.sub(this),this.negative=1,E):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},i.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var E=this.iadd(y);return y.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var C=this.cmp(y);if(C===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,P;C>0?(I=this,P=y):(I=y,P=this);for(var k=0,U=0;U<P.length;U++)E=(I.words[U]|0)-(P.words[U]|0)+k,k=E>>26,this.words[U]=E&67108863;for(;k!==0&&U<I.length;U++)E=(I.words[U]|0)+k,k=E>>26,this.words[U]=E&67108863;if(k===0&&U<I.length&&I!==this)for(;U<I.length;U++)this.words[U]=I.words[U];return this.length=Math.max(this.length,U),I!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(y){return this.clone().isub(y)};function w(R,y,E){E.negative=y.negative^R.negative;var C=R.length+y.length|0;E.length=C,C=C-1|0;var I=R.words[0]|0,P=y.words[0]|0,k=I*P,U=k&67108863,D=k/67108864|0;E.words[0]=U;for(var A=1;A<C;A++){for(var j=D>>>26,K=D&67108863,J=Math.min(A,y.length-1),X=Math.max(0,A-R.length+1);X<=J;X++){var re=A-X|0;I=R.words[re]|0,P=y.words[X]|0,k=I*P+K,j+=k/67108864|0,K=k&67108863}E.words[A]=K|0,D=j|0}return D!==0?E.words[A]=D|0:E.length--,E._strip()}var v=function(y,E,C){var I=y.words,P=E.words,k=C.words,U=0,D,A,j,K=I[0]|0,J=K&8191,X=K>>>13,re=I[1]|0,fe=re&8191,ce=re>>>13,We=I[2]|0,Ue=We&8191,je=We>>>13,Lt=I[3]|0,pt=Lt&8191,Ct=Lt>>>13,jf=I[4]|0,Un=jf&8191,Fn=jf>>>13,Q0=I[5]|0,wn=Q0&8191,an=Q0>>>13,J0=I[6]|0,vn=J0&8191,xn=J0>>>13,Y0=I[7]|0,En=Y0&8191,jn=Y0>>>13,X0=I[8]|0,_n=X0&8191,Cn=X0>>>13,Mx=I[9]|0,Jn=Mx&8191,Yn=Mx>>>13,Dx=P[0]|0,Xn=Dx&8191,ei=Dx>>>13,Lx=P[1]|0,ti=Lx&8191,ri=Lx>>>13,Ux=P[2]|0,ni=Ux&8191,ii=Ux>>>13,Fx=P[3]|0,si=Fx&8191,oi=Fx>>>13,jx=P[4]|0,ai=jx&8191,ci=jx>>>13,Hx=P[5]|0,li=Hx&8191,ui=Hx>>>13,qx=P[6]|0,di=qx&8191,fi=qx>>>13,zx=P[7]|0,pi=zx&8191,hi=zx>>>13,$x=P[8]|0,mi=$x&8191,gi=$x>>>13,Vx=P[9]|0,yi=Vx&8191,bi=Vx>>>13;C.negative=y.negative^E.negative,C.length=19,D=Math.imul(J,Xn),A=Math.imul(J,ei),A=A+Math.imul(X,Xn)|0,j=Math.imul(X,ei);var ub=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(ub>>>26)|0,ub&=67108863,D=Math.imul(fe,Xn),A=Math.imul(fe,ei),A=A+Math.imul(ce,Xn)|0,j=Math.imul(ce,ei),D=D+Math.imul(J,ti)|0,A=A+Math.imul(J,ri)|0,A=A+Math.imul(X,ti)|0,j=j+Math.imul(X,ri)|0;var db=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(db>>>26)|0,db&=67108863,D=Math.imul(Ue,Xn),A=Math.imul(Ue,ei),A=A+Math.imul(je,Xn)|0,j=Math.imul(je,ei),D=D+Math.imul(fe,ti)|0,A=A+Math.imul(fe,ri)|0,A=A+Math.imul(ce,ti)|0,j=j+Math.imul(ce,ri)|0,D=D+Math.imul(J,ni)|0,A=A+Math.imul(J,ii)|0,A=A+Math.imul(X,ni)|0,j=j+Math.imul(X,ii)|0;var fb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(fb>>>26)|0,fb&=67108863,D=Math.imul(pt,Xn),A=Math.imul(pt,ei),A=A+Math.imul(Ct,Xn)|0,j=Math.imul(Ct,ei),D=D+Math.imul(Ue,ti)|0,A=A+Math.imul(Ue,ri)|0,A=A+Math.imul(je,ti)|0,j=j+Math.imul(je,ri)|0,D=D+Math.imul(fe,ni)|0,A=A+Math.imul(fe,ii)|0,A=A+Math.imul(ce,ni)|0,j=j+Math.imul(ce,ii)|0,D=D+Math.imul(J,si)|0,A=A+Math.imul(J,oi)|0,A=A+Math.imul(X,si)|0,j=j+Math.imul(X,oi)|0;var pb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(pb>>>26)|0,pb&=67108863,D=Math.imul(Un,Xn),A=Math.imul(Un,ei),A=A+Math.imul(Fn,Xn)|0,j=Math.imul(Fn,ei),D=D+Math.imul(pt,ti)|0,A=A+Math.imul(pt,ri)|0,A=A+Math.imul(Ct,ti)|0,j=j+Math.imul(Ct,ri)|0,D=D+Math.imul(Ue,ni)|0,A=A+Math.imul(Ue,ii)|0,A=A+Math.imul(je,ni)|0,j=j+Math.imul(je,ii)|0,D=D+Math.imul(fe,si)|0,A=A+Math.imul(fe,oi)|0,A=A+Math.imul(ce,si)|0,j=j+Math.imul(ce,oi)|0,D=D+Math.imul(J,ai)|0,A=A+Math.imul(J,ci)|0,A=A+Math.imul(X,ai)|0,j=j+Math.imul(X,ci)|0;var hb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(hb>>>26)|0,hb&=67108863,D=Math.imul(wn,Xn),A=Math.imul(wn,ei),A=A+Math.imul(an,Xn)|0,j=Math.imul(an,ei),D=D+Math.imul(Un,ti)|0,A=A+Math.imul(Un,ri)|0,A=A+Math.imul(Fn,ti)|0,j=j+Math.imul(Fn,ri)|0,D=D+Math.imul(pt,ni)|0,A=A+Math.imul(pt,ii)|0,A=A+Math.imul(Ct,ni)|0,j=j+Math.imul(Ct,ii)|0,D=D+Math.imul(Ue,si)|0,A=A+Math.imul(Ue,oi)|0,A=A+Math.imul(je,si)|0,j=j+Math.imul(je,oi)|0,D=D+Math.imul(fe,ai)|0,A=A+Math.imul(fe,ci)|0,A=A+Math.imul(ce,ai)|0,j=j+Math.imul(ce,ci)|0,D=D+Math.imul(J,li)|0,A=A+Math.imul(J,ui)|0,A=A+Math.imul(X,li)|0,j=j+Math.imul(X,ui)|0;var mb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(mb>>>26)|0,mb&=67108863,D=Math.imul(vn,Xn),A=Math.imul(vn,ei),A=A+Math.imul(xn,Xn)|0,j=Math.imul(xn,ei),D=D+Math.imul(wn,ti)|0,A=A+Math.imul(wn,ri)|0,A=A+Math.imul(an,ti)|0,j=j+Math.imul(an,ri)|0,D=D+Math.imul(Un,ni)|0,A=A+Math.imul(Un,ii)|0,A=A+Math.imul(Fn,ni)|0,j=j+Math.imul(Fn,ii)|0,D=D+Math.imul(pt,si)|0,A=A+Math.imul(pt,oi)|0,A=A+Math.imul(Ct,si)|0,j=j+Math.imul(Ct,oi)|0,D=D+Math.imul(Ue,ai)|0,A=A+Math.imul(Ue,ci)|0,A=A+Math.imul(je,ai)|0,j=j+Math.imul(je,ci)|0,D=D+Math.imul(fe,li)|0,A=A+Math.imul(fe,ui)|0,A=A+Math.imul(ce,li)|0,j=j+Math.imul(ce,ui)|0,D=D+Math.imul(J,di)|0,A=A+Math.imul(J,fi)|0,A=A+Math.imul(X,di)|0,j=j+Math.imul(X,fi)|0;var gb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(gb>>>26)|0,gb&=67108863,D=Math.imul(En,Xn),A=Math.imul(En,ei),A=A+Math.imul(jn,Xn)|0,j=Math.imul(jn,ei),D=D+Math.imul(vn,ti)|0,A=A+Math.imul(vn,ri)|0,A=A+Math.imul(xn,ti)|0,j=j+Math.imul(xn,ri)|0,D=D+Math.imul(wn,ni)|0,A=A+Math.imul(wn,ii)|0,A=A+Math.imul(an,ni)|0,j=j+Math.imul(an,ii)|0,D=D+Math.imul(Un,si)|0,A=A+Math.imul(Un,oi)|0,A=A+Math.imul(Fn,si)|0,j=j+Math.imul(Fn,oi)|0,D=D+Math.imul(pt,ai)|0,A=A+Math.imul(pt,ci)|0,A=A+Math.imul(Ct,ai)|0,j=j+Math.imul(Ct,ci)|0,D=D+Math.imul(Ue,li)|0,A=A+Math.imul(Ue,ui)|0,A=A+Math.imul(je,li)|0,j=j+Math.imul(je,ui)|0,D=D+Math.imul(fe,di)|0,A=A+Math.imul(fe,fi)|0,A=A+Math.imul(ce,di)|0,j=j+Math.imul(ce,fi)|0,D=D+Math.imul(J,pi)|0,A=A+Math.imul(J,hi)|0,A=A+Math.imul(X,pi)|0,j=j+Math.imul(X,hi)|0;var yb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(yb>>>26)|0,yb&=67108863,D=Math.imul(_n,Xn),A=Math.imul(_n,ei),A=A+Math.imul(Cn,Xn)|0,j=Math.imul(Cn,ei),D=D+Math.imul(En,ti)|0,A=A+Math.imul(En,ri)|0,A=A+Math.imul(jn,ti)|0,j=j+Math.imul(jn,ri)|0,D=D+Math.imul(vn,ni)|0,A=A+Math.imul(vn,ii)|0,A=A+Math.imul(xn,ni)|0,j=j+Math.imul(xn,ii)|0,D=D+Math.imul(wn,si)|0,A=A+Math.imul(wn,oi)|0,A=A+Math.imul(an,si)|0,j=j+Math.imul(an,oi)|0,D=D+Math.imul(Un,ai)|0,A=A+Math.imul(Un,ci)|0,A=A+Math.imul(Fn,ai)|0,j=j+Math.imul(Fn,ci)|0,D=D+Math.imul(pt,li)|0,A=A+Math.imul(pt,ui)|0,A=A+Math.imul(Ct,li)|0,j=j+Math.imul(Ct,ui)|0,D=D+Math.imul(Ue,di)|0,A=A+Math.imul(Ue,fi)|0,A=A+Math.imul(je,di)|0,j=j+Math.imul(je,fi)|0,D=D+Math.imul(fe,pi)|0,A=A+Math.imul(fe,hi)|0,A=A+Math.imul(ce,pi)|0,j=j+Math.imul(ce,hi)|0,D=D+Math.imul(J,mi)|0,A=A+Math.imul(J,gi)|0,A=A+Math.imul(X,mi)|0,j=j+Math.imul(X,gi)|0;var bb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(bb>>>26)|0,bb&=67108863,D=Math.imul(Jn,Xn),A=Math.imul(Jn,ei),A=A+Math.imul(Yn,Xn)|0,j=Math.imul(Yn,ei),D=D+Math.imul(_n,ti)|0,A=A+Math.imul(_n,ri)|0,A=A+Math.imul(Cn,ti)|0,j=j+Math.imul(Cn,ri)|0,D=D+Math.imul(En,ni)|0,A=A+Math.imul(En,ii)|0,A=A+Math.imul(jn,ni)|0,j=j+Math.imul(jn,ii)|0,D=D+Math.imul(vn,si)|0,A=A+Math.imul(vn,oi)|0,A=A+Math.imul(xn,si)|0,j=j+Math.imul(xn,oi)|0,D=D+Math.imul(wn,ai)|0,A=A+Math.imul(wn,ci)|0,A=A+Math.imul(an,ai)|0,j=j+Math.imul(an,ci)|0,D=D+Math.imul(Un,li)|0,A=A+Math.imul(Un,ui)|0,A=A+Math.imul(Fn,li)|0,j=j+Math.imul(Fn,ui)|0,D=D+Math.imul(pt,di)|0,A=A+Math.imul(pt,fi)|0,A=A+Math.imul(Ct,di)|0,j=j+Math.imul(Ct,fi)|0,D=D+Math.imul(Ue,pi)|0,A=A+Math.imul(Ue,hi)|0,A=A+Math.imul(je,pi)|0,j=j+Math.imul(je,hi)|0,D=D+Math.imul(fe,mi)|0,A=A+Math.imul(fe,gi)|0,A=A+Math.imul(ce,mi)|0,j=j+Math.imul(ce,gi)|0,D=D+Math.imul(J,yi)|0,A=A+Math.imul(J,bi)|0,A=A+Math.imul(X,yi)|0,j=j+Math.imul(X,bi)|0;var wb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(wb>>>26)|0,wb&=67108863,D=Math.imul(Jn,ti),A=Math.imul(Jn,ri),A=A+Math.imul(Yn,ti)|0,j=Math.imul(Yn,ri),D=D+Math.imul(_n,ni)|0,A=A+Math.imul(_n,ii)|0,A=A+Math.imul(Cn,ni)|0,j=j+Math.imul(Cn,ii)|0,D=D+Math.imul(En,si)|0,A=A+Math.imul(En,oi)|0,A=A+Math.imul(jn,si)|0,j=j+Math.imul(jn,oi)|0,D=D+Math.imul(vn,ai)|0,A=A+Math.imul(vn,ci)|0,A=A+Math.imul(xn,ai)|0,j=j+Math.imul(xn,ci)|0,D=D+Math.imul(wn,li)|0,A=A+Math.imul(wn,ui)|0,A=A+Math.imul(an,li)|0,j=j+Math.imul(an,ui)|0,D=D+Math.imul(Un,di)|0,A=A+Math.imul(Un,fi)|0,A=A+Math.imul(Fn,di)|0,j=j+Math.imul(Fn,fi)|0,D=D+Math.imul(pt,pi)|0,A=A+Math.imul(pt,hi)|0,A=A+Math.imul(Ct,pi)|0,j=j+Math.imul(Ct,hi)|0,D=D+Math.imul(Ue,mi)|0,A=A+Math.imul(Ue,gi)|0,A=A+Math.imul(je,mi)|0,j=j+Math.imul(je,gi)|0,D=D+Math.imul(fe,yi)|0,A=A+Math.imul(fe,bi)|0,A=A+Math.imul(ce,yi)|0,j=j+Math.imul(ce,bi)|0;var vb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(vb>>>26)|0,vb&=67108863,D=Math.imul(Jn,ni),A=Math.imul(Jn,ii),A=A+Math.imul(Yn,ni)|0,j=Math.imul(Yn,ii),D=D+Math.imul(_n,si)|0,A=A+Math.imul(_n,oi)|0,A=A+Math.imul(Cn,si)|0,j=j+Math.imul(Cn,oi)|0,D=D+Math.imul(En,ai)|0,A=A+Math.imul(En,ci)|0,A=A+Math.imul(jn,ai)|0,j=j+Math.imul(jn,ci)|0,D=D+Math.imul(vn,li)|0,A=A+Math.imul(vn,ui)|0,A=A+Math.imul(xn,li)|0,j=j+Math.imul(xn,ui)|0,D=D+Math.imul(wn,di)|0,A=A+Math.imul(wn,fi)|0,A=A+Math.imul(an,di)|0,j=j+Math.imul(an,fi)|0,D=D+Math.imul(Un,pi)|0,A=A+Math.imul(Un,hi)|0,A=A+Math.imul(Fn,pi)|0,j=j+Math.imul(Fn,hi)|0,D=D+Math.imul(pt,mi)|0,A=A+Math.imul(pt,gi)|0,A=A+Math.imul(Ct,mi)|0,j=j+Math.imul(Ct,gi)|0,D=D+Math.imul(Ue,yi)|0,A=A+Math.imul(Ue,bi)|0,A=A+Math.imul(je,yi)|0,j=j+Math.imul(je,bi)|0;var xb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(xb>>>26)|0,xb&=67108863,D=Math.imul(Jn,si),A=Math.imul(Jn,oi),A=A+Math.imul(Yn,si)|0,j=Math.imul(Yn,oi),D=D+Math.imul(_n,ai)|0,A=A+Math.imul(_n,ci)|0,A=A+Math.imul(Cn,ai)|0,j=j+Math.imul(Cn,ci)|0,D=D+Math.imul(En,li)|0,A=A+Math.imul(En,ui)|0,A=A+Math.imul(jn,li)|0,j=j+Math.imul(jn,ui)|0,D=D+Math.imul(vn,di)|0,A=A+Math.imul(vn,fi)|0,A=A+Math.imul(xn,di)|0,j=j+Math.imul(xn,fi)|0,D=D+Math.imul(wn,pi)|0,A=A+Math.imul(wn,hi)|0,A=A+Math.imul(an,pi)|0,j=j+Math.imul(an,hi)|0,D=D+Math.imul(Un,mi)|0,A=A+Math.imul(Un,gi)|0,A=A+Math.imul(Fn,mi)|0,j=j+Math.imul(Fn,gi)|0,D=D+Math.imul(pt,yi)|0,A=A+Math.imul(pt,bi)|0,A=A+Math.imul(Ct,yi)|0,j=j+Math.imul(Ct,bi)|0;var Eb=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(Eb>>>26)|0,Eb&=67108863,D=Math.imul(Jn,ai),A=Math.imul(Jn,ci),A=A+Math.imul(Yn,ai)|0,j=Math.imul(Yn,ci),D=D+Math.imul(_n,li)|0,A=A+Math.imul(_n,ui)|0,A=A+Math.imul(Cn,li)|0,j=j+Math.imul(Cn,ui)|0,D=D+Math.imul(En,di)|0,A=A+Math.imul(En,fi)|0,A=A+Math.imul(jn,di)|0,j=j+Math.imul(jn,fi)|0,D=D+Math.imul(vn,pi)|0,A=A+Math.imul(vn,hi)|0,A=A+Math.imul(xn,pi)|0,j=j+Math.imul(xn,hi)|0,D=D+Math.imul(wn,mi)|0,A=A+Math.imul(wn,gi)|0,A=A+Math.imul(an,mi)|0,j=j+Math.imul(an,gi)|0,D=D+Math.imul(Un,yi)|0,A=A+Math.imul(Un,bi)|0,A=A+Math.imul(Fn,yi)|0,j=j+Math.imul(Fn,bi)|0;var _b=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(_b>>>26)|0,_b&=67108863,D=Math.imul(Jn,li),A=Math.imul(Jn,ui),A=A+Math.imul(Yn,li)|0,j=Math.imul(Yn,ui),D=D+Math.imul(_n,di)|0,A=A+Math.imul(_n,fi)|0,A=A+Math.imul(Cn,di)|0,j=j+Math.imul(Cn,fi)|0,D=D+Math.imul(En,pi)|0,A=A+Math.imul(En,hi)|0,A=A+Math.imul(jn,pi)|0,j=j+Math.imul(jn,hi)|0,D=D+Math.imul(vn,mi)|0,A=A+Math.imul(vn,gi)|0,A=A+Math.imul(xn,mi)|0,j=j+Math.imul(xn,gi)|0,D=D+Math.imul(wn,yi)|0,A=A+Math.imul(wn,bi)|0,A=A+Math.imul(an,yi)|0,j=j+Math.imul(an,bi)|0;var JV=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(JV>>>26)|0,JV&=67108863,D=Math.imul(Jn,di),A=Math.imul(Jn,fi),A=A+Math.imul(Yn,di)|0,j=Math.imul(Yn,fi),D=D+Math.imul(_n,pi)|0,A=A+Math.imul(_n,hi)|0,A=A+Math.imul(Cn,pi)|0,j=j+Math.imul(Cn,hi)|0,D=D+Math.imul(En,mi)|0,A=A+Math.imul(En,gi)|0,A=A+Math.imul(jn,mi)|0,j=j+Math.imul(jn,gi)|0,D=D+Math.imul(vn,yi)|0,A=A+Math.imul(vn,bi)|0,A=A+Math.imul(xn,yi)|0,j=j+Math.imul(xn,bi)|0;var YV=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(YV>>>26)|0,YV&=67108863,D=Math.imul(Jn,pi),A=Math.imul(Jn,hi),A=A+Math.imul(Yn,pi)|0,j=Math.imul(Yn,hi),D=D+Math.imul(_n,mi)|0,A=A+Math.imul(_n,gi)|0,A=A+Math.imul(Cn,mi)|0,j=j+Math.imul(Cn,gi)|0,D=D+Math.imul(En,yi)|0,A=A+Math.imul(En,bi)|0,A=A+Math.imul(jn,yi)|0,j=j+Math.imul(jn,bi)|0;var XV=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(XV>>>26)|0,XV&=67108863,D=Math.imul(Jn,mi),A=Math.imul(Jn,gi),A=A+Math.imul(Yn,mi)|0,j=Math.imul(Yn,gi),D=D+Math.imul(_n,yi)|0,A=A+Math.imul(_n,bi)|0,A=A+Math.imul(Cn,yi)|0,j=j+Math.imul(Cn,bi)|0;var eW=(U+D|0)+((A&8191)<<13)|0;U=(j+(A>>>13)|0)+(eW>>>26)|0,eW&=67108863,D=Math.imul(Jn,yi),A=Math.imul(Jn,bi),A=A+Math.imul(Yn,yi)|0,j=Math.imul(Yn,bi);var tW=(U+D|0)+((A&8191)<<13)|0;return U=(j+(A>>>13)|0)+(tW>>>26)|0,tW&=67108863,k[0]=ub,k[1]=db,k[2]=fb,k[3]=pb,k[4]=hb,k[5]=mb,k[6]=gb,k[7]=yb,k[8]=bb,k[9]=wb,k[10]=vb,k[11]=xb,k[12]=Eb,k[13]=_b,k[14]=JV,k[15]=YV,k[16]=XV,k[17]=eW,k[18]=tW,U!==0&&(k[19]=U,C.length++),C};Math.imul||(v=w);function b(R,y,E){E.negative=y.negative^R.negative,E.length=R.length+y.length;for(var C=0,I=0,P=0;P<E.length-1;P++){var k=I;I=0;for(var U=C&67108863,D=Math.min(P,y.length-1),A=Math.max(0,P-R.length+1);A<=D;A++){var j=P-A,K=R.words[j]|0,J=y.words[A]|0,X=K*J,re=X&67108863;k=k+(X/67108864|0)|0,re=re+U|0,U=re&67108863,k=k+(re>>>26)|0,I+=k>>>26,k&=67108863}E.words[P]=U,C=k,k=I}return C!==0?E.words[P]=C:E.length--,E._strip()}function _(R,y,E){return b(R,y,E)}i.prototype.mulTo=function(y,E){var C,I=this.length+y.length;return this.length===10&&y.length===10?C=v(this,y,E):I<63?C=w(this,y,E):I<1024?C=b(this,y,E):C=_(this,y,E),C};function S(R,y){this.x=R,this.y=y}S.prototype.makeRBT=function(y){for(var E=new Array(y),C=i.prototype._countBits(y)-1,I=0;I<y;I++)E[I]=this.revBin(I,C,y);return E},S.prototype.revBin=function(y,E,C){if(y===0||y===C-1)return y;for(var I=0,P=0;P<E;P++)I|=(y&1)<<E-P-1,y>>=1;return I},S.prototype.permute=function(y,E,C,I,P,k){for(var U=0;U<k;U++)I[U]=E[y[U]],P[U]=C[y[U]]},S.prototype.transform=function(y,E,C,I,P,k){this.permute(k,y,E,C,I,P);for(var U=1;U<P;U<<=1)for(var D=U<<1,A=Math.cos(2*Math.PI/D),j=Math.sin(2*Math.PI/D),K=0;K<P;K+=D)for(var J=A,X=j,re=0;re<U;re++){var fe=C[K+re],ce=I[K+re],We=C[K+re+U],Ue=I[K+re+U],je=J*We-X*Ue;Ue=J*Ue+X*We,We=je,C[K+re]=fe+We,I[K+re]=ce+Ue,C[K+re+U]=fe-We,I[K+re+U]=ce-Ue,re!==D&&(je=A*J-j*X,X=A*X+j*J,J=je)}},S.prototype.guessLen13b=function(y,E){var C=Math.max(E,y)|1,I=C&1,P=0;for(C=C/2|0;C;C=C>>>1)P++;return 1<<P+1+I},S.prototype.conjugate=function(y,E,C){if(!(C<=1))for(var I=0;I<C/2;I++){var P=y[I];y[I]=y[C-I-1],y[C-I-1]=P,P=E[I],E[I]=-E[C-I-1],E[C-I-1]=-P}},S.prototype.normalize13b=function(y,E){for(var C=0,I=0;I<E/2;I++){var P=Math.round(y[2*I+1]/E)*8192+Math.round(y[2*I]/E)+C;y[I]=P&67108863,P<67108864?C=0:C=P/67108864|0}return y},S.prototype.convert13b=function(y,E,C,I){for(var P=0,k=0;k<E;k++)P=P+(y[k]|0),C[2*k]=P&8191,P=P>>>13,C[2*k+1]=P&8191,P=P>>>13;for(k=2*E;k<I;++k)C[k]=0;r(P===0),r((P&-8192)===0)},S.prototype.stub=function(y){for(var E=new Array(y),C=0;C<y;C++)E[C]=0;return E},S.prototype.mulp=function(y,E,C){var I=2*this.guessLen13b(y.length,E.length),P=this.makeRBT(I),k=this.stub(I),U=new Array(I),D=new Array(I),A=new Array(I),j=new Array(I),K=new Array(I),J=new Array(I),X=C.words;X.length=I,this.convert13b(y.words,y.length,U,I),this.convert13b(E.words,E.length,j,I),this.transform(U,k,D,A,I,P),this.transform(j,k,K,J,I,P);for(var re=0;re<I;re++){var fe=D[re]*K[re]-A[re]*J[re];A[re]=D[re]*J[re]+A[re]*K[re],D[re]=fe}return this.conjugate(D,A,I),this.transform(D,A,X,k,I,P),this.conjugate(X,k,I),this.normalize13b(X,I),C.negative=y.negative^E.negative,C.length=y.length+E.length,C._strip()},i.prototype.mul=function(y){var E=new i(null);return E.words=new Array(this.length+y.length),this.mulTo(y,E)},i.prototype.mulf=function(y){var E=new i(null);return E.words=new Array(this.length+y.length),_(this,y,E)},i.prototype.imul=function(y){return this.clone().mulTo(y,this)},i.prototype.imuln=function(y){var E=y<0;E&&(y=-y),r(typeof y==\\\"number\\\"),r(y<67108864);for(var C=0,I=0;I<this.length;I++){var P=(this.words[I]|0)*y,k=(P&67108863)+(C&67108863);C>>=26,C+=P/67108864|0,C+=k>>>26,this.words[I]=k&67108863}return C!==0&&(this.words[I]=C,this.length++),this.length=y===0?1:this.length,E?this.ineg():this},i.prototype.muln=function(y){return this.clone().imuln(y)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(y){var E=g(y);if(E.length===0)return new i(1);for(var C=this,I=0;I<E.length&&E[I]===0;I++,C=C.sqr());if(++I<E.length)for(var P=C.sqr();I<E.length;I++,P=P.sqr())E[I]!==0&&(C=C.mul(P));return C},i.prototype.iushln=function(y){r(typeof y==\\\"number\\\"&&y>=0);var E=y%26,C=(y-E)/26,I=67108863>>>26-E<<26-E,P;if(E!==0){var k=0;for(P=0;P<this.length;P++){var U=this.words[P]&I,D=(this.words[P]|0)-U<<E;this.words[P]=D|k,k=U>>>26-E}k&&(this.words[P]=k,this.length++)}if(C!==0){for(P=this.length-1;P>=0;P--)this.words[P+C]=this.words[P];for(P=0;P<C;P++)this.words[P]=0;this.length+=C}return this._strip()},i.prototype.ishln=function(y){return r(this.negative===0),this.iushln(y)},i.prototype.iushrn=function(y,E,C){r(typeof y==\\\"number\\\"&&y>=0);var I;E?I=(E-E%26)/26:I=0;var P=y%26,k=Math.min((y-P)/26,this.length),U=67108863^67108863>>>P<<P,D=C;if(I-=k,I=Math.max(0,I),D){for(var A=0;A<k;A++)D.words[A]=this.words[A];D.length=k}if(k!==0)if(this.length>k)for(this.length-=k,A=0;A<this.length;A++)this.words[A]=this.words[A+k];else this.words[0]=0,this.length=1;var j=0;for(A=this.length-1;A>=0&&(j!==0||A>=I);A--){var K=this.words[A]|0;this.words[A]=j<<26-P|K>>>P,j=K&U}return D&&j!==0&&(D.words[D.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(y,E,C){return r(this.negative===0),this.iushrn(y,E,C)},i.prototype.shln=function(y){return this.clone().ishln(y)},i.prototype.ushln=function(y){return this.clone().iushln(y)},i.prototype.shrn=function(y){return this.clone().ishrn(y)},i.prototype.ushrn=function(y){return this.clone().iushrn(y)},i.prototype.testn=function(y){r(typeof y==\\\"number\\\"&&y>=0);var E=y%26,C=(y-E)/26,I=1<<E;if(this.length<=C)return!1;var P=this.words[C];return!!(P&I)},i.prototype.imaskn=function(y){r(typeof y==\\\"number\\\"&&y>=0);var E=y%26,C=(y-E)/26;if(r(this.negative===0,\\\"imaskn works only with positive numbers\\\"),this.length<=C)return this;if(E!==0&&C++,this.length=Math.min(C,this.length),E!==0){var I=67108863^67108863>>>E<<E;this.words[this.length-1]&=I}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.maskn=function(y){return this.clone().imaskn(y)},i.prototype.iaddn=function(y){return r(typeof y==\\\"number\\\"),r(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},i.prototype._iaddn=function(y){this.words[0]+=y;for(var E=0;E<this.length&&this.words[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},i.prototype.isubn=function(y){if(r(typeof y==\\\"number\\\"),r(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this._strip()},i.prototype.addn=function(y){return this.clone().iaddn(y)},i.prototype.subn=function(y){return this.clone().isubn(y)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(y,E,C){var I=y.length+C,P;this._expand(I);var k,U=0;for(P=0;P<y.length;P++){k=(this.words[P+C]|0)+U;var D=(y.words[P]|0)*E;k-=D&67108863,U=(k>>26)-(D/67108864|0),this.words[P+C]=k&67108863}for(;P<this.length-C;P++)k=(this.words[P+C]|0)+U,U=k>>26,this.words[P+C]=k&67108863;if(U===0)return this._strip();for(r(U===-1),U=0,P=0;P<this.length;P++)k=-(this.words[P]|0)+U,U=k>>26,this.words[P]=k&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(y,E){var C=this.length-y.length,I=this.clone(),P=y,k=P.words[P.length-1]|0,U=this._countBits(k);C=26-U,C!==0&&(P=P.ushln(C),I.iushln(C),k=P.words[P.length-1]|0);var D=I.length-P.length,A;if(E!==\\\"mod\\\"){A=new i(null),A.length=D+1,A.words=new Array(A.length);for(var j=0;j<A.length;j++)A.words[j]=0}var K=I.clone()._ishlnsubmul(P,1,D);K.negative===0&&(I=K,A&&(A.words[D]=1));for(var J=D-1;J>=0;J--){var X=(I.words[P.length+J]|0)*67108864+(I.words[P.length+J-1]|0);for(X=Math.min(X/k|0,67108863),I._ishlnsubmul(P,X,J);I.negative!==0;)X--,I.negative=0,I._ishlnsubmul(P,1,J),I.isZero()||(I.negative^=1);A&&(A.words[J]=X)}return A&&A._strip(),I._strip(),E!==\\\"div\\\"&&C!==0&&I.iushrn(C),{div:A||null,mod:I}},i.prototype.divmod=function(y,E,C){if(r(!y.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var I,P,k;return this.negative!==0&&y.negative===0?(k=this.neg().divmod(y,E),E!==\\\"mod\\\"&&(I=k.div.neg()),E!==\\\"div\\\"&&(P=k.mod.neg(),C&&P.negative!==0&&P.iadd(y)),{div:I,mod:P}):this.negative===0&&y.negative!==0?(k=this.divmod(y.neg(),E),E!==\\\"mod\\\"&&(I=k.div.neg()),{div:I,mod:k.mod}):(this.negative&y.negative)!==0?(k=this.neg().divmod(y.neg(),E),E!==\\\"div\\\"&&(P=k.mod.neg(),C&&P.negative!==0&&P.isub(y)),{div:k.div,mod:P}):y.length>this.length||this.cmp(y)<0?{div:new i(0),mod:this}:y.length===1?E===\\\"div\\\"?{div:this.divn(y.words[0]),mod:null}:E===\\\"mod\\\"?{div:null,mod:new i(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new i(this.modrn(y.words[0]))}:this._wordDiv(y,E)},i.prototype.div=function(y){return this.divmod(y,\\\"div\\\",!1).div},i.prototype.mod=function(y){return this.divmod(y,\\\"mod\\\",!1).mod},i.prototype.umod=function(y){return this.divmod(y,\\\"mod\\\",!0).mod},i.prototype.divRound=function(y){var E=this.divmod(y);if(E.mod.isZero())return E.div;var C=E.div.negative!==0?E.mod.isub(y):E.mod,I=y.ushrn(1),P=y.andln(1),k=C.cmp(I);return k<0||P===1&&k===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},i.prototype.modrn=function(y){var E=y<0;E&&(y=-y),r(y<=67108863);for(var C=(1<<26)%y,I=0,P=this.length-1;P>=0;P--)I=(C*I+(this.words[P]|0))%y;return E?-I:I},i.prototype.modn=function(y){return this.modrn(y)},i.prototype.idivn=function(y){var E=y<0;E&&(y=-y),r(y<=67108863);for(var C=0,I=this.length-1;I>=0;I--){var P=(this.words[I]|0)+C*67108864;this.words[I]=P/y|0,C=P%y}return this._strip(),E?this.ineg():this},i.prototype.divn=function(y){return this.clone().idivn(y)},i.prototype.egcd=function(y){r(y.negative===0),r(!y.isZero());var E=this,C=y.clone();E.negative!==0?E=E.umod(y):E=E.clone();for(var I=new i(1),P=new i(0),k=new i(0),U=new i(1),D=0;E.isEven()&&C.isEven();)E.iushrn(1),C.iushrn(1),++D;for(var A=C.clone(),j=E.clone();!E.isZero();){for(var K=0,J=1;(E.words[0]&J)===0&&K<26;++K,J<<=1);if(K>0)for(E.iushrn(K);K-- >0;)(I.isOdd()||P.isOdd())&&(I.iadd(A),P.isub(j)),I.iushrn(1),P.iushrn(1);for(var X=0,re=1;(C.words[0]&re)===0&&X<26;++X,re<<=1);if(X>0)for(C.iushrn(X);X-- >0;)(k.isOdd()||U.isOdd())&&(k.iadd(A),U.isub(j)),k.iushrn(1),U.iushrn(1);E.cmp(C)>=0?(E.isub(C),I.isub(k),P.isub(U)):(C.isub(E),k.isub(I),U.isub(P))}return{a:k,b:U,gcd:C.iushln(D)}},i.prototype._invmp=function(y){r(y.negative===0),r(!y.isZero());var E=this,C=y.clone();E.negative!==0?E=E.umod(y):E=E.clone();for(var I=new i(1),P=new i(0),k=C.clone();E.cmpn(1)>0&&C.cmpn(1)>0;){for(var U=0,D=1;(E.words[0]&D)===0&&U<26;++U,D<<=1);if(U>0)for(E.iushrn(U);U-- >0;)I.isOdd()&&I.iadd(k),I.iushrn(1);for(var A=0,j=1;(C.words[0]&j)===0&&A<26;++A,j<<=1);if(A>0)for(C.iushrn(A);A-- >0;)P.isOdd()&&P.iadd(k),P.iushrn(1);E.cmp(C)>=0?(E.isub(C),I.isub(P)):(C.isub(E),P.isub(I))}var K;return E.cmpn(1)===0?K=I:K=P,K.cmpn(0)<0&&K.iadd(y),K},i.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var E=this.clone(),C=y.clone();E.negative=0,C.negative=0;for(var I=0;E.isEven()&&C.isEven();I++)E.iushrn(1),C.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;C.isEven();)C.iushrn(1);var P=E.cmp(C);if(P<0){var k=E;E=C,C=k}else if(P===0||C.cmpn(1)===0)break;E.isub(C)}while(!0);return C.iushln(I)},i.prototype.invm=function(y){return this.egcd(y).a.umod(y)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(y){return this.words[0]&y},i.prototype.bincn=function(y){r(typeof y==\\\"number\\\");var E=y%26,C=(y-E)/26,I=1<<E;if(this.length<=C)return this._expand(C+1),this.words[C]|=I,this;for(var P=I,k=C;P!==0&&k<this.length;k++){var U=this.words[k]|0;U+=P,P=U>>>26,U&=67108863,this.words[k]=U}return P!==0&&(this.words[k]=P,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(y){var E=y<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this._strip();var C;if(this.length>1)C=1;else{E&&(y=-y),r(y<=67108863,\\\"Number is too big\\\");var I=this.words[0]|0;C=I===y?0:I<y?-1:1}return this.negative!==0?-C|0:C},i.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return-1;if(this.negative===0&&y.negative!==0)return 1;var E=this.ucmp(y);return this.negative!==0?-E|0:E},i.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return-1;for(var E=0,C=this.length-1;C>=0;C--){var I=this.words[C]|0,P=y.words[C]|0;if(I!==P){I<P?E=-1:I>P&&(E=1);break}}return E},i.prototype.gtn=function(y){return this.cmpn(y)===1},i.prototype.gt=function(y){return this.cmp(y)===1},i.prototype.gten=function(y){return this.cmpn(y)>=0},i.prototype.gte=function(y){return this.cmp(y)>=0},i.prototype.ltn=function(y){return this.cmpn(y)===-1},i.prototype.lt=function(y){return this.cmp(y)===-1},i.prototype.lten=function(y){return this.cmpn(y)<=0},i.prototype.lte=function(y){return this.cmp(y)<=0},i.prototype.eqn=function(y){return this.cmpn(y)===0},i.prototype.eq=function(y){return this.cmp(y)===0},i.red=function(y){return new M(y)},i.prototype.toRed=function(y){return r(!this.red,\\\"Already a number in reduction context\\\"),r(this.negative===0,\\\"red works only with positives\\\"),y.convertTo(this)._forceRed(y)},i.prototype.fromRed=function(){return r(this.red,\\\"fromRed works only with numbers in reduction context\\\"),this.red.convertFrom(this)},i.prototype._forceRed=function(y){return this.red=y,this},i.prototype.forceRed=function(y){return r(!this.red,\\\"Already a number in reduction context\\\"),this._forceRed(y)},i.prototype.redAdd=function(y){return r(this.red,\\\"redAdd works only with red numbers\\\"),this.red.add(this,y)},i.prototype.redIAdd=function(y){return r(this.red,\\\"redIAdd works only with red numbers\\\"),this.red.iadd(this,y)},i.prototype.redSub=function(y){return r(this.red,\\\"redSub works only with red numbers\\\"),this.red.sub(this,y)},i.prototype.redISub=function(y){return r(this.red,\\\"redISub works only with red numbers\\\"),this.red.isub(this,y)},i.prototype.redShl=function(y){return r(this.red,\\\"redShl works only with red numbers\\\"),this.red.shl(this,y)},i.prototype.redMul=function(y){return r(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,y),this.red.mul(this,y)},i.prototype.redIMul=function(y){return r(this.red,\\\"redMul works only with red numbers\\\"),this.red._verify2(this,y),this.red.imul(this,y)},i.prototype.redSqr=function(){return r(this.red,\\\"redSqr works only with red numbers\\\"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,\\\"redISqr works only with red numbers\\\"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,\\\"redSqrt works only with red numbers\\\"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,\\\"redInvm works only with red numbers\\\"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,\\\"redNeg works only with red numbers\\\"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(y){return r(this.red&&!y.red,\\\"redPow(normalNum)\\\"),this.red._verify1(this),this.red.pow(this,y)};var T={k256:null,p224:null,p192:null,p25519:null};function N(R,y){this.name=R,this.p=new i(y,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}N.prototype._tmp=function(){var y=new i(null);return y.words=new Array(Math.ceil(this.n/13)),y},N.prototype.ireduce=function(y){var E=y,C;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),C=E.bitLength();while(C>this.n);var I=C<this.n?-1:E.ucmp(this.p);return I===0?(E.words[0]=0,E.length=1):I>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},N.prototype.split=function(y,E){y.iushrn(this.n,0,E)},N.prototype.imulK=function(y){return y.imul(this.k)};function O(){N.call(this,\\\"k256\\\",\\\"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\\\")}n(O,N),O.prototype.split=function(y,E){for(var C=4194303,I=Math.min(y.length,9),P=0;P<I;P++)E.words[P]=y.words[P];if(E.length=I,y.length<=9){y.words[0]=0,y.length=1;return}var k=y.words[9];for(E.words[E.length++]=k&C,P=10;P<y.length;P++){var U=y.words[P]|0;y.words[P-10]=(U&C)<<4|k>>>22,k=U}k>>>=22,y.words[P-10]=k,k===0&&y.length>10?y.length-=10:y.length-=9},O.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var E=0,C=0;C<y.length;C++){var I=y.words[C]|0;E+=I*977,y.words[C]=E&67108863,E=I*64+(E/67108864|0)}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function L(){N.call(this,\\\"p224\\\",\\\"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\\\")}n(L,N);function B(){N.call(this,\\\"p192\\\",\\\"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\\\")}n(B,N);function H(){N.call(this,\\\"25519\\\",\\\"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\\\")}n(H,N),H.prototype.imulK=function(y){for(var E=0,C=0;C<y.length;C++){var I=(y.words[C]|0)*19+E,P=I&67108863;I>>>=26,y.words[C]=P,E=I}return E!==0&&(y.words[y.length++]=E),y},i._prime=function(y){if(T[y])return T[y];var E;if(y===\\\"k256\\\")E=new O;else if(y===\\\"p224\\\")E=new L;else if(y===\\\"p192\\\")E=new B;else if(y===\\\"p25519\\\")E=new H;else throw new Error(\\\"Unknown prime \\\"+y);return T[y]=E,E};function M(R){if(typeof R==\\\"string\\\"){var y=i._prime(R);this.m=y.p,this.prime=y}else r(R.gtn(1),\\\"modulus must be greater than 1\\\"),this.m=R,this.prime=null}M.prototype._verify1=function(y){r(y.negative===0,\\\"red works only with positives\\\"),r(y.red,\\\"red works only with red numbers\\\")},M.prototype._verify2=function(y,E){r((y.negative|E.negative)===0,\\\"red works only with positives\\\"),r(y.red&&y.red===E.red,\\\"red works only with red numbers\\\")},M.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(l(y,y.umod(this.m)._forceRed(this)),y)},M.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},M.prototype.add=function(y,E){this._verify2(y,E);var C=y.add(E);return C.cmp(this.m)>=0&&C.isub(this.m),C._forceRed(this)},M.prototype.iadd=function(y,E){this._verify2(y,E);var C=y.iadd(E);return C.cmp(this.m)>=0&&C.isub(this.m),C},M.prototype.sub=function(y,E){this._verify2(y,E);var C=y.sub(E);return C.cmpn(0)<0&&C.iadd(this.m),C._forceRed(this)},M.prototype.isub=function(y,E){this._verify2(y,E);var C=y.isub(E);return C.cmpn(0)<0&&C.iadd(this.m),C},M.prototype.shl=function(y,E){return this._verify1(y),this.imod(y.ushln(E))},M.prototype.imul=function(y,E){return this._verify2(y,E),this.imod(y.imul(E))},M.prototype.mul=function(y,E){return this._verify2(y,E),this.imod(y.mul(E))},M.prototype.isqr=function(y){return this.imul(y,y.clone())},M.prototype.sqr=function(y){return this.mul(y,y)},M.prototype.sqrt=function(y){if(y.isZero())return y.clone();var E=this.m.andln(3);if(r(E%2===1),E===3){var C=this.m.add(new i(1)).iushrn(2);return this.pow(y,C)}for(var I=this.m.subn(1),P=0;!I.isZero()&&I.andln(1)===0;)P++,I.iushrn(1);r(!I.isZero());var k=new i(1).toRed(this),U=k.redNeg(),D=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new i(2*A*A).toRed(this);this.pow(A,D).cmp(U)!==0;)A.redIAdd(U);for(var j=this.pow(A,I),K=this.pow(y,I.addn(1).iushrn(1)),J=this.pow(y,I),X=P;J.cmp(k)!==0;){for(var re=J,fe=0;re.cmp(k)!==0;fe++)re=re.redSqr();r(fe<X);var ce=this.pow(j,new i(1).iushln(X-fe-1));K=K.redMul(ce),j=ce.redSqr(),J=J.redMul(j),X=fe}return K},M.prototype.invm=function(y){var E=y._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},M.prototype.pow=function(y,E){if(E.isZero())return new i(1).toRed(this);if(E.cmpn(1)===0)return y.clone();var C=4,I=new Array(1<<C);I[0]=new i(1).toRed(this),I[1]=y;for(var P=2;P<I.length;P++)I[P]=this.mul(I[P-1],y);var k=I[0],U=0,D=0,A=E.bitLength()%26;for(A===0&&(A=26),P=E.length-1;P>=0;P--){for(var j=E.words[P],K=A-1;K>=0;K--){var J=j>>K&1;if(k!==I[0]&&(k=this.sqr(k)),J===0&&U===0){D=0;continue}U<<=1,U|=J,D++,!(D!==C&&(P!==0||K!==0))&&(k=this.mul(k,I[U]),D=0,U=0)}A=26}return k},M.prototype.convertTo=function(y){var E=y.umod(this.m);return E===y?E.clone():E},M.prototype.convertFrom=function(y){var E=y.clone();return E.red=null,E},i.mont=function(y){return new F(y)};function F(R){M.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}n(F,M),F.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},F.prototype.convertFrom=function(y){var E=this.imod(y.mul(this.rinv));return E.red=null,E},F.prototype.imul=function(y,E){if(y.isZero()||E.isZero())return y.words[0]=0,y.length=1,y;var C=y.imul(E),I=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(I).iushrn(this.shift),k=P;return P.cmp(this.m)>=0?k=P.isub(this.m):P.cmpn(0)<0&&(k=P.iadd(this.m)),k._forceRed(this)},F.prototype.mul=function(y,E){if(y.isZero()||E.isZero())return new i(0)._forceRed(this);var C=y.mul(E),I=C.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),P=C.isub(I).iushrn(this.shift),k=P;return P.cmp(this.m)>=0?k=P.isub(this.m):P.cmpn(0)<0&&(k=P.iadd(this.m)),k._forceRed(this)},F.prototype.invm=function(y){var E=this.imod(y._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(typeof dre>\\\"u\\\"||dre,D7e)});var AI=q(a_=>{\\\"use strict\\\";u();Object.defineProperty(a_,\\\"__esModule\\\",{value:!0});a_.errorValues=a_.standardErrorCodes=void 0;a_.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};a_.errorValues={\\\"-32700\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\\\"},\\\"-32600\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The JSON sent is not a valid Request object.\\\"},\\\"-32601\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The method does not exist / is not available.\\\"},\\\"-32602\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid method parameter(s).\\\"},\\\"-32603\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Internal JSON-RPC error.\\\"},\\\"-32000\\\":{standard:\\\"EIP-1474\\\",message:\\\"Invalid input.\\\"},\\\"-32001\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource not found.\\\"},\\\"-32002\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource unavailable.\\\"},\\\"-32003\\\":{standard:\\\"EIP-1474\\\",message:\\\"Transaction rejected.\\\"},\\\"-32004\\\":{standard:\\\"EIP-1474\\\",message:\\\"Method not supported.\\\"},\\\"-32005\\\":{standard:\\\"EIP-1474\\\",message:\\\"Request limit exceeded.\\\"},4001:{standard:\\\"EIP-1193\\\",message:\\\"User rejected the request.\\\"},4100:{standard:\\\"EIP-1193\\\",message:\\\"The requested account and/or method has not been authorized by the user.\\\"},4200:{standard:\\\"EIP-1193\\\",message:\\\"The requested method is not supported by this Ethereum provider.\\\"},4900:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from all chains.\\\"},4901:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from the specified chain.\\\"},4902:{standard:\\\"EIP-3085\\\",message:\\\"Unrecognized chain ID.\\\"}}});var zU=q(Rl=>{\\\"use strict\\\";u();Object.defineProperty(Rl,\\\"__esModule\\\",{value:!0});Rl.serialize=Rl.getErrorCode=Rl.isValidCode=Rl.getMessageFromCode=Rl.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var qU=AI(),F7e=\\\"Unspecified error message.\\\";Rl.JSON_RPC_SERVER_ERROR_MESSAGE=\\\"Unspecified server error.\\\";function j7e(t,e=F7e){if(t&&Number.isInteger(t)){let r=t.toString();if(fre(qU.errorValues,r))return qU.errorValues[r].message;if(q7e(t))return Rl.JSON_RPC_SERVER_ERROR_MESSAGE}return e}Rl.getMessageFromCode=j7e;function H7e(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(qU.errorValues[e]||q7e(t))}Rl.isValidCode=H7e;function ybt(t){var e;if(typeof t==\\\"number\\\")return t;if(bbt(t))return(e=t.code)!==null&&e!==void 0?e:t.errorCode}Rl.getErrorCode=ybt;function bbt(t){return typeof t==\\\"object\\\"&&t!==null&&(typeof t.code==\\\"number\\\"||typeof t.errorCode==\\\"number\\\")}function wbt(t,{shouldIncludeStack:e=!1}={}){let r={};if(t&&typeof t==\\\"object\\\"&&!Array.isArray(t)&&fre(t,\\\"code\\\")&&H7e(t.code)){let n=t;r.code=n.code,n.message&&typeof n.message==\\\"string\\\"?(r.message=n.message,fre(n,\\\"data\\\")&&(r.data=n.data)):(r.message=j7e(r.code),r.data={originalError:L7e(t)})}else r.code=qU.standardErrorCodes.rpc.internal,r.message=U7e(t,\\\"message\\\")?t.message:F7e,r.data={originalError:L7e(t)};return e&&(r.stack=U7e(t,\\\"stack\\\")?t.stack:void 0),r}Rl.serialize=wbt;function q7e(t){return t>=-32099&&t<=-32e3}function L7e(t){return t&&typeof t==\\\"object\\\"&&!Array.isArray(t)?Object.assign({},t):t}function fre(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U7e(t,e){return typeof t==\\\"object\\\"&&t!==null&&e in t&&typeof t[e]==\\\"string\\\"}});var V7e=q(WU=>{\\\"use strict\\\";u();Object.defineProperty(WU,\\\"__esModule\\\",{value:!0});WU.standardErrors=void 0;var zo=AI(),z7e=zU();WU.standardErrors={rpc:{parse:t=>qu(zo.standardErrorCodes.rpc.parse,t),invalidRequest:t=>qu(zo.standardErrorCodes.rpc.invalidRequest,t),invalidParams:t=>qu(zo.standardErrorCodes.rpc.invalidParams,t),methodNotFound:t=>qu(zo.standardErrorCodes.rpc.methodNotFound,t),internal:t=>qu(zo.standardErrorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum RPC Server errors must provide single object argument.\\\");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('\\\"code\\\" must be an integer such that: -32099 <= code <= -32005');return qu(e,t)},invalidInput:t=>qu(zo.standardErrorCodes.rpc.invalidInput,t),resourceNotFound:t=>qu(zo.standardErrorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>qu(zo.standardErrorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>qu(zo.standardErrorCodes.rpc.transactionRejected,t),methodNotSupported:t=>qu(zo.standardErrorCodes.rpc.methodNotSupported,t),limitExceeded:t=>qu(zo.standardErrorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>c_(zo.standardErrorCodes.provider.userRejectedRequest,t),unauthorized:t=>c_(zo.standardErrorCodes.provider.unauthorized,t),unsupportedMethod:t=>c_(zo.standardErrorCodes.provider.unsupportedMethod,t),disconnected:t=>c_(zo.standardErrorCodes.provider.disconnected,t),chainDisconnected:t=>c_(zo.standardErrorCodes.provider.chainDisconnected,t),unsupportedChain:t=>c_(zo.standardErrorCodes.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum Provider custom errors must provide single object argument.\\\");let{code:e,message:r,data:n}=t;if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string');return new VU(e,r,n)}}};function qu(t,e){let[r,n]=$7e(e);return new $U(t,r||(0,z7e.getMessageFromCode)(t),n)}function c_(t,e){let[r,n]=$7e(e);return new VU(t,r||(0,z7e.getMessageFromCode)(t),n)}function $7e(t){if(t){if(typeof t==\\\"string\\\")return[t];if(typeof t==\\\"object\\\"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!=\\\"string\\\")throw new Error(\\\"Must specify string message.\\\");return[e||void 0,r]}}return[]}var $U=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('\\\"code\\\" must be an integer.');if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},VU=class extends $U{constructor(e,r,n){if(!vbt(e))throw new Error('\\\"code\\\" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};function vbt(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}});var KU=q(GU=>{\\\"use strict\\\";u();Object.defineProperty(GU,\\\"__esModule\\\",{value:!0});GU.isErrorResponse=void 0;function xbt(t){return t.errorMessage!==void 0}GU.isErrorResponse=xbt});var QU=q(ZU=>{\\\"use strict\\\";u();Object.defineProperty(ZU,\\\"__esModule\\\",{value:!0});ZU.LIB_VERSION=void 0;ZU.LIB_VERSION=\\\"3.9.3\\\"});var W7e=q(JU=>{\\\"use strict\\\";u();Object.defineProperty(JU,\\\"__esModule\\\",{value:!0});JU.serializeError=void 0;var Ebt=KU(),_bt=QU(),Cbt=AI(),Sbt=zU();function Abt(t,e){let r=(0,Sbt.serialize)(Tbt(t),{shouldIncludeStack:!0}),n=new URL(\\\"https://docs.cloud.coinbase.com/wallet-sdk/docs/errors\\\");n.searchParams.set(\\\"version\\\",_bt.LIB_VERSION),n.searchParams.set(\\\"code\\\",r.code.toString());let i=Ibt(r.data,e);return i&&n.searchParams.set(\\\"method\\\",i),n.searchParams.set(\\\"message\\\",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}JU.serializeError=Abt;function Tbt(t){return typeof t==\\\"string\\\"?{message:t,code:Cbt.standardErrorCodes.rpc.internal}:(0,Ebt.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method}}):t}function Ibt(t,e){let r=t?.method;if(r)return r;if(e!==void 0){if(typeof e==\\\"string\\\")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}});var TI=q(zu=>{\\\"use strict\\\";u();Object.defineProperty(zu,\\\"__esModule\\\",{value:!0});zu.standardErrors=zu.standardErrorCodes=zu.serializeError=zu.getMessageFromCode=zu.getErrorCode=void 0;var Rbt=AI();Object.defineProperty(zu,\\\"standardErrorCodes\\\",{enumerable:!0,get:function(){return Rbt.standardErrorCodes}});var Pbt=V7e();Object.defineProperty(zu,\\\"standardErrors\\\",{enumerable:!0,get:function(){return Pbt.standardErrors}});var Obt=W7e();Object.defineProperty(zu,\\\"serializeError\\\",{enumerable:!0,get:function(){return Obt.serializeError}});var G7e=zU();Object.defineProperty(zu,\\\"getErrorCode\\\",{enumerable:!0,get:function(){return G7e.getErrorCode}});Object.defineProperty(zu,\\\"getMessageFromCode\\\",{enumerable:!0,get:function(){return G7e.getMessageFromCode}})});var RI=q(_a=>{\\\"use strict\\\";u();Object.defineProperty(_a,\\\"__esModule\\\",{value:!0});_a.ProviderType=_a.RegExpString=_a.IntNumber=_a.BigIntString=_a.AddressString=_a.HexString=_a.OpaqueType=void 0;function II(){return t=>t}_a.OpaqueType=II;_a.HexString=II();_a.AddressString=II();_a.BigIntString=II();function Nbt(t){return Math.floor(t)}_a.IntNumber=Nbt;_a.RegExpString=II();var K7e;(function(t){t.CoinbaseWallet=\\\"CoinbaseWallet\\\",t.MetaMask=\\\"MetaMask\\\",t.Unselected=\\\"\\\"})(K7e||(_a.ProviderType=K7e={}))});var Np=q(Je=>{\\\"use strict\\\";u();var kbt=Je&&Je.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Je,\\\"__esModule\\\",{value:!0});Je.isMobileWeb=Je.getLocation=Je.isInIFrame=Je.createQrUrl=Je.getFavicon=Je.range=Je.isBigNumber=Je.ensureParsedJSONObject=Je.ensureBN=Je.ensureRegExpString=Je.ensureIntNumber=Je.ensureBuffer=Je.ensureAddressString=Je.ensureEvenLengthHexString=Je.ensureHexString=Je.isHexString=Je.prepend0x=Je.strip0x=Je.has0xPrefix=Je.hexStringFromIntNumber=Je.intNumberFromHexString=Je.bigIntStringFromBN=Je.hexStringFromBuffer=Je.hexStringToUint8Array=Je.uint8ArrayToHex=Je.randomBytesHex=void 0;var Qy=kbt(SI()),Hv=TI(),$u=RI(),Z7e=/^[0-9]*$/,Q7e=/^[a-f0-9]*$/;function Bbt(t){return J7e(crypto.getRandomValues(new Uint8Array(t)))}Je.randomBytesHex=Bbt;function J7e(t){return[...t].map(e=>e.toString(16).padStart(2,\\\"0\\\")).join(\\\"\\\")}Je.uint8ArrayToHex=J7e;function Mbt(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Je.hexStringToUint8Array=Mbt;function Dbt(t,e=!1){let r=t.toString(\\\"hex\\\");return(0,$u.HexString)(e?`0x${r}`:r)}Je.hexStringFromBuffer=Dbt;function Lbt(t){return(0,$u.BigIntString)(t.toString(10))}Je.bigIntStringFromBN=Lbt;function Ubt(t){return(0,$u.IntNumber)(new Qy.default(OI(t,!1),16).toNumber())}Je.intNumberFromHexString=Ubt;function Fbt(t){return(0,$u.HexString)(`0x${new Qy.default(t).toString(16)}`)}Je.hexStringFromIntNumber=Fbt;function pre(t){return t.startsWith(\\\"0x\\\")||t.startsWith(\\\"0X\\\")}Je.has0xPrefix=pre;function YU(t){return pre(t)?t.slice(2):t}Je.strip0x=YU;function Y7e(t){return pre(t)?`0x${t.slice(2)}`:`0x${t}`}Je.prepend0x=Y7e;function PI(t){if(typeof t!=\\\"string\\\")return!1;let e=YU(t).toLowerCase();return Q7e.test(e)}Je.isHexString=PI;function X7e(t,e=!1){if(typeof t==\\\"string\\\"){let r=YU(t).toLowerCase();if(Q7e.test(r))return(0,$u.HexString)(e?`0x${r}`:r)}throw Hv.standardErrors.rpc.invalidParams(`\\\"${String(t)}\\\" is not a hexadecimal string`)}Je.ensureHexString=X7e;function OI(t,e=!1){let r=X7e(t,!1);return r.length%2===1&&(r=(0,$u.HexString)(`0${r}`)),e?(0,$u.HexString)(`0x${r}`):r}Je.ensureEvenLengthHexString=OI;function jbt(t){if(typeof t==\\\"string\\\"){let e=YU(t).toLowerCase();if(PI(e)&&e.length===40)return(0,$u.AddressString)(Y7e(e))}throw Hv.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}Je.ensureAddressString=jbt;function Hbt(t){if(globalThis.Buffer.isBuffer(t))return t;if(typeof t==\\\"string\\\"){if(PI(t)){let e=OI(t,!1);return globalThis.Buffer.from(e,\\\"hex\\\")}return globalThis.Buffer.from(t,\\\"utf8\\\")}throw Hv.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}Je.ensureBuffer=Hbt;function eRe(t){if(typeof t==\\\"number\\\"&&Number.isInteger(t))return(0,$u.IntNumber)(t);if(typeof t==\\\"string\\\"){if(Z7e.test(t))return(0,$u.IntNumber)(Number(t));if(PI(t))return(0,$u.IntNumber)(new Qy.default(OI(t,!1),16).toNumber())}throw Hv.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Je.ensureIntNumber=eRe;function qbt(t){if(t instanceof RegExp)return(0,$u.RegExpString)(t.toString());throw Hv.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}Je.ensureRegExpString=qbt;function zbt(t){if(t!==null&&(Qy.default.isBN(t)||tRe(t)))return new Qy.default(t.toString(10),10);if(typeof t==\\\"number\\\")return new Qy.default(eRe(t));if(typeof t==\\\"string\\\"){if(Z7e.test(t))return new Qy.default(t,10);if(PI(t))return new Qy.default(OI(t,!1),16)}throw Hv.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Je.ensureBN=zbt;function $bt(t){if(typeof t==\\\"string\\\")return JSON.parse(t);if(typeof t==\\\"object\\\")return t;throw Hv.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}Je.ensureParsedJSONObject=$bt;function tRe(t){if(t==null||typeof t.constructor!=\\\"function\\\")return!1;let{constructor:e}=t;return typeof e.config==\\\"function\\\"&&typeof e.EUCLID==\\\"number\\\"}Je.isBigNumber=tRe;function Vbt(t,e){return Array.from({length:e-t},(r,n)=>t+n)}Je.range=Vbt;function Wbt(){let t=document.querySelector('link[sizes=\\\"192x192\\\"]')||document.querySelector('link[sizes=\\\"180x180\\\"]')||document.querySelector('link[rel=\\\"icon\\\"]')||document.querySelector('link[rel=\\\"shortcut icon\\\"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute(\\\"href\\\"):null;return!n||n.startsWith(\\\"javascript:\\\")||n.startsWith(\\\"vbscript:\\\")?null:n.startsWith(\\\"http://\\\")||n.startsWith(\\\"https://\\\")||n.startsWith(\\\"data:\\\")?n:n.startsWith(\\\"//\\\")?e+n:`${e}//${r}${n}`}Je.getFavicon=Wbt;function Gbt(t,e,r,n,i,s){let o=n?\\\"parent-id\\\":\\\"id\\\",a=new URLSearchParams({[o]:t,secret:e,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${a}`}Je.createQrUrl=Gbt;function rRe(){try{return window.frameElement!==null}catch{return!1}}Je.isInIFrame=rRe;function Kbt(){try{return rRe()&&window.top?window.top.location:window.location}catch{return window.location}}Je.getLocation=Kbt;function Zbt(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}Je.isMobileWeb=Zbt});var nRe=q(XU=>{\\\"use strict\\\";u();Object.defineProperty(XU,\\\"__esModule\\\",{value:!0});XU.ScopedLocalStorage=void 0;var hre=class{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(\\\"\\\"),r=[];for(let n=0;n<localStorage.length;n++){let i=localStorage.key(n);typeof i==\\\"string\\\"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}};XU.ScopedLocalStorage=hre});var sRe=q((sJr,mre)=>{\\\"use strict\\\";u();var Qbt=Object.prototype.hasOwnProperty,Ja=\\\"~\\\";function NI(){}Object.create&&(NI.prototype=Object.create(null),new NI().__proto__||(Ja=!1));function Jbt(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function iRe(t,e,r,n,i){if(typeof r!=\\\"function\\\")throw new TypeError(\\\"The listener must be a function\\\");var s=new Jbt(r,n||t,i),o=Ja?Ja+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function eF(t,e){--t._eventsCount===0?t._events=new NI:delete t._events[e]}function Ca(){this._events=new NI,this._eventsCount=0}Ca.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)Qbt.call(r,n)&&e.push(Ja?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};Ca.prototype.listeners=function(e){var r=Ja?Ja+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};Ca.prototype.listenerCount=function(e){var r=Ja?Ja+e:e,n=this._events[r];return n?n.fn?1:n.length:0};Ca.prototype.emit=function(e,r,n,i,s,o){var a=Ja?Ja+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,d,f;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,s),!0;case 6:return c.fn.call(c.context,r,n,i,s,o),!0}for(f=1,d=new Array(l-1);f<l;f++)d[f-1]=arguments[f];c.fn.apply(c.context,d)}else{var p=c.length,h;for(f=0;f<p;f++)switch(c[f].once&&this.removeListener(e,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,r);break;case 3:c[f].fn.call(c[f].context,r,n);break;case 4:c[f].fn.call(c[f].context,r,n,i);break;default:if(!d)for(h=1,d=new Array(l-1);h<l;h++)d[h-1]=arguments[h];c[f].fn.apply(c[f].context,d)}}return!0};Ca.prototype.on=function(e,r,n){return iRe(this,e,r,n,!1)};Ca.prototype.once=function(e,r,n){return iRe(this,e,r,n,!0)};Ca.prototype.removeListener=function(e,r,n,i){var s=Ja?Ja+e:e;if(!this._events[s])return this;if(!r)return eF(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&eF(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:eF(this,s)}return this};Ca.prototype.removeAllListeners=function(e){var r;return e?(r=Ja?Ja+e:e,this._events[r]&&eF(this,r)):(this._events=new NI,this._eventsCount=0),this};Ca.prototype.off=Ca.prototype.removeListener;Ca.prototype.addListener=Ca.prototype.on;Ca.prefixed=Ja;Ca.EventEmitter=Ca;typeof mre<\\\"u\\\"&&(mre.exports=Ca)});var rF=q(tF=>{\\\"use strict\\\";u();Object.defineProperty(tF,\\\"__esModule\\\",{value:!0});tF.EVENTS=void 0;tF.EVENTS={STARTED_CONNECTING:\\\"walletlink_sdk.started.connecting\\\",CONNECTED_STATE_CHANGE:\\\"walletlink_sdk.connected\\\",DISCONNECTED:\\\"walletlink_sdk.disconnected\\\",METADATA_DESTROYED:\\\"walletlink_sdk_metadata_destroyed\\\",LINKED:\\\"walletlink_sdk.linked\\\",FAILURE:\\\"walletlink_sdk.generic_failure\\\",SESSION_CONFIG_RECEIVED:\\\"walletlink_sdk.session_config_event_received\\\",ETH_ACCOUNTS_STATE:\\\"walletlink_sdk.eth_accounts_state\\\",SESSION_STATE_CHANGE:\\\"walletlink_sdk.session_state_change\\\",UNLINKED_ERROR_STATE:\\\"walletlink_sdk.unlinked_error_state\\\",SKIPPED_CLEARING_SESSION:\\\"walletlink_sdk.skipped_clearing_session\\\",GENERAL_ERROR:\\\"walletlink_sdk.general_error\\\",WEB3_REQUEST:\\\"walletlink_sdk.web3.request\\\",WEB3_REQUEST_PUBLISHED:\\\"walletlink_sdk.web3.request_published\\\",WEB3_RESPONSE:\\\"walletlink_sdk.web3.response\\\",METHOD_NOT_IMPLEMENTED:\\\"walletlink_sdk.method_not_implemented\\\",UNKNOWN_ADDRESS_ENCOUNTERED:\\\"walletlink_sdk.unknown_address_encountered\\\"}});var nF=q(kp=>{\\\"use strict\\\";u();Object.defineProperty(kp,\\\"__esModule\\\",{value:!0});kp.RelayAbstract=kp.APP_VERSION_KEY=kp.LOCAL_STORAGE_ADDRESSES_KEY=kp.WALLET_USER_NAME_KEY=void 0;var oRe=TI();kp.WALLET_USER_NAME_KEY=\\\"walletUsername\\\";kp.LOCAL_STORAGE_ADDRESSES_KEY=\\\"Addresses\\\";kp.APP_VERSION_KEY=\\\"AppVersion\\\";var gre=class{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error(\\\"Error: No jsonRpcUrl provided\\\");return window.fetch(r,{method:\\\"POST\\\",body:JSON.stringify(e),mode:\\\"cors\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"}}).then(n=>n.json()).then(n=>{if(!n)throw oRe.standardErrors.rpc.parse({});let i=n,{error:s}=i;if(s)throw(0,oRe.serializeError)(s,e.method);return i})}};kp.RelayAbstract=gre});var Vu=q((dJr,yre)=>{u();typeof Object.create==\\\"function\\\"?yre.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yre.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Mp=q((bre,cRe)=>{u();var iF=Qx(),Bp=iF.Buffer;function aRe(t,e){for(var r in t)e[r]=t[r]}Bp.from&&Bp.alloc&&Bp.allocUnsafe&&Bp.allocUnsafeSlow?cRe.exports=iF:(aRe(iF,bre),bre.Buffer=qv);function qv(t,e,r){return Bp(t,e,r)}qv.prototype=Object.create(Bp.prototype);aRe(Bp,qv);qv.from=function(t,e,r){if(typeof t==\\\"number\\\")throw new TypeError(\\\"Argument must not be a number\\\");return Bp(t,e,r)};qv.alloc=function(t,e,r){if(typeof t!=\\\"number\\\")throw new TypeError(\\\"Argument must be a number\\\");var n=Bp(t);return e!==void 0?typeof r==\\\"string\\\"?n.fill(e,r):n.fill(e):n.fill(0),n};qv.allocUnsafe=function(t){if(typeof t!=\\\"number\\\")throw new TypeError(\\\"Argument must be a number\\\");return Bp(t)};qv.allocUnsafeSlow=function(t){if(typeof t!=\\\"number\\\")throw new TypeError(\\\"Argument must be a number\\\");return iF.SlowBuffer(t)}});var uRe=q((hJr,lRe)=>{u();var Ybt={}.toString;lRe.exports=Array.isArray||function(t){return Ybt.call(t)==\\\"[object Array]\\\"}});var l_=q((gJr,dRe)=>{\\\"use strict\\\";u();dRe.exports=TypeError});var wre=q((bJr,fRe)=>{\\\"use strict\\\";u();fRe.exports=Object});var hRe=q((vJr,pRe)=>{\\\"use strict\\\";u();pRe.exports=Error});var gRe=q((EJr,mRe)=>{\\\"use strict\\\";u();mRe.exports=EvalError});var bRe=q((CJr,yRe)=>{\\\"use strict\\\";u();yRe.exports=RangeError});var vRe=q((AJr,wRe)=>{\\\"use strict\\\";u();wRe.exports=ReferenceError});var vre=q((IJr,xRe)=>{\\\"use strict\\\";u();xRe.exports=SyntaxError});var _Re=q((PJr,ERe)=>{\\\"use strict\\\";u();ERe.exports=URIError});var SRe=q((NJr,CRe)=>{\\\"use strict\\\";u();CRe.exports=Math.abs});var TRe=q((BJr,ARe)=>{\\\"use strict\\\";u();ARe.exports=Math.floor});var RRe=q((DJr,IRe)=>{\\\"use strict\\\";u();IRe.exports=Math.max});var ORe=q((UJr,PRe)=>{\\\"use strict\\\";u();PRe.exports=Math.min});var kRe=q((jJr,NRe)=>{\\\"use strict\\\";u();NRe.exports=Math.pow});var MRe=q((qJr,BRe)=>{\\\"use strict\\\";u();BRe.exports=Math.round});var LRe=q(($Jr,DRe)=>{\\\"use strict\\\";u();DRe.exports=Number.isNaN||function(e){return e!==e}});var FRe=q((WJr,URe)=>{\\\"use strict\\\";u();var Xbt=LRe();URe.exports=function(e){return Xbt(e)||e===0?e:e<0?-1:1}});var HRe=q((KJr,jRe)=>{\\\"use strict\\\";u();jRe.exports=Object.getOwnPropertyDescriptor});var u_=q((QJr,qRe)=>{\\\"use strict\\\";u();var sF=HRe();if(sF)try{sF([],\\\"length\\\")}catch{sF=null}qRe.exports=sF});var kI=q((YJr,zRe)=>{\\\"use strict\\\";u();var oF=Object.defineProperty||!1;if(oF)try{oF({},\\\"a\\\",{value:1})}catch{oF=!1}zRe.exports=oF});var xre=q((eYr,$Re)=>{\\\"use strict\\\";u();$Re.exports=function(){if(typeof Symbol!=\\\"function\\\"||typeof Object.getOwnPropertySymbols!=\\\"function\\\")return!1;if(typeof Symbol.iterator==\\\"symbol\\\")return!0;var e={},r=Symbol(\\\"test\\\"),n=Object(r);if(typeof r==\\\"string\\\"||Object.prototype.toString.call(r)!==\\\"[object Symbol]\\\"||Object.prototype.toString.call(n)!==\\\"[object Symbol]\\\")return!1;var i=42;e[r]=i;for(var s in e)return!1;if(typeof Object.keys==\\\"function\\\"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==\\\"function\\\"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor==\\\"function\\\"){var a=Object.getOwnPropertyDescriptor(e,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0}});var GRe=q((rYr,WRe)=>{\\\"use strict\\\";u();var VRe=typeof Symbol<\\\"u\\\"&&Symbol,ewt=xre();WRe.exports=function(){return typeof VRe!=\\\"function\\\"||typeof Symbol!=\\\"function\\\"||typeof VRe(\\\"foo\\\")!=\\\"symbol\\\"||typeof Symbol(\\\"bar\\\")!=\\\"symbol\\\"?!1:ewt()}});var Ere=q((iYr,KRe)=>{\\\"use strict\\\";u();KRe.exports=typeof Reflect<\\\"u\\\"&&Reflect.getPrototypeOf||null});var _re=q((oYr,ZRe)=>{\\\"use strict\\\";u();var twt=wre();ZRe.exports=twt.getPrototypeOf||null});var YRe=q((cYr,JRe)=>{\\\"use strict\\\";u();var rwt=\\\"Function.prototype.bind called on incompatible \\\",nwt=Object.prototype.toString,iwt=Math.max,swt=\\\"[object Function]\\\",QRe=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},owt=function(e,r){for(var n=[],i=r||0,s=0;i<e.length;i+=1,s+=1)n[s]=e[i];return n},awt=function(t,e){for(var r=\\\"\\\",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};JRe.exports=function(e){var r=this;if(typeof r!=\\\"function\\\"||nwt.apply(r)!==swt)throw new TypeError(rwt+r);for(var n=owt(arguments,1),i,s=function(){if(this instanceof i){var d=r.apply(this,QRe(n,arguments));return Object(d)===d?d:this}return r.apply(e,QRe(n,arguments))},o=iwt(0,r.length-n.length),a=[],c=0;c<o;c++)a[c]=\\\"$\\\"+c;if(i=Function(\\\"binder\\\",\\\"return function (\\\"+awt(a,\\\",\\\")+\\\"){ return binder.apply(this,arguments); }\\\")(s),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var d_=q((uYr,XRe)=>{\\\"use strict\\\";u();var cwt=YRe();XRe.exports=Function.prototype.bind||cwt});var aF=q((fYr,ePe)=>{\\\"use strict\\\";u();ePe.exports=Function.prototype.call});var cF=q((hYr,tPe)=>{\\\"use strict\\\";u();tPe.exports=Function.prototype.apply});var nPe=q((gYr,rPe)=>{\\\"use strict\\\";u();rPe.exports=typeof Reflect<\\\"u\\\"&&Reflect&&Reflect.apply});var Cre=q((bYr,iPe)=>{\\\"use strict\\\";u();var lwt=d_(),uwt=cF(),dwt=aF(),fwt=nPe();iPe.exports=fwt||lwt.call(dwt,uwt)});var lF=q((vYr,sPe)=>{\\\"use strict\\\";u();var pwt=d_(),hwt=l_(),mwt=aF(),gwt=Cre();sPe.exports=function(e){if(e.length<1||typeof e[0]!=\\\"function\\\")throw new hwt(\\\"a function is required\\\");return gwt(pwt,mwt,e)}});var dPe=q((EYr,uPe)=>{\\\"use strict\\\";u();var ywt=lF(),oPe=u_(),cPe;try{cPe=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!=\\\"object\\\"||!(\\\"code\\\"in t)||t.code!==\\\"ERR_PROTO_ACCESS\\\")throw t}var Sre=!!cPe&&oPe&&oPe(Object.prototype,\\\"__proto__\\\"),lPe=Object,aPe=lPe.getPrototypeOf;uPe.exports=Sre&&typeof Sre.get==\\\"function\\\"?ywt([Sre.get]):typeof aPe==\\\"function\\\"?function(e){return aPe(e==null?e:lPe(e))}:!1});var Are=q((CYr,mPe)=>{\\\"use strict\\\";u();var fPe=Ere(),pPe=_re(),hPe=dPe();mPe.exports=fPe?function(e){return fPe(e)}:pPe?function(e){if(!e||typeof e!=\\\"object\\\"&&typeof e!=\\\"function\\\")throw new TypeError(\\\"getProto: not an object\\\");return pPe(e)}:hPe?function(e){return hPe(e)}:null});var yPe=q((AYr,gPe)=>{\\\"use strict\\\";u();var bwt=Function.prototype.call,wwt=Object.prototype.hasOwnProperty,vwt=d_();gPe.exports=vwt.call(bwt,wwt)});var Rre=q((IYr,_Pe)=>{\\\"use strict\\\";u();var Zt,xwt=wre(),Ewt=hRe(),_wt=gRe(),Cwt=bRe(),Swt=vRe(),m_=vre(),h_=l_(),Awt=_Re(),Twt=SRe(),Iwt=TRe(),Rwt=RRe(),Pwt=ORe(),Owt=kRe(),Nwt=MRe(),kwt=FRe(),xPe=Function,Tre=function(t){try{return xPe('\\\"use strict\\\"; return ('+t+\\\").constructor;\\\")()}catch{}},BI=u_(),Bwt=kI(),Ire=function(){throw new h_},Mwt=BI?(function(){try{return arguments.callee,Ire}catch{try{return BI(arguments,\\\"callee\\\").get}catch{return Ire}}})():Ire,f_=GRe()(),uo=Are(),Dwt=_re(),Lwt=Ere(),EPe=cF(),MI=aF(),p_={},Uwt=typeof Uint8Array>\\\"u\\\"||!uo?Zt:uo(Uint8Array),zv={__proto__:null,\\\"%AggregateError%\\\":typeof AggregateError>\\\"u\\\"?Zt:AggregateError,\\\"%Array%\\\":Array,\\\"%ArrayBuffer%\\\":typeof ArrayBuffer>\\\"u\\\"?Zt:ArrayBuffer,\\\"%ArrayIteratorPrototype%\\\":f_&&uo?uo([][Symbol.iterator]()):Zt,\\\"%AsyncFromSyncIteratorPrototype%\\\":Zt,\\\"%AsyncFunction%\\\":p_,\\\"%AsyncGenerator%\\\":p_,\\\"%AsyncGeneratorFunction%\\\":p_,\\\"%AsyncIteratorPrototype%\\\":p_,\\\"%Atomics%\\\":typeof Atomics>\\\"u\\\"?Zt:Atomics,\\\"%BigInt%\\\":typeof BigInt>\\\"u\\\"?Zt:BigInt,\\\"%BigInt64Array%\\\":typeof BigInt64Array>\\\"u\\\"?Zt:BigInt64Array,\\\"%BigUint64Array%\\\":typeof BigUint64Array>\\\"u\\\"?Zt:BigUint64Array,\\\"%Boolean%\\\":Boolean,\\\"%DataView%\\\":typeof DataView>\\\"u\\\"?Zt:DataView,\\\"%Date%\\\":Date,\\\"%decodeURI%\\\":decodeURI,\\\"%decodeURIComponent%\\\":decodeURIComponent,\\\"%encodeURI%\\\":encodeURI,\\\"%encodeURIComponent%\\\":encodeURIComponent,\\\"%Error%\\\":Ewt,\\\"%eval%\\\":eval,\\\"%EvalError%\\\":_wt,\\\"%Float16Array%\\\":typeof Float16Array>\\\"u\\\"?Zt:Float16Array,\\\"%Float32Array%\\\":typeof Float32Array>\\\"u\\\"?Zt:Float32Array,\\\"%Float64Array%\\\":typeof Float64Array>\\\"u\\\"?Zt:Float64Array,\\\"%FinalizationRegistry%\\\":typeof FinalizationRegistry>\\\"u\\\"?Zt:FinalizationRegistry,\\\"%Function%\\\":xPe,\\\"%GeneratorFunction%\\\":p_,\\\"%Int8Array%\\\":typeof Int8Array>\\\"u\\\"?Zt:Int8Array,\\\"%Int16Array%\\\":typeof Int16Array>\\\"u\\\"?Zt:Int16Array,\\\"%Int32Array%\\\":typeof Int32Array>\\\"u\\\"?Zt:Int32Array,\\\"%isFinite%\\\":isFinite,\\\"%isNaN%\\\":isNaN,\\\"%IteratorPrototype%\\\":f_&&uo?uo(uo([][Symbol.iterator]())):Zt,\\\"%JSON%\\\":typeof JSON==\\\"object\\\"?JSON:Zt,\\\"%Map%\\\":typeof Map>\\\"u\\\"?Zt:Map,\\\"%MapIteratorPrototype%\\\":typeof Map>\\\"u\\\"||!f_||!uo?Zt:uo(new Map()[Symbol.iterator]()),\\\"%Math%\\\":Math,\\\"%Number%\\\":Number,\\\"%Object%\\\":xwt,\\\"%Object.getOwnPropertyDescriptor%\\\":BI,\\\"%parseFloat%\\\":parseFloat,\\\"%parseInt%\\\":parseInt,\\\"%Promise%\\\":typeof Promise>\\\"u\\\"?Zt:Promise,\\\"%Proxy%\\\":typeof Proxy>\\\"u\\\"?Zt:Proxy,\\\"%RangeError%\\\":Cwt,\\\"%ReferenceError%\\\":Swt,\\\"%Reflect%\\\":typeof Reflect>\\\"u\\\"?Zt:Reflect,\\\"%RegExp%\\\":RegExp,\\\"%Set%\\\":typeof Set>\\\"u\\\"?Zt:Set,\\\"%SetIteratorPrototype%\\\":typeof Set>\\\"u\\\"||!f_||!uo?Zt:uo(new Set()[Symbol.iterator]()),\\\"%SharedArrayBuffer%\\\":typeof SharedArrayBuffer>\\\"u\\\"?Zt:SharedArrayBuffer,\\\"%String%\\\":String,\\\"%StringIteratorPrototype%\\\":f_&&uo?uo(\\\"\\\"[Symbol.iterator]()):Zt,\\\"%Symbol%\\\":f_?Symbol:Zt,\\\"%SyntaxError%\\\":m_,\\\"%ThrowTypeError%\\\":Mwt,\\\"%TypedArray%\\\":Uwt,\\\"%TypeError%\\\":h_,\\\"%Uint8Array%\\\":typeof Uint8Array>\\\"u\\\"?Zt:Uint8Array,\\\"%Uint8ClampedArray%\\\":typeof Uint8ClampedArray>\\\"u\\\"?Zt:Uint8ClampedArray,\\\"%Uint16Array%\\\":typeof Uint16Array>\\\"u\\\"?Zt:Uint16Array,\\\"%Uint32Array%\\\":typeof Uint32Array>\\\"u\\\"?Zt:Uint32Array,\\\"%URIError%\\\":Awt,\\\"%WeakMap%\\\":typeof WeakMap>\\\"u\\\"?Zt:WeakMap,\\\"%WeakRef%\\\":typeof WeakRef>\\\"u\\\"?Zt:WeakRef,\\\"%WeakSet%\\\":typeof WeakSet>\\\"u\\\"?Zt:WeakSet,\\\"%Function.prototype.call%\\\":MI,\\\"%Function.prototype.apply%\\\":EPe,\\\"%Object.defineProperty%\\\":Bwt,\\\"%Object.getPrototypeOf%\\\":Dwt,\\\"%Math.abs%\\\":Twt,\\\"%Math.floor%\\\":Iwt,\\\"%Math.max%\\\":Rwt,\\\"%Math.min%\\\":Pwt,\\\"%Math.pow%\\\":Owt,\\\"%Math.round%\\\":Nwt,\\\"%Math.sign%\\\":kwt,\\\"%Reflect.getPrototypeOf%\\\":Lwt};if(uo)try{null.error}catch(t){bPe=uo(uo(t)),zv[\\\"%Error.prototype%\\\"]=bPe}var bPe,Fwt=function t(e){var r;if(e===\\\"%AsyncFunction%\\\")r=Tre(\\\"async function () {}\\\");else if(e===\\\"%GeneratorFunction%\\\")r=Tre(\\\"function* () {}\\\");else if(e===\\\"%AsyncGeneratorFunction%\\\")r=Tre(\\\"async function* () {}\\\");else if(e===\\\"%AsyncGenerator%\\\"){var n=t(\\\"%AsyncGeneratorFunction%\\\");n&&(r=n.prototype)}else if(e===\\\"%AsyncIteratorPrototype%\\\"){var i=t(\\\"%AsyncGenerator%\\\");i&&uo&&(r=uo(i.prototype))}return zv[e]=r,r},wPe={__proto__:null,\\\"%ArrayBufferPrototype%\\\":[\\\"ArrayBuffer\\\",\\\"prototype\\\"],\\\"%ArrayPrototype%\\\":[\\\"Array\\\",\\\"prototype\\\"],\\\"%ArrayProto_entries%\\\":[\\\"Array\\\",\\\"prototype\\\",\\\"entries\\\"],\\\"%ArrayProto_forEach%\\\":[\\\"Array\\\",\\\"prototype\\\",\\\"forEach\\\"],\\\"%ArrayProto_keys%\\\":[\\\"Array\\\",\\\"prototype\\\",\\\"keys\\\"],\\\"%ArrayProto_values%\\\":[\\\"Array\\\",\\\"prototype\\\",\\\"values\\\"],\\\"%AsyncFunctionPrototype%\\\":[\\\"AsyncFunction\\\",\\\"prototype\\\"],\\\"%AsyncGenerator%\\\":[\\\"AsyncGeneratorFunction\\\",\\\"prototype\\\"],\\\"%AsyncGeneratorPrototype%\\\":[\\\"AsyncGeneratorFunction\\\",\\\"prototype\\\",\\\"prototype\\\"],\\\"%BooleanPrototype%\\\":[\\\"Boolean\\\",\\\"prototype\\\"],\\\"%DataViewPrototype%\\\":[\\\"DataView\\\",\\\"prototype\\\"],\\\"%DatePrototype%\\\":[\\\"Date\\\",\\\"prototype\\\"],\\\"%ErrorPrototype%\\\":[\\\"Error\\\",\\\"prototype\\\"],\\\"%EvalErrorPrototype%\\\":[\\\"EvalError\\\",\\\"prototype\\\"],\\\"%Float32ArrayPrototype%\\\":[\\\"Float32Array\\\",\\\"prototype\\\"],\\\"%Float64ArrayPrototype%\\\":[\\\"Float64Array\\\",\\\"prototype\\\"],\\\"%FunctionPrototype%\\\":[\\\"Function\\\",\\\"prototype\\\"],\\\"%Generator%\\\":[\\\"GeneratorFunction\\\",\\\"prototype\\\"],\\\"%GeneratorPrototype%\\\":[\\\"GeneratorFunction\\\",\\\"prototype\\\",\\\"prototype\\\"],\\\"%Int8ArrayPrototype%\\\":[\\\"Int8Array\\\",\\\"prototype\\\"],\\\"%Int16ArrayPrototype%\\\":[\\\"Int16Array\\\",\\\"prototype\\\"],\\\"%Int32ArrayPrototype%\\\":[\\\"Int32Array\\\",\\\"prototype\\\"],\\\"%JSONParse%\\\":[\\\"JSON\\\",\\\"parse\\\"],\\\"%JSONStringify%\\\":[\\\"JSON\\\",\\\"stringify\\\"],\\\"%MapPrototype%\\\":[\\\"Map\\\",\\\"prototype\\\"],\\\"%NumberPrototype%\\\":[\\\"Number\\\",\\\"prototype\\\"],\\\"%ObjectPrototype%\\\":[\\\"Object\\\",\\\"prototype\\\"],\\\"%ObjProto_toString%\\\":[\\\"Object\\\",\\\"prototype\\\",\\\"toString\\\"],\\\"%ObjProto_valueOf%\\\":[\\\"Object\\\",\\\"prototype\\\",\\\"valueOf\\\"],\\\"%PromisePrototype%\\\":[\\\"Promise\\\",\\\"prototype\\\"],\\\"%PromiseProto_then%\\\":[\\\"Promise\\\",\\\"prototype\\\",\\\"then\\\"],\\\"%Promise_all%\\\":[\\\"Promise\\\",\\\"all\\\"],\\\"%Promise_reject%\\\":[\\\"Promise\\\",\\\"reject\\\"],\\\"%Promise_resolve%\\\":[\\\"Promise\\\",\\\"resolve\\\"],\\\"%RangeErrorPrototype%\\\":[\\\"RangeError\\\",\\\"prototype\\\"],\\\"%ReferenceErrorPrototype%\\\":[\\\"ReferenceError\\\",\\\"prototype\\\"],\\\"%RegExpPrototype%\\\":[\\\"RegExp\\\",\\\"prototype\\\"],\\\"%SetPrototype%\\\":[\\\"Set\\\",\\\"prototype\\\"],\\\"%SharedArrayBufferPrototype%\\\":[\\\"SharedArrayBuffer\\\",\\\"prototype\\\"],\\\"%StringPrototype%\\\":[\\\"String\\\",\\\"prototype\\\"],\\\"%SymbolPrototype%\\\":[\\\"Symbol\\\",\\\"prototype\\\"],\\\"%SyntaxErrorPrototype%\\\":[\\\"SyntaxError\\\",\\\"prototype\\\"],\\\"%TypedArrayPrototype%\\\":[\\\"TypedArray\\\",\\\"prototype\\\"],\\\"%TypeErrorPrototype%\\\":[\\\"TypeError\\\",\\\"prototype\\\"],\\\"%Uint8ArrayPrototype%\\\":[\\\"Uint8Array\\\",\\\"prototype\\\"],\\\"%Uint8ClampedArrayPrototype%\\\":[\\\"Uint8ClampedArray\\\",\\\"prototype\\\"],\\\"%Uint16ArrayPrototype%\\\":[\\\"Uint16Array\\\",\\\"prototype\\\"],\\\"%Uint32ArrayPrototype%\\\":[\\\"Uint32Array\\\",\\\"prototype\\\"],\\\"%URIErrorPrototype%\\\":[\\\"URIError\\\",\\\"prototype\\\"],\\\"%WeakMapPrototype%\\\":[\\\"WeakMap\\\",\\\"prototype\\\"],\\\"%WeakSetPrototype%\\\":[\\\"WeakSet\\\",\\\"prototype\\\"]},DI=d_(),uF=yPe(),jwt=DI.call(MI,Array.prototype.concat),Hwt=DI.call(EPe,Array.prototype.splice),vPe=DI.call(MI,String.prototype.replace),dF=DI.call(MI,String.prototype.slice),qwt=DI.call(MI,RegExp.prototype.exec),zwt=/[^%.[\\\\]]+|\\\\[(?:(-?\\\\d+(?:\\\\.\\\\d+)?)|([\\\"'])((?:(?!\\\\2)[^\\\\\\\\]|\\\\\\\\.)*?)\\\\2)\\\\]|(?=(?:\\\\.|\\\\[\\\\])(?:\\\\.|\\\\[\\\\]|%$))/g,$wt=/\\\\\\\\(\\\\\\\\)?/g,Vwt=function(e){var r=dF(e,0,1),n=dF(e,-1);if(r===\\\"%\\\"&&n!==\\\"%\\\")throw new m_(\\\"invalid intrinsic syntax, expected closing `%`\\\");if(n===\\\"%\\\"&&r!==\\\"%\\\")throw new m_(\\\"invalid intrinsic syntax, expected opening `%`\\\");var i=[];return vPe(e,zwt,function(s,o,a,c){i[i.length]=a?vPe(c,$wt,\\\"$1\\\"):o||s}),i},Wwt=function(e,r){var n=e,i;if(uF(wPe,n)&&(i=wPe[n],n=\\\"%\\\"+i[0]+\\\"%\\\"),uF(zv,n)){var s=zv[n];if(s===p_&&(s=Fwt(n)),typeof s>\\\"u\\\"&&!r)throw new h_(\\\"intrinsic \\\"+e+\\\" exists, but is not available. Please file an issue!\\\");return{alias:i,name:n,value:s}}throw new m_(\\\"intrinsic \\\"+e+\\\" does not exist!\\\")};_Pe.exports=function(e,r){if(typeof e!=\\\"string\\\"||e.length===0)throw new h_(\\\"intrinsic name must be a non-empty string\\\");if(arguments.length>1&&typeof r!=\\\"boolean\\\")throw new h_('\\\"allowMissing\\\" argument must be a boolean');if(qwt(/^%?[^%]*%?$/,e)===null)throw new m_(\\\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\\\");var n=Vwt(e),i=n.length>0?n[0]:\\\"\\\",s=Wwt(\\\"%\\\"+i+\\\"%\\\",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],Hwt(n,jwt([0,1],l)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],h=dF(p,0,1),m=dF(p,-1);if((h==='\\\"'||h===\\\"'\\\"||h===\\\"`\\\"||m==='\\\"'||m===\\\"'\\\"||m===\\\"`\\\")&&h!==m)throw new m_(\\\"property names with quotes must have matching quotes\\\");if((p===\\\"constructor\\\"||!f)&&(c=!0),i+=\\\".\\\"+p,o=\\\"%\\\"+i+\\\"%\\\",uF(zv,o))a=zv[o];else if(a!=null){if(!(p in a)){if(!r)throw new h_(\\\"base intrinsic for \\\"+e+\\\" exists, but the property is not available.\\\");return}if(BI&&d+1>=n.length){var g=BI(a,p);f=!!g,f&&\\\"get\\\"in g&&!(\\\"originalValue\\\"in g.get)?a=g.get:a=a[p]}else f=uF(a,p),a=a[p];f&&!c&&(zv[o]=a)}}return a}});var Pre=q((PYr,APe)=>{\\\"use strict\\\";u();var CPe=Rre(),SPe=lF(),Gwt=SPe([CPe(\\\"%String.prototype.indexOf%\\\")]);APe.exports=function(e,r){var n=CPe(e,!!r);return typeof n==\\\"function\\\"&&Gwt(e,\\\".prototype.\\\")>-1?SPe([n]):n}});var PPe=q((NYr,RPe)=>{\\\"use strict\\\";u();var IPe=Function.prototype.toString,g_=typeof Reflect==\\\"object\\\"&&Reflect!==null&&Reflect.apply,Nre,fF;if(typeof g_==\\\"function\\\"&&typeof Object.defineProperty==\\\"function\\\")try{Nre=Object.defineProperty({},\\\"length\\\",{get:function(){throw fF}}),fF={},g_(function(){throw 42},null,Nre)}catch(t){t!==fF&&(g_=null)}else g_=null;var Kwt=/^\\\\s*class\\\\b/,kre=function(e){try{var r=IPe.call(e);return Kwt.test(r)}catch{return!1}},Ore=function(e){try{return kre(e)?!1:(IPe.call(e),!0)}catch{return!1}},pF=Object.prototype.toString,Zwt=\\\"[object Object]\\\",Qwt=\\\"[object Function]\\\",Jwt=\\\"[object GeneratorFunction]\\\",Ywt=\\\"[object HTMLAllCollection]\\\",Xwt=\\\"[object HTML document.all class]\\\",evt=\\\"[object HTMLCollection]\\\",tvt=typeof Symbol==\\\"function\\\"&&!!Symbol.toStringTag,rvt=!(0 in[,]),Bre=function(){return!1};typeof document==\\\"object\\\"&&(TPe=document.all,pF.call(TPe)===pF.call(document.all)&&(Bre=function(e){if((rvt||!e)&&(typeof e>\\\"u\\\"||typeof e==\\\"object\\\"))try{var r=pF.call(e);return(r===Ywt||r===Xwt||r===evt||r===Zwt)&&e(\\\"\\\")==null}catch{}return!1}));var TPe;RPe.exports=g_?function(e){if(Bre(e))return!0;if(!e||typeof e!=\\\"function\\\"&&typeof e!=\\\"object\\\")return!1;try{g_(e,null,Nre)}catch(r){if(r!==fF)return!1}return!kre(e)&&Ore(e)}:function(e){if(Bre(e))return!0;if(!e||typeof e!=\\\"function\\\"&&typeof e!=\\\"object\\\")return!1;if(tvt)return Ore(e);if(kre(e))return!1;var r=pF.call(e);return r!==Qwt&&r!==Jwt&&!/^\\\\[object HTML/.test(r)?!1:Ore(e)}});var kPe=q((BYr,NPe)=>{\\\"use strict\\\";u();var nvt=PPe(),ivt=Object.prototype.toString,OPe=Object.prototype.hasOwnProperty,svt=function(e,r,n){for(var i=0,s=e.length;i<s;i++)OPe.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))},ovt=function(e,r,n){for(var i=0,s=e.length;i<s;i++)n==null?r(e.charAt(i),i,e):r.call(n,e.charAt(i),i,e)},avt=function(e,r,n){for(var i in e)OPe.call(e,i)&&(n==null?r(e[i],i,e):r.call(n,e[i],i,e))};function cvt(t){return ivt.call(t)===\\\"[object Array]\\\"}NPe.exports=function(e,r,n){if(!nvt(r))throw new TypeError(\\\"iterator must be a function\\\");var i;arguments.length>=3&&(i=n),cvt(e)?svt(e,r,i):typeof e==\\\"string\\\"?ovt(e,r,i):avt(e,r,i)}});var MPe=q((DYr,BPe)=>{\\\"use strict\\\";u();BPe.exports=[\\\"Float16Array\\\",\\\"Float32Array\\\",\\\"Float64Array\\\",\\\"Int8Array\\\",\\\"Int16Array\\\",\\\"Int32Array\\\",\\\"Uint8Array\\\",\\\"Uint8ClampedArray\\\",\\\"Uint16Array\\\",\\\"Uint32Array\\\",\\\"BigInt64Array\\\",\\\"BigUint64Array\\\"]});var LPe=q((UYr,DPe)=>{\\\"use strict\\\";u();var Mre=MPe(),lvt=globalThis;DPe.exports=function(){for(var e=[],r=0;r<Mre.length;r++)typeof lvt[Mre[r]]==\\\"function\\\"&&(e[e.length]=Mre[r]);return e}});var HPe=q((jYr,jPe)=>{\\\"use strict\\\";u();var UPe=kI(),uvt=vre(),y_=l_(),FPe=u_();jPe.exports=function(e,r,n){if(!e||typeof e!=\\\"object\\\"&&typeof e!=\\\"function\\\")throw new y_(\\\"`obj` must be an object or a function`\\\");if(typeof r!=\\\"string\\\"&&typeof r!=\\\"symbol\\\")throw new y_(\\\"`property` must be a string or a symbol`\\\");if(arguments.length>3&&typeof arguments[3]!=\\\"boolean\\\"&&arguments[3]!==null)throw new y_(\\\"`nonEnumerable`, if provided, must be a boolean or null\\\");if(arguments.length>4&&typeof arguments[4]!=\\\"boolean\\\"&&arguments[4]!==null)throw new y_(\\\"`nonWritable`, if provided, must be a boolean or null\\\");if(arguments.length>5&&typeof arguments[5]!=\\\"boolean\\\"&&arguments[5]!==null)throw new y_(\\\"`nonConfigurable`, if provided, must be a boolean or null\\\");if(arguments.length>6&&typeof arguments[6]!=\\\"boolean\\\")throw new y_(\\\"`loose`, if provided, must be a boolean\\\");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!FPe&&FPe(e,r);if(UPe)UPe(e,r,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)e[r]=n;else throw new uvt(\\\"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.\\\")}});var $Pe=q((qYr,zPe)=>{\\\"use strict\\\";u();var Dre=kI(),qPe=function(){return!!Dre};qPe.hasArrayLengthDefineBug=function(){if(!Dre)return null;try{return Dre([],\\\"length\\\",{value:1}).length!==1}catch{return!0}};zPe.exports=qPe});var ZPe=q(($Yr,KPe)=>{\\\"use strict\\\";u();var dvt=Rre(),VPe=HPe(),fvt=$Pe()(),WPe=u_(),GPe=l_(),pvt=dvt(\\\"%Math.floor%\\\");KPe.exports=function(e,r){if(typeof e!=\\\"function\\\")throw new GPe(\\\"`fn` is not a function\\\");if(typeof r!=\\\"number\\\"||r<0||r>4294967295||pvt(r)!==r)throw new GPe(\\\"`length` must be a positive 32-bit integer\\\");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if(\\\"length\\\"in e&&WPe){var o=WPe(e,\\\"length\\\");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(fvt?VPe(e,\\\"length\\\",r,!0,!0):VPe(e,\\\"length\\\",r)),e}});var JPe=q((WYr,QPe)=>{\\\"use strict\\\";u();var hvt=d_(),mvt=cF(),gvt=Cre();QPe.exports=function(){return gvt(hvt,mvt,arguments)}});var eOe=q((KYr,hF)=>{\\\"use strict\\\";u();var yvt=ZPe(),YPe=kI(),bvt=lF(),XPe=JPe();hF.exports=function(e){var r=bvt(arguments),n=e.length-(arguments.length-1);return yvt(r,1+(n>0?n:0),!0)};YPe?YPe(hF.exports,\\\"apply\\\",{value:XPe}):hF.exports.apply=XPe});var rOe=q((QYr,tOe)=>{\\\"use strict\\\";u();var wvt=xre();tOe.exports=function(){return wvt()&&!!Symbol.toStringTag}});var aOe=q((YYr,oOe)=>{\\\"use strict\\\";u();var yF=kPe(),vvt=LPe(),nOe=eOe(),Ure=Pre(),gF=u_(),mF=Are(),xvt=Ure(\\\"Object.prototype.toString\\\"),sOe=rOe()(),iOe=globalThis,Lre=vvt(),Fre=Ure(\\\"String.prototype.slice\\\"),Evt=Ure(\\\"Array.prototype.indexOf\\\",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},bF={__proto__:null};sOe&&gF&&mF?yF(Lre,function(t){var e=new iOe[t];if(Symbol.toStringTag in e&&mF){var r=mF(e),n=gF(r,Symbol.toStringTag);if(!n&&r){var i=mF(r);n=gF(i,Symbol.toStringTag)}bF[\\\"$\\\"+t]=nOe(n.get)}}):yF(Lre,function(t){var e=new iOe[t],r=e.slice||e.set;r&&(bF[\\\"$\\\"+t]=nOe(r))});var _vt=function(e){var r=!1;return yF(bF,function(n,i){if(!r)try{\\\"$\\\"+n(e)===i&&(r=Fre(i,1))}catch{}}),r},Cvt=function(e){var r=!1;return yF(bF,function(n,i){if(!r)try{n(e),r=Fre(i,1)}catch{}}),r};oOe.exports=function(e){if(!e||typeof e!=\\\"object\\\")return!1;if(!sOe){var r=Fre(xvt(e),8,-1);return Evt(Lre,r)>-1?r:r!==\\\"Object\\\"?!1:Cvt(e)}return gF?_vt(e):null}});var lOe=q((eXr,cOe)=>{\\\"use strict\\\";u();var Svt=aOe();cOe.exports=function(e){return!!Svt(e)}});var dOe=q((rXr,uOe)=>{\\\"use strict\\\";u();var Avt=l_(),Tvt=Pre(),Ivt=Tvt(\\\"TypedArray.prototype.buffer\\\",!0),Rvt=lOe();uOe.exports=Ivt||function(e){if(!Rvt(e))throw new Avt(\\\"Not a Typed Array\\\");return e.buffer}});var hOe=q((iXr,pOe)=>{\\\"use strict\\\";u();var cf=Mp().Buffer,Pvt=uRe(),Ovt=dOe(),Nvt=ArrayBuffer.isView||function(e){try{return Ovt(e),!0}catch{return!1}},kvt=typeof Uint8Array<\\\"u\\\",fOe=typeof ArrayBuffer<\\\"u\\\"&&typeof Uint8Array<\\\"u\\\",Bvt=fOe&&(cf.prototype instanceof Uint8Array||cf.TYPED_ARRAY_SUPPORT);pOe.exports=function(e,r){if(cf.isBuffer(e))return e.constructor&&!(\\\"isBuffer\\\"in e)?cf.from(e):e;if(typeof e==\\\"string\\\")return cf.from(e,r);if(fOe&&Nvt(e)){if(e.byteLength===0)return cf.alloc(0);if(Bvt){var n=cf.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),s=cf.from(i);if(s.length===e.byteLength)return s}if(kvt&&e instanceof Uint8Array)return cf.from(e);var o=Pvt(e);if(o)for(var a=0;a<e.length;a+=1){var c=e[a];if(typeof c!=\\\"number\\\"||c<0||c>255||~~c!==c)throw new RangeError(\\\"Array items must be numbers in the range 0-255.\\\")}if(o||cf.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer==\\\"function\\\"&&e.constructor.isBuffer(e))return cf.from(e);throw new TypeError('The \\\"data\\\" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var $v=q((oXr,mOe)=>{\\\"use strict\\\";u();var Mvt=Mp().Buffer,Dvt=hOe();function wF(t,e){this._block=Mvt.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}wF.prototype.update=function(t,e){t=Dvt(t,e||\\\"utf8\\\");for(var r=this._block,n=this._blockSize,i=t.length,s=this._len,o=0;o<i;){for(var a=s%n,c=Math.min(i-o,n-a),l=0;l<c;l++)r[a+l]=t[o+l];s+=c,o+=c,s%n===0&&this._update(r)}return this._len+=i,this};wF.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return t?s.toString(t):s};wF.prototype._update=function(){throw new Error(\\\"_update must be implemented by subclass\\\")};mOe.exports=wF});var bOe=q((cXr,yOe)=>{\\\"use strict\\\";u();var Lvt=Vu(),gOe=$v(),Uvt=Mp().Buffer,Fvt=[1518500249,1859775393,-1894007588,-899497514],jvt=new Array(80);function LI(){this.init(),this._w=jvt,gOe.call(this,64,56)}Lvt(LI,gOe);LI.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Hvt(t){return t<<5|t>>>27}function qvt(t){return t<<30|t>>>2}function zvt(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}LI.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=e[a-3]^e[a-8]^e[a-14]^e[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=Hvt(r)+zvt(l,n,i,s)+o+e[c]+Fvt[l]|0;o=s,s=i,i=qvt(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};LI.prototype._hash=function(){var t=Uvt.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};yOe.exports=LI});var xOe=q((uXr,vOe)=>{\\\"use strict\\\";u();var $vt=Vu(),wOe=$v(),Vvt=Mp().Buffer,Wvt=[1518500249,1859775393,-1894007588,-899497514],Gvt=new Array(80);function UI(){this.init(),this._w=Gvt,wOe.call(this,64,56)}$vt(UI,wOe);UI.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Kvt(t){return t<<1|t>>>31}function Zvt(t){return t<<5|t>>>27}function Qvt(t){return t<<30|t>>>2}function Jvt(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}UI.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=0;a<16;++a)e[a]=t.readInt32BE(a*4);for(;a<80;++a)e[a]=Kvt(e[a-3]^e[a-8]^e[a-14]^e[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=Zvt(r)+Jvt(l,n,i,s)+o+e[c]+Wvt[l]|0;o=s,s=i,i=Qvt(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0};UI.prototype._hash=function(){var t=Vvt.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};vOe.exports=UI});var jre=q((fXr,_Oe)=>{\\\"use strict\\\";u();var Yvt=Vu(),EOe=$v(),Xvt=Mp().Buffer,e2t=[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],t2t=new Array(64);function FI(){this.init(),this._w=t2t,EOe.call(this,64,56)}Yvt(FI,EOe);FI.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function r2t(t,e,r){return r^t&(e^r)}function n2t(t,e,r){return t&e|r&(t|e)}function i2t(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function s2t(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function o2t(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function a2t(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}FI.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=a2t(e[d-2])+e[d-7]+o2t(e[d-15])+e[d-16]|0;for(var f=0;f<64;++f){var p=l+s2t(o)+r2t(o,a,c)+e2t[f]+e[f]|0,h=i2t(r)+n2t(r,n,i)|0;l=c,c=a,a=o,o=s+p|0,s=i,i=n,n=r,r=p+h|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};FI.prototype._hash=function(){var t=Xvt.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};_Oe.exports=FI});var SOe=q((hXr,COe)=>{\\\"use strict\\\";u();var c2t=Vu(),l2t=jre(),u2t=$v(),d2t=Mp().Buffer,f2t=new Array(64);function vF(){this.init(),this._w=f2t,u2t.call(this,64,56)}c2t(vF,l2t);vF.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};vF.prototype._hash=function(){var t=d2t.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};COe.exports=vF});var Hre=q((gXr,NOe)=>{\\\"use strict\\\";u();var p2t=Vu(),OOe=$v(),h2t=Mp().Buffer,AOe=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],m2t=new Array(160);function jI(){this.init(),this._w=m2t,OOe.call(this,128,112)}p2t(jI,OOe);jI.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function TOe(t,e,r){return r^t&(e^r)}function IOe(t,e,r){return t&e|r&(t|e)}function ROe(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function POe(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function g2t(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function y2t(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function b2t(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function w2t(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function fo(t,e){return t>>>0<e>>>0?1:0}jI.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,f=this._bl|0,p=this._cl|0,h=this._dl|0,m=this._el|0,g=this._fl|0,w=this._gl|0,v=this._hl|0,b=0;b<32;b+=2)e[b]=t.readInt32BE(b*4),e[b+1]=t.readInt32BE(b*4+4);for(;b<160;b+=2){var _=e[b-30],S=e[b-30+1],T=g2t(_,S),N=y2t(S,_);_=e[b-4],S=e[b-4+1];var O=b2t(_,S),L=w2t(S,_),B=e[b-14],H=e[b-14+1],M=e[b-32],F=e[b-32+1],R=N+H|0,y=T+B+fo(R,N)|0;R=R+L|0,y=y+O+fo(R,L)|0,R=R+F|0,y=y+M+fo(R,F)|0,e[b]=y,e[b+1]=R}for(var E=0;E<160;E+=2){y=e[E],R=e[E+1];var C=IOe(r,n,i),I=IOe(d,f,p),P=ROe(r,d),k=ROe(d,r),U=POe(o,m),D=POe(m,o),A=AOe[E],j=AOe[E+1],K=TOe(o,a,c),J=TOe(m,g,w),X=v+D|0,re=l+U+fo(X,v)|0;X=X+J|0,re=re+K+fo(X,J)|0,X=X+j|0,re=re+A+fo(X,j)|0,X=X+R|0,re=re+y+fo(X,R)|0;var fe=k+I|0,ce=P+C+fo(fe,k)|0;l=c,v=w,c=a,w=g,a=o,g=m,m=h+X|0,o=s+re+fo(m,h)|0,s=i,h=p,i=n,p=f,n=r,f=d,d=X+fe|0,r=re+ce+fo(d,X)|0}this._al=this._al+d|0,this._bl=this._bl+f|0,this._cl=this._cl+p|0,this._dl=this._dl+h|0,this._el=this._el+m|0,this._fl=this._fl+g|0,this._gl=this._gl+w|0,this._hl=this._hl+v|0,this._ah=this._ah+r+fo(this._al,d)|0,this._bh=this._bh+n+fo(this._bl,f)|0,this._ch=this._ch+i+fo(this._cl,p)|0,this._dh=this._dh+s+fo(this._dl,h)|0,this._eh=this._eh+o+fo(this._el,m)|0,this._fh=this._fh+a+fo(this._fl,g)|0,this._gh=this._gh+c+fo(this._gl,w)|0,this._hh=this._hh+l+fo(this._hl,v)|0};jI.prototype._hash=function(){var t=h2t.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};NOe.exports=jI});var BOe=q((bXr,kOe)=>{\\\"use strict\\\";u();var v2t=Vu(),x2t=Hre(),E2t=$v(),_2t=Mp().Buffer,C2t=new Array(160);function xF(){this.init(),this._w=C2t,E2t.call(this,128,112)}v2t(xF,x2t);xF.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};xF.prototype._hash=function(){var t=_2t.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};kOe.exports=xF});var MOe=q((vXr,s0)=>{\\\"use strict\\\";u();s0.exports=function(e){var r=e.toLowerCase(),n=s0.exports[r];if(!n)throw new Error(r+\\\" is not supported (we accept pull requests)\\\");return new n};s0.exports.sha=bOe();s0.exports.sha1=xOe();s0.exports.sha224=SOe();s0.exports.sha256=jre();s0.exports.sha384=BOe();s0.exports.sha512=Hre()});var _F=q(EF=>{\\\"use strict\\\";u();Object.defineProperty(EF,\\\"__esModule\\\",{value:!0});EF.Session=void 0;var DOe=MOe(),LOe=Np(),UOe=\\\"session:id\\\",FOe=\\\"session:secret\\\",jOe=\\\"session:linked\\\",qre=class t{constructor(e,r,n,i){this._storage=e,this._id=r||(0,LOe.randomBytesHex)(16),this._secret=n||(0,LOe.randomBytesHex)(32),this._key=new DOe.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest(\\\"hex\\\"),this._linked=!!i}static load(e){let r=e.getItem(UOe),n=e.getItem(jOe),i=e.getItem(FOe);return r&&i?new t(e,r,i,n===\\\"1\\\"):null}static hash(e){return new DOe.sha256().update(e).digest(\\\"hex\\\")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(UOe,this._id),this._storage.setItem(FOe,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(jOe,this._linked?\\\"1\\\":\\\"0\\\")}};EF.Session=qre});var HOe=q(SF=>{\\\"use strict\\\";u();Object.defineProperty(SF,\\\"__esModule\\\",{value:!0});SF.Cipher=void 0;var CF=Np(),zre=class{constructor(e){this.secret=e}async encrypt(e){let r=this.secret;if(r.length!==64)throw Error(\\\"secret must be 256 bits\\\");let n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey(\\\"raw\\\",(0,CF.hexStringToUint8Array)(r),{name:\\\"aes-gcm\\\"},!1,[\\\"encrypt\\\",\\\"decrypt\\\"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:\\\"AES-GCM\\\",iv:n},i,s.encode(e)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),d=new Uint8Array(c),f=new Uint8Array(l),p=new Uint8Array([...n,...d,...f]);return(0,CF.uint8ArrayToHex)(p)}async decrypt(e){let r=this.secret;if(r.length!==64)throw Error(\\\"secret must be 256 bits\\\");return new Promise((n,i)=>{(async function(){let s=await crypto.subtle.importKey(\\\"raw\\\",(0,CF.hexStringToUint8Array)(r),{name:\\\"aes-gcm\\\"},!1,[\\\"encrypt\\\",\\\"decrypt\\\"]),o=(0,CF.hexStringToUint8Array)(e),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),d=new Uint8Array([...l,...c]),f={name:\\\"AES-GCM\\\",iv:new Uint8Array(a)};try{let p=await window.crypto.subtle.decrypt(f,s,d),h=new TextDecoder;n(h.decode(p))}catch(p){i(p)}})()})}};SF.Cipher=zre});var qOe=q(AF=>{\\\"use strict\\\";u();Object.defineProperty(AF,\\\"__esModule\\\",{value:!0});AF.WalletLinkHTTP=void 0;var $re=class{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;let i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:\\\"POST\\\",headers:{Authorization:this.auth}}))).catch(r=>console.error(\\\"Unabled to mark event as failed:\\\",r))}async fetchUnseenEvents(){var e;let r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){let{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let s=(e=n?.filter(o=>o.event===\\\"Web3Response\\\").map(o=>({type:\\\"Event\\\",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${r.status}`)}};AF.WalletLinkHTTP=$re});var zOe=q(w_=>{\\\"use strict\\\";u();Object.defineProperty(w_,\\\"__esModule\\\",{value:!0});w_.WalletLinkWebSocket=w_.ConnectionState=void 0;var b_;(function(t){t[t.DISCONNECTED=0]=\\\"DISCONNECTED\\\",t[t.CONNECTING=1]=\\\"CONNECTING\\\",t[t.CONNECTED=2]=\\\"CONNECTED\\\"})(b_||(w_.ConnectionState=b_={}));var Vre=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,\\\"ws\\\")}async connect(){if(this.webSocket)throw new Error(\\\"webSocket object is not null\\\");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){r(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,b_.CONNECTING),i.onclose=s=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${s.code}: ${s.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,b_.DISCONNECTED)},i.onopen=s=>{var o;e(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,b_.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},i.onmessage=s=>{var o,a;if(s.data===\\\"h\\\")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:\\\"Heartbeat\\\"});else try{let c=JSON.parse(s.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var e;let{webSocket:r}=this;if(r){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,b_.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:r}=this;if(!r){this.pendingData.push(e),this.connect();return}r.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}};w_.WalletLinkWebSocket=Vre});var WOe=q(IF=>{\\\"use strict\\\";u();Object.defineProperty(IF,\\\"__esModule\\\",{value:!0});IF.WalletLinkConnection=void 0;var v_=RI(),S2t=HOe(),Dp=rF(),$Oe=nF(),x_=_F(),A2t=qOe(),TF=zOe(),VOe=1e4,T2t=6e4,Wre=class{constructor({session:e,linkAPIUrl:r,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,v_.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([[\\\"__destroyed\\\",this.handleDestroyed],[\\\"EthereumAddress\\\",this.handleAccountUpdated],[\\\"WalletUsername\\\",this.handleWalletUsernameUpdated],[\\\"AppVersion\\\",this.handleAppVersionUpdated],[\\\"ChainId\\\",l=>a.JsonRpcUrl&&this.handleChainUpdated(l,a.JsonRpcUrl)]]).forEach((l,d)=>{let f=a[d];f!==void 0&&l(f)})},this.handleDestroyed=a=>{var c,l;a===\\\"1\\\"&&((c=this.listener)===null||c===void 0||c.resetAndReload(),(l=this.diagnostic)===null||l===void 0||l.log(Dp.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:x_.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var c,l;try{let d=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.accountUpdated(d)}catch{(l=this.diagnostic)===null||l===void 0||l.log(Dp.EVENTS.GENERAL_ERROR,{message:\\\"Had error decrypting\\\",value:\\\"selectedAddress\\\"})}},this.handleMetadataUpdated=async(a,c)=>{var l,d;try{let f=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.metadataUpdated(a,f)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Dp.EVENTS.GENERAL_ERROR,{message:\\\"Had error decrypting\\\",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated($Oe.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated($Oe.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,c)=>{var l,d;try{let f=await this.cipher.decrypt(a),p=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.chainUpdated(f,p)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Dp.EVENTS.GENERAL_ERROR,{message:\\\"Had error decrypting\\\",value:\\\"chainId|jsonRpcUrl\\\"})}},this.session=e,this.cipher=new S2t.Cipher(e.secret),this.diagnostic=i,this.listener=n;let o=new TF.WalletLinkWebSocket(`${r}/rpc`,s);o.setConnectionStateListener(async a=>{var c;(c=this.diagnostic)===null||c===void 0||c.log(Dp.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:x_.Session.hash(e.id)});let l=!1;switch(a){case TF.ConnectionState.DISCONNECTED:if(!this.destroyed){let d=async()=>{await new Promise(f=>setTimeout(f,5e3)),this.destroyed||o.connect().catch(()=>{d()})};d()}break;case TF.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),l=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},VOe),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case TF.ConnectionState.CONNECTING:break}this.connected!==l&&(this.connected=l)}),o.setIncomingDataListener(a=>{var c,l,d;switch(a.type){case\\\"Heartbeat\\\":this.updateLastHeartbeat();return;case\\\"IsLinkedOK\\\":case\\\"Linked\\\":{let f=a.type===\\\"IsLinkedOK\\\"?a.linked:void 0;(c=this.diagnostic)===null||c===void 0||c.log(Dp.EVENTS.LINKED,{sessionIdHash:x_.Session.hash(e.id),linked:f,type:a.type,onlineGuests:a.onlineGuests}),this.linked=f||a.onlineGuests>0;break}case\\\"GetSessionConfigOK\\\":case\\\"SessionConfigUpdated\\\":{(l=this.diagnostic)===null||l===void 0||l.log(Dp.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:x_.Session.hash(e.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case\\\"Event\\\":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new A2t.WalletLinkHTTP(r,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error(\\\"instance is destroyed\\\");(e=this.diagnostic)===null||e===void 0||e.log(Dp.EVENTS.STARTED_CONNECTING,{sessionIdHash:x_.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(Dp.EVENTS.DISCONNECTED,{sessionIdHash:x_.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var r,n;this._connected=e,e&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(r=>{this.connected?e().then(r):this.onceConnected=()=>{e().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(e){var r,n;if(!(e.type!==\\\"Event\\\"||e.event!==\\\"Web3Response\\\"))try{let i=await this.cipher.decrypt(e.data),s=JSON.parse(i);if(s.type!==\\\"WEB3_RESPONSE\\\")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Dp.EVENTS.GENERAL_ERROR,{message:\\\"Had error decrypting\\\",value:\\\"incomingEvent\\\"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error(\\\"Unable to check for unseen events\\\",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(e,r){let n={type:\\\"SetSessionConfig\\\",id:(0,v_.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected(async()=>{let i=await this.makeRequest(n);if(i.type===\\\"Fail\\\")throw new Error(i.error||\\\"failed to set session metadata\\\")})}async publishEvent(e,r,n=!1){let i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?\\\"injected_sdk\\\":\\\"sdk\\\"}))),s={type:\\\"PublishEvent\\\",id:(0,v_.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{let o=await this.makeRequest(s);if(o.type===\\\"Fail\\\")throw new Error(o.error||\\\"failed to publish event\\\");return o.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>VOe*2){this.ws.disconnect();return}try{this.ws.sendData(\\\"h\\\")}catch{}}async makeRequest(e,r=T2t){let n=e.id;this.sendData(e);let i;return Promise.race([new Promise((s,o)=>{i=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r)}),new Promise(s=>{this.requestResolutions.set(n,o=>{clearTimeout(i),s(o),this.requestResolutions.delete(n)})})])}async authenticate(){let e={type:\\\"HostSession\\\",id:(0,v_.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(e);if(r.type===\\\"Fail\\\")throw new Error(r.error||\\\"failed to authentcate\\\")}sendIsLinked(){let e={type:\\\"IsLinked\\\",id:(0,v_.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:\\\"GetSessionConfig\\\",id:(0,v_.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}};IF.WalletLinkConnection=Wre});var GOe=q(Gre=>{\\\"use strict\\\";u();Object.defineProperty(Gre,\\\"__esModule\\\",{value:!0});Gre.default='@namespace svg \\\"http://www.w3.org/2000/svg\\\";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Helvetica Neue\\\",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:\\\"\\\\\\\\201C\\\" \\\"\\\\\\\\201D\\\" \\\"\\\\\\\\2018\\\" \\\"\\\\\\\\2019\\\";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",\\\"Helvetica Neue\\\",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'});var Kre=q(E_=>{\\\"use strict\\\";u();var I2t=E_&&E_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(E_,\\\"__esModule\\\",{value:!0});E_.injectCssReset=void 0;var R2t=I2t(GOe());function P2t(){let t=document.createElement(\\\"style\\\");t.type=\\\"text/css\\\",t.appendChild(document.createTextNode(R2t.default)),document.documentElement.appendChild(t)}E_.injectCssReset=P2t});var Ya={};ue(Ya,{Component:()=>zI,Fragment:()=>WI,cloneElement:()=>U2t,createContext:()=>F2t,createElement:()=>nNe,createRef:()=>N2t,h:()=>nNe,hydrate:()=>fNe,isValidElement:()=>YOe,options:()=>dn,render:()=>dNe,toChildArray:()=>aNe});function Lp(t,e){for(var r in e)t[r]=e[r];return t}function tne(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function nNe(t,e,r){var n,i,s,o={};for(s in e)s==\\\"key\\\"?n=e[s]:s==\\\"ref\\\"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?$I.call(arguments,2):r),typeof t==\\\"function\\\"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return qI(t,o,n,i,null)}function qI(t,e,r,n,i){var s={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++JOe,__i:-1,__u:0};return i==null&&dn.vnode!=null&&dn.vnode(s),s}function N2t(){return{current:null}}function WI(t){return t.children}function zI(t,e){this.props=t,this.context=e}function __(t,e){if(e==null)return t.__?__(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type==\\\"function\\\"?__(t):null}function k2t(t){if(t.__P&&t.__d){var e=t.__v,r=e.__e,n=[],i=[],s=Lp({},e);s.__v=e.__v+1,dn.vnode&&dn.vnode(s),rne(t.__P,s,e,t.__n,t.__P.namespaceURI,32&e.__u?[r]:null,n,r??__(e),!!(32&e.__u),i),s.__v=e.__v,s.__.__k[s.__i]=s,cNe(n,s,i),e.__e=e.__=null,s.__e!=r&&iNe(s)}}function iNe(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),iNe(t)}function Yre(t){(!t.__d&&(t.__d=!0)&&Jy.push(t)&&!kF.__r++||KOe!=dn.debounceRendering)&&((KOe=dn.debounceRendering)||XOe)(kF)}function kF(){try{for(var t,e=1;Jy.length;)Jy.length>e&&Jy.sort(eNe),t=Jy.shift(),e=Jy.length,k2t(t)}finally{Jy.length=kF.__r=0}}function sNe(t,e,r,n,i,s,o,a,c,l,d){var f,p,h,m,g,w,v,b=n&&n.__k||NF,_=e.length;for(c=B2t(r,e,b,c,_),f=0;f<_;f++)(h=r.__k[f])!=null&&(p=h.__i!=-1&&b[h.__i]||OF,h.__i=f,w=rne(t,h,p,i,s,o,a,c,l,d),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&nne(p.ref,null,h),d.push(h.ref,h.__c||m,h)),g==null&&m!=null&&(g=m),(v=!!(4&h.__u))||p.__k===h.__k?(c=oNe(h,c,t,v),v&&p.__e&&(p.__e=null)):typeof h.type==\\\"function\\\"&&w!==void 0?c=w:m&&(c=m.nextSibling),h.__u&=-7);return r.__e=g,c}function B2t(t,e,r,n,i){var s,o,a,c,l,d=r.length,f=d,p=0;for(t.__k=new Array(i),s=0;s<i;s++)(o=e[s])!=null&&typeof o!=\\\"boolean\\\"&&typeof o!=\\\"function\\\"?(typeof o==\\\"string\\\"||typeof o==\\\"number\\\"||typeof o==\\\"bigint\\\"||o.constructor==String?o=t.__k[s]=qI(null,o,null,null,null):VI(o)?o=t.__k[s]=qI(WI,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[s]=qI(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[s]=o,c=s+p,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=M2t(o,r,c,f))!=-1&&(f--,(a=r[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(i>d?p--:i<d&&p++),typeof o.type!=\\\"function\\\"&&(o.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,o.__u|=4))):t.__k[s]=null;if(f)for(s=0;s<d;s++)(a=r[s])!=null&&(2&a.__u)==0&&(a.__e==n&&(n=__(a)),uNe(a,a));return n}function oNe(t,e,r,n){var i,s;if(typeof t.type==\\\"function\\\"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=oNe(i[s],e,r,n));return e}t.__e!=e&&(n&&(e&&t.type&&!e.parentNode&&(e=__(t)),r.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function aNe(t,e){return e=e||[],t==null||typeof t==\\\"boolean\\\"||(VI(t)?t.some(function(r){aNe(r,e)}):e.push(t)),e}function M2t(t,e,r,n){var i,s,o,a=t.key,c=t.type,l=e[r],d=l!=null&&(2&l.__u)==0;if(l===null&&a==null||d&&a==l.key&&c==l.type)return r;if(n>(d?1:0)){for(i=r-1,s=r+1;i>=0||s<e.length;)if((l=e[o=i>=0?i--:s++])!=null&&(2&l.__u)==0&&a==l.key&&c==l.type)return o}return-1}function ZOe(t,e,r){e[0]==\\\"-\\\"?t.setProperty(e,r??\\\"\\\"):t[e]=r==null?\\\"\\\":typeof r!=\\\"number\\\"||O2t.test(e)?r:r+\\\"px\\\"}function RF(t,e,r,n,i){var s,o;e:if(e==\\\"style\\\")if(typeof r==\\\"string\\\")t.style.cssText=r;else{if(typeof n==\\\"string\\\"&&(t.style.cssText=n=\\\"\\\"),n)for(e in n)r&&e in r||ZOe(t.style,e,\\\"\\\");if(r)for(e in r)n&&r[e]==n[e]||ZOe(t.style,e,r[e])}else if(e[0]==\\\"o\\\"&&e[1]==\\\"n\\\")s=e!=(e=e.replace(tNe,\\\"$1\\\")),o=e.toLowerCase(),e=o in t||e==\\\"onFocusOut\\\"||e==\\\"onFocusIn\\\"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=r,r?n?r[HI]=n[HI]:(r[HI]=ene,t.addEventListener(e,s?Jre:Qre,s)):t.removeEventListener(e,s?Jre:Qre,s);else{if(i==\\\"http://www.w3.org/2000/svg\\\")e=e.replace(/xlink(H|:h)/,\\\"h\\\").replace(/sName$/,\\\"s\\\");else if(e!=\\\"width\\\"&&e!=\\\"height\\\"&&e!=\\\"href\\\"&&e!=\\\"list\\\"&&e!=\\\"form\\\"&&e!=\\\"tabIndex\\\"&&e!=\\\"download\\\"&&e!=\\\"rowSpan\\\"&&e!=\\\"colSpan\\\"&&e!=\\\"role\\\"&&e!=\\\"popover\\\"&&e in t)try{t[e]=r??\\\"\\\";break e}catch{}typeof r==\\\"function\\\"||(r==null||r===!1&&e[4]!=\\\"-\\\"?t.removeAttribute(e):t.setAttribute(e,e==\\\"popover\\\"&&r==1?\\\"\\\":r))}}function QOe(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e[PF]==null)e[PF]=ene++;else if(e[PF]<r[HI])return;return r(dn.event?dn.event(e):e)}}}function rne(t,e,r,n,i,s,o,a,c,l){var d,f,p,h,m,g,w,v,b,_,S,T,N,O,L,B=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[a=e.__e=r.__e]),(d=dn.__b)&&d(e);e:if(typeof B==\\\"function\\\")try{if(v=e.props,b=B.prototype&&B.prototype.render,_=(d=B.contextType)&&n[d.__c],S=d?_?_.props.value:d.__:n,r.__c?w=(f=e.__c=r.__c).__=f.__E:(b?e.__c=f=new B(v,S):(e.__c=f=new zI(v,S),f.constructor=B,f.render=L2t),_&&_.sub(f),f.state||(f.state={}),f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),b&&f.__s==null&&(f.__s=f.state),b&&B.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Lp({},f.__s)),Lp(f.__s,B.getDerivedStateFromProps(v,f.__s))),h=f.props,m=f.state,f.__v=e,p)b&&B.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),b&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(b&&B.getDerivedStateFromProps==null&&v!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,S),e.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(v,f.__s,S)===!1){e.__v!=r.__v&&(f.props=v,f.state=f.__s,f.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(H){H&&(H.__=e)}),NF.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,S),b&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,m,g)})}if(f.context=S,f.props=v,f.__P=t,f.__e=!1,T=dn.__r,N=0,b)f.state=f.__s,f.__d=!1,T&&T(e),d=f.render(f.props,f.state,f.context),NF.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,T&&T(e),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(n=Lp(Lp({},n),f.getChildContext())),b&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(h,m)),O=d!=null&&d.type===WI&&d.key==null?lNe(d.props.children):d,a=sNe(t,VI(O)?O:[O],e,r,n,i,s,o,a,c,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),w&&(f.__E=f.__=null)}catch(H){if(e.__v=null,c||s!=null)if(H.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(L=s.length;L--;)tne(s[L]);Xre(e)}else e.__e=r.__e,e.__k=r.__k,H.then||Xre(e);dn.__e(H,e,r)}else s==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):a=e.__e=D2t(r.__e,e,r,n,i,s,o,c,l);return(d=dn.diffed)&&d(e),128&e.__u?void 0:a}function Xre(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Xre))}function cNe(t,e,r){for(var n=0;n<r.length;n++)nne(r[n],r[++n],r[++n]);dn.__c&&dn.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){dn.__e(s,i.__v)}})}function lNe(t){return typeof t!=\\\"object\\\"||t==null||t.__b>0?t:VI(t)?t.map(lNe):Lp({},t)}function D2t(t,e,r,n,i,s,o,a,c){var l,d,f,p,h,m,g,w=r.props||OF,v=e.props,b=e.type;if(b==\\\"svg\\\"?i=\\\"http://www.w3.org/2000/svg\\\":b==\\\"math\\\"?i=\\\"http://www.w3.org/1998/Math/MathML\\\":i||(i=\\\"http://www.w3.org/1999/xhtml\\\"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&\\\"setAttribute\\\"in h==!!b&&(b?h.localName==b:h.nodeType==3)){t=h,s[l]=null;break}}if(t==null){if(b==null)return document.createTextNode(v);t=document.createElementNS(i,b,v.is&&v),a&&(dn.__m&&dn.__m(e,s),a=!1),s=null}if(b==null)w===v||a&&t.data==v||(t.data=v);else{if(s=s&&$I.call(t.childNodes),!a&&s!=null)for(w={},l=0;l<t.attributes.length;l++)w[(h=t.attributes[l]).name]=h.value;for(l in w)h=w[l],l==\\\"dangerouslySetInnerHTML\\\"?f=h:l==\\\"children\\\"||l in v||l==\\\"value\\\"&&\\\"defaultValue\\\"in v||l==\\\"checked\\\"&&\\\"defaultChecked\\\"in v||RF(t,l,null,h,i);for(l in v)h=v[l],l==\\\"children\\\"?p=h:l==\\\"dangerouslySetInnerHTML\\\"?d=h:l==\\\"value\\\"?m=h:l==\\\"checked\\\"?g=h:a&&typeof h!=\\\"function\\\"||w[l]===h||RF(t,l,h,w[l],i);if(d)a||f&&(d.__html==f.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(f&&(t.innerHTML=\\\"\\\"),sNe(e.type==\\\"template\\\"?t.content:t,VI(p)?p:[p],e,r,n,b==\\\"foreignObject\\\"?\\\"http://www.w3.org/1999/xhtml\\\":i,s,o,s?s[0]:r.__k&&__(r,0),a,c),s!=null)for(l=s.length;l--;)tne(s[l]);a||(l=\\\"value\\\",b==\\\"progress\\\"&&m==null?t.removeAttribute(\\\"value\\\"):m!=null&&(m!==t[l]||b==\\\"progress\\\"&&!m||b==\\\"option\\\"&&m!=w[l])&&RF(t,l,m,w[l],i),l=\\\"checked\\\",g!=null&&g!=t[l]&&RF(t,l,g,w[l],i))}return t}function nne(t,e,r){try{if(typeof t==\\\"function\\\"){var n=typeof t.__u==\\\"function\\\";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){dn.__e(i,r)}}function uNe(t,e,r){var n,i;if(dn.unmount&&dn.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||nne(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(s){dn.__e(s,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&uNe(n[i],e,r||typeof t.type!=\\\"function\\\");r||tne(t.__e),t.__c=t.__=t.__e=void 0}function L2t(t,e,r){return this.constructor(t,r)}function dNe(t,e,r){var n,i,s,o;e==document&&(e=document.documentElement),dn.__&&dn.__(t,e),i=(n=typeof r==\\\"function\\\")?null:r&&r.__k||e.__k,s=[],o=[],rne(e,t=(!n&&r||e).__k=nNe(WI,null,[t]),i||OF,OF,e.namespaceURI,!n&&r?[r]:i?null:e.firstChild?$I.call(e.childNodes):null,s,!n&&r?r:i?i.__e:e.firstChild,n,o),cNe(s,t,o)}function fNe(t,e){dNe(t,e,fNe)}function U2t(t,e,r){var n,i,s,o,a=Lp({},t.props);for(s in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)s==\\\"key\\\"?n=e[s]:s==\\\"ref\\\"?i=e[s]:a[s]=e[s]===void 0&&o!=null?o[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?$I.call(arguments,2):r),qI(t.type,a,n||t.key,i||t.ref,null)}function F2t(t){function e(r){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(s){this.props.value!=s.value&&n.forEach(function(o){o.__e=!0,Yre(o)})},this.sub=function(s){n.add(s);var o=s.componentWillUnmount;s.componentWillUnmount=function(){n&&n.delete(s),o&&o.call(s)}}),r.children}return e.__c=\\\"__cC\\\"+rNe++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,n){return r.children(n)}).contextType=e,e}var $I,dn,JOe,YOe,Jy,KOe,XOe,eNe,Zre,PF,HI,tNe,ene,Qre,Jre,rNe,OF,NF,O2t,VI,Sa=x(()=>{u();OF={},NF=[],O2t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,VI=Array.isArray;$I=NF.slice,dn={__e:function(t,e,r,n){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},JOe=0,YOe=function(t){return t!=null&&t.constructor===void 0},zI.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Lp({},this.state),typeof t==\\\"function\\\"&&(t=t(Lp({},r),this.props)),t&&Lp(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Yre(this))},zI.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Yre(this))},zI.prototype.render=WI,Jy=[],XOe=typeof Promise==\\\"function\\\"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,eNe=function(t,e){return t.__v.__b-e.__v.__b},kF.__r=0,Zre=Math.random().toString(8),PF=\\\"__d\\\"+Zre,HI=\\\"__a\\\"+Zre,tNe=/(PointerCapture)$|Capture$/i,ene=0,Qre=QOe(!1),Jre=QOe(!0),rNe=0});var GI={};ue(GI,{useCallback:()=>z2t,useContext:()=>$2t,useDebugValue:()=>V2t,useEffect:()=>j2t,useErrorBoundary:()=>W2t,useId:()=>G2t,useImperativeHandle:()=>q2t,useLayoutEffect:()=>CNe,useMemo:()=>one,useReducer:()=>_Ne,useRef:()=>H2t,useState:()=>ENe});function Vv(t,e){ki.__h&&ki.__h(fn,t,C_||e),C_=0;var r=fn.__H||(fn.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function ENe(t){return C_=1,_Ne(SNe,t)}function _Ne(t,e,r){var n=Vv(o0++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):SNe(void 0,e),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=fn,!fn.__f)){var i=function(a,c,l){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(p){return p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,l);var f=n.__c.props!==a;return d.some(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(f=!0)}}),s&&s.call(this,a,c,l)||f};fn.__f=!0;var s=fn.shouldComponentUpdate,o=fn.componentWillUpdate;fn.componentWillUpdate=function(a,c,l){if(this.__e){var d=s;s=void 0,i(a,c,l),s=d}o&&o.call(this,a,c,l)},fn.shouldComponentUpdate=i}return n.__N||n.__}function j2t(t,e){var r=Vv(o0++,3);!ki.__s&&ane(r.__H,e)&&(r.__=t,r.u=e,fn.__H.__h.push(r))}function CNe(t,e){var r=Vv(o0++,4);!ki.__s&&ane(r.__H,e)&&(r.__=t,r.u=e,fn.__h.push(r))}function H2t(t){return C_=5,one(function(){return{current:t}},[])}function q2t(t,e,r){C_=6,CNe(function(){if(typeof t==\\\"function\\\"){var n=t(e());return function(){t(null),n&&typeof n==\\\"function\\\"&&n()}}if(t)return t.current=e(),function(){return t.current=null}},r==null?r:r.concat(t))}function one(t,e){var r=Vv(o0++,7);return ane(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function z2t(t,e){return C_=8,one(function(){return t},e)}function $2t(t){var e=fn.context[t.__c],r=Vv(o0++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(fn)),e.props.value):t.__}function V2t(t,e){ki.useDebugValue&&ki.useDebugValue(e?e(t):t)}function W2t(t){var e=Vv(o0++,10),r=ENe();return e.__=t,fn.componentDidCatch||(fn.componentDidCatch=function(n,i){e.__&&e.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function G2t(){var t=Vv(o0++,11);if(!t.__){for(var e=fn.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__=\\\"P\\\"+r[0]+\\\"-\\\"+r[1]++}return t.__}function K2t(){for(var t;t=xNe.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(BF),e.__h.some(sne),e.__h=[]}catch(r){e.__h=[],ki.__e(r,t.__v)}}}function Z2t(t){var e,r=function(){clearTimeout(n),vNe&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,35);vNe&&(e=requestAnimationFrame(r))}function BF(t){var e=fn,r=t.__c;typeof r==\\\"function\\\"&&(t.__c=void 0,r()),fn=e}function sne(t){var e=fn;t.__c=t.__(),fn=e}function ane(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function SNe(t,e){return typeof e==\\\"function\\\"?e(t):e}var o0,fn,ine,pNe,C_,xNe,ki,hNe,mNe,gNe,yNe,bNe,wNe,vNe,KI=x(()=>{u();Sa();C_=0,xNe=[],ki=dn,hNe=ki.__b,mNe=ki.__r,gNe=ki.diffed,yNe=ki.__c,bNe=ki.unmount,wNe=ki.__;ki.__b=function(t){fn=null,hNe&&hNe(t)},ki.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),wNe&&wNe(t,e)},ki.__r=function(t){mNe&&mNe(t),o0=0;var e=(fn=t.__c).__H;e&&(ine===fn?(e.__h=[],fn.__h=[],e.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.some(BF),e.__h.some(sne),e.__h=[],o0=0)),ine=fn},ki.diffed=function(t){gNe&&gNe(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(xNe.push(e)!==1&&pNe===ki.requestAnimationFrame||((pNe=ki.requestAnimationFrame)||Z2t)(K2t)),e.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ine=fn=null},ki.__c=function(t,e){e.some(function(r){try{r.__h.some(BF),r.__h=r.__h.filter(function(n){return!n.__||sne(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ki.__e(n,r.__v)}}),yNe&&yNe(t,e)},ki.unmount=function(t){bNe&&bNe(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.some(function(n){try{BF(n)}catch(i){e=i}}),r.__H=void 0,e&&ki.__e(e,r.__v))};vNe=typeof requestAnimationFrame==\\\"function\\\"});var TNe=q(MF=>{\\\"use strict\\\";u();Object.defineProperty(MF,\\\"__esModule\\\",{value:!0});MF.CloseIcon=void 0;var ANe=(Sa(),mt(Ya));function Q2t(t){return(0,ANe.h)(\\\"svg\\\",Object.assign({width:\\\"40\\\",height:\\\"40\\\",viewBox:\\\"0 0 40 40\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,ANe.h)(\\\"path\\\",{d:\\\"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z\\\"}))}MF.CloseIcon=Q2t});var INe=q(LF=>{\\\"use strict\\\";u();Object.defineProperty(LF,\\\"__esModule\\\",{value:!0});LF.CoinbaseWalletRound=void 0;var DF=(Sa(),mt(Ya));function J2t(t){return(0,DF.h)(\\\"svg\\\",Object.assign({width:\\\"28\\\",height:\\\"28\\\",viewBox:\\\"0 0 28 28\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,DF.h)(\\\"circle\\\",{cx:\\\"14\\\",cy:\\\"14\\\",r:\\\"14\\\",fill:\\\"#0052FF\\\"}),(0,DF.h)(\\\"path\\\",{d:\\\"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z\\\",fill:\\\"white\\\"}),(0,DF.h)(\\\"path\\\",{d:\\\"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z\\\",fill:\\\"#0052FF\\\"}))}LF.CoinbaseWalletRound=J2t});var RNe=q(UF=>{\\\"use strict\\\";u();Object.defineProperty(UF,\\\"__esModule\\\",{value:!0});UF.QRCodeIcon=void 0;var ZI=(Sa(),mt(Ya));function Y2t(t){return(0,ZI.h)(\\\"svg\\\",Object.assign({width:\\\"18\\\",height:\\\"18\\\",viewBox:\\\"0 0 24 24\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,ZI.h)(\\\"path\\\",{d:\\\"M3 3V8.99939L5 8.99996V5H9V3H3Z\\\"}),(0,ZI.h)(\\\"path\\\",{d:\\\"M15 21L21 21V15.0006L19 15V19L15 19V21Z\\\"}),(0,ZI.h)(\\\"path\\\",{d:\\\"M21 9H19V5H15.0006L15 3H21V9Z\\\"}),(0,ZI.h)(\\\"path\\\",{d:\\\"M3 15V21H8.99939L8.99996 19H5L5 15H3Z\\\"}))}UF.QRCodeIcon=Y2t});var BNe=q((VXr,kNe)=>{u();function PNe(t){this.mode=Pl.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e<r;e++){var n=[],i=this.data.charCodeAt(e);i>65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}PNe.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}};function Fp(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}Fp.prototype={addData:function(t){var e=new PNe(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+\\\",\\\"+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Fp.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Bi.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var o=s*i,a=0;a<this.modules[s].length;a++){var c=a*i,l=this.modules[s][a];l&&(n.beginFill(0,100),n.moveTo(c,o),n.lineTo(c+i,o),n.lineTo(c+i,o+i),n.lineTo(c,o+i),n.endFill())}return n},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=Bi.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var r=0;r<t.length;r++){var n=t[e],i=t[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)s==-2||s==2||o==-2||o==2||s==0&&o==0?this.modules[n+s][i+o]=!0:this.modules[n+s][i+o]=!1}},setupTypeNumber:function(t){for(var e=Bi.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=Bi.getBCHTypeInfo(r),i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;s<t.length&&(c=(t[s]>>>i&1)==1);var l=Bi.getMask(e,n,o-a);l&&(c=!c),this.modules[n][o-a]=c,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};Fp.PAD0=236;Fp.PAD1=17;Fp.createData=function(t,e,r){for(var n=Up.getRSBlocks(t,e),i=new ONe,s=0;s<r.length;s++){var o=r[s];i.put(o.mode,4),i.put(o.getLength(),Bi.getLengthInBits(o.mode,t)),o.write(i)}for(var a=0,s=0;s<n.length;s++)a+=n[s].dataCount;if(i.getLengthInBits()>a*8)throw new Error(\\\"code length overflow. (\\\"+i.getLengthInBits()+\\\">\\\"+a*8+\\\")\\\");for(i.getLengthInBits()+4<=a*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=a*8||(i.put(Fp.PAD0,8),i.getLengthInBits()>=a*8));)i.put(Fp.PAD1,8);return Fp.createBytes(i,n)};Fp.createBytes=function(t,e){for(var r=0,n=0,i=0,s=new Array(e.length),o=new Array(e.length),a=0;a<e.length;a++){var c=e[a].dataCount,l=e[a].totalCount-c;n=Math.max(n,c),i=Math.max(i,l),s[a]=new Array(c);for(var d=0;d<s[a].length;d++)s[a][d]=255&t.buffer[d+r];r+=c;var f=Bi.getErrorCorrectPolynomial(l),p=new S_(s[a],f.getLength()-1),h=p.mod(f);o[a]=new Array(f.getLength()-1);for(var d=0;d<o[a].length;d++){var m=d+h.getLength()-o[a].length;o[a][d]=m>=0?h.get(m):0}}for(var g=0,d=0;d<e.length;d++)g+=e[d].totalCount;for(var w=new Array(g),v=0,d=0;d<n;d++)for(var a=0;a<e.length;a++)d<s[a].length&&(w[v++]=s[a][d]);for(var d=0;d<i;d++)for(var a=0;a<e.length;a++)d<o[a].length&&(w[v++]=o[a][d]);return w};var Pl={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Xy={L:1,M:0,Q:3,H:2},Yy={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Bi={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;Bi.getBCHDigit(e)-Bi.getBCHDigit(Bi.G15)>=0;)e^=Bi.G15<<Bi.getBCHDigit(e)-Bi.getBCHDigit(Bi.G15);return(t<<10|e)^Bi.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;Bi.getBCHDigit(e)-Bi.getBCHDigit(Bi.G18)>=0;)e^=Bi.G18<<Bi.getBCHDigit(e)-Bi.getBCHDigit(Bi.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;t!=0;)e++,t>>>=1;return e},getPatternPosition:function(t){return Bi.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case Yy.PATTERN000:return(e+r)%2==0;case Yy.PATTERN001:return e%2==0;case Yy.PATTERN010:return r%3==0;case Yy.PATTERN011:return(e+r)%3==0;case Yy.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case Yy.PATTERN101:return e*r%2+e*r%3==0;case Yy.PATTERN110:return(e*r%2+e*r%3)%2==0;case Yy.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error(\\\"bad maskPattern:\\\"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new S_([1],0),r=0;r<t;r++)e=e.multiply(new S_([1,po.gexp(r)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case Pl.MODE_NUMBER:return 10;case Pl.MODE_ALPHA_NUM:return 9;case Pl.MODE_8BIT_BYTE:return 8;case Pl.MODE_KANJI:return 8;default:throw new Error(\\\"mode:\\\"+t)}else if(e<27)switch(t){case Pl.MODE_NUMBER:return 12;case Pl.MODE_ALPHA_NUM:return 11;case Pl.MODE_8BIT_BYTE:return 16;case Pl.MODE_KANJI:return 10;default:throw new Error(\\\"mode:\\\"+t)}else if(e<41)switch(t){case Pl.MODE_NUMBER:return 14;case Pl.MODE_ALPHA_NUM:return 13;case Pl.MODE_8BIT_BYTE:return 16;case Pl.MODE_KANJI:return 12;default:throw new Error(\\\"mode:\\\"+t)}else throw new Error(\\\"type:\\\"+e)},getLostPoint:function(t){for(var e=t.getModuleCount(),r=0,n=0;n<e;n++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(n,i),a=-1;a<=1;a++)if(!(n+a<0||e<=n+a))for(var c=-1;c<=1;c++)i+c<0||e<=i+c||a==0&&c==0||o==t.isDark(n+a,i+c)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<e-1;n++)for(var i=0;i<e-1;i++){var l=0;t.isDark(n,i)&&l++,t.isDark(n+1,i)&&l++,t.isDark(n,i+1)&&l++,t.isDark(n+1,i+1)&&l++,(l==0||l==4)&&(r+=3)}for(var n=0;n<e;n++)for(var i=0;i<e-6;i++)t.isDark(n,i)&&!t.isDark(n,i+1)&&t.isDark(n,i+2)&&t.isDark(n,i+3)&&t.isDark(n,i+4)&&!t.isDark(n,i+5)&&t.isDark(n,i+6)&&(r+=40);for(var i=0;i<e;i++)for(var n=0;n<e-6;n++)t.isDark(n,i)&&!t.isDark(n+1,i)&&t.isDark(n+2,i)&&t.isDark(n+3,i)&&t.isDark(n+4,i)&&!t.isDark(n+5,i)&&t.isDark(n+6,i)&&(r+=40);for(var d=0,i=0;i<e;i++)for(var n=0;n<e;n++)t.isDark(n,i)&&d++;var f=Math.abs(100*d/e/e-50)/5;return r+=f*10,r}},po={glog:function(t){if(t<1)throw new Error(\\\"glog(\\\"+t+\\\")\\\");return po.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return po.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(Ts=0;Ts<8;Ts++)po.EXP_TABLE[Ts]=1<<Ts;var Ts;for(Ts=8;Ts<256;Ts++)po.EXP_TABLE[Ts]=po.EXP_TABLE[Ts-4]^po.EXP_TABLE[Ts-5]^po.EXP_TABLE[Ts-6]^po.EXP_TABLE[Ts-8];var Ts;for(Ts=0;Ts<255;Ts++)po.LOG_TABLE[po.EXP_TABLE[Ts]]=Ts;var Ts;function S_(t,e){if(t.length==null)throw new Error(t.length+\\\"/\\\"+e);for(var r=0;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(var n=0;n<t.length-r;n++)this.num[n]=t[n+r]}S_.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<t.getLength();n++)e[r+n]^=po.gexp(po.glog(this.get(r))+po.glog(t.get(n)));return new S_(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=po.glog(this.get(0))-po.glog(t.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<t.getLength();n++)r[n]^=po.gexp(po.glog(t.get(n))+e);return new S_(r,0).mod(t)}};function Up(t,e){this.totalCount=t,this.dataCount=e}Up.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];Up.getRSBlocks=function(t,e){var r=Up.getRsBlockTable(t,e);if(r==null)throw new Error(\\\"bad rs block @ typeNumber:\\\"+t+\\\"/errorCorrectLevel:\\\"+e);for(var n=r.length/3,i=[],s=0;s<n;s++)for(var o=r[s*3+0],a=r[s*3+1],c=r[s*3+2],l=0;l<o;l++)i.push(new Up(a,c));return i};Up.getRsBlockTable=function(t,e){switch(e){case Xy.L:return Up.RS_BLOCK_TABLE[(t-1)*4+0];case Xy.M:return Up.RS_BLOCK_TABLE[(t-1)*4+1];case Xy.Q:return Up.RS_BLOCK_TABLE[(t-1)*4+2];case Xy.H:return Up.RS_BLOCK_TABLE[(t-1)*4+3];default:return}};function ONe(){this.buffer=[],this.length=0}ONe.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var cne=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function NNe(t){var e=this;if(this.options={padding:4,width:256,height:256,typeNumber:4,color:\\\"#000000\\\",background:\\\"#ffffff\\\",ecl:\\\"M\\\",image:{svg:\\\"\\\",width:0,height:0}},typeof t==\\\"string\\\"&&(t={content:t}),t)for(var r in t)this.options[r]=t[r];if(typeof this.options.content!=\\\"string\\\")throw new Error(\\\"Expected 'content' as string!\\\");if(this.options.content.length===0)throw new Error(\\\"Expected 'content' to be non-empty!\\\");if(!(this.options.padding>=0))throw new Error(\\\"Expected 'padding' value to be non-negative!\\\");if(!(this.options.width>0)||!(this.options.height>0))throw new Error(\\\"Expected 'width' or 'height' value to be higher than zero!\\\");function n(l){switch(l){case\\\"L\\\":return Xy.L;case\\\"M\\\":return Xy.M;case\\\"Q\\\":return Xy.Q;case\\\"H\\\":return Xy.H;default:throw new Error(\\\"Unknwon error correction level: \\\"+l)}}function i(l,d){for(var f=s(l),p=1,h=0,m=0,g=cne.length;m<=g;m++){var w=cne[m];if(!w)throw new Error(\\\"Content too long: expected \\\"+h+\\\" but got \\\"+f);switch(d){case\\\"L\\\":h=w[0];break;case\\\"M\\\":h=w[1];break;case\\\"Q\\\":h=w[2];break;case\\\"H\\\":h=w[3];break;default:throw new Error(\\\"Unknwon error correction level: \\\"+d)}if(f<=h)break;p++}if(p>cne.length)throw new Error(\\\"Content too long\\\");return p}function s(l){var d=encodeURI(l).toString().replace(/\\\\%[0-9a-fA-F]{2}/g,\\\"a\\\");return d.length+(d.length!=l?3:0)}var o=this.options.content,a=i(o,this.options.ecl),c=n(this.options.ecl);this.qrcode=new Fp(a,c),this.qrcode.addData(o),this.qrcode.make()}NNe.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>\\\"u\\\"&&(t={container:e.container||\\\"svg\\\"});for(var n=typeof e.pretty<\\\"u\\\"?!!e.pretty:!0,i=n?\\\"  \\\":\\\"\\\",s=n?`\\\\r\\n`:\\\"\\\",o=e.width,a=e.height,c=r.length,l=o/(c+2*e.padding),d=a/(c+2*e.padding),f=typeof e.join<\\\"u\\\"?!!e.join:!1,p=typeof e.swap<\\\"u\\\"?!!e.swap:!1,h=typeof e.xmlDeclaration<\\\"u\\\"?!!e.xmlDeclaration:!0,m=typeof e.predefined<\\\"u\\\"?!!e.predefined:!1,g=m?i+'<defs><path id=\\\"qrmodule\\\" d=\\\"M0 0 h'+d+\\\" v\\\"+l+' H0 z\\\" style=\\\"fill:'+e.color+';shape-rendering:crispEdges;\\\" /></defs>'+s:\\\"\\\",w=i+'<rect x=\\\"0\\\" y=\\\"0\\\" width=\\\"'+o+'\\\" height=\\\"'+a+'\\\" style=\\\"fill:'+e.background+';shape-rendering:crispEdges;\\\"/>'+s,v=\\\"\\\",b=\\\"\\\",_=0;_<c;_++)for(var S=0;S<c;S++){var T=r[S][_];if(T){var N=S*l+e.padding*l,O=_*d+e.padding*d;if(p){var L=N;N=O,O=L}if(f){var B=l+N,H=d+O;N=Number.isInteger(N)?Number(N):N.toFixed(2),O=Number.isInteger(O)?Number(O):O.toFixed(2),B=Number.isInteger(B)?Number(B):B.toFixed(2),H=Number.isInteger(H)?Number(H):H.toFixed(2),b+=\\\"M\\\"+N+\\\",\\\"+O+\\\" V\\\"+H+\\\" H\\\"+B+\\\" V\\\"+O+\\\" H\\\"+N+\\\" Z \\\"}else m?v+=i+'<use x=\\\"'+N.toString()+'\\\" y=\\\"'+O.toString()+'\\\" href=\\\"#qrmodule\\\" />'+s:v+=i+'<rect x=\\\"'+N.toString()+'\\\" y=\\\"'+O.toString()+'\\\" width=\\\"'+l+'\\\" height=\\\"'+d+'\\\" style=\\\"fill:'+e.color+';shape-rendering:crispEdges;\\\"/>'+s}}f&&(v=i+'<path x=\\\"0\\\" y=\\\"0\\\" style=\\\"fill:'+e.color+';shape-rendering:crispEdges;\\\" d=\\\"'+b+'\\\" />');let M=\\\"\\\";if(this.options.image!==void 0&&this.options.image.svg){let R=o*this.options.image.width/100,y=a*this.options.image.height/100,E=o/2-R/2,C=a/2-y/2;M+=`<svg x=\\\"${E}\\\" y=\\\"${C}\\\" width=\\\"${R}\\\" height=\\\"${y}\\\" viewBox=\\\"0 0 100 100\\\" preserveAspectRatio=\\\"xMinYMin meet\\\">`,M+=this.options.image.svg+s,M+=\\\"</svg>\\\"}var F=\\\"\\\";switch(t.container){case\\\"svg\\\":h&&(F+='<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>'+s),F+='<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\" width=\\\"'+o+'\\\" height=\\\"'+a+'\\\">'+s,F+=g+w+v,F+=M,F+=\\\"</svg>\\\";break;case\\\"svg-viewbox\\\":h&&(F+='<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>'+s),F+='<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\" viewBox=\\\"0 0 '+o+\\\" \\\"+a+'\\\">'+s,F+=g+w+v,F+=M,F+=\\\"</svg>\\\";break;case\\\"g\\\":F+='<g width=\\\"'+o+'\\\" height=\\\"'+a+'\\\">'+s,F+=g+w+v,F+=M,F+=\\\"</g>\\\";break;default:F+=(g+w+v+M).replace(/^\\\\s+/,\\\"\\\");break}return F};kNe.exports=NNe});var DNe=q(A_=>{\\\"use strict\\\";u();var X2t=A_&&A_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A_,\\\"__esModule\\\",{value:!0});A_.QRCode=void 0;var ext=(Sa(),mt(Ya)),MNe=(KI(),mt(GI)),txt=X2t(BNe()),rxt=t=>{let[e,r]=(0,MNe.useState)(\\\"\\\");return(0,MNe.useEffect)(()=>{var n,i;let s=new txt.default({content:t.content,background:t.bgColor||\\\"#ffffff\\\",color:t.fgColor||\\\"#000000\\\",container:\\\"svg\\\",ecl:\\\"M\\\",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),o=globalThis.Buffer.from(s.svg(),\\\"utf8\\\").toString(\\\"base64\\\");r(`data:image/svg+xml;base64,${o}`)},[t.bgColor,t.content,t.fgColor,t.height,t.image,t.width]),e?(0,ext.h)(\\\"img\\\",{src:e,alt:\\\"QR Code\\\"}):null};A_.QRCode=rxt});var LNe=q(lne=>{\\\"use strict\\\";u();Object.defineProperty(lne,\\\"__esModule\\\",{value:!0});lne.default=\\\".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}\\\"});var UNe=q(T_=>{\\\"use strict\\\";u();var nxt=T_&&T_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(T_,\\\"__esModule\\\",{value:!0});T_.Spinner=void 0;var FF=(Sa(),mt(Ya)),ixt=nxt(LNe()),sxt=t=>{var e;let r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||\\\"#000\\\";return(0,FF.h)(\\\"div\\\",{class:\\\"-cbwsdk-spinner\\\"},(0,FF.h)(\\\"style\\\",null,ixt.default),(0,FF.h)(\\\"svg\\\",{viewBox:\\\"0 0 100 100\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\",style:{width:r,height:r}},(0,FF.h)(\\\"circle\\\",{style:{cx:50,cy:50,r:45,stroke:n}})))};T_.Spinner=sxt});var FNe=q(une=>{\\\"use strict\\\";u();Object.defineProperty(une,\\\"__esModule\\\",{value:!0});une.default=\\\".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}\\\"});var qNe=q(e1=>{\\\"use strict\\\";u();var jNe=e1&&e1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e1,\\\"__esModule\\\",{value:!0});e1.CoinbaseWalletSteps=e1.ConnectContent=void 0;var Wv=jNe((Fy(),mt(l3))),hr=(Sa(),mt(Ya)),oxt=Np(),axt=QU(),cxt=TNe(),lxt=INe(),uxt=RNe(),dxt=DNe(),fxt=UNe(),pxt=jNe(FNe()),dne={title:\\\"Coinbase Wallet app\\\",description:\\\"Connect with your self-custody wallet\\\",steps:HNe},hxt=t=>t===\\\"light\\\"?\\\"#FFFFFF\\\":\\\"#0A0B0D\\\";function mxt(t){let{theme:e}=t,r=(0,oxt.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),n=dne.steps;return(0,hr.h)(\\\"div\\\",{\\\"data-testid\\\":\\\"connect-content\\\",className:(0,Wv.default)(\\\"-cbwsdk-connect-content\\\",e)},(0,hr.h)(\\\"style\\\",null,pxt.default),(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-content-header\\\"},(0,hr.h)(\\\"h2\\\",{className:(0,Wv.default)(\\\"-cbwsdk-connect-content-heading\\\",e)},\\\"Scan to connect with our mobile app\\\"),t.onCancel&&(0,hr.h)(\\\"button\\\",{type:\\\"button\\\",className:\\\"-cbwsdk-cancel-button\\\",onClick:t.onCancel},(0,hr.h)(cxt.CloseIcon,{fill:e===\\\"light\\\"?\\\"#0A0B0D\\\":\\\"#FFFFFF\\\"}))),(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-content-layout\\\"},(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-content-column-left\\\"},(0,hr.h)(gxt,{title:dne.title,description:dne.description,theme:e})),(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-content-column-right\\\"},(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-content-qr-wrapper\\\"},(0,hr.h)(dxt.QRCode,{content:r,width:200,height:200,fgColor:\\\"#000\\\",bgColor:\\\"transparent\\\"}),(0,hr.h)(\\\"input\\\",{type:\\\"hidden\\\",name:\\\"cbw-cbwsdk-version\\\",value:axt.LIB_VERSION}),(0,hr.h)(\\\"input\\\",{type:\\\"hidden\\\",value:r})),(0,hr.h)(n,{theme:e}),!t.isConnected&&(0,hr.h)(\\\"div\\\",{\\\"data-testid\\\":\\\"connecting-spinner\\\",className:(0,Wv.default)(\\\"-cbwsdk-connect-content-qr-connecting\\\",e)},(0,hr.h)(fxt.Spinner,{size:36,color:e===\\\"dark\\\"?\\\"#FFF\\\":\\\"#000\\\"}),(0,hr.h)(\\\"p\\\",null,\\\"Connecting...\\\")))))}e1.ConnectContent=mxt;function gxt({title:t,description:e,theme:r}){return(0,hr.h)(\\\"div\\\",{className:(0,Wv.default)(\\\"-cbwsdk-connect-item\\\",r)},(0,hr.h)(\\\"div\\\",null,(0,hr.h)(lxt.CoinbaseWalletRound,null)),(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-connect-item-copy-wrapper\\\"},(0,hr.h)(\\\"h3\\\",{className:\\\"-cbwsdk-connect-item-title\\\"},t),(0,hr.h)(\\\"p\\\",{className:\\\"-cbwsdk-connect-item-description\\\"},e)))}function HNe({theme:t}){return(0,hr.h)(\\\"ol\\\",{className:\\\"-cbwsdk-wallet-steps\\\"},(0,hr.h)(\\\"li\\\",{className:(0,Wv.default)(\\\"-cbwsdk-wallet-steps-item\\\",t)},(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-wallet-steps-item-wrapper\\\"},\\\"Open Coinbase Wallet app\\\")),(0,hr.h)(\\\"li\\\",{className:(0,Wv.default)(\\\"-cbwsdk-wallet-steps-item\\\",t)},(0,hr.h)(\\\"div\\\",{className:\\\"-cbwsdk-wallet-steps-item-wrapper\\\"},(0,hr.h)(\\\"span\\\",null,\\\"Tap \\\",(0,hr.h)(\\\"strong\\\",null,\\\"Scan\\\"),\\\" \\\"),(0,hr.h)(\\\"span\\\",{className:(0,Wv.default)(\\\"-cbwsdk-wallet-steps-pad-left\\\",\\\"-cbwsdk-wallet-steps-icon\\\",t)},(0,hr.h)(uxt.QRCodeIcon,{fill:hxt(t)})))))}e1.CoinbaseWalletSteps=HNe});var $Ne=q(jF=>{\\\"use strict\\\";u();Object.defineProperty(jF,\\\"__esModule\\\",{value:!0});jF.ArrowLeftIcon=void 0;var zNe=(Sa(),mt(Ya));function yxt(t){return(0,zNe.h)(\\\"svg\\\",Object.assign({width:\\\"16\\\",height:\\\"16\\\",viewBox:\\\"0 0 16 16\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,zNe.h)(\\\"path\\\",{d:\\\"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z\\\"}))}jF.ArrowLeftIcon=yxt});var VNe=q(HF=>{\\\"use strict\\\";u();Object.defineProperty(HF,\\\"__esModule\\\",{value:!0});HF.LaptopIcon=void 0;var fne=(Sa(),mt(Ya));function bxt(t){return(0,fne.h)(\\\"svg\\\",Object.assign({width:\\\"14\\\",height:\\\"14\\\",viewBox:\\\"0 0 14 14\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,fne.h)(\\\"path\\\",{d:\\\"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z\\\"}),(0,fne.h)(\\\"path\\\",{d:\\\"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z\\\"}))}HF.LaptopIcon=bxt});var GNe=q(qF=>{\\\"use strict\\\";u();Object.defineProperty(qF,\\\"__esModule\\\",{value:!0});qF.SafeIcon=void 0;var WNe=(Sa(),mt(Ya));function wxt(t){return(0,WNe.h)(\\\"svg\\\",Object.assign({width:\\\"14\\\",height:\\\"14\\\",viewBox:\\\"0 0 14 14\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},t),(0,WNe.h)(\\\"path\\\",{\\\"fill-rule\\\":\\\"evenodd\\\",\\\"clip-rule\\\":\\\"evenodd\\\",d:\\\"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z\\\"}))}qF.SafeIcon=wxt});var KNe=q(pne=>{\\\"use strict\\\";u();Object.defineProperty(pne,\\\"__esModule\\\",{value:!0});pne.default=\\\".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}\\\"});var QNe=q(I_=>{\\\"use strict\\\";u();var ZNe=I_&&I_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(I_,\\\"__esModule\\\",{value:!0});I_.TryExtensionContent=void 0;var Gv=ZNe((Fy(),mt(l3))),Is=(Sa(),mt(Ya)),hne=(KI(),mt(GI)),vxt=$Ne(),xxt=VNe(),Ext=GNe(),_xt=ZNe(KNe());function Cxt({theme:t}){let[e,r]=(0,hne.useState)(!1),n=(0,hne.useCallback)(()=>{window.open(\\\"https://api.wallet.coinbase.com/rpc/v2/desktop/chrome\\\",\\\"_blank\\\")},[]),i=(0,hne.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,Is.h)(\\\"div\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension\\\",t)},(0,Is.h)(\\\"style\\\",null,_xt.default),(0,Is.h)(\\\"div\\\",{class:\\\"-cbwsdk-try-extension-column-half\\\"},(0,Is.h)(\\\"h3\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-heading\\\",t)},\\\"Or try the Coinbase Wallet browser extension\\\"),(0,Is.h)(\\\"div\\\",{class:\\\"-cbwsdk-try-extension-cta-wrapper\\\"},(0,Is.h)(\\\"button\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-cta\\\",t),onClick:i},e?\\\"Refresh\\\":\\\"Install\\\"),(0,Is.h)(\\\"div\\\",null,!e&&(0,Is.h)(vxt.ArrowLeftIcon,{class:\\\"-cbwsdk-try-extension-cta-icon\\\",fill:t===\\\"light\\\"?\\\"#0052FF\\\":\\\"#588AF5\\\"})))),(0,Is.h)(\\\"div\\\",{class:\\\"-cbwsdk-try-extension-column-half\\\"},(0,Is.h)(\\\"ul\\\",{class:\\\"-cbwsdk-try-extension-list\\\"},(0,Is.h)(\\\"li\\\",{class:\\\"-cbwsdk-try-extension-list-item\\\"},(0,Is.h)(\\\"div\\\",{class:\\\"-cbwsdk-try-extension-list-item-icon-wrapper\\\"},(0,Is.h)(\\\"span\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-list-item-icon\\\",t)},(0,Is.h)(xxt.LaptopIcon,{fill:t===\\\"light\\\"?\\\"#0A0B0D\\\":\\\"#FFFFFF\\\"}))),(0,Is.h)(\\\"div\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-list-item-copy\\\",t)},\\\"Connect with dapps with just one click on your desktop browser\\\")),(0,Is.h)(\\\"li\\\",{class:\\\"-cbwsdk-try-extension-list-item\\\"},(0,Is.h)(\\\"div\\\",{class:\\\"-cbwsdk-try-extension-list-item-icon-wrapper\\\"},(0,Is.h)(\\\"span\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-list-item-icon\\\",t)},(0,Is.h)(Ext.SafeIcon,{fill:t===\\\"light\\\"?\\\"#0A0B0D\\\":\\\"#FFFFFF\\\"}))),(0,Is.h)(\\\"div\\\",{class:(0,Gv.default)(\\\"-cbwsdk-try-extension-list-item-copy\\\",t)},\\\"Add an additional layer of security by using a supported Ledger hardware wallet\\\")))))}I_.TryExtensionContent=Cxt});var JNe=q(mne=>{\\\"use strict\\\";u();Object.defineProperty(mne,\\\"__esModule\\\",{value:!0});mne.default=\\\".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}\\\"});var XNe=q(R_=>{\\\"use strict\\\";u();var YNe=R_&&R_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R_,\\\"__esModule\\\",{value:!0});R_.ConnectDialog=void 0;var gne=YNe((Fy(),mt(l3))),Kv=(Sa(),mt(Ya)),yne=(KI(),mt(GI)),Sxt=qNe(),Axt=QNe(),Txt=YNe(JNe()),Ixt=t=>{let{isOpen:e,darkMode:r}=t,[n,i]=(0,yne.useState)(!e),[s,o]=(0,yne.useState)(!e);(0,yne.useEffect)(()=>{let c=[window.setTimeout(()=>{o(!e)},10)];return e?i(!1):c.push(window.setTimeout(()=>{i(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[e]);let a=r?\\\"dark\\\":\\\"light\\\";return(0,Kv.h)(\\\"div\\\",{class:(0,gne.default)(\\\"-cbwsdk-connect-dialog-container\\\",n&&\\\"-cbwsdk-connect-dialog-container-hidden\\\")},(0,Kv.h)(\\\"style\\\",null,Txt.default),(0,Kv.h)(\\\"div\\\",{class:(0,gne.default)(\\\"-cbwsdk-connect-dialog-backdrop\\\",a,s&&\\\"-cbwsdk-connect-dialog-backdrop-hidden\\\")}),(0,Kv.h)(\\\"div\\\",{class:\\\"-cbwsdk-connect-dialog\\\"},(0,Kv.h)(\\\"div\\\",{class:(0,gne.default)(\\\"-cbwsdk-connect-dialog-box\\\",s&&\\\"-cbwsdk-connect-dialog-box-hidden\\\")},t.connectDisabled?null:(0,Kv.h)(Sxt.ConnectContent,{theme:a,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,Kv.h)(Axt.TryExtensionContent,{theme:a}))))};R_.ConnectDialog=Ixt});var eke=q(zF=>{\\\"use strict\\\";u();Object.defineProperty(zF,\\\"__esModule\\\",{value:!0});zF.LinkFlow=void 0;var bne=(Sa(),mt(Ya)),Rxt=XNe(),wne=class{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement(\\\"div\\\"),this.root.className=\\\"-cbwsdk-link-flow-root\\\",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,bne.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,bne.render)((0,bne.h)(Rxt.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};zF.LinkFlow=wne});var tke=q(vne=>{\\\"use strict\\\";u();Object.defineProperty(vne,\\\"__esModule\\\",{value:!0});vne.default=\\\".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}\\\"});var _ne=q(Wu=>{\\\"use strict\\\";u();var rke=Wu&&Wu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Wu,\\\"__esModule\\\",{value:!0});Wu.SnackbarInstance=Wu.SnackbarContainer=Wu.Snackbar=void 0;var $F=rke((Fy(),mt(l3))),Rs=(Sa(),mt(Ya)),xne=(KI(),mt(GI)),Pxt=rke(tke()),Oxt=\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+\\\",Nxt=\\\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=\\\",Ene=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement(\\\"div\\\"),this.root.className=\\\"-cbwsdk-snackbar-root\\\",e.appendChild(this.root),this.render()}presentItem(e){let r=this.nextItemKey++;return this.items.set(r,e),this.render(),()=>{this.items.delete(r),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,Rs.render)((0,Rs.h)(\\\"div\\\",null,(0,Rs.h)(Wu.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>(0,Rs.h)(Wu.SnackbarInstance,Object.assign({},r,{key:e}))))),this.root)}};Wu.Snackbar=Ene;var kxt=t=>(0,Rs.h)(\\\"div\\\",{class:(0,$F.default)(\\\"-cbwsdk-snackbar-container\\\")},(0,Rs.h)(\\\"style\\\",null,Pxt.default),(0,Rs.h)(\\\"div\\\",{class:\\\"-cbwsdk-snackbar\\\"},t.children));Wu.SnackbarContainer=kxt;var Bxt=({autoExpand:t,message:e,menuItems:r})=>{let[n,i]=(0,xne.useState)(!0),[s,o]=(0,xne.useState)(t??!1);(0,xne.useEffect)(()=>{let c=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{o(!0)},1e4)];return()=>{c.forEach(window.clearTimeout)}});let a=()=>{o(!s)};return(0,Rs.h)(\\\"div\\\",{class:(0,$F.default)(\\\"-cbwsdk-snackbar-instance\\\",n&&\\\"-cbwsdk-snackbar-instance-hidden\\\",s&&\\\"-cbwsdk-snackbar-instance-expanded\\\")},(0,Rs.h)(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-header\\\",onClick:a},(0,Rs.h)(\\\"img\\\",{src:Oxt,class:\\\"-cbwsdk-snackbar-instance-header-cblogo\\\"}),\\\" \\\",(0,Rs.h)(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-header-message\\\"},e),(0,Rs.h)(\\\"div\\\",{class:\\\"-gear-container\\\"},!s&&(0,Rs.h)(\\\"svg\\\",{width:\\\"24\\\",height:\\\"24\\\",viewBox:\\\"0 0 24 24\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},(0,Rs.h)(\\\"circle\\\",{cx:\\\"12\\\",cy:\\\"12\\\",r:\\\"12\\\",fill:\\\"#F5F7F8\\\"})),(0,Rs.h)(\\\"img\\\",{src:Nxt,class:\\\"-gear-icon\\\",title:\\\"Expand\\\"}))),r&&r.length>0&&(0,Rs.h)(\\\"div\\\",{class:\\\"-cbwsdk-snackbar-instance-menu\\\"},r.map((c,l)=>(0,Rs.h)(\\\"div\\\",{class:(0,$F.default)(\\\"-cbwsdk-snackbar-instance-menu-item\\\",c.isRed&&\\\"-cbwsdk-snackbar-instance-menu-item-is-red\\\"),onClick:c.onClick,key:l},(0,Rs.h)(\\\"svg\\\",{width:c.svgWidth,height:c.svgHeight,viewBox:\\\"0 0 10 11\\\",fill:\\\"none\\\",xmlns:\\\"http://www.w3.org/2000/svg\\\"},(0,Rs.h)(\\\"path\\\",{\\\"fill-rule\\\":c.defaultFillRule,\\\"clip-rule\\\":c.defaultClipRule,d:c.path,fill:\\\"#AAAAAA\\\"})),(0,Rs.h)(\\\"span\\\",{class:(0,$F.default)(\\\"-cbwsdk-snackbar-instance-menu-item-info\\\",c.isRed&&\\\"-cbwsdk-snackbar-instance-menu-item-info-is-red\\\")},c.info)))))};Wu.SnackbarInstance=Bxt});var Sne=q(VF=>{\\\"use strict\\\";u();Object.defineProperty(VF,\\\"__esModule\\\",{value:!0});VF.WalletLinkRelayUI=void 0;var Mxt=Kre(),Dxt=eke(),Lxt=_ne(),Cne=class{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new Lxt.Snackbar({darkMode:e.darkMode}),this.linkFlow=new Dxt.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error(\\\"Coinbase Wallet SDK UI is already attached\\\");let e=document.documentElement,r=document.createElement(\\\"div\\\");r.className=\\\"-cbwsdk-css-reset\\\",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,Mxt.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:\\\"Connection lost\\\",menuItems:[{isRed:!1,info:\\\"Reset connection\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:e.onResetConnection}]}:r={message:\\\"Confirm on phone\\\",menuItems:[{isRed:!0,info:\\\"Cancel transaction\\\",svgWidth:\\\"11\\\",svgHeight:\\\"11\\\",path:\\\"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z\\\",defaultFillRule:\\\"inherit\\\",defaultClipRule:\\\"inherit\\\",onClick:e.onCancel},{isRed:!1,info:\\\"Reset connection\\\",svgWidth:\\\"10\\\",svgHeight:\\\"11\\\",path:\\\"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z\\\",defaultFillRule:\\\"evenodd\\\",defaultClipRule:\\\"evenodd\\\",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}};VF.WalletLinkRelayUI=Cne});var Ane=q(GF=>{\\\"use strict\\\";u();Object.defineProperty(GF,\\\"__esModule\\\",{value:!0});GF.WalletLinkRelay=void 0;var P_=TI(),Uxt=RI(),Mi=Np(),Zv=rF(),nke=nF(),t1=_F(),Fxt=WOe(),Qv=KU(),jxt=Sne(),WF=class t extends nke.RelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:\\\"\\\",jsonRpcUrl:\\\"\\\"},this.chainCallback=null,this.dappDefaultChain=1,this.appName=\\\"\\\",this.appLogoUrl=null,this.linkedUpdated=o=>{var a;this.isLinked=o;let c=this.storage.getItem(nke.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this.session.linked=o),this.isUnlinkedErrorState=!1,c){let l=c.split(\\\" \\\"),d=this.storage.getItem(\\\"IsStandaloneSigning\\\")===\\\"true\\\";if(l[0]!==\\\"\\\"&&!o&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;let f=this.getSessionIdHash();(a=this.diagnostic)===null||a===void 0||a.log(Zv.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:f})}}},this.metadataUpdated=(o,a)=>{this.storage.setItem(o,a)},this.chainUpdated=(o,a)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:o,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(o,a))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),t.accountRequestCallbackIds.size>0&&(Array.from(t.accountRequestCallbackIds.values()).forEach(a=>{let c={type:\\\"WEB3_RESPONSE\\\",id:a,response:{method:\\\"requestEthereumAccounts\\\",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},c),{id:a}))}),t.accountRequestCallbackIds.clear())},this.connectedUpdated=o=>{this.ui.setConnected(o)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;let{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){let e=t1.Session.load(this.storage)||new t1.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,i=new Fxt.WalletLinkConnection({session:e,linkAPIUrl:r,diagnostic:n,listener:this}),{version:s,darkMode:o}=this.options,a=this.options.uiConstructor({linkAPIUrl:r,version:s,darkMode:o,session:e});return i.connect(),{session:e,ui:a,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata(\\\"__destroyed\\\",\\\"1\\\"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,r;let n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log(Zv.EVENTS.SESSION_STATE_CHANGE,{method:\\\"relay::resetAndReload\\\",sessionMetadataChange:\\\"__destroyed, 1\\\",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();let i=t1.Session.load(this.storage);if(i?.id===this._session.id?this.storage.clear():i&&((r=this.diagnostic)===null||r===void 0||r.log(Zv.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:t1.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);let{session:s,ui:o,connection:a}=this.subscribe();this._session=s,this.connection=a,this.ui=o,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(Zv.EVENTS.FAILURE,{method:\\\"relay::resetAndReload\\\",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:\\\"signEthereumMessage\\\",params:{message:(0,Mi.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:\\\"ethereumAddressFromSignedMessage\\\",params:{message:(0,Mi.hexStringFromBuffer)(e,!0),signature:(0,Mi.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:\\\"signEthereumTransaction\\\",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Mi.bigIntStringFromBN)(e.weiValue),data:(0,Mi.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Mi.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,Mi.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,Mi.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,Mi.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:\\\"signEthereumTransaction\\\",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Mi.bigIntStringFromBN)(e.weiValue),data:(0,Mi.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Mi.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,Mi.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,Mi.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,Mi.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:\\\"submitEthereumTransaction\\\",params:{signedTransaction:(0,Mi.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:\\\"scanQRCode\\\",params:{regExp:e}})}getQRCodeUrl(){return(0,Mi.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:\\\"generic\\\",params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null,n=(0,Mi.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r?.()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,c=>{if(r?.(),(0,Qv.isErrorResponse)(c))return a(new Error(c.errorMessage));o(c)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof jxt.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,r){var n;let i={type:\\\"WEB3_REQUEST\\\",id:e,request:r},s=t1.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(Zv.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?t1.Session.hash(s.id):\\\"\\\",isSessionMismatched:(s?.id!==this._session.id).toString()}),this.publishEvent(\\\"Web3Request\\\",i,!0).then(o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(Zv.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?t1.Session.hash(s.id):\\\"\\\",isSessionMismatched:(s?.id!==this._session.id).toString()})}).catch(o=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:i.id,response:{method:r.method,errorMessage:o.message}})})}publishWeb3RequestCanceledEvent(e){let r={type:\\\"WEB3_REQUEST_CANCELED\\\",id:e};this.publishEvent(\\\"Web3RequestCanceled\\\",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e){var r;let{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(Zv.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method===\\\"requestEthereumAccounts\\\"){t.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),t.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var s;let o=(s=n?.message)!==null&&s!==void 0?s:(0,P_.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:e,response:{method:r,errorMessage:o,errorCode:i}})}invokeCallback(e){let r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let e={method:\\\"requestEthereumAccounts\\\",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=null,n=(0,Mi.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r?.()};return{promise:new Promise((o,a)=>{if(this.relayEventManager.callbacks.set(n,c=>{if(this.ui.hideRequestEthereumAccounts(),r?.(),(0,Qv.isErrorResponse)(c))return a(new Error(c.errorMessage));o(c)}),this.ui.inlineAccountsResponse()){let c=l=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:n,response:{method:\\\"requestEthereumAccounts\\\",result:l}})};this.ui.requestEthereumAccounts({onCancel:i,onAccounts:c})}else{let c=P_.standardErrors.provider.userRejectedRequest(\\\"User denied account authorization\\\");this.ui.requestEthereumAccounts({onCancel:()=>i(c)})}t.accountRequestCallbackIds.add(n),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(n,e)}),cancel:i}}selectProvider(e){let r={method:\\\"selectProvider\\\",params:{providerOptions:e}},n=(0,Mi.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},s=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,Qv.isErrorResponse)(d))return a(new Error(d.errorMessage));o(d)});let c=d=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:n,response:{method:\\\"selectProvider\\\",result:Uxt.ProviderType.Unselected}})},l=d=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:n,response:{method:\\\"selectProvider\\\",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:l,onCancel:c,providerOptions:e})});return{cancel:i,promise:s}}watchAsset(e,r,n,i,s,o){let a={method:\\\"watchAsset\\\",params:{type:e,options:{address:r,symbol:n,decimals:i,image:s},chainId:o}},c=null,l=(0,Mi.randomBytesHex)(8),d=p=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,p),c?.()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));let f=new Promise((p,h)=>{this.relayEventManager.callbacks.set(l,w=>{if(c?.(),(0,Qv.isErrorResponse)(w))return h(new Error(w.errorMessage));p(w)});let m=w=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:l,response:{method:\\\"watchAsset\\\",result:!1}})},g=()=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:l,response:{method:\\\"watchAsset\\\",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:g,onCancel:m,type:e,address:r,symbol:n,decimals:i,image:s,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)});return{cancel:d,promise:f}}addEthereumChain(e,r,n,i,s,o){let a={method:\\\"addEthereumChain\\\",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:o}},c=null,l=(0,Mi.randomBytesHex)(8),d=p=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,p),c?.()};return this.ui.inlineAddEthereumChain(e)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((p,h)=>{this.relayEventManager.callbacks.set(l,w=>{if(c?.(),(0,Qv.isErrorResponse)(w))return h(new Error(w.errorMessage));p(w)});let m=w=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:l,response:{method:\\\"addEthereumChain\\\",result:{isApproved:!1,rpcUrl:\\\"\\\"}}})},g=w=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:l,response:{method:\\\"addEthereumChain\\\",result:{isApproved:!0,rpcUrl:w}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:m,onApprove:g,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)}),cancel:d}}switchEthereumChain(e,r){let n={method:\\\"switchEthereumChain\\\",params:Object.assign({chainId:e},{address:r})},i=(0,Mi.randomBytesHex)(8),s=a=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(i,f=>{if((0,Qv.isErrorResponse)(f)&&f.errorCode)return c(P_.standardErrors.provider.custom({code:f.errorCode,message:\\\"Unrecognized chain ID. Try adding the chain using addEthereumChain first.\\\"}));if((0,Qv.isErrorResponse)(f))return c(new Error(f.errorMessage));a(f)});let l=f=>{var p;if(f){let h=(p=(0,P_.getErrorCode)(f))!==null&&p!==void 0?p:P_.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,\\\"switchEthereumChain\\\",f instanceof Error?f:P_.standardErrors.provider.unsupportedChain(e),h)}else this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:i,response:{method:\\\"switchEthereumChain\\\",result:{isApproved:!1,rpcUrl:\\\"\\\"}}})},d=f=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:i,response:{method:\\\"switchEthereumChain\\\",result:{isApproved:!0,rpcUrl:f}}})};this.ui.switchEthereumChain({onCancel:l,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return t1.Session.hash(this._session.id)}sendRequestStandalone(e,r){let n=s=>{this.handleErrorResponse(e,r.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:\\\"WEB3_RESPONSE\\\",id:e,response:s})};switch(r.method){case\\\"signEthereumMessage\\\":this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case\\\"signEthereumTransaction\\\":this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case\\\"submitEthereumTransaction\\\":this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case\\\"ethereumAddressFromSignedMessage\\\":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}};GF.WalletLinkRelay=WF;WF.accountRequestCallbackIds=new Set});var ike=q(Jv=>{\\\"use strict\\\";u();var Hxt=Jv&&Jv.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||(\\\"get\\\"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qxt=Jv&&Jv.__exportStar||function(t,e){for(var r in t)r!==\\\"default\\\"&&!Object.prototype.hasOwnProperty.call(e,r)&&Hxt(e,t,r)};Object.defineProperty(Jv,\\\"__esModule\\\",{value:!0});qxt(_ne(),Jv)});var ske=q(Tne=>{\\\"use strict\\\";u();Object.defineProperty(Tne,\\\"__esModule\\\",{value:!0});Tne.default=\\\".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}\\\"});var ake=q(O_=>{\\\"use strict\\\";u();var oke=O_&&O_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(O_,\\\"__esModule\\\",{value:!0});O_.RedirectDialog=void 0;var zxt=oke((Fy(),mt(l3))),jp=(Sa(),mt(Ya)),$xt=Kre(),Vxt=ike(),Wxt=oke(ske()),Ine=class{constructor(){this.root=null}attach(){let e=document.documentElement;this.root=document.createElement(\\\"div\\\"),this.root.className=\\\"-cbwsdk-css-reset\\\",e.appendChild(this.root),(0,$xt.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,jp.render)(null,this.root),e&&(0,jp.render)((0,jp.h)(Gxt,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}};O_.RedirectDialog=Ine;var Gxt=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{let s=r?\\\"dark\\\":\\\"light\\\";return(0,jp.h)(Vxt.SnackbarContainer,{darkMode:r},(0,jp.h)(\\\"div\\\",{class:\\\"-cbwsdk-redirect-dialog\\\"},(0,jp.h)(\\\"style\\\",null,Wxt.default),(0,jp.h)(\\\"div\\\",{class:\\\"-cbwsdk-redirect-dialog-backdrop\\\",onClick:i}),(0,jp.h)(\\\"div\\\",{class:(0,zxt.default)(\\\"-cbwsdk-redirect-dialog-box\\\",s)},(0,jp.h)(\\\"p\\\",null,t),(0,jp.h)(\\\"button\\\",{onClick:n},e))))}});var Pne=q(KF=>{\\\"use strict\\\";u();Object.defineProperty(KF,\\\"__esModule\\\",{value:!0});KF.MobileRelayUI=void 0;var Kxt=ake(),Rne=class{constructor(e){this.attached=!1,this.darkMode=!1,this.redirectDialog=new Kxt.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error(\\\"Coinbase Wallet SDK UI is already attached\\\");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}redirectToCoinbaseWallet(e){let r=new URL(\\\"https://go.cb-w.com/walletlink\\\");r.searchParams.append(\\\"redirect_url\\\",window.location.href),e&&r.searchParams.append(\\\"wl_url\\\",e);let n=document.createElement(\\\"a\\\");n.target=\\\"cbw-opener\\\",n.href=r.href,n.rel=\\\"noreferrer noopener\\\",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:\\\"Redirecting to Coinbase Wallet...\\\",buttonText:\\\"Open\\\",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};KF.MobileRelayUI=Rne});var Nne=q(ZF=>{\\\"use strict\\\";u();Object.defineProperty(ZF,\\\"__esModule\\\",{value:!0});ZF.MobileRelay=void 0;var Zxt=Np(),Qxt=Ane(),Jxt=Pne(),One=class extends Qxt.WalletLinkRelay{constructor(e){var r;super(e),this._enableMobileWalletLink=(r=e.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{let e=(0,Zxt.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,r){if(super.publishWeb3RequestEvent(e,r),!(this._enableMobileWalletLink&&this.ui instanceof Jxt.MobileRelayUI))return;let n=!1;switch(r.method){case\\\"requestEthereumAccounts\\\":case\\\"connectAndSignIn\\\":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case\\\"switchEthereumChain\\\":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener(\\\"blur\\\",()=>{window.addEventListener(\\\"focus\\\",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e)}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error(\\\"connectAndSignIn is supported only when enableMobileWalletLink is on\\\");return this.sendRequest({method:\\\"connectAndSignIn\\\",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:\\\"1\\\",type:\\\"eip4361\\\",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}};ZF.MobileRelay=One});var ho=q((Len,kne)=>{\\\"use strict\\\";u();var N_=typeof Reflect==\\\"object\\\"?Reflect:null,cke=N_&&typeof N_.apply==\\\"function\\\"?N_.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},QF;N_&&typeof N_.ownKeys==\\\"function\\\"?QF=N_.ownKeys:Object.getOwnPropertySymbols?QF=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:QF=function(e){return Object.getOwnPropertyNames(e)};function Yxt(t){console&&console.warn&&console.warn(t)}var uke=Number.isNaN||function(e){return e!==e};function rn(){rn.init.call(this)}kne.exports=rn;kne.exports.once=rEt;rn.EventEmitter=rn;rn.prototype._events=void 0;rn.prototype._eventsCount=0;rn.prototype._maxListeners=void 0;var lke=10;function JF(t){if(typeof t!=\\\"function\\\")throw new TypeError('The \\\"listener\\\" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(rn,\\\"defaultMaxListeners\\\",{enumerable:!0,get:function(){return lke},set:function(t){if(typeof t!=\\\"number\\\"||t<0||uke(t))throw new RangeError('The value of \\\"defaultMaxListeners\\\" is out of range. It must be a non-negative number. Received '+t+\\\".\\\");lke=t}});rn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};rn.prototype.setMaxListeners=function(e){if(typeof e!=\\\"number\\\"||e<0||uke(e))throw new RangeError('The value of \\\"n\\\" is out of range. It must be a non-negative number. Received '+e+\\\".\\\");return this._maxListeners=e,this};function dke(t){return t._maxListeners===void 0?rn.defaultMaxListeners:t._maxListeners}rn.prototype.getMaxListeners=function(){return dke(this)};rn.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e===\\\"error\\\",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var a=new Error(\\\"Unhandled error.\\\"+(o?\\\" (\\\"+o.message+\\\")\\\":\\\"\\\"));throw a.context=o,a}var c=s[e];if(c===void 0)return!1;if(typeof c==\\\"function\\\")cke(c,this,r);else for(var l=c.length,d=gke(c,l),n=0;n<l;++n)cke(d[n],this,r);return!0};function fke(t,e,r,n){var i,s,o;if(JF(r),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit(\\\"newListener\\\",e,r.listener?r.listener:r),s=t._events),o=s[e]),o===void 0)o=s[e]=r,++t._eventsCount;else if(typeof o==\\\"function\\\"?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=dke(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error(\\\"Possible EventEmitter memory leak detected. \\\"+o.length+\\\" \\\"+String(e)+\\\" listeners added. Use emitter.setMaxListeners() to increase limit\\\");a.name=\\\"MaxListenersExceededWarning\\\",a.emitter=t,a.type=e,a.count=o.length,Yxt(a)}return t}rn.prototype.addListener=function(e,r){return fke(this,e,r,!1)};rn.prototype.on=rn.prototype.addListener;rn.prototype.prependListener=function(e,r){return fke(this,e,r,!0)};function Xxt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function pke(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=Xxt.bind(n);return i.listener=r,n.wrapFn=i,i}rn.prototype.once=function(e,r){return JF(r),this.on(e,pke(this,e,r)),this};rn.prototype.prependOnceListener=function(e,r){return JF(r),this.prependListener(e,pke(this,e,r)),this};rn.prototype.removeListener=function(e,r){var n,i,s,o,a;if(JF(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit(\\\"removeListener\\\",e,n.listener||r));else if(typeof n!=\\\"function\\\"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():eEt(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit(\\\"removeListener\\\",e,a||r)}return this};rn.prototype.off=rn.prototype.removeListener;rn.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(i=0;i<s.length;++i)o=s[i],o!==\\\"removeListener\\\"&&this.removeAllListeners(o);return this.removeAllListeners(\\\"removeListener\\\"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r==\\\"function\\\")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function hke(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i==\\\"function\\\"?r?[i.listener||i]:[i]:r?tEt(i):gke(i,i.length)}rn.prototype.listeners=function(e){return hke(this,e,!0)};rn.prototype.rawListeners=function(e){return hke(this,e,!1)};rn.listenerCount=function(t,e){return typeof t.listenerCount==\\\"function\\\"?t.listenerCount(e):mke.call(t,e)};rn.prototype.listenerCount=mke;function mke(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r==\\\"function\\\")return 1;if(r!==void 0)return r.length}return 0}rn.prototype.eventNames=function(){return this._eventsCount>0?QF(this._events):[]};function gke(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function eEt(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function tEt(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function rEt(t,e){return new Promise(function(r,n){function i(o){t.removeListener(e,s),n(o)}function s(){typeof t.removeListener==\\\"function\\\"&&t.removeListener(\\\"error\\\",i),r([].slice.call(arguments))}yke(t,e,s,{once:!0}),e!==\\\"error\\\"&&nEt(t,i,{once:!0})})}function nEt(t,e,r){typeof t.on==\\\"function\\\"&&yke(t,\\\"error\\\",e,r)}function yke(t,e,r,n){if(typeof t.on==\\\"function\\\")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener==\\\"function\\\")t.addEventListener(e,function i(s){n.once&&t.removeEventListener(e,i),r(s)});else throw new TypeError('The \\\"emitter\\\" argument must be of type EventEmitter. Received type '+typeof t)}});var Bne=q((Fen,bke)=>{u();bke.exports=ho().EventEmitter});var Mne=q(()=>{u()});var Cke=q(($en,_ke)=>{\\\"use strict\\\";u();function wke(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vke(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wke(Object(r),!0).forEach(function(n){iEt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wke(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iEt(t,e,r){return e=Eke(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sEt(t,e){if(!(t instanceof e))throw new TypeError(\\\"Cannot call a class as a function\\\")}function xke(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\\\"value\\\"in n&&(n.writable=!0),Object.defineProperty(t,Eke(n.key),n)}}function oEt(t,e,r){return e&&xke(t.prototype,e),r&&xke(t,r),Object.defineProperty(t,\\\"prototype\\\",{writable:!1}),t}function Eke(t){var e=aEt(t,\\\"string\\\");return typeof e==\\\"symbol\\\"?e:String(e)}function aEt(t,e){if(typeof t!=\\\"object\\\"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||\\\"default\\\");if(typeof n!=\\\"object\\\")return n;throw new TypeError(\\\"@@toPrimitive must return a primitive value.\\\")}return(e===\\\"string\\\"?String:Number)(t)}var cEt=Qx(),YF=cEt.Buffer,lEt=Mne(),Dne=lEt.inspect,uEt=Dne&&Dne.custom||\\\"inspect\\\";function dEt(t,e,r){YF.prototype.copy.call(t,e,r)}_ke.exports=(function(){function t(){sEt(this,t),this.head=null,this.tail=null,this.length=0}return oEt(t,[{key:\\\"push\\\",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:\\\"unshift\\\",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:\\\"shift\\\",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:\\\"clear\\\",value:function(){this.head=this.tail=null,this.length=0}},{key:\\\"join\\\",value:function(r){if(this.length===0)return\\\"\\\";for(var n=this.head,i=\\\"\\\"+n.data;n=n.next;)i+=r+n.data;return i}},{key:\\\"concat\\\",value:function(r){if(this.length===0)return YF.alloc(0);for(var n=YF.allocUnsafe(r>>>0),i=this.head,s=0;i;)dEt(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:\\\"consume\\\",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:\\\"first\\\",value:function(){return this.head.data}},{key:\\\"_getString\\\",value:function(r){var n=this.head,i=1,s=n.data;for(r-=s.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++i}return this.length-=i,s}},{key:\\\"_getBuffer\\\",value:function(r){var n=YF.allocUnsafe(r),i=this.head,s=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s}return this.length-=s,n}},{key:uEt,value:function(r,n){return Dne(this,vke(vke({},n),{},{depth:0,customInspect:!1}))}}]),t})()});var Une=q((Wen,Ake)=>{\\\"use strict\\\";u();function fEt(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Lne,this,t)):process.nextTick(Lne,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(XF,r):(r._writableState.errorEmitted=!0,process.nextTick(Ske,r,s)):process.nextTick(Ske,r,s):e?(process.nextTick(XF,r),e(s)):process.nextTick(XF,r)}),this)}function Ske(t,e){Lne(t,e),XF(t)}function XF(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit(\\\"close\\\")}function pEt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Lne(t,e){t.emit(\\\"error\\\",e)}function hEt(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit(\\\"error\\\",e)}Ake.exports={destroy:fEt,undestroy:pEt,errorOrDestroy:hEt}});var Yv=q((Ken,Rke)=>{\\\"use strict\\\";u();function mEt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Ike={};function Gu(t,e,r){r||(r=Error);function n(s,o,a){return typeof e==\\\"string\\\"?e:e(s,o,a)}var i=(function(s){mEt(o,s);function o(a,c,l){return s.call(this,n(a,c,l))||this}return o})(r);i.prototype.name=r.name,i.prototype.code=t,Ike[t]=i}function Tke(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?\\\"one of \\\".concat(e,\\\" \\\").concat(t.slice(0,r-1).join(\\\", \\\"),\\\", or \\\")+t[r-1]:r===2?\\\"one of \\\".concat(e,\\\" \\\").concat(t[0],\\\" or \\\").concat(t[1]):\\\"of \\\".concat(e,\\\" \\\").concat(t[0])}else return\\\"of \\\".concat(e,\\\" \\\").concat(String(t))}function gEt(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function yEt(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function bEt(t,e,r){return typeof r!=\\\"number\\\"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Gu(\\\"ERR_INVALID_OPT_VALUE\\\",function(t,e){return'The value \\\"'+e+'\\\" is invalid for option \\\"'+t+'\\\"'},TypeError);Gu(\\\"ERR_INVALID_ARG_TYPE\\\",function(t,e,r){var n;typeof e==\\\"string\\\"&&gEt(e,\\\"not \\\")?(n=\\\"must not be\\\",e=e.replace(/^not /,\\\"\\\")):n=\\\"must be\\\";var i;if(yEt(t,\\\" argument\\\"))i=\\\"The \\\".concat(t,\\\" \\\").concat(n,\\\" \\\").concat(Tke(e,\\\"type\\\"));else{var s=bEt(t,\\\".\\\")?\\\"property\\\":\\\"argument\\\";i='The \\\"'.concat(t,'\\\" ').concat(s,\\\" \\\").concat(n,\\\" \\\").concat(Tke(e,\\\"type\\\"))}return i+=\\\". Received type \\\".concat(typeof r),i},TypeError);Gu(\\\"ERR_STREAM_PUSH_AFTER_EOF\\\",\\\"stream.push() after EOF\\\");Gu(\\\"ERR_METHOD_NOT_IMPLEMENTED\\\",function(t){return\\\"The \\\"+t+\\\" method is not implemented\\\"});Gu(\\\"ERR_STREAM_PREMATURE_CLOSE\\\",\\\"Premature close\\\");Gu(\\\"ERR_STREAM_DESTROYED\\\",function(t){return\\\"Cannot call \\\"+t+\\\" after a stream was destroyed\\\"});Gu(\\\"ERR_MULTIPLE_CALLBACK\\\",\\\"Callback called multiple times\\\");Gu(\\\"ERR_STREAM_CANNOT_PIPE\\\",\\\"Cannot pipe, not readable\\\");Gu(\\\"ERR_STREAM_WRITE_AFTER_END\\\",\\\"write after end\\\");Gu(\\\"ERR_STREAM_NULL_VALUES\\\",\\\"May not write null values to stream\\\",TypeError);Gu(\\\"ERR_UNKNOWN_ENCODING\\\",function(t){return\\\"Unknown encoding: \\\"+t},TypeError);Gu(\\\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\\\",\\\"stream.unshift() after end event\\\");Rke.exports.codes=Ike});var Fne=q((Qen,Pke)=>{\\\"use strict\\\";u();var wEt=Yv().codes.ERR_INVALID_OPT_VALUE;function vEt(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function xEt(t,e,r,n){var i=vEt(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:\\\"highWaterMark\\\";throw new wEt(s,i)}return Math.floor(i)}return t.objectMode?16:16*1024}Pke.exports={getHighWaterMark:xEt}});var Nke=q((Yen,Oke)=>{u();Oke.exports=EEt;function EEt(t,e){if(jne(\\\"noDeprecation\\\"))return t;var r=!1;function n(){if(!r){if(jne(\\\"throwDeprecation\\\"))throw new Error(e);jne(\\\"traceDeprecation\\\")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function jne(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()===\\\"true\\\"}});var zne=q((etn,Uke)=>{\\\"use strict\\\";u();Uke.exports=es;function Bke(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ZEt(e,t)}}var k_;es.WritableState=JI;var _Et={deprecate:Nke()},Mke=Bne(),tj=Qx().Buffer,CEt=(typeof globalThis<\\\"u\\\"?globalThis:typeof window<\\\"u\\\"?window:typeof self<\\\"u\\\"?self:{}).Uint8Array||function(){};function SEt(t){return tj.from(t)}function AEt(t){return tj.isBuffer(t)||t instanceof CEt}var qne=Une(),TEt=Fne(),IEt=TEt.getHighWaterMark,r1=Yv().codes,REt=r1.ERR_INVALID_ARG_TYPE,PEt=r1.ERR_METHOD_NOT_IMPLEMENTED,OEt=r1.ERR_MULTIPLE_CALLBACK,NEt=r1.ERR_STREAM_CANNOT_PIPE,kEt=r1.ERR_STREAM_DESTROYED,BEt=r1.ERR_STREAM_NULL_VALUES,MEt=r1.ERR_STREAM_WRITE_AFTER_END,DEt=r1.ERR_UNKNOWN_ENCODING,B_=qne.errorOrDestroy;Vu()(es,Mke);function LEt(){}function JI(t,e,r){k_=k_||Xv(),t=t||{},typeof r!=\\\"boolean\\\"&&(r=e instanceof k_),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=IEt(this,t,\\\"writableHighWaterMark\\\",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||\\\"utf8\\\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){$Et(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Bke(this)}JI.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(JI.prototype,\\\"buffer\\\",{get:_Et.deprecate(function(){return this.getBuffer()},\\\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\\\",\\\"DEP0003\\\")})}catch{}})();var ej;typeof Symbol==\\\"function\\\"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==\\\"function\\\"?(ej=Function.prototype[Symbol.hasInstance],Object.defineProperty(es,Symbol.hasInstance,{value:function(e){return ej.call(this,e)?!0:this!==es?!1:e&&e._writableState instanceof JI}})):ej=function(e){return e instanceof this};function es(t){k_=k_||Xv();var e=this instanceof k_;if(!e&&!ej.call(es,this))return new es(t);this._writableState=new JI(t,this,e),this.writable=!0,t&&(typeof t.write==\\\"function\\\"&&(this._write=t.write),typeof t.writev==\\\"function\\\"&&(this._writev=t.writev),typeof t.destroy==\\\"function\\\"&&(this._destroy=t.destroy),typeof t.final==\\\"function\\\"&&(this._final=t.final)),Mke.call(this)}es.prototype.pipe=function(){B_(this,new NEt)};function UEt(t,e){var r=new MEt;B_(t,r),process.nextTick(e,r)}function FEt(t,e,r,n){var i;return r===null?i=new BEt:typeof r!=\\\"string\\\"&&!e.objectMode&&(i=new REt(\\\"chunk\\\",[\\\"string\\\",\\\"Buffer\\\"],r)),i?(B_(t,i),process.nextTick(n,i),!1):!0}es.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&AEt(t);return s&&!tj.isBuffer(t)&&(t=SEt(t)),typeof e==\\\"function\\\"&&(r=e,e=null),s?e=\\\"buffer\\\":e||(e=n.defaultEncoding),typeof r!=\\\"function\\\"&&(r=LEt),n.ending?UEt(this,r):(s||FEt(this,n,t,r))&&(n.pendingcb++,i=HEt(this,n,s,t,e,r)),i};es.prototype.cork=function(){this._writableState.corked++};es.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Dke(this,t))};es.prototype.setDefaultEncoding=function(e){if(typeof e==\\\"string\\\"&&(e=e.toLowerCase()),!([\\\"hex\\\",\\\"utf8\\\",\\\"utf-8\\\",\\\"ascii\\\",\\\"binary\\\",\\\"base64\\\",\\\"ucs2\\\",\\\"ucs-2\\\",\\\"utf16le\\\",\\\"utf-16le\\\",\\\"raw\\\"].indexOf((e+\\\"\\\").toLowerCase())>-1))throw new DEt(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(es.prototype,\\\"writableBuffer\\\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function jEt(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e==\\\"string\\\"&&(e=tj.from(e,r)),e}Object.defineProperty(es.prototype,\\\"writableHighWaterMark\\\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function HEt(t,e,r,n,i,s){if(!r){var o=jEt(e,n,i);n!==o&&(r=!0,i=\\\"buffer\\\",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Hne(t,e,!1,a,n,i,s);return c}function Hne(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new kEt(\\\"write\\\")):r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function qEt(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(QI,t,e),t._writableState.errorEmitted=!0,B_(t,n)):(i(n),t._writableState.errorEmitted=!0,B_(t,n),QI(t,e))}function zEt(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function $Et(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!=\\\"function\\\")throw new OEt;if(zEt(r),e)qEt(t,r,n,e,i);else{var s=Lke(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Dke(t,r),n?process.nextTick(kke,t,r,s,i):kke(t,r,s,i)}}function kke(t,e,r,n){r||VEt(t,e),e.pendingcb--,n(),QI(t,e)}function VEt(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit(\\\"drain\\\"))}function Dke(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,Hne(t,e,!0,e.length,i,\\\"\\\",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Bke(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback,f=e.objectMode?1:c.length;if(Hne(t,e,!1,f,c,l,d),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}es.prototype._write=function(t,e,r){r(new PEt(\\\"_write()\\\"))};es.prototype._writev=null;es.prototype.end=function(t,e,r){var n=this._writableState;return typeof t==\\\"function\\\"?(r=t,t=null,e=null):typeof e==\\\"function\\\"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||KEt(this,n,r),this};Object.defineProperty(es.prototype,\\\"writableLength\\\",{enumerable:!1,get:function(){return this._writableState.length}});function Lke(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function WEt(t,e){t._final(function(r){e.pendingcb--,r&&B_(t,r),e.prefinished=!0,t.emit(\\\"prefinish\\\"),QI(t,e)})}function GEt(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final==\\\"function\\\"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(WEt,t,e)):(e.prefinished=!0,t.emit(\\\"prefinish\\\")))}function QI(t,e){var r=Lke(e);if(r&&(GEt(t,e),e.pendingcb===0&&(e.finished=!0,t.emit(\\\"finish\\\"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function KEt(t,e,r){e.ending=!0,QI(t,e),r&&(e.finished?process.nextTick(r):t.once(\\\"finish\\\",r)),e.ended=!0,t.writable=!1}function ZEt(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(es.prototype,\\\"destroyed\\\",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});es.prototype.destroy=qne.destroy;es.prototype._undestroy=qne.undestroy;es.prototype._destroy=function(t,e){e(t)}});var Xv=q((rtn,jke)=>{\\\"use strict\\\";u();var QEt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};jke.exports=Hp;var Fke=Wne(),Vne=zne();Vu()(Hp,Fke);for($ne=QEt(Vne.prototype),rj=0;rj<$ne.length;rj++)nj=$ne[rj],Hp.prototype[nj]||(Hp.prototype[nj]=Vne.prototype[nj]);var $ne,nj,rj;function Hp(t){if(!(this instanceof Hp))return new Hp(t);Fke.call(this,t),Vne.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once(\\\"end\\\",JEt)))}Object.defineProperty(Hp.prototype,\\\"writableHighWaterMark\\\",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Hp.prototype,\\\"writableBuffer\\\",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Hp.prototype,\\\"writableLength\\\",{enumerable:!1,get:function(){return this._writableState.length}});function JEt(){this._writableState.ended||process.nextTick(YEt,this)}function YEt(t){t.end()}Object.defineProperty(Hp.prototype,\\\"destroyed\\\",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Zne=q(qke=>{\\\"use strict\\\";u();var Kne=Mp().Buffer,Hke=Kne.isEncoding||function(t){switch(t=\\\"\\\"+t,t&&t.toLowerCase()){case\\\"hex\\\":case\\\"utf8\\\":case\\\"utf-8\\\":case\\\"ascii\\\":case\\\"binary\\\":case\\\"base64\\\":case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":case\\\"raw\\\":return!0;default:return!1}};function XEt(t){if(!t)return\\\"utf8\\\";for(var e;;)switch(t){case\\\"utf8\\\":case\\\"utf-8\\\":return\\\"utf8\\\";case\\\"ucs2\\\":case\\\"ucs-2\\\":case\\\"utf16le\\\":case\\\"utf-16le\\\":return\\\"utf16le\\\";case\\\"latin1\\\":case\\\"binary\\\":return\\\"latin1\\\";case\\\"base64\\\":case\\\"ascii\\\":case\\\"hex\\\":return t;default:if(e)return;t=(\\\"\\\"+t).toLowerCase(),e=!0}}function e5t(t){var e=XEt(t);if(typeof e!=\\\"string\\\"&&(Kne.isEncoding===Hke||!Hke(t)))throw new Error(\\\"Unknown encoding: \\\"+t);return e||t}qke.StringDecoder=YI;function YI(t){this.encoding=e5t(t);var e;switch(this.encoding){case\\\"utf16le\\\":this.text=o5t,this.end=a5t,e=4;break;case\\\"utf8\\\":this.fillLast=n5t,e=4;break;case\\\"base64\\\":this.text=c5t,this.end=l5t,e=3;break;default:this.write=u5t,this.end=d5t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Kne.allocUnsafe(e)}YI.prototype.write=function(t){if(t.length===0)return\\\"\\\";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return\\\"\\\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||\\\"\\\"};YI.prototype.end=s5t;YI.prototype.text=i5t;YI.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Gne(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function t5t(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Gne(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Gne(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Gne(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function r5t(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,\\\"\\\\uFFFD\\\";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,\\\"\\\\uFFFD\\\";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,\\\"\\\\uFFFD\\\"}}function n5t(t){var e=this.lastTotal-this.lastNeed,r=r5t(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function i5t(t,e){var r=t5t(this,t,e);if(!this.lastNeed)return t.toString(\\\"utf8\\\",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString(\\\"utf8\\\",e,n)}function s5t(t){var e=t&&t.length?this.write(t):\\\"\\\";return this.lastNeed?e+\\\"\\\\uFFFD\\\":e}function o5t(t,e){if((t.length-e)%2===0){var r=t.toString(\\\"utf16le\\\",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString(\\\"utf16le\\\",e,t.length-1)}function a5t(t){var e=t&&t.length?this.write(t):\\\"\\\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString(\\\"utf16le\\\",0,r)}return e}function c5t(t,e){var r=(t.length-e)%3;return r===0?t.toString(\\\"base64\\\",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString(\\\"base64\\\",e,t.length-r))}function l5t(t){var e=t&&t.length?this.write(t):\\\"\\\";return this.lastNeed?e+this.lastChar.toString(\\\"base64\\\",0,3-this.lastNeed):e}function u5t(t){return t.toString(this.encoding)}function d5t(t){return t&&t.length?this.write(t):\\\"\\\"}});var ij=q((otn,Vke)=>{\\\"use strict\\\";u();var zke=Yv().codes.ERR_STREAM_PREMATURE_CLOSE;function f5t(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function p5t(){}function h5t(t){return t.setHeader&&typeof t.abort==\\\"function\\\"}function $ke(t,e,r){if(typeof e==\\\"function\\\")return $ke(t,null,e);e||(e={}),r=f5t(r||p5t);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){i=!1,o=!0,n||r.call(t)},c=t._readableState&&t._readableState.endEmitted,l=function(){n=!1,c=!0,i||r.call(t)},d=function(m){r.call(t,m)},f=function(){var m;if(n&&!c)return(!t._readableState||!t._readableState.ended)&&(m=new zke),r.call(t,m);if(i&&!o)return(!t._writableState||!t._writableState.ended)&&(m=new zke),r.call(t,m)},p=function(){t.req.on(\\\"finish\\\",a)};return h5t(t)?(t.on(\\\"complete\\\",a),t.on(\\\"abort\\\",f),t.req?p():t.on(\\\"request\\\",p)):i&&!t._writableState&&(t.on(\\\"end\\\",s),t.on(\\\"close\\\",s)),t.on(\\\"end\\\",l),t.on(\\\"finish\\\",a),e.error!==!1&&t.on(\\\"error\\\",d),t.on(\\\"close\\\",f),function(){t.removeListener(\\\"complete\\\",a),t.removeListener(\\\"abort\\\",f),t.removeListener(\\\"request\\\",p),t.req&&t.req.removeListener(\\\"finish\\\",a),t.removeListener(\\\"end\\\",s),t.removeListener(\\\"close\\\",s),t.removeListener(\\\"finish\\\",a),t.removeListener(\\\"end\\\",l),t.removeListener(\\\"error\\\",d),t.removeListener(\\\"close\\\",f)}}Vke.exports=$ke});var Gke=q((ctn,Wke)=>{\\\"use strict\\\";u();var sj;function n1(t,e,r){return e=m5t(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m5t(t){var e=g5t(t,\\\"string\\\");return typeof e==\\\"symbol\\\"?e:String(e)}function g5t(t,e){if(typeof t!=\\\"object\\\"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||\\\"default\\\");if(typeof n!=\\\"object\\\")return n;throw new TypeError(\\\"@@toPrimitive must return a primitive value.\\\")}return(e===\\\"string\\\"?String:Number)(t)}var y5t=ij(),i1=Symbol(\\\"lastResolve\\\"),e2=Symbol(\\\"lastReject\\\"),XI=Symbol(\\\"error\\\"),oj=Symbol(\\\"ended\\\"),t2=Symbol(\\\"lastPromise\\\"),Qne=Symbol(\\\"handlePromise\\\"),r2=Symbol(\\\"stream\\\");function s1(t,e){return{value:t,done:e}}function b5t(t){var e=t[i1];if(e!==null){var r=t[r2].read();r!==null&&(t[t2]=null,t[i1]=null,t[e2]=null,e(s1(r,!1)))}}function w5t(t){process.nextTick(b5t,t)}function v5t(t,e){return function(r,n){t.then(function(){if(e[oj]){r(s1(void 0,!0));return}e[Qne](r,n)},n)}}var x5t=Object.getPrototypeOf(function(){}),E5t=Object.setPrototypeOf((sj={get stream(){return this[r2]},next:function(){var e=this,r=this[XI];if(r!==null)return Promise.reject(r);if(this[oj])return Promise.resolve(s1(void 0,!0));if(this[r2].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[XI]?a(e[XI]):o(s1(void 0,!0))})});var n=this[t2],i;if(n)i=new Promise(v5t(n,this));else{var s=this[r2].read();if(s!==null)return Promise.resolve(s1(s,!1));i=new Promise(this[Qne])}return this[t2]=i,i}},n1(sj,Symbol.asyncIterator,function(){return this}),n1(sj,\\\"return\\\",function(){var e=this;return new Promise(function(r,n){e[r2].destroy(null,function(i){if(i){n(i);return}r(s1(void 0,!0))})})}),sj),x5t),_5t=function(e){var r,n=Object.create(E5t,(r={},n1(r,r2,{value:e,writable:!0}),n1(r,i1,{value:null,writable:!0}),n1(r,e2,{value:null,writable:!0}),n1(r,XI,{value:null,writable:!0}),n1(r,oj,{value:e._readableState.endEmitted,writable:!0}),n1(r,Qne,{value:function(s,o){var a=n[r2].read();a?(n[t2]=null,n[i1]=null,n[e2]=null,s(s1(a,!1))):(n[i1]=s,n[e2]=o)},writable:!0}),r));return n[t2]=null,y5t(e,function(i){if(i&&i.code!==\\\"ERR_STREAM_PREMATURE_CLOSE\\\"){var s=n[e2];s!==null&&(n[t2]=null,n[i1]=null,n[e2]=null,s(i)),n[XI]=i;return}var o=n[i1];o!==null&&(n[t2]=null,n[i1]=null,n[e2]=null,o(s1(void 0,!0))),n[oj]=!0}),e.on(\\\"readable\\\",w5t.bind(null,n)),n};Wke.exports=_5t});var Zke=q((utn,Kke)=>{u();Kke.exports=function(){throw new Error(\\\"Readable.from is not available in the browser\\\")}});var Wne=q((ptn,sBe)=>{\\\"use strict\\\";u();sBe.exports=mr;var M_;mr.ReadableState=Xke;var ftn=ho().EventEmitter,Yke=function(e,r){return e.listeners(r).length},t9=Bne(),aj=Qx().Buffer,C5t=(typeof globalThis<\\\"u\\\"?globalThis:typeof window<\\\"u\\\"?window:typeof self<\\\"u\\\"?self:{}).Uint8Array||function(){};function S5t(t){return aj.from(t)}function A5t(t){return aj.isBuffer(t)||t instanceof C5t}var Jne=Mne(),$t;Jne&&Jne.debuglog?$t=Jne.debuglog(\\\"stream\\\"):$t=function(){};var T5t=Cke(),iie=Une(),I5t=Fne(),R5t=I5t.getHighWaterMark,cj=Yv().codes,P5t=cj.ERR_INVALID_ARG_TYPE,O5t=cj.ERR_STREAM_PUSH_AFTER_EOF,N5t=cj.ERR_METHOD_NOT_IMPLEMENTED,k5t=cj.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,D_,Yne,Xne;Vu()(mr,t9);var e9=iie.errorOrDestroy,eie=[\\\"error\\\",\\\"close\\\",\\\"destroy\\\",\\\"pause\\\",\\\"resume\\\"];function B5t(t,e,r){if(typeof t.prependListener==\\\"function\\\")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Xke(t,e,r){M_=M_||Xv(),t=t||{},typeof r!=\\\"boolean\\\"&&(r=e instanceof M_),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=R5t(this,t,\\\"readableHighWaterMark\\\",r),this.buffer=new T5t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||\\\"utf8\\\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(D_||(D_=Zne().StringDecoder),this.decoder=new D_(t.encoding),this.encoding=t.encoding)}function mr(t){if(M_=M_||Xv(),!(this instanceof mr))return new mr(t);var e=this instanceof M_;this._readableState=new Xke(t,this,e),this.readable=!0,t&&(typeof t.read==\\\"function\\\"&&(this._read=t.read),typeof t.destroy==\\\"function\\\"&&(this._destroy=t.destroy)),t9.call(this)}Object.defineProperty(mr.prototype,\\\"destroyed\\\",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});mr.prototype.destroy=iie.destroy;mr.prototype._undestroy=iie.undestroy;mr.prototype._destroy=function(t,e){e(t)};mr.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t==\\\"string\\\"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=aj.from(t,e),e=\\\"\\\"),n=!0),eBe(this,t,e,!1,n)};mr.prototype.unshift=function(t){return eBe(this,t,null,!0,!1)};function eBe(t,e,r,n,i){$t(\\\"readableAddChunk\\\",e);var s=t._readableState;if(e===null)s.reading=!1,L5t(t,s);else{var o;if(i||(o=M5t(s,e)),o)e9(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!=\\\"string\\\"&&!s.objectMode&&Object.getPrototypeOf(e)!==aj.prototype&&(e=S5t(e)),n)s.endEmitted?e9(t,new k5t):tie(t,s,e,!0);else if(s.ended)e9(t,new O5t);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?tie(t,s,e,!1):nie(t,s)):tie(t,s,e,!1)}else n||(s.reading=!1,nie(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function tie(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit(\\\"data\\\",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&lj(t)),nie(t,e)}function M5t(t,e){var r;return!A5t(e)&&typeof e!=\\\"string\\\"&&e!==void 0&&!t.objectMode&&(r=new P5t(\\\"chunk\\\",[\\\"string\\\",\\\"Buffer\\\",\\\"Uint8Array\\\"],e)),r}mr.prototype.isPaused=function(){return this._readableState.flowing===!1};mr.prototype.setEncoding=function(t){D_||(D_=Zne().StringDecoder);var e=new D_(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n=\\\"\\\";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==\\\"\\\"&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var Qke=1073741824;function D5t(t){return t>=Qke?t=Qke:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Jke(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=D5t(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}mr.prototype.read=function(t){$t(\\\"read\\\",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return $t(\\\"read: emitReadable\\\",e.length,e.ended),e.length===0&&e.ended?rie(this):lj(this),null;if(t=Jke(t,e),t===0&&e.ended)return e.length===0&&rie(this),null;var n=e.needReadable;$t(\\\"need readable\\\",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,$t(\\\"length less than watermark\\\",n)),e.ended||e.reading?(n=!1,$t(\\\"reading or ended\\\",n)):n&&($t(\\\"do read\\\"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Jke(r,e)));var i;return t>0?i=nBe(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&rie(this)),i!==null&&this.emit(\\\"data\\\",i),i};function L5t(t,e){if($t(\\\"onEofChunk\\\"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?lj(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,tBe(t)))}}function lj(t){var e=t._readableState;$t(\\\"emitReadable\\\",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||($t(\\\"emitReadable\\\",e.flowing),e.emittedReadable=!0,process.nextTick(tBe,t))}function tBe(t){var e=t._readableState;$t(\\\"emitReadable_\\\",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit(\\\"readable\\\"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,sie(t)}function nie(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(U5t,t,e))}function U5t(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if($t(\\\"maybeReadMore read 0\\\"),t.read(0),r===e.length)break}e.readingMore=!1}mr.prototype._read=function(t){e9(this,new N5t(\\\"_read()\\\"))};mr.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,$t(\\\"pipe count=%d opts=%j\\\",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=i?a:g;n.endEmitted?process.nextTick(s):r.once(\\\"end\\\",s),t.on(\\\"unpipe\\\",o);function o(w,v){$t(\\\"onunpipe\\\"),w===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,d())}function a(){$t(\\\"onend\\\"),t.end()}var c=F5t(r);t.on(\\\"drain\\\",c);var l=!1;function d(){$t(\\\"cleanup\\\"),t.removeListener(\\\"close\\\",h),t.removeListener(\\\"finish\\\",m),t.removeListener(\\\"drain\\\",c),t.removeListener(\\\"error\\\",p),t.removeListener(\\\"unpipe\\\",o),r.removeListener(\\\"end\\\",a),r.removeListener(\\\"end\\\",g),r.removeListener(\\\"data\\\",f),l=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&c()}r.on(\\\"data\\\",f);function f(w){$t(\\\"ondata\\\");var v=t.write(w);$t(\\\"dest.write\\\",v),v===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&iBe(n.pipes,t)!==-1)&&!l&&($t(\\\"false write response, pause\\\",n.awaitDrain),n.awaitDrain++),r.pause())}function p(w){$t(\\\"onerror\\\",w),g(),t.removeListener(\\\"error\\\",p),Yke(t,\\\"error\\\")===0&&e9(t,w)}B5t(t,\\\"error\\\",p);function h(){t.removeListener(\\\"finish\\\",m),g()}t.once(\\\"close\\\",h);function m(){$t(\\\"onfinish\\\"),t.removeListener(\\\"close\\\",h),g()}t.once(\\\"finish\\\",m);function g(){$t(\\\"unpipe\\\"),r.unpipe(t)}return t.emit(\\\"pipe\\\",r),n.flowing||($t(\\\"pipe resume\\\"),r.resume()),t};function F5t(t){return function(){var r=t._readableState;$t(\\\"pipeOnDrain\\\",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Yke(t,\\\"data\\\")&&(r.flowing=!0,sie(t))}}mr.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit(\\\"unpipe\\\",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit(\\\"unpipe\\\",this,{hasUnpiped:!1});return this}var o=iBe(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit(\\\"unpipe\\\",this,r),this)};mr.prototype.on=function(t,e){var r=t9.prototype.on.call(this,t,e),n=this._readableState;return t===\\\"data\\\"?(n.readableListening=this.listenerCount(\\\"readable\\\")>0,n.flowing!==!1&&this.resume()):t===\\\"readable\\\"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,$t(\\\"on readable\\\",n.length,n.reading),n.length?lj(this):n.reading||process.nextTick(j5t,this)),r};mr.prototype.addListener=mr.prototype.on;mr.prototype.removeListener=function(t,e){var r=t9.prototype.removeListener.call(this,t,e);return t===\\\"readable\\\"&&process.nextTick(rBe,this),r};mr.prototype.removeAllListeners=function(t){var e=t9.prototype.removeAllListeners.apply(this,arguments);return(t===\\\"readable\\\"||t===void 0)&&process.nextTick(rBe,this),e};function rBe(t){var e=t._readableState;e.readableListening=t.listenerCount(\\\"readable\\\")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount(\\\"data\\\")>0&&t.resume()}function j5t(t){$t(\\\"readable nexttick read 0\\\"),t.read(0)}mr.prototype.resume=function(){var t=this._readableState;return t.flowing||($t(\\\"resume\\\"),t.flowing=!t.readableListening,H5t(this,t)),t.paused=!1,this};function H5t(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(q5t,t,e))}function q5t(t,e){$t(\\\"resume\\\",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit(\\\"resume\\\"),sie(t),e.flowing&&!e.reading&&t.read(0)}mr.prototype.pause=function(){return $t(\\\"call pause flowing=%j\\\",this._readableState.flowing),this._readableState.flowing!==!1&&($t(\\\"pause\\\"),this._readableState.flowing=!1,this.emit(\\\"pause\\\")),this._readableState.paused=!0,this};function sie(t){var e=t._readableState;for($t(\\\"flow\\\",e.flowing);e.flowing&&t.read()!==null;);}mr.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on(\\\"end\\\",function(){if($t(\\\"wrapped end\\\"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on(\\\"data\\\",function(o){if($t(\\\"wrapped data\\\"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]==\\\"function\\\"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var s=0;s<eie.length;s++)t.on(eie[s],this.emit.bind(this,eie[s]));return this._read=function(o){$t(\\\"wrapped _read\\\",o),n&&(n=!1,t.resume())},this};typeof Symbol==\\\"function\\\"&&(mr.prototype[Symbol.asyncIterator]=function(){return Yne===void 0&&(Yne=Gke()),Yne(this)});Object.defineProperty(mr.prototype,\\\"readableHighWaterMark\\\",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(mr.prototype,\\\"readableBuffer\\\",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(mr.prototype,\\\"readableFlowing\\\",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});mr._fromList=nBe;Object.defineProperty(mr.prototype,\\\"readableLength\\\",{enumerable:!1,get:function(){return this._readableState.length}});function nBe(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(\\\"\\\"):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function rie(t){var e=t._readableState;$t(\\\"endReadable\\\",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(z5t,e,t))}function z5t(t,e){if($t(\\\"endReadableNT\\\",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit(\\\"end\\\"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol==\\\"function\\\"&&(mr.from=function(t,e){return Xne===void 0&&(Xne=Zke()),Xne(mr,t,e)});function iBe(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var oie=q((mtn,aBe)=>{\\\"use strict\\\";u();aBe.exports=a0;var uj=Yv().codes,$5t=uj.ERR_METHOD_NOT_IMPLEMENTED,V5t=uj.ERR_MULTIPLE_CALLBACK,W5t=uj.ERR_TRANSFORM_ALREADY_TRANSFORMING,G5t=uj.ERR_TRANSFORM_WITH_LENGTH_0,dj=Xv();Vu()(a0,dj);function K5t(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit(\\\"error\\\",new V5t);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a0(t){if(!(this instanceof a0))return new a0(t);dj.call(this,t),this._transformState={afterTransform:K5t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform==\\\"function\\\"&&(this._transform=t.transform),typeof t.flush==\\\"function\\\"&&(this._flush=t.flush)),this.on(\\\"prefinish\\\",Z5t)}function Z5t(){var t=this;typeof this._flush==\\\"function\\\"&&!this._readableState.destroyed?this._flush(function(e,r){oBe(t,e,r)}):oBe(this,null,null)}a0.prototype.push=function(t,e){return this._transformState.needTransform=!1,dj.prototype.push.call(this,t,e)};a0.prototype._transform=function(t,e,r){r(new $5t(\\\"_transform()\\\"))};a0.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};a0.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};a0.prototype._destroy=function(t,e){dj.prototype._destroy.call(this,t,function(r){e(r)})};function oBe(t,e,r){if(e)return t.emit(\\\"error\\\",e);if(r!=null&&t.push(r),t._writableState.length)throw new G5t;if(t._transformState.transforming)throw new W5t;return t.push(null)}});var uBe=q((ytn,lBe)=>{\\\"use strict\\\";u();lBe.exports=r9;var cBe=oie();Vu()(r9,cBe);function r9(t){if(!(this instanceof r9))return new r9(t);cBe.call(this,t)}r9.prototype._transform=function(t,e,r){r(null,t)}});var mBe=q((wtn,hBe)=>{\\\"use strict\\\";u();var aie;function Q5t(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var pBe=Yv().codes,J5t=pBe.ERR_MISSING_ARGS,Y5t=pBe.ERR_STREAM_DESTROYED;function dBe(t){if(t)throw t}function X5t(t){return t.setHeader&&typeof t.abort==\\\"function\\\"}function e6t(t,e,r,n){n=Q5t(n);var i=!1;t.on(\\\"close\\\",function(){i=!0}),aie===void 0&&(aie=ij()),aie(t,{readable:e,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,X5t(t))return t.abort();if(typeof t.destroy==\\\"function\\\")return t.destroy();n(o||new Y5t(\\\"pipe\\\"))}}}function fBe(t){t()}function t6t(t,e){return t.pipe(e)}function r6t(t){return!t.length||typeof t[t.length-1]!=\\\"function\\\"?dBe:t.pop()}function n6t(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=r6t(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new J5t(\\\"streams\\\");var i,s=e.map(function(o,a){var c=a<e.length-1,l=a>0;return e6t(o,c,l,function(d){i||(i=d),d&&s.forEach(fBe),!c&&(s.forEach(fBe),n(i))})});return e.reduce(t6t)}hBe.exports=n6t});var cie=q((Ku,gBe)=>{u();Ku=gBe.exports=Wne();Ku.Stream=Ku;Ku.Readable=Ku;Ku.Writable=zne();Ku.Duplex=Xv();Ku.Transform=oie();Ku.PassThrough=uBe();Ku.finished=ij();Ku.pipeline=mBe()});var wBe=q((Etn,bBe)=>{u();var{Transform:i6t}=cie();bBe.exports=t=>class yBe extends i6t{constructor(r,n,i,s,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!globalThis.Buffer.isBuffer(r)&&typeof r!=\\\"string\\\")throw new TypeError(\\\"Data must be a string or a buffer\\\");if(this._finalized)throw new Error(\\\"Digest already called\\\");return globalThis.Buffer.isBuffer(r)||(r=globalThis.Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error(\\\"Digest already called\\\");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new yBe(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var EBe=q((Ctn,xBe)=>{u();var{Transform:s6t}=cie();xBe.exports=t=>class vBe extends s6t{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(o){s=o}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!globalThis.Buffer.isBuffer(r)&&typeof r!=\\\"string\\\")throw new TypeError(\\\"Data must be a string or a buffer\\\");if(this._finalized)throw new Error(\\\"Squeeze already called\\\");return globalThis.Buffer.isBuffer(r)||(r=globalThis.Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new vBe(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var CBe=q((Atn,_Be)=>{u();var o6t=wBe(),a6t=EBe();_Be.exports=function(t){let e=o6t(t),r=a6t(t);return function(n,i){switch(typeof n==\\\"string\\\"?n.toLowerCase():n){case\\\"keccak224\\\":return new e(1152,448,null,224,i);case\\\"keccak256\\\":return new e(1088,512,null,256,i);case\\\"keccak384\\\":return new e(832,768,null,384,i);case\\\"keccak512\\\":return new e(576,1024,null,512,i);case\\\"sha3-224\\\":return new e(1152,448,6,224,i);case\\\"sha3-256\\\":return new e(1088,512,6,256,i);case\\\"sha3-384\\\":return new e(832,768,6,384,i);case\\\"sha3-512\\\":return new e(576,1024,6,512,i);case\\\"shake128\\\":return new r(1344,256,31,i);case\\\"shake256\\\":return new r(1088,512,31,i);default:throw new Error(\\\"Invald algorithm: \\\"+n)}}}});var TBe=q(ABe=>{u();var SBe=[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];ABe.p1600=function(t){for(let e=0;e<24;++e){let r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=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],p=d^(i<<1|s>>>31),h=f^(s<<1|i>>>31),m=t[0]^p,g=t[1]^h,w=t[10]^p,v=t[11]^h,b=t[20]^p,_=t[21]^h,S=t[30]^p,T=t[31]^h,N=t[40]^p,O=t[41]^h;p=r^(o<<1|a>>>31),h=n^(a<<1|o>>>31);let L=t[2]^p,B=t[3]^h,H=t[12]^p,M=t[13]^h,F=t[22]^p,R=t[23]^h,y=t[32]^p,E=t[33]^h,C=t[42]^p,I=t[43]^h;p=i^(c<<1|l>>>31),h=s^(l<<1|c>>>31);let P=t[4]^p,k=t[5]^h,U=t[14]^p,D=t[15]^h,A=t[24]^p,j=t[25]^h,K=t[34]^p,J=t[35]^h,X=t[44]^p,re=t[45]^h;p=o^(d<<1|f>>>31),h=a^(f<<1|d>>>31);let fe=t[6]^p,ce=t[7]^h,We=t[16]^p,Ue=t[17]^h,je=t[26]^p,Lt=t[27]^h,pt=t[36]^p,Ct=t[37]^h,jf=t[46]^p,Un=t[47]^h;p=c^(r<<1|n>>>31),h=l^(n<<1|r>>>31);let Fn=t[8]^p,Q0=t[9]^h,wn=t[18]^p,an=t[19]^h,J0=t[28]^p,vn=t[29]^h,xn=t[38]^p,Y0=t[39]^h,En=t[48]^p,jn=t[49]^h,X0=m,_n=g,Cn=v<<4|w>>>28,Mx=w<<4|v>>>28,Jn=b<<3|_>>>29,Yn=_<<3|b>>>29,Dx=T<<9|S>>>23,Xn=S<<9|T>>>23,ei=N<<18|O>>>14,Lx=O<<18|N>>>14,ti=L<<1|B>>>31,ri=B<<1|L>>>31,Ux=M<<12|H>>>20,ni=H<<12|M>>>20,ii=F<<10|R>>>22,Fx=R<<10|F>>>22,si=E<<13|y>>>19,oi=y<<13|E>>>19,jx=C<<2|I>>>30,ai=I<<2|C>>>30,ci=k<<30|P>>>2,Hx=P<<30|k>>>2,li=U<<6|D>>>26,ui=D<<6|U>>>26,qx=j<<11|A>>>21,di=A<<11|j>>>21,fi=K<<15|J>>>17,zx=J<<15|K>>>17,pi=re<<29|X>>>3,hi=X<<29|re>>>3,$x=fe<<28|ce>>>4,mi=ce<<28|fe>>>4,gi=Ue<<23|We>>>9,Vx=We<<23|Ue>>>9,yi=je<<25|Lt>>>7,bi=Lt<<25|je>>>7,ub=pt<<21|Ct>>>11,db=Ct<<21|pt>>>11,fb=Un<<24|jf>>>8,pb=jf<<24|Un>>>8,hb=Fn<<27|Q0>>>5,mb=Q0<<27|Fn>>>5,gb=wn<<20|an>>>12,yb=an<<20|wn>>>12,bb=vn<<7|J0>>>25,wb=J0<<7|vn>>>25,vb=xn<<8|Y0>>>24,xb=Y0<<8|xn>>>24,Eb=En<<14|jn>>>18,_b=jn<<14|En>>>18;t[0]=X0^~Ux&qx,t[1]=_n^~ni&di,t[10]=$x^~gb&Jn,t[11]=mi^~yb&Yn,t[20]=ti^~li&yi,t[21]=ri^~ui&bi,t[30]=hb^~Cn&ii,t[31]=mb^~Mx&Fx,t[40]=ci^~gi&bb,t[41]=Hx^~Vx&wb,t[2]=Ux^~qx&ub,t[3]=ni^~di&db,t[12]=gb^~Jn&si,t[13]=yb^~Yn&oi,t[22]=li^~yi&vb,t[23]=ui^~bi&xb,t[32]=Cn^~ii&fi,t[33]=Mx^~Fx&zx,t[42]=gi^~bb&Dx,t[43]=Vx^~wb&Xn,t[4]=qx^~ub&Eb,t[5]=di^~db&_b,t[14]=Jn^~si&pi,t[15]=Yn^~oi&hi,t[24]=yi^~vb&ei,t[25]=bi^~xb&Lx,t[34]=ii^~fi&fb,t[35]=Fx^~zx&pb,t[44]=bb^~Dx&jx,t[45]=wb^~Xn&ai,t[6]=ub^~Eb&X0,t[7]=db^~_b&_n,t[16]=si^~pi&$x,t[17]=oi^~hi&mi,t[26]=vb^~ei&ti,t[27]=xb^~Lx&ri,t[36]=fi^~fb&hb,t[37]=zx^~pb&mb,t[46]=Dx^~jx&ci,t[47]=Xn^~ai&Hx,t[8]=Eb^~X0&Ux,t[9]=_b^~_n&ni,t[18]=pi^~$x&gb,t[19]=hi^~mi&yb,t[28]=ei^~ti&li,t[29]=Lx^~ri&ui,t[38]=fb^~hb&Cn,t[39]=pb^~mb&Mx,t[48]=jx^~ci&gi,t[49]=ai^~Hx&Vx,t[0]^=SBe[e*2],t[1]^=SBe[e*2+1]}}});var RBe=q((Ptn,IBe)=>{u();var fj=TBe();function L_(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}L_.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};L_.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(fj.p1600(this.state),this.count=0)};L_.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),(t&128)!==0&&this.count===this.blockSize-1&&fj.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),fj.p1600(this.state),this.count=0,this.squeezing=!0};L_.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);let e=globalThis.Buffer.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(fj.p1600(this.state),this.count=0);return e};L_.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};IBe.exports=L_});var OBe=q((Ntn,PBe)=>{u();PBe.exports=CBe()(RBe())});var lie=q((Btn,DBe)=>{u();var c6t=OBe(),l6t=SI();function NBe(t){return globalThis.Buffer.allocUnsafe(t).fill(0)}function kBe(t,e,r){let n=NBe(e);return t=pj(t),r?t.length<e?(t.copy(n),n):t.slice(0,e):t.length<e?(t.copy(n,e-t.length),n):t.slice(-e)}function u6t(t,e){return kBe(t,e,!0)}function pj(t){if(!globalThis.Buffer.isBuffer(t))if(Array.isArray(t))t=globalThis.Buffer.from(t);else if(typeof t==\\\"string\\\")BBe(t)?t=globalThis.Buffer.from(p6t(MBe(t)),\\\"hex\\\"):t=globalThis.Buffer.from(t);else if(typeof t==\\\"number\\\")t=intToBuffer(t);else if(t==null)t=globalThis.Buffer.allocUnsafe(0);else if(l6t.isBN(t))t=t.toArrayLike(globalThis.Buffer);else if(t.toArray)t=globalThis.Buffer.from(t.toArray());else throw new Error(\\\"invalid type\\\");return t}function d6t(t){return t=pj(t),\\\"0x\\\"+t.toString(\\\"hex\\\")}function f6t(t,e){return t=pj(t),e||(e=256),c6t(\\\"keccak\\\"+e).update(t).digest()}function p6t(t){return t.length%2?\\\"0\\\"+t:t}function BBe(t){return typeof t==\\\"string\\\"&&t.match(/^0x[0-9A-Fa-f]*$/)}function MBe(t){return typeof t==\\\"string\\\"&&t.startsWith(\\\"0x\\\")?t.slice(2):t}DBe.exports={zeros:NBe,setLength:kBe,setLengthRight:u6t,isHexString:BBe,stripHexPrefix:MBe,toBuffer:pj,bufferToHex:d6t,keccak:f6t}});var qBe=q((Dtn,HBe)=>{u();var s2=lie(),i2=SI();function UBe(t){return t.startsWith(\\\"int[\\\")?\\\"int256\\\"+t.slice(3):t===\\\"int\\\"?\\\"int256\\\":t.startsWith(\\\"uint[\\\")?\\\"uint256\\\"+t.slice(4):t===\\\"uint\\\"?\\\"uint256\\\":t.startsWith(\\\"fixed[\\\")?\\\"fixed128x128\\\"+t.slice(5):t===\\\"fixed\\\"?\\\"fixed128x128\\\":t.startsWith(\\\"ufixed[\\\")?\\\"ufixed128x128\\\"+t.slice(6):t===\\\"ufixed\\\"?\\\"ufixed128x128\\\":t}function U_(t){return parseInt(/^\\\\D+(\\\\d+)$/.exec(t)[1],10)}function LBe(t){var e=/^\\\\D+(\\\\d+)x(\\\\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function FBe(t){var e=t.match(/(.*)\\\\[(.*?)\\\\]$/);return e?e[2]===\\\"\\\"?\\\"dynamic\\\":parseInt(e[2],10):null}function n2(t){var e=typeof t;if(e===\\\"string\\\")return s2.isHexString(t)?new i2(s2.stripHexPrefix(t),16):new i2(t,10);if(e===\\\"number\\\")return new i2(t);if(t.toArray)return t;throw new Error(\\\"Argument is not a number\\\")}function qp(t,e){var r,n,i,s;if(t===\\\"address\\\")return qp(\\\"uint160\\\",n2(e));if(t===\\\"bool\\\")return qp(\\\"uint8\\\",e?1:0);if(t===\\\"string\\\")return qp(\\\"bytes\\\",new globalThis.Buffer(e,\\\"utf8\\\"));if(m6t(t)){if(typeof e.length>\\\"u\\\")throw new Error(\\\"Not an array?\\\");if(r=FBe(t),r!==\\\"dynamic\\\"&&r!==0&&e.length>r)throw new Error(\\\"Elements exceed array size: \\\"+r);i=[],t=t.slice(0,t.lastIndexOf(\\\"[\\\")),typeof e==\\\"string\\\"&&(e=JSON.parse(e));for(s in e)i.push(qp(t,e[s]));if(r===\\\"dynamic\\\"){var o=qp(\\\"uint256\\\",e.length);i.unshift(o)}return globalThis.Buffer.concat(i)}else{if(t===\\\"bytes\\\")return e=new globalThis.Buffer(e),i=globalThis.Buffer.concat([qp(\\\"uint256\\\",e.length),e]),e.length%32!==0&&(i=globalThis.Buffer.concat([i,s2.zeros(32-e.length%32)])),i;if(t.startsWith(\\\"bytes\\\")){if(r=U_(t),r<1||r>32)throw new Error(\\\"Invalid bytes<N> width: \\\"+r);return s2.setLengthRight(e,32)}else if(t.startsWith(\\\"uint\\\")){if(r=U_(t),r%8||r<8||r>256)throw new Error(\\\"Invalid uint<N> width: \\\"+r);if(n=n2(e),n.bitLength()>r)throw new Error(\\\"Supplied uint exceeds width: \\\"+r+\\\" vs \\\"+n.bitLength());if(n<0)throw new Error(\\\"Supplied uint is negative\\\");return n.toArrayLike(globalThis.Buffer,\\\"be\\\",32)}else if(t.startsWith(\\\"int\\\")){if(r=U_(t),r%8||r<8||r>256)throw new Error(\\\"Invalid int<N> width: \\\"+r);if(n=n2(e),n.bitLength()>r)throw new Error(\\\"Supplied int exceeds width: \\\"+r+\\\" vs \\\"+n.bitLength());return n.toTwos(256).toArrayLike(globalThis.Buffer,\\\"be\\\",32)}else if(t.startsWith(\\\"ufixed\\\")){if(r=LBe(t),n=n2(e),n<0)throw new Error(\\\"Supplied ufixed is negative\\\");return qp(\\\"uint256\\\",n.mul(new i2(2).pow(new i2(r[1]))))}else if(t.startsWith(\\\"fixed\\\"))return r=LBe(t),qp(\\\"int256\\\",n2(e).mul(new i2(2).pow(new i2(r[1]))))}throw new Error(\\\"Unsupported or invalid type: \\\"+t)}function h6t(t){return t===\\\"string\\\"||t===\\\"bytes\\\"||FBe(t)===\\\"dynamic\\\"}function m6t(t){return t.lastIndexOf(\\\"]\\\")===t.length-1}function g6t(t,e){var r=[],n=[],i=32*t.length;for(var s in t){var o=UBe(t[s]),a=e[s],c=qp(o,a);h6t(o)?(r.push(qp(\\\"uint256\\\",i)),n.push(c),i+=c.length):r.push(c)}return globalThis.Buffer.concat(r.concat(n))}function jBe(t,e){if(t.length!==e.length)throw new Error(\\\"Number of types are not matching the values\\\");for(var r,n,i=[],s=0;s<t.length;s++){var o=UBe(t[s]),a=e[s];if(o===\\\"bytes\\\")i.push(a);else if(o===\\\"string\\\")i.push(new globalThis.Buffer(a,\\\"utf8\\\"));else if(o===\\\"bool\\\")i.push(new globalThis.Buffer(a?\\\"01\\\":\\\"00\\\",\\\"hex\\\"));else if(o===\\\"address\\\")i.push(s2.setLength(a,20));else if(o.startsWith(\\\"bytes\\\")){if(r=U_(o),r<1||r>32)throw new Error(\\\"Invalid bytes<N> width: \\\"+r);i.push(s2.setLengthRight(a,r))}else if(o.startsWith(\\\"uint\\\")){if(r=U_(o),r%8||r<8||r>256)throw new Error(\\\"Invalid uint<N> width: \\\"+r);if(n=n2(a),n.bitLength()>r)throw new Error(\\\"Supplied uint exceeds width: \\\"+r+\\\" vs \\\"+n.bitLength());i.push(n.toArrayLike(globalThis.Buffer,\\\"be\\\",r/8))}else if(o.startsWith(\\\"int\\\")){if(r=U_(o),r%8||r<8||r>256)throw new Error(\\\"Invalid int<N> width: \\\"+r);if(n=n2(a),n.bitLength()>r)throw new Error(\\\"Supplied int exceeds width: \\\"+r+\\\" vs \\\"+n.bitLength());i.push(n.toTwos(r).toArrayLike(globalThis.Buffer,\\\"be\\\",r/8))}else throw new Error(\\\"Unsupported or invalid type: \\\"+o)}return globalThis.Buffer.concat(i)}function y6t(t,e){return s2.keccak(jBe(t,e))}HBe.exports={rawEncode:g6t,solidityPack:jBe,soliditySHA3:y6t}});var VBe=q((Utn,$Be)=>{u();var lf=lie(),n9=qBe(),zBe={type:\\\"object\\\",properties:{types:{type:\\\"object\\\",additionalProperties:{type:\\\"array\\\",items:{type:\\\"object\\\",properties:{name:{type:\\\"string\\\"},type:{type:\\\"string\\\"}},required:[\\\"name\\\",\\\"type\\\"]}}},primaryType:{type:\\\"string\\\"},domain:{type:\\\"object\\\"},message:{type:\\\"object\\\"}},required:[\\\"types\\\",\\\"primaryType\\\",\\\"domain\\\",\\\"message\\\"]},uie={encodeData(t,e,r,n=!0){let i=[\\\"bytes32\\\"],s=[this.hashType(t,r)];if(n){let o=(a,c,l)=>{if(r[c]!==void 0)return[\\\"bytes32\\\",l==null?\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\":lf.keccak(this.encodeData(c,l,r,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c===\\\"bytes\\\")return[\\\"bytes32\\\",lf.keccak(l)];if(c===\\\"string\\\")return typeof l==\\\"string\\\"&&(l=globalThis.Buffer.from(l,\\\"utf8\\\")),[\\\"bytes32\\\",lf.keccak(l)];if(c.lastIndexOf(\\\"]\\\")===c.length-1){let d=c.slice(0,c.lastIndexOf(\\\"[\\\")),f=l.map(p=>o(a,d,p));return[\\\"bytes32\\\",lf.keccak(n9.rawEncode(f.map(([p])=>p),f.map(([,p])=>p)))]}return[c,l]};for(let a of r[t]){let[c,l]=o(a.name,a.type,e[a.name]);i.push(c),s.push(l)}}else for(let o of r[t]){let a=e[o.name];if(a!==void 0)if(o.type===\\\"bytes\\\")i.push(\\\"bytes32\\\"),a=lf.keccak(a),s.push(a);else if(o.type===\\\"string\\\")i.push(\\\"bytes32\\\"),typeof a==\\\"string\\\"&&(a=globalThis.Buffer.from(a,\\\"utf8\\\")),a=lf.keccak(a),s.push(a);else if(r[o.type]!==void 0)i.push(\\\"bytes32\\\"),a=lf.keccak(this.encodeData(o.type,a,r,n)),s.push(a);else{if(o.type.lastIndexOf(\\\"]\\\")===o.type.length-1)throw new Error(\\\"Arrays currently unimplemented in encodeData\\\");i.push(o.type),s.push(a)}}return n9.rawEncode(i,s)},encodeType(t,e){let r=\\\"\\\",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(let i of n){if(!e[i])throw new Error(\\\"No type definition specified: \\\"+i);r+=i+\\\"(\\\"+e[i].map(({name:o,type:a})=>a+\\\" \\\"+o).join(\\\",\\\")+\\\")\\\"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\\\\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(let n of e[t])for(let i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return lf.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return lf.keccak(this.encodeType(t,e))},sanitizeData(t){let e={};for(let r in zBe.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){let r=this.sanitizeData(t),n=[globalThis.Buffer.from(\\\"1901\\\",\\\"hex\\\")];return n.push(this.hashStruct(\\\"EIP712Domain\\\",r.domain,r.types,e)),r.primaryType!==\\\"EIP712Domain\\\"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),lf.keccak(globalThis.Buffer.concat(n))}};$Be.exports={TYPED_MESSAGE_SCHEMA:zBe,TypedDataUtils:uie,hashForSignTypedDataLegacy:function(t){return b6t(t.data)},hashForSignTypedData_v3:function(t){return uie.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return uie.hash(t.data)}};function b6t(t){let e=new Error(\\\"Expect argument to be non-empty array\\\");if(typeof t!=\\\"object\\\"||!t.length)throw e;let r=t.map(function(s){return s.type===\\\"bytes\\\"?lf.toBuffer(s.value):s.value}),n=t.map(function(s){return s.type}),i=t.map(function(s){if(!s.name)throw e;return s.type+\\\" \\\"+s.name});return n9.soliditySHA3([\\\"bytes32\\\",\\\"bytes32\\\"],[n9.soliditySHA3(new Array(t.length).fill(\\\"string\\\"),i),n9.soliditySHA3(n,r)])}});var QBe=q(j_=>{\\\"use strict\\\";u();Object.defineProperty(j_,\\\"__esModule\\\",{value:!0});j_.filterFromParam=j_.FilterPolyfill=void 0;var F_=RI(),Xa=Np(),w6t=300*1e3,o2={jsonrpc:\\\"2.0\\\",id:0},die=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,F_.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){let r=ZBe(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,\\\"initial cursor position:\\\",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,Xa.hexStringFromIntNumber)(n)}async newBlockFilter(){let e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,\\\"latest\\\");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,Xa.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){let e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,\\\"latest\\\");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,Xa.hexStringFromIntNumber)(e)}uninstallFilter(e){let r=(0,Xa.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){let r=(0,Xa.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(hj())}async getFilterLogs(e){let r=(0,Xa.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o2),{method:\\\"eth_getLogs\\\",params:[WBe(n)]})):hj()}makeFilterId(){return(0,F_.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){let r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return hj();let i=await this.getCurrentBlockHeight(),s=r.toBlock===\\\"latest\\\"?i:r.toBlock;if(n>i||n>Number(r.toBlock))return mj();console.info(`Fetching logs from ${n} to ${s} for filter ${e}`);let o=await this.sendAsyncPromise(Object.assign(Object.assign({},o2),{method:\\\"eth_getLogs\\\",params:[WBe(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(o.result)){let a=o.result.map(l=>(0,Xa.intNumberFromHexString)(l.blockNumber||\\\"0x0\\\")),c=Math.max(...a);if(c&&c>n){let l=(0,F_.IntNumber)(c+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${l}`),this.cursors.set(e,l)}}return o}async getBlockFilterChanges(e){let r=this.cursors.get(e);if(!r)return hj();let n=await this.getCurrentBlockHeight();if(r>n)return mj();console.info(`Fetching blocks from ${r} to ${n} for filter (${e})`);let i=(await Promise.all((0,Xa.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,F_.IntNumber)(o))))).filter(o=>!!o),s=(0,F_.IntNumber)(r+i.length);return console.info(`Moving cursor position for filter (${e}) from ${r} to ${s}`),this.cursors.set(e,s),Object.assign(Object.assign({},o2),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(mj())}async setInitialCursorPosition(e,r){let n=await this.getCurrentBlockHeight(),i=typeof r==\\\"number\\\"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){let r=this.timeouts.get(e);r&&window.clearTimeout(r);let n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},w6t);this.timeouts.set(e,n)}async getCurrentBlockHeight(){let e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;let r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){let{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},o2),{method:\\\"eth_blockNumber\\\",params:[]}));return(0,Xa.intNumberFromHexString)((0,Xa.ensureHexString)(e))}async getBlockHashByNumber(e){let r=await this.sendAsyncPromise(Object.assign(Object.assign({},o2),{method:\\\"eth_getBlockByNumber\\\",params:[(0,Xa.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash==\\\"string\\\"?(0,Xa.ensureHexString)(r.result.hash):null}};j_.FilterPolyfill=die;function ZBe(t){return{fromBlock:GBe(t.fromBlock),toBlock:GBe(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}j_.filterFromParam=ZBe;function WBe(t){let e={fromBlock:KBe(t.fromBlock),toBlock:KBe(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function GBe(t){if(t===void 0||t===\\\"latest\\\"||t===\\\"pending\\\")return\\\"latest\\\";if(t===\\\"earliest\\\")return(0,F_.IntNumber)(0);if((0,Xa.isHexString)(t))return(0,Xa.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function KBe(t){return t===\\\"latest\\\"?t:(0,Xa.hexStringFromIntNumber)(t)}function hj(){return Object.assign(Object.assign({},o2),{error:{code:-32e3,message:\\\"filter not found\\\"}})}function mj(){return Object.assign(Object.assign({},o2),{result:[]})}});var gj=q((qtn,JBe)=>{u();JBe.exports=v6t;function v6t(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<\\\"u\\\"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}});var eMe=q(($tn,XBe)=>{\\\"use strict\\\";u();var YBe=(t,e)=>function(){let r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{e.errorFirst?n.push(function(o,a){if(e.multiArgs){let c=new Array(arguments.length-1);for(let l=1;l<arguments.length;l++)c[l-1]=arguments[l];o?(c.unshift(o),s(c)):i(c)}else o?s(o):i(a)}):n.push(function(o){if(e.multiArgs){let a=new Array(arguments.length-1);for(let c=0;c<arguments.length;c++)a[c]=arguments[c];i(a)}else i(o)}),t.apply(this,n)})};XBe.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=i=>{let s=o=>typeof o==\\\"string\\\"?i===o:o.test(i);return e.include?e.include.some(s):!e.exclude.some(s)},n;typeof t==\\\"function\\\"?n=function(){return e.excludeMain?t.apply(this,arguments):YBe(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(let i in t){let s=t[i];n[i]=typeof s==\\\"function\\\"&&r(i)?YBe(s,e):s}return n}});var yj=q(pie=>{\\\"use strict\\\";u();Object.defineProperty(pie,\\\"__esModule\\\",{value:!0});var x6t=ho();function tMe(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function E6t(t){let e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}var fie=class extends x6t.EventEmitter{emit(e,...r){let n=e===\\\"error\\\",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;let a=new Error(`Unhandled error.${o?` (${o.message})`:\\\"\\\"}`);throw a.context=o,a}let s=i[e];if(s===void 0)return!1;if(typeof s==\\\"function\\\")tMe(s,this,r);else{let o=s.length,a=E6t(s);for(let c=0;c<o;c+=1)tMe(a[c],this,r)}return!0}};pie.default=fie});var mie=q(H_=>{\\\"use strict\\\";u();var _6t=H_&&H_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(H_,\\\"__esModule\\\",{value:!0});H_.BaseBlockTracker=void 0;var C6t=_6t(yj()),S6t=1e3,A6t=(t,e)=>t+e,rMe=[\\\"sync\\\",\\\"latest\\\"],hie=class extends C6t.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*S6t,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once(\\\"latest\\\",r))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener(\\\"newListener\\\",this._onNewListener),this.removeListener(\\\"removeListener\\\",this._onRemoveListener),this.on(\\\"newListener\\\",this._onNewListener),this.on(\\\"removeListener\\\",this._onRemoveListener)}_onNewListener(e){rMe.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit(\\\"_started\\\"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit(\\\"_ended\\\"))}_getBlockTrackerEventCount(){return rMe.map(e=>this.listenerCount(e)).reduce(A6t)}_shouldUseNewBlock(e){let r=this._currentBlock;if(!r)return!0;let n=nMe(e),i=nMe(r);return this._usePastBlocks&&n<i||n>i}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){let r=this._currentBlock;this._currentBlock=e,this.emit(\\\"latest\\\",e),this.emit(\\\"sync\\\",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};H_.BaseBlockTracker=hie;function nMe(t){return Number.parseInt(t,16)}});var o1={};ue(o1,{Struct:()=>Di,StructError:()=>bj,any:()=>U6t,array:()=>F6t,assert:()=>sMe,assign:()=>P6t,bigint:()=>j6t,boolean:()=>H6t,coerce:()=>vie,create:()=>oMe,date:()=>q6t,defaulted:()=>n3t,define:()=>jc,deprecated:()=>O6t,dynamic:()=>N6t,empty:()=>s3t,enums:()=>z6t,func:()=>$6t,instance:()=>V6t,integer:()=>W6t,intersection:()=>G6t,is:()=>bie,lazy:()=>k6t,literal:()=>K6t,map:()=>Z6t,mask:()=>aMe,max:()=>o3t,min:()=>a3t,never:()=>wie,nonempty:()=>c3t,nullable:()=>Q6t,number:()=>J6t,object:()=>i9,omit:()=>B6t,optional:()=>cMe,partial:()=>M6t,pattern:()=>l3t,pick:()=>D6t,record:()=>Y6t,refine:()=>a2,regexp:()=>X6t,set:()=>e3t,size:()=>u3t,string:()=>lMe,struct:()=>L6t,trimmed:()=>i3t,tuple:()=>t3t,type:()=>s9,union:()=>r3t,unknown:()=>uMe,validate:()=>q_});function T6t(t){return Zu(t)&&typeof t[Symbol.iterator]==\\\"function\\\"}function Zu(t){return typeof t==\\\"object\\\"&&t!=null}function iMe(t){if(Object.prototype.toString.call(t)!==\\\"[object Object]\\\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function qs(t){return typeof t==\\\"symbol\\\"?t.toString():typeof t==\\\"string\\\"?JSON.stringify(t):`${t}`}function I6t(t){let{done:e,value:r}=t.next();return e?void 0:r}function R6t(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t==\\\"string\\\"&&(t={message:t});let{path:i,branch:s}=e,{type:o}=r,{refinement:a,message:c=`Expected a value of type \\\\`${o}\\\\`${a?` with refinement \\\\`${a}\\\\``:\\\"\\\"}, but received: \\\\`${qs(n)}\\\\``}=t;return{value:n,type:o,refinement:a,key:i[i.length-1],path:i,branch:s,...t,message:c}}function*gie(t,e,r,n){T6t(t)||(t=[t]);for(let i of t){let s=R6t(i,e,r,n);s&&(yield s)}}function*yie(t,e,r={}){let{path:n=[],branch:i=[t],coerce:s=!1,mask:o=!1}=r,a={path:n,branch:i};if(s&&(t=e.coercer(t,a),o&&e.type!==\\\"type\\\"&&Zu(e.schema)&&Zu(t)&&!Array.isArray(t)))for(let l in t)e.schema[l]===void 0&&delete t[l];let c=\\\"valid\\\";for(let l of e.validator(t,a))l.explanation=r.message,c=\\\"not_valid\\\",yield[l,void 0];for(let[l,d,f]of e.entries(t,a)){let p=yie(d,f,{path:l===void 0?n:[...n,l],branch:l===void 0?i:[...i,d],coerce:s,mask:o,message:r.message});for(let h of p)h[0]?(c=h[0].refinement!=null?\\\"not_refined\\\":\\\"not_valid\\\",yield[h[0],void 0]):s&&(d=h[1],l===void 0?t=d:t instanceof Map?t.set(l,d):t instanceof Set?t.add(d):Zu(t)&&(d!==void 0||l in t)&&(t[l]=d))}if(c!==\\\"not_valid\\\")for(let l of e.refiner(t,a))l.explanation=r.message,c=\\\"not_refined\\\",yield[l,void 0];c===\\\"valid\\\"&&(yield[void 0,t])}function sMe(t,e,r){let n=q_(t,e,{message:r});if(n[0])throw n[0]}function oMe(t,e,r){let n=q_(t,e,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function aMe(t,e,r){let n=q_(t,e,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function bie(t,e){return!q_(t,e)[0]}function q_(t,e,r={}){let n=yie(t,e,r),i=I6t(n);return i[0]?[new bj(i[0],function*(){for(let o of n)o[0]&&(yield o[0])}),void 0]:[void 0,i[1]]}function P6t(...t){let e=t[0].type===\\\"type\\\",r=t.map(i=>i.schema),n=Object.assign({},...r);return e?s9(n):i9(n)}function jc(t,e){return new Di({type:t,schema:null,validator:e})}function O6t(t,e){return new Di({...t,refiner:(r,n)=>r===void 0||t.refiner(r,n),validator(r,n){return r===void 0?!0:(e(r,n),t.validator(r,n))}})}function N6t(t){return new Di({type:\\\"dynamic\\\",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function k6t(t){let e;return new Di({type:\\\"lazy\\\",schema:null,*entries(r,n){e??(e=t()),yield*e.entries(r,n)},validator(r,n){return e??(e=t()),e.validator(r,n)},coercer(r,n){return e??(e=t()),e.coercer(r,n)},refiner(r,n){return e??(e=t()),e.refiner(r,n)}})}function B6t(t,e){let{schema:r}=t,n={...r};for(let i of e)delete n[i];return t.type===\\\"type\\\"?s9(n):i9(n)}function M6t(t){let e=t instanceof Di,r=e?{...t.schema}:{...t};for(let n in r)r[n]=cMe(r[n]);return e&&t.type===\\\"type\\\"?s9(r):i9(r)}function D6t(t,e){let{schema:r}=t,n={};for(let i of e)n[i]=r[i];return t.type===\\\"type\\\"?s9(n):i9(n)}function L6t(t,e){return console.warn(\\\"superstruct@0.11 - The `struct` helper has been renamed to `define`.\\\"),jc(t,e)}function U6t(){return jc(\\\"any\\\",()=>!0)}function F6t(t){return new Di({type:\\\"array\\\",schema:t,*entries(e){if(t&&Array.isArray(e))for(let[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${qs(e)}`}})}function j6t(){return jc(\\\"bigint\\\",t=>typeof t==\\\"bigint\\\")}function H6t(){return jc(\\\"boolean\\\",t=>typeof t==\\\"boolean\\\")}function q6t(){return jc(\\\"date\\\",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \\\\`Date\\\\` object, but received: ${qs(t)}`)}function z6t(t){let e={},r=t.map(n=>qs(n)).join();for(let n of t)e[n]=n;return new Di({type:\\\"enums\\\",schema:e,validator(n){return t.includes(n)||`Expected one of \\\\`${r}\\\\`, but received: ${qs(n)}`}})}function $6t(){return jc(\\\"func\\\",t=>typeof t==\\\"function\\\"||`Expected a function, but received: ${qs(t)}`)}function V6t(t){return jc(\\\"instance\\\",e=>e instanceof t||`Expected a \\\\`${t.name}\\\\` instance, but received: ${qs(e)}`)}function W6t(){return jc(\\\"integer\\\",t=>typeof t==\\\"number\\\"&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${qs(t)}`)}function G6t(t){return new Di({type:\\\"intersection\\\",schema:null,*entries(e,r){for(let n of t)yield*n.entries(e,r)},*validator(e,r){for(let n of t)yield*n.validator(e,r)},*refiner(e,r){for(let n of t)yield*n.refiner(e,r)}})}function K6t(t){let e=qs(t),r=typeof t;return new Di({type:\\\"literal\\\",schema:r===\\\"string\\\"||r===\\\"number\\\"||r===\\\"boolean\\\"?t:null,validator(n){return n===t||`Expected the literal \\\\`${e}\\\\`, but received: ${qs(n)}`}})}function Z6t(t,e){return new Di({type:\\\"map\\\",schema:null,*entries(r){if(t&&e&&r instanceof Map)for(let[n,i]of r.entries())yield[n,n,t],yield[n,i,e]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \\\\`Map\\\\` object, but received: ${qs(r)}`}})}function wie(){return jc(\\\"never\\\",()=>!1)}function Q6t(t){return new Di({...t,validator:(e,r)=>e===null||t.validator(e,r),refiner:(e,r)=>e===null||t.refiner(e,r)})}function J6t(){return jc(\\\"number\\\",t=>typeof t==\\\"number\\\"&&!isNaN(t)||`Expected a number, but received: ${qs(t)}`)}function i9(t){let e=t?Object.keys(t):[],r=wie();return new Di({type:\\\"object\\\",schema:t||null,*entries(n){if(t&&Zu(n)){let i=new Set(Object.keys(n));for(let s of e)i.delete(s),yield[s,n[s],t[s]];for(let s of i)yield[s,n[s],r]}},validator(n){return Zu(n)||`Expected an object, but received: ${qs(n)}`},coercer(n){return Zu(n)?{...n}:n}})}function cMe(t){return new Di({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Y6t(t,e){return new Di({type:\\\"record\\\",schema:null,*entries(r){if(Zu(r))for(let n in r){let i=r[n];yield[n,n,t],yield[n,i,e]}},validator(r){return Zu(r)||`Expected an object, but received: ${qs(r)}`}})}function X6t(){return jc(\\\"regexp\\\",t=>t instanceof RegExp)}function e3t(t){return new Di({type:\\\"set\\\",schema:null,*entries(e){if(t&&e instanceof Set)for(let r of e)yield[r,r,t]},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \\\\`Set\\\\` object, but received: ${qs(e)}`}})}function lMe(){return jc(\\\"string\\\",t=>typeof t==\\\"string\\\"||`Expected a string, but received: ${qs(t)}`)}function t3t(t){let e=wie();return new Di({type:\\\"tuple\\\",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],t[i]||e]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${qs(r)}`}})}function s9(t){let e=Object.keys(t);return new Di({type:\\\"type\\\",schema:t,*entries(r){if(Zu(r))for(let n of e)yield[n,r[n],t[n]]},validator(r){return Zu(r)||`Expected an object, but received: ${qs(r)}`},coercer(r){return Zu(r)?{...r}:r}})}function r3t(t){let e=t.map(r=>r.type).join(\\\" | \\\");return new Di({type:\\\"union\\\",schema:null,coercer(r){for(let n of t){let[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){let i=[];for(let s of t){let[...o]=yie(r,s,n),[a]=o;if(a[0])for(let[c]of o)c&&i.push(c);else return[]}return[`Expected the value to satisfy a union of \\\\`${e}\\\\`, but received: ${qs(r)}`,...i]}})}function uMe(){return jc(\\\"unknown\\\",()=>!0)}function vie(t,e,r){return new Di({...t,coercer:(n,i)=>bie(n,e)?t.coercer(r(n,i),i):t.coercer(n,i)})}function n3t(t,e,r={}){return vie(t,uMe(),n=>{let i=typeof e==\\\"function\\\"?e():e;if(n===void 0)return i;if(!r.strict&&iMe(n)&&iMe(i)){let s={...n},o=!1;for(let a in i)s[a]===void 0&&(s[a]=i[a],o=!0);if(o)return s}return n})}function i3t(t){return vie(t,lMe(),e=>e.trim())}function s3t(t){return a2(t,\\\"empty\\\",e=>{let r=dMe(e);return r===0||`Expected an empty ${t.type} but received one with a size of \\\\`${r}\\\\``})}function dMe(t){return t instanceof Map||t instanceof Set?t.size:t.length}function o3t(t,e,r={}){let{exclusive:n}=r;return a2(t,\\\"max\\\",i=>n?i<e:i<=e||`Expected a ${t.type} less than ${n?\\\"\\\":\\\"or equal to \\\"}${e} but received \\\\`${i}\\\\``)}function a3t(t,e,r={}){let{exclusive:n}=r;return a2(t,\\\"min\\\",i=>n?i>e:i>=e||`Expected a ${t.type} greater than ${n?\\\"\\\":\\\"or equal to \\\"}${e} but received \\\\`${i}\\\\``)}function c3t(t){return a2(t,\\\"nonempty\\\",e=>dMe(e)>0||`Expected a nonempty ${t.type} but received an empty one`)}function l3t(t,e){return a2(t,\\\"pattern\\\",r=>e.test(r)||`Expected a ${t.type} matching \\\\`/${e.source}/\\\\` but received \\\"${r}\\\"`)}function u3t(t,e,r=e){let n=`Expected a ${t.type}`,i=e===r?`of \\\\`${e}\\\\``:`between \\\\`${e}\\\\` and \\\\`${r}\\\\``;return a2(t,\\\"size\\\",s=>{if(typeof s==\\\"number\\\"||s instanceof Date)return e<=s&&s<=r||`${n} ${i} but received \\\\`${s}\\\\``;if(s instanceof Map||s instanceof Set){let{size:o}=s;return e<=o&&o<=r||`${n} with a size ${i} but received one with a size of \\\\`${o}\\\\``}else{let{length:o}=s;return e<=o&&o<=r||`${n} with a length ${i} but received one with a length of \\\\`${o}\\\\``}})}function a2(t,e,r){return new Di({...t,*refiner(n,i){yield*t.refiner(n,i);let s=r(n,i),o=gie(s,i,t,n);for(let a of o)yield{...a,refinement:e}}})}var bj,Di,a1=x(()=>{u();bj=class extends TypeError{constructor(e,r){let n,{message:i,explanation:s,...o}=e,{path:a}=e,c=a.length===0?i:`At path: ${a.join(\\\".\\\")} -- ${i}`;super(s??c),s!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...r()])}};Di=class{constructor(e){let{type:r,schema:n,validator:i,refiner:s,coercer:o=c=>c,entries:a=function*(){}}=e;this.type=r,this.schema=n,this.entries=a,this.coercer=o,i?this.validator=(c,l)=>{let d=i(c,l);return gie(d,l,this,c)}:this.validator=()=>[],s?this.refiner=(c,l)=>{let d=s(c,l);return gie(d,l,this,c)}:this.refiner=()=>[]}assert(e,r){return sMe(e,this,r)}create(e,r){return oMe(e,this,r)}is(e){return bie(e,this)}mask(e,r){return aMe(e,this,r)}validate(e,r={}){return q_(e,this,r)}}});var c0=q(zp=>{\\\"use strict\\\";u();Object.defineProperty(zp,\\\"__esModule\\\",{value:!0});zp.assertExhaustive=zp.assertStruct=zp.assert=zp.AssertionError=void 0;var d3t=(a1(),mt(o1));function f3t(t){return typeof t==\\\"object\\\"&&t!==null&&\\\"message\\\"in t}function p3t(t){var e,r;return typeof((r=(e=t?.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)==\\\"string\\\"}function h3t(t){let e=f3t(t)?t.message:String(t);return e.endsWith(\\\".\\\")?e.slice(0,-1):e}function fMe(t,e){return p3t(t)?new t({message:e}):t({message:e})}var o9=class extends Error{constructor(e){super(e.message),this.code=\\\"ERR_ASSERTION\\\"}};zp.AssertionError=o9;function m3t(t,e=\\\"Assertion failed.\\\",r=o9){if(!t)throw e instanceof Error?e:fMe(r,e)}zp.assert=m3t;function g3t(t,e,r=\\\"Assertion failed\\\",n=o9){try{(0,d3t.assert)(t,e)}catch(i){throw fMe(n,`${r}: ${h3t(i)}.`)}}zp.assertStruct=g3t;function y3t(t){throw new Error(\\\"Invalid branch reached. Should be detected during compilation.\\\")}zp.assertExhaustive=y3t});var xie=q(wj=>{\\\"use strict\\\";u();Object.defineProperty(wj,\\\"__esModule\\\",{value:!0});wj.base64=void 0;var b3t=(a1(),mt(o1)),w3t=c0(),v3t=(t,e={})=>{var r,n;let i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=e.characterSet)!==null&&n!==void 0?n:\\\"base64\\\",o;s===\\\"base64\\\"?o=String.raw`[A-Za-z0-9+\\\\/]`:((0,w3t.assert)(s===\\\"base64url\\\"),o=String.raw`[-_A-Za-z0-9]`);let a;return i?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,\\\"u\\\"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,\\\"u\\\"),(0,b3t.pattern)(t,a)};wj.base64=v3t});var a9=q(Ps=>{\\\"use strict\\\";u();Object.defineProperty(Ps,\\\"__esModule\\\",{value:!0});Ps.remove0x=Ps.add0x=Ps.assertIsStrictHexString=Ps.assertIsHexString=Ps.isStrictHexString=Ps.isHexString=Ps.StrictHexStruct=Ps.HexStruct=void 0;var z_=(a1(),mt(o1)),pMe=c0();Ps.HexStruct=(0,z_.pattern)((0,z_.string)(),/^(?:0x)?[0-9a-f]+$/iu);Ps.StrictHexStruct=(0,z_.pattern)((0,z_.string)(),/^0x[0-9a-f]+$/iu);function hMe(t){return(0,z_.is)(t,Ps.HexStruct)}Ps.isHexString=hMe;function mMe(t){return(0,z_.is)(t,Ps.StrictHexStruct)}Ps.isStrictHexString=mMe;function x3t(t){(0,pMe.assert)(hMe(t),\\\"Value must be a hexadecimal string.\\\")}Ps.assertIsHexString=x3t;function E3t(t){(0,pMe.assert)(mMe(t),'Value must be a hexadecimal string, starting with \\\"0x\\\".')}Ps.assertIsStrictHexString=E3t;function _3t(t){return t.startsWith(\\\"0x\\\")?t:t.startsWith(\\\"0X\\\")?`0x${t.substring(2)}`:`0x${t}`}Ps.add0x=_3t;function C3t(t){return t.startsWith(\\\"0x\\\")||t.startsWith(\\\"0X\\\")?t.substring(2):t}Ps.remove0x=C3t});var Cie=q(Ar=>{\\\"use strict\\\";u();Object.defineProperty(Ar,\\\"__esModule\\\",{value:!0});Ar.createDataView=Ar.concatBytes=Ar.valueToBytes=Ar.stringToBytes=Ar.numberToBytes=Ar.signedBigIntToBytes=Ar.bigIntToBytes=Ar.hexToBytes=Ar.bytesToString=Ar.bytesToNumber=Ar.bytesToSignedBigInt=Ar.bytesToBigInt=Ar.bytesToHex=Ar.assertIsBytes=Ar.isBytes=void 0;var Ol=c0(),Eie=a9(),gMe=48,yMe=58,bMe=87;function S3t(){let t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,\\\"0\\\"));return t}}var A3t=S3t();function _ie(t){return t instanceof Uint8Array}Ar.isBytes=_ie;function $_(t){(0,Ol.assert)(_ie(t),\\\"Value must be a Uint8Array.\\\")}Ar.assertIsBytes=$_;function wMe(t){if($_(t),t.length===0)return\\\"0x\\\";let e=A3t(),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e[t[n]];return(0,Eie.add0x)(r.join(\\\"\\\"))}Ar.bytesToHex=wMe;function vMe(t){$_(t);let e=wMe(t);return BigInt(e)}Ar.bytesToBigInt=vMe;function T3t(t){$_(t);let e=BigInt(0);for(let r of t)e=(e<<BigInt(8))+BigInt(r);return BigInt.asIntN(t.length*8,e)}Ar.bytesToSignedBigInt=T3t;function I3t(t){$_(t);let e=vMe(t);return(0,Ol.assert)(e<=BigInt(Number.MAX_SAFE_INTEGER),\\\"Number is not a safe integer. Use `bytesToBigInt` instead.\\\"),Number(e)}Ar.bytesToNumber=I3t;function R3t(t){return $_(t),new TextDecoder().decode(t)}Ar.bytesToString=R3t;function vj(t){var e;if(((e=t?.toLowerCase)===null||e===void 0?void 0:e.call(t))===\\\"0x\\\")return new Uint8Array;(0,Eie.assertIsHexString)(t);let r=(0,Eie.remove0x)(t).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){let o=n.charCodeAt(s*2),a=n.charCodeAt(s*2+1),c=o-(o<yMe?gMe:bMe),l=a-(a<yMe?gMe:bMe);i[s]=c*16+l}return i}Ar.hexToBytes=vj;function xMe(t){(0,Ol.assert)(typeof t==\\\"bigint\\\",\\\"Value must be a bigint.\\\"),(0,Ol.assert)(t>=BigInt(0),\\\"Value must be a non-negative bigint.\\\");let e=t.toString(16);return vj(e)}Ar.bigIntToBytes=xMe;function P3t(t,e){(0,Ol.assert)(e>0);let r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function O3t(t,e){(0,Ol.assert)(typeof t==\\\"bigint\\\",\\\"Value must be a bigint.\\\"),(0,Ol.assert)(typeof e==\\\"number\\\",\\\"Byte length must be a number.\\\"),(0,Ol.assert)(e>0,\\\"Byte length must be greater than 0.\\\"),(0,Ol.assert)(P3t(t,e),\\\"Byte length is too small to represent the given value.\\\");let r=t,n=new Uint8Array(e);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}Ar.signedBigIntToBytes=O3t;function EMe(t){(0,Ol.assert)(typeof t==\\\"number\\\",\\\"Value must be a number.\\\"),(0,Ol.assert)(t>=0,\\\"Value must be a non-negative number.\\\"),(0,Ol.assert)(Number.isSafeInteger(t),\\\"Value is not a safe integer. Use `bigIntToBytes` instead.\\\");let e=t.toString(16);return vj(e)}Ar.numberToBytes=EMe;function _Me(t){return(0,Ol.assert)(typeof t==\\\"string\\\",\\\"Value must be a string.\\\"),new TextEncoder().encode(t)}Ar.stringToBytes=_Me;function CMe(t){if(typeof t==\\\"bigint\\\")return xMe(t);if(typeof t==\\\"number\\\")return EMe(t);if(typeof t==\\\"string\\\")return t.startsWith(\\\"0x\\\")?vj(t):_Me(t);if(_ie(t))return t;throw new TypeError(`Unsupported value type: \\\"${typeof t}\\\".`)}Ar.valueToBytes=CMe;function N3t(t){let e=new Array(t.length),r=0;for(let i=0;i<t.length;i++){let s=CMe(t[i]);e[i]=s,r+=s.length}let n=new Uint8Array(r);for(let i=0,s=0;i<e.length;i++)n.set(e[i],s),s+=e[i].length;return n}Ar.concatBytes=N3t;function k3t(t){if(typeof globalThis.Buffer<\\\"u\\\"&&t instanceof globalThis.Buffer){let e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(e)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}Ar.createDataView=k3t});var AMe=q(xj=>{\\\"use strict\\\";u();Object.defineProperty(xj,\\\"__esModule\\\",{value:!0});xj.ChecksumStruct=void 0;var SMe=(a1(),mt(o1)),B3t=xie();xj.ChecksumStruct=(0,SMe.size)((0,B3t.base64)((0,SMe.string)(),{paddingRequired:!0}),44,44)});var RMe=q($p=>{\\\"use strict\\\";u();Object.defineProperty($p,\\\"__esModule\\\",{value:!0});$p.createHex=$p.createBytes=$p.createBigInt=$p.createNumber=void 0;var Li=(a1(),mt(o1)),M3t=c0(),TMe=Cie(),Ej=a9(),IMe=(0,Li.union)([(0,Li.number)(),(0,Li.bigint)(),(0,Li.string)(),Ej.StrictHexStruct]),D3t=(0,Li.coerce)((0,Li.number)(),IMe,Number),L3t=(0,Li.coerce)((0,Li.bigint)(),IMe,BigInt),arn=(0,Li.union)([Ej.StrictHexStruct,(0,Li.instance)(Uint8Array)]),U3t=(0,Li.coerce)((0,Li.instance)(Uint8Array),(0,Li.union)([Ej.StrictHexStruct]),TMe.hexToBytes),F3t=(0,Li.coerce)(Ej.StrictHexStruct,(0,Li.instance)(Uint8Array),TMe.bytesToHex);function j3t(t){try{let e=(0,Li.create)(t,D3t);return(0,M3t.assert)(Number.isFinite(e),`Expected a number-like value, got \\\"${t}\\\".`),e}catch(e){throw e instanceof Li.StructError?new Error(`Expected a number-like value, got \\\"${t}\\\".`):e}}$p.createNumber=j3t;function H3t(t){try{return(0,Li.create)(t,L3t)}catch(e){throw e instanceof Li.StructError?new Error(`Expected a number-like value, got \\\"${String(e.value)}\\\".`):e}}$p.createBigInt=H3t;function q3t(t){if(typeof t==\\\"string\\\"&&t.toLowerCase()===\\\"0x\\\")return new Uint8Array;try{return(0,Li.create)(t,U3t)}catch(e){throw e instanceof Li.StructError?new Error(`Expected a bytes-like value, got \\\"${String(e.value)}\\\".`):e}}$p.createBytes=q3t;function z3t(t){if(t instanceof Uint8Array&&t.length===0||typeof t==\\\"string\\\"&&t.toLowerCase()===\\\"0x\\\")return\\\"0x\\\";try{return(0,Li.create)(t,F3t)}catch(e){throw e instanceof Li.StructError?new Error(`Expected a bytes-like value, got \\\"${String(e.value)}\\\".`):e}}$p.createHex=z3t});var OMe=q(Wp=>{\\\"use strict\\\";u();var PMe=Wp&&Wp.__classPrivateFieldSet||function(t,e,r,n,i){if(n===\\\"m\\\")throw new TypeError(\\\"Private method is not writable\\\");if(n===\\\"a\\\"&&!i)throw new TypeError(\\\"Private accessor was defined without a setter\\\");if(typeof e==\\\"function\\\"?t!==e||!i:!e.has(t))throw new TypeError(\\\"Cannot write private member to an object whose class did not declare it\\\");return n===\\\"a\\\"?i.call(t,r):i?i.value=r:e.set(t,r),r},ec=Wp&&Wp.__classPrivateFieldGet||function(t,e,r,n){if(r===\\\"a\\\"&&!n)throw new TypeError(\\\"Private accessor was defined without a getter\\\");if(typeof e==\\\"function\\\"?t!==e||!n:!e.has(t))throw new TypeError(\\\"Cannot read private member from an object whose class did not declare it\\\");return r===\\\"m\\\"?n:r===\\\"a\\\"?n.call(t):n?n.value:e.get(t)},uf,Vp;Object.defineProperty(Wp,\\\"__esModule\\\",{value:!0});Wp.FrozenSet=Wp.FrozenMap=void 0;var c9=class{constructor(e){uf.set(this,void 0),PMe(this,uf,new Map(e),\\\"f\\\"),Object.freeze(this)}get size(){return ec(this,uf,\\\"f\\\").size}[(uf=new WeakMap,Symbol.iterator)](){return ec(this,uf,\\\"f\\\")[Symbol.iterator]()}entries(){return ec(this,uf,\\\"f\\\").entries()}forEach(e,r){return ec(this,uf,\\\"f\\\").forEach((n,i,s)=>e.call(r,n,i,this))}get(e){return ec(this,uf,\\\"f\\\").get(e)}has(e){return ec(this,uf,\\\"f\\\").has(e)}keys(){return ec(this,uf,\\\"f\\\").keys()}values(){return ec(this,uf,\\\"f\\\").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(\\\", \\\")} `:\\\"\\\"}}`}};Wp.FrozenMap=c9;var l9=class{constructor(e){Vp.set(this,void 0),PMe(this,Vp,new Set(e),\\\"f\\\"),Object.freeze(this)}get size(){return ec(this,Vp,\\\"f\\\").size}[(Vp=new WeakMap,Symbol.iterator)](){return ec(this,Vp,\\\"f\\\")[Symbol.iterator]()}entries(){return ec(this,Vp,\\\"f\\\").entries()}forEach(e,r){return ec(this,Vp,\\\"f\\\").forEach((n,i,s)=>e.call(r,n,i,this))}has(e){return ec(this,Vp,\\\"f\\\").has(e)}keys(){return ec(this,Vp,\\\"f\\\").keys()}values(){return ec(this,Vp,\\\"f\\\").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(\\\", \\\")} `:\\\"\\\"}}`}};Wp.FrozenSet=l9;Object.freeze(c9);Object.freeze(c9.prototype);Object.freeze(l9);Object.freeze(l9.prototype)});var kMe=q(NMe=>{\\\"use strict\\\";u();Object.defineProperty(NMe,\\\"__esModule\\\",{value:!0})});var BMe=q(he=>{\\\"use strict\\\";u();Object.defineProperty(he,\\\"__esModule\\\",{value:!0});he.getJsonRpcIdValidator=he.assertIsJsonRpcError=he.isJsonRpcError=he.assertIsJsonRpcFailure=he.isJsonRpcFailure=he.assertIsJsonRpcSuccess=he.isJsonRpcSuccess=he.assertIsJsonRpcResponse=he.isJsonRpcResponse=he.assertIsPendingJsonRpcResponse=he.isPendingJsonRpcResponse=he.JsonRpcResponseStruct=he.JsonRpcFailureStruct=he.JsonRpcSuccessStruct=he.PendingJsonRpcResponseStruct=he.assertIsJsonRpcRequest=he.isJsonRpcRequest=he.assertIsJsonRpcNotification=he.isJsonRpcNotification=he.JsonRpcNotificationStruct=he.JsonRpcRequestStruct=he.JsonRpcParamsStruct=he.JsonRpcErrorStruct=he.JsonRpcIdStruct=he.JsonRpcVersionStruct=he.jsonrpc2=he.getJsonSize=he.isValidJson=he.JsonStruct=he.UnsafeJsonStruct=void 0;var dt=(a1(),mt(o1)),c1=c0(),$3t=()=>(0,dt.define)(\\\"finite number\\\",t=>(0,dt.is)(t,(0,dt.number)())&&Number.isFinite(t));he.UnsafeJsonStruct=(0,dt.union)([(0,dt.literal)(null),(0,dt.boolean)(),$3t(),(0,dt.string)(),(0,dt.array)((0,dt.lazy)(()=>he.UnsafeJsonStruct)),(0,dt.record)((0,dt.string)(),(0,dt.lazy)(()=>he.UnsafeJsonStruct))]);he.JsonStruct=(0,dt.define)(\\\"Json\\\",(t,e)=>{function r(n,i){let o=[...i.validator(n,e)];return o.length>0?o:!0}try{let n=r(t,he.UnsafeJsonStruct);return n!==!0?n:r(JSON.parse(JSON.stringify(t)),he.UnsafeJsonStruct)}catch(n){return n instanceof RangeError?\\\"Circular reference detected\\\":!1}});function V3t(t){return(0,dt.is)(t,he.JsonStruct)}he.isValidJson=V3t;function W3t(t){(0,c1.assertStruct)(t,he.JsonStruct,\\\"Invalid JSON value\\\");let e=JSON.stringify(t);return new TextEncoder().encode(e).byteLength}he.getJsonSize=W3t;he.jsonrpc2=\\\"2.0\\\";he.JsonRpcVersionStruct=(0,dt.literal)(he.jsonrpc2);he.JsonRpcIdStruct=(0,dt.nullable)((0,dt.union)([(0,dt.number)(),(0,dt.string)()]));he.JsonRpcErrorStruct=(0,dt.object)({code:(0,dt.integer)(),message:(0,dt.string)(),data:(0,dt.optional)(he.JsonStruct),stack:(0,dt.optional)((0,dt.string)())});he.JsonRpcParamsStruct=(0,dt.optional)((0,dt.union)([(0,dt.record)((0,dt.string)(),he.JsonStruct),(0,dt.array)(he.JsonStruct)]));he.JsonRpcRequestStruct=(0,dt.object)({id:he.JsonRpcIdStruct,jsonrpc:he.JsonRpcVersionStruct,method:(0,dt.string)(),params:he.JsonRpcParamsStruct});he.JsonRpcNotificationStruct=(0,dt.omit)(he.JsonRpcRequestStruct,[\\\"id\\\"]);function G3t(t){return(0,dt.is)(t,he.JsonRpcNotificationStruct)}he.isJsonRpcNotification=G3t;function K3t(t,e){(0,c1.assertStruct)(t,he.JsonRpcNotificationStruct,\\\"Invalid JSON-RPC notification\\\",e)}he.assertIsJsonRpcNotification=K3t;function Z3t(t){return(0,dt.is)(t,he.JsonRpcRequestStruct)}he.isJsonRpcRequest=Z3t;function Q3t(t,e){(0,c1.assertStruct)(t,he.JsonRpcRequestStruct,\\\"Invalid JSON-RPC request\\\",e)}he.assertIsJsonRpcRequest=Q3t;he.PendingJsonRpcResponseStruct=(0,dt.object)({id:he.JsonRpcIdStruct,jsonrpc:he.JsonRpcVersionStruct,result:(0,dt.optional)((0,dt.unknown)()),error:(0,dt.optional)(he.JsonRpcErrorStruct)});he.JsonRpcSuccessStruct=(0,dt.object)({id:he.JsonRpcIdStruct,jsonrpc:he.JsonRpcVersionStruct,result:he.JsonStruct});he.JsonRpcFailureStruct=(0,dt.object)({id:he.JsonRpcIdStruct,jsonrpc:he.JsonRpcVersionStruct,error:he.JsonRpcErrorStruct});he.JsonRpcResponseStruct=(0,dt.union)([he.JsonRpcSuccessStruct,he.JsonRpcFailureStruct]);function J3t(t){return(0,dt.is)(t,he.PendingJsonRpcResponseStruct)}he.isPendingJsonRpcResponse=J3t;function Y3t(t,e){(0,c1.assertStruct)(t,he.PendingJsonRpcResponseStruct,\\\"Invalid pending JSON-RPC response\\\",e)}he.assertIsPendingJsonRpcResponse=Y3t;function X3t(t){return(0,dt.is)(t,he.JsonRpcResponseStruct)}he.isJsonRpcResponse=X3t;function e_t(t,e){(0,c1.assertStruct)(t,he.JsonRpcResponseStruct,\\\"Invalid JSON-RPC response\\\",e)}he.assertIsJsonRpcResponse=e_t;function t_t(t){return(0,dt.is)(t,he.JsonRpcSuccessStruct)}he.isJsonRpcSuccess=t_t;function r_t(t,e){(0,c1.assertStruct)(t,he.JsonRpcSuccessStruct,\\\"Invalid JSON-RPC success response\\\",e)}he.assertIsJsonRpcSuccess=r_t;function n_t(t){return(0,dt.is)(t,he.JsonRpcFailureStruct)}he.isJsonRpcFailure=n_t;function i_t(t,e){(0,c1.assertStruct)(t,he.JsonRpcFailureStruct,\\\"Invalid JSON-RPC failure response\\\",e)}he.assertIsJsonRpcFailure=i_t;function s_t(t){return(0,dt.is)(t,he.JsonRpcErrorStruct)}he.isJsonRpcError=s_t;function o_t(t,e){(0,c1.assertStruct)(t,he.JsonRpcErrorStruct,\\\"Invalid JSON-RPC error\\\",e)}he.assertIsJsonRpcError=o_t;function a_t(t){let{permitEmptyString:e,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},t);return s=>!!(typeof s==\\\"number\\\"&&(r||Number.isInteger(s))||typeof s==\\\"string\\\"&&(e||s.length>0)||n&&s===null)}he.getJsonRpcIdValidator=a_t});var DMe=q(MMe=>{\\\"use strict\\\";u();Object.defineProperty(MMe,\\\"__esModule\\\",{value:!0})});var UMe=q((brn,LMe)=>{u();var V_=1e3,W_=V_*60,G_=W_*60,c2=G_*24,c_t=c2*7,l_t=c2*365.25;LMe.exports=function(t,e){e=e||{};var r=typeof t;if(r===\\\"string\\\"&&t.length>0)return u_t(t);if(r===\\\"number\\\"&&isFinite(t))return e.long?f_t(t):d_t(t);throw new Error(\\\"val is not a non-empty string or a valid number. val=\\\"+JSON.stringify(t))};function u_t(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\\\\d+)?\\\\.?\\\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||\\\"ms\\\").toLowerCase();switch(n){case\\\"years\\\":case\\\"year\\\":case\\\"yrs\\\":case\\\"yr\\\":case\\\"y\\\":return r*l_t;case\\\"weeks\\\":case\\\"week\\\":case\\\"w\\\":return r*c_t;case\\\"days\\\":case\\\"day\\\":case\\\"d\\\":return r*c2;case\\\"hours\\\":case\\\"hour\\\":case\\\"hrs\\\":case\\\"hr\\\":case\\\"h\\\":return r*G_;case\\\"minutes\\\":case\\\"minute\\\":case\\\"mins\\\":case\\\"min\\\":case\\\"m\\\":return r*W_;case\\\"seconds\\\":case\\\"second\\\":case\\\"secs\\\":case\\\"sec\\\":case\\\"s\\\":return r*V_;case\\\"milliseconds\\\":case\\\"millisecond\\\":case\\\"msecs\\\":case\\\"msec\\\":case\\\"ms\\\":return r;default:return}}}}function d_t(t){var e=Math.abs(t);return e>=c2?Math.round(t/c2)+\\\"d\\\":e>=G_?Math.round(t/G_)+\\\"h\\\":e>=W_?Math.round(t/W_)+\\\"m\\\":e>=V_?Math.round(t/V_)+\\\"s\\\":t+\\\"ms\\\"}function f_t(t){var e=Math.abs(t);return e>=c2?_j(t,e,c2,\\\"day\\\"):e>=G_?_j(t,e,G_,\\\"hour\\\"):e>=W_?_j(t,e,W_,\\\"minute\\\"):e>=V_?_j(t,e,V_,\\\"second\\\"):t+\\\" ms\\\"}function _j(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+\\\" \\\"+n+(i?\\\"s\\\":\\\"\\\")}});var jMe=q((vrn,FMe)=>{u();function p_t(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=UMe(),r.destroy=l,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let f=0;for(let p=0;p<d.length;p++)f=(f<<5)-f+d.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=e;function r(d){let f,p=null,h,m;function g(...w){if(!g.enabled)return;let v=g,b=Number(new Date),_=b-(f||b);v.diff=_,v.prev=f,v.curr=b,f=b,w[0]=r.coerce(w[0]),typeof w[0]!=\\\"string\\\"&&w.unshift(\\\"%O\\\");let S=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N===\\\"%%\\\")return\\\"%\\\";S++;let L=r.formatters[O];if(typeof L==\\\"function\\\"){let B=w[S];N=L.call(v,B),w.splice(S,1),S--}return N}),r.formatArgs.call(v,w),(v.log||r.log).apply(v,w)}return g.namespace=d,g.useColors=r.useColors(),g.color=r.selectColor(d),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,\\\"enabled\\\",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(d)),m),set:w=>{p=w}}),typeof r.init==\\\"function\\\"&&r.init(g),g}function n(d,f){let p=r(this.namespace+(typeof f>\\\"u\\\"?\\\":\\\":f)+d);return p.log=this.log,p}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let f=(typeof d==\\\"string\\\"?d:\\\"\\\").trim().replace(/\\\\s+/g,\\\",\\\").split(\\\",\\\").filter(Boolean);for(let p of f)p[0]===\\\"-\\\"?r.skips.push(p.slice(1)):r.names.push(p)}function s(d,f){let p=0,h=0,m=-1,g=0;for(;p<d.length;)if(h<f.length&&(f[h]===d[p]||f[h]===\\\"*\\\"))f[h]===\\\"*\\\"?(m=h,g=p,h++):(p++,h++);else if(m!==-1)h=m+1,g++,p=g;else return!1;for(;h<f.length&&f[h]===\\\"*\\\";)h++;return h===f.length}function o(){let d=[...r.names,...r.skips.map(f=>\\\"-\\\"+f)].join(\\\",\\\");return r.enable(\\\"\\\"),d}function a(d){for(let f of r.skips)if(s(d,f))return!1;for(let f of r.names)if(s(d,f))return!0;return!1}function c(d){return d instanceof Error?d.stack||d.message:d}function l(){console.warn(\\\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\\\")}return r.enable(r.load()),r}FMe.exports=p_t});var HMe=q((Hc,Cj)=>{u();Hc.formatArgs=m_t;Hc.save=g_t;Hc.load=y_t;Hc.useColors=h_t;Hc.storage=b_t();Hc.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn(\\\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\\\"))}})();Hc.colors=[\\\"#0000CC\\\",\\\"#0000FF\\\",\\\"#0033CC\\\",\\\"#0033FF\\\",\\\"#0066CC\\\",\\\"#0066FF\\\",\\\"#0099CC\\\",\\\"#0099FF\\\",\\\"#00CC00\\\",\\\"#00CC33\\\",\\\"#00CC66\\\",\\\"#00CC99\\\",\\\"#00CCCC\\\",\\\"#00CCFF\\\",\\\"#3300CC\\\",\\\"#3300FF\\\",\\\"#3333CC\\\",\\\"#3333FF\\\",\\\"#3366CC\\\",\\\"#3366FF\\\",\\\"#3399CC\\\",\\\"#3399FF\\\",\\\"#33CC00\\\",\\\"#33CC33\\\",\\\"#33CC66\\\",\\\"#33CC99\\\",\\\"#33CCCC\\\",\\\"#33CCFF\\\",\\\"#6600CC\\\",\\\"#6600FF\\\",\\\"#6633CC\\\",\\\"#6633FF\\\",\\\"#66CC00\\\",\\\"#66CC33\\\",\\\"#9900CC\\\",\\\"#9900FF\\\",\\\"#9933CC\\\",\\\"#9933FF\\\",\\\"#99CC00\\\",\\\"#99CC33\\\",\\\"#CC0000\\\",\\\"#CC0033\\\",\\\"#CC0066\\\",\\\"#CC0099\\\",\\\"#CC00CC\\\",\\\"#CC00FF\\\",\\\"#CC3300\\\",\\\"#CC3333\\\",\\\"#CC3366\\\",\\\"#CC3399\\\",\\\"#CC33CC\\\",\\\"#CC33FF\\\",\\\"#CC6600\\\",\\\"#CC6633\\\",\\\"#CC9900\\\",\\\"#CC9933\\\",\\\"#CCCC00\\\",\\\"#CCCC33\\\",\\\"#FF0000\\\",\\\"#FF0033\\\",\\\"#FF0066\\\",\\\"#FF0099\\\",\\\"#FF00CC\\\",\\\"#FF00FF\\\",\\\"#FF3300\\\",\\\"#FF3333\\\",\\\"#FF3366\\\",\\\"#FF3399\\\",\\\"#FF33CC\\\",\\\"#FF33FF\\\",\\\"#FF6600\\\",\\\"#FF6633\\\",\\\"#FF9900\\\",\\\"#FF9933\\\",\\\"#FFCC00\\\",\\\"#FFCC33\\\"];function h_t(){if(typeof window<\\\"u\\\"&&window.process&&(window.process.type===\\\"renderer\\\"||window.process.__nwjs))return!0;if(typeof navigator<\\\"u\\\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\\\\/(\\\\d+)/))return!1;let t;return typeof document<\\\"u\\\"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<\\\"u\\\"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<\\\"u\\\"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\\\\/(\\\\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<\\\"u\\\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\\\\/(\\\\d+)/)}function m_t(t){if(t[0]=(this.useColors?\\\"%c\\\":\\\"\\\")+this.namespace+(this.useColors?\\\" %c\\\":\\\" \\\")+t[0]+(this.useColors?\\\"%c \\\":\\\" \\\")+\\\"+\\\"+Cj.exports.humanize(this.diff),!this.useColors)return;let e=\\\"color: \\\"+this.color;t.splice(1,0,e,\\\"color: inherit\\\");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!==\\\"%%\\\"&&(r++,i===\\\"%c\\\"&&(n=r))}),t.splice(n,0,e)}Hc.log=console.debug||console.log||(()=>{});function g_t(t){try{t?Hc.storage.setItem(\\\"debug\\\",t):Hc.storage.removeItem(\\\"debug\\\")}catch{}}function y_t(){let t;try{t=Hc.storage.getItem(\\\"debug\\\")||Hc.storage.getItem(\\\"DEBUG\\\")}catch{}return!t&&typeof process<\\\"u\\\"&&\\\"env\\\"in process&&(t=process.env.DEBUG),t}function b_t(){try{return localStorage}catch{}}Cj.exports=jMe()(Hc);var{formatters:w_t}=Cj.exports;w_t.j=function(t){try{return JSON.stringify(t)}catch(e){return\\\"[UnexpectedJSONParseError]: \\\"+e.message}}});var qMe=q(l1=>{\\\"use strict\\\";u();var v_t=l1&&l1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l1,\\\"__esModule\\\",{value:!0});l1.createModuleLogger=l1.createProjectLogger=void 0;var x_t=v_t(HMe()),E_t=(0,x_t.default)(\\\"metamask\\\");function __t(t){return E_t.extend(t)}l1.createProjectLogger=__t;function C_t(t,e){return t.extend(e)}l1.createModuleLogger=C_t});var $Me=q(Ai=>{\\\"use strict\\\";u();Object.defineProperty(Ai,\\\"__esModule\\\",{value:!0});Ai.calculateNumberSize=Ai.calculateStringSize=Ai.isASCII=Ai.isPlainObject=Ai.ESCAPE_CHARACTERS_REGEXP=Ai.JsonSize=Ai.hasProperty=Ai.isObject=Ai.isNullOrUndefined=Ai.isNonEmptyArray=void 0;function S_t(t){return Array.isArray(t)&&t.length>0}Ai.isNonEmptyArray=S_t;function A_t(t){return t==null}Ai.isNullOrUndefined=A_t;function T_t(t){return!!t&&typeof t==\\\"object\\\"&&!Array.isArray(t)}Ai.isObject=T_t;var I_t=(t,e)=>Object.hasOwnProperty.call(t,e);Ai.hasProperty=I_t;var R_t;(function(t){t[t.Null=4]=\\\"Null\\\",t[t.Comma=1]=\\\"Comma\\\",t[t.Wrapper=1]=\\\"Wrapper\\\",t[t.True=4]=\\\"True\\\",t[t.False=5]=\\\"False\\\",t[t.Quote=1]=\\\"Quote\\\",t[t.Colon=1]=\\\"Colon\\\",t[t.Date=24]=\\\"Date\\\"})(R_t=Ai.JsonSize||(Ai.JsonSize={}));Ai.ESCAPE_CHARACTERS_REGEXP=/\\\"|\\\\\\\\|\\\\n|\\\\r|\\\\t/gu;function P_t(t){if(typeof t!=\\\"object\\\"||t===null)return!1;try{let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch{return!1}}Ai.isPlainObject=P_t;function zMe(t){return t.charCodeAt(0)<=127}Ai.isASCII=zMe;function O_t(t){var e;return t.split(\\\"\\\").reduce((n,i)=>zMe(i)?n+1:n+2,0)+((e=t.match(Ai.ESCAPE_CHARACTERS_REGEXP))!==null&&e!==void 0?e:[]).length}Ai.calculateStringSize=O_t;function N_t(t){return t.toString().length}Ai.calculateNumberSize=N_t});var VMe=q(Gp=>{\\\"use strict\\\";u();Object.defineProperty(Gp,\\\"__esModule\\\",{value:!0});Gp.hexToBigInt=Gp.hexToNumber=Gp.bigIntToHex=Gp.numberToHex=void 0;var K_=c0(),u9=a9(),k_t=t=>((0,K_.assert)(typeof t==\\\"number\\\",\\\"Value must be a number.\\\"),(0,K_.assert)(t>=0,\\\"Value must be a non-negative number.\\\"),(0,K_.assert)(Number.isSafeInteger(t),\\\"Value is not a safe integer. Use `bigIntToHex` instead.\\\"),(0,u9.add0x)(t.toString(16)));Gp.numberToHex=k_t;var B_t=t=>((0,K_.assert)(typeof t==\\\"bigint\\\",\\\"Value must be a bigint.\\\"),(0,K_.assert)(t>=0,\\\"Value must be a non-negative bigint.\\\"),(0,u9.add0x)(t.toString(16)));Gp.bigIntToHex=B_t;var M_t=t=>{(0,u9.assertIsHexString)(t);let e=parseInt(t,16);return(0,K_.assert)(Number.isSafeInteger(e),\\\"Value is not a safe integer. Use `hexToBigInt` instead.\\\"),e};Gp.hexToNumber=M_t;var D_t=t=>((0,u9.assertIsHexString)(t),BigInt((0,u9.add0x)(t)));Gp.hexToBigInt=D_t});var GMe=q(WMe=>{\\\"use strict\\\";u();Object.defineProperty(WMe,\\\"__esModule\\\",{value:!0})});var ZMe=q(l0=>{\\\"use strict\\\";u();Object.defineProperty(l0,\\\"__esModule\\\",{value:!0});l0.timeSince=l0.inMilliseconds=l0.Duration=void 0;var L_t;(function(t){t[t.Millisecond=1]=\\\"Millisecond\\\",t[t.Second=1e3]=\\\"Second\\\",t[t.Minute=6e4]=\\\"Minute\\\",t[t.Hour=36e5]=\\\"Hour\\\",t[t.Day=864e5]=\\\"Day\\\",t[t.Week=6048e5]=\\\"Week\\\",t[t.Year=31536e6]=\\\"Year\\\"})(L_t=l0.Duration||(l0.Duration={}));var U_t=t=>Number.isInteger(t)&&t>=0,KMe=(t,e)=>{if(!U_t(t))throw new Error(`\\\"${e}\\\" must be a non-negative integer. Received: \\\"${t}\\\".`)};function F_t(t,e){return KMe(t,\\\"count\\\"),t*e}l0.inMilliseconds=F_t;function j_t(t){return KMe(t,\\\"timestamp\\\"),Date.now()-t}l0.timeSince=j_t});var JMe=q(QMe=>{\\\"use strict\\\";u();Object.defineProperty(QMe,\\\"__esModule\\\",{value:!0})});var d9=q((Mrn,YMe)=>{\\\"use strict\\\";u();var H_t=\\\"2.0.0\\\",q_t=Number.MAX_SAFE_INTEGER||9007199254740991,z_t=16,$_t=250,V_t=[\\\"major\\\",\\\"premajor\\\",\\\"minor\\\",\\\"preminor\\\",\\\"patch\\\",\\\"prepatch\\\",\\\"prerelease\\\"];YMe.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:z_t,MAX_SAFE_BUILD_LENGTH:$_t,MAX_SAFE_INTEGER:q_t,RELEASE_TYPES:V_t,SEMVER_SPEC_VERSION:H_t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var f9=q((Lrn,XMe)=>{\\\"use strict\\\";u();var W_t=typeof process==\\\"object\\\"&&process.env&&process.env.NODE_DEBUG&&/\\\\bsemver\\\\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error(\\\"SEMVER\\\",...t):()=>{};XMe.exports=W_t});var Z_=q((Kp,eDe)=>{\\\"use strict\\\";u();var{MAX_SAFE_COMPONENT_LENGTH:Sie,MAX_SAFE_BUILD_LENGTH:G_t,MAX_LENGTH:K_t}=d9(),Z_t=f9();Kp=eDe.exports={};var Q_t=Kp.re=[],J_t=Kp.safeRe=[],De=Kp.src=[],Y_t=Kp.safeSrc=[],Le=Kp.t={},X_t=0,Aie=\\\"[a-zA-Z0-9-]\\\",eCt=[[\\\"\\\\\\\\s\\\",1],[\\\"\\\\\\\\d\\\",K_t],[Aie,G_t]],tCt=t=>{for(let[e,r]of eCt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},_t=(t,e,r)=>{let n=tCt(e),i=X_t++;Z_t(t,i,e),Le[t]=i,De[i]=e,Y_t[i]=n,Q_t[i]=new RegExp(e,r?\\\"g\\\":void 0),J_t[i]=new RegExp(n,r?\\\"g\\\":void 0)};_t(\\\"NUMERICIDENTIFIER\\\",\\\"0|[1-9]\\\\\\\\d*\\\");_t(\\\"NUMERICIDENTIFIERLOOSE\\\",\\\"\\\\\\\\d+\\\");_t(\\\"NONNUMERICIDENTIFIER\\\",`\\\\\\\\d*[a-zA-Z-]${Aie}*`);_t(\\\"MAINVERSION\\\",`(${De[Le.NUMERICIDENTIFIER]})\\\\\\\\.(${De[Le.NUMERICIDENTIFIER]})\\\\\\\\.(${De[Le.NUMERICIDENTIFIER]})`);_t(\\\"MAINVERSIONLOOSE\\\",`(${De[Le.NUMERICIDENTIFIERLOOSE]})\\\\\\\\.(${De[Le.NUMERICIDENTIFIERLOOSE]})\\\\\\\\.(${De[Le.NUMERICIDENTIFIERLOOSE]})`);_t(\\\"PRERELEASEIDENTIFIER\\\",`(?:${De[Le.NONNUMERICIDENTIFIER]}|${De[Le.NUMERICIDENTIFIER]})`);_t(\\\"PRERELEASEIDENTIFIERLOOSE\\\",`(?:${De[Le.NONNUMERICIDENTIFIER]}|${De[Le.NUMERICIDENTIFIERLOOSE]})`);_t(\\\"PRERELEASE\\\",`(?:-(${De[Le.PRERELEASEIDENTIFIER]}(?:\\\\\\\\.${De[Le.PRERELEASEIDENTIFIER]})*))`);_t(\\\"PRERELEASELOOSE\\\",`(?:-?(${De[Le.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\\\\\.${De[Le.PRERELEASEIDENTIFIERLOOSE]})*))`);_t(\\\"BUILDIDENTIFIER\\\",`${Aie}+`);_t(\\\"BUILD\\\",`(?:\\\\\\\\+(${De[Le.BUILDIDENTIFIER]}(?:\\\\\\\\.${De[Le.BUILDIDENTIFIER]})*))`);_t(\\\"FULLPLAIN\\\",`v?${De[Le.MAINVERSION]}${De[Le.PRERELEASE]}?${De[Le.BUILD]}?`);_t(\\\"FULL\\\",`^${De[Le.FULLPLAIN]}$`);_t(\\\"LOOSEPLAIN\\\",`[v=\\\\\\\\s]*${De[Le.MAINVERSIONLOOSE]}${De[Le.PRERELEASELOOSE]}?${De[Le.BUILD]}?`);_t(\\\"LOOSE\\\",`^${De[Le.LOOSEPLAIN]}$`);_t(\\\"GTLT\\\",\\\"((?:<|>)?=?)\\\");_t(\\\"XRANGEIDENTIFIERLOOSE\\\",`${De[Le.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\\\\\*`);_t(\\\"XRANGEIDENTIFIER\\\",`${De[Le.NUMERICIDENTIFIER]}|x|X|\\\\\\\\*`);_t(\\\"XRANGEPLAIN\\\",`[v=\\\\\\\\s]*(${De[Le.XRANGEIDENTIFIER]})(?:\\\\\\\\.(${De[Le.XRANGEIDENTIFIER]})(?:\\\\\\\\.(${De[Le.XRANGEIDENTIFIER]})(?:${De[Le.PRERELEASE]})?${De[Le.BUILD]}?)?)?`);_t(\\\"XRANGEPLAINLOOSE\\\",`[v=\\\\\\\\s]*(${De[Le.XRANGEIDENTIFIERLOOSE]})(?:\\\\\\\\.(${De[Le.XRANGEIDENTIFIERLOOSE]})(?:\\\\\\\\.(${De[Le.XRANGEIDENTIFIERLOOSE]})(?:${De[Le.PRERELEASELOOSE]})?${De[Le.BUILD]}?)?)?`);_t(\\\"XRANGE\\\",`^${De[Le.GTLT]}\\\\\\\\s*${De[Le.XRANGEPLAIN]}$`);_t(\\\"XRANGELOOSE\\\",`^${De[Le.GTLT]}\\\\\\\\s*${De[Le.XRANGEPLAINLOOSE]}$`);_t(\\\"COERCEPLAIN\\\",`(^|[^\\\\\\\\d])(\\\\\\\\d{1,${Sie}})(?:\\\\\\\\.(\\\\\\\\d{1,${Sie}}))?(?:\\\\\\\\.(\\\\\\\\d{1,${Sie}}))?`);_t(\\\"COERCE\\\",`${De[Le.COERCEPLAIN]}(?:$|[^\\\\\\\\d])`);_t(\\\"COERCEFULL\\\",De[Le.COERCEPLAIN]+`(?:${De[Le.PRERELEASE]})?(?:${De[Le.BUILD]})?(?:$|[^\\\\\\\\d])`);_t(\\\"COERCERTL\\\",De[Le.COERCE],!0);_t(\\\"COERCERTLFULL\\\",De[Le.COERCEFULL],!0);_t(\\\"LONETILDE\\\",\\\"(?:~>?)\\\");_t(\\\"TILDETRIM\\\",`(\\\\\\\\s*)${De[Le.LONETILDE]}\\\\\\\\s+`,!0);Kp.tildeTrimReplace=\\\"$1~\\\";_t(\\\"TILDE\\\",`^${De[Le.LONETILDE]}${De[Le.XRANGEPLAIN]}$`);_t(\\\"TILDELOOSE\\\",`^${De[Le.LONETILDE]}${De[Le.XRANGEPLAINLOOSE]}$`);_t(\\\"LONECARET\\\",\\\"(?:\\\\\\\\^)\\\");_t(\\\"CARETTRIM\\\",`(\\\\\\\\s*)${De[Le.LONECARET]}\\\\\\\\s+`,!0);Kp.caretTrimReplace=\\\"$1^\\\";_t(\\\"CARET\\\",`^${De[Le.LONECARET]}${De[Le.XRANGEPLAIN]}$`);_t(\\\"CARETLOOSE\\\",`^${De[Le.LONECARET]}${De[Le.XRANGEPLAINLOOSE]}$`);_t(\\\"COMPARATORLOOSE\\\",`^${De[Le.GTLT]}\\\\\\\\s*(${De[Le.LOOSEPLAIN]})$|^$`);_t(\\\"COMPARATOR\\\",`^${De[Le.GTLT]}\\\\\\\\s*(${De[Le.FULLPLAIN]})$|^$`);_t(\\\"COMPARATORTRIM\\\",`(\\\\\\\\s*)${De[Le.GTLT]}\\\\\\\\s*(${De[Le.LOOSEPLAIN]}|${De[Le.XRANGEPLAIN]})`,!0);Kp.comparatorTrimReplace=\\\"$1$2$3\\\";_t(\\\"HYPHENRANGE\\\",`^\\\\\\\\s*(${De[Le.XRANGEPLAIN]})\\\\\\\\s+-\\\\\\\\s+(${De[Le.XRANGEPLAIN]})\\\\\\\\s*$`);_t(\\\"HYPHENRANGELOOSE\\\",`^\\\\\\\\s*(${De[Le.XRANGEPLAINLOOSE]})\\\\\\\\s+-\\\\\\\\s+(${De[Le.XRANGEPLAINLOOSE]})\\\\\\\\s*$`);_t(\\\"STAR\\\",\\\"(<|>)?=?\\\\\\\\s*\\\\\\\\*\\\");_t(\\\"GTE0\\\",\\\"^\\\\\\\\s*>=\\\\\\\\s*0\\\\\\\\.0\\\\\\\\.0\\\\\\\\s*$\\\");_t(\\\"GTE0PRE\\\",\\\"^\\\\\\\\s*>=\\\\\\\\s*0\\\\\\\\.0\\\\\\\\.0-0\\\\\\\\s*$\\\")});var Sj=q((jrn,tDe)=>{\\\"use strict\\\";u();var rCt=Object.freeze({loose:!0}),nCt=Object.freeze({}),iCt=t=>t?typeof t!=\\\"object\\\"?rCt:t:nCt;tDe.exports=iCt});var Tie=q((qrn,iDe)=>{\\\"use strict\\\";u();var rDe=/^[0-9]+$/,nDe=(t,e)=>{if(typeof t==\\\"number\\\"&&typeof e==\\\"number\\\")return t===e?0:t<e?-1:1;let r=rDe.test(t),n=rDe.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},sCt=(t,e)=>nDe(e,t);iDe.exports={compareIdentifiers:nDe,rcompareIdentifiers:sCt}});var Aa=q(($rn,oDe)=>{\\\"use strict\\\";u();var Aj=f9(),{MAX_LENGTH:sDe,MAX_SAFE_INTEGER:Tj}=d9(),{safeRe:Ij,t:Rj}=Z_(),oCt=Sj(),{compareIdentifiers:Iie}=Tie(),Rie=class t{constructor(e,r){if(r=oCt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!=\\\"string\\\")throw new TypeError(`Invalid version. Must be a string. Got type \\\"${typeof e}\\\".`);if(e.length>sDe)throw new TypeError(`version is longer than ${sDe} characters`);Aj(\\\"SemVer\\\",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Ij[Rj.LOOSE]:Ij[Rj.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Tj||this.major<0)throw new TypeError(\\\"Invalid major version\\\");if(this.minor>Tj||this.minor<0)throw new TypeError(\\\"Invalid minor version\\\");if(this.patch>Tj||this.patch<0)throw new TypeError(\\\"Invalid patch version\\\");n[4]?this.prerelease=n[4].split(\\\".\\\").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<Tj)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split(\\\".\\\"):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(\\\".\\\")}`),this.version}toString(){return this.version}compare(e){if(Aj(\\\"SemVer.compare\\\",this.version,this.options,e),!(e instanceof t)){if(typeof e==\\\"string\\\"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(Aj(\\\"prerelease compare\\\",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Iie(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(Aj(\\\"build compare\\\",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Iie(n,i)}while(++r)}inc(e,r,n){if(e.startsWith(\\\"pre\\\")){if(!r&&n===!1)throw new Error(\\\"invalid increment argument: identifier is empty\\\");if(r){let i=`-${r}`.match(this.options.loose?Ij[Rj.PRERELEASELOOSE]:Ij[Rj.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case\\\"premajor\\\":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(\\\"pre\\\",r,n);break;case\\\"preminor\\\":this.prerelease.length=0,this.patch=0,this.minor++,this.inc(\\\"pre\\\",r,n);break;case\\\"prepatch\\\":this.prerelease.length=0,this.inc(\\\"patch\\\",r,n),this.inc(\\\"pre\\\",r,n);break;case\\\"prerelease\\\":this.prerelease.length===0&&this.inc(\\\"patch\\\",r,n),this.inc(\\\"pre\\\",r,n);break;case\\\"release\\\":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case\\\"major\\\":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case\\\"minor\\\":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case\\\"patch\\\":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case\\\"pre\\\":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]==\\\"number\\\"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(\\\".\\\")&&n===!1)throw new Error(\\\"invalid increment argument: identifier already exists\\\");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Iie(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(\\\".\\\")}`),this}};oDe.exports=Rie});var l2=q((Wrn,cDe)=>{\\\"use strict\\\";u();var aDe=Aa(),aCt=(t,e,r=!1)=>{if(t instanceof aDe)return t;try{return new aDe(t,e)}catch(n){if(!r)return null;throw n}};cDe.exports=aCt});var uDe=q((Krn,lDe)=>{\\\"use strict\\\";u();var cCt=l2(),lCt=(t,e)=>{let r=cCt(t,e);return r?r.version:null};lDe.exports=lCt});var fDe=q((Qrn,dDe)=>{\\\"use strict\\\";u();var uCt=l2(),dCt=(t,e)=>{let r=uCt(t.trim().replace(/^[=v]+/,\\\"\\\"),e);return r?r.version:null};dDe.exports=dCt});var mDe=q((Yrn,hDe)=>{\\\"use strict\\\";u();var pDe=Aa(),fCt=(t,e,r,n,i)=>{typeof r==\\\"string\\\"&&(i=n,n=r,r=void 0);try{return new pDe(t instanceof pDe?t.version:t,r).inc(e,n,i).version}catch{return null}};hDe.exports=fCt});var bDe=q((enn,yDe)=>{\\\"use strict\\\";u();var gDe=l2(),pCt=(t,e)=>{let r=gDe(t,null,!0),n=gDe(e,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return\\\"major\\\";if(a.compareMain(o)===0)return a.minor&&!a.patch?\\\"minor\\\":\\\"patch\\\"}let d=c?\\\"pre\\\":\\\"\\\";return r.major!==n.major?d+\\\"major\\\":r.minor!==n.minor?d+\\\"minor\\\":r.patch!==n.patch?d+\\\"patch\\\":\\\"prerelease\\\"};yDe.exports=pCt});var vDe=q((rnn,wDe)=>{\\\"use strict\\\";u();var hCt=Aa(),mCt=(t,e)=>new hCt(t,e).major;wDe.exports=mCt});var EDe=q((inn,xDe)=>{\\\"use strict\\\";u();var gCt=Aa(),yCt=(t,e)=>new gCt(t,e).minor;xDe.exports=yCt});var CDe=q((onn,_De)=>{\\\"use strict\\\";u();var bCt=Aa(),wCt=(t,e)=>new bCt(t,e).patch;_De.exports=wCt});var ADe=q((cnn,SDe)=>{\\\"use strict\\\";u();var vCt=l2(),xCt=(t,e)=>{let r=vCt(t,e);return r&&r.prerelease.length?r.prerelease:null};SDe.exports=xCt});var Qu=q((unn,IDe)=>{\\\"use strict\\\";u();var TDe=Aa(),ECt=(t,e,r)=>new TDe(t,r).compare(new TDe(e,r));IDe.exports=ECt});var PDe=q((fnn,RDe)=>{\\\"use strict\\\";u();var _Ct=Qu(),CCt=(t,e,r)=>_Ct(e,t,r);RDe.exports=CCt});var NDe=q((hnn,ODe)=>{\\\"use strict\\\";u();var SCt=Qu(),ACt=(t,e)=>SCt(t,e,!0);ODe.exports=ACt});var Pj=q((gnn,BDe)=>{\\\"use strict\\\";u();var kDe=Aa(),TCt=(t,e,r)=>{let n=new kDe(t,r),i=new kDe(e,r);return n.compare(i)||n.compareBuild(i)};BDe.exports=TCt});var DDe=q((bnn,MDe)=>{\\\"use strict\\\";u();var ICt=Pj(),RCt=(t,e)=>t.sort((r,n)=>ICt(r,n,e));MDe.exports=RCt});var UDe=q((vnn,LDe)=>{\\\"use strict\\\";u();var PCt=Pj(),OCt=(t,e)=>t.sort((r,n)=>PCt(n,r,e));LDe.exports=OCt});var p9=q((Enn,FDe)=>{\\\"use strict\\\";u();var NCt=Qu(),kCt=(t,e,r)=>NCt(t,e,r)>0;FDe.exports=kCt});var Oj=q((Cnn,jDe)=>{\\\"use strict\\\";u();var BCt=Qu(),MCt=(t,e,r)=>BCt(t,e,r)<0;jDe.exports=MCt});var Pie=q((Ann,HDe)=>{\\\"use strict\\\";u();var DCt=Qu(),LCt=(t,e,r)=>DCt(t,e,r)===0;HDe.exports=LCt});var Oie=q((Inn,qDe)=>{\\\"use strict\\\";u();var UCt=Qu(),FCt=(t,e,r)=>UCt(t,e,r)!==0;qDe.exports=FCt});var Nj=q((Pnn,zDe)=>{\\\"use strict\\\";u();var jCt=Qu(),HCt=(t,e,r)=>jCt(t,e,r)>=0;zDe.exports=HCt});var kj=q((Nnn,$De)=>{\\\"use strict\\\";u();var qCt=Qu(),zCt=(t,e,r)=>qCt(t,e,r)<=0;$De.exports=zCt});var Nie=q((Bnn,VDe)=>{\\\"use strict\\\";u();var $Ct=Pie(),VCt=Oie(),WCt=p9(),GCt=Nj(),KCt=Oj(),ZCt=kj(),QCt=(t,e,r,n)=>{switch(e){case\\\"===\\\":return typeof t==\\\"object\\\"&&(t=t.version),typeof r==\\\"object\\\"&&(r=r.version),t===r;case\\\"!==\\\":return typeof t==\\\"object\\\"&&(t=t.version),typeof r==\\\"object\\\"&&(r=r.version),t!==r;case\\\"\\\":case\\\"=\\\":case\\\"==\\\":return $Ct(t,r,n);case\\\"!=\\\":return VCt(t,r,n);case\\\">\\\":return WCt(t,r,n);case\\\">=\\\":return GCt(t,r,n);case\\\"<\\\":return KCt(t,r,n);case\\\"<=\\\":return ZCt(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};VDe.exports=QCt});var GDe=q((Dnn,WDe)=>{\\\"use strict\\\";u();var JCt=Aa(),YCt=l2(),{safeRe:Bj,t:Mj}=Z_(),XCt=(t,e)=>{if(t instanceof JCt)return t;if(typeof t==\\\"number\\\"&&(t=String(t)),typeof t!=\\\"string\\\")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Bj[Mj.COERCEFULL]:Bj[Mj.COERCE]);else{let c=e.includePrerelease?Bj[Mj.COERCERTLFULL]:Bj[Mj.COERCERTL],l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||\\\"0\\\",s=r[4]||\\\"0\\\",o=e.includePrerelease&&r[5]?`-${r[5]}`:\\\"\\\",a=e.includePrerelease&&r[6]?`+${r[6]}`:\\\"\\\";return YCt(`${n}.${i}.${s}${o}${a}`,e)};WDe.exports=XCt});var ZDe=q((Unn,KDe)=>{\\\"use strict\\\";u();var kie=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};KDe.exports=kie});var Ju=q((jnn,XDe)=>{\\\"use strict\\\";u();var e4t=/\\\\s+/g,Bie=class t{constructor(e,r){if(r=r4t(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Mie)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(e4t,\\\" \\\"),this.set=this.raw.split(\\\"||\\\").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!JDe(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&l4t(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=\\\"\\\";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=\\\"||\\\");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=\\\" \\\"),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&a4t)|(this.options.loose&&c4t))+\\\":\\\"+e,i=QDe.get(n);if(i)return i;let s=this.options.loose,o=s?tc[Ta.HYPHENRANGELOOSE]:tc[Ta.HYPHENRANGE];e=e.replace(o,w4t(this.options.includePrerelease)),Gn(\\\"hyphen replace\\\",e),e=e.replace(tc[Ta.COMPARATORTRIM],i4t),Gn(\\\"comparator trim\\\",e),e=e.replace(tc[Ta.TILDETRIM],s4t),Gn(\\\"tilde trim\\\",e),e=e.replace(tc[Ta.CARETTRIM],o4t),Gn(\\\"caret trim\\\",e);let a=e.split(\\\" \\\").map(f=>u4t(f,this.options)).join(\\\" \\\").split(/\\\\s+/).map(f=>b4t(f,this.options));s&&(a=a.filter(f=>(Gn(\\\"loose invalid filter\\\",f,this.options),!!f.match(tc[Ta.COMPARATORLOOSE])))),Gn(\\\"range list\\\",a);let c=new Map,l=a.map(f=>new Mie(f,this.options));for(let f of l){if(JDe(f))return[f];c.set(f.value,f)}c.size>1&&c.has(\\\"\\\")&&c.delete(\\\"\\\");let d=[...c.values()];return QDe.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError(\\\"a Range is required\\\");return this.set.some(n=>YDe(n,r)&&e.set.some(i=>YDe(i,r)&&n.every(s=>i.every(o=>s.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e==\\\"string\\\")try{e=new n4t(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(v4t(this.set[r],e,this.options))return!0;return!1}};XDe.exports=Bie;var t4t=ZDe(),QDe=new t4t,r4t=Sj(),Mie=h9(),Gn=f9(),n4t=Aa(),{safeRe:tc,t:Ta,comparatorTrimReplace:i4t,tildeTrimReplace:s4t,caretTrimReplace:o4t}=Z_(),{FLAG_INCLUDE_PRERELEASE:a4t,FLAG_LOOSE:c4t}=d9(),JDe=t=>t.value===\\\"<0.0.0-0\\\",l4t=t=>t.value===\\\"\\\",YDe=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},u4t=(t,e)=>(t=t.replace(tc[Ta.BUILD],\\\"\\\"),Gn(\\\"comp\\\",t,e),t=p4t(t,e),Gn(\\\"caret\\\",t),t=d4t(t,e),Gn(\\\"tildes\\\",t),t=m4t(t,e),Gn(\\\"xrange\\\",t),t=y4t(t,e),Gn(\\\"stars\\\",t),t),rc=t=>!t||t.toLowerCase()===\\\"x\\\"||t===\\\"*\\\",d4t=(t,e)=>t.trim().split(/\\\\s+/).map(r=>f4t(r,e)).join(\\\" \\\"),f4t=(t,e)=>{let r=e.loose?tc[Ta.TILDELOOSE]:tc[Ta.TILDE];return t.replace(r,(n,i,s,o,a)=>{Gn(\\\"tilde\\\",t,n,i,s,o,a);let c;return rc(i)?c=\\\"\\\":rc(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:rc(o)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:a?(Gn(\\\"replaceTilde pr\\\",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`,Gn(\\\"tilde return\\\",c),c})},p4t=(t,e)=>t.trim().split(/\\\\s+/).map(r=>h4t(r,e)).join(\\\" \\\"),h4t=(t,e)=>{Gn(\\\"caret\\\",t,e);let r=e.loose?tc[Ta.CARETLOOSE]:tc[Ta.CARET],n=e.includePrerelease?\\\"-0\\\":\\\"\\\";return t.replace(r,(i,s,o,a,c)=>{Gn(\\\"caret\\\",t,i,s,o,a,c);let l;return rc(s)?l=\\\"\\\":rc(o)?l=`>=${s}.0.0${n} <${+s+1}.0.0-0`:rc(a)?s===\\\"0\\\"?l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:c?(Gn(\\\"replaceCaret pr\\\",c),s===\\\"0\\\"?o===\\\"0\\\"?l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(Gn(\\\"no pr\\\"),s===\\\"0\\\"?o===\\\"0\\\"?l=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`:l=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Gn(\\\"caret return\\\",l),l})},m4t=(t,e)=>(Gn(\\\"replaceXRanges\\\",t,e),t.split(/\\\\s+/).map(r=>g4t(r,e)).join(\\\" \\\")),g4t=(t,e)=>{t=t.trim();let r=e.loose?tc[Ta.XRANGELOOSE]:tc[Ta.XRANGE];return t.replace(r,(n,i,s,o,a,c)=>{Gn(\\\"xRange\\\",t,n,i,s,o,a,c);let l=rc(s),d=l||rc(o),f=d||rc(a),p=f;return i===\\\"=\\\"&&p&&(i=\\\"\\\"),c=e.includePrerelease?\\\"-0\\\":\\\"\\\",l?i===\\\">\\\"||i===\\\"<\\\"?n=\\\"<0.0.0-0\\\":n=\\\"*\\\":i&&p?(d&&(o=0),a=0,i===\\\">\\\"?(i=\\\">=\\\",d?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i===\\\"<=\\\"&&(i=\\\"<\\\",d?s=+s+1:o=+o+1),i===\\\"<\\\"&&(c=\\\"-0\\\"),n=`${i+s}.${o}.${a}${c}`):d?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:f&&(n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),Gn(\\\"xRange return\\\",n),n})},y4t=(t,e)=>(Gn(\\\"replaceStars\\\",t,e),t.trim().replace(tc[Ta.STAR],\\\"\\\")),b4t=(t,e)=>(Gn(\\\"replaceGTE0\\\",t,e),t.trim().replace(tc[e.includePrerelease?Ta.GTE0PRE:Ta.GTE0],\\\"\\\")),w4t=t=>(e,r,n,i,s,o,a,c,l,d,f,p)=>(rc(n)?r=\\\"\\\":rc(i)?r=`>=${n}.0.0${t?\\\"-0\\\":\\\"\\\"}`:rc(s)?r=`>=${n}.${i}.0${t?\\\"-0\\\":\\\"\\\"}`:o?r=`>=${r}`:r=`>=${r}${t?\\\"-0\\\":\\\"\\\"}`,rc(l)?c=\\\"\\\":rc(d)?c=`<${+l+1}.0.0-0`:rc(f)?c=`<${l}.${+d+1}.0-0`:p?c=`<=${l}.${d}.${f}-${p}`:t?c=`<${l}.${d}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),v4t=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Gn(t[n].semver),t[n].semver!==Mie.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var h9=q((qnn,sLe)=>{\\\"use strict\\\";u();var m9=Symbol(\\\"SemVer ANY\\\"),Uie=class t{static get ANY(){return m9}constructor(e,r){if(r=eLe(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\\\\s+/).join(\\\" \\\"),Lie(\\\"comparator\\\",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===m9?this.value=\\\"\\\":this.value=this.operator+this.semver.version,Lie(\\\"comp\\\",this)}parse(e){let r=this.options.loose?tLe[rLe.COMPARATORLOOSE]:tLe[rLe.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:\\\"\\\",this.operator===\\\"=\\\"&&(this.operator=\\\"\\\"),n[2]?this.semver=new nLe(n[2],this.options.loose):this.semver=m9}toString(){return this.value}test(e){if(Lie(\\\"Comparator.test\\\",e,this.options.loose),this.semver===m9||e===m9)return!0;if(typeof e==\\\"string\\\")try{e=new nLe(e,this.options)}catch{return!1}return Die(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError(\\\"a Comparator is required\\\");return this.operator===\\\"\\\"?this.value===\\\"\\\"?!0:new iLe(e.value,r).test(this.value):e.operator===\\\"\\\"?e.value===\\\"\\\"?!0:new iLe(this.value,r).test(e.semver):(r=eLe(r),r.includePrerelease&&(this.value===\\\"<0.0.0-0\\\"||e.value===\\\"<0.0.0-0\\\")||!r.includePrerelease&&(this.value.startsWith(\\\"<0.0.0\\\")||e.value.startsWith(\\\"<0.0.0\\\"))?!1:!!(this.operator.startsWith(\\\">\\\")&&e.operator.startsWith(\\\">\\\")||this.operator.startsWith(\\\"<\\\")&&e.operator.startsWith(\\\"<\\\")||this.semver.version===e.semver.version&&this.operator.includes(\\\"=\\\")&&e.operator.includes(\\\"=\\\")||Die(this.semver,\\\"<\\\",e.semver,r)&&this.operator.startsWith(\\\">\\\")&&e.operator.startsWith(\\\"<\\\")||Die(this.semver,\\\">\\\",e.semver,r)&&this.operator.startsWith(\\\"<\\\")&&e.operator.startsWith(\\\">\\\")))}};sLe.exports=Uie;var eLe=Sj(),{safeRe:tLe,t:rLe}=Z_(),Die=Nie(),Lie=f9(),nLe=Aa(),iLe=Ju()});var g9=q(($nn,oLe)=>{\\\"use strict\\\";u();var x4t=Ju(),E4t=(t,e,r)=>{try{e=new x4t(e,r)}catch{return!1}return e.test(t)};oLe.exports=E4t});var cLe=q((Wnn,aLe)=>{\\\"use strict\\\";u();var _4t=Ju(),C4t=(t,e)=>new _4t(t,e).set.map(r=>r.map(n=>n.value).join(\\\" \\\").trim().split(\\\" \\\"));aLe.exports=C4t});var uLe=q((Knn,lLe)=>{\\\"use strict\\\";u();var S4t=Aa(),A4t=Ju(),T4t=(t,e,r)=>{let n=null,i=null,s=null;try{s=new A4t(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new S4t(n,r))}),n};lLe.exports=T4t});var fLe=q((Qnn,dLe)=>{\\\"use strict\\\";u();var I4t=Aa(),R4t=Ju(),P4t=(t,e,r)=>{let n=null,i=null,s=null;try{s=new R4t(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new I4t(n,r))}),n};dLe.exports=P4t});var mLe=q((Ynn,hLe)=>{\\\"use strict\\\";u();var Fie=Aa(),O4t=Ju(),pLe=p9(),N4t=(t,e)=>{t=new O4t(t,e);let r=new Fie(\\\"0.0.0\\\");if(t.test(r)||(r=new Fie(\\\"0.0.0-0\\\"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],s=null;i.forEach(o=>{let a=new Fie(o.semver.version);switch(o.operator){case\\\">\\\":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case\\\"\\\":case\\\">=\\\":(!s||pLe(a,s))&&(s=a);break;case\\\"<\\\":case\\\"<=\\\":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||pLe(r,s))&&(r=s)}return r&&t.test(r)?r:null};hLe.exports=N4t});var yLe=q((ein,gLe)=>{\\\"use strict\\\";u();var k4t=Ju(),B4t=(t,e)=>{try{return new k4t(t,e).range||\\\"*\\\"}catch{return null}};gLe.exports=B4t});var Dj=q((rin,xLe)=>{\\\"use strict\\\";u();var M4t=Aa(),vLe=h9(),{ANY:D4t}=vLe,L4t=Ju(),U4t=g9(),bLe=p9(),wLe=Oj(),F4t=kj(),j4t=Nj(),H4t=(t,e,r,n)=>{t=new M4t(t,n),e=new L4t(e,n);let i,s,o,a,c;switch(r){case\\\">\\\":i=bLe,s=F4t,o=wLe,a=\\\">\\\",c=\\\">=\\\";break;case\\\"<\\\":i=wLe,s=j4t,o=bLe,a=\\\"<\\\",c=\\\"<=\\\";break;default:throw new TypeError('Must provide a hilo val of \\\"<\\\" or \\\">\\\"')}if(U4t(t,e,n))return!1;for(let l=0;l<e.set.length;++l){let d=e.set[l],f=null,p=null;if(d.forEach(h=>{h.semver===D4t&&(h=new vLe(\\\">=0.0.0\\\")),f=f||h,p=p||h,i(h.semver,f.semver,n)?f=h:o(h.semver,p.semver,n)&&(p=h)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&s(t,p.semver))return!1;if(p.operator===c&&o(t,p.semver))return!1}return!0};xLe.exports=H4t});var _Le=q((iin,ELe)=>{\\\"use strict\\\";u();var q4t=Dj(),z4t=(t,e,r)=>q4t(t,e,\\\">\\\",r);ELe.exports=z4t});var SLe=q((oin,CLe)=>{\\\"use strict\\\";u();var $4t=Dj(),V4t=(t,e,r)=>$4t(t,e,\\\"<\\\",r);CLe.exports=V4t});var ILe=q((cin,TLe)=>{\\\"use strict\\\";u();var ALe=Ju(),W4t=(t,e,r)=>(t=new ALe(t,r),e=new ALe(e,r),t.intersects(e,r));TLe.exports=W4t});var PLe=q((uin,RLe)=>{\\\"use strict\\\";u();var G4t=g9(),K4t=Qu();RLe.exports=(t,e,r)=>{let n=[],i=null,s=null,o=t.sort((d,f)=>K4t(d,f,r));for(let d of o)G4t(d,e,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[d,f]of n)d===f?a.push(d):!f&&d===o[0]?a.push(\\\"*\\\"):f?d===o[0]?a.push(`<=${f}`):a.push(`${d} - ${f}`):a.push(`>=${d}`);let c=a.join(\\\" || \\\"),l=typeof e.raw==\\\"string\\\"?e.raw:String(e);return c.length<l.length?c:e}});var DLe=q((fin,MLe)=>{\\\"use strict\\\";u();var OLe=Ju(),Hie=h9(),{ANY:jie}=Hie,y9=g9(),qie=Qu(),Z4t=(t,e,r={})=>{if(t===e)return!0;t=new OLe(t,r),e=new OLe(e,r);let n=!1;e:for(let i of t.set){for(let s of e.set){let o=J4t(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Q4t=[new Hie(\\\">=0.0.0-0\\\")],NLe=[new Hie(\\\">=0.0.0\\\")],J4t=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===jie){if(e.length===1&&e[0].semver===jie)return!0;r.includePrerelease?t=Q4t:t=NLe}if(e.length===1&&e[0].semver===jie){if(r.includePrerelease)return!0;e=NLe}let n=new Set,i,s;for(let h of t)h.operator===\\\">\\\"||h.operator===\\\">=\\\"?i=kLe(i,h,r):h.operator===\\\"<\\\"||h.operator===\\\"<=\\\"?s=BLe(s,h,r):n.add(h.semver);if(n.size>1)return null;let o;if(i&&s){if(o=qie(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==\\\">=\\\"||s.operator!==\\\"<=\\\"))return null}for(let h of n){if(i&&!y9(h,String(i),r)||s&&!y9(h,String(s),r))return null;for(let m of e)if(!y9(h,String(m),r))return!1;return!0}let a,c,l,d,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&s.operator===\\\"<\\\"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(d=d||h.operator===\\\">\\\"||h.operator===\\\">=\\\",l=l||h.operator===\\\"<\\\"||h.operator===\\\"<=\\\",i){if(p&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===p.major&&h.semver.minor===p.minor&&h.semver.patch===p.patch&&(p=!1),h.operator===\\\">\\\"||h.operator===\\\">=\\\"){if(a=kLe(i,h,r),a===h&&a!==i)return!1}else if(i.operator===\\\">=\\\"&&!y9(i.semver,String(h),r))return!1}if(s){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===\\\"<\\\"||h.operator===\\\"<=\\\"){if(c=BLe(s,h,r),c===h&&c!==s)return!1}else if(s.operator===\\\"<=\\\"&&!y9(s.semver,String(h),r))return!1}if(!h.operator&&(s||i)&&o!==0)return!1}return!(i&&l&&!s&&o!==0||s&&d&&!i&&o!==0||p||f)},kLe=(t,e,r)=>{if(!t)return e;let n=qie(t.semver,e.semver,r);return n>0?t:n<0||e.operator===\\\">\\\"&&t.operator===\\\">=\\\"?e:t},BLe=(t,e,r)=>{if(!t)return e;let n=qie(t.semver,e.semver,r);return n<0?t:n>0||e.operator===\\\"<\\\"&&t.operator===\\\"<=\\\"?e:t};MLe.exports=Z4t});var jLe=q((hin,FLe)=>{\\\"use strict\\\";u();var zie=Z_(),LLe=d9(),Y4t=Aa(),ULe=Tie(),X4t=l2(),e8t=uDe(),t8t=fDe(),r8t=mDe(),n8t=bDe(),i8t=vDe(),s8t=EDe(),o8t=CDe(),a8t=ADe(),c8t=Qu(),l8t=PDe(),u8t=NDe(),d8t=Pj(),f8t=DDe(),p8t=UDe(),h8t=p9(),m8t=Oj(),g8t=Pie(),y8t=Oie(),b8t=Nj(),w8t=kj(),v8t=Nie(),x8t=GDe(),E8t=h9(),_8t=Ju(),C8t=g9(),S8t=cLe(),A8t=uLe(),T8t=fLe(),I8t=mLe(),R8t=yLe(),P8t=Dj(),O8t=_Le(),N8t=SLe(),k8t=ILe(),B8t=PLe(),M8t=DLe();FLe.exports={parse:X4t,valid:e8t,clean:t8t,inc:r8t,diff:n8t,major:i8t,minor:s8t,patch:o8t,prerelease:a8t,compare:c8t,rcompare:l8t,compareLoose:u8t,compareBuild:d8t,sort:f8t,rsort:p8t,gt:h8t,lt:m8t,eq:g8t,neq:y8t,gte:b8t,lte:w8t,cmp:v8t,coerce:x8t,Comparator:E8t,Range:_8t,satisfies:C8t,toComparators:S8t,maxSatisfying:A8t,minSatisfying:T8t,minVersion:I8t,validRange:R8t,outside:P8t,gtr:O8t,ltr:N8t,intersects:k8t,simplifyRange:B8t,subset:M8t,SemVer:Y4t,re:zie.re,src:zie.src,tokens:zie.t,SEMVER_SPEC_VERSION:LLe.SEMVER_SPEC_VERSION,RELEASE_TYPES:LLe.RELEASE_TYPES,compareIdentifiers:ULe.compareIdentifiers,rcompareIdentifiers:ULe.rcompareIdentifiers}});var qLe=q(Ti=>{\\\"use strict\\\";u();Object.defineProperty(Ti,\\\"__esModule\\\",{value:!0});Ti.satisfiesVersionRange=Ti.gtRange=Ti.gtVersion=Ti.assertIsSemVerRange=Ti.assertIsSemVerVersion=Ti.isValidSemVerRange=Ti.isValidSemVerVersion=Ti.VersionRangeStruct=Ti.VersionStruct=void 0;var b9=jLe(),Q_=(a1(),mt(o1)),HLe=c0();Ti.VersionStruct=(0,Q_.refine)((0,Q_.string)(),\\\"Version\\\",t=>(0,b9.valid)(t)===null?`Expected SemVer version, got \\\"${t}\\\"`:!0);Ti.VersionRangeStruct=(0,Q_.refine)((0,Q_.string)(),\\\"Version range\\\",t=>(0,b9.validRange)(t)===null?`Expected SemVer range, got \\\"${t}\\\"`:!0);function D8t(t){return(0,Q_.is)(t,Ti.VersionStruct)}Ti.isValidSemVerVersion=D8t;function L8t(t){return(0,Q_.is)(t,Ti.VersionRangeStruct)}Ti.isValidSemVerRange=L8t;function U8t(t){(0,HLe.assertStruct)(t,Ti.VersionStruct)}Ti.assertIsSemVerVersion=U8t;function F8t(t){(0,HLe.assertStruct)(t,Ti.VersionRangeStruct)}Ti.assertIsSemVerRange=F8t;function j8t(t,e){return(0,b9.gt)(t,e)}Ti.gtVersion=j8t;function H8t(t,e){return(0,b9.gtr)(t,e)}Ti.gtRange=H8t;function q8t(t,e){return(0,b9.satisfies)(t,e,{includePrerelease:!0})}Ti.satisfiesVersionRange=q8t});var zLe=q(Ui=>{\\\"use strict\\\";u();var z8t=Ui&&Ui.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||(\\\"get\\\"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$o=Ui&&Ui.__exportStar||function(t,e){for(var r in t)r!==\\\"default\\\"&&!Object.prototype.hasOwnProperty.call(e,r)&&z8t(e,t,r)};Object.defineProperty(Ui,\\\"__esModule\\\",{value:!0});$o(c0(),Ui);$o(xie(),Ui);$o(Cie(),Ui);$o(AMe(),Ui);$o(RMe(),Ui);$o(OMe(),Ui);$o(kMe(),Ui);$o(a9(),Ui);$o(BMe(),Ui);$o(DMe(),Ui);$o(qMe(),Ui);$o($Me(),Ui);$o(VMe(),Ui);$o(GMe(),Ui);$o(ZMe(),Ui);$o(JMe(),Ui);$o(qLe(),Ui)});var VLe=q(J_=>{\\\"use strict\\\";u();Object.defineProperty(J_,\\\"__esModule\\\",{value:!0});J_.createModuleLogger=J_.projectLogger=void 0;var $Le=zLe();Object.defineProperty(J_,\\\"createModuleLogger\\\",{enumerable:!0,get:function(){return $Le.createModuleLogger}});J_.projectLogger=(0,$Le.createProjectLogger)(\\\"eth-block-tracker\\\")});var QLe=q(Y_=>{\\\"use strict\\\";u();var ZLe=Y_&&Y_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Y_,\\\"__esModule\\\",{value:!0});Y_.PollingBlockTracker=void 0;var $8t=ZLe(gj()),V8t=ZLe(eMe()),W8t=mie(),WLe=VLe(),GLe=(0,WLe.createModuleLogger)(WLe.projectLogger,\\\"polling-block-tracker\\\"),G8t=(0,$8t.default)(),K8t=1e3,$ie=class extends W8t.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error(\\\"PollingBlockTracker - no provider specified.\\\");super(Object.assign(Object.assign({},e),{blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*K8t,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();let r=KLe(this._pollingInterval,!this._keepEventLoopActive);this.emit(\\\"_waitingForNextIteration\\\"),await r}catch(r){let n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\\n${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit(\\\"error\\\",n)}catch{console.error(n)}let i=KLe(this._retryTimeout,!this._keepEventLoopActive);this.emit(\\\"_waitingForNextIteration\\\"),await i}}async _updateLatestBlock(){let e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){let e={jsonrpc:\\\"2.0\\\",id:G8t(),method:\\\"eth_blockNumber\\\",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),GLe(\\\"Making request\\\",e);let r=await(0,V8t.default)(n=>this._provider.sendAsync(e,n))();if(GLe(\\\"Got response\\\",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\\n${r.error.message}`);return r.result}};Y_.PollingBlockTracker=$ie;function KLe(t,e){return new Promise(r=>{let n=setTimeout(r,t);n.unref&&e&&n.unref()})}});var JLe=q(X_=>{\\\"use strict\\\";u();var Z8t=X_&&X_.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(X_,\\\"__esModule\\\",{value:!0});X_.SubscribeBlockTracker=void 0;var Q8t=Z8t(gj()),J8t=mie(),Y8t=(0,Q8t.default)(),Vie=class extends J8t.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error(\\\"SubscribeBlockTracker - no provider specified.\\\");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{let e=await this._call(\\\"eth_blockNumber\\\");this._subscriptionId=await this._call(\\\"eth_subscribe\\\",\\\"newHeads\\\"),this._provider.on(\\\"data\\\",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit(\\\"error\\\",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call(\\\"eth_unsubscribe\\\",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit(\\\"error\\\",e)}}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:Y8t(),method:e,params:r,jsonrpc:\\\"2.0\\\"},(s,o)=>{s?i(s):n(o.result)})})}_handleSubData(e,r){var n;r.method===\\\"eth_subscription\\\"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}};X_.SubscribeBlockTracker=Vie});var XLe=q(u1=>{\\\"use strict\\\";u();var X8t=u1&&u1.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),YLe=u1&&u1.__exportStar||function(t,e){for(var r in t)r!==\\\"default\\\"&&!Object.prototype.hasOwnProperty.call(e,r)&&X8t(e,t,r)};Object.defineProperty(u1,\\\"__esModule\\\",{value:!0});YLe(QLe(),u1);YLe(JLe(),u1)});var Gie=q(Lj=>{\\\"use strict\\\";u();Object.defineProperty(Lj,\\\"__esModule\\\",{value:!0});Lj.getUniqueId=void 0;var eUe=4294967295,Wie=Math.floor(Math.random()*eUe);function eSt(){return Wie=(Wie+1)%eUe,Wie}Lj.getUniqueId=eSt});var tUe=q(Uj=>{\\\"use strict\\\";u();Object.defineProperty(Uj,\\\"__esModule\\\",{value:!0});Uj.createIdRemapMiddleware=void 0;var tSt=Gie();function rSt(){return(t,e,r,n)=>{let i=t.id,s=tSt.getUniqueId();t.id=s,e.id=s,r(o=>{t.id=i,e.id=i,o()})}}Uj.createIdRemapMiddleware=rSt});var rUe=q(Fj=>{\\\"use strict\\\";u();Object.defineProperty(Fj,\\\"__esModule\\\",{value:!0});Fj.createAsyncMiddleware=void 0;function nSt(t){return async(e,r,n,i)=>{let s,o=new Promise(d=>{s=d}),a=null,c=!1,l=async()=>{c=!0,n(d=>{a=d,s()}),await o};try{await t(e,r,l),c?(await o,a(null)):i(null)}catch(d){a?a(d):i(d)}}}Fj.createAsyncMiddleware=nSt});var nUe=q(jj=>{\\\"use strict\\\";u();Object.defineProperty(jj,\\\"__esModule\\\",{value:!0});jj.createScaffoldMiddleware=void 0;function iSt(t){return(e,r,n,i)=>{let s=t[e.method];return s===void 0?n():typeof s==\\\"function\\\"?s(e,r,n,i):(r.result=s,i())}}jj.createScaffoldMiddleware=iSt});var sUe=q(Zie=>{\\\"use strict\\\";u();Object.defineProperty(Zie,\\\"__esModule\\\",{value:!0});var sSt=ho();function iUe(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function oSt(t){let e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}var Kie=class extends sSt.EventEmitter{emit(e,...r){let n=e===\\\"error\\\",i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;let a=new Error(`Unhandled error.${o?` (${o.message})`:\\\"\\\"}`);throw a.context=o,a}let s=i[e];if(s===void 0)return!1;if(typeof s==\\\"function\\\")iUe(s,this,r);else{let o=s.length,a=oSt(s);for(let c=0;c<o;c+=1)iUe(a[c],this,r)}return!0}};Zie.default=Kie});var dUe=q((Uin,uUe)=>{u();uUe.exports=w9;w9.default=w9;w9.stable=cUe;w9.stableStringify=cUe;var Hj=\\\"[...]\\\",oUe=\\\"[Circular]\\\",d2=[],u2=[];function aUe(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function w9(t,e,r,n){typeof n>\\\"u\\\"&&(n=aUe()),Qie(t,\\\"\\\",0,[],void 0,0,n);var i;try{u2.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,lUe(e),r)}catch{return JSON.stringify(\\\"[unable to serialize, circular reference is too complex to analyze]\\\")}finally{for(;d2.length!==0;){var s=d2.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function eC(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),d2.push([n,r,e,i])):u2.push([e,r,t]):(n[r]=t,d2.push([n,r,e]))}function Qie(t,e,r,n,i,s,o){s+=1;var a;if(typeof t==\\\"object\\\"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){eC(oUe,t,e,i);return}if(typeof o.depthLimit<\\\"u\\\"&&s>o.depthLimit){eC(Hj,t,e,i);return}if(typeof o.edgesLimit<\\\"u\\\"&&r+1>o.edgesLimit){eC(Hj,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)Qie(t[a],a,a,n,t,s,o);else{var c=Object.keys(t);for(a=0;a<c.length;a++){var l=c[a];Qie(t[l],l,a,n,t,s,o)}}n.pop()}}function aSt(t,e){return t<e?-1:t>e?1:0}function cUe(t,e,r,n){typeof n>\\\"u\\\"&&(n=aUe());var i=Jie(t,\\\"\\\",0,[],void 0,0,n)||t,s;try{u2.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,lUe(e),r)}catch{return JSON.stringify(\\\"[unable to serialize, circular reference is too complex to analyze]\\\")}finally{for(;d2.length!==0;){var o=d2.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function Jie(t,e,r,n,i,s,o){s+=1;var a;if(typeof t==\\\"object\\\"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){eC(oUe,t,e,i);return}try{if(typeof t.toJSON==\\\"function\\\")return}catch{return}if(typeof o.depthLimit<\\\"u\\\"&&s>o.depthLimit){eC(Hj,t,e,i);return}if(typeof o.edgesLimit<\\\"u\\\"&&r+1>o.edgesLimit){eC(Hj,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)Jie(t[a],a,a,n,t,s,o);else{var c={},l=Object.keys(t).sort(aSt);for(a=0;a<l.length;a++){var d=l[a];Jie(t[d],d,a,n,t,s,o),c[d]=t[d]}if(typeof i<\\\"u\\\")d2.push([i,e,t]),i[e]=c;else return c}n.pop()}}function lUe(t){return t=typeof t<\\\"u\\\"?t:function(e,r){return r},function(e,r){if(u2.length>0)for(var n=0;n<u2.length;n++){var i=u2[n];if(i[1]===e&&i[0]===r){r=i[2],u2.splice(n,1);break}}return t.call(this,e,r)}}});var zj=q(tC=>{\\\"use strict\\\";u();Object.defineProperty(tC,\\\"__esModule\\\",{value:!0});tC.EthereumProviderError=tC.EthereumRpcError=void 0;var cSt=dUe(),qj=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('\\\"code\\\" must be an integer.');if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return cSt.default(this.serialize(),uSt,2)}};tC.EthereumRpcError=qj;var Yie=class extends qj{constructor(e,r,n){if(!lSt(e))throw new Error('\\\"code\\\" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};tC.EthereumProviderError=Yie;function lSt(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function uSt(t,e){if(e!==\\\"[Circular]\\\")return e}});var $j=q(rC=>{\\\"use strict\\\";u();Object.defineProperty(rC,\\\"__esModule\\\",{value:!0});rC.errorValues=rC.errorCodes=void 0;rC.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};rC.errorValues={\\\"-32700\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\\\"},\\\"-32600\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The JSON sent is not a valid Request object.\\\"},\\\"-32601\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"The method does not exist / is not available.\\\"},\\\"-32602\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Invalid method parameter(s).\\\"},\\\"-32603\\\":{standard:\\\"JSON RPC 2.0\\\",message:\\\"Internal JSON-RPC error.\\\"},\\\"-32000\\\":{standard:\\\"EIP-1474\\\",message:\\\"Invalid input.\\\"},\\\"-32001\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource not found.\\\"},\\\"-32002\\\":{standard:\\\"EIP-1474\\\",message:\\\"Resource unavailable.\\\"},\\\"-32003\\\":{standard:\\\"EIP-1474\\\",message:\\\"Transaction rejected.\\\"},\\\"-32004\\\":{standard:\\\"EIP-1474\\\",message:\\\"Method not supported.\\\"},\\\"-32005\\\":{standard:\\\"EIP-1474\\\",message:\\\"Request limit exceeded.\\\"},4001:{standard:\\\"EIP-1193\\\",message:\\\"User rejected the request.\\\"},4100:{standard:\\\"EIP-1193\\\",message:\\\"The requested account and/or method has not been authorized by the user.\\\"},4200:{standard:\\\"EIP-1193\\\",message:\\\"The requested method is not supported by this Ethereum provider.\\\"},4900:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from all chains.\\\"},4901:{standard:\\\"EIP-1193\\\",message:\\\"The provider is disconnected from the specified chain.\\\"}}});var tse=q(df=>{\\\"use strict\\\";u();Object.defineProperty(df,\\\"__esModule\\\",{value:!0});df.serializeError=df.isValidCode=df.getMessageFromCode=df.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var Vj=$j(),dSt=zj(),fUe=Vj.errorCodes.rpc.internal,fSt=\\\"Unspecified error message. This is a bug, please report it.\\\",pSt={code:fUe,message:ese(fUe)};df.JSON_RPC_SERVER_ERROR_MESSAGE=\\\"Unspecified server error.\\\";function ese(t,e=fSt){if(Number.isInteger(t)){let r=t.toString();if(Xie(Vj.errorValues,r))return Vj.errorValues[r].message;if(mUe(t))return df.JSON_RPC_SERVER_ERROR_MESSAGE}return e}df.getMessageFromCode=ese;function hUe(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(Vj.errorValues[e]||mUe(t))}df.isValidCode=hUe;function hSt(t,{fallbackError:e=pSt,shouldIncludeStack:r=!1}={}){var n,i;if(!e||!Number.isInteger(e.code)||typeof e.message!=\\\"string\\\")throw new Error(\\\"Must provide fallback error with integer number code and string message.\\\");if(t instanceof dSt.EthereumRpcError)return t.serialize();let s={};if(t&&typeof t==\\\"object\\\"&&!Array.isArray(t)&&Xie(t,\\\"code\\\")&&hUe(t.code)){let a=t;s.code=a.code,a.message&&typeof a.message==\\\"string\\\"?(s.message=a.message,Xie(a,\\\"data\\\")&&(s.data=a.data)):(s.message=ese(s.code),s.data={originalError:pUe(t)})}else{s.code=e.code;let a=(n=t)===null||n===void 0?void 0:n.message;s.message=a&&typeof a==\\\"string\\\"?a:e.message,s.data={originalError:pUe(t)}}let o=(i=t)===null||i===void 0?void 0:i.stack;return r&&t&&o&&typeof o==\\\"string\\\"&&(s.stack=o),s}df.serializeError=hSt;function mUe(t){return t>=-32099&&t<=-32e3}function pUe(t){return t&&typeof t==\\\"object\\\"&&!Array.isArray(t)?Object.assign({},t):t}function Xie(t,e){return Object.prototype.hasOwnProperty.call(t,e)}});var bUe=q(Wj=>{\\\"use strict\\\";u();Object.defineProperty(Wj,\\\"__esModule\\\",{value:!0});Wj.ethErrors=void 0;var rse=zj(),gUe=tse(),Ia=$j();Wj.ethErrors={rpc:{parse:t=>Yu(Ia.errorCodes.rpc.parse,t),invalidRequest:t=>Yu(Ia.errorCodes.rpc.invalidRequest,t),invalidParams:t=>Yu(Ia.errorCodes.rpc.invalidParams,t),methodNotFound:t=>Yu(Ia.errorCodes.rpc.methodNotFound,t),internal:t=>Yu(Ia.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum RPC Server errors must provide single object argument.\\\");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('\\\"code\\\" must be an integer such that: -32099 <= code <= -32005');return Yu(e,t)},invalidInput:t=>Yu(Ia.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>Yu(Ia.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Yu(Ia.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Yu(Ia.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Yu(Ia.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Yu(Ia.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>v9(Ia.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>v9(Ia.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>v9(Ia.errorCodes.provider.unsupportedMethod,t),disconnected:t=>v9(Ia.errorCodes.provider.disconnected,t),chainDisconnected:t=>v9(Ia.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!=\\\"object\\\"||Array.isArray(t))throw new Error(\\\"Ethereum Provider custom errors must provide single object argument.\\\");let{code:e,message:r,data:n}=t;if(!r||typeof r!=\\\"string\\\")throw new Error('\\\"message\\\" must be a nonempty string');return new rse.EthereumProviderError(e,r,n)}}};function Yu(t,e){let[r,n]=yUe(e);return new rse.EthereumRpcError(t,r||gUe.getMessageFromCode(t),n)}function v9(t,e){let[r,n]=yUe(e);return new rse.EthereumProviderError(t,r||gUe.getMessageFromCode(t),n)}function yUe(t){if(t){if(typeof t==\\\"string\\\")return[t];if(typeof t==\\\"object\\\"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!=\\\"string\\\")throw new Error(\\\"Must specify string message.\\\");return[e||void 0,r]}}return[]}});var xUe=q(qc=>{\\\"use strict\\\";u();Object.defineProperty(qc,\\\"__esModule\\\",{value:!0});qc.getMessageFromCode=qc.serializeError=qc.EthereumProviderError=qc.EthereumRpcError=qc.ethErrors=qc.errorCodes=void 0;var wUe=zj();Object.defineProperty(qc,\\\"EthereumRpcError\\\",{enumerable:!0,get:function(){return wUe.EthereumRpcError}});Object.defineProperty(qc,\\\"EthereumProviderError\\\",{enumerable:!0,get:function(){return wUe.EthereumProviderError}});var vUe=tse();Object.defineProperty(qc,\\\"serializeError\\\",{enumerable:!0,get:function(){return vUe.serializeError}});Object.defineProperty(qc,\\\"getMessageFromCode\\\",{enumerable:!0,get:function(){return vUe.getMessageFromCode}});var mSt=bUe();Object.defineProperty(qc,\\\"ethErrors\\\",{enumerable:!0,get:function(){return mSt.ethErrors}});var gSt=$j();Object.defineProperty(qc,\\\"errorCodes\\\",{enumerable:!0,get:function(){return gSt.errorCodes}})});var sse=q(nC=>{\\\"use strict\\\";u();var ySt=nC&&nC.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nC,\\\"__esModule\\\",{value:!0});nC.JsonRpcEngine=void 0;var bSt=ySt(sUe()),Xu=xUe(),ise=class t extends bSt.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!=\\\"function\\\")throw new Error('\\\"callback\\\" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return async(e,r,n,i)=>{try{let[s,o,a]=await t._runAllMiddleware(e,r,this._middleware);return o?(await t._runReturnHandlers(a),i(s)):n(async c=>{try{await t._runReturnHandlers(a)}catch(l){return c(l)}return c()})}catch(s){return i(s)}}}async _handleBatch(e,r){try{let n=await Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!=\\\"object\\\"){let o=new Xu.EthereumRpcError(Xu.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(o,{id:void 0,jsonrpc:\\\"2.0\\\",error:o})}if(typeof e.method!=\\\"string\\\"){let o=new Xu.EthereumRpcError(Xu.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(o,{id:e.id,jsonrpc:\\\"2.0\\\",error:o})}let n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc},s=null;try{await this._processRequest(n,i)}catch(o){s=o}return s&&(delete i.result,i.error||(i.error=Xu.serializeError(s))),r(s,i)}async _processRequest(e,r){let[n,i,s]=await t._runAllMiddleware(e,r,this._middleware);if(t._checkForCompletion(e,r,i),await t._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(e,r,n){let i=[],s=null,o=!1;for(let a of n)if([s,o]=await t._runMiddleware(e,r,a,i),o)break;return[s,o,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(s=>{let o=c=>{let l=c||r.error;l&&(r.error=Xu.serializeError(l)),s([l,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!=\\\"function\\\"&&o(new Xu.EthereumRpcError(Xu.errorCodes.rpc.internal,`JsonRpcEngine: \\\"next\\\" return handlers must be functions. Received \\\"${typeof c}\\\" for request:\\n${nse(e)}`,{request:e})),i.push(c)),s([null,!1]))};try{n(e,r,a,o)}catch(c){o(c)}})}static async _runReturnHandlers(e){for(let r of e)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(e,r,n){if(!(\\\"result\\\"in r)&&!(\\\"error\\\"in r))throw new Xu.EthereumRpcError(Xu.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\\n${nse(e)}`,{request:e});if(!n)throw new Xu.EthereumRpcError(Xu.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\\n${nse(e)}`,{request:e})}};nC.JsonRpcEngine=ise;function nse(t){return JSON.stringify(t,null,2)}});var EUe=q(Gj=>{\\\"use strict\\\";u();Object.defineProperty(Gj,\\\"__esModule\\\",{value:!0});Gj.mergeMiddleware=void 0;var wSt=sse();function vSt(t){let e=new wSt.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}Gj.mergeMiddleware=vSt});var ose=q(ed=>{\\\"use strict\\\";u();var xSt=ed&&ed.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),iC=ed&&ed.__exportStar||function(t,e){for(var r in t)r!==\\\"default\\\"&&!Object.prototype.hasOwnProperty.call(e,r)&&xSt(e,t,r)};Object.defineProperty(ed,\\\"__esModule\\\",{value:!0});iC(tUe(),ed);iC(rUe(),ed);iC(nUe(),ed);iC(Gie(),ed);iC(sse(),ed);iC(EUe(),ed)});var Jj=q((rsn,Qj)=>{u();var _Ue,CUe,SUe,AUe,TUe,IUe,RUe,PUe,OUe,NUe,kUe,BUe,MUe,Kj,ase,DUe,LUe,UUe,sC,FUe,jUe,HUe,qUe,zUe,$Ue,VUe,WUe,GUe,Zj,KUe,ZUe,QUe;(function(t){var e=typeof globalThis==\\\"object\\\"?globalThis:typeof self==\\\"object\\\"?self:typeof this==\\\"object\\\"?this:{};typeof define==\\\"function\\\"&&define.amd?define(\\\"tslib\\\",[\\\"exports\\\"],function(n){t(r(e,r(n)))}):typeof Qj==\\\"object\\\"&&typeof Qj.exports==\\\"object\\\"?t(r(e,r(Qj.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create==\\\"function\\\"?Object.defineProperty(n,\\\"__esModule\\\",{value:!0}):n.__esModule=!0),function(s,o){return n[s]=i?i(s,o):o}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(s[a]=o[a])};_Ue=function(s,o){if(typeof o!=\\\"function\\\"&&o!==null)throw new TypeError(\\\"Class extends value \\\"+String(o)+\\\" is not a constructor or null\\\");e(s,o);function a(){this.constructor=s}s.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)},CUe=Object.assign||function(s){for(var o,a=1,c=arguments.length;a<c;a++){o=arguments[a];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(s[l]=o[l])}return s},SUe=function(s,o){var a={};for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.indexOf(c)<0&&(a[c]=s[c]);if(s!=null&&typeof Object.getOwnPropertySymbols==\\\"function\\\")for(var l=0,c=Object.getOwnPropertySymbols(s);l<c.length;l++)o.indexOf(c[l])<0&&Object.prototype.propertyIsEnumerable.call(s,c[l])&&(a[c[l]]=s[c[l]]);return a},AUe=function(s,o,a,c){var l=arguments.length,d=l<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c,f;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")d=Reflect.decorate(s,o,a,c);else for(var p=s.length-1;p>=0;p--)(f=s[p])&&(d=(l<3?f(d):l>3?f(o,a,d):f(o,a))||d);return l>3&&d&&Object.defineProperty(o,a,d),d},TUe=function(s,o){return function(a,c){o(a,c,s)}},IUe=function(s,o,a,c,l,d){function f(N){if(N!==void 0&&typeof N!=\\\"function\\\")throw new TypeError(\\\"Function expected\\\");return N}for(var p=c.kind,h=p===\\\"getter\\\"?\\\"get\\\":p===\\\"setter\\\"?\\\"set\\\":\\\"value\\\",m=!o&&s?c.static?s:s.prototype:null,g=o||(m?Object.getOwnPropertyDescriptor(m,c.name):{}),w,v=!1,b=a.length-1;b>=0;b--){var _={};for(var S in c)_[S]=S===\\\"access\\\"?{}:c[S];for(var S in c.access)_.access[S]=c.access[S];_.addInitializer=function(N){if(v)throw new TypeError(\\\"Cannot add initializers after decoration has completed\\\");d.push(f(N||null))};var T=(0,a[b])(p===\\\"accessor\\\"?{get:g.get,set:g.set}:g[h],_);if(p===\\\"accessor\\\"){if(T===void 0)continue;if(T===null||typeof T!=\\\"object\\\")throw new TypeError(\\\"Object expected\\\");(w=f(T.get))&&(g.get=w),(w=f(T.set))&&(g.set=w),(w=f(T.init))&&l.unshift(w)}else(w=f(T))&&(p===\\\"field\\\"?l.unshift(w):g[h]=w)}m&&Object.defineProperty(m,c.name,g),v=!0},RUe=function(s,o,a){for(var c=arguments.length>2,l=0;l<o.length;l++)a=c?o[l].call(s,a):o[l].call(s);return c?a:void 0},PUe=function(s){return typeof s==\\\"symbol\\\"?s:\\\"\\\".concat(s)},OUe=function(s,o,a){return typeof o==\\\"symbol\\\"&&(o=o.description?\\\"[\\\".concat(o.description,\\\"]\\\"):\\\"\\\"),Object.defineProperty(s,\\\"name\\\",{configurable:!0,value:a?\\\"\\\".concat(a,\\\" \\\",o):o})},NUe=function(s,o){if(typeof Reflect==\\\"object\\\"&&typeof Reflect.metadata==\\\"function\\\")return Reflect.metadata(s,o)},kUe=function(s,o,a,c){function l(d){return d instanceof a?d:new a(function(f){f(d)})}return new(a||(a=Promise))(function(d,f){function p(g){try{m(c.next(g))}catch(w){f(w)}}function h(g){try{m(c.throw(g))}catch(w){f(w)}}function m(g){g.done?d(g.value):l(g.value).then(p,h)}m((c=c.apply(s,o||[])).next())})},BUe=function(s,o){var a={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},c,l,d,f=Object.create((typeof Iterator==\\\"function\\\"?Iterator:Object).prototype);return f.next=p(0),f.throw=p(1),f.return=p(2),typeof Symbol==\\\"function\\\"&&(f[Symbol.iterator]=function(){return this}),f;function p(m){return function(g){return h([m,g])}}function h(m){if(c)throw new TypeError(\\\"Generator is already executing.\\\");for(;f&&(f=0,m[0]&&(a=0)),a;)try{if(c=1,l&&(d=m[0]&2?l.return:m[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,m[1])).done)return d;switch(l=0,d&&(m=[m[0]&2,d.value]),m[0]){case 0:case 1:d=m;break;case 4:return a.label++,{value:m[1],done:!1};case 5:a.label++,l=m[1],m=[0];continue;case 7:m=a.ops.pop(),a.trys.pop();continue;default:if(d=a.trys,!(d=d.length>0&&d[d.length-1])&&(m[0]===6||m[0]===2)){a=0;continue}if(m[0]===3&&(!d||m[1]>d[0]&&m[1]<d[3])){a.label=m[1];break}if(m[0]===6&&a.label<d[1]){a.label=d[1],d=m;break}if(d&&a.label<d[2]){a.label=d[2],a.ops.push(m);break}d[2]&&a.ops.pop(),a.trys.pop();continue}m=o.call(s,a)}catch(g){m=[6,g],l=0}finally{c=d=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},MUe=function(s,o){for(var a in s)a!==\\\"default\\\"&&!Object.prototype.hasOwnProperty.call(o,a)&&Zj(o,s,a)},Zj=Object.create?(function(s,o,a,c){c===void 0&&(c=a);var l=Object.getOwnPropertyDescriptor(o,a);(!l||(\\\"get\\\"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(s,c,l)}):(function(s,o,a,c){c===void 0&&(c=a),s[c]=o[a]}),Kj=function(s){var o=typeof Symbol==\\\"function\\\"&&Symbol.iterator,a=o&&s[o],c=0;if(a)return a.call(s);if(s&&typeof s.length==\\\"number\\\")return{next:function(){return s&&c>=s.length&&(s=void 0),{value:s&&s[c++],done:!s}}};throw new TypeError(o?\\\"Object is not iterable.\\\":\\\"Symbol.iterator is not defined.\\\")},ase=function(s,o){var a=typeof Symbol==\\\"function\\\"&&s[Symbol.iterator];if(!a)return s;var c=a.call(s),l,d=[],f;try{for(;(o===void 0||o-- >0)&&!(l=c.next()).done;)d.push(l.value)}catch(p){f={error:p}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(f)throw f.error}}return d},DUe=function(){for(var s=[],o=0;o<arguments.length;o++)s=s.concat(ase(arguments[o]));return s},LUe=function(){for(var s=0,o=0,a=arguments.length;o<a;o++)s+=arguments[o].length;for(var c=Array(s),l=0,o=0;o<a;o++)for(var d=arguments[o],f=0,p=d.length;f<p;f++,l++)c[l]=d[f];return c},UUe=function(s,o,a){if(a||arguments.length===2)for(var c=0,l=o.length,d;c<l;c++)(d||!(c in o))&&(d||(d=Array.prototype.slice.call(o,0,c)),d[c]=o[c]);return s.concat(d||Array.prototype.slice.call(o))},sC=function(s){return this instanceof sC?(this.v=s,this):new sC(s)},FUe=function(s,o,a){if(!Symbol.asyncIterator)throw new TypeError(\\\"Symbol.asyncIterator is not defined.\\\");var c=a.apply(s,o||[]),l,d=[];return l=Object.create((typeof AsyncIterator==\\\"function\\\"?AsyncIterator:Object).prototype),p(\\\"next\\\"),p(\\\"throw\\\"),p(\\\"return\\\",f),l[Symbol.asyncIterator]=function(){return this},l;function f(b){return function(_){return Promise.resolve(_).then(b,w)}}function p(b,_){c[b]&&(l[b]=function(S){return new Promise(function(T,N){d.push([b,S,T,N])>1||h(b,S)})},_&&(l[b]=_(l[b])))}function h(b,_){try{m(c[b](_))}catch(S){v(d[0][3],S)}}function m(b){b.value instanceof sC?Promise.resolve(b.value.v).then(g,w):v(d[0][2],b)}function g(b){h(\\\"next\\\",b)}function w(b){h(\\\"throw\\\",b)}function v(b,_){b(_),d.shift(),d.length&&h(d[0][0],d[0][1])}},jUe=function(s){var o,a;return o={},c(\\\"next\\\"),c(\\\"throw\\\",function(l){throw l}),c(\\\"return\\\"),o[Symbol.iterator]=function(){return this},o;function c(l,d){o[l]=s[l]?function(f){return(a=!a)?{value:sC(s[l](f)),done:!1}:d?d(f):f}:d}},HUe=function(s){if(!Symbol.asyncIterator)throw new TypeError(\\\"Symbol.asyncIterator is not defined.\\\");var o=s[Symbol.asyncIterator],a;return o?o.call(s):(s=typeof Kj==\\\"function\\\"?Kj(s):s[Symbol.iterator](),a={},c(\\\"next\\\"),c(\\\"throw\\\"),c(\\\"return\\\"),a[Symbol.asyncIterator]=function(){return this},a);function c(d){a[d]=s[d]&&function(f){return new Promise(function(p,h){f=s[d](f),l(p,h,f.done,f.value)})}}function l(d,f,p,h){Promise.resolve(h).then(function(m){d({value:m,done:p})},f)}},qUe=function(s,o){return Object.defineProperty?Object.defineProperty(s,\\\"raw\\\",{value:o}):s.raw=o,s};var r=Object.create?(function(s,o){Object.defineProperty(s,\\\"default\\\",{enumerable:!0,value:o})}):function(s,o){s.default=o},n=function(s){return n=Object.getOwnPropertyNames||function(o){var a=[];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(a[a.length]=c);return a},n(s)};zUe=function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var a=n(s),c=0;c<a.length;c++)a[c]!==\\\"default\\\"&&Zj(o,s,a[c]);return r(o,s),o},$Ue=function(s){return s&&s.__esModule?s:{default:s}},VUe=function(s,o,a,c){if(a===\\\"a\\\"&&!c)throw new TypeError(\\\"Private accessor was defined without a getter\\\");if(typeof o==\\\"function\\\"?s!==o||!c:!o.has(s))throw new TypeError(\\\"Cannot read private member from an object whose class did not declare it\\\");return a===\\\"m\\\"?c:a===\\\"a\\\"?c.call(s):c?c.value:o.get(s)},WUe=function(s,o,a,c,l){if(c===\\\"m\\\")throw new TypeError(\\\"Private method is not writable\\\");if(c===\\\"a\\\"&&!l)throw new TypeError(\\\"Private accessor was defined without a setter\\\");if(typeof o==\\\"function\\\"?s!==o||!l:!o.has(s))throw new TypeError(\\\"Cannot write private member to an object whose class did not declare it\\\");return c===\\\"a\\\"?l.call(s,a):l?l.value=a:o.set(s,a),a},GUe=function(s,o){if(o===null||typeof o!=\\\"object\\\"&&typeof o!=\\\"function\\\")throw new TypeError(\\\"Cannot use 'in' operator on non-object\\\");return typeof s==\\\"function\\\"?o===s:s.has(o)},KUe=function(s,o,a){if(o!=null){if(typeof o!=\\\"object\\\"&&typeof o!=\\\"function\\\")throw new TypeError(\\\"Object expected.\\\");var c,l;if(a){if(!Symbol.asyncDispose)throw new TypeError(\\\"Symbol.asyncDispose is not defined.\\\");c=o[Symbol.asyncDispose]}if(c===void 0){if(!Symbol.dispose)throw new TypeError(\\\"Symbol.dispose is not defined.\\\");c=o[Symbol.dispose],a&&(l=c)}if(typeof c!=\\\"function\\\")throw new TypeError(\\\"Object not disposable.\\\");l&&(c=function(){try{l.call(this)}catch(d){return Promise.reject(d)}}),s.stack.push({value:o,dispose:c,async:a})}else a&&s.stack.push({async:!0});return o};var i=typeof SuppressedError==\\\"function\\\"?SuppressedError:function(s,o,a){var c=new Error(a);return c.name=\\\"SuppressedError\\\",c.error=s,c.suppressed=o,c};ZUe=function(s){function o(d){s.error=s.hasError?new i(d,s.error,\\\"An error was suppressed during disposal.\\\"):d,s.hasError=!0}var a,c=0;function l(){for(;a=s.stack.pop();)try{if(!a.async&&c===1)return c=0,s.stack.push(a),Promise.resolve().then(l);if(a.dispose){var d=a.dispose.call(a.value);if(a.async)return c|=2,Promise.resolve(d).then(l,function(f){return o(f),l()})}else c|=1}catch(f){o(f)}if(c===1)return s.hasError?Promise.reject(s.error):Promise.resolve();if(s.hasError)throw s.error}return l()},QUe=function(s,o){return typeof s==\\\"string\\\"&&/^\\\\.\\\\.?\\\\//.test(s)?s.replace(/\\\\.(tsx)$|((?:\\\\.d)?)((?:\\\\.[^./]+?)?)\\\\.([cm]?)ts$/i,function(a,c,l,d,f){return c?o?\\\".jsx\\\":\\\".js\\\":l&&(!d||!f)?a:l+d+\\\".\\\"+f.toLowerCase()+\\\"js\\\"}):s},t(\\\"__extends\\\",_Ue),t(\\\"__assign\\\",CUe),t(\\\"__rest\\\",SUe),t(\\\"__decorate\\\",AUe),t(\\\"__param\\\",TUe),t(\\\"__esDecorate\\\",IUe),t(\\\"__runInitializers\\\",RUe),t(\\\"__propKey\\\",PUe),t(\\\"__setFunctionName\\\",OUe),t(\\\"__metadata\\\",NUe),t(\\\"__awaiter\\\",kUe),t(\\\"__generator\\\",BUe),t(\\\"__exportStar\\\",MUe),t(\\\"__createBinding\\\",Zj),t(\\\"__values\\\",Kj),t(\\\"__read\\\",ase),t(\\\"__spread\\\",DUe),t(\\\"__spreadArrays\\\",LUe),t(\\\"__spreadArray\\\",UUe),t(\\\"__await\\\",sC),t(\\\"__asyncGenerator\\\",FUe),t(\\\"__asyncDelegator\\\",jUe),t(\\\"__asyncValues\\\",HUe),t(\\\"__makeTemplateObject\\\",qUe),t(\\\"__importStar\\\",zUe),t(\\\"__importDefault\\\",$Ue),t(\\\"__classPrivateFieldGet\\\",VUe),t(\\\"__classPrivateFieldSet\\\",WUe),t(\\\"__classPrivateFieldIn\\\",GUe),t(\\\"__addDisposableResource\\\",KUe),t(\\\"__disposeResources\\\",ZUe),t(\\\"__rewriteRelativeImportExtension\\\",QUe)})});var lse=q(cse=>{\\\"use strict\\\";u();Object.defineProperty(cse,\\\"__esModule\\\",{value:!0});var JUe=Jj(),ESt=(function(){function t(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error(\\\"semaphore must be initialized to a positive value\\\");this._value=e}return t.prototype.acquire=function(){var e=this,r=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return r||this._dispatch(),n},t.prototype.runExclusive=function(e){return JUe.__awaiter(this,void 0,void 0,function(){var r,n,i;return JUe.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:r=s.sent(),n=r[0],i=r[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error(\\\"this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead\\\");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},t.prototype._dispatch=function(){var e=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},r([this._value--,this._currentReleaser])}},t})();cse.default=ESt});var XUe=q(use=>{\\\"use strict\\\";u();Object.defineProperty(use,\\\"__esModule\\\",{value:!0});var YUe=Jj(),_St=lse(),CSt=(function(){function t(){this._semaphore=new _St.default(1)}return t.prototype.acquire=function(){return YUe.__awaiter(this,void 0,void 0,function(){var e,r;return YUe.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),r=e[1],[2,r]}})})},t.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t})();use.default=CSt});var eFe=q(Xj=>{\\\"use strict\\\";u();Object.defineProperty(Xj,\\\"__esModule\\\",{value:!0});Xj.withTimeout=void 0;var Yj=Jj();function SSt(t,e,r){var n=this;return r===void 0&&(r=new Error(\\\"timeout\\\")),{acquire:function(){return new Promise(function(i,s){return Yj.__awaiter(n,void 0,void 0,function(){var o,a,c;return Yj.__generator(this,function(l){switch(l.label){case 0:return o=!1,setTimeout(function(){o=!0,s(r)},e),[4,t.acquire()];case 1:return a=l.sent(),o?(c=Array.isArray(a)?a[1]:a,c()):i(a),[2]}})})})},runExclusive:function(i){return Yj.__awaiter(this,void 0,void 0,function(){var s,o;return Yj.__generator(this,function(a){switch(a.label){case 0:s=function(){},a.label=1;case 1:return a.trys.push([1,,7,8]),[4,this.acquire()];case 2:return o=a.sent(),Array.isArray(o)?(s=o[1],[4,i(o[0])]):[3,4];case 3:return[2,a.sent()];case 4:return s=o,[4,i()];case 5:return[2,a.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}Xj.withTimeout=SSt});var tFe=q(d1=>{\\\"use strict\\\";u();Object.defineProperty(d1,\\\"__esModule\\\",{value:!0});d1.withTimeout=d1.Semaphore=d1.Mutex=void 0;var ASt=XUe();Object.defineProperty(d1,\\\"Mutex\\\",{enumerable:!0,get:function(){return ASt.default}});var TSt=lse();Object.defineProperty(d1,\\\"Semaphore\\\",{enumerable:!0,get:function(){return TSt.default}});var ISt=eFe();Object.defineProperty(d1,\\\"withTimeout\\\",{enumerable:!0,get:function(){return ISt.withTimeout}})});var nFe=q((fsn,rFe)=>{u();rFe.exports=PSt;var RSt=Object.prototype.hasOwnProperty;function PSt(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var n in r)RSt.call(r,n)&&(t[n]=r[n])}return t}});var sFe=q((hsn,iFe)=>{u();var OSt=nFe(),NSt=gj()();iFe.exports=ht;function ht(t){let e=this;e.currentProvider=t}ht.prototype.getBalance=x9(2,\\\"eth_getBalance\\\");ht.prototype.getCode=x9(2,\\\"eth_getCode\\\");ht.prototype.getTransactionCount=x9(2,\\\"eth_getTransactionCount\\\");ht.prototype.getStorageAt=x9(3,\\\"eth_getStorageAt\\\");ht.prototype.call=x9(2,\\\"eth_call\\\");ht.prototype.protocolVersion=Vt(\\\"eth_protocolVersion\\\");ht.prototype.syncing=Vt(\\\"eth_syncing\\\");ht.prototype.coinbase=Vt(\\\"eth_coinbase\\\");ht.prototype.mining=Vt(\\\"eth_mining\\\");ht.prototype.hashrate=Vt(\\\"eth_hashrate\\\");ht.prototype.gasPrice=Vt(\\\"eth_gasPrice\\\");ht.prototype.accounts=Vt(\\\"eth_accounts\\\");ht.prototype.blockNumber=Vt(\\\"eth_blockNumber\\\");ht.prototype.getBlockTransactionCountByHash=Vt(\\\"eth_getBlockTransactionCountByHash\\\");ht.prototype.getBlockTransactionCountByNumber=Vt(\\\"eth_getBlockTransactionCountByNumber\\\");ht.prototype.getUncleCountByBlockHash=Vt(\\\"eth_getUncleCountByBlockHash\\\");ht.prototype.getUncleCountByBlockNumber=Vt(\\\"eth_getUncleCountByBlockNumber\\\");ht.prototype.sign=Vt(\\\"eth_sign\\\");ht.prototype.sendTransaction=Vt(\\\"eth_sendTransaction\\\");ht.prototype.sendRawTransaction=Vt(\\\"eth_sendRawTransaction\\\");ht.prototype.estimateGas=Vt(\\\"eth_estimateGas\\\");ht.prototype.getBlockByHash=Vt(\\\"eth_getBlockByHash\\\");ht.prototype.getBlockByNumber=Vt(\\\"eth_getBlockByNumber\\\");ht.prototype.getTransactionByHash=Vt(\\\"eth_getTransactionByHash\\\");ht.prototype.getTransactionByBlockHashAndIndex=Vt(\\\"eth_getTransactionByBlockHashAndIndex\\\");ht.prototype.getTransactionByBlockNumberAndIndex=Vt(\\\"eth_getTransactionByBlockNumberAndIndex\\\");ht.prototype.getTransactionReceipt=Vt(\\\"eth_getTransactionReceipt\\\");ht.prototype.getUncleByBlockHashAndIndex=Vt(\\\"eth_getUncleByBlockHashAndIndex\\\");ht.prototype.getUncleByBlockNumberAndIndex=Vt(\\\"eth_getUncleByBlockNumberAndIndex\\\");ht.prototype.getCompilers=Vt(\\\"eth_getCompilers\\\");ht.prototype.compileLLL=Vt(\\\"eth_compileLLL\\\");ht.prototype.compileSolidity=Vt(\\\"eth_compileSolidity\\\");ht.prototype.compileSerpent=Vt(\\\"eth_compileSerpent\\\");ht.prototype.newFilter=Vt(\\\"eth_newFilter\\\");ht.prototype.newBlockFilter=Vt(\\\"eth_newBlockFilter\\\");ht.prototype.newPendingTransactionFilter=Vt(\\\"eth_newPendingTransactionFilter\\\");ht.prototype.uninstallFilter=Vt(\\\"eth_uninstallFilter\\\");ht.prototype.getFilterChanges=Vt(\\\"eth_getFilterChanges\\\");ht.prototype.getFilterLogs=Vt(\\\"eth_getFilterLogs\\\");ht.prototype.getLogs=Vt(\\\"eth_getLogs\\\");ht.prototype.getWork=Vt(\\\"eth_getWork\\\");ht.prototype.submitWork=Vt(\\\"eth_submitWork\\\");ht.prototype.submitHashrate=Vt(\\\"eth_submitHashrate\\\");ht.prototype.sendAsync=function(t,e){this.currentProvider.sendAsync(kSt(t),function(n,i){if(!n&&i.error&&(n=new Error(\\\"EthQuery - RPC Error - \\\"+i.error.message)),n)return e(n);e(null,i.result)})};function Vt(t){return function(){let e=this;var r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function x9(t,e){return function(){let r=this;var n=[].slice.call(arguments),i=n.pop();n.length<t&&n.push(\\\"latest\\\"),r.sendAsync({method:e,params:n},i)}}function kSt(t){return OSt({id:NSt(),jsonrpc:\\\"2.0\\\",params:[]},t)}});var lFe=q((gsn,cFe)=>{\\\"use strict\\\";u();var oFe=(t,e,r,n)=>function(...i){let s=e.promiseModule;return new s((o,a)=>{e.multiArgs?i.push((...l)=>{e.errorFirst?l[0]?a(l):(l.shift(),o(l)):o(l)}):e.errorFirst?i.push((l,d)=>{l?a(l):o(d)}):i.push(o),Reflect.apply(t,this===r?n:this,i)})},aFe=new WeakMap;cFe.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};let r=typeof t;if(!(t!==null&&(r===\\\"object\\\"||r===\\\"function\\\")))throw new TypeError(`Expected \\\\`input\\\\` to be a \\\\`Function\\\\` or \\\\`Object\\\\`, got \\\\`${t===null?\\\"null\\\":r}\\\\``);let n=(o,a)=>{let c=aFe.get(o);if(c||(c={},aFe.set(o,c)),a in c)return c[a];let l=m=>typeof m==\\\"string\\\"||typeof a==\\\"symbol\\\"?a===m:m.test(a),d=Reflect.getOwnPropertyDescriptor(o,a),f=d===void 0||d.writable||d.configurable,h=(e.include?e.include.some(l):!e.exclude.some(l))&&f;return c[a]=h,h},i=new WeakMap,s=new Proxy(t,{apply(o,a,c){let l=i.get(o);if(l)return Reflect.apply(l,a,c);let d=e.excludeMain?o:oFe(o,e,s,o);return i.set(o,d),Reflect.apply(d,a,c)},get(o,a){let c=o[a];if(!n(o,a)||c===Function.prototype[a])return c;let l=i.get(c);if(l)return l;if(typeof c==\\\"function\\\"){let d=oFe(c,e,s,o);return i.set(c,d),d}return c}});return s}});var eH=q((bsn,uFe)=>{u();var BSt=yj().default,dse=class extends BSt{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error(\\\"BaseFilter - no update method specified\\\")}addResults(e){this.updates=this.updates.concat(e),e.forEach(r=>this.emit(\\\"update\\\",r))}addInitialResults(e){}getChangesAndClear(){let e=this.updates;return this.updates=[],e}};uFe.exports=dse});var fFe=q((vsn,dFe)=>{u();var MSt=eH(),fse=class extends MSt{constructor(){super(),this.allResults=[]}async update(){throw new Error(\\\"BaseFilterWithHistory - no update method specified\\\")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}};dFe.exports=fse});var oC=q((Esn,mFe)=>{u();mFe.exports={minBlockRef:DSt,maxBlockRef:LSt,sortBlockRefs:pse,bnToHex:USt,blockRefIsNumber:FSt,hexToInt:tH,incrementHexInt:jSt,intToHex:hFe,unsafeRandomBytes:HSt};function DSt(...t){return pse(t)[0]}function LSt(...t){let e=pse(t);return e[e.length-1]}function pse(t){return t.sort((e,r)=>e===\\\"latest\\\"||r===\\\"earliest\\\"?1:r===\\\"latest\\\"||e===\\\"earliest\\\"?-1:tH(e)-tH(r))}function USt(t){return\\\"0x\\\"+t.toString(16)}function FSt(t){return t&&![\\\"earliest\\\",\\\"latest\\\",\\\"pending\\\"].includes(t)}function tH(t){return t==null?t:Number.parseInt(t,16)}function jSt(t){if(t==null)return t;let e=tH(t);return hFe(e+1)}function hFe(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e=\\\"0\\\"+e),\\\"0x\\\"+e}function HSt(t){let e=\\\"0x\\\";for(let r=0;r<t;r++)e+=pFe(),e+=pFe();return e}function pFe(){return Math.floor(Math.random()*16).toString(16)}});var yFe=q((Ssn,gFe)=>{u();var qSt=sFe(),zSt=lFe(),$St=fFe(),{bnToHex:Csn,hexToInt:rH,incrementHexInt:VSt,minBlockRef:WSt,blockRefIsNumber:GSt}=oC(),hse=class extends $St{constructor({provider:e,params:r}){super(),this.type=\\\"log\\\",this.ethQuery=new qSt(e),this.params=Object.assign({fromBlock:\\\"latest\\\",toBlock:\\\"latest\\\",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(n=>n.toLowerCase()))}async initialize({currentBlock:e}){let r=this.params.fromBlock;[\\\"latest\\\",\\\"pending\\\"].includes(r)&&(r=e),r===\\\"earliest\\\"&&(r=\\\"0x0\\\"),this.params.fromBlock=r;let n=WSt(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:e,newBlock:r}){let n=r,i;e?i=VSt(e):i=r;let s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),a=(await this._fetchLogs(s)).filter(c=>this.matchLog(c));this.addResults(a)}async _fetchLogs(e){return await zSt(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(rH(this.params.fromBlock)>=rH(e.blockNumber)||GSt(this.params.toBlock)&&rH(this.params.toBlock)<=rH(e.blockNumber))return!1;let r=e.address&&e.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,s)=>{let o=e.topics[s];if(!o)return!1;o=o.toLowerCase();let a=Array.isArray(i)?i:[i];return a.includes(null)?!0:(a=a.map(d=>d.toLowerCase()),a.includes(o))})}};gFe.exports=hse});var nH=q((Tsn,wFe)=>{u();wFe.exports=KSt;async function KSt({provider:t,fromBlock:e,toBlock:r}){e||(e=r);let n=bFe(e),s=bFe(r)-n+1,o=Array(s).fill().map((c,l)=>n+l).map(ZSt),a=await Promise.all(o.map(c=>JSt(t,\\\"eth_getBlockByNumber\\\",[c,!1])));return a=a.filter(c=>c!==null),a}function bFe(t){return t==null?t:Number.parseInt(t,16)}function ZSt(t){return t==null?t:\\\"0x\\\"+t.toString(16)}function QSt(t,e){return new Promise((r,n)=>{t.sendAsync(e,(i,s)=>{i?n(i):s.error?n(s.error):s.result?r(s.result):n(new Error(\\\"Result was empty\\\"))})})}async function JSt(t,e,r){for(let n=0;n<3;n++)try{return await QSt(t,{id:1,jsonrpc:\\\"2.0\\\",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}});var xFe=q((Rsn,vFe)=>{u();var YSt=eH(),XSt=nH(),{incrementHexInt:eAt}=oC(),mse=class extends YSt{constructor({provider:e,params:r}){super(),this.type=\\\"block\\\",this.provider=e}async update({oldBlock:e,newBlock:r}){let n=r,i=eAt(e),o=(await XSt({provider:this.provider,fromBlock:i,toBlock:n})).map(a=>a.hash);this.addResults(o)}};vFe.exports=mse});var _Fe=q((Osn,EFe)=>{u();var tAt=eH(),rAt=nH(),{incrementHexInt:nAt}=oC(),gse=class extends tAt{constructor({provider:e}){super(),this.type=\\\"tx\\\",this.provider=e}async update({oldBlock:e}){let r=e,n=nAt(e),i=await rAt({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(let o of i)s.push(...o.transactions);this.addResults(s)}};EFe.exports=gse});var AFe=q((ksn,SFe)=>{u();var iAt=tFe().Mutex,{createAsyncMiddleware:sAt,createScaffoldMiddleware:oAt}=ose(),aAt=yFe(),cAt=xFe(),lAt=_Fe(),{intToHex:CFe,hexToInt:yse}=oC();SFe.exports=uAt;function uAt({blockTracker:t,provider:e}){let r=0,n={},i=new iAt,s=dAt({mutex:i}),o=oAt({eth_newFilter:s(bse(c)),eth_newBlockFilter:s(bse(l)),eth_newPendingTransactionFilter:s(bse(d)),eth_uninstallFilter:s(iH(h)),eth_getFilterChanges:s(iH(f)),eth_getFilterLogs:s(iH(p))}),a=async({oldBlock:b,newBlock:_})=>{if(n.length===0)return;let S=await i.acquire();try{await Promise.all(aC(n).map(async T=>{try{await T.update({oldBlock:b,newBlock:_})}catch(N){console.error(N)}}))}catch(T){console.error(T)}S()};return o.newLogFilter=c,o.newBlockFilter=l,o.newPendingTransactionFilter=d,o.uninstallFilter=h,o.getFilterChanges=f,o.getFilterLogs=p,o.destroy=()=>{w()},o;async function c(b){let _=new aAt({provider:e,params:b}),S=await m(_);return _}async function l(){let b=new cAt({provider:e}),_=await m(b);return b}async function d(){let b=new lAt({provider:e}),_=await m(b);return b}async function f(b){let _=yse(b),S=n[_];if(!S)throw new Error(`No filter for index \\\"${_}\\\"`);return S.getChangesAndClear()}async function p(b){let _=yse(b),S=n[_];if(!S)throw new Error(`No filter for index \\\"${_}\\\"`);let T=[];return S.type===\\\"log\\\"&&(T=S.getAllResults()),T}async function h(b){let _=yse(b),T=!!n[_];return T&&await g(_),T}async function m(b){let _=aC(n).length,S=await t.getLatestBlock();await b.initialize({currentBlock:S}),r++,n[r]=b,b.id=r,b.idHex=CFe(r);let T=aC(n).length;return v({prevFilterCount:_,newFilterCount:T}),r}async function g(b){let _=aC(n).length;delete n[b];let S=aC(n).length;v({prevFilterCount:_,newFilterCount:S})}async function w(){let b=aC(n).length;n={},v({prevFilterCount:b,newFilterCount:0})}function v({prevFilterCount:b,newFilterCount:_}){if(b===0&&_>0){t.on(\\\"sync\\\",a);return}if(b>0&&_===0){t.removeListener(\\\"sync\\\",a);return}}}function bse(t){return iH(async(...e)=>{let r=await t(...e);return CFe(r.id)})}function iH(t){return sAt(async(e,r)=>{let n=await t.apply(null,e.params);r.result=n})}function dAt({mutex:t}){return e=>async(r,n,i,s)=>{(await t.acquire())(),e(r,n,i,s)}}function aC(t,e){let r=[];for(let n in t)r.push(t[n]);return r}});var RFe=q((Msn,IFe)=>{u();var fAt=yj().default,{createAsyncMiddleware:TFe,createScaffoldMiddleware:pAt}=ose(),hAt=AFe(),{unsafeRandomBytes:mAt,incrementHexInt:gAt}=oC(),yAt=nH();IFe.exports=bAt;function bAt({blockTracker:t,provider:e}){let r={},n=hAt({blockTracker:t,provider:e}),i=!1,s=new fAt,o=pAt({eth_subscribe:TFe(a),eth_unsubscribe:TFe(c)});return o.destroy=d,{events:s,middleware:o};async function a(f,p){if(i)throw new Error(\\\"SubscriptionManager - attempting to use after destroying\\\");let h=f.params[0],m=mAt(16),g;switch(h){case\\\"newHeads\\\":g=w({subId:m});break;case\\\"logs\\\":let b=f.params[1],_=await n.newLogFilter(b);g=v({subId:m,filter:_});break;default:throw new Error(`SubscriptionManager - unsupported subscription type \\\"${h}\\\"`)}r[m]=g,p.result=m;return;function w({subId:b}){let _={type:h,destroy:async()=>{t.removeListener(\\\"sync\\\",_.update)},update:async({oldBlock:S,newBlock:T})=>{let N=T,O=gAt(S);(await yAt({provider:e,fromBlock:O,toBlock:N})).map(wAt).filter(H=>H!==null).forEach(H=>{l(b,H)})}};return t.on(\\\"sync\\\",_.update),_}function v({subId:b,filter:_}){return _.on(\\\"update\\\",T=>l(b,T)),{type:h,destroy:async()=>await n.uninstallFilter(_.idHex)}}}async function c(f,p){if(i)throw new Error(\\\"SubscriptionManager - attempting to use after destroying\\\");let h=f.params[0],m=r[h];if(!m){p.result=!1;return}delete r[h],await m.destroy(),p.result=!0}function l(f,p){s.emit(\\\"notification\\\",{jsonrpc:\\\"2.0\\\",method:\\\"eth_subscription\\\",params:{subscription:f,result:p}})}function d(){s.removeAllListeners();for(let f in r)r[f].destroy(),delete r[f];i=!0}}function wAt(t){return t==null?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}});var OFe=q(sH=>{\\\"use strict\\\";u();Object.defineProperty(sH,\\\"__esModule\\\",{value:!0});sH.SubscriptionManager=void 0;var vAt=XLe(),xAt=RFe(),PFe=()=>{},wse=class{constructor(e){let r=new vAt.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=xAt({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){let r={};return await this.subscriptionMiddleware(e,r,PFe,PFe),r}destroy(){this.subscriptionMiddleware.destroy()}};sH.SubscriptionManager=wse});var aH=q(cC=>{\\\"use strict\\\";u();var MFe=cC&&cC.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cC,\\\"__esModule\\\",{value:!0});cC.CoinbaseWalletProvider=void 0;var EAt=MFe(SI()),_At=sRe(),gr=TI(),Bt=Np(),CAt=Nne(),NFe=nF(),oH=_F(),Nl=KU(),vse=MFe(VBe()),E9=rF(),SAt=QBe(),AAt=OFe(),kFe=\\\"DefaultChainId\\\",BFe=\\\"DefaultJsonRpcUrl\\\",xse=class extends _At.EventEmitter{constructor(e){var r,n;super(),this._filterPolyfill=new SAt.FilterPolyfill(this),this._subscriptionManager=new AAt.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;let i=this.getChainId(),s=(0,Bt.prepend0x)(i.toString(16));this.emit(\\\"connect\\\",{chainIdStr:s});let o=this._storage.getItem(NFe.LOCAL_STORAGE_ADDRESSES_KEY);if(o){let a=o.split(\\\" \\\");a[0]!==\\\"\\\"&&(this._addresses=a.map(c=>(0,Bt.ensureAddressString)(c)),this.emit(\\\"accountsChanged\\\",a))}this._subscriptionManager.events.on(\\\"notification\\\",a=>{this.emit(\\\"message\\\",{type:a.method,data:a.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener(\\\"message\\\",a=>{var c;if(!(a.origin!==location.origin||a.source!==window)&&a.data.type===\\\"walletLinkMessage\\\"&&a.data.data.action===\\\"dappChainSwitched\\\"){let l=a.data.data.chainId,d=(c=a.data.data.jsonRpcUrl)!==null&&c!==void 0?c:this.jsonRpcUrl;this.updateProviderInfo(d,Number(l))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,Bt.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(BFe))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(BFe,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,r){this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(kFe,r.toString(10)),((0,Bt.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit(\\\"chainChanged\\\",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,s,o){let c=await(await this.initializeRelay()).watchAsset(e,r,n,i,s,o?.toString()).promise;return(0,Nl.isErrorResponse)(c)?!1:!!c.result}async addEthereumChain(e,r,n,i,s,o){var a,c;if((0,Bt.ensureIntNumber)(e)===this.getChainId())return!1;let l=await this.initializeRelay(),d=l.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!d&&await l.requestEthereumAccounts().promise;let f=await l.addEthereumChain(e.toString(),r,s,n,i,o).promise;return(0,Nl.isErrorResponse)(f)?!1:(((a=f.result)===null||a===void 0?void 0:a.isApproved)===!0&&this.updateProviderInfo(r[0],e),((c=f.result)===null||c===void 0?void 0:c.isApproved)===!0)}async switchEthereumChain(e){let n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,Nl.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===gr.standardErrorCodes.provider.unsupportedChain?gr.standardErrors.provider.unsupportedChain():gr.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}let i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,r){this.initializeRelay().then(n=>n.setAppInfo(e,r))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(E9.EVENTS.ETH_ACCOUNTS_STATE,{method:\\\"provider::enable\\\",addresses_length:this._addresses.length,sessionIdHash:this._relay?oH.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send(\\\"eth_requestAccounts\\\")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,r){try{let n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,gr.serializeError)(i,e)})}catch(n){throw(0,gr.serializeError)(n,e)}}_send(e,r){if(typeof e==\\\"string\\\"){let i=e,s=Array.isArray(r)?r:r!==void 0?[r]:[],o={jsonrpc:\\\"2.0\\\",id:0,method:i,params:s};return this._sendRequestAsync(o).then(a=>a.result)}if(typeof r==\\\"function\\\"){let i=e,s=r;return this._sendAsync(i,s)}if(Array.isArray(e))return e.map(s=>this._sendRequest(s));let n=e;return this._sendRequest(n)}async sendAsync(e,r){try{return this._sendAsync(e,r).catch(n=>{throw(0,gr.serializeError)(n,e)})}catch(n){return Promise.reject((0,gr.serializeError)(n,e))}}async _sendAsync(e,r){if(typeof r!=\\\"function\\\")throw new Error(\\\"callback is required\\\");if(Array.isArray(e)){let i=r;this._sendMultipleRequestsAsync(e).then(s=>i(null,s)).catch(s=>i(s,null));return}let n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(r=>{throw(0,gr.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,gr.serializeError)(r,e.method))}}async _request(e){if(!e||typeof e!=\\\"object\\\"||Array.isArray(e))throw gr.standardErrors.rpc.invalidRequest({message:\\\"Expected a single, non-array, object argument.\\\",data:e});let{method:r,params:n}=e;if(typeof r!=\\\"string\\\"||r.length===0)throw gr.standardErrors.rpc.invalidRequest({message:\\\"'args.method' must be a non-empty string.\\\",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!=\\\"object\\\"||n===null))throw gr.standardErrors.rpc.invalidRequest({message:\\\"'args.params' must be an object or array if provided.\\\",data:e});let i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:\\\"2.0\\\",id:s})).result}async scanQRCode(e){let n=await(await this.initializeRelay()).scanQRCode((0,Bt.ensureRegExpString)(e)).promise;if((0,Nl.isErrorResponse)(n))throw(0,gr.serializeError)(n.errorMessage,\\\"scanQRCode\\\");if(typeof n.result!=\\\"string\\\")throw(0,gr.serializeError)(\\\"result was not a string\\\",\\\"scanQRCode\\\");return n.result}async genericRequest(e,r){let i=await(await this.initializeRelay()).genericRequest(e,r).promise;if((0,Nl.isErrorResponse)(i))throw(0,gr.serializeError)(i.errorMessage,\\\"generic\\\");if(typeof i.result!=\\\"string\\\")throw(0,gr.serializeError)(\\\"result was not a string\\\",\\\"generic\\\");return i.result}async connectAndSignIn(e){var r;(r=this.diagnostic)===null||r===void 0||r.log(E9.EVENTS.ETH_ACCOUNTS_STATE,{method:\\\"provider::connectAndSignIn\\\",sessionIdHash:this._relay?oH.Session.hash(this._relay.session.id):void 0});let n;try{let s=await this.initializeRelay();if(!(s instanceof CAt.MobileRelay))throw new Error(\\\"connectAndSignIn is only supported on mobile\\\");if(n=await s.connectAndSignIn(e).promise,(0,Nl.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message==\\\"string\\\"&&s.message.match(/(denied|rejected)/i)?gr.standardErrors.provider.userRejectedRequest(\\\"User denied account authorization\\\"):s}if(!n.result)throw new Error(\\\"accounts received is empty\\\");let{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(e){let n=await(await this.initializeRelay()).selectProvider(e).promise;if((0,Nl.isErrorResponse)(n))throw(0,gr.serializeError)(n.errorMessage,\\\"selectProvider\\\");if(typeof n.result!=\\\"string\\\")throw(0,gr.serializeError)(\\\"result was not a string\\\",\\\"selectProvider\\\");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error(\\\"Subscriptions are not supported\\\")}unsubscribe(){throw new Error(\\\"Subscriptions are not supported\\\")}disconnect(){return!0}_sendRequest(e){let r={jsonrpc:\\\"2.0\\\",id:e.id},{method:n}=e;if(r.result=this._handleSynchronousMethods(e),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(e,r){if(!Array.isArray(e))throw new Error(\\\"addresses is not an array\\\");let n=e.map(i=>(0,Bt.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit(\\\"accountsChanged\\\",this._addresses),this._storage.setItem(NFe.LOCAL_STORAGE_ADDRESSES_KEY,n.join(\\\" \\\")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{let i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:\\\"2.0\\\",id:e.id,result:i});let s=this._handleAsynchronousFilterMethods(e);if(s!==void 0){s.then(a=>r(Object.assign(Object.assign({},a),{id:e.id}))).catch(a=>n(a));return}let o=this._handleSubscriptionMethods(e);if(o!==void 0){o.then(a=>r({jsonrpc:\\\"2.0\\\",id:e.id,result:a.result})).catch(a=>n(a));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case\\\"eth_accounts\\\":return this._eth_accounts();case\\\"eth_coinbase\\\":return this._eth_coinbase();case\\\"eth_uninstallFilter\\\":return this._eth_uninstallFilter(n);case\\\"net_version\\\":return this._net_version();case\\\"eth_chainId\\\":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case\\\"eth_requestAccounts\\\":return this._eth_requestAccounts();case\\\"eth_sign\\\":return this._eth_sign(n);case\\\"eth_ecRecover\\\":return this._eth_ecRecover(n);case\\\"personal_sign\\\":return this._personal_sign(n);case\\\"personal_ecRecover\\\":return this._personal_ecRecover(n);case\\\"eth_signTransaction\\\":return this._eth_signTransaction(n);case\\\"eth_sendRawTransaction\\\":return this._eth_sendRawTransaction(n);case\\\"eth_sendTransaction\\\":return this._eth_sendTransaction(n);case\\\"eth_signTypedData_v1\\\":return this._eth_signTypedData_v1(n);case\\\"eth_signTypedData_v2\\\":return this._throwUnsupportedMethodError();case\\\"eth_signTypedData_v3\\\":return this._eth_signTypedData_v3(n);case\\\"eth_signTypedData_v4\\\":case\\\"eth_signTypedData\\\":return this._eth_signTypedData_v4(n);case\\\"cbWallet_arbitrary\\\":return this._cbwallet_arbitrary(n);case\\\"wallet_addEthereumChain\\\":return this._wallet_addEthereumChain(n);case\\\"wallet_switchEthereumChain\\\":return this._wallet_switchEthereumChain(n);case\\\"wallet_watchAsset\\\":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(s=>{var o;throw(s.code===gr.standardErrorCodes.rpc.methodNotFound||s.code===gr.standardErrorCodes.rpc.methodNotSupported)&&((o=this.diagnostic)===null||o===void 0||o.log(E9.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?oH.Session.hash(this._relay.session.id):void 0})),s})}_handleAsynchronousFilterMethods(e){let{method:r}=e,n=e.params||[];switch(r){case\\\"eth_newFilter\\\":return this._eth_newFilter(n);case\\\"eth_newBlockFilter\\\":return this._eth_newBlockFilter();case\\\"eth_newPendingTransactionFilter\\\":return this._eth_newPendingTransactionFilter();case\\\"eth_getFilterChanges\\\":return this._eth_getFilterChanges(n);case\\\"eth_getFilterLogs\\\":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case\\\"eth_subscribe\\\":case\\\"eth_unsubscribe\\\":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{let r=(0,Bt.ensureAddressString)(e);return this._addresses.map(i=>(0,Bt.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){var r;if(!this._isKnownAddress(e))throw(r=this.diagnostic)===null||r===void 0||r.log(E9.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error(\\\"Unknown Ethereum address\\\")}_prepareTransactionParams(e){let r=e.from?(0,Bt.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error(\\\"Ethereum address is unavailable\\\");this._ensureKnownAddress(r);let n=e.to?(0,Bt.ensureAddressString)(e.to):null,i=e.value!=null?(0,Bt.ensureBN)(e.value):new EAt.default(0),s=e.data?(0,Bt.ensureBuffer)(e.data):globalThis.Buffer.alloc(0),o=e.nonce!=null?(0,Bt.ensureIntNumber)(e.nonce):null,a=e.gasPrice!=null?(0,Bt.ensureBN)(e.gasPrice):null,c=e.maxFeePerGas!=null?(0,Bt.ensureBN)(e.maxFeePerGas):null,l=e.maxPriorityFeePerGas!=null?(0,Bt.ensureBN)(e.maxPriorityFeePerGas):null,d=e.gas!=null?(0,Bt.ensureBN)(e.gas):null,f=e.chainId?(0,Bt.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:o,gasPriceInWei:a,maxFeePerGas:c,maxPriorityFeePerGas:l,gasLimit:d,chainId:f}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw gr.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw gr.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{let o=await(await this.initializeRelay()).signEthereumMessage(e,r,n,i).promise;if((0,Nl.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:\\\"2.0\\\",id:0,result:o.result}}catch(s){throw typeof s.message==\\\"string\\\"&&s.message.match(/(denied|rejected)/i)?gr.standardErrors.provider.userRejectedRequest(\\\"User denied message signature\\\"):s}}async _ethereumAddressFromSignedMessage(e,r,n){let s=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise;if((0,Nl.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:\\\"2.0\\\",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,Bt.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(kFe);if(!e)return(0,Bt.ensureIntNumber)(this._chainIdFromOpts);let r=parseInt(e,10);return(0,Bt.ensureIntNumber)(r)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(E9.EVENTS.ETH_ACCOUNTS_STATE,{method:\\\"provider::_eth_requestAccounts\\\",addresses_length:this._addresses.length,sessionIdHash:this._relay?oH.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:\\\"2.0\\\",id:0,result:this._addresses});let r;try{if(r=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,Nl.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(n){throw typeof n.message==\\\"string\\\"&&n.message.match(/(denied|rejected)/i)?gr.standardErrors.provider.userRejectedRequest(\\\"User denied account authorization\\\"):n}if(!r.result)throw new Error(\\\"accounts received is empty\\\");return this._setAddresses(r.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:\\\"2.0\\\",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();let r=(0,Bt.ensureAddressString)(e[0]),n=(0,Bt.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){let r=(0,Bt.ensureBuffer)(e[0]),n=(0,Bt.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();let r=(0,Bt.ensureBuffer)(e[0]),n=(0,Bt.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){let r=(0,Bt.ensureBuffer)(e[0]),n=(0,Bt.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await(await this.initializeRelay()).signEthereumTransaction(r).promise;if((0,Nl.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:\\\"2.0\\\",id:0,result:i.result}}catch(n){throw typeof n.message==\\\"string\\\"&&n.message.match(/(denied|rejected)/i)?gr.standardErrors.provider.userRejectedRequest(\\\"User denied transaction signature\\\"):n}}async _eth_sendRawTransaction(e){let r=(0,Bt.ensureBuffer)(e[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise;if((0,Nl.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:\\\"2.0\\\",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise;if((0,Nl.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:\\\"2.0\\\",id:0,result:i.result}}catch(n){throw typeof n.message==\\\"string\\\"&&n.message.match(/(denied|rejected)/i)?gr.standardErrors.provider.userRejectedRequest(\\\"User denied transaction signature\\\"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();let r=(0,Bt.ensureParsedJSONObject)(e[0]),n=(0,Bt.ensureAddressString)(e[1]);this._ensureKnownAddress(n);let i=vse.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(e){this._requireAuthorization();let r=(0,Bt.ensureAddressString)(e[0]),n=(0,Bt.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=vse.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _eth_signTypedData_v4(e){this._requireAuthorization();let r=(0,Bt.ensureAddressString)(e[0]),n=(0,Bt.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=vse.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _cbwallet_arbitrary(e){let r=e[0],n=e[1];if(typeof n!=\\\"string\\\")throw new Error(\\\"parameter must be a string\\\");if(typeof r!=\\\"object\\\"||r===null)throw new Error(\\\"parameter must be an object\\\");return{jsonrpc:\\\"2.0\\\",id:0,result:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(e){var r,n,i,s;let o=e[0];if(((r=o.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:\\\"2.0\\\",id:0,error:{code:2,message:\\\"please pass in at least 1 rpcUrl\\\"}};if(!o.chainName||o.chainName.trim()===\\\"\\\")throw gr.standardErrors.rpc.invalidParams(\\\"chainName is a required field\\\");if(!o.nativeCurrency)throw gr.standardErrors.rpc.invalidParams(\\\"nativeCurrency is a required field\\\");let a=parseInt(o.chainId,16);return await this.addEthereumChain(a,(n=o.rpcUrls)!==null&&n!==void 0?n:[],(i=o.blockExplorerUrls)!==null&&i!==void 0?i:[],o.chainName,(s=o.iconUrls)!==null&&s!==void 0?s:[],o.nativeCurrency)?{jsonrpc:\\\"2.0\\\",id:0,result:null}:{jsonrpc:\\\"2.0\\\",id:0,error:{code:2,message:\\\"unable to add ethereum chain\\\"}}}async _wallet_switchEthereumChain(e){let r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:\\\"2.0\\\",id:0,result:null}}async _wallet_watchAsset(e){let r=Array.isArray(e)?e[0]:e;if(!r.type)throw gr.standardErrors.rpc.invalidParams(\\\"Type is required\\\");if(r?.type!==\\\"ERC20\\\")throw gr.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw gr.standardErrors.rpc.invalidParams(\\\"Options are required\\\");if(!r?.options.address)throw gr.standardErrors.rpc.invalidParams(\\\"Address is required\\\");let n=this.getChainId(),{address:i,symbol:s,image:o,decimals:a}=r.options;return{jsonrpc:\\\"2.0\\\",id:0,result:await this.watchAsset(r.type,i,s,a,o,n)}}_eth_uninstallFilter(e){let r=(0,Bt.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(e){let r=e[0];return{jsonrpc:\\\"2.0\\\",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:\\\"2.0\\\",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:\\\"2.0\\\",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){let r=(0,Bt.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){let r=(0,Bt.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}};cC.CoinbaseWalletProvider=xse});var DFe=q(cH=>{\\\"use strict\\\";u();Object.defineProperty(cH,\\\"__esModule\\\",{value:!0});cH.RelayEventManager=void 0;var TAt=Np(),Ese=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=(0,TAt.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}};cH.RelayEventManager=Ese});var _se=q(uH=>{\\\"use strict\\\";u();Object.defineProperty(uH,\\\"__esModule\\\",{value:!0});uH.CoinbaseWalletSDK=void 0;var IAt=k7e(),RAt=B7e(),LFe=Np(),PAt=nRe(),OAt=aH(),NAt=Nne(),kAt=Pne(),BAt=DFe(),MAt=Sne(),DAt=Ane(),UFe=QU(),lH=class t{constructor(e){var r,n,i;this._appName=\\\"\\\",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let s=e.linkAPIUrl||RAt.LINK_API_URL;typeof e.overrideIsMetaMask>\\\"u\\\"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;let o=new URL(s),a=`${o.protocol}//${o.host}`;if(this._storage=new PAt.ScopedLocalStorage(`-walletlink:${a}`),this._storage.setItem(\\\"version\\\",t.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new BAt.RelayEventManager;let c=(0,LFe.isMobileWeb)(),l=e.uiConstructor||(f=>c?new kAt.MobileRelayUI(f):new MAt.WalletLinkRelayUI(f)),d={linkAPIUrl:s,version:UFe.LIB_VERSION,darkMode:!!e.darkMode,headlessMode:!!e.headlessMode,uiConstructor:l,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=c?new NAt.MobileRelay(d):new DAt.WalletLinkRelay(d),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e=\\\"\\\",r=1){let n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect==\\\"function\\\"&&n.disableReloadOnDisconnect(),n;let i=this.coinbaseBrowser;if(i)return i;let s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error(\\\"Relay not initialized, should never happen\\\");return e||s.setConnectDisabled(!0),new OAt.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||\\\"DApp\\\",this._appLogoUrl=r||(0,LFe.getFavicon)();let i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;let r=this===null||this===void 0?void 0:this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,IAt.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{let n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&\\\"isCoinbaseBrowser\\\"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher==\\\"boolean\\\"&&e.isCipher}};uH.CoinbaseWalletSDK=lH;lH.VERSION=UFe.LIB_VERSION});var jFe=q(f2=>{\\\"use strict\\\";u();Object.defineProperty(f2,\\\"__esModule\\\",{value:!0});f2.CoinbaseWalletProvider=f2.CoinbaseWalletSDK=void 0;var Cse=_se(),FFe=aH(),LAt=_se();Object.defineProperty(f2,\\\"CoinbaseWalletSDK\\\",{enumerable:!0,get:function(){return LAt.CoinbaseWalletSDK}});var UAt=aH();Object.defineProperty(f2,\\\"CoinbaseWalletProvider\\\",{enumerable:!0,get:function(){return UAt.CoinbaseWalletProvider}});f2.default=Cse.CoinbaseWalletSDK;typeof window<\\\"u\\\"&&(window.CoinbaseWalletSDK=Cse.CoinbaseWalletSDK,window.CoinbaseWalletProvider=FFe.CoinbaseWalletProvider,window.WalletLink=Cse.CoinbaseWalletSDK,window.WalletLinkProvider=FFe.CoinbaseWalletProvider)});function p2(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function Ase(t,e){let r,n=()=>{if(r)return r;let i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),r=p2(i),r.then(s=>{s.onclose=()=>r=void 0},()=>{}),r};return(i,s)=>n().then(o=>s(o.transaction(e,i).objectStore(e)))}function _9(){return Sse||(Sse=Ase(\\\"keyval-store\\\",\\\"keyval\\\")),Sse}function Tse(t,e=_9()){return e(\\\"readonly\\\",r=>p2(r.get(t)))}function HFe(t,e,r=_9()){return r(\\\"readwrite\\\",n=>(n.put(e,t),p2(n.transaction)))}function qFe(t,e=_9()){return e(\\\"readwrite\\\",r=>(r.delete(t),p2(r.transaction)))}function zFe(t=_9()){return t(\\\"readwrite\\\",e=>(e.clear(),p2(e.transaction)))}function HAt(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},p2(t.transaction)}function $Fe(t=_9()){return t(\\\"readonly\\\",e=>{if(e.getAllKeys)return p2(e.getAllKeys());let r=[];return HAt(e,n=>r.push(n.key)).then(()=>r)})}var Sse,VFe=x(()=>{u()});function dH(t){return t?ZFe(t):typeof document>\\\"u\\\"&&typeof navigator<\\\"u\\\"&&navigator.product===\\\"ReactNative\\\"?new WAt:typeof navigator<\\\"u\\\"?ZFe(navigator.userAgent):YAt()}function QAt(t){return t!==\\\"\\\"&&ZAt.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function ZFe(t){var e=QAt(t);if(!e)return null;var r=e[0],n=e[1];if(r===\\\"searchbot\\\")return new VAt;var i=n[1]&&n[1].split(\\\".\\\").join(\\\"_\\\").split(\\\"_\\\").slice(0,3);i?i.length<GFe&&(i=WFe(WFe([],i,!0),XAt(GFe-i.length),!0)):i=[];var s=i.join(\\\".\\\"),o=JAt(t),a=KAt.exec(t);return a&&a[1]?new $At(r,s,o,a[1]):new qAt(r,s,o)}function JAt(t){for(var e=0,r=KFe.length;e<r;e++){var n=KFe[e],i=n[0],s=n[1],o=s.exec(t);if(o)return i}return null}function YAt(){var t=typeof process<\\\"u\\\"&&process.version;return t?new zAt(process.version.slice(1)):null}function XAt(t){for(var e=[],r=0;r<t;r++)e.push(\\\"0\\\");return e}var WFe,qAt,zAt,$At,VAt,WAt,GAt,KAt,GFe,ZAt,KFe,Ise=x(()=>{u();WFe=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},qAt=(function(){function t(e,r,n){this.name=e,this.version=r,this.os=n,this.type=\\\"browser\\\"}return t})(),zAt=(function(){function t(e){this.version=e,this.type=\\\"node\\\",this.name=\\\"node\\\",this.os=process.platform}return t})(),$At=(function(){function t(e,r,n,i){this.name=e,this.version=r,this.os=n,this.bot=i,this.type=\\\"bot-device\\\"}return t})(),VAt=(function(){function t(){this.type=\\\"bot\\\",this.bot=!0,this.name=\\\"bot\\\",this.version=null,this.os=null}return t})(),WAt=(function(){function t(){this.type=\\\"react-native\\\",this.name=\\\"react-native\\\",this.version=null,this.os=null}return t})(),GAt=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,KAt=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\\\ Jeeves\\\\/Teoma|ia_archiver)/,GFe=3,ZAt=[[\\\"aol\\\",/AOLShield\\\\/([0-9\\\\._]+)/],[\\\"edge\\\",/Edge\\\\/([0-9\\\\._]+)/],[\\\"edge-ios\\\",/EdgiOS\\\\/([0-9\\\\._]+)/],[\\\"yandexbrowser\\\",/YaBrowser\\\\/([0-9\\\\._]+)/],[\\\"kakaotalk\\\",/KAKAOTALK\\\\s([0-9\\\\.]+)/],[\\\"samsung\\\",/SamsungBrowser\\\\/([0-9\\\\.]+)/],[\\\"silk\\\",/\\\\bSilk\\\\/([0-9._-]+)\\\\b/],[\\\"miui\\\",/MiuiBrowser\\\\/([0-9\\\\.]+)$/],[\\\"beaker\\\",/BeakerBrowser\\\\/([0-9\\\\.]+)/],[\\\"edge-chromium\\\",/EdgA?\\\\/([0-9\\\\.]+)/],[\\\"chromium-webview\\\",/(?!Chrom.*OPR)wv\\\\).*Chrom(?:e|ium)\\\\/([0-9\\\\.]+)(:?\\\\s|$)/],[\\\"chrome\\\",/(?!Chrom.*OPR)Chrom(?:e|ium)\\\\/([0-9\\\\.]+)(:?\\\\s|$)/],[\\\"phantomjs\\\",/PhantomJS\\\\/([0-9\\\\.]+)(:?\\\\s|$)/],[\\\"crios\\\",/CriOS\\\\/([0-9\\\\.]+)(:?\\\\s|$)/],[\\\"firefox\\\",/Firefox\\\\/([0-9\\\\.]+)(?:\\\\s|$)/],[\\\"fxios\\\",/FxiOS\\\\/([0-9\\\\.]+)/],[\\\"opera-mini\\\",/Opera Mini.*Version\\\\/([0-9\\\\.]+)/],[\\\"opera\\\",/Opera\\\\/([0-9\\\\.]+)(?:\\\\s|$)/],[\\\"opera\\\",/OPR\\\\/([0-9\\\\.]+)(:?\\\\s|$)/],[\\\"pie\\\",/^Microsoft Pocket Internet Explorer\\\\/(\\\\d+\\\\.\\\\d+)$/],[\\\"pie\\\",/^Mozilla\\\\/\\\\d\\\\.\\\\d+\\\\s\\\\(compatible;\\\\s(?:MSP?IE|MSInternet Explorer) (\\\\d+\\\\.\\\\d+);.*Windows CE.*\\\\)$/],[\\\"netfront\\\",/^Mozilla\\\\/\\\\d\\\\.\\\\d+.*NetFront\\\\/(\\\\d.\\\\d)/],[\\\"ie\\\",/Trident\\\\/7\\\\.0.*rv\\\\:([0-9\\\\.]+).*\\\\).*Gecko$/],[\\\"ie\\\",/MSIE\\\\s([0-9\\\\.]+);.*Trident\\\\/[4-7].0/],[\\\"ie\\\",/MSIE\\\\s(7\\\\.0)/],[\\\"bb10\\\",/BB10;\\\\sTouch.*Version\\\\/([0-9\\\\.]+)/],[\\\"android\\\",/Android\\\\s([0-9\\\\.]+)/],[\\\"ios\\\",/Version\\\\/([0-9\\\\._]+).*Mobile.*Safari.*/],[\\\"safari\\\",/Version\\\\/([0-9\\\\._]+).*Safari/],[\\\"facebook\\\",/FB[AS]V\\\\/([0-9\\\\.]+)/],[\\\"instagram\\\",/Instagram\\\\s([0-9\\\\.]+)/],[\\\"ios-webview\\\",/AppleWebKit\\\\/([0-9\\\\.]+).*Mobile/],[\\\"ios-webview\\\",/AppleWebKit\\\\/([0-9\\\\.]+).*Gecko\\\\)$/],[\\\"curl\\\",/^curl\\\\/([0-9\\\\.]+)$/],[\\\"searchbot\\\",GAt]],KFe=[[\\\"iOS\\\",/iP(hone|od|ad)/],[\\\"Android OS\\\",/Android/],[\\\"BlackBerry OS\\\",/BlackBerry|BB10/],[\\\"Windows Mobile\\\",/IEMobile/],[\\\"Amazon OS\\\",/Kindle/],[\\\"Windows 3.11\\\",/Win16/],[\\\"Windows 95\\\",/(Windows 95)|(Win95)|(Windows_95)/],[\\\"Windows 98\\\",/(Windows 98)|(Win98)/],[\\\"Windows 2000\\\",/(Windows NT 5.0)|(Windows 2000)/],[\\\"Windows XP\\\",/(Windows NT 5.1)|(Windows XP)/],[\\\"Windows Server 2003\\\",/(Windows NT 5.2)/],[\\\"Windows Vista\\\",/(Windows NT 6.0)/],[\\\"Windows 7\\\",/(Windows NT 6.1)/],[\\\"Windows 8\\\",/(Windows NT 6.2)/],[\\\"Windows 8.1\\\",/(Windows NT 6.3)/],[\\\"Windows 10\\\",/(Windows NT 10.0)/],[\\\"Windows ME\\\",/Windows ME/],[\\\"Windows CE\\\",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],[\\\"Open BSD\\\",/OpenBSD/],[\\\"Sun OS\\\",/SunOS/],[\\\"Chrome OS\\\",/CrOS/],[\\\"Linux\\\",/(Linux)|(X11)/],[\\\"Mac OS\\\",/(Mac_PowerPC)|(Macintosh)/],[\\\"QNX\\\",/QNX/],[\\\"BeOS\\\",/BeOS/],[\\\"OS/2\\\",/OS\\\\/2/]]});var dC=q((ton,pH)=>{u();var QFe,JFe,YFe,XFe,eje,tje,rje,nje,ije,fH,Rse,sje,oje,uC,aje,cje,lje,uje,dje,fje,pje,hje,mje;(function(t){var e=typeof globalThis==\\\"object\\\"?globalThis:typeof self==\\\"object\\\"?self:typeof this==\\\"object\\\"?this:{};typeof define==\\\"function\\\"&&define.amd?define(\\\"tslib\\\",[\\\"exports\\\"],function(n){t(r(e,r(n)))}):typeof pH==\\\"object\\\"&&typeof pH.exports==\\\"object\\\"?t(r(e,r(pH.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create==\\\"function\\\"?Object.defineProperty(n,\\\"__esModule\\\",{value:!0}):n.__esModule=!0),function(s,o){return n[s]=i?i(s,o):o}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])};QFe=function(r,n){e(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},JFe=Object.assign||function(r){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},YFe=function(r,n){var i={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&n.indexOf(s)<0&&(i[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols==\\\"function\\\")for(var o=0,s=Object.getOwnPropertySymbols(r);o<s.length;o++)n.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(r,s[o])&&(i[s[o]]=r[s[o]]);return i},XFe=function(r,n,i,s){var o=arguments.length,a=o<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,i):s,c;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")a=Reflect.decorate(r,n,i,s);else for(var l=r.length-1;l>=0;l--)(c=r[l])&&(a=(o<3?c(a):o>3?c(n,i,a):c(n,i))||a);return o>3&&a&&Object.defineProperty(n,i,a),a},eje=function(r,n){return function(i,s){n(i,s,r)}},tje=function(r,n){if(typeof Reflect==\\\"object\\\"&&typeof Reflect.metadata==\\\"function\\\")return Reflect.metadata(r,n)},rje=function(r,n,i,s){function o(a){return a instanceof i?a:new i(function(c){c(a)})}return new(i||(i=Promise))(function(a,c){function l(p){try{f(s.next(p))}catch(h){c(h)}}function d(p){try{f(s.throw(p))}catch(h){c(h)}}function f(p){p.done?a(p.value):o(p.value).then(l,d)}f((s=s.apply(r,n||[])).next())})},nje=function(r,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol==\\\"function\\\"&&(c[Symbol.iterator]=function(){return this}),c;function l(f){return function(p){return d([f,p])}}function d(f){if(s)throw new TypeError(\\\"Generator is already executing.\\\");for(;i;)try{if(s=1,o&&(a=f[0]&2?o.return:f[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,f[1])).done)return a;switch(o=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,o=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){i=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){i.label=f[1];break}if(f[0]===6&&i.label<a[1]){i.label=a[1],a=f;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(f);break}a[2]&&i.ops.pop(),i.trys.pop();continue}f=n.call(r,i)}catch(p){f=[6,p],o=0}finally{s=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},mje=function(r,n,i,s){s===void 0&&(s=i),r[s]=n[i]},ije=function(r,n){for(var i in r)i!==\\\"default\\\"&&!n.hasOwnProperty(i)&&(n[i]=r[i])},fH=function(r){var n=typeof Symbol==\\\"function\\\"&&Symbol.iterator,i=n&&r[n],s=0;if(i)return i.call(r);if(r&&typeof r.length==\\\"number\\\")return{next:function(){return r&&s>=r.length&&(r=void 0),{value:r&&r[s++],done:!r}}};throw new TypeError(n?\\\"Object is not iterable.\\\":\\\"Symbol.iterator is not defined.\\\")},Rse=function(r,n){var i=typeof Symbol==\\\"function\\\"&&r[Symbol.iterator];if(!i)return r;var s=i.call(r),o,a=[],c;try{for(;(n===void 0||n-- >0)&&!(o=s.next()).done;)a.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(c)throw c.error}}return a},sje=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Rse(arguments[n]));return r},oje=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var s=Array(r),o=0,n=0;n<i;n++)for(var a=arguments[n],c=0,l=a.length;c<l;c++,o++)s[o]=a[c];return s},uC=function(r){return this instanceof uC?(this.v=r,this):new uC(r)},aje=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError(\\\"Symbol.asyncIterator is not defined.\\\");var s=i.apply(r,n||[]),o,a=[];return o={},c(\\\"next\\\"),c(\\\"throw\\\"),c(\\\"return\\\"),o[Symbol.asyncIterator]=function(){return this},o;function c(m){s[m]&&(o[m]=function(g){return new Promise(function(w,v){a.push([m,g,w,v])>1||l(m,g)})})}function l(m,g){try{d(s[m](g))}catch(w){h(a[0][3],w)}}function d(m){m.value instanceof uC?Promise.resolve(m.value.v).then(f,p):h(a[0][2],m)}function f(m){l(\\\"next\\\",m)}function p(m){l(\\\"throw\\\",m)}function h(m,g){m(g),a.shift(),a.length&&l(a[0][0],a[0][1])}},cje=function(r){var n,i;return n={},s(\\\"next\\\"),s(\\\"throw\\\",function(o){throw o}),s(\\\"return\\\"),n[Symbol.iterator]=function(){return this},n;function s(o,a){n[o]=r[o]?function(c){return(i=!i)?{value:uC(r[o](c)),done:o===\\\"return\\\"}:a?a(c):c}:a}},lje=function(r){if(!Symbol.asyncIterator)throw new TypeError(\\\"Symbol.asyncIterator is not defined.\\\");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof fH==\\\"function\\\"?fH(r):r[Symbol.iterator](),i={},s(\\\"next\\\"),s(\\\"throw\\\"),s(\\\"return\\\"),i[Symbol.asyncIterator]=function(){return this},i);function s(a){i[a]=r[a]&&function(c){return new Promise(function(l,d){c=r[a](c),o(l,d,c.done,c.value)})}}function o(a,c,l,d){Promise.resolve(d).then(function(f){a({value:f,done:l})},c)}},uje=function(r,n){return Object.defineProperty?Object.defineProperty(r,\\\"raw\\\",{value:n}):r.raw=n,r},dje=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)Object.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n.default=r,n},fje=function(r){return r&&r.__esModule?r:{default:r}},pje=function(r,n){if(!n.has(r))throw new TypeError(\\\"attempted to get private field on non-instance\\\");return n.get(r)},hje=function(r,n,i){if(!n.has(r))throw new TypeError(\\\"attempted to set private field on non-instance\\\");return n.set(r,i),i},t(\\\"__extends\\\",QFe),t(\\\"__assign\\\",JFe),t(\\\"__rest\\\",YFe),t(\\\"__decorate\\\",XFe),t(\\\"__param\\\",eje),t(\\\"__metadata\\\",tje),t(\\\"__awaiter\\\",rje),t(\\\"__generator\\\",nje),t(\\\"__exportStar\\\",ije),t(\\\"__createBinding\\\",mje),t(\\\"__values\\\",fH),t(\\\"__read\\\",Rse),t(\\\"__spread\\\",sje),t(\\\"__spreadArrays\\\",oje),t(\\\"__await\\\",uC),t(\\\"__asyncGenerator\\\",aje),t(\\\"__asyncDelegator\\\",cje),t(\\\"__asyncValues\\\",lje),t(\\\"__makeTemplateObject\\\",uje),t(\\\"__importStar\\\",dje),t(\\\"__importDefault\\\",fje),t(\\\"__classPrivateFieldGet\\\",pje),t(\\\"__classPrivateFieldSet\\\",hje)})});var gje=q(hH=>{\\\"use strict\\\";u();Object.defineProperty(hH,\\\"__esModule\\\",{value:!0});hH.delay=void 0;function eTt(t){return new Promise(e=>{setTimeout(()=>{e(!0)},t)})}hH.delay=eTt});var yje=q(fC=>{\\\"use strict\\\";u();Object.defineProperty(fC,\\\"__esModule\\\",{value:!0});fC.ONE_THOUSAND=fC.ONE_HUNDRED=void 0;fC.ONE_HUNDRED=100;fC.ONE_THOUSAND=1e3});var bje=q(ke=>{\\\"use strict\\\";u();Object.defineProperty(ke,\\\"__esModule\\\",{value:!0});ke.ONE_YEAR=ke.FOUR_WEEKS=ke.THREE_WEEKS=ke.TWO_WEEKS=ke.ONE_WEEK=ke.THIRTY_DAYS=ke.SEVEN_DAYS=ke.FIVE_DAYS=ke.THREE_DAYS=ke.ONE_DAY=ke.TWENTY_FOUR_HOURS=ke.TWELVE_HOURS=ke.SIX_HOURS=ke.THREE_HOURS=ke.ONE_HOUR=ke.SIXTY_MINUTES=ke.THIRTY_MINUTES=ke.TEN_MINUTES=ke.FIVE_MINUTES=ke.ONE_MINUTE=ke.SIXTY_SECONDS=ke.THIRTY_SECONDS=ke.TEN_SECONDS=ke.FIVE_SECONDS=ke.ONE_SECOND=void 0;ke.ONE_SECOND=1;ke.FIVE_SECONDS=5;ke.TEN_SECONDS=10;ke.THIRTY_SECONDS=30;ke.SIXTY_SECONDS=60;ke.ONE_MINUTE=ke.SIXTY_SECONDS;ke.FIVE_MINUTES=ke.ONE_MINUTE*5;ke.TEN_MINUTES=ke.ONE_MINUTE*10;ke.THIRTY_MINUTES=ke.ONE_MINUTE*30;ke.SIXTY_MINUTES=ke.ONE_MINUTE*60;ke.ONE_HOUR=ke.SIXTY_MINUTES;ke.THREE_HOURS=ke.ONE_HOUR*3;ke.SIX_HOURS=ke.ONE_HOUR*6;ke.TWELVE_HOURS=ke.ONE_HOUR*12;ke.TWENTY_FOUR_HOURS=ke.ONE_HOUR*24;ke.ONE_DAY=ke.TWENTY_FOUR_HOURS;ke.THREE_DAYS=ke.ONE_DAY*3;ke.FIVE_DAYS=ke.ONE_DAY*5;ke.SEVEN_DAYS=ke.ONE_DAY*7;ke.THIRTY_DAYS=ke.ONE_DAY*30;ke.ONE_WEEK=ke.SEVEN_DAYS;ke.TWO_WEEKS=ke.ONE_WEEK*2;ke.THREE_WEEKS=ke.ONE_WEEK*3;ke.FOUR_WEEKS=ke.ONE_WEEK*4;ke.ONE_YEAR=ke.ONE_DAY*365});var Pse=q(mH=>{\\\"use strict\\\";u();Object.defineProperty(mH,\\\"__esModule\\\",{value:!0});var wje=dC();wje.__exportStar(yje(),mH);wje.__exportStar(bje(),mH)});var xje=q(pC=>{\\\"use strict\\\";u();Object.defineProperty(pC,\\\"__esModule\\\",{value:!0});pC.fromMiliseconds=pC.toMiliseconds=void 0;var vje=Pse();function tTt(t){return t*vje.ONE_THOUSAND}pC.toMiliseconds=tTt;function rTt(t){return Math.floor(t/vje.ONE_THOUSAND)}pC.fromMiliseconds=rTt});var _je=q(gH=>{\\\"use strict\\\";u();Object.defineProperty(gH,\\\"__esModule\\\",{value:!0});var Eje=dC();Eje.__exportStar(gje(),gH);Eje.__exportStar(xje(),gH)});var Cje=q(C9=>{\\\"use strict\\\";u();Object.defineProperty(C9,\\\"__esModule\\\",{value:!0});C9.Watch=void 0;var yH=class{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let r=this.get(e);if(typeof r.elapsed<\\\"u\\\")throw new Error(`Watch already stopped for label: ${e}`);let n=Date.now()-r.started;this.timestamps.set(e,{started:r.started,elapsed:n})}get(e){let r=this.timestamps.get(e);if(typeof r>\\\"u\\\")throw new Error(`No timestamp found for label: ${e}`);return r}elapsed(e){let r=this.get(e);return r.elapsed||Date.now()-r.started}};C9.Watch=yH;C9.default=yH});var Sje=q(bH=>{\\\"use strict\\\";u();Object.defineProperty(bH,\\\"__esModule\\\",{value:!0});bH.IWatch=void 0;var Ose=class{};bH.IWatch=Ose});var Aje=q(Nse=>{\\\"use strict\\\";u();Object.defineProperty(Nse,\\\"__esModule\\\",{value:!0});var nTt=dC();nTt.__exportStar(Sje(),Nse)});var u0=q(hC=>{\\\"use strict\\\";u();Object.defineProperty(hC,\\\"__esModule\\\",{value:!0});var wH=dC();wH.__exportStar(_je(),hC);wH.__exportStar(Cje(),hC);wH.__exportStar(Aje(),hC);wH.__exportStar(Pse(),hC)});var gC=q(On=>{\\\"use strict\\\";u();Object.defineProperty(On,\\\"__esModule\\\",{value:!0});On.getLocalStorage=On.getLocalStorageOrThrow=On.getCrypto=On.getCryptoOrThrow=On.getLocation=On.getLocationOrThrow=On.getNavigator=On.getNavigatorOrThrow=On.getDocument=On.getDocumentOrThrow=On.getFromWindowOrThrow=On.getFromWindow=void 0;function h2(t){let e;return typeof window<\\\"u\\\"&&typeof window[t]<\\\"u\\\"&&(e=window[t]),e}On.getFromWindow=h2;function mC(t){let e=h2(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}On.getFromWindowOrThrow=mC;function iTt(){return mC(\\\"document\\\")}On.getDocumentOrThrow=iTt;function sTt(){return h2(\\\"document\\\")}On.getDocument=sTt;function oTt(){return mC(\\\"navigator\\\")}On.getNavigatorOrThrow=oTt;function aTt(){return h2(\\\"navigator\\\")}On.getNavigator=aTt;function cTt(){return mC(\\\"location\\\")}On.getLocationOrThrow=cTt;function lTt(){return h2(\\\"location\\\")}On.getLocation=lTt;function uTt(){return mC(\\\"crypto\\\")}On.getCryptoOrThrow=uTt;function dTt(){return h2(\\\"crypto\\\")}On.getCrypto=dTt;function fTt(){return mC(\\\"localStorage\\\")}On.getLocalStorageOrThrow=fTt;function pTt(){return h2(\\\"localStorage\\\")}On.getLocalStorage=pTt});var kse=q(vH=>{\\\"use strict\\\";u();Object.defineProperty(vH,\\\"__esModule\\\",{value:!0});vH.getWindowMetadata=void 0;var Tje=gC();function hTt(){let t,e;try{t=Tje.getDocumentOrThrow(),e=Tje.getLocationOrThrow()}catch{return null}function r(){let f=t.getElementsByTagName(\\\"link\\\"),p=[];for(let h=0;h<f.length;h++){let m=f[h],g=m.getAttribute(\\\"rel\\\");if(g&&g.toLowerCase().indexOf(\\\"icon\\\")>-1){let w=m.getAttribute(\\\"href\\\");if(w)if(w.toLowerCase().indexOf(\\\"https:\\\")===-1&&w.toLowerCase().indexOf(\\\"http:\\\")===-1&&w.indexOf(\\\"//\\\")!==0){let v=e.protocol+\\\"//\\\"+e.host;if(w.indexOf(\\\"/\\\")===0)v+=w;else{let b=e.pathname.split(\\\"/\\\");b.pop();let _=b.join(\\\"/\\\");v+=_+\\\"/\\\"+w}p.push(v)}else if(w.indexOf(\\\"//\\\")===0){let v=e.protocol+w;p.push(v)}else p.push(w)}}return p}function n(...f){let p=t.getElementsByTagName(\\\"meta\\\");for(let h=0;h<p.length;h++){let m=p[h],g=[\\\"itemprop\\\",\\\"property\\\",\\\"name\\\"].map(w=>m.getAttribute(w)).filter(w=>w?f.includes(w):!1);if(g.length&&g){let w=m.getAttribute(\\\"content\\\");if(w)return w}}return\\\"\\\"}function i(){let f=n(\\\"name\\\",\\\"og:site_name\\\",\\\"og:title\\\",\\\"twitter:title\\\");return f||(f=t.title),f}function s(){return n(\\\"description\\\",\\\"og:description\\\",\\\"twitter:description\\\",\\\"keywords\\\")}let o=i(),a=s(),c=e.origin,l=r();return{description:a,url:c,icons:l,name:o}}vH.getWindowMetadata=hTt});function mTt(t){if(t.length>=255)throw new TypeError(\\\"Alphabet too long\\\");let e=new Uint8Array(256);for(let l=0;l<e.length;l++)e[l]=255;for(let l=0;l<t.length;l++){let d=t.charAt(l),f=d.charCodeAt(0);if(e[f]!==255)throw new TypeError(d+\\\" is ambiguous\\\");e[f]=l}let r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function o(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError(\\\"Expected Uint8Array\\\");if(l.length===0)return\\\"\\\";let d=0,f=0,p=0,h=l.length;for(;p!==h&&l[p]===0;)p++,d++;let m=(h-p)*s+1>>>0,g=new Uint8Array(m);for(;p!==h;){let b=l[p],_=0;for(let S=m-1;(b!==0||_<f)&&S!==-1;S--,_++)b+=256*g[S]>>>0,g[S]=b%r>>>0,b=b/r>>>0;if(b!==0)throw new Error(\\\"Non-zero carry\\\");f=_,p++}let w=m-f;for(;w!==m&&g[w]===0;)w++;let v=n.repeat(d);for(;w<m;++w)v+=t.charAt(g[w]);return v}function a(l){if(typeof l!=\\\"string\\\")throw new TypeError(\\\"Expected String\\\");if(l.length===0)return new Uint8Array;let d=0,f=0,p=0;for(;l[d]===n;)f++,d++;let h=(l.length-d)*i+1>>>0,m=new Uint8Array(h);for(;d<l.length;){let b=l.charCodeAt(d);if(b>255)return;let _=e[b];if(_===255)return;let S=0;for(let T=h-1;(_!==0||S<p)&&T!==-1;T--,S++)_+=r*m[T]>>>0,m[T]=_%256>>>0,_=_/256>>>0;if(_!==0)throw new Error(\\\"Non-zero carry\\\");p=S,d++}let g=h-p;for(;g!==h&&m[g]===0;)g++;let w=new Uint8Array(f+(h-g)),v=f;for(;g!==h;)w[v++]=m[g++];return w}function c(l){let d=a(l);if(d)return d;throw new Error(\\\"Non-base\\\"+r+\\\" character\\\")}return{encode:o,decodeUnsafe:a,decode:c}}var Ije,Rje=x(()=>{u();Ije=mTt});var gTt,yC,xH=x(()=>{u();Rje();gTt=\\\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\\\",yC=Ije(gTt)});function nc(t){if(typeof t!=\\\"string\\\")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return bTt(t)}catch{return t}}function Vo(t){return typeof t==\\\"string\\\"?t:yTt(t)||\\\"\\\"}var yTt,bTt,f1=x(()=>{u();yTt=t=>JSON.stringify(t,(e,r)=>typeof r==\\\"bigint\\\"?r.toString()+\\\"n\\\":r),bTt=t=>{let e=/([\\\\[:])?(\\\\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\\\\}\\\\]])/g,r=t.replace(e,'$1\\\"$2n\\\"$3');return JSON.parse(r,(n,i)=>typeof i==\\\"string\\\"&&i.match(/^\\\\d+n$/)?BigInt(i.substring(0,i.length-1)):i)}});function wTt(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function Zje(t,...e){if(!wTt(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function Pje(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function vTt(t,e){Zje(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function xTt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"utf8ToBytes expected string, got \\\"+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function Qje(t){return typeof t==\\\"string\\\"&&(t=xTt(t)),Zje(t),t}function ETt(t){let e=n=>t().update(Qje(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Jje(t=32){if(bC&&typeof bC.getRandomValues==\\\"function\\\")return bC.getRandomValues(new Uint8Array(t));if(bC&&typeof bC.randomBytes==\\\"function\\\")return bC.randomBytes(t);throw new Error(\\\"crypto.getRandomValues must be defined\\\")}function _Tt(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function Yje(t,e=!1){return e?{h:Number(t&EH),l:Number(t>>$se&EH)}:{h:Number(t>>$se&EH)|0,l:Number(t&EH)|0}}function CTt(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:o}=Yje(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}function UTt(t,e,r,n){let i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}function noe(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function ioe(t){if(!noe(t))throw new Error(\\\"Uint8Array expected\\\")}function Mse(t,e){if(typeof e!=\\\"boolean\\\")throw new Error(t+\\\" boolean expected, got \\\"+e)}function soe(t){ioe(t);let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=ZTt[t[r]];return e}function eHe(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);return t===\\\"\\\"?roe:BigInt(\\\"0x\\\"+t)}function Oje(t){if(t>=d0._0&&t<=d0._9)return t-d0._0;if(t>=d0.A&&t<=d0.F)return t-(d0.A-10);if(t>=d0.a&&t<=d0.f)return t-(d0.a-10)}function tHe(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=Oje(t.charCodeAt(s)),a=Oje(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}function QTt(t){return eHe(soe(t))}function SH(t){return ioe(t),eHe(soe(Uint8Array.from(t).reverse()))}function rHe(t,e){return tHe(t.toString(16).padStart(e*2,\\\"0\\\"))}function Wse(t,e){return rHe(t,e).reverse()}function f0(t,e,r){let n;if(typeof e==\\\"string\\\")try{n=tHe(e)}catch(s){throw new Error(t+\\\" must be hex string or Uint8Array, cause: \\\"+s)}else if(noe(e))n=Uint8Array.from(e);else throw new Error(t+\\\" must be hex string or Uint8Array\\\");let i=n.length;if(typeof r==\\\"number\\\"&&i!==r)throw new Error(t+\\\" of length \\\"+r+\\\" expected, got \\\"+i);return n}function Nje(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];ioe(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function JTt(t,e,r){return Dse(t)&&Dse(e)&&Dse(r)&&e<=t&&t<r}function S9(t,e,r,n){if(!JTt(e,r,n))throw new Error(\\\"expected valid \\\"+t+\\\": \\\"+r+\\\" <= n < \\\"+n+\\\", got \\\"+e)}function YTt(t){let e;for(e=0;t>roe;t>>=Xje,e+=1);return e}function ooe(t,e,r={}){let n=(i,s,o)=>{let a=eIt[s];if(typeof a!=\\\"function\\\")throw new Error(\\\"invalid validator function\\\");let c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(\\\"param \\\"+String(i)+\\\" is invalid. Expected \\\"+s+\\\", got \\\"+c)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(r))n(i,s,!0);return t}function kje(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(i!==void 0)return i;let s=t(r,...n);return e.set(r,s),s}}function zs(t,e){let r=t%e;return r>=mo?r:e+r}function rIt(t,e,r){if(e<mo)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r<=mo)throw new Error(\\\"invalid modulus\\\");if(r===fs)return mo;let n=fs;for(;e>mo;)e&fs&&(n=n*t%r),t=t*t%r,e>>=fs;return n}function Zp(t,e,r){let n=t;for(;e-- >mo;)n*=n,n%=r;return n}function Dje(t,e){if(t===mo)throw new Error(\\\"invert: expected non-zero number\\\");if(e<=mo)throw new Error(\\\"invert: expected positive modulus, got \\\"+e);let r=zs(t,e),n=e,i=mo,s=fs;for(;r!==mo;){let o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==fs)throw new Error(\\\"invert: does not exist\\\");return zs(i,e)}function nIt(t){let e=(t-fs)/m2,r,n,i;for(r=t-fs,n=0;r%m2===mo;r/=m2,n++);for(i=m2;i<t&&rIt(i,e,t)!==t-fs;i++)if(i>1e3)throw new Error(\\\"Cannot find square root: likely non-prime P\\\");if(n===1){let o=(t+fs)/Gse;return function(a,c){let l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error(\\\"Cannot find square root\\\");return l}}let s=(r+fs)/m2;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error(\\\"Cannot find square root\\\");let c=n,l=o.pow(o.mul(o.ONE,i),r),d=o.pow(a,s),f=o.pow(a,r);for(;!o.eql(f,o.ONE);){if(o.eql(f,o.ZERO))return o.ZERO;let p=1;for(let m=o.sqr(f);p<c&&!o.eql(m,o.ONE);p++)m=o.sqr(m);let h=o.pow(l,fs<<BigInt(c-p-1));l=o.sqr(h),d=o.mul(d,h),f=o.mul(f,l),c=p}return d}}function iIt(t){if(t%Gse===tIt){let e=(t+fs)/Gse;return function(r,n){let i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error(\\\"Cannot find square root\\\");return i}}if(t%Mje===Bje){let e=(t-Bje)/Mje;return function(r,n){let i=r.mul(n,m2),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,m2),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error(\\\"Cannot find square root\\\");return c}}return nIt(t)}function aIt(t){let e={ORDER:\\\"bigint\\\",MASK:\\\"bigint\\\",BYTES:\\\"isSafeInteger\\\",BITS:\\\"isSafeInteger\\\"},r=oIt.reduce((n,i)=>(n[i]=\\\"function\\\",n),e);return ooe(t,r)}function cIt(t,e,r){if(r<mo)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r===mo)return t.ONE;if(r===fs)return e;let n=t.ONE,i=e;for(;r>mo;)r&fs&&(n=t.mul(n,i)),i=t.sqr(i),r>>=fs;return n}function lIt(t,e){let r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function nHe(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function iHe(t,e,r=!1,n={}){if(t<=mo)throw new Error(\\\"invalid field: expected ORDER > 0, got \\\"+t);let{nBitLength:i,nByteLength:s}=nHe(t,e);if(s>2048)throw new Error(\\\"invalid field: expected ORDER of <= 2048 bytes\\\");let o,a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:XTt(i),ZERO:mo,ONE:fs,create:c=>zs(c,t),isValid:c=>{if(typeof c!=\\\"bigint\\\")throw new Error(\\\"invalid field element: expected bigint, got \\\"+typeof c);return mo<=c&&c<t},is0:c=>c===mo,isOdd:c=>(c&fs)===fs,neg:c=>zs(-c,t),eql:(c,l)=>c===l,sqr:c=>zs(c*c,t),add:(c,l)=>zs(c+l,t),sub:(c,l)=>zs(c-l,t),mul:(c,l)=>zs(c*l,t),pow:(c,l)=>cIt(a,c,l),div:(c,l)=>zs(c*Dje(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Dje(c,t),sqrt:n.sqrt||(c=>(o||(o=iIt(t)),o(a,c))),invertBatch:c=>lIt(a,c),cmov:(c,l,d)=>d?l:c,toBytes:c=>r?Wse(c,s):rHe(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(\\\"Field.fromBytes: expected \\\"+s+\\\" bytes, got \\\"+c.length);return r?SH(c):QTt(c)}});return Object.freeze(a)}function Lse(t,e){let r=e.negate();return t?r:e}function sHe(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error(\\\"invalid window size, expected [1..\\\"+e+\\\"], got W=\\\"+t)}function Use(t,e){sHe(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function uIt(t,e){if(!Array.isArray(t))throw new Error(\\\"array expected\\\");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error(\\\"invalid point at index \\\"+n)})}function dIt(t,e){if(!Array.isArray(t))throw new Error(\\\"array of scalars expected\\\");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error(\\\"invalid scalar at index \\\"+n)})}function jse(t){return oHe.get(t)||1}function fIt(t,e){return{constTimeNegate:Lse,hasPrecomputes(r){return jse(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>Lje;)n&_H&&(i=i.add(s)),s=s.double(),n>>=_H;return i},precomputeWindow(r,n){let{windows:i,windowSize:s}=Use(n,e),o=[],a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let d=1;d<s;d++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let{windows:s,windowSize:o}=Use(r,e),a=t.ZERO,c=t.BASE,l=BigInt(2**r-1),d=2**r,f=BigInt(r);for(let p=0;p<s;p++){let h=p*o,m=Number(i&l);i>>=f,m>o&&(m-=d,i+=_H);let g=h,w=h+Math.abs(m)-1,v=p%2!==0,b=m<0;m===0?c=c.add(Lse(v,n[g])):a=a.add(Lse(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){let{windows:o,windowSize:a}=Use(r,e),c=BigInt(2**r-1),l=2**r,d=BigInt(r);for(let f=0;f<o;f++){let p=f*a;if(i===Lje)break;let h=Number(i&c);if(i>>=d,h>a&&(h-=l,i+=_H),h===0)continue;let m=n[p+Math.abs(h)-1];h<0&&(m=m.negate()),s=s.add(m)}return s},getPrecomputes(r,n,i){let s=Fse.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&Fse.set(n,i(s))),s},wNAFCached(r,n,i){let s=jse(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){let o=jse(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){sHe(n,e),oHe.set(r,n),Fse.delete(r)}}}function pIt(t,e,r,n){if(uIt(r,t),dIt(n,e),r.length!==n.length)throw new Error(\\\"arrays of points and scalars must have equal length\\\");let i=t.ZERO,s=YTt(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o,d=i;for(let f=l;f>=0;f-=o){c.fill(i);for(let h=0;h<n.length;h++){let m=n[h],g=Number(m>>BigInt(f)&BigInt(a));c[g]=c[g].add(r[h])}let p=i;for(let h=c.length-1,m=i;h>0;h--)m=m.add(c[h]),p=p.add(m);if(d=d.add(p),f!==0)for(let h=0;h<o;h++)d=d.double()}return d}function hIt(t){return aIt(t.Fp),ooe(t,{n:\\\"bigint\\\",h:\\\"bigint\\\",Gx:\\\"field\\\",Gy:\\\"field\\\"},{nBitLength:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\"}),Object.freeze({...nHe(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function yIt(t){let e=hIt(t);return ooe(t,{hash:\\\"function\\\",a:\\\"bigint\\\",d:\\\"bigint\\\",randomBytes:\\\"function\\\"},{adjustScalarBytes:\\\"function\\\",domain:\\\"function\\\",uvRatio:\\\"function\\\",mapToCurve:\\\"function\\\"}),Object.freeze({...e})}function bIt(t){let e=yIt(t),{Fp:r,n,prehash:i,hash:s,randomBytes:o,nByteLength:a,h:c}=e,l=CH<<BigInt(a*8)-zc,d=r.create,f=iHe(e.n,e.nBitLength),p=e.uvRatio||((E,C)=>{try{return{isValid:!0,value:r.sqrt(E*r.inv(C))}}catch{return{isValid:!1,value:ff}}}),h=e.adjustScalarBytes||(E=>E),m=e.domain||((E,C,I)=>{if(Mse(\\\"phflag\\\",I),C.length||I)throw new Error(\\\"Contexts/pre-hash are not supported\\\");return E});function g(E,C){S9(\\\"coordinate \\\"+E,C,ff,l)}function w(E){if(!(E instanceof _))throw new Error(\\\"ExtendedPoint expected\\\")}let v=kje((E,C)=>{let{ex:I,ey:P,ez:k}=E,U=E.is0();C==null&&(C=U?mIt:r.inv(k));let D=d(I*C),A=d(P*C),j=d(k*C);if(U)return{x:ff,y:zc};if(j!==zc)throw new Error(\\\"invZ was invalid\\\");return{x:D,y:A}}),b=kje(E=>{let{a:C,d:I}=e;if(E.is0())throw new Error(\\\"bad point: ZERO\\\");let{ex:P,ey:k,ez:U,et:D}=E,A=d(P*P),j=d(k*k),K=d(U*U),J=d(K*K),X=d(A*C),re=d(K*d(X+j)),fe=d(J+d(I*d(A*j)));if(re!==fe)throw new Error(\\\"bad point: equation left != right (1)\\\");let ce=d(P*k),We=d(U*D);if(ce!==We)throw new Error(\\\"bad point: equation left != right (2)\\\");return!0});class _{constructor(C,I,P,k){this.ex=C,this.ey=I,this.ez=P,this.et=k,g(\\\"x\\\",C),g(\\\"y\\\",I),g(\\\"z\\\",P),g(\\\"t\\\",k),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(C){if(C instanceof _)throw new Error(\\\"extended point not allowed\\\");let{x:I,y:P}=C||{};return g(\\\"x\\\",I),g(\\\"y\\\",P),new _(I,P,zc,d(I*P))}static normalizeZ(C){let I=r.invertBatch(C.map(P=>P.ez));return C.map((P,k)=>P.toAffine(I[k])).map(_.fromAffine)}static msm(C,I){return pIt(_,f,C,I)}_setWindowSize(C){N.setWindowSize(this,C)}assertValidity(){b(this)}equals(C){w(C);let{ex:I,ey:P,ez:k}=this,{ex:U,ey:D,ez:A}=C,j=d(I*A),K=d(U*k),J=d(P*A),X=d(D*k);return j===K&&J===X}is0(){return this.equals(_.ZERO)}negate(){return new _(d(-this.ex),this.ey,this.ez,d(-this.et))}double(){let{a:C}=e,{ex:I,ey:P,ez:k}=this,U=d(I*I),D=d(P*P),A=d(CH*d(k*k)),j=d(C*U),K=I+P,J=d(d(K*K)-U-D),X=j+D,re=X-A,fe=j-D,ce=d(J*re),We=d(X*fe),Ue=d(J*fe),je=d(re*X);return new _(ce,We,je,Ue)}add(C){w(C);let{a:I,d:P}=e,{ex:k,ey:U,ez:D,et:A}=this,{ex:j,ey:K,ez:J,et:X}=C;if(I===BigInt(-1)){let Q0=d((U-k)*(K+j)),wn=d((U+k)*(K-j)),an=d(wn-Q0);if(an===ff)return this.double();let J0=d(D*CH*X),vn=d(A*CH*J),xn=vn+J0,Y0=wn+Q0,En=vn-J0,jn=d(xn*an),X0=d(Y0*En),_n=d(xn*En),Cn=d(an*Y0);return new _(jn,X0,Cn,_n)}let re=d(k*j),fe=d(U*K),ce=d(A*P*X),We=d(D*J),Ue=d((k+U)*(j+K)-re-fe),je=We-ce,Lt=We+ce,pt=d(fe-I*re),Ct=d(Ue*je),jf=d(Lt*pt),Un=d(Ue*pt),Fn=d(je*Lt);return new _(Ct,jf,Fn,Un)}subtract(C){return this.add(C.negate())}wNAF(C){return N.wNAFCached(this,C,_.normalizeZ)}multiply(C){let I=C;S9(\\\"scalar\\\",I,zc,n);let{p:P,f:k}=this.wNAF(I);return _.normalizeZ([P,k])[0]}multiplyUnsafe(C,I=_.ZERO){let P=C;return S9(\\\"scalar\\\",P,ff,n),P===ff?T:this.is0()||P===zc?this:N.wNAFCachedUnsafe(this,P,_.normalizeZ,I)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return N.unsafeLadder(this,n).is0()}toAffine(C){return v(this,C)}clearCofactor(){let{h:C}=e;return C===zc?this:this.multiplyUnsafe(C)}static fromHex(C,I=!1){let{d:P,a:k}=e,U=r.BYTES;C=f0(\\\"pointHex\\\",C,U),Mse(\\\"zip215\\\",I);let D=C.slice(),A=C[U-1];D[U-1]=A&-129;let j=SH(D),K=I?l:r.ORDER;S9(\\\"pointHex.y\\\",j,ff,K);let J=d(j*j),X=d(J-zc),re=d(P*J-k),{isValid:fe,value:ce}=p(X,re);if(!fe)throw new Error(\\\"Point.fromHex: invalid y coordinate\\\");let We=(ce&zc)===zc,Ue=(A&128)!==0;if(!I&&ce===ff&&Ue)throw new Error(\\\"Point.fromHex: x=0 and x_0=1\\\");return Ue!==We&&(ce=d(-ce)),_.fromAffine({x:ce,y:j})}static fromPrivateKey(C){return B(C).point}toRawBytes(){let{x:C,y:I}=this.toAffine(),P=Wse(I,r.BYTES);return P[P.length-1]|=C&zc?128:0,P}toHex(){return soe(this.toRawBytes())}}_.BASE=new _(e.Gx,e.Gy,zc,d(e.Gx*e.Gy)),_.ZERO=new _(ff,zc,zc,ff);let{BASE:S,ZERO:T}=_,N=fIt(_,a*8);function O(E){return zs(E,n)}function L(E){return O(SH(E))}function B(E){let C=r.BYTES;E=f0(\\\"private key\\\",E,C);let I=f0(\\\"hashed private key\\\",s(E),2*C),P=h(I.slice(0,C)),k=I.slice(C,2*C),U=L(P),D=S.multiply(U),A=D.toRawBytes();return{head:P,prefix:k,scalar:U,point:D,pointBytes:A}}function H(E){return B(E).pointBytes}function M(E=new Uint8Array,...C){let I=Nje(...C);return L(s(m(I,f0(\\\"context\\\",E),!!i)))}function F(E,C,I={}){E=f0(\\\"message\\\",E),i&&(E=i(E));let{prefix:P,scalar:k,pointBytes:U}=B(C),D=M(I.context,P,E),A=S.multiply(D).toRawBytes(),j=M(I.context,A,U,E),K=O(D+j*k);S9(\\\"signature.s\\\",K,ff,n);let J=Nje(A,Wse(K,r.BYTES));return f0(\\\"result\\\",J,r.BYTES*2)}let R=gIt;function y(E,C,I,P=R){let{context:k,zip215:U}=P,D=r.BYTES;E=f0(\\\"signature\\\",E,2*D),C=f0(\\\"message\\\",C),I=f0(\\\"publicKey\\\",I,D),U!==void 0&&Mse(\\\"zip215\\\",U),i&&(C=i(C));let A=SH(E.slice(D,2*D)),j,K,J;try{j=_.fromHex(I,U),K=_.fromHex(E.slice(0,D),U),J=S.multiplyUnsafe(A)}catch{return!1}if(!U&&j.isSmallOrder())return!1;let X=M(k,K.toRawBytes(),j.toRawBytes(),C);return K.add(j.multiplyUnsafe(X)).subtract(J).clearCofactor().equals(_.ZERO)}return S._setWindowSize(8),{CURVE:e,getPublicKey:H,sign:F,verify:y,ExtendedPoint:_,utils:{getExtendedPublicKey:B,randomPrivateKey:()=>o(r.BYTES),precompute(E=8,C=_.BASE){return C._setWindowSize(E),C.multiply(BigInt(3)),C}}}}function EIt(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=aoe,o=t*t%s*t%s,a=Zp(o,Fje,s)*o%s,c=Zp(a,wIt,s)*t%s,l=Zp(c,vIt,s)*c%s,d=Zp(l,e,s)*l%s,f=Zp(d,r,s)*d%s,p=Zp(f,n,s)*f%s,h=Zp(p,i,s)*p%s,m=Zp(h,i,s)*p%s,g=Zp(m,e,s)*l%s;return{pow_p_5_8:Zp(g,Fje,s)*t%s,b2:o}}function _It(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function CIt(t,e){let r=aoe,n=zs(e*e*e,r),i=zs(n*n*e,r),s=EIt(t*i).pow_p_5_8,o=zs(t*n*s,r),a=zs(e*o*o,r),c=o,l=zs(o*Uje,r),d=a===t,f=a===zs(-t,r),p=a===zs(-t*Uje,r);return d&&(o=c),(f||p)&&(o=l),sIt(o,r)&&(o=zs(-o,r)),{isValid:d||f,value:o}}function coe(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function uHe(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?coe(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function dHe(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));let r=uHe(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return coe(r)}function MIt(t,e){if(t.length>=255)throw new TypeError(\\\"Alphabet too long\\\");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+\\\" is ambiguous\\\");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError(\\\"Expected Uint8Array\\\");if(m.length===0)return\\\"\\\";for(var g=0,w=0,v=0,b=m.length;v!==b&&m[v]===0;)v++,g++;for(var _=(b-v)*d+1>>>0,S=new Uint8Array(_);v!==b;){for(var T=m[v],N=0,O=_-1;(T!==0||N<w)&&O!==-1;O--,N++)T+=256*S[O]>>>0,S[O]=T%a>>>0,T=T/a>>>0;if(T!==0)throw new Error(\\\"Non-zero carry\\\");w=N,v++}for(var L=_-w;L!==_&&S[L]===0;)L++;for(var B=c.repeat(g);L<_;++L)B+=t.charAt(S[L]);return B}function p(m){if(typeof m!=\\\"string\\\")throw new TypeError(\\\"Expected String\\\");if(m.length===0)return new Uint8Array;var g=0;if(m[g]!==\\\" \\\"){for(var w=0,v=0;m[g]===c;)w++,g++;for(var b=(m.length-g)*l+1>>>0,_=new Uint8Array(b);m[g];){var S=r[m.charCodeAt(g)];if(S===255)return;for(var T=0,N=b-1;(S!==0||T<v)&&N!==-1;N--,T++)S+=a*_[N]>>>0,_[N]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error(\\\"Non-zero carry\\\");v=T,g++}if(m[g]!==\\\" \\\"){for(var O=b-v;O!==b&&_[O]===0;)O++;for(var L=new Uint8Array(w+(b-O)),B=w;O!==b;)L[B++]=_[O++];return L}}}function h(m){var g=p(m);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:p,decode:h}}function E9t(t){return t.reduce((e,r)=>(e+=v9t[r],e),\\\"\\\")}function _9t(t){let e=[];for(let r of t){let n=x9t[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}function mHe(t,e,r){e=e||[],r=r||0;for(var n=r;t>=R9t;)e[r++]=t&255|Hje,t/=128;for(;t&I9t;)e[r++]=t&255|Hje,t>>>=7;return e[r]=t|0,mHe.bytes=r-n+1,e}function Yse(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw Yse.bytes=0,new RangeError(\\\"Could not decode varint\\\");o=t[s++],r+=i<28?(o&qje)<<i:(o&qje)*Math.pow(2,i),i+=7}while(o>=O9t);return Yse.bytes=s-n,r}function xHe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}function PH(t,e=\\\"utf8\\\"){let r=EHe[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString(\\\"utf8\\\"):r.encoder.encode(t).substring(1)}function wC(t,e=\\\"utf8\\\"){let r=EHe[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?coe(globalThis.Buffer.from(t,\\\"utf-8\\\")):r.decoder.decode(`${r.prefix}${t}`)}function Gje(t){return nc(PH(wC(t,IH),cHe))}function TH(t){return PH(wC(Vo(t),cHe),IH)}function T9(t){let e=wC(kIt,jje),r=NIt+PH(dHe([e,t]),jje);return[PIt,OIt,r].join(RIt)}function Q9t(t){return PH(t,IH)}function J9t(t){return wC(t,IH)}function Y9t(t){return wC([TH(t.header),TH(t.payload)].join(AH),lHe)}function X9t(t){return[TH(t.header),TH(t.payload),Q9t(t.signature)].join(AH)}function Qp(t){let e=t.split(AH),r=Gje(e[0]),n=Gje(e[1]),i=J9t(e[2]),s=wC(e.slice(0,2).join(AH),lHe);return{header:r,payload:n,signature:i,data:s}}function vC(t=Jje(BIt)){let e=aHe.getPublicKey(t);return{secretKey:dHe([t,e]),publicKey:e}}async function OH(t,e,r,n,i=(0,Kje.fromMiliseconds)(Date.now())){let s={alg:TIt,typ:IIt},o=T9(n.publicKey),a=i+r,c={iss:o,sub:t,aud:e,iat:i,exp:a},l=Y9t({header:s,payload:c}),d=aHe.sign(l,n.secretKey.slice(0,32));return X9t({header:s,payload:c,signature:d})}var Kje,bC,Bse,qse,zse,EH,$se,STt,ATt,TTt,ITt,RTt,PTt,OTt,NTt,kTt,BTt,MTt,DTt,LTt,FTt,jTt,HTt,qTt,zTt,$Tt,Mt,VTt,WTt,p1,h1,Vse,GTt,roe,Xje,KTt,ZTt,d0,Dse,XTt,eIt,mo,fs,m2,tIt,Gse,Bje,Mje,sIt,oIt,Lje,_H,Fse,oHe,ff,zc,CH,mIt,gIt,aoe,Uje,wIt,Fje,vIt,xIt,SIt,AIt,aHe,TIt,IIt,AH,IH,cHe,lHe,RIt,PIt,OIt,jje,NIt,kIt,BIt,DIt,LIt,fHe,UIt,FIt,Kse,Zse,Qse,pHe,Jse,RH,A9,jIt,HIt,Wo,qIt,zIt,$It,VIt,WIt,GIt,KIt,ZIt,QIt,JIt,YIt,XIt,e9t,t9t,r9t,n9t,i9t,s9t,o9t,a9t,c9t,l9t,u9t,d9t,f9t,p9t,h9t,m9t,g9t,y9t,b9t,w9t,hHe,v9t,x9t,C9t,S9t,A9t,Hje,T9t,I9t,R9t,P9t,O9t,qje,N9t,k9t,B9t,M9t,D9t,L9t,U9t,F9t,j9t,H9t,q9t,gHe,zje,$je,Xse,eoe,yHe,toe,bHe,z9t,$9t,V9t,wHe,W9t,vHe,G9t,K9t,Z9t,Vje,Wje,Hse,EHe,g2=x(()=>{u();Kje=Me(u0());f1();bC=typeof globalThis==\\\"object\\\"&&\\\"crypto\\\"in globalThis?globalThis.crypto:void 0;Bse=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);qse=class{clone(){return this._cloneInto()}};zse=class extends qse{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Bse(this.buffer)}update(e){Pje(this);let{view:r,buffer:n,blockLen:i}=this;e=Qje(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=Bse(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Pje(this),vTt(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;_Tt(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=Bse(e),c=this.outputLen;if(c%4)throw new Error(\\\"_sha2: outputLen should be aligned to 32bit\\\");let l=c/4,d=this.get();if(l>d.length)throw new Error(\\\"_sha2: outputLen bigger than state\\\");for(let f=0;f<l;f++)a.setUint32(4*f,d[f],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}},EH=BigInt(2**32-1),$se=BigInt(32);STt=(t,e)=>BigInt(t>>>0)<<$se|BigInt(e>>>0),ATt=(t,e,r)=>t>>>r,TTt=(t,e,r)=>t<<32-r|e>>>r,ITt=(t,e,r)=>t>>>r|e<<32-r,RTt=(t,e,r)=>t<<32-r|e>>>r,PTt=(t,e,r)=>t<<64-r|e>>>r-32,OTt=(t,e,r)=>t>>>r-32|e<<64-r,NTt=(t,e)=>e,kTt=(t,e)=>t,BTt=(t,e,r)=>t<<r|e>>>32-r,MTt=(t,e,r)=>e<<r|t>>>32-r,DTt=(t,e,r)=>e<<r-32|t>>>64-r,LTt=(t,e,r)=>t<<r-32|e>>>64-r;FTt=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),jTt=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,HTt=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),qTt=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,zTt=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),$Tt=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Mt={fromBig:Yje,split:CTt,toBig:STt,shrSH:ATt,shrSL:TTt,rotrSH:ITt,rotrSL:RTt,rotrBH:PTt,rotrBL:OTt,rotr32H:NTt,rotr32L:kTt,rotlSH:BTt,rotlSL:MTt,rotlBH:DTt,rotlBL:LTt,add:UTt,add3L:FTt,add3H:jTt,add4L:HTt,add4H:qTt,add5H:$Tt,add5L:zTt},[VTt,WTt]=Mt.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))),p1=new Uint32Array(80),h1=new Uint32Array(80),Vse=class extends zse{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:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:m,Hh:g,Hl:w}=this;return[e,r,n,i,s,o,a,c,l,d,f,p,h,m,g,w]}set(e,r,n,i,s,o,a,c,l,d,f,p,h,m,g,w){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=d|0,this.Fh=f|0,this.Fl=p|0,this.Gh=h|0,this.Gl=m|0,this.Hh=g|0,this.Hl=w|0}process(e,r){for(let _=0;_<16;_++,r+=4)p1[_]=e.getUint32(r),h1[_]=e.getUint32(r+=4);for(let _=16;_<80;_++){let S=p1[_-15]|0,T=h1[_-15]|0,N=Mt.rotrSH(S,T,1)^Mt.rotrSH(S,T,8)^Mt.shrSH(S,T,7),O=Mt.rotrSL(S,T,1)^Mt.rotrSL(S,T,8)^Mt.shrSL(S,T,7),L=p1[_-2]|0,B=h1[_-2]|0,H=Mt.rotrSH(L,B,19)^Mt.rotrBH(L,B,61)^Mt.shrSH(L,B,6),M=Mt.rotrSL(L,B,19)^Mt.rotrBL(L,B,61)^Mt.shrSL(L,B,6),F=Mt.add4L(O,M,h1[_-7],h1[_-16]),R=Mt.add4H(F,N,H,p1[_-7],p1[_-16]);p1[_]=R|0,h1[_]=F|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:d,Eh:f,El:p,Fh:h,Fl:m,Gh:g,Gl:w,Hh:v,Hl:b}=this;for(let _=0;_<80;_++){let S=Mt.rotrSH(f,p,14)^Mt.rotrSH(f,p,18)^Mt.rotrBH(f,p,41),T=Mt.rotrSL(f,p,14)^Mt.rotrSL(f,p,18)^Mt.rotrBL(f,p,41),N=f&h^~f&g,O=p&m^~p&w,L=Mt.add5L(b,T,O,WTt[_],h1[_]),B=Mt.add5H(L,v,S,N,VTt[_],p1[_]),H=L|0,M=Mt.rotrSH(n,i,28)^Mt.rotrBH(n,i,34)^Mt.rotrBH(n,i,39),F=Mt.rotrSL(n,i,28)^Mt.rotrBL(n,i,34)^Mt.rotrBL(n,i,39),R=n&s^n&a^s&a,y=i&o^i&c^o&c;v=g|0,b=w|0,g=h|0,w=m|0,h=f|0,m=p|0,{h:f,l:p}=Mt.add(l|0,d|0,B|0,H|0),l=a|0,d=c|0,a=s|0,c=o|0,s=n|0,o=i|0;let E=Mt.add3L(H,F,y);n=Mt.add3H(E,B,M,R),i=E|0}({h:n,l:i}=Mt.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=Mt.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=Mt.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:d}=Mt.add(this.Dh|0,this.Dl|0,l|0,d|0),{h:f,l:p}=Mt.add(this.Eh|0,this.El|0,f|0,p|0),{h,l:m}=Mt.add(this.Fh|0,this.Fl|0,h|0,m|0),{h:g,l:w}=Mt.add(this.Gh|0,this.Gl|0,g|0,w|0),{h:v,l:b}=Mt.add(this.Hh|0,this.Hl|0,v|0,b|0),this.set(n,i,s,o,a,c,l,d,f,p,h,m,g,w,v,b)}roundClean(){p1.fill(0),h1.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)}},GTt=ETt(()=>new Vse);roe=BigInt(0),Xje=BigInt(1),KTt=BigInt(2);ZTt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));d0={_0:48,_9:57,A:65,F:70,a:97,f:102};Dse=t=>typeof t==\\\"bigint\\\"&&roe<=t;XTt=t=>(KTt<<BigInt(t-1))-Xje,eIt={bigint:t=>typeof t==\\\"bigint\\\",function:t=>typeof t==\\\"function\\\",boolean:t=>typeof t==\\\"boolean\\\",string:t=>typeof t==\\\"string\\\",stringOrUint8Array:t=>typeof t==\\\"string\\\"||noe(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t==\\\"function\\\"&&Number.isSafeInteger(t.outputLen)};mo=BigInt(0),fs=BigInt(1),m2=BigInt(2),tIt=BigInt(3),Gse=BigInt(4),Bje=BigInt(5),Mje=BigInt(8);sIt=(t,e)=>(zs(t,e)&fs)===fs,oIt=[\\\"create\\\",\\\"isValid\\\",\\\"is0\\\",\\\"neg\\\",\\\"inv\\\",\\\"sqrt\\\",\\\"sqr\\\",\\\"eql\\\",\\\"add\\\",\\\"sub\\\",\\\"mul\\\",\\\"pow\\\",\\\"div\\\",\\\"addN\\\",\\\"subN\\\",\\\"mulN\\\",\\\"sqrN\\\"];Lje=BigInt(0),_H=BigInt(1);Fse=new WeakMap,oHe=new WeakMap;ff=BigInt(0),zc=BigInt(1),CH=BigInt(2),mIt=BigInt(8),gIt={zip215:!0};BigInt(0),BigInt(1);aoe=BigInt(\\\"57896044618658097711785492504343953926634992332820282019728792003956564819949\\\"),Uje=BigInt(\\\"19681161376707505956807079304988542015446066515923890162744021073123829784752\\\");BigInt(0);wIt=BigInt(1),Fje=BigInt(2);BigInt(3);vIt=BigInt(5),xIt=BigInt(8);SIt=iHe(aoe,void 0,!0),AIt={a:BigInt(-1),d:BigInt(\\\"37095705934669439343138083508754565189542113879843219016388785533085940283555\\\"),Fp:SIt,n:BigInt(\\\"7237005577332262213973186563042994240857116359379907606001950938285454250989\\\"),h:xIt,Gx:BigInt(\\\"15112221349535400772501151409588531511454012693041857206046113283949847762202\\\"),Gy:BigInt(\\\"46316835694926478169428394003475163141307993866256225615783033603165251855960\\\"),hash:GTt,randomBytes:Jje,adjustScalarBytes:_It,uvRatio:CIt},aHe=bIt(AIt),TIt=\\\"EdDSA\\\",IIt=\\\"JWT\\\",AH=\\\".\\\",IH=\\\"base64url\\\",cHe=\\\"utf8\\\",lHe=\\\"utf8\\\",RIt=\\\":\\\",PIt=\\\"did\\\",OIt=\\\"key\\\",jje=\\\"base58btc\\\",NIt=\\\"z\\\",kIt=\\\"K36\\\",BIt=32;DIt=MIt,LIt=DIt,fHe=t=>{if(t instanceof Uint8Array&&t.constructor.name===\\\"Uint8Array\\\")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error(\\\"Unknown type, must be binary type\\\")},UIt=t=>new TextEncoder().encode(t),FIt=t=>new TextDecoder().decode(t),Kse=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\\\"Unknown type, must be binary type\\\")}},Zse=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error(\\\"Invalid prefix character\\\");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e==\\\"string\\\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\\\"Can only multibase decode strings\\\")}or(e){return pHe(this,e)}},Qse=class{constructor(e){this.decoders=e}or(e){return pHe(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},pHe=(t,e)=>new Qse({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),Jse=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Kse(e,r,n),this.decoder=new Zse(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},RH=({name:t,prefix:e,encode:r,decode:n})=>new Jse(t,e,r,n),A9=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=LIt(r,e);return RH({prefix:t,name:e,encode:n,decode:s=>fHe(i(s))})},jIt=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]===\\\"=\\\";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,l=0;for(let d=0;d<s;++d){let f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError(\\\"Unexpected end of data\\\");return o},HIt=(t,e,r)=>{let n=e[e.length-1]===\\\"=\\\",i=(1<<r)-1,s=\\\"\\\",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+=\\\"=\\\";return s},Wo=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>RH({prefix:e,name:t,encode(i){return HIt(i,n,r)},decode(i){return jIt(i,n,r,t)}}),qIt=RH({prefix:\\\"\\\\0\\\",name:\\\"identity\\\",encode:t=>FIt(t),decode:t=>UIt(t)}),zIt=Object.freeze({__proto__:null,identity:qIt}),$It=Wo({prefix:\\\"0\\\",name:\\\"base2\\\",alphabet:\\\"01\\\",bitsPerChar:1}),VIt=Object.freeze({__proto__:null,base2:$It}),WIt=Wo({prefix:\\\"7\\\",name:\\\"base8\\\",alphabet:\\\"01234567\\\",bitsPerChar:3}),GIt=Object.freeze({__proto__:null,base8:WIt}),KIt=A9({prefix:\\\"9\\\",name:\\\"base10\\\",alphabet:\\\"0123456789\\\"}),ZIt=Object.freeze({__proto__:null,base10:KIt}),QIt=Wo({prefix:\\\"f\\\",name:\\\"base16\\\",alphabet:\\\"0123456789abcdef\\\",bitsPerChar:4}),JIt=Wo({prefix:\\\"F\\\",name:\\\"base16upper\\\",alphabet:\\\"0123456789ABCDEF\\\",bitsPerChar:4}),YIt=Object.freeze({__proto__:null,base16:QIt,base16upper:JIt}),XIt=Wo({prefix:\\\"b\\\",name:\\\"base32\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567\\\",bitsPerChar:5}),e9t=Wo({prefix:\\\"B\\\",name:\\\"base32upper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\\\",bitsPerChar:5}),t9t=Wo({prefix:\\\"c\\\",name:\\\"base32pad\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567=\\\",bitsPerChar:5}),r9t=Wo({prefix:\\\"C\\\",name:\\\"base32padupper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\\\",bitsPerChar:5}),n9t=Wo({prefix:\\\"v\\\",name:\\\"base32hex\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv\\\",bitsPerChar:5}),i9t=Wo({prefix:\\\"V\\\",name:\\\"base32hexupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV\\\",bitsPerChar:5}),s9t=Wo({prefix:\\\"t\\\",name:\\\"base32hexpad\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv=\\\",bitsPerChar:5}),o9t=Wo({prefix:\\\"T\\\",name:\\\"base32hexpadupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\\\",bitsPerChar:5}),a9t=Wo({prefix:\\\"h\\\",name:\\\"base32z\\\",alphabet:\\\"ybndrfg8ejkmcpqxot1uwisza345h769\\\",bitsPerChar:5}),c9t=Object.freeze({__proto__:null,base32:XIt,base32upper:e9t,base32pad:t9t,base32padupper:r9t,base32hex:n9t,base32hexupper:i9t,base32hexpad:s9t,base32hexpadupper:o9t,base32z:a9t}),l9t=A9({prefix:\\\"k\\\",name:\\\"base36\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuvwxyz\\\"}),u9t=A9({prefix:\\\"K\\\",name:\\\"base36upper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\\\"}),d9t=Object.freeze({__proto__:null,base36:l9t,base36upper:u9t}),f9t=A9({name:\\\"base58btc\\\",prefix:\\\"z\\\",alphabet:\\\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\\\"}),p9t=A9({name:\\\"base58flickr\\\",prefix:\\\"Z\\\",alphabet:\\\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\\\"}),h9t=Object.freeze({__proto__:null,base58btc:f9t,base58flickr:p9t}),m9t=Wo({prefix:\\\"m\\\",name:\\\"base64\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",bitsPerChar:6}),g9t=Wo({prefix:\\\"M\\\",name:\\\"base64pad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\",bitsPerChar:6}),y9t=Wo({prefix:\\\"u\\\",name:\\\"base64url\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\\\",bitsPerChar:6}),b9t=Wo({prefix:\\\"U\\\",name:\\\"base64urlpad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\\\",bitsPerChar:6}),w9t=Object.freeze({__proto__:null,base64:m9t,base64pad:g9t,base64url:y9t,base64urlpad:b9t}),hHe=Array.from(\\\"\\\\u{1F680}\\\\u{1FA90}\\\\u2604\\\\u{1F6F0}\\\\u{1F30C}\\\\u{1F311}\\\\u{1F312}\\\\u{1F313}\\\\u{1F314}\\\\u{1F315}\\\\u{1F316}\\\\u{1F317}\\\\u{1F318}\\\\u{1F30D}\\\\u{1F30F}\\\\u{1F30E}\\\\u{1F409}\\\\u2600\\\\u{1F4BB}\\\\u{1F5A5}\\\\u{1F4BE}\\\\u{1F4BF}\\\\u{1F602}\\\\u2764\\\\u{1F60D}\\\\u{1F923}\\\\u{1F60A}\\\\u{1F64F}\\\\u{1F495}\\\\u{1F62D}\\\\u{1F618}\\\\u{1F44D}\\\\u{1F605}\\\\u{1F44F}\\\\u{1F601}\\\\u{1F525}\\\\u{1F970}\\\\u{1F494}\\\\u{1F496}\\\\u{1F499}\\\\u{1F622}\\\\u{1F914}\\\\u{1F606}\\\\u{1F644}\\\\u{1F4AA}\\\\u{1F609}\\\\u263A\\\\u{1F44C}\\\\u{1F917}\\\\u{1F49C}\\\\u{1F614}\\\\u{1F60E}\\\\u{1F607}\\\\u{1F339}\\\\u{1F926}\\\\u{1F389}\\\\u{1F49E}\\\\u270C\\\\u2728\\\\u{1F937}\\\\u{1F631}\\\\u{1F60C}\\\\u{1F338}\\\\u{1F64C}\\\\u{1F60B}\\\\u{1F497}\\\\u{1F49A}\\\\u{1F60F}\\\\u{1F49B}\\\\u{1F642}\\\\u{1F493}\\\\u{1F929}\\\\u{1F604}\\\\u{1F600}\\\\u{1F5A4}\\\\u{1F603}\\\\u{1F4AF}\\\\u{1F648}\\\\u{1F447}\\\\u{1F3B6}\\\\u{1F612}\\\\u{1F92D}\\\\u2763\\\\u{1F61C}\\\\u{1F48B}\\\\u{1F440}\\\\u{1F62A}\\\\u{1F611}\\\\u{1F4A5}\\\\u{1F64B}\\\\u{1F61E}\\\\u{1F629}\\\\u{1F621}\\\\u{1F92A}\\\\u{1F44A}\\\\u{1F973}\\\\u{1F625}\\\\u{1F924}\\\\u{1F449}\\\\u{1F483}\\\\u{1F633}\\\\u270B\\\\u{1F61A}\\\\u{1F61D}\\\\u{1F634}\\\\u{1F31F}\\\\u{1F62C}\\\\u{1F643}\\\\u{1F340}\\\\u{1F337}\\\\u{1F63B}\\\\u{1F613}\\\\u2B50\\\\u2705\\\\u{1F97A}\\\\u{1F308}\\\\u{1F608}\\\\u{1F918}\\\\u{1F4A6}\\\\u2714\\\\u{1F623}\\\\u{1F3C3}\\\\u{1F490}\\\\u2639\\\\u{1F38A}\\\\u{1F498}\\\\u{1F620}\\\\u261D\\\\u{1F615}\\\\u{1F33A}\\\\u{1F382}\\\\u{1F33B}\\\\u{1F610}\\\\u{1F595}\\\\u{1F49D}\\\\u{1F64A}\\\\u{1F639}\\\\u{1F5E3}\\\\u{1F4AB}\\\\u{1F480}\\\\u{1F451}\\\\u{1F3B5}\\\\u{1F91E}\\\\u{1F61B}\\\\u{1F534}\\\\u{1F624}\\\\u{1F33C}\\\\u{1F62B}\\\\u26BD\\\\u{1F919}\\\\u2615\\\\u{1F3C6}\\\\u{1F92B}\\\\u{1F448}\\\\u{1F62E}\\\\u{1F646}\\\\u{1F37B}\\\\u{1F343}\\\\u{1F436}\\\\u{1F481}\\\\u{1F632}\\\\u{1F33F}\\\\u{1F9E1}\\\\u{1F381}\\\\u26A1\\\\u{1F31E}\\\\u{1F388}\\\\u274C\\\\u270A\\\\u{1F44B}\\\\u{1F630}\\\\u{1F928}\\\\u{1F636}\\\\u{1F91D}\\\\u{1F6B6}\\\\u{1F4B0}\\\\u{1F353}\\\\u{1F4A2}\\\\u{1F91F}\\\\u{1F641}\\\\u{1F6A8}\\\\u{1F4A8}\\\\u{1F92C}\\\\u2708\\\\u{1F380}\\\\u{1F37A}\\\\u{1F913}\\\\u{1F619}\\\\u{1F49F}\\\\u{1F331}\\\\u{1F616}\\\\u{1F476}\\\\u{1F974}\\\\u25B6\\\\u27A1\\\\u2753\\\\u{1F48E}\\\\u{1F4B8}\\\\u2B07\\\\u{1F628}\\\\u{1F31A}\\\\u{1F98B}\\\\u{1F637}\\\\u{1F57A}\\\\u26A0\\\\u{1F645}\\\\u{1F61F}\\\\u{1F635}\\\\u{1F44E}\\\\u{1F932}\\\\u{1F920}\\\\u{1F927}\\\\u{1F4CC}\\\\u{1F535}\\\\u{1F485}\\\\u{1F9D0}\\\\u{1F43E}\\\\u{1F352}\\\\u{1F617}\\\\u{1F911}\\\\u{1F30A}\\\\u{1F92F}\\\\u{1F437}\\\\u260E\\\\u{1F4A7}\\\\u{1F62F}\\\\u{1F486}\\\\u{1F446}\\\\u{1F3A4}\\\\u{1F647}\\\\u{1F351}\\\\u2744\\\\u{1F334}\\\\u{1F4A3}\\\\u{1F438}\\\\u{1F48C}\\\\u{1F4CD}\\\\u{1F940}\\\\u{1F922}\\\\u{1F445}\\\\u{1F4A1}\\\\u{1F4A9}\\\\u{1F450}\\\\u{1F4F8}\\\\u{1F47B}\\\\u{1F910}\\\\u{1F92E}\\\\u{1F3BC}\\\\u{1F975}\\\\u{1F6A9}\\\\u{1F34E}\\\\u{1F34A}\\\\u{1F47C}\\\\u{1F48D}\\\\u{1F4E3}\\\\u{1F942}\\\"),v9t=hHe.reduce((t,e,r)=>(t[r]=e,t),[]),x9t=hHe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);C9t=RH({prefix:\\\"\\\\u{1F680}\\\",name:\\\"base256emoji\\\",encode:E9t,decode:_9t}),S9t=Object.freeze({__proto__:null,base256emoji:C9t}),A9t=mHe,Hje=128,T9t=127,I9t=~T9t,R9t=Math.pow(2,31);P9t=Yse,O9t=128,qje=127;N9t=Math.pow(2,7),k9t=Math.pow(2,14),B9t=Math.pow(2,21),M9t=Math.pow(2,28),D9t=Math.pow(2,35),L9t=Math.pow(2,42),U9t=Math.pow(2,49),F9t=Math.pow(2,56),j9t=Math.pow(2,63),H9t=function(t){return t<N9t?1:t<k9t?2:t<B9t?3:t<M9t?4:t<D9t?5:t<L9t?6:t<U9t?7:t<F9t?8:t<j9t?9:10},q9t={encode:A9t,decode:P9t,encodingLength:H9t},gHe=q9t,zje=(t,e,r=0)=>(gHe.encode(t,e,r),e),$je=t=>gHe.encodingLength(t),Xse=(t,e)=>{let r=e.byteLength,n=$je(t),i=n+$je(r),s=new Uint8Array(i+r);return zje(t,s,0),zje(r,s,n),s.set(e,i),new eoe(t,r,e,s)},eoe=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}},yHe=({name:t,code:e,encode:r})=>new toe(t,e,r),toe=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?Xse(this.code,r):r.then(n=>Xse(this.code,n))}else throw Error(\\\"Unknown type, must be binary type\\\")}},bHe=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),z9t=yHe({name:\\\"sha2-256\\\",code:18,encode:bHe(\\\"SHA-256\\\")}),$9t=yHe({name:\\\"sha2-512\\\",code:19,encode:bHe(\\\"SHA-512\\\")}),V9t=Object.freeze({__proto__:null,sha256:z9t,sha512:$9t}),wHe=0,W9t=\\\"identity\\\",vHe=fHe,G9t=t=>Xse(wHe,vHe(t)),K9t={code:wHe,name:W9t,encode:vHe,digest:G9t},Z9t=Object.freeze({__proto__:null,identity:K9t});new TextEncoder,new TextDecoder;Vje={...zIt,...VIt,...GIt,...ZIt,...YIt,...c9t,...d9t,...h9t,...w9t,...S9t};({...V9t,...Z9t});Wje=xHe(\\\"utf8\\\",\\\"u\\\",t=>\\\"u\\\"+new TextDecoder(\\\"utf8\\\").decode(t),t=>new TextEncoder().encode(t.substring(1))),Hse=xHe(\\\"ascii\\\",\\\"a\\\",t=>{let e=\\\"a\\\";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=uHe(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),EHe={utf8:Wje,\\\"utf-8\\\":Wje,hex:Vje.base16,latin1:Hse,ascii:Hse,binary:Hse,...Vje}});var CHe=x(()=>{u()});function I9(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}var NH=x(()=>{u()});function kl(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));let r=I9(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}var SHe=x(()=>{u();NH()});var AHe=x(()=>{u()});function e7t(t,e){if(t.length>=255)throw new TypeError(\\\"Alphabet too long\\\");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+\\\" is ambiguous\\\");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError(\\\"Expected Uint8Array\\\");if(m.length===0)return\\\"\\\";for(var g=0,w=0,v=0,b=m.length;v!==b&&m[v]===0;)v++,g++;for(var _=(b-v)*d+1>>>0,S=new Uint8Array(_);v!==b;){for(var T=m[v],N=0,O=_-1;(T!==0||N<w)&&O!==-1;O--,N++)T+=256*S[O]>>>0,S[O]=T%a>>>0,T=T/a>>>0;if(T!==0)throw new Error(\\\"Non-zero carry\\\");w=N,v++}for(var L=_-w;L!==_&&S[L]===0;)L++;for(var B=c.repeat(g);L<_;++L)B+=t.charAt(S[L]);return B}function p(m){if(typeof m!=\\\"string\\\")throw new TypeError(\\\"Expected String\\\");if(m.length===0)return new Uint8Array;var g=0;if(m[g]!==\\\" \\\"){for(var w=0,v=0;m[g]===c;)w++,g++;for(var b=(m.length-g)*l+1>>>0,_=new Uint8Array(b);m[g];){var S=r[m.charCodeAt(g)];if(S===255)return;for(var T=0,N=b-1;(S!==0||T<v)&&N!==-1;N--,T++)S+=a*_[N]>>>0,_[N]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error(\\\"Non-zero carry\\\");v=T,g++}if(m[g]!==\\\" \\\"){for(var O=b-v;O!==b&&_[O]===0;)O++;for(var L=new Uint8Array(w+(b-O)),B=w;O!==b;)L[B++]=_[O++];return L}}}function h(m){var g=p(m);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:p,decode:h}}var t7t,r7t,THe,IHe=x(()=>{u();t7t=e7t,r7t=t7t,THe=r7t});var Gon,RHe,p0,PHe,OHe,m1=x(()=>{u();Gon=new Uint8Array(0),RHe=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},p0=t=>{if(t instanceof Uint8Array&&t.constructor.name===\\\"Uint8Array\\\")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error(\\\"Unknown type, must be binary type\\\")},PHe=t=>new TextEncoder().encode(t),OHe=t=>new TextDecoder().decode(t)});var loe,uoe,doe,kHe,foe,xC,g1,n7t,i7t,ts,pf=x(()=>{u();IHe();m1();loe=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\\\"Unknown type, must be binary type\\\")}},uoe=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error(\\\"Invalid prefix character\\\");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e==\\\"string\\\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\\\"Can only multibase decode strings\\\")}or(e){return kHe(this,e)}},doe=class{constructor(e){this.decoders=e}or(e){return kHe(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},kHe=(t,e)=>new doe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),foe=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new loe(e,r,n),this.decoder=new uoe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},xC=({name:t,prefix:e,encode:r,decode:n})=>new foe(t,e,r,n),g1=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=THe(r,e);return xC({prefix:t,name:e,encode:n,decode:s=>p0(i(s))})},n7t=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]===\\\"=\\\";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,l=0;for(let d=0;d<s;++d){let f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError(\\\"Unexpected end of data\\\");return o},i7t=(t,e,r)=>{let n=e[e.length-1]===\\\"=\\\",i=(1<<r)-1,s=\\\"\\\",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+=\\\"=\\\";return s},ts=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>xC({prefix:e,name:t,encode(i){return i7t(i,n,r)},decode(i){return n7t(i,n,r,t)}})});var poe={};ue(poe,{identity:()=>s7t});var s7t,BHe=x(()=>{u();pf();m1();s7t=xC({prefix:\\\"\\\\0\\\",name:\\\"identity\\\",encode:t=>OHe(t),decode:t=>PHe(t)})});var hoe={};ue(hoe,{base2:()=>o7t});var o7t,MHe=x(()=>{u();pf();o7t=ts({prefix:\\\"0\\\",name:\\\"base2\\\",alphabet:\\\"01\\\",bitsPerChar:1})});var moe={};ue(moe,{base8:()=>a7t});var a7t,DHe=x(()=>{u();pf();a7t=ts({prefix:\\\"7\\\",name:\\\"base8\\\",alphabet:\\\"01234567\\\",bitsPerChar:3})});var goe={};ue(goe,{base10:()=>c7t});var c7t,LHe=x(()=>{u();pf();c7t=g1({prefix:\\\"9\\\",name:\\\"base10\\\",alphabet:\\\"0123456789\\\"})});var yoe={};ue(yoe,{base16:()=>l7t,base16upper:()=>u7t});var l7t,u7t,UHe=x(()=>{u();pf();l7t=ts({prefix:\\\"f\\\",name:\\\"base16\\\",alphabet:\\\"0123456789abcdef\\\",bitsPerChar:4}),u7t=ts({prefix:\\\"F\\\",name:\\\"base16upper\\\",alphabet:\\\"0123456789ABCDEF\\\",bitsPerChar:4})});var boe={};ue(boe,{base32:()=>EC,base32hex:()=>h7t,base32hexpad:()=>g7t,base32hexpadupper:()=>y7t,base32hexupper:()=>m7t,base32pad:()=>f7t,base32padupper:()=>p7t,base32upper:()=>d7t,base32z:()=>b7t});var EC,d7t,f7t,p7t,h7t,m7t,g7t,y7t,b7t,woe=x(()=>{u();pf();EC=ts({prefix:\\\"b\\\",name:\\\"base32\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567\\\",bitsPerChar:5}),d7t=ts({prefix:\\\"B\\\",name:\\\"base32upper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\\\",bitsPerChar:5}),f7t=ts({prefix:\\\"c\\\",name:\\\"base32pad\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567=\\\",bitsPerChar:5}),p7t=ts({prefix:\\\"C\\\",name:\\\"base32padupper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\\\",bitsPerChar:5}),h7t=ts({prefix:\\\"v\\\",name:\\\"base32hex\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv\\\",bitsPerChar:5}),m7t=ts({prefix:\\\"V\\\",name:\\\"base32hexupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV\\\",bitsPerChar:5}),g7t=ts({prefix:\\\"t\\\",name:\\\"base32hexpad\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv=\\\",bitsPerChar:5}),y7t=ts({prefix:\\\"T\\\",name:\\\"base32hexpadupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\\\",bitsPerChar:5}),b7t=ts({prefix:\\\"h\\\",name:\\\"base32z\\\",alphabet:\\\"ybndrfg8ejkmcpqxot1uwisza345h769\\\",bitsPerChar:5})});var voe={};ue(voe,{base36:()=>w7t,base36upper:()=>v7t});var w7t,v7t,FHe=x(()=>{u();pf();w7t=g1({prefix:\\\"k\\\",name:\\\"base36\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuvwxyz\\\"}),v7t=g1({prefix:\\\"K\\\",name:\\\"base36upper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\\\"})});var xoe={};ue(xoe,{base58btc:()=>Jp,base58flickr:()=>x7t});var Jp,x7t,Eoe=x(()=>{u();pf();Jp=g1({name:\\\"base58btc\\\",prefix:\\\"z\\\",alphabet:\\\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\\\"}),x7t=g1({name:\\\"base58flickr\\\",prefix:\\\"Z\\\",alphabet:\\\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\\\"})});var _oe={};ue(_oe,{base64:()=>E7t,base64pad:()=>_7t,base64url:()=>C7t,base64urlpad:()=>S7t});var E7t,_7t,C7t,S7t,jHe=x(()=>{u();pf();E7t=ts({prefix:\\\"m\\\",name:\\\"base64\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",bitsPerChar:6}),_7t=ts({prefix:\\\"M\\\",name:\\\"base64pad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\",bitsPerChar:6}),C7t=ts({prefix:\\\"u\\\",name:\\\"base64url\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\\\",bitsPerChar:6}),S7t=ts({prefix:\\\"U\\\",name:\\\"base64urlpad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\\\",bitsPerChar:6})});var Coe={};ue(Coe,{base256emoji:()=>P7t});function I7t(t){return t.reduce((e,r)=>(e+=A7t[r],e),\\\"\\\")}function R7t(t){let e=[];for(let r of t){let n=T7t[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}var HHe,A7t,T7t,P7t,qHe=x(()=>{u();pf();HHe=Array.from(\\\"\\\\u{1F680}\\\\u{1FA90}\\\\u2604\\\\u{1F6F0}\\\\u{1F30C}\\\\u{1F311}\\\\u{1F312}\\\\u{1F313}\\\\u{1F314}\\\\u{1F315}\\\\u{1F316}\\\\u{1F317}\\\\u{1F318}\\\\u{1F30D}\\\\u{1F30F}\\\\u{1F30E}\\\\u{1F409}\\\\u2600\\\\u{1F4BB}\\\\u{1F5A5}\\\\u{1F4BE}\\\\u{1F4BF}\\\\u{1F602}\\\\u2764\\\\u{1F60D}\\\\u{1F923}\\\\u{1F60A}\\\\u{1F64F}\\\\u{1F495}\\\\u{1F62D}\\\\u{1F618}\\\\u{1F44D}\\\\u{1F605}\\\\u{1F44F}\\\\u{1F601}\\\\u{1F525}\\\\u{1F970}\\\\u{1F494}\\\\u{1F496}\\\\u{1F499}\\\\u{1F622}\\\\u{1F914}\\\\u{1F606}\\\\u{1F644}\\\\u{1F4AA}\\\\u{1F609}\\\\u263A\\\\u{1F44C}\\\\u{1F917}\\\\u{1F49C}\\\\u{1F614}\\\\u{1F60E}\\\\u{1F607}\\\\u{1F339}\\\\u{1F926}\\\\u{1F389}\\\\u{1F49E}\\\\u270C\\\\u2728\\\\u{1F937}\\\\u{1F631}\\\\u{1F60C}\\\\u{1F338}\\\\u{1F64C}\\\\u{1F60B}\\\\u{1F497}\\\\u{1F49A}\\\\u{1F60F}\\\\u{1F49B}\\\\u{1F642}\\\\u{1F493}\\\\u{1F929}\\\\u{1F604}\\\\u{1F600}\\\\u{1F5A4}\\\\u{1F603}\\\\u{1F4AF}\\\\u{1F648}\\\\u{1F447}\\\\u{1F3B6}\\\\u{1F612}\\\\u{1F92D}\\\\u2763\\\\u{1F61C}\\\\u{1F48B}\\\\u{1F440}\\\\u{1F62A}\\\\u{1F611}\\\\u{1F4A5}\\\\u{1F64B}\\\\u{1F61E}\\\\u{1F629}\\\\u{1F621}\\\\u{1F92A}\\\\u{1F44A}\\\\u{1F973}\\\\u{1F625}\\\\u{1F924}\\\\u{1F449}\\\\u{1F483}\\\\u{1F633}\\\\u270B\\\\u{1F61A}\\\\u{1F61D}\\\\u{1F634}\\\\u{1F31F}\\\\u{1F62C}\\\\u{1F643}\\\\u{1F340}\\\\u{1F337}\\\\u{1F63B}\\\\u{1F613}\\\\u2B50\\\\u2705\\\\u{1F97A}\\\\u{1F308}\\\\u{1F608}\\\\u{1F918}\\\\u{1F4A6}\\\\u2714\\\\u{1F623}\\\\u{1F3C3}\\\\u{1F490}\\\\u2639\\\\u{1F38A}\\\\u{1F498}\\\\u{1F620}\\\\u261D\\\\u{1F615}\\\\u{1F33A}\\\\u{1F382}\\\\u{1F33B}\\\\u{1F610}\\\\u{1F595}\\\\u{1F49D}\\\\u{1F64A}\\\\u{1F639}\\\\u{1F5E3}\\\\u{1F4AB}\\\\u{1F480}\\\\u{1F451}\\\\u{1F3B5}\\\\u{1F91E}\\\\u{1F61B}\\\\u{1F534}\\\\u{1F624}\\\\u{1F33C}\\\\u{1F62B}\\\\u26BD\\\\u{1F919}\\\\u2615\\\\u{1F3C6}\\\\u{1F92B}\\\\u{1F448}\\\\u{1F62E}\\\\u{1F646}\\\\u{1F37B}\\\\u{1F343}\\\\u{1F436}\\\\u{1F481}\\\\u{1F632}\\\\u{1F33F}\\\\u{1F9E1}\\\\u{1F381}\\\\u26A1\\\\u{1F31E}\\\\u{1F388}\\\\u274C\\\\u270A\\\\u{1F44B}\\\\u{1F630}\\\\u{1F928}\\\\u{1F636}\\\\u{1F91D}\\\\u{1F6B6}\\\\u{1F4B0}\\\\u{1F353}\\\\u{1F4A2}\\\\u{1F91F}\\\\u{1F641}\\\\u{1F6A8}\\\\u{1F4A8}\\\\u{1F92C}\\\\u2708\\\\u{1F380}\\\\u{1F37A}\\\\u{1F913}\\\\u{1F619}\\\\u{1F49F}\\\\u{1F331}\\\\u{1F616}\\\\u{1F476}\\\\u{1F974}\\\\u25B6\\\\u27A1\\\\u2753\\\\u{1F48E}\\\\u{1F4B8}\\\\u2B07\\\\u{1F628}\\\\u{1F31A}\\\\u{1F98B}\\\\u{1F637}\\\\u{1F57A}\\\\u26A0\\\\u{1F645}\\\\u{1F61F}\\\\u{1F635}\\\\u{1F44E}\\\\u{1F932}\\\\u{1F920}\\\\u{1F927}\\\\u{1F4CC}\\\\u{1F535}\\\\u{1F485}\\\\u{1F9D0}\\\\u{1F43E}\\\\u{1F352}\\\\u{1F617}\\\\u{1F911}\\\\u{1F30A}\\\\u{1F92F}\\\\u{1F437}\\\\u260E\\\\u{1F4A7}\\\\u{1F62F}\\\\u{1F486}\\\\u{1F446}\\\\u{1F3A4}\\\\u{1F647}\\\\u{1F351}\\\\u2744\\\\u{1F334}\\\\u{1F4A3}\\\\u{1F438}\\\\u{1F48C}\\\\u{1F4CD}\\\\u{1F940}\\\\u{1F922}\\\\u{1F445}\\\\u{1F4A1}\\\\u{1F4A9}\\\\u{1F450}\\\\u{1F4F8}\\\\u{1F47B}\\\\u{1F910}\\\\u{1F92E}\\\\u{1F3BC}\\\\u{1F975}\\\\u{1F6A9}\\\\u{1F34E}\\\\u{1F34A}\\\\u{1F47C}\\\\u{1F48D}\\\\u{1F4E3}\\\\u{1F942}\\\"),A7t=HHe.reduce((t,e,r)=>(t[r]=e,t),[]),T7t=HHe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);P7t=xC({prefix:\\\"\\\\u{1F680}\\\",name:\\\"base256emoji\\\",encode:I7t,decode:R7t})});function VHe(t,e,r){e=e||[],r=r||0;for(var n=r;t>=B7t;)e[r++]=t&255|zHe,t/=128;for(;t&k7t;)e[r++]=t&255|zHe,t>>>=7;return e[r]=t|0,VHe.bytes=r-n+1,e}function Soe(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw Soe.bytes=0,new RangeError(\\\"Could not decode varint\\\");o=t[s++],r+=i<28?(o&$He)<<i:(o&$He)*Math.pow(2,i),i+=7}while(o>=D7t);return Soe.bytes=s-n,r}var O7t,zHe,N7t,k7t,B7t,M7t,D7t,$He,L7t,U7t,F7t,j7t,H7t,q7t,z7t,$7t,V7t,W7t,G7t,K7t,R9,WHe=x(()=>{u();O7t=VHe,zHe=128,N7t=127,k7t=~N7t,B7t=Math.pow(2,31);M7t=Soe,D7t=128,$He=127;L7t=Math.pow(2,7),U7t=Math.pow(2,14),F7t=Math.pow(2,21),j7t=Math.pow(2,28),H7t=Math.pow(2,35),q7t=Math.pow(2,42),z7t=Math.pow(2,49),$7t=Math.pow(2,56),V7t=Math.pow(2,63),W7t=function(t){return t<L7t?1:t<U7t?2:t<F7t?3:t<j7t?4:t<H7t?5:t<q7t?6:t<z7t?7:t<$7t?8:t<V7t?9:10},G7t={encode:O7t,decode:M7t,encodingLength:W7t},K7t=G7t,R9=K7t});var P9,_C,CC,BH=x(()=>{u();WHe();P9=(t,e=0)=>[R9.decode(t,e),R9.decode.bytes],_C=(t,e,r=0)=>(R9.encode(t,e,r),e),CC=t=>R9.encodingLength(t)});var y2,GHe,KHe,SC,N9=x(()=>{u();m1();BH();y2=(t,e)=>{let r=e.byteLength,n=CC(t),i=n+CC(r),s=new Uint8Array(i+r);return _C(t,s,0),_C(r,s,n),s.set(e,i),new SC(t,r,e,s)},GHe=t=>{let e=p0(t),[r,n]=P9(e),[i,s]=P9(e.subarray(n)),o=e.subarray(n+s);if(o.byteLength!==i)throw new Error(\\\"Incorrect length\\\");return new SC(r,i,o,e)},KHe=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&RHe(t.bytes,e.bytes),SC=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}});var Toe,Aoe,Ioe=x(()=>{u();N9();Toe=({name:t,code:e,encode:r})=>new Aoe(t,e,r),Aoe=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?y2(this.code,r):r.then(n=>y2(this.code,n))}else throw Error(\\\"Unknown type, must be binary type\\\")}}});var Roe={};ue(Roe,{sha256:()=>Z7t,sha512:()=>Q7t});var QHe,Z7t,Q7t,JHe=x(()=>{u();Ioe();QHe=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Z7t=Toe({name:\\\"sha2-256\\\",code:18,encode:QHe(\\\"SHA-256\\\")}),Q7t=Toe({name:\\\"sha2-512\\\",code:19,encode:QHe(\\\"SHA-512\\\")})});var Poe={};ue(Poe,{identity:()=>X7t});var YHe,J7t,XHe,Y7t,X7t,eqe=x(()=>{u();m1();N9();YHe=0,J7t=\\\"identity\\\",XHe=p0,Y7t=t=>y2(YHe,XHe(t)),X7t={code:YHe,name:J7t,encode:XHe,digest:Y7t}});var tqe=x(()=>{u();m1()});var kan,Ban,rqe=x(()=>{u();kan=new TextEncoder,Ban=new TextDecoder});var LH,rRt,nRt,iRt,k9,sRt,nqe,iqe,MH,DH,oRt,aRt,cRt,sqe=x(()=>{u();BH();N9();Eoe();woe();m1();LH=class t{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:DH,byteLength:DH,code:MH,version:MH,multihash:MH,bytes:MH,_baseCache:DH,asCID:DH})}toV0(){switch(this.version){case 0:return this;default:{let{code:e,multihash:r}=this;if(e!==k9)throw new Error(\\\"Cannot convert a non dag-pb CID to CIDv0\\\");if(r.code!==sRt)throw new Error(\\\"Cannot convert non sha2-256 multihash CID to CIDv0\\\");return t.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:e,digest:r}=this.multihash,n=y2(e,r);return t.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&KHe(this.multihash,e.multihash)}toString(e){let{bytes:r,version:n,_baseCache:i}=this;return n===0?nRt(r,i,e||Jp.encoder):iRt(r,i,e||EC.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return\\\"CID\\\"}[Symbol.for(\\\"nodejs.util.inspect.custom\\\")](){return\\\"CID(\\\"+this.toString()+\\\")\\\"}static isCID(e){return aRt(/^0\\\\.0/,cRt),!!(e&&(e[iqe]||e.asCID===e))}get toBaseEncodedString(){throw new Error(\\\"Deprecated, use .toString()\\\")}get codec(){throw new Error('\\\"codec\\\" property is deprecated, use integer \\\"code\\\" property instead')}get buffer(){throw new Error(\\\"Deprecated .buffer property, use .bytes to get Uint8Array instead\\\")}get multibaseName(){throw new Error('\\\"multibaseName\\\" property is deprecated')}get prefix(){throw new Error('\\\"prefix\\\" property is deprecated')}static asCID(e){if(e instanceof t)return e;if(e!=null&&e.asCID===e){let{version:r,code:n,multihash:i,bytes:s}=e;return new t(r,n,i,s||nqe(r,n,i.bytes))}else if(e!=null&&e[iqe]===!0){let{version:r,multihash:n,code:i}=e,s=GHe(n);return t.create(r,i,s)}else return null}static create(e,r,n){if(typeof r!=\\\"number\\\")throw new Error(\\\"String codecs are no longer supported\\\");switch(e){case 0:{if(r!==k9)throw new Error(`Version 0 CID must use dag-pb (code: ${k9}) block encoding`);return new t(e,r,n,n.bytes)}case 1:{let i=nqe(e,r,n.bytes);return new t(e,r,n,i)}default:throw new Error(\\\"Invalid version\\\")}}static createV0(e){return t.create(0,k9,e)}static createV1(e,r){return t.create(1,e,r)}static decode(e){let[r,n]=t.decodeFirst(e);if(n.length)throw new Error(\\\"Incorrect length\\\");return r}static decodeFirst(e){let r=t.inspectBytes(e),n=r.size-r.multihashSize,i=p0(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error(\\\"Incorrect length\\\");let s=i.subarray(r.multihashSize-r.digestSize),o=new SC(r.multihashCode,r.digestSize,s,i);return[r.version===0?t.createV0(o):t.createV1(r.codec,o),e.subarray(r.size)]}static inspectBytes(e){let r=0,n=()=>{let[f,p]=P9(e.subarray(r));return r+=p,f},i=n(),s=k9;if(i===18?(i=0,r=0):i===1&&(s=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=r,a=n(),c=n(),l=r+c,d=l-o;return{version:i,codec:s,multihashCode:a,digestSize:c,multihashSize:d,size:l}}static parse(e,r){let[n,i]=rRt(e,r),s=t.decode(i);return s._baseCache.set(n,e),s}},rRt=(t,e)=>{switch(t[0]){case\\\"Q\\\":{let r=e||Jp;return[Jp.prefix,r.decode(`${Jp.prefix}${t}`)]}case Jp.prefix:{let r=e||Jp;return[Jp.prefix,r.decode(t)]}case EC.prefix:{let r=e||EC;return[EC.prefix,r.decode(t)]}default:{if(e==null)throw Error(\\\"To parse non base32 or base58btc encoded CID multibase decoder must be provided\\\");return[t[0],e.decode(t)]}}},nRt=(t,e,r)=>{let{prefix:n}=r;if(n!==Jp.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=e.get(n);if(i==null){let s=r.encode(t).slice(1);return e.set(n,s),s}else return i},iRt=(t,e,r)=>{let{prefix:n}=r,i=e.get(n);if(i==null){let s=r.encode(t);return e.set(n,s),s}else return i},k9=112,sRt=18,nqe=(t,e,r)=>{let n=CC(t),i=n+CC(e),s=new Uint8Array(i+r.byteLength);return _C(t,s,0),_C(e,s,n),s.set(r,i),s},iqe=Symbol.for(\\\"@ipld/js-cid/CID\\\"),MH={writable:!1,configurable:!1,enumerable:!0},DH={writable:!1,enumerable:!1,configurable:!1},oRt=\\\"0.0.0-dev\\\",aRt=(t,e)=>{if(t.test(oRt))console.warn(e);else throw new Error(e)},cRt=`CID.isCID(v) is deprecated and will be removed in the next major release.\\nFollowing code pattern:\\n\\nif (CID.isCID(value)) {\\n  doSomethingWithCID(value)\\n}\\n\\nIs replaced with:\\n\\nconst cid = CID.asCID(value)\\nif (cid) {\\n  // Make sure to use cid instead of value\\n  doSomethingWithCID(cid)\\n}\\n`});var oqe=x(()=>{u();sqe();BH();m1();Ioe();N9()});var Ooe,Van,aqe=x(()=>{u();BHe();MHe();DHe();LHe();UHe();woe();FHe();Eoe();jHe();qHe();JHe();eqe();tqe();rqe();oqe();Ooe={...poe,...hoe,...moe,...goe,...yoe,...boe,...voe,...xoe,..._oe,...Coe},Van={...Roe,...Poe}});function lqe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}var cqe,Noe,lRt,UH,koe=x(()=>{u();aqe();NH();cqe=lqe(\\\"utf8\\\",\\\"u\\\",t=>\\\"u\\\"+new TextDecoder(\\\"utf8\\\").decode(t),t=>new TextEncoder().encode(t.substring(1))),Noe=lqe(\\\"ascii\\\",\\\"a\\\",t=>{let e=\\\"a\\\";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=I9(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),lRt={utf8:cqe,\\\"utf-8\\\":cqe,hex:Ooe.base16,latin1:Noe,ascii:Noe,binary:Noe,...Ooe},UH=lRt});function pn(t,e=\\\"utf8\\\"){let r=UH[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,\\\"utf8\\\"):r.decoder.decode(`${r.prefix}${t}`)}var uqe=x(()=>{u();koe()});function yr(t,e=\\\"utf8\\\"){let r=UH[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString(\\\"utf8\\\"):r.encoder.encode(t).substring(1)}var dqe=x(()=>{u();koe()});var fqe=x(()=>{u();NH()});var B9=x(()=>{u();CHe();SHe();AHe();uqe();dqe();fqe()});var FH,Boe=x(()=>{u();FH={waku:{publish:\\\"waku_publish\\\",batchPublish:\\\"waku_batchPublish\\\",subscribe:\\\"waku_subscribe\\\",batchSubscribe:\\\"waku_batchSubscribe\\\",subscription:\\\"waku_subscription\\\",unsubscribe:\\\"waku_unsubscribe\\\",batchUnsubscribe:\\\"waku_batchUnsubscribe\\\",batchFetchMessages:\\\"waku_batchFetchMessages\\\"},irn:{publish:\\\"irn_publish\\\",batchPublish:\\\"irn_batchPublish\\\",subscribe:\\\"irn_subscribe\\\",batchSubscribe:\\\"irn_batchSubscribe\\\",subscription:\\\"irn_subscription\\\",unsubscribe:\\\"irn_unsubscribe\\\",batchUnsubscribe:\\\"irn_batchUnsubscribe\\\",batchFetchMessages:\\\"irn_batchFetchMessages\\\"},iridium:{publish:\\\"iridium_publish\\\",batchPublish:\\\"iridium_batchPublish\\\",subscribe:\\\"iridium_subscribe\\\",batchSubscribe:\\\"iridium_batchSubscribe\\\",subscription:\\\"iridium_subscription\\\",unsubscribe:\\\"iridium_unsubscribe\\\",batchUnsubscribe:\\\"iridium_batchUnsubscribe\\\",batchFetchMessages:\\\"iridium_batchFetchMessages\\\"}}});var dce={};ue(dce,{BASE10:()=>Nae,BASE16:()=>Ko,BASE64:()=>Vc,BASE64URL:()=>nh,COLON:()=>xRt,DEFAULT_DEPTH:()=>lae,EMPTY_SPACE:()=>zH,ENV_MAP:()=>ic,INTERNAL_ERRORS:()=>r$e,MemoryStore:()=>v0,ONE_THOUSAND:()=>ERt,REACT_NATIVE_PRODUCT:()=>Zqe,RELAYER_DEFAULT_PROTOCOL:()=>Wze,SDK_ERRORS:()=>t$e,SDK_TYPE:()=>Jqe,SLASH:()=>Qqe,TYPE_0:()=>kae,TYPE_1:()=>nd,TYPE_2:()=>_2,UTF8:()=>HC,addResourceToRecap:()=>Sze,appendToQueryString:()=>Yqe,assertType:()=>SRt,assignAbilityToActions:()=>Sae,base64Decode:()=>_ze,base64Encode:()=>Eze,buildApprovedNamespaces:()=>kOt,buildAuthObject:()=>sPt,buildNamespacesFromAuth:()=>hq,buildRecapStatement:()=>Tze,calcExpiry:()=>rs,capitalize:()=>RRt,capitalizeWord:()=>nze,createDelayedPromise:()=>th,createEncodedRecap:()=>Aae,createExpiringPromise:()=>rh,createRecap:()=>Cze,decodeRecap:()=>x1,decodeTypeByte:()=>w0,decodeTypeTwoEnvelope:()=>Hae,decrypt:()=>Fae,deriveSymKey:()=>Dae,deserialize:()=>S2,encodeRecap:()=>tq,encodeTypeByte:()=>Lae,encodeTypeTwoEnvelope:()=>jae,encrypt:()=>Uae,engineEvent:()=>br,enumify:()=>IRt,extractSolanaTransactionId:()=>_ae,formatAccountId:()=>Vqe,formatAccountWithChain:()=>uRt,formatChainId:()=>$qe,formatDeeplinkUrl:()=>ize,formatExpirerTarget:()=>hae,formatIdTarget:()=>gae,formatMessage:()=>eq,formatMessageContext:()=>ARt,formatRelayParams:()=>Zze,formatRelayRpcUrl:()=>pae,formatStatementFromRecap:()=>Rae,formatTopicTarget:()=>mae,formatUA:()=>ZH,formatUri:()=>pq,fromBase64:()=>wae,generateKeyPair:()=>Mae,generateRandomBytes32:()=>Q9,getAccountsChains:()=>T2,getAccountsFromNamespaces:()=>fRt,getAddressFromAccount:()=>Wqe,getAddressesFromAccounts:()=>dRt,getAppId:()=>GH,getAppMetadata:()=>KH,getBrowserOnlineStatus:()=>l$e,getChainFromAccount:()=>Gqe,getChainsFromAccounts:()=>Kqe,getChainsFromNamespace:()=>WH,getChainsFromNamespaces:()=>pRt,getChainsFromRecap:()=>nq,getChainsFromRequiredNamespaces:()=>hRt,getCommonValuesInArrays:()=>Woe,getCryptoKeyFromKeyData:()=>Vze,getDecodedRecapFromResources:()=>wze,getDeepLink:()=>bae,getDidAddress:()=>FC,getDidAddressSegments:()=>YH,getDidChainId:()=>bze,getEnvironment:()=>E2,getHttpUrl:()=>CRt,getInternalError:()=>Ce,getJavascriptID:()=>eze,getJavascriptOS:()=>Xqe,getLastItems:()=>rze,getLinkModeURL:()=>zC,getMethodsFromRecap:()=>rq,getNamespacedDidChainId:()=>G9,getNamespacesChains:()=>Qze,getNamespacesEventsForChainId:()=>Yze,getNamespacesFromAccounts:()=>e$e,getNamespacesMethodsForChainId:()=>Jze,getNodeOnlineStatus:()=>d$e,getReCapActions:()=>xze,getReactNativeOnlineStatus:()=>u$e,getRecapAbilitiesFromResource:()=>cPt,getRecapFromResources:()=>_1,getRecapResource:()=>vze,getRelayClientMetadata:()=>_Rt,getRelayProtocolApi:()=>A2,getRelayProtocolName:()=>qC,getRequiredNamespacesFromNamespaces:()=>NOt,getSdkError:()=>Kr,getSearchParamFromURL:()=>QH,getUniqueValues:()=>cae,handleDeeplinkRedirect:()=>yae,hasOverlap:()=>w1,hashEthereumMessage:()=>Eae,hashKey:()=>C2,hashMessage:()=>Dl,isAndroid:()=>uae,isAppVisible:()=>uce,isBrowser:()=>E1,isCaipNamespace:()=>Vae,isConformingNamespaces:()=>J9,isExpired:()=>mf,isIframe:()=>aze,isIos:()=>dae,isNode:()=>DC,isOnline:()=>bq,isProposalStruct:()=>Zae,isReactNative:()=>eh,isRecap:()=>Tae,isSessionCompatible:()=>Gae,isSessionStruct:()=>Qae,isTelegram:()=>oze,isTestRun:()=>LC,isTypeOneEnvelope:()=>uq,isTypeTwoEnvelope:()=>dq,isUndefined:()=>Os,isValidAccountId:()=>n$e,isValidAccounts:()=>o$e,isValidActions:()=>c$e,isValidArray:()=>I2,isValidChainId:()=>q9,isValidChains:()=>i$e,isValidController:()=>Jae,isValidEip1271Signature:()=>gze,isValidEip191Signature:()=>mze,isValidErrorReason:()=>rce,isValidEvent:()=>sce,isValidId:()=>tce,isValidNamespaceAccounts:()=>a$e,isValidNamespaceActions:()=>Yae,isValidNamespaceChains:()=>s$e,isValidNamespaceMethodsOrEvents:()=>oae,isValidNamespaces:()=>$C,isValidNamespacesChainId:()=>yq,isValidNamespacesEvent:()=>ace,isValidNamespacesRequest:()=>oce,isValidNumber:()=>mq,isValidObject:()=>R2,isValidParams:()=>Zo,isValidRecap:()=>Xp,isValidRelay:()=>gq,isValidRelays:()=>ece,isValidRequest:()=>nce,isValidRequestExpiry:()=>cce,isValidRequiredNamespaces:()=>Xae,isValidResponse:()=>ice,isValidString:()=>Fi,isValidUrl:()=>Kae,mapEntries:()=>TRt,mapToObj:()=>z9,mergeArrays:()=>td,mergeEncodedRecaps:()=>Iae,mergeRecaps:()=>Aze,mergeRequiredAndOptionalNamespaces:()=>Wae,normalizeNamespaces:()=>H9,objToMap:()=>$9,openDeeplink:()=>sze,parseAccountId:()=>aae,parseChainId:()=>x2,parseContextNames:()=>tze,parseExpirerTarget:()=>V9,parseNamespaceKey:()=>Xze,parseRelayParams:()=>Gze,parseTopic:()=>Kze,parseUri:()=>fq,populateAppMetadata:()=>fae,populateAuthPayload:()=>oPt,recapHasResource:()=>aPt,serialize:()=>qae,sleep:()=>vae,subscribeToBrowserNetworkChange:()=>f$e,subscribeToNetworkChange:()=>lce,subscribeToReactNativeNetworkChange:()=>p$e,toBase64:()=>cze,uuidv4:()=>JH,validateDecoding:()=>zae,validateEncoding:()=>lq,validateSignedCacao:()=>XH,verifyP256Jwt:()=>$ae,verifySignature:()=>hze});function x2(t){let[e,r]=t.split(VH);return{namespace:e,reference:r}}function $qe(t){let{namespace:e,reference:r}=t;return[e,r].join(VH)}function aae(t){let[e,r,n]=t.split(VH);return{namespace:e,reference:r,address:n}}function Vqe(t){let{namespace:e,reference:r,address:n}=t;return[e,r,n].join(VH)}function cae(t,e){let r=[];return t.forEach(n=>{let i=e(n);r.includes(i)||r.push(i)}),r}function Wqe(t){let{address:e}=aae(t);return e}function Gqe(t){let{namespace:e,reference:r}=aae(t);return $qe({namespace:e,reference:r})}function uRt(t,e){let{namespace:r,reference:n}=x2(e);return Vqe({namespace:r,reference:n,address:t})}function dRt(t){return cae(t,Wqe)}function Kqe(t){return cae(t,Gqe)}function fRt(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...i.accounts)}),r}function pRt(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...Kqe(i.accounts))}),r}function hRt(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...WH(n,i))}),r}function WH(t,e){return t.includes(\\\":\\\")?[t]:e.chains||[]}function DC(){return typeof process<\\\"u\\\"&&typeof process.versions<\\\"u\\\"&&typeof process.versions.node<\\\"u\\\"}function eh(){return!(0,rd.getDocument)()&&!!(0,rd.getNavigator)()&&navigator.product===Zqe}function uae(){return eh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"&&globalThis?.Platform.OS===\\\"android\\\"}function dae(){return eh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"&&globalThis?.Platform.OS===\\\"ios\\\"}function E1(){return!DC()&&!!(0,rd.getNavigator)()&&!!(0,rd.getDocument)()}function E2(){return eh()?ic.reactNative:DC()?ic.node:E1()?ic.browser:ic.unknown}function GH(){var t;try{return eh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Application<\\\"u\\\"?(t=globalThis.Application)==null?void 0:t.applicationId:void 0}catch{return}}function Yqe(t,e){let r=new URLSearchParams(t);for(let n of Object.keys(e).sort())if(e.hasOwnProperty(n)){let i=e[n];i!==void 0&&r.set(n,i)}return r.toString()}function fae(t){var e,r;let n=KH();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t?.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!==\\\"\\\")),vRt(mqe(mqe({},n),t),{url:t?.url||n.url,name:t?.name||n.name,description:t?.description||n.description,icons:(r=t?.icons)!=null&&r.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn(\\\"Error populating app metadata\\\",i),t||n}}function KH(){return(0,zqe.getWindowMetadata)()||{name:\\\"\\\",description:\\\"\\\",url:\\\"\\\",icons:[\\\"\\\"]}}function _Rt(t,e){var r;let n=E2(),i={protocol:t,version:e,env:n};return n===\\\"browser\\\"&&(i.host=((r=(0,rd.getLocation)())==null?void 0:r.host)||\\\"unknown\\\"),i}function Xqe(){if(E2()===ic.reactNative&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"){let{OS:r,Version:n}=globalThis.Platform;return[r,n].join(\\\"-\\\")}let t=dH();if(t===null)return\\\"unknown\\\";let e=t.os?t.os.replace(\\\" \\\",\\\"\\\").toLowerCase():\\\"unknown\\\";return t.type===\\\"browser\\\"?[e,t.name,t.version].join(\\\"-\\\"):[e,t.version].join(\\\"-\\\")}function eze(){var t;let e=E2();return e===ic.browser?[e,((t=(0,rd.getLocation)())==null?void 0:t.host)||\\\"unknown\\\"].join(\\\":\\\"):e}function ZH(t,e,r){let n=Xqe(),i=eze();return[[t,e].join(\\\"-\\\"),[Jqe,r].join(\\\"-\\\"),n,i].join(\\\"/\\\")}function pae({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:c}){let l=r.split(\\\"?\\\"),d=ZH(t,e,n),f={auth:i,ua:d,projectId:s,useOnCloseEvent:o||void 0,packageName:c||void 0,bundleId:a||void 0},p=Yqe(l[1]||\\\"\\\",f);return l[0]+\\\"?\\\"+p}function CRt(t){let e=(t.match(/^[^:]+(?=:\\\\/\\\\/)/gi)||[])[0],r=typeof e<\\\"u\\\"?t.split(\\\"://\\\")[1]:t;return e=e===\\\"wss\\\"?\\\"https\\\":\\\"http\\\",[e,r].join(\\\"://\\\")}function SRt(t,e,r){if(!t[e]||typeof t[e]!==r)throw new Error(`Missing or invalid \\\"${e}\\\" param`)}function tze(t,e=lae){return rze(t.split(Qqe),e)}function ARt(t){return tze(t).join(zH)}function w1(t,e){return t.filter(r=>e.includes(r)).length===t.length}function rze(t,e=lae){return t.slice(Math.max(t.length-e,0))}function z9(t){return Object.fromEntries(t.entries())}function $9(t){return new Map(Object.entries(t))}function TRt(t,e){let r={};return Object.keys(t).forEach(n=>{r[n]=e(t[n])}),r}function nze(t){return t.trim().replace(/^\\\\w/,e=>e.toUpperCase())}function RRt(t){return t.split(zH).map(e=>nze(e)).join(zH)}function th(t=b0.FIVE_MINUTES,e){let r=(0,b0.toMiliseconds)(t||b0.FIVE_MINUTES),n,i,s,o;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a),o=Promise.resolve(a))},reject:a=>{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,c)=>{if(o)return a(o);s=setTimeout(()=>{let l=new Error(e);o=Promise.reject(l),c(l)},r),n=a,i=c})}}function rh(t,e,r){return new Promise(async(n,i)=>{let s=setTimeout(()=>i(new Error(r)),e);try{let o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function hae(t,e){if(typeof e==\\\"string\\\"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()===\\\"topic\\\"){if(typeof e!=\\\"string\\\")throw new Error('Value must be \\\"string\\\" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()===\\\"id\\\"){if(typeof e!=\\\"number\\\")throw new Error('Value must be \\\"number\\\" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function mae(t){return hae(\\\"topic\\\",t)}function gae(t){return hae(\\\"id\\\",t)}function V9(t){let[e,r]=t.split(\\\":\\\"),n={id:void 0,topic:void 0};if(e===\\\"topic\\\"&&typeof r==\\\"string\\\")n.topic=r;else if(e===\\\"id\\\"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function rs(t,e){return(0,b0.fromMiliseconds)((e||Date.now())+(0,b0.toMiliseconds)(t))}function mf(t){return Date.now()>=(0,b0.toMiliseconds)(t)}function br(t,e){return`${t}${e?`:${e}`:\\\"\\\"}`}function td(t=[],e=[]){return[...new Set([...t,...e])]}async function yae({id:t,topic:e,wcDeepLink:r}){var n;try{if(!r)return;let i=typeof r==\\\"string\\\"?JSON.parse(r):r,s=i?.href;if(typeof s!=\\\"string\\\")return;let o=ize(s,t,e),a=E2();if(a===ic.browser){if(!((n=(0,rd.getDocument)())!=null&&n.hasFocus())){console.warn(\\\"Document does not have focus, skipping deeplink.\\\");return}sze(o)}else a===ic.reactNative&&typeof globalThis?.Linking<\\\"u\\\"&&await globalThis.Linking.openURL(o)}catch(i){console.error(i)}}function ize(t,e,r){let n=`requestId=${e}&sessionTopic=${r}`;t.endsWith(\\\"/\\\")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith(\\\"https://t.me\\\")){let s=t.includes(\\\"?\\\")?\\\"&startapp=\\\":\\\"?startapp=\\\";i=`${i}${s}${cze(n,!0)}`}else i=`${i}/wc?${n}`;return i}function sze(t){let e=\\\"_self\\\";aze()?e=\\\"_top\\\":(oze()||t.startsWith(\\\"https://\\\")||t.startsWith(\\\"http://\\\"))&&(e=\\\"_blank\\\"),window.open(t,e,\\\"noreferrer noopener\\\")}async function bae(t,e){let r=\\\"\\\";try{if(E1()&&(r=localStorage.getItem(e),r))return r;r=await t.getItem(e)}catch(n){console.error(n)}return r}function Woe(t,e){return t.filter(r=>e.includes(r))}function QH(t,e){if(!t.includes(e))return null;let r=t.split(/([&,?,=])/),n=r.indexOf(e);return r[n+2]}function JH(){return typeof crypto<\\\"u\\\"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():\\\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\\".replace(/[xy]/gu,t=>{let e=Math.random()*16|0;return(t===\\\"x\\\"?e:e&3|8).toString(16)})}function LC(){return typeof process<\\\"u\\\"&&process.env.IS_VITEST===\\\"true\\\"}function oze(){return typeof window<\\\"u\\\"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function aze(){try{return window.self!==window.top}catch{return!1}}function cze(t,e=!1){let r=globalThis.Buffer.from(t).toString(\\\"base64\\\");return e?r.replace(/[=]/g,\\\"\\\"):r}function wae(t){return globalThis.Buffer.from(t,\\\"base64\\\").toString(\\\"utf-8\\\")}function vae(t){return new Promise(e=>setTimeout(e,t))}function L9(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\\\"positive integer expected, got \\\"+t)}function PRt(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function W9(t,...e){if(!PRt(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function xae(t){if(typeof t!=\\\"function\\\"||typeof t.create!=\\\"function\\\")throw new Error(\\\"Hash should be wrapped by utils.wrapConstructor\\\");L9(t.outputLen),L9(t.blockLen)}function RC(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function lze(t,e){W9(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function ORt(t,e=!1){return e?{h:Number(t&jH),l:Number(t>>gqe&jH)}:{h:Number(t>>gqe&jH)|0,l:Number(t&jH)|0}}function NRt(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:o}=ORt(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}function LRt(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Moe(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Yp(t,e){return t<<32-e|t>>>e}function URt(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function bqe(t){for(let e=0;e<t.length;e++)t[e]=URt(t[e])}function FRt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"utf8ToBytes expected string, got \\\"+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function PC(t){return typeof t==\\\"string\\\"&&(t=FRt(t)),W9(t),t}function jRt(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];W9(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function uze(t){let e=n=>t().update(PC(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function UC(t=32){if(AC&&typeof AC.getRandomValues==\\\"function\\\")return AC.getRandomValues(new Uint8Array(t));if(AC&&typeof AC.randomBytes==\\\"function\\\")return AC.randomBytes(t);throw new Error(\\\"crypto.getRandomValues must be defined\\\")}function KRt(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,l=r[c],d=r[c+1],f=wqe(l,d,1)^r[a],p=vqe(l,d,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=p}let i=t[2],s=t[3];for(let o=0;o<24;o++){let a=fze[o],c=wqe(i,s,a),l=vqe(i,s,a),d=dze[o];i=t[d],s=t[d+1],t[d]=c,t[d+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=WRt[n],t[1]^=GRt[n]}r.fill(0)}function Eae(t){let e=`\\u0019Ethereum Signed Message:\\n${t.length}`,r=new TextEncoder().encode(e+t);return\\\"0x\\\"+globalThis.Buffer.from(QRt(r)).toString(\\\"hex\\\")}async function hze(t,e,r,n,i,s){switch(r.t){case\\\"eip191\\\":return await mze(t,e,r.s);case\\\"eip1271\\\":return await gze(t,e,r.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function mze(t,e,r){return(await ap({hash:Eae(e),signature:r})).toLowerCase()===t.toLowerCase()}async function gze(t,e,r,n,i,s){let o=x2(n);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{let a=\\\"0x1626ba7e\\\",c=\\\"0000000000000000000000000000000000000000000000000000000000000040\\\",l=\\\"0000000000000000000000000000000000000000000000000000000000000041\\\",d=r.substring(2),f=Eae(e).substring(2),p=a+f+c+l+d,h=await fetch(`${s||JRt}/?chainId=${n}&projectId=${i}`,{method:\\\"POST\\\",body:JSON.stringify({id:YRt(),jsonrpc:\\\"2.0\\\",method:\\\"eth_call\\\",params:[{to:t,data:p},\\\"latest\\\"]})}),{result:m}=await h.json();return m?m.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error(\\\"isValidEip1271Signature: \\\",a),!1}}function YRt(){return Date.now()+Math.floor(Math.random()*1e3)}function _ae(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);let n=r[0];if(n===0)throw new Error(\\\"No signatures found\\\");let i=1+n*64;if(r.length<i)throw new Error(\\\"Transaction data too short for claimed signature count\\\");if(r.length<100)throw new Error(\\\"Transaction too short\\\");let s=globalThis.Buffer.from(t,\\\"base64\\\").slice(1,65);return yC.encode(s)}async function XH(t){let{cacao:e,projectId:r}=t,{s:n,p:i}=e,s=eq(i,i.iss),o=FC(i.iss);return await hze(o,s,n,G9(i.iss),r)}function sPt(t,e,r){return r.includes(\\\"did:pkh:\\\")||(r=`did:pkh:${r}`),{h:{t:\\\"caip122\\\"},p:{iss:r,domain:t.domain,aud:t.aud,version:t.version,nonce:t.nonce,iat:t.iat,statement:t.statement,requestId:t.requestId,resources:t.resources,nbf:t.nbf,exp:t.exp},s:e}}function oPt(t){var e;let{authPayload:r,chains:n,methods:i}=t,s=r.statement||\\\"\\\";if(!(n!=null&&n.length))return r;let o=r.chains,a=Woe(o,n);if(!(a!=null&&a.length))throw new Error(\\\"No supported chains\\\");let c=wze(r.resources);if(!c)return r;Xp(c);let l=vze(c,\\\"eip155\\\"),d=r?.resources||[];if(l!=null&&l.length){let f=xze(l),p=Woe(f,i);if(!(p!=null&&p.length))throw new Error(`Supported methods don't satisfy the requested: ${JSON.stringify(f)}, supported: ${JSON.stringify(i)}`);let h=Sae(\\\"request\\\",p,{chains:a}),m=Sze(c,\\\"eip155\\\",h);d=((e=r?.resources)==null?void 0:e.slice(0,-1))||[],d.push(tq(m))}return yze(Cae({},r),{statement:Tze(s,_1(d)),chains:a,resources:r!=null&&r.resources||d.length>0?d:void 0})}function wze(t){let e=_1(t);if(e&&Tae(e))return x1(e)}function aPt(t,e){var r;return(r=t?.att)==null?void 0:r.hasOwnProperty(e)}function vze(t,e){var r,n;return(r=t?.att)!=null&&r[e]?Object.keys((n=t?.att)==null?void 0:n[e]):[]}function cPt(t){return t?.map(e=>Object.keys(e))||[]}function xze(t){return t?.map(e=>{var r;return(r=e.split(\\\"/\\\"))==null?void 0:r[1]})||[]}function Eze(t){return globalThis.Buffer.from(JSON.stringify(t)).toString(\\\"base64\\\")}function _ze(t){return JSON.parse(globalThis.Buffer.from(t,\\\"base64\\\").toString(\\\"utf-8\\\"))}function Xp(t){if(!t)throw new Error(\\\"No recap provided, value is undefined\\\");if(!t.att)throw new Error(\\\"No `att` property found\\\");let e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error(\\\"No resources found in `att` property\\\");e.forEach(r=>{let n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!=\\\"object\\\")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{let s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!=\\\"object\\\")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function Cze(t,e,r,n={}){return r?.sort((i,s)=>i.localeCompare(s)),{att:{[t]:Sae(e,r,n)}}}function Sze(t,e,r){var n;t.att[e]=Cae({},r);let i=(n=Object.keys(t.att))==null?void 0:n.sort((o,a)=>o.localeCompare(a)),s={att:{}};return i.reduce((o,a)=>(o.att[a]=t.att[a],o),s)}function Sae(t,e,r={}){e=e?.sort((i,s)=>i.localeCompare(s));let n=e.map(i=>({[`${t}/${i}`]:[r]}));return Object.assign({},...n)}function tq(t){return Xp(t),`urn:recap:${Eze(t).replace(/=/g,\\\"\\\")}`}function x1(t){let e=_ze(t.replace(\\\"urn:recap:\\\",\\\"\\\"));return Xp(e),e}function Aae(t,e,r){let n=Cze(t,e,r);return tq(n)}function Tae(t){return t&&t.includes(\\\"urn:recap:\\\")}function Iae(t,e){let r=x1(t),n=x1(e),i=Aze(r,n);return tq(i)}function Aze(t,e){Xp(t),Xp(e);let r=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return r.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=yze(Cae({},n.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function Rae(t=\\\"\\\",e){Xp(e);let r=\\\"I further authorize the stated URI to perform the following actions on my behalf: \\\";if(t.includes(r))return t;let n=[],i=0;Object.keys(e.att).forEach(a=>{let c=Object.keys(e.att[a]).map(f=>({ability:f.split(\\\"/\\\")[0],action:f.split(\\\"/\\\")[1]}));c.sort((f,p)=>f.action.localeCompare(p.action));let l={};c.forEach(f=>{l[f.ability]||(l[f.ability]=[]),l[f.ability].push(f.action)});let d=Object.keys(l).map(f=>(i++,`(${i}) '${f}': '${l[f].join(\\\"', '\\\")}' for '${a}'.`));n.push(d.join(\\\", \\\").replace(\\\".,\\\",\\\".\\\"))});let s=n.join(\\\" \\\"),o=`${r}${s}`;return`${t?t+\\\" \\\":\\\"\\\"}${o}`}function rq(t){var e;let r=x1(t);Xp(r);let n=(e=r.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split(\\\"/\\\")[1]):[]}function nq(t){let e=x1(t);Xp(e);let r=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i?.[0])!=null&&s.chains&&r.push(i[0].chains)})}),[...new Set(r.flat())]}function Tze(t,e){if(!e)return t;let r=x1(e);return Xp(r),Rae(t,r)}function _1(t){if(!t)return;let e=t?.[t.length-1];return Tae(e)?e:void 0}function Doe(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\\\"positive integer expected, got \\\"+t)}function Ize(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function Ml(t,...e){if(!Ize(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function _qe(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function lPt(t,e){Ml(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function Cqe(t){if(typeof t!=\\\"boolean\\\")throw new Error(`boolean expected, not ${t}`)}function fPt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function Koe(t){if(typeof t==\\\"string\\\")t=fPt(t);else if(Ize(t))t=Zoe(t);else throw new Error(\\\"Uint8Array expected, got \\\"+typeof t);return t}function pPt(t,e){if(e==null||typeof e!=\\\"object\\\")throw new Error(\\\"options must be defined\\\");return Object.assign(t,e)}function hPt(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function Sqe(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error(\\\"invalid output length, expected \\\"+t+\\\", got: \\\"+e.length);if(r&&!gPt(e))throw new Error(\\\"invalid output, must be aligned\\\");return e}function Aqe(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function gPt(t){return t.byteOffset%4===0}function Zoe(t){return Uint8Array.from(t)}function OC(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Tr(t,e){return t<<e|t>>>32-e}function Qoe(t){return t.byteOffset%4===0}function EPt(t,e,r,n,i,s,o,a){let c=i.length,l=new Uint8Array(HH),d=v1(l),f=Qoe(i)&&Qoe(s),p=f?v1(i):Tqe,h=f?v1(s):Tqe;for(let m=0;m<c;o++){if(t(e,r,n,d,o,a),o>=Pze)throw new Error(\\\"arx: counter overflow\\\");let g=Math.min(HH,c-m);if(f&&g===HH){let w=m/4;if(m%4!==0)throw new Error(\\\"arx: invalid block position\\\");for(let v=0,b;v<xPt;v++)b=w+v,h[b]=p[b]^d[v];m+=HH;continue}for(let w=0,v;w<g;w++)v=m+w,s[v]=i[v]^l[w];m+=g}}function _Pt(t,e){let{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=pPt({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!=\\\"function\\\")throw new Error(\\\"core must be a function\\\");return Doe(i),Doe(o),Cqe(s),Cqe(r),(a,c,l,d,f=0)=>{Ml(a),Ml(c),Ml(l);let p=l.length;if(d===void 0&&(d=new Uint8Array(p)),Ml(d),Doe(f),f<0||f>=Pze)throw new Error(\\\"arx: counter overflow\\\");if(d.length<p)throw new Error(`arx: output (${d.length}) is shorter than data (${p})`);let h=[],m=a.length,g,w;if(m===32)h.push(g=Zoe(a)),w=vPt;else if(m===16&&r)g=new Uint8Array(32),g.set(a),g.set(a,16),w=wPt,h.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${m}`);Qoe(c)||h.push(c=Zoe(c));let v=v1(g);if(n){if(c.length!==24)throw new Error(\\\"arx: extended nonce must be 24 bytes\\\");n(w,v,v1(c.subarray(0,16)),v),c=c.subarray(16)}let b=16-i;if(b!==c.length)throw new Error(`arx: nonce must be ${b} or 16 bytes`);if(b!==12){let S=new Uint8Array(12);S.set(c,s?0:12-c.length),c=S,h.push(c)}let _=v1(c);return EPt(t,w,v,_,l,d,f,o),OC(...h),d}}function CPt(t){let e=(n,i)=>t(i).update(Koe(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function APt(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],d=e[0],f=e[1],p=e[2],h=e[3],m=e[4],g=e[5],w=e[6],v=e[7],b=i,_=r[0],S=r[1],T=r[2],N=o,O=a,L=c,B=l,H=d,M=f,F=p,R=h,y=m,E=g,C=w,I=v,P=b,k=_,U=S,D=T;for(let j=0;j<s;j+=2)N=N+H|0,P=Tr(P^N,16),y=y+P|0,H=Tr(H^y,12),N=N+H|0,P=Tr(P^N,8),y=y+P|0,H=Tr(H^y,7),O=O+M|0,k=Tr(k^O,16),E=E+k|0,M=Tr(M^E,12),O=O+M|0,k=Tr(k^O,8),E=E+k|0,M=Tr(M^E,7),L=L+F|0,U=Tr(U^L,16),C=C+U|0,F=Tr(F^C,12),L=L+F|0,U=Tr(U^L,8),C=C+U|0,F=Tr(F^C,7),B=B+R|0,D=Tr(D^B,16),I=I+D|0,R=Tr(R^I,12),B=B+R|0,D=Tr(D^B,8),I=I+D|0,R=Tr(R^I,7),N=N+M|0,D=Tr(D^N,16),C=C+D|0,M=Tr(M^C,12),N=N+M|0,D=Tr(D^N,8),C=C+D|0,M=Tr(M^C,7),O=O+F|0,P=Tr(P^O,16),I=I+P|0,F=Tr(F^I,12),O=O+F|0,P=Tr(P^O,8),I=I+P|0,F=Tr(F^I,7),L=L+R|0,k=Tr(k^L,16),y=y+k|0,R=Tr(R^y,12),L=L+R|0,k=Tr(k^L,8),y=y+k|0,R=Tr(R^y,7),B=B+H|0,U=Tr(U^B,16),E=E+U|0,H=Tr(H^E,12),B=B+H|0,U=Tr(U^B,8),E=E+U|0,H=Tr(H^E,7);let A=0;n[A++]=o+N|0,n[A++]=a+O|0,n[A++]=c+L|0,n[A++]=l+B|0,n[A++]=d+H|0,n[A++]=f+M|0,n[A++]=p+F|0,n[A++]=h+R|0,n[A++]=m+y|0,n[A++]=g+E|0,n[A++]=w+C|0,n[A++]=v+I|0,n[A++]=b+P|0,n[A++]=_+k|0,n[A++]=S+U|0,n[A++]=T+D|0}function Rqe(t,e,r,n,i){let s=t(e,r,RPt),o=SPt.create(s);i&&Iqe(o,i),Iqe(o,n);let a=new Uint8Array(16),c=uPt(a);Aqe(c,0,BigInt(i?i.length:0),!0),Aqe(c,8,BigInt(n.length),!0),o.update(a);let l=o.digest();return OC(s,a),l}function OPt(t,e,r){return xae(t),r===void 0&&(r=new Uint8Array(t.outputLen)),iq(t,PC(r),PC(e))}function NPt(t,e,r,n=32){if(xae(t),L9(n),n>255*t.outputLen)throw new Error(\\\"Length should be <= 255*HashLen\\\");let i=Math.ceil(n/t.outputLen);r===void 0&&(r=Pqe);let s=new Uint8Array(i*t.outputLen),o=iq.create(t,e),a=o._cloneInto(),c=new Uint8Array(o.outputLen);for(let l=0;l<i;l++)Loe[0]=l+1,a.update(l===0?Pqe:c).update(r).update(Loe).digestInto(c),s.set(c,t.outputLen*l),o._cloneInto(a);return o.destroy(),a.destroy(),c.fill(0),Loe.fill(0),s.slice(0,n)}function BPt(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function MPt(t,e,r){return t&e^~t&r}function DPt(t,e,r){return t&e^t&r^e&r}function v2(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function Z9(t){if(!v2(t))throw new Error(\\\"Uint8Array expected\\\")}function NC(t,e){if(typeof e!=\\\"boolean\\\")throw new Error(t+\\\" boolean expected, got \\\"+e)}function kC(t){Z9(t);let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=FPt[t[r]];return e}function IC(t){let e=t.toString(16);return e.length&1?\\\"0\\\"+e:e}function Pae(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);return t===\\\"\\\"?sq:BigInt(\\\"0x\\\"+t)}function Oqe(t){if(t>=h0._0&&t<=h0._9)return t-h0._0;if(t>=h0.A&&t<=h0.F)return t-(h0.A-10);if(t>=h0.a&&t<=h0.f)return t-(h0.a-10)}function BC(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=Oqe(t.charCodeAt(s)),a=Oqe(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}function w2(t){return Pae(kC(t))}function F9(t){return Z9(t),Pae(kC(Uint8Array.from(t).reverse()))}function MC(t,e){return BC(t.toString(16).padStart(e*2,\\\"0\\\"))}function aq(t,e){return MC(t,e).reverse()}function jPt(t){return BC(IC(t))}function Bl(t,e,r){let n;if(typeof e==\\\"string\\\")try{n=BC(e)}catch(s){throw new Error(t+\\\" must be hex string or Uint8Array, cause: \\\"+s)}else if(v2(e))n=Uint8Array.from(e);else throw new Error(t+\\\" must be hex string or Uint8Array\\\");let i=n.length;if(typeof r==\\\"number\\\"&&i!==r)throw new Error(t+\\\" of length \\\"+r+\\\" expected, got \\\"+i);return n}function j9(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];Z9(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function HPt(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function qPt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function cq(t,e,r){return Uoe(t)&&Uoe(e)&&Uoe(r)&&e<=t&&t<r}function y0(t,e,r,n){if(!cq(e,r,n))throw new Error(\\\"expected valid \\\"+t+\\\": \\\"+r+\\\" <= n < \\\"+n+\\\", got \\\"+e)}function Nze(t){let e;for(e=0;t>sq;t>>=oq,e+=1);return e}function zPt(t,e){return t>>BigInt(e)&oq}function $Pt(t,e,r){return t|(r?oq:sq)<<BigInt(e)}function kze(t,e,r){if(typeof t!=\\\"number\\\"||t<2)throw new Error(\\\"hashLen must be a number\\\");if(typeof e!=\\\"number\\\"||e<2)throw new Error(\\\"qByteLen must be a number\\\");if(typeof r!=\\\"function\\\")throw new Error(\\\"hmacFn must be a function\\\");let n=Foe(t),i=Foe(t),s=0,o=()=>{n.fill(1),i.fill(0),s=0},a=(...d)=>r(i,n,...d),c=(d=Foe())=>{i=a(Nqe([0]),d),n=a(),d.length!==0&&(i=a(Nqe([1]),d),n=a())},l=()=>{if(s++>=1e3)throw new Error(\\\"drbg: tried 1000 values\\\");let d=0,f=[];for(;d<e;){n=a();let p=n.slice();f.push(p),d+=n.length}return j9(...f)};return(d,f)=>{o(),c(d);let p;for(;!(p=f(l()));)c();return o(),p}}function jC(t,e,r={}){let n=(i,s,o)=>{let a=VPt[s];if(typeof a!=\\\"function\\\")throw new Error(\\\"invalid validator function\\\");let c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(\\\"param \\\"+String(i)+\\\" is invalid. Expected \\\"+s+\\\", got \\\"+c)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(r))n(i,s,!0);return t}function eae(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(i!==void 0)return i;let s=t(r,...n);return e.set(r,s),s}}function $c(t,e){let r=t%e;return r>=yo?r:e+r}function Bze(t,e,r){if(e<yo)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r<=yo)throw new Error(\\\"invalid modulus\\\");if(r===ps)return yo;let n=ps;for(;e>yo;)e&ps&&(n=n*t%r),t=t*t%r,e>>=ps;return n}function hf(t,e,r){let n=t;for(;e-- >yo;)n*=n,n%=r;return n}function rae(t,e){if(t===yo)throw new Error(\\\"invert: expected non-zero number\\\");if(e<=yo)throw new Error(\\\"invert: expected positive modulus, got \\\"+e);let r=$c(t,e),n=e,i=yo,s=ps;for(;r!==yo;){let o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==ps)throw new Error(\\\"invert: does not exist\\\");return $c(i,e)}function ZPt(t){let e=(t-ps)/b2,r,n,i;for(r=t-ps,n=0;r%b2===yo;r/=b2,n++);for(i=b2;i<t&&Bze(i,e,t)!==t-ps;i++)if(i>1e3)throw new Error(\\\"Cannot find square root: likely non-prime P\\\");if(n===1){let o=(t+ps)/tae;return function(a,c){let l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error(\\\"Cannot find square root\\\");return l}}let s=(r+ps)/b2;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error(\\\"Cannot find square root\\\");let c=n,l=o.pow(o.mul(o.ONE,i),r),d=o.pow(a,s),f=o.pow(a,r);for(;!o.eql(f,o.ONE);){if(o.eql(f,o.ZERO))return o.ZERO;let p=1;for(let m=o.sqr(f);p<c&&!o.eql(m,o.ONE);p++)m=o.sqr(m);let h=o.pow(l,ps<<BigInt(c-p-1));l=o.sqr(h),d=o.mul(d,h),f=o.mul(f,l),c=p}return d}}function QPt(t){if(t%tae===KPt){let e=(t+ps)/tae;return function(r,n){let i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error(\\\"Cannot find square root\\\");return i}}if(t%Bqe===kqe){let e=(t-kqe)/Bqe;return function(r,n){let i=r.mul(n,b2),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,b2),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error(\\\"Cannot find square root\\\");return c}}return ZPt(t)}function YPt(t){let e={ORDER:\\\"bigint\\\",MASK:\\\"bigint\\\",BYTES:\\\"isSafeInteger\\\",BITS:\\\"isSafeInteger\\\"},r=JPt.reduce((n,i)=>(n[i]=\\\"function\\\",n),e);return jC(t,r)}function XPt(t,e,r){if(r<yo)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r===yo)return t.ONE;if(r===ps)return e;let n=t.ONE,i=e;for(;r>yo;)r&ps&&(n=t.mul(n,i)),i=t.sqr(i),r>>=ps;return n}function eOt(t,e){let r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function Mze(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Dze(t,e,r=!1,n={}){if(t<=yo)throw new Error(\\\"invalid field: expected ORDER > 0, got \\\"+t);let{nBitLength:i,nByteLength:s}=Mze(t,e);if(s>2048)throw new Error(\\\"invalid field: expected ORDER of <= 2048 bytes\\\");let o,a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:Oae(i),ZERO:yo,ONE:ps,create:c=>$c(c,t),isValid:c=>{if(typeof c!=\\\"bigint\\\")throw new Error(\\\"invalid field element: expected bigint, got \\\"+typeof c);return yo<=c&&c<t},is0:c=>c===yo,isOdd:c=>(c&ps)===ps,neg:c=>$c(-c,t),eql:(c,l)=>c===l,sqr:c=>$c(c*c,t),add:(c,l)=>$c(c+l,t),sub:(c,l)=>$c(c-l,t),mul:(c,l)=>$c(c*l,t),pow:(c,l)=>XPt(a,c,l),div:(c,l)=>$c(c*rae(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>rae(c,t),sqrt:n.sqrt||(c=>(o||(o=QPt(t)),o(a,c))),invertBatch:c=>eOt(a,c),cmov:(c,l,d)=>d?l:c,toBytes:c=>r?aq(c,s):MC(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(\\\"Field.fromBytes: expected \\\"+s+\\\" bytes, got \\\"+c.length);return r?F9(c):w2(c)}});return Object.freeze(a)}function Lze(t){if(typeof t!=\\\"bigint\\\")throw new Error(\\\"field order must be bigint\\\");let e=t.toString(2).length;return Math.ceil(e/8)}function Uze(t){let e=Lze(t);return e+Math.ceil(e/2)}function tOt(t,e,r=!1){let n=t.length,i=Lze(e),s=Uze(e);if(n<16||n<s||n>1024)throw new Error(\\\"expected \\\"+s+\\\"-1024 bytes of input, got \\\"+n);let o=r?F9(t):w2(t),a=$c(o,e-ps)+ps;return r?aq(a,i):MC(a,i)}function joe(t,e){let r=e.negate();return t?r:e}function Fze(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error(\\\"invalid window size, expected [1..\\\"+e+\\\"], got W=\\\"+t)}function Hoe(t,e){Fze(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function rOt(t,e){if(!Array.isArray(t))throw new Error(\\\"array expected\\\");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error(\\\"invalid point at index \\\"+n)})}function nOt(t,e){if(!Array.isArray(t))throw new Error(\\\"array of scalars expected\\\");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error(\\\"invalid scalar at index \\\"+n)})}function zoe(t){return jze.get(t)||1}function iOt(t,e){return{constTimeNegate:joe,hasPrecomputes(r){return zoe(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>Mqe;)n&qH&&(i=i.add(s)),s=s.double(),n>>=qH;return i},precomputeWindow(r,n){let{windows:i,windowSize:s}=Hoe(n,e),o=[],a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let d=1;d<s;d++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let{windows:s,windowSize:o}=Hoe(r,e),a=t.ZERO,c=t.BASE,l=BigInt(2**r-1),d=2**r,f=BigInt(r);for(let p=0;p<s;p++){let h=p*o,m=Number(i&l);i>>=f,m>o&&(m-=d,i+=qH);let g=h,w=h+Math.abs(m)-1,v=p%2!==0,b=m<0;m===0?c=c.add(joe(v,n[g])):a=a.add(joe(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){let{windows:o,windowSize:a}=Hoe(r,e),c=BigInt(2**r-1),l=2**r,d=BigInt(r);for(let f=0;f<o;f++){let p=f*a;if(i===Mqe)break;let h=Number(i&c);if(i>>=d,h>a&&(h-=l,i+=qH),h===0)continue;let m=n[p+Math.abs(h)-1];h<0&&(m=m.negate()),s=s.add(m)}return s},getPrecomputes(r,n,i){let s=qoe.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&qoe.set(n,i(s))),s},wNAFCached(r,n,i){let s=zoe(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){let o=zoe(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){Fze(n,e),jze.set(r,n),qoe.delete(r)}}}function sOt(t,e,r,n){if(rOt(r,t),nOt(n,e),r.length!==n.length)throw new Error(\\\"arrays of points and scalars must have equal length\\\");let i=t.ZERO,s=Nze(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o,d=i;for(let f=l;f>=0;f-=o){c.fill(i);for(let h=0;h<n.length;h++){let m=n[h],g=Number(m>>BigInt(f)&BigInt(a));c[g]=c[g].add(r[h])}let p=i;for(let h=c.length-1,m=i;h>0;h--)m=m.add(c[h]),p=p.add(m);if(d=d.add(p),f!==0)for(let h=0;h<o;h++)d=d.double()}return d}function Hze(t){return YPt(t.Fp),jC(t,{n:\\\"bigint\\\",h:\\\"bigint\\\",Gx:\\\"field\\\",Gy:\\\"field\\\"},{nBitLength:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\"}),Object.freeze({...Mze(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function oOt(t){return jC(t,{a:\\\"bigint\\\"},{montgomeryBits:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\",adjustScalarBytes:\\\"function\\\",domain:\\\"function\\\",powPminus2:\\\"function\\\",Gu:\\\"bigint\\\"}),Object.freeze({...t})}function aOt(t){let e=oOt(t),{P:r}=e,n=b=>$c(b,r),i=e.montgomeryBits,s=Math.ceil(i/8),o=e.nByteLength,a=e.adjustScalarBytes||(b=>b),c=e.powPminus2||(b=>Bze(b,r-BigInt(2),r));function l(b,_,S){let T=n(b*(_-S));return _=n(_-T),S=n(S+T),[_,S]}let d=(e.a-BigInt(2))/BigInt(4);function f(b,_){y0(\\\"u\\\",b,TC,r),y0(\\\"scalar\\\",_,TC,r);let S=_,T=b,N=$oe,O=TC,L=b,B=$oe,H=TC,M;for(let R=BigInt(i-1);R>=TC;R--){let y=S>>R&$oe;H^=y,M=l(H,N,L),N=M[0],L=M[1],M=l(H,O,B),O=M[0],B=M[1],H=y;let E=N+O,C=n(E*E),I=N-O,P=n(I*I),k=C-P,U=L+B,D=L-B,A=n(D*E),j=n(U*I),K=A+j,J=A-j;L=n(K*K),B=n(T*n(J*J)),N=n(C*P),O=n(k*(C+n(d*k)))}M=l(H,N,L),N=M[0],L=M[1],M=l(H,O,B),O=M[0],B=M[1];let F=c(O);return n(N*F)}function p(b){return aq(n(b),s)}function h(b){let _=Bl(\\\"u coordinate\\\",b,s);return o===32&&(_[31]&=127),F9(_)}function m(b){let _=Bl(\\\"scalar\\\",b),S=_.length;if(S!==s&&S!==o){let T=\\\"\\\"+s+\\\" or \\\"+o;throw new Error(\\\"invalid scalar, expected \\\"+T+\\\" bytes, got \\\"+S)}return F9(a(_))}function g(b,_){let S=h(_),T=m(b),N=f(S,T);if(N===TC)throw new Error(\\\"invalid private or public key received\\\");return p(N)}let w=p(e.Gu);function v(b){return g(b,w)}return{scalarMult:g,scalarMultBase:v,getSharedSecret:(b,_)=>g(b,_),getPublicKey:b=>v(b),utils:{randomPrivateKey:()=>e.randomBytes(e.nByteLength)},GuBytes:w}}function dOt(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=nae,o=t*t%s*t%s,a=hf(o,Dqe,s)*o%s,c=hf(a,cOt,s)*t%s,l=hf(c,uOt,s)*c%s,d=hf(l,e,s)*l%s,f=hf(d,r,s)*d%s,p=hf(f,n,s)*f%s,h=hf(p,i,s)*p%s,m=hf(h,i,s)*p%s,g=hf(m,e,s)*l%s;return{pow_p_5_8:hf(g,Dqe,s)*t%s,b2:o}}function fOt(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function Lqe(t){t.lowS!==void 0&&NC(\\\"lowS\\\",t.lowS),t.prehash!==void 0&&NC(\\\"prehash\\\",t.prehash)}function pOt(t){let e=Hze(t);jC(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 new Error(\\\"invalid endomorphism, can only be defined for Koblitz curves that have a=0\\\");if(typeof r!=\\\"object\\\"||typeof r.beta!=\\\"bigint\\\"||typeof r.splitScalar!=\\\"function\\\")throw new Error(\\\"invalid endomorphism, expected beta: bigint and splitScalar: function\\\")}return Object.freeze({...e})}function gOt(t){let e=pOt(t),{Fp:r}=e,n=Dze(e.n,e.nBitLength),i=e.toBytes||((g,w,v)=>{let b=w.toAffine();return j9(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=e.fromBytes||(g=>{let w=g.subarray(1),v=r.fromBytes(w.subarray(0,r.BYTES)),b=r.fromBytes(w.subarray(r.BYTES,2*r.BYTES));return{x:v,y:b}});function o(g){let{a:w,b:v}=e,b=r.sqr(g),_=r.mul(b,g);return r.add(r.add(_,r.mul(g,w)),v)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error(\\\"bad generator point: equation left != right\\\");function a(g){return cq(g,go,e.n)}function c(g){let{allowedPrivateKeyLengths:w,nByteLength:v,wrapPrivateKey:b,n:_}=e;if(w&&typeof g!=\\\"bigint\\\"){if(v2(g)&&(g=kC(g)),typeof g!=\\\"string\\\"||!w.includes(g.length))throw new Error(\\\"invalid private key\\\");g=g.padStart(v*2,\\\"0\\\")}let S;try{S=typeof g==\\\"bigint\\\"?g:w2(Bl(\\\"private key\\\",g,v))}catch{throw new Error(\\\"invalid private key, expected hex or \\\"+v+\\\" bytes, got \\\"+typeof g)}return b&&(S=$c(S,_)),y0(\\\"private key\\\",S,go,_),S}function l(g){if(!(g instanceof p))throw new Error(\\\"ProjectivePoint expected\\\")}let d=eae((g,w)=>{let{px:v,py:b,pz:_}=g;if(r.eql(_,r.ONE))return{x:v,y:b};let S=g.is0();w==null&&(w=S?r.ONE:r.inv(_));let T=r.mul(v,w),N=r.mul(b,w),O=r.mul(_,w);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error(\\\"invZ was invalid\\\");return{x:T,y:N}}),f=eae(g=>{if(g.is0()){if(e.allowInfinityPoint&&!r.is0(g.py))return;throw new Error(\\\"bad point: ZERO\\\")}let{x:w,y:v}=g.toAffine();if(!r.isValid(w)||!r.isValid(v))throw new Error(\\\"bad point: x or y not FE\\\");let b=r.sqr(v),_=o(w);if(!r.eql(b,_))throw new Error(\\\"bad point: equation left != right\\\");if(!g.isTorsionFree())throw new Error(\\\"bad point: not in prime-order subgroup\\\");return!0});class p{constructor(w,v,b){if(this.px=w,this.py=v,this.pz=b,w==null||!r.isValid(w))throw new Error(\\\"x required\\\");if(v==null||!r.isValid(v))throw new Error(\\\"y required\\\");if(b==null||!r.isValid(b))throw new Error(\\\"z required\\\");Object.freeze(this)}static fromAffine(w){let{x:v,y:b}=w||{};if(!w||!r.isValid(v)||!r.isValid(b))throw new Error(\\\"invalid affine point\\\");if(w instanceof p)throw new Error(\\\"projective point not allowed\\\");let _=S=>r.eql(S,r.ZERO);return _(v)&&_(b)?p.ZERO:new p(v,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){let v=r.invertBatch(w.map(b=>b.pz));return w.map((b,_)=>b.toAffine(v[_])).map(p.fromAffine)}static fromHex(w){let v=p.fromAffine(s(Bl(\\\"pointHex\\\",w)));return v.assertValidity(),v}static fromPrivateKey(w){return p.BASE.multiply(c(w))}static msm(w,v){return sOt(p,n,w,v)}_setWindowSize(w){m.setWindowSize(this,w)}assertValidity(){f(this)}hasEvenY(){let{y:w}=this.toAffine();if(r.isOdd)return!r.isOdd(w);throw new Error(\\\"Field doesn't support isOdd\\\")}equals(w){l(w);let{px:v,py:b,pz:_}=this,{px:S,py:T,pz:N}=w,O=r.eql(r.mul(v,N),r.mul(S,_)),L=r.eql(r.mul(b,N),r.mul(T,_));return O&&L}negate(){return new p(this.px,r.neg(this.py),this.pz)}double(){let{a:w,b:v}=e,b=r.mul(v,Uqe),{px:_,py:S,pz:T}=this,N=r.ZERO,O=r.ZERO,L=r.ZERO,B=r.mul(_,_),H=r.mul(S,S),M=r.mul(T,T),F=r.mul(_,S);return F=r.add(F,F),L=r.mul(_,T),L=r.add(L,L),N=r.mul(w,L),O=r.mul(b,M),O=r.add(N,O),N=r.sub(H,O),O=r.add(H,O),O=r.mul(N,O),N=r.mul(F,N),L=r.mul(b,L),M=r.mul(w,M),F=r.sub(B,M),F=r.mul(w,F),F=r.add(F,L),L=r.add(B,B),B=r.add(L,B),B=r.add(B,M),B=r.mul(B,F),O=r.add(O,B),M=r.mul(S,T),M=r.add(M,M),B=r.mul(M,F),N=r.sub(N,B),L=r.mul(M,H),L=r.add(L,L),L=r.add(L,L),new p(N,O,L)}add(w){l(w);let{px:v,py:b,pz:_}=this,{px:S,py:T,pz:N}=w,O=r.ZERO,L=r.ZERO,B=r.ZERO,H=e.a,M=r.mul(e.b,Uqe),F=r.mul(v,S),R=r.mul(b,T),y=r.mul(_,N),E=r.add(v,b),C=r.add(S,T);E=r.mul(E,C),C=r.add(F,R),E=r.sub(E,C),C=r.add(v,_);let I=r.add(S,N);return C=r.mul(C,I),I=r.add(F,y),C=r.sub(C,I),I=r.add(b,_),O=r.add(T,N),I=r.mul(I,O),O=r.add(R,y),I=r.sub(I,O),B=r.mul(H,C),O=r.mul(M,y),B=r.add(O,B),O=r.sub(R,B),B=r.add(R,B),L=r.mul(O,B),R=r.add(F,F),R=r.add(R,F),y=r.mul(H,y),C=r.mul(M,C),R=r.add(R,y),y=r.sub(F,y),y=r.mul(H,y),C=r.add(C,y),F=r.mul(R,C),L=r.add(L,F),F=r.mul(I,C),O=r.mul(E,O),O=r.sub(O,F),F=r.mul(E,R),B=r.mul(I,B),B=r.add(B,F),new p(O,L,B)}subtract(w){return this.add(w.negate())}is0(){return this.equals(p.ZERO)}wNAF(w){return m.wNAFCached(this,w,p.normalizeZ)}multiplyUnsafe(w){let{endo:v,n:b}=e;y0(\\\"scalar\\\",w,g0,b);let _=p.ZERO;if(w===g0)return _;if(this.is0()||w===go)return this;if(!v||m.hasPrecomputes(this))return m.wNAFCachedUnsafe(this,w,p.normalizeZ);let{k1neg:S,k1:T,k2neg:N,k2:O}=v.splitScalar(w),L=_,B=_,H=this;for(;T>g0||O>g0;)T&go&&(L=L.add(H)),O&go&&(B=B.add(H)),H=H.double(),T>>=go,O>>=go;return S&&(L=L.negate()),N&&(B=B.negate()),B=new p(r.mul(B.px,v.beta),B.py,B.pz),L.add(B)}multiply(w){let{endo:v,n:b}=e;y0(\\\"scalar\\\",w,go,b);let _,S;if(v){let{k1neg:T,k1:N,k2neg:O,k2:L}=v.splitScalar(w),{p:B,f:H}=this.wNAF(N),{p:M,f:F}=this.wNAF(L);B=m.constTimeNegate(T,B),M=m.constTimeNegate(O,M),M=new p(r.mul(M.px,v.beta),M.py,M.pz),_=B.add(M),S=H.add(F)}else{let{p:T,f:N}=this.wNAF(w);_=T,S=N}return p.normalizeZ([_,S])[0]}multiplyAndAddUnsafe(w,v,b){let _=p.BASE,S=(N,O)=>O===g0||O===go||!N.equals(_)?N.multiplyUnsafe(O):N.multiply(O),T=S(this,v).add(S(w,b));return T.is0()?void 0:T}toAffine(w){return d(this,w)}isTorsionFree(){let{h:w,isTorsionFree:v}=e;if(w===go)return!0;if(v)return v(p,this);throw new Error(\\\"isTorsionFree() has not been declared for the elliptic curve\\\")}clearCofactor(){let{h:w,clearCofactor:v}=e;return w===go?this:v?v(p,this):this.multiplyUnsafe(e.h)}toRawBytes(w=!0){return NC(\\\"isCompressed\\\",w),this.assertValidity(),i(p,this,w)}toHex(w=!0){return NC(\\\"isCompressed\\\",w),kC(this.toRawBytes(w))}}p.BASE=new p(e.Gx,e.Gy,r.ONE),p.ZERO=new p(r.ZERO,r.ONE,r.ZERO);let h=e.nBitLength,m=iOt(p,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:p,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:a}}function yOt(t){let e=Hze(t);return jC(e,{hash:\\\"hash\\\",hmac:\\\"function\\\",randomBytes:\\\"function\\\"},{bits2int:\\\"function\\\",bits2int_modN:\\\"function\\\",lowS:\\\"boolean\\\"}),Object.freeze({lowS:!0,...e})}function bOt(t){let e=yOt(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(y){return $c(y,n)}function a(y){return rae(y,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:d,isWithinCurveOrder:f}=gOt({...e,toBytes(y,E,C){let I=E.toAffine(),P=r.toBytes(I.x),k=j9;return NC(\\\"isCompressed\\\",C),C?k(Uint8Array.from([E.hasEvenY()?2:3]),P):k(Uint8Array.from([4]),P,r.toBytes(I.y))},fromBytes(y){let E=y.length,C=y[0],I=y.subarray(1);if(E===i&&(C===2||C===3)){let P=w2(I);if(!cq(P,go,r.ORDER))throw new Error(\\\"Point is not on curve\\\");let k=d(P),U;try{U=r.sqrt(k)}catch(A){let j=A instanceof Error?\\\": \\\"+A.message:\\\"\\\";throw new Error(\\\"Point is not on curve\\\"+j)}let D=(U&go)===go;return(C&1)===1!==D&&(U=r.neg(U)),{x:P,y:U}}else if(E===s&&C===4){let P=r.fromBytes(I.subarray(0,r.BYTES)),k=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return{x:P,y:k}}else{let P=i,k=s;throw new Error(\\\"invalid Point, expected length of \\\"+P+\\\", or uncompressed \\\"+k+\\\", got \\\"+E)}}}),p=y=>kC(MC(y,e.nByteLength));function h(y){let E=n>>go;return y>E}function m(y){return h(y)?o(-y):y}let g=(y,E,C)=>w2(y.slice(E,C));class w{constructor(E,C,I){this.r=E,this.s=C,this.recovery=I,this.assertValidity()}static fromCompact(E){let C=e.nByteLength;return E=Bl(\\\"compactSignature\\\",E,C*2),new w(g(E,0,C),g(E,C,2*C))}static fromDER(E){let{r:C,s:I}=m0.toSig(Bl(\\\"DER\\\",E));return new w(C,I)}assertValidity(){y0(\\\"r\\\",this.r,go,n),y0(\\\"s\\\",this.s,go,n)}addRecoveryBit(E){return new w(this.r,this.s,E)}recoverPublicKey(E){let{r:C,s:I,recovery:P}=this,k=N(Bl(\\\"msgHash\\\",E));if(P==null||![0,1,2,3].includes(P))throw new Error(\\\"recovery id invalid\\\");let U=P===2||P===3?C+e.n:C;if(U>=r.ORDER)throw new Error(\\\"recovery id 2 or 3 invalid\\\");let D=(P&1)===0?\\\"02\\\":\\\"03\\\",A=c.fromHex(D+p(U)),j=a(U),K=o(-k*j),J=o(I*j),X=c.BASE.multiplyAndAddUnsafe(A,K,J);if(!X)throw new Error(\\\"point at infinify\\\");return X.assertValidity(),X}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return BC(this.toDERHex())}toDERHex(){return m0.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return BC(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}let v={isValidPrivateKey(y){try{return l(y),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let y=Uze(e.n);return tOt(e.randomBytes(y),e.n)},precompute(y=8,E=c.BASE){return E._setWindowSize(y),E.multiply(BigInt(3)),E}};function b(y,E=!0){return c.fromPrivateKey(y).toRawBytes(E)}function _(y){let E=v2(y),C=typeof y==\\\"string\\\",I=(E||C)&&y.length;return E?I===i||I===s:C?I===2*i||I===2*s:y instanceof c}function S(y,E,C=!0){if(_(y))throw new Error(\\\"first arg must be private key\\\");if(!_(E))throw new Error(\\\"second arg must be public key\\\");return c.fromHex(E).multiply(l(y)).toRawBytes(C)}let T=e.bits2int||function(y){if(y.length>8192)throw new Error(\\\"input is too large\\\");let E=w2(y),C=y.length*8-e.nBitLength;return C>0?E>>BigInt(C):E},N=e.bits2int_modN||function(y){return o(T(y))},O=Oae(e.nBitLength);function L(y){return y0(\\\"num < 2^\\\"+e.nBitLength,y,g0,O),MC(y,e.nByteLength)}function B(y,E,C=H){if([\\\"recovered\\\",\\\"canonical\\\"].some(fe=>fe in C))throw new Error(\\\"sign() legacy options not supported\\\");let{hash:I,randomBytes:P}=e,{lowS:k,prehash:U,extraEntropy:D}=C;k==null&&(k=!0),y=Bl(\\\"msgHash\\\",y),Lqe(C),U&&(y=Bl(\\\"prehashed msgHash\\\",I(y)));let A=N(y),j=l(E),K=[L(j),L(A)];if(D!=null&&D!==!1){let fe=D===!0?P(r.BYTES):D;K.push(Bl(\\\"extraEntropy\\\",fe))}let J=j9(...K),X=A;function re(fe){let ce=T(fe);if(!f(ce))return;let We=a(ce),Ue=c.BASE.multiply(ce).toAffine(),je=o(Ue.x);if(je===g0)return;let Lt=o(We*o(X+je*j));if(Lt===g0)return;let pt=(Ue.x===je?0:2)|Number(Ue.y&go),Ct=Lt;return k&&h(Lt)&&(Ct=m(Lt),pt^=1),new w(je,Ct,pt)}return{seed:J,k2sig:re}}let H={lowS:e.lowS,prehash:!1},M={lowS:e.lowS,prehash:!1};function F(y,E,C=H){let{seed:I,k2sig:P}=B(y,E,C),k=e;return kze(k.hash.outputLen,k.nByteLength,k.hmac)(I,P)}c.BASE._setWindowSize(8);function R(y,E,C,I=M){let P=y;E=Bl(\\\"msgHash\\\",E),C=Bl(\\\"publicKey\\\",C);let{lowS:k,prehash:U,format:D}=I;if(Lqe(I),\\\"strict\\\"in I)throw new Error(\\\"options.strict was renamed to lowS\\\");if(D!==void 0&&D!==\\\"compact\\\"&&D!==\\\"der\\\")throw new Error(\\\"format must be compact or der\\\");let A=typeof P==\\\"string\\\"||v2(P),j=!A&&!D&&typeof P==\\\"object\\\"&&P!==null&&typeof P.r==\\\"bigint\\\"&&typeof P.s==\\\"bigint\\\";if(!A&&!j)throw new Error(\\\"invalid signature, expected Uint8Array, hex string or Signature instance\\\");let K,J;try{if(j&&(K=new w(P.r,P.s)),A){try{D!==\\\"compact\\\"&&(K=w.fromDER(P))}catch(Lt){if(!(Lt instanceof m0.Err))throw Lt}!K&&D!==\\\"der\\\"&&(K=w.fromCompact(P))}J=c.fromHex(C)}catch{return!1}if(!K||k&&K.hasHighS())return!1;U&&(E=e.hash(E));let{r:X,s:re}=K,fe=N(E),ce=a(re),We=o(fe*ce),Ue=o(X*ce),je=c.BASE.multiplyAndAddUnsafe(J,We,Ue)?.toAffine();return je?o(je.x)===X:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:S,sign:F,verify:R,ProjectivePoint:c,Signature:w,utils:v}}function wOt(t){return{hash:t,hmac:(e,...r)=>iq(t,e,jRt(...r)),randomBytes:UC}}function vOt(t,e){let r=n=>bOt({...t,...wOt(n)});return{...r(e),create:r}}function Mae(){let t=iae.utils.randomPrivateKey(),e=iae.getPublicKey(t);return{privateKey:yr(t,Ko),publicKey:yr(e,Ko)}}function Q9(){let t=UC(Bae);return yr(t,Ko)}function Dae(t,e){let r=iae.getSharedSecret(pn(t,Ko),pn(e,Ko)),n=kPt(K9,r,void 0,void 0,Bae);return yr(n,Ko)}function C2(t){let e=K9(pn(t,Ko));return yr(e,Ko)}function Dl(t){let e=K9(pn(t,HC));return yr(e,Ko)}function Lae(t){return pn(`${t}`,Nae)}function w0(t){return Number(yr(t,Nae))}function zze(t){return t.replace(/\\\\+/g,\\\"-\\\").replace(/\\\\//g,\\\"_\\\").replace(/=/g,\\\"\\\")}function $ze(t){let e=t.replace(/-/g,\\\"+\\\").replace(/_/g,\\\"/\\\"),r=(4-e.length%4)%4;return e+\\\"=\\\".repeat(r)}function Uae(t){let e=Lae(typeof t.type<\\\"u\\\"?t.type:kae);if(w0(e)===nd&&typeof t.senderPublicKey>\\\"u\\\")throw new Error(\\\"Missing sender public key for type 1 envelope\\\");let r=typeof t.senderPublicKey<\\\"u\\\"?pn(t.senderPublicKey,Ko):void 0,n=typeof t.iv<\\\"u\\\"?pn(t.iv,Ko):UC(D9),i=pn(t.symKey,Ko),s=Oze(i,n).encrypt(pn(t.message,HC)),o=qae({type:e,sealed:s,iv:n,senderPublicKey:r});return t.encoding===nh?zze(o):o}function Fae(t){let e=pn(t.symKey,Ko),{sealed:r,iv:n}=S2({encoded:t.encoded,encoding:t.encoding}),i=Oze(e,n).decrypt(r);if(i===null)throw new Error(\\\"Failed to decrypt\\\");return yr(i,HC)}function jae(t,e){let r=Lae(_2),n=UC(D9),i=pn(t,HC),s=qae({type:r,sealed:i,iv:n});return e===nh?zze(s):s}function Hae(t,e){let{sealed:r}=S2({encoded:t,encoding:e});return yr(r,HC)}function qae(t){if(w0(t.type)===_2)return yr(kl([t.type,t.sealed]),Vc);if(w0(t.type)===nd){if(typeof t.senderPublicKey>\\\"u\\\")throw new Error(\\\"Missing sender public key for type 1 envelope\\\");return yr(kl([t.type,t.senderPublicKey,t.iv,t.sealed]),Vc)}return yr(kl([t.type,t.iv,t.sealed]),Vc)}function S2(t){let e=(t.encoding||Vc)===nh?$ze(t.encoded):t.encoded,r=pn(e,Vc),n=r.slice(COt,Fqe),i=Fqe;if(w0(n)===nd){let c=i+Bae,l=c+D9,d=r.slice(i,c),f=r.slice(c,l),p=r.slice(l);return{type:n,sealed:p,iv:f,senderPublicKey:d}}if(w0(n)===_2){let c=r.slice(i),l=UC(D9);return{type:n,sealed:c,iv:l}}let s=i+D9,o=r.slice(i,s),a=r.slice(s);return{type:n,sealed:a,iv:o}}function zae(t,e){let r=S2({encoded:t,encoding:e?.encoding});return lq({type:w0(r.type),senderPublicKey:typeof r.senderPublicKey<\\\"u\\\"?yr(r.senderPublicKey,Ko):void 0,receiverPublicKey:e?.receiverPublicKey})}function lq(t){let e=t?.type||kae;if(e===nd){if(typeof t?.senderPublicKey>\\\"u\\\")throw new Error(\\\"missing sender public key\\\");if(typeof t?.receiverPublicKey>\\\"u\\\")throw new Error(\\\"missing receiver public key\\\")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function uq(t){return t.type===nd&&typeof t.senderPublicKey==\\\"string\\\"&&typeof t.receiverPublicKey==\\\"string\\\"}function dq(t){return t.type===_2}function Vze(t){let e=globalThis.Buffer.from(t.x,\\\"base64\\\"),r=globalThis.Buffer.from(t.y,\\\"base64\\\");return kl([new Uint8Array([4]),e,r])}function $ae(t,e){let[r,n,i]=t.split(\\\".\\\"),s=globalThis.Buffer.from($ze(i),\\\"base64\\\");if(s.length!==64)throw new Error(\\\"Invalid signature length\\\");let o=s.slice(0,32),a=s.slice(32,64),c=`${r}.${n}`,l=K9(c),d=Vze(e);if(!_Ot.verify(kl([o,a]),l,d))throw new Error(\\\"Invalid signature\\\");return Qp(t).payload}function qC(t){return t?.relay||{protocol:Wze}}function A2(t){let e=FH[t];if(typeof e>\\\"u\\\")throw new Error(`Relay Protocol not supported: ${t}`);return e}function Gze(t,e=\\\"-\\\"){let r={},n=\\\"relay\\\"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){let s=i.replace(n,\\\"\\\"),o=t[i];r[s]=o}}),r}function fq(t){if(!t.includes(\\\"wc:\\\")){let l=wae(t);l!=null&&l.includes(\\\"wc:\\\")&&(t=l)}t=t.includes(\\\"wc://\\\")?t.replace(\\\"wc://\\\",\\\"\\\"):t,t=t.includes(\\\"wc:\\\")?t.replace(\\\"wc:\\\",\\\"\\\"):t;let e=t.indexOf(\\\":\\\"),r=t.indexOf(\\\"?\\\")!==-1?t.indexOf(\\\"?\\\"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split(\\\"@\\\"),s=typeof r<\\\"u\\\"?t.substring(r):\\\"\\\",o=new URLSearchParams(s),a={};o.forEach((l,d)=>{a[d]=l});let c=typeof a.methods==\\\"string\\\"?a.methods.split(\\\",\\\"):void 0;return{protocol:n,topic:Kze(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:Gze(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function Kze(t){return t.startsWith(\\\"//\\\")?t.substring(2):t}function Zze(t,e=\\\"-\\\"){let r=\\\"relay\\\",n={};return Object.keys(t).forEach(i=>{let s=i,o=r+e+s;t[s]&&(n[o]=t[s])}),n}function pq(t){let e=new URLSearchParams,r=Zze(t.relay);Object.keys(r).sort().forEach(i=>{e.set(i,r[i])}),e.set(\\\"symKey\\\",t.symKey),t.expiryTimestamp&&e.set(\\\"expiryTimestamp\\\",t.expiryTimestamp.toString()),t.methods&&e.set(\\\"methods\\\",t.methods.join(\\\",\\\"));let n=e.toString();return`${t.protocol}:${t.topic}@${t.version}?${n}`}function zC(t,e,r){return`${t}?wc_ev=${r}&topic=${e}`}function T2(t){let e=[];return t.forEach(r=>{let[n,i]=r.split(\\\":\\\");e.push(`${n}:${i}`)}),e}function Qze(t){let e=[];return Object.values(t).forEach(r=>{e.push(...T2(r.accounts))}),e}function Jze(t,e){let r=[];return Object.values(t).forEach(n=>{T2(n.accounts).includes(e)&&r.push(...n.methods)}),r}function Yze(t,e){let r=[];return Object.values(t).forEach(n=>{T2(n.accounts).includes(e)&&r.push(...n.events)}),r}function NOt(t,e){let r=$C(t,e);if(r)throw new Error(r.message);let n={};for(let[i,s]of Object.entries(t))n[i]={methods:s.methods,events:s.events,chains:s.accounts.map(o=>`${o.split(\\\":\\\")[0]}:${o.split(\\\":\\\")[1]}`)};return n}function kOt(t){let{proposal:{requiredNamespaces:e,optionalNamespaces:r={}},supportedNamespaces:n}=t,i=H9(e),s=H9(r),o={};Object.keys(n).forEach(l=>{let d=n[l].chains,f=n[l].methods,p=n[l].events,h=n[l].accounts;d.forEach(m=>{if(!h.some(g=>g.includes(m)))throw new Error(`No accounts provided for chain ${m} in namespace ${l}`)}),o[l]={chains:d,methods:f,events:p,accounts:h}});let a=J9(e,o,\\\"approve()\\\");if(a)throw new Error(a.message);let c={};return!Object.keys(e).length&&!Object.keys(r).length?o:(Object.keys(i).forEach(l=>{let d=n[l].chains.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.chains)==null?void 0:w.includes(m)}),f=n[l].methods.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.methods)==null?void 0:w.includes(m)}),p=n[l].events.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.events)==null?void 0:w.includes(m)}),h=d.map(m=>n[l].accounts.filter(g=>g.includes(`${m}:`))).flat();c[l]={chains:d,methods:f,events:p,accounts:h}}),Object.keys(s).forEach(l=>{var d,f,p,h,m,g;if(!n[l])return;let w=(f=(d=s[l])==null?void 0:d.chains)==null?void 0:f.filter(S=>n[l].chains.includes(S)),v=n[l].methods.filter(S=>{var T,N;return(N=(T=s[l])==null?void 0:T.methods)==null?void 0:N.includes(S)}),b=n[l].events.filter(S=>{var T,N;return(N=(T=s[l])==null?void 0:T.events)==null?void 0:N.includes(S)}),_=w?.map(S=>n[l].accounts.filter(T=>T.includes(`${S}:`))).flat();c[l]={chains:td((p=c[l])==null?void 0:p.chains,w),methods:td((h=c[l])==null?void 0:h.methods,v),events:td((m=c[l])==null?void 0:m.events,b),accounts:td((g=c[l])==null?void 0:g.accounts,_)}}),c)}function Vae(t){return t.includes(\\\":\\\")}function Xze(t){return Vae(t)?t.split(\\\":\\\")[0]:t}function H9(t){var e,r,n;let i={};if(!R2(t))return i;for(let[s,o]of Object.entries(t)){let a=Vae(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],d=Xze(s);i[d]=OOt(POt({},i[d]),{chains:td(a,(e=i[d])==null?void 0:e.chains),methods:td(c,(r=i[d])==null?void 0:r.methods),events:td(l,(n=i[d])==null?void 0:n.events)})}return i}function e$e(t){let e={};return t?.forEach(r=>{var n;let[i,s]=r.split(\\\":\\\");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(r),(n=e[i].chains)==null||n.push(`${i}:${s}`)}),e}function hq(t,e){e=e.map(n=>n.replace(\\\"did:pkh:\\\",\\\"\\\"));let r=e$e(e);for(let[n,i]of Object.entries(r))i.methods?i.methods=td(i.methods,t):i.methods=t,i.events=[\\\"chainChanged\\\",\\\"accountsChanged\\\"];return r}function Wae(t,e){var r,n,i,s,o,a;let c=H9(t),l=H9(e),d={},f=Object.keys(c).concat(Object.keys(l));for(let p of f)d[p]={chains:td((r=c[p])==null?void 0:r.chains,(n=l[p])==null?void 0:n.chains),methods:td((i=c[p])==null?void 0:i.methods,(s=l[p])==null?void 0:s.methods),events:td((o=c[p])==null?void 0:o.events,(a=l[p])==null?void 0:a.events)};return d}function Ce(t,e){let{message:r,code:n}=r$e[t];return{message:e?`${r} ${e}`:r,code:n}}function Kr(t,e){let{message:r,code:n}=t$e[t];return{message:e?`${r} ${e}`:r,code:n}}function I2(t,e){return Array.isArray(t)?typeof e<\\\"u\\\"&&t.length?t.every(e):!0:!1}function R2(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Os(t){return typeof t>\\\"u\\\"}function Fi(t,e){return e&&Os(t)?!0:typeof t==\\\"string\\\"&&!!t.trim().length}function mq(t,e){return e&&Os(t)?!0:typeof t==\\\"number\\\"&&!isNaN(t)}function Gae(t,e){let{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r),s=!0;return w1(i,n)?(n.forEach(o=>{let{accounts:a,methods:c,events:l}=t.namespaces[o],d=T2(a),f=r[o];(!w1(WH(o,f),d)||!w1(f.methods,c)||!w1(f.events,l))&&(s=!1)}),s):!1}function q9(t){return Fi(t,!1)&&t.includes(\\\":\\\")?t.split(\\\":\\\").length===2:!1}function n$e(t){if(Fi(t,!1)&&t.includes(\\\":\\\")){let e=t.split(\\\":\\\");if(e.length===3){let r=e[0]+\\\":\\\"+e[1];return!!e[2]&&q9(r)}}return!1}function Kae(t){function e(r){try{return typeof new URL(r)<\\\"u\\\"}catch{return!1}}try{if(Fi(t,!1)){if(e(t))return!0;let r=wae(t);return e(r)}}catch{}return!1}function Zae(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function Qae(t){return t?.topic}function Jae(t,e){let r=null;return Fi(t?.publicKey,!1)||(r=Ce(\\\"MISSING_OR_INVALID\\\",`${e} controller public key should be a string`)),r}function oae(t){let e=!0;return I2(t)?t.length&&(e=t.every(r=>Fi(r,!1))):e=!1,e}function i$e(t,e,r){let n=null;return I2(e)&&e.length?e.forEach(i=>{n||q9(i)||(n=Kr(\\\"UNSUPPORTED_CHAINS\\\",`${r}, chain ${i} should be a string and conform to \\\"namespace:chainId\\\" format`))}):q9(t)||(n=Kr(\\\"UNSUPPORTED_CHAINS\\\",`${r}, chains must be defined as \\\"namespace:chainId\\\" e.g. \\\"eip155:1\\\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\\\"eip155:1\\\", \\\"eip155:5\\\"] }`)),n}function s$e(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;let o=i$e(i,WH(i,s),`${e} ${r}`);o&&(n=o)}),n}function o$e(t,e){let r=null;return I2(t)?t.forEach(n=>{r||n$e(n)||(r=Kr(\\\"UNSUPPORTED_ACCOUNTS\\\",`${e}, account ${n} should be a string and conform to \\\"namespace:chainId:address\\\" format`))}):r=Kr(\\\"UNSUPPORTED_ACCOUNTS\\\",`${e}, accounts should be an array of strings conforming to \\\"namespace:chainId:address\\\" format`),r}function a$e(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=o$e(n?.accounts,`${e} namespace`);i&&(r=i)}),r}function c$e(t,e){let r=null;return oae(t?.methods)?oae(t?.events)||(r=Kr(\\\"UNSUPPORTED_EVENTS\\\",`${e}, events should be an array of strings or empty array for no events`)):r=Kr(\\\"UNSUPPORTED_METHODS\\\",`${e}, methods should be an array of strings or empty array for no methods`),r}function Yae(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=c$e(n,`${e}, namespace`);i&&(r=i)}),r}function Xae(t,e,r){let n=null;if(t&&R2(t)){let i=Yae(t,e);i&&(n=i);let s=s$e(t,e,r);s&&(n=s)}else n=Ce(\\\"MISSING_OR_INVALID\\\",`${e}, ${r} should be an object with data`);return n}function $C(t,e){let r=null;if(t&&R2(t)){let n=Yae(t,e);n&&(r=n);let i=a$e(t,e);i&&(r=i)}else r=Ce(\\\"MISSING_OR_INVALID\\\",`${e}, namespaces should be an object with data`);return r}function gq(t){return Fi(t.protocol,!0)}function ece(t,e){let r=!1;return e&&!t?r=!0:t&&I2(t)&&t.length&&t.forEach(n=>{r=gq(n)}),r}function tce(t){return typeof t==\\\"number\\\"}function Zo(t){return typeof t<\\\"u\\\"&&typeof t!==null}function rce(t){return!(!t||typeof t!=\\\"object\\\"||!t.code||!mq(t.code,!1)||!t.message||!Fi(t.message,!1))}function nce(t){return!(Os(t)||!Fi(t.method,!1))}function ice(t){return!(Os(t)||Os(t.result)&&Os(t.error)||!mq(t.id,!1)||!Fi(t.jsonrpc,!1))}function sce(t){return!(Os(t)||!Fi(t.name,!1))}function yq(t,e){return!(!q9(e)||!Qze(t).includes(e))}function oce(t,e,r){return Fi(r,!1)?Jze(t,e).includes(r):!1}function ace(t,e,r){return Fi(r,!1)?Yze(t,e).includes(r):!1}function J9(t,e,r){let n=null,i=BOt(t),s=MOt(e),o=Object.keys(i),a=Object.keys(s),c=qqe(Object.keys(t)),l=qqe(Object.keys(e)),d=c.filter(f=>!l.includes(f));return d.length&&(n=Ce(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces keys don't satisfy requiredNamespaces.\\n      Required: ${d.toString()}\\n      Received: ${Object.keys(e).toString()}`)),w1(o,a)||(n=Ce(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces chains don't satisfy required namespaces.\\n      Required: ${o.toString()}\\n      Approved: ${a.toString()}`)),Object.keys(e).forEach(f=>{if(!f.includes(\\\":\\\")||n)return;let p=T2(e[f].accounts);p.includes(f)||(n=Ce(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces accounts don't satisfy namespace accounts for ${f}\\n        Required: ${f}\\n        Approved: ${p.toString()}`))}),o.forEach(f=>{n||(w1(i[f].methods,s[f].methods)?w1(i[f].events,s[f].events)||(n=Ce(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=Ce(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function BOt(t){let e={};return Object.keys(t).forEach(r=>{var n;r.includes(\\\":\\\")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function qqe(t){return[...new Set(t.map(e=>e.includes(\\\":\\\")?e.split(\\\":\\\")[0]:e))]}function MOt(t){let e={};return Object.keys(t).forEach(r=>{r.includes(\\\":\\\")?e[r]=t[r]:T2(t[r].accounts)?.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}),e}function cce(t,e){return mq(t,!1)&&t<=e.max&&t>=e.min}function bq(){let t=E2();return new Promise(e=>{switch(t){case ic.browser:e(l$e());break;case ic.reactNative:e(u$e());break;case ic.node:e(d$e());break;default:e(!0)}})}function l$e(){return E1()&&navigator?.onLine}async function u$e(){return eh()&&typeof globalThis<\\\"u\\\"&&globalThis!=null&&globalThis.NetInfo?(await globalThis?.NetInfo.fetch())?.isConnected:!0}function d$e(){return!0}function lce(t){switch(E2()){case ic.browser:f$e(t);break;case ic.reactNative:p$e(t);break;case ic.node:break}}function f$e(t){!eh()&&E1()&&(window.addEventListener(\\\"online\\\",()=>t(!0)),window.addEventListener(\\\"offline\\\",()=>t(!1)))}function p$e(t){eh()&&typeof globalThis<\\\"u\\\"&&globalThis!=null&&globalThis.NetInfo&&globalThis?.NetInfo.addEventListener(e=>t(e?.isConnected))}function uce(){var t;return E1()&&(0,rd.getDocument)()?((t=(0,rd.getDocument)())==null?void 0:t.visibilityState)===\\\"visible\\\":!0}var b0,rd,zqe,VH,mRt,gRt,yRt,pqe,bRt,wRt,hqe,mqe,vRt,Zqe,ic,zH,xRt,Qqe,lae,ERt,Jqe,IRt,jH,gqe,kRt,BRt,MRt,DRt,AC,yqe,U9,dze,fze,pze,HRt,M9,qRt,zRt,$Rt,VRt,WRt,GRt,wqe,vqe,Goe,ZRt,QRt,JRt,XRt,ePt,tPt,xqe,rPt,nPt,Eqe,Cae,yze,iPt,YH,bze,G9,FC,eq,v1,uPt,dPt,mPt,Rze,yPt,bPt,wPt,vPt,HH,xPt,Pze,Tqe,Go,Joe,SPt,TPt,IPt,Iqe,RPt,PPt,Oze,$H,iq,Loe,Pqe,kPt,Yoe,LPt,y1,b1,Xoe,K9,sq,oq,UPt,FPt,h0,Uoe,Oae,Foe,Nqe,VPt,WPt,GPt,yo,ps,b2,KPt,tae,kqe,Bqe,JPt,Mqe,qH,qoe,jze,TC,$oe,nae,cOt,Dqe,lOt,uOt,iae,hOt,mOt,sae,m0,g0,go,Uqe,qze,xOt,EOt,_Ot,Nae,Ko,Vc,nh,HC,kae,nd,_2,COt,Fqe,D9,Bae,Wze,SOt,AOt,TOt,jqe,IOt,ROt,Hqe,POt,OOt,t$e,r$e,Voe,v0,Y9=x(()=>{u();Ise();b0=Me(u0()),rd=Me(gC()),zqe=Me(kse());un();xH();g2();B9();Boe();VH=\\\":\\\";mRt=Object.defineProperty,gRt=Object.defineProperties,yRt=Object.getOwnPropertyDescriptors,pqe=Object.getOwnPropertySymbols,bRt=Object.prototype.hasOwnProperty,wRt=Object.prototype.propertyIsEnumerable,hqe=(t,e,r)=>e in t?mRt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mqe=(t,e)=>{for(var r in e||(e={}))bRt.call(e,r)&&hqe(t,r,e[r]);if(pqe)for(var r of pqe(e))wRt.call(e,r)&&hqe(t,r,e[r]);return t},vRt=(t,e)=>gRt(t,yRt(e)),Zqe=\\\"ReactNative\\\",ic={reactNative:\\\"react-native\\\",node:\\\"node\\\",browser:\\\"browser\\\",unknown:\\\"unknown\\\"},zH=\\\" \\\",xRt=\\\":\\\",Qqe=\\\"/\\\",lae=2,ERt=1e3,Jqe=\\\"js\\\";IRt=t=>t;jH=BigInt(2**32-1),gqe=BigInt(32);kRt=(t,e,r)=>t<<r|e>>>32-r,BRt=(t,e,r)=>e<<r|t>>>32-r,MRt=(t,e,r)=>e<<r-32|t>>>64-r,DRt=(t,e,r)=>t<<r-32|e>>>64-r,AC=typeof globalThis==\\\"object\\\"&&\\\"crypto\\\"in globalThis?globalThis.crypto:void 0;yqe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;U9=class{clone(){return this._cloneInto()}};dze=[],fze=[],pze=[],HRt=BigInt(0),M9=BigInt(1),qRt=BigInt(2),zRt=BigInt(7),$Rt=BigInt(256),VRt=BigInt(113);for(let t=0,e=M9,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],dze.push(2*(5*n+r)),fze.push((t+1)*(t+2)/2%64);let i=HRt;for(let s=0;s<7;s++)e=(e<<M9^(e>>zRt)*VRt)%$Rt,e&qRt&&(i^=M9<<(M9<<BigInt(s))-M9);pze.push(i)}[WRt,GRt]=NRt(pze,!0),wqe=(t,e,r)=>r>32?MRt(t,e,r):kRt(t,e,r),vqe=(t,e,r)=>r>32?DRt(t,e,r):BRt(t,e,r);Goe=class t extends U9{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,L9(n),0>=this.blockLen||this.blockLen>=200)throw new Error(\\\"Sha3 supports only keccak-f1600 function\\\");this.state=new Uint8Array(200),this.state32=LRt(this.state)}keccak(){yqe||bqe(this.state32),KRt(this.state32,this.rounds),yqe||bqe(this.state32),this.posOut=0,this.pos=0}update(e){RC(this);let{blockLen:r,state:n}=this;e=PC(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){RC(this,!1),W9(e),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error(\\\"XOF is not possible for this instance\\\");return this.writeInto(e)}xof(e){return L9(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(lze(e,this),this.finished)throw new Error(\\\"digest() was already called\\\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},ZRt=(t,e,r)=>uze(()=>new Goe(e,t,r)),QRt=ZRt(1,136,256/8),JRt=\\\"https://rpc.walletconnect.org/v1\\\";XRt=Object.defineProperty,ePt=Object.defineProperties,tPt=Object.getOwnPropertyDescriptors,xqe=Object.getOwnPropertySymbols,rPt=Object.prototype.hasOwnProperty,nPt=Object.prototype.propertyIsEnumerable,Eqe=(t,e,r)=>e in t?XRt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Cae=(t,e)=>{for(var r in e||(e={}))rPt.call(e,r)&&Eqe(t,r,e[r]);if(xqe)for(var r of xqe(e))nPt.call(e,r)&&Eqe(t,r,e[r]);return t},yze=(t,e)=>ePt(t,tPt(e)),iPt=\\\"did:pkh:\\\",YH=t=>t?.split(\\\":\\\"),bze=t=>{let e=t&&YH(t);if(e)return t.includes(iPt)?e[3]:e[1]},G9=t=>{let e=t&&YH(t);if(e)return e[2]+\\\":\\\"+e[3]},FC=t=>{let e=t&&YH(t);if(e)return e.pop()};eq=(t,e)=>{let r=`${t.domain} wants you to sign in with your Ethereum account:`,n=FC(e);if(!t.aud&&!t.uri)throw new Error(\\\"Either `aud` or `uri` is required to construct the message\\\");let i=t.statement||void 0,s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${bze(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,d=t.exp?`Expiration Time: ${t.exp}`:void 0,f=t.nbf?`Not Before: ${t.nbf}`:void 0,p=t.requestId?`Request ID: ${t.requestId}`:void 0,h=t.resources?`Resources:${t.resources.map(g=>`\\n- ${g}`).join(\\\"\\\")}`:void 0,m=_1(t.resources);if(m){let g=x1(m);i=Rae(i,g)}return[r,n,\\\"\\\",i,\\\"\\\",s,o,a,c,l,d,f,p,h].filter(g=>g!=null).join(`\\n`)};v1=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),uPt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),dPt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!dPt)throw new Error(\\\"Non little-endian hardware is not supported\\\");mPt=(t,e)=>{function r(n,...i){if(Ml(n),t.nonceLength!==void 0){let l=i[0];if(!l)throw new Error(\\\"nonce / iv required\\\");t.varSizeNonce?Ml(l):Ml(l,t.nonceLength)}let s=t.tagLength;s&&i[1]!==void 0&&Ml(i[1]);let o=e(n,...i),a=(l,d)=>{if(d!==void 0){if(l!==2)throw new Error(\\\"cipher output not supported\\\");Ml(d)}},c=!1;return{encrypt(l,d){if(c)throw new Error(\\\"cannot encrypt() twice with same key + nonce\\\");return c=!0,Ml(l),a(o.encrypt.length,d),o.encrypt(l,d)},decrypt(l,d){if(Ml(l),s&&l.length<s)throw new Error(\\\"invalid ciphertext length: smaller than tagLength=\\\"+s);return a(o.decrypt.length,d),o.decrypt(l,d)}}}return Object.assign(r,t),r};Rze=t=>Uint8Array.from(t.split(\\\"\\\").map(e=>e.charCodeAt(0))),yPt=Rze(\\\"expand 16-byte k\\\"),bPt=Rze(\\\"expand 32-byte k\\\"),wPt=v1(yPt),vPt=v1(bPt);HH=64,xPt=16,Pze=2**32-1,Tqe=new Uint32Array;Go=(t,e)=>t[e++]&255|(t[e++]&255)<<8,Joe=class{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=Koe(e),Ml(e,32);let r=Go(e,0),n=Go(e,2),i=Go(e,4),s=Go(e,6),o=Go(e,8),a=Go(e,10),c=Go(e,12),l=Go(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Go(e,16+2*d)}process(e,r,n=!1){let i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],d=o[3],f=o[4],p=o[5],h=o[6],m=o[7],g=o[8],w=o[9],v=Go(e,r+0),b=Go(e,r+2),_=Go(e,r+4),S=Go(e,r+6),T=Go(e,r+8),N=Go(e,r+10),O=Go(e,r+12),L=Go(e,r+14),B=s[0]+(v&8191),H=s[1]+((v>>>13|b<<3)&8191),M=s[2]+((b>>>10|_<<6)&8191),F=s[3]+((_>>>7|S<<9)&8191),R=s[4]+((S>>>4|T<<12)&8191),y=s[5]+(T>>>1&8191),E=s[6]+((T>>>14|N<<2)&8191),C=s[7]+((N>>>11|O<<5)&8191),I=s[8]+((O>>>8|L<<8)&8191),P=s[9]+(L>>>5|i),k=0,U=k+B*a+H*(5*w)+M*(5*g)+F*(5*m)+R*(5*h);k=U>>>13,U&=8191,U+=y*(5*p)+E*(5*f)+C*(5*d)+I*(5*l)+P*(5*c),k+=U>>>13,U&=8191;let D=k+B*c+H*a+M*(5*w)+F*(5*g)+R*(5*m);k=D>>>13,D&=8191,D+=y*(5*h)+E*(5*p)+C*(5*f)+I*(5*d)+P*(5*l),k+=D>>>13,D&=8191;let A=k+B*l+H*c+M*a+F*(5*w)+R*(5*g);k=A>>>13,A&=8191,A+=y*(5*m)+E*(5*h)+C*(5*p)+I*(5*f)+P*(5*d),k+=A>>>13,A&=8191;let j=k+B*d+H*l+M*c+F*a+R*(5*w);k=j>>>13,j&=8191,j+=y*(5*g)+E*(5*m)+C*(5*h)+I*(5*p)+P*(5*f),k+=j>>>13,j&=8191;let K=k+B*f+H*d+M*l+F*c+R*a;k=K>>>13,K&=8191,K+=y*(5*w)+E*(5*g)+C*(5*m)+I*(5*h)+P*(5*p),k+=K>>>13,K&=8191;let J=k+B*p+H*f+M*d+F*l+R*c;k=J>>>13,J&=8191,J+=y*a+E*(5*w)+C*(5*g)+I*(5*m)+P*(5*h),k+=J>>>13,J&=8191;let X=k+B*h+H*p+M*f+F*d+R*l;k=X>>>13,X&=8191,X+=y*c+E*a+C*(5*w)+I*(5*g)+P*(5*m),k+=X>>>13,X&=8191;let re=k+B*m+H*h+M*p+F*f+R*d;k=re>>>13,re&=8191,re+=y*l+E*c+C*a+I*(5*w)+P*(5*g),k+=re>>>13,re&=8191;let fe=k+B*g+H*m+M*h+F*p+R*f;k=fe>>>13,fe&=8191,fe+=y*d+E*l+C*c+I*a+P*(5*w),k+=fe>>>13,fe&=8191;let ce=k+B*w+H*g+M*m+F*h+R*p;k=ce>>>13,ce&=8191,ce+=y*f+E*d+C*l+I*c+P*a,k+=ce>>>13,ce&=8191,k=(k<<2)+k|0,k=k+U|0,U=k&8191,k=k>>>13,D+=k,s[0]=U,s[1]=D,s[2]=A,s[3]=j,s[4]=K,s[5]=J,s[6]=X,s[7]=re,s[8]=fe,s[9]=ce}finalize(){let{h:e,pad:r}=this,n=new Uint16Array(10),i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;OC(n)}update(e){_qe(this);let{buffer:r,blockLen:n}=this;e=Koe(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){OC(this.h,this.r,this.buffer,this.pad)}digestInto(e){_qe(this),lPt(e,this),this.finished=!0;let{buffer:r,h:n}=this,{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}};SPt=CPt(t=>new Joe(t));TPt=_Pt(APt,{counterRight:!1,counterLength:4,allowShortKeys:!1}),IPt=new Uint8Array(16),Iqe=(t,e)=>{t.update(e);let r=e.length%16;r&&t.update(IPt.subarray(r))},RPt=new Uint8Array(32);PPt=t=>(e,r,n)=>({encrypt(i,s){let o=i.length;s=Sqe(o+16,s,!1),s.set(i);let a=s.subarray(0,-16);t(e,r,a,a,1);let c=Rqe(t,e,r,a,n);return s.set(c,o),OC(c),s},decrypt(i,s){s=Sqe(i.length-16,s,!1);let o=i.subarray(0,-16),a=i.subarray(-16),c=Rqe(t,e,r,o,n);if(!hPt(a,c))throw new Error(\\\"invalid tag\\\");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),OC(c),s}}),Oze=mPt({blockSize:64,nonceLength:12,tagLength:16},PPt(TPt)),$H=class extends U9{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,xae(e);let n=PC(r);if(this.iHash=e.create(),typeof this.iHash.update!=\\\"function\\\")throw new Error(\\\"Expected instance of class which extends utils.Hash\\\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return RC(this),this.iHash.update(e),this}digestInto(e){RC(this),W9(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},iq=(t,e,r)=>new $H(t,e).update(r).digest();iq.create=(t,e)=>new $H(t,e);Loe=new Uint8Array([0]),Pqe=new Uint8Array;kPt=(t,e,r,n,i)=>NPt(t,OPt(t,e,r),n,i);Yoe=class extends U9{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Moe(this.buffer)}update(e){RC(this);let{view:r,buffer:n,blockLen:i}=this;e=PC(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=Moe(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){RC(this),lze(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;BPt(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=Moe(e),c=this.outputLen;if(c%4)throw new Error(\\\"_sha2: outputLen should be aligned to 32bit\\\");let l=c/4,d=this.get();if(l>d.length)throw new Error(\\\"_sha2: outputLen bigger than state\\\");for(let f=0;f<l;f++)a.setUint32(4*f,d[f],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}},LPt=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]),y1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),b1=new Uint32Array(64),Xoe=class extends Yoe{constructor(){super(64,32,8,!1),this.A=y1[0]|0,this.B=y1[1]|0,this.C=y1[2]|0,this.D=y1[3]|0,this.E=y1[4]|0,this.F=y1[5]|0,this.G=y1[6]|0,this.H=y1[7]|0}get(){let{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)b1[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){let p=b1[f-15],h=b1[f-2],m=Yp(p,7)^Yp(p,18)^p>>>3,g=Yp(h,17)^Yp(h,19)^h>>>10;b1[f]=g+b1[f-7]+m+b1[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:d}=this;for(let f=0;f<64;f++){let p=Yp(a,6)^Yp(a,11)^Yp(a,25),h=d+p+MPt(a,c,l)+LPt[f]+b1[f]|0,m=(Yp(n,2)^Yp(n,13)^Yp(n,22))+DPt(n,i,s)|0;d=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+m|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,s,o,a,c,l,d)}roundClean(){b1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},K9=uze(()=>new Xoe);sq=BigInt(0),oq=BigInt(1),UPt=BigInt(2);FPt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));h0={_0:48,_9:57,A:65,F:70,a:97,f:102};Uoe=t=>typeof t==\\\"bigint\\\"&&sq<=t;Oae=t=>(UPt<<BigInt(t-1))-oq,Foe=t=>new Uint8Array(t),Nqe=t=>Uint8Array.from(t);VPt={bigint:t=>typeof t==\\\"bigint\\\",function:t=>typeof t==\\\"function\\\",boolean:t=>typeof t==\\\"boolean\\\",string:t=>typeof t==\\\"string\\\",stringOrUint8Array:t=>typeof t==\\\"string\\\"||v2(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t==\\\"function\\\"&&Number.isSafeInteger(t.outputLen)};WPt=()=>{throw new Error(\\\"not implemented\\\")};GPt=Object.freeze({__proto__:null,isBytes:v2,abytes:Z9,abool:NC,bytesToHex:kC,numberToHexUnpadded:IC,hexToNumber:Pae,hexToBytes:BC,bytesToNumberBE:w2,bytesToNumberLE:F9,numberToBytesBE:MC,numberToBytesLE:aq,numberToVarBytesBE:jPt,ensureBytes:Bl,concatBytes:j9,equalBytes:HPt,utf8ToBytes:qPt,inRange:cq,aInRange:y0,bitLen:Nze,bitGet:zPt,bitSet:$Pt,bitMask:Oae,createHmacDrbg:kze,validateObject:jC,notImplemented:WPt,memoized:eae}),yo=BigInt(0),ps=BigInt(1),b2=BigInt(2),KPt=BigInt(3),tae=BigInt(4),kqe=BigInt(5),Bqe=BigInt(8);JPt=[\\\"create\\\",\\\"isValid\\\",\\\"is0\\\",\\\"neg\\\",\\\"inv\\\",\\\"sqrt\\\",\\\"sqr\\\",\\\"eql\\\",\\\"add\\\",\\\"sub\\\",\\\"mul\\\",\\\"pow\\\",\\\"div\\\",\\\"addN\\\",\\\"subN\\\",\\\"mulN\\\",\\\"sqrN\\\"];Mqe=BigInt(0),qH=BigInt(1);qoe=new WeakMap,jze=new WeakMap;BigInt(0),BigInt(1),BigInt(2),BigInt(8);TC=BigInt(0),$oe=BigInt(1);nae=BigInt(\\\"57896044618658097711785492504343953926634992332820282019728792003956564819949\\\");BigInt(0);cOt=BigInt(1),Dqe=BigInt(2),lOt=BigInt(3),uOt=BigInt(5);BigInt(8);iae=aOt({P:nae,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:t=>{let e=nae,{pow_p_5_8:r,b2:n}=dOt(t);return $c(hf(r,lOt,e)*n,e)},adjustScalarBytes:fOt,randomBytes:UC});({bytesToNumberBE:hOt,hexToBytes:mOt}=GPt),sae=class extends Error{constructor(e=\\\"\\\"){super(e)}},m0={Err:sae,_tlv:{encode:(t,e)=>{let{Err:r}=m0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length&1)throw new r(\\\"tlv.encode: unpadded data\\\");let n=e.length/2,i=IC(n);if(i.length/2&128)throw new r(\\\"tlv.encode: long form length too big\\\");let s=n>127?IC(i.length/2|128):\\\"\\\";return IC(t)+s+i+e},decode(t,e){let{Err:r}=m0,n=0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length<2||e[n++]!==t)throw new r(\\\"tlv.decode: wrong tlv\\\");let i=e[n++],s=!!(i&128),o=0;if(!s)o=i;else{let c=i&127;if(!c)throw new r(\\\"tlv.decode(long): indefinite length not supported\\\");if(c>4)throw new r(\\\"tlv.decode(long): byte length is too big\\\");let l=e.subarray(n,n+c);if(l.length!==c)throw new r(\\\"tlv.decode: length bytes not complete\\\");if(l[0]===0)throw new r(\\\"tlv.decode(long): zero leftmost byte\\\");for(let d of l)o=o<<8|d;if(n+=c,o<128)throw new r(\\\"tlv.decode(long): not minimal encoding\\\")}let a=e.subarray(n,n+o);if(a.length!==o)throw new r(\\\"tlv.decode: wrong value length\\\");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=m0;if(t<g0)throw new e(\\\"integer: negative integers are not allowed\\\");let r=IC(t);if(Number.parseInt(r[0],16)&8&&(r=\\\"00\\\"+r),r.length&1)throw new e(\\\"unexpected DER parsing assertion: unpadded hex\\\");return r},decode(t){let{Err:e}=m0;if(t[0]&128)throw new e(\\\"invalid signature integer: negative\\\");if(t[0]===0&&!(t[1]&128))throw new e(\\\"invalid signature integer: unnecessary leading zero\\\");return hOt(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=m0,i=typeof t==\\\"string\\\"?mOt(t):t;Z9(i);let{v:s,l:o}=n.decode(48,i);if(o.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");let{v:a,l:c}=n.decode(2,s),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){let{_tlv:e,_int:r}=m0,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},g0=BigInt(0),go=BigInt(1);BigInt(2);Uqe=BigInt(3);BigInt(4);qze=Dze(BigInt(\\\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\\\")),xOt=qze.create(BigInt(\\\"-3\\\")),EOt=BigInt(\\\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\\\"),_Ot=vOt({a:xOt,b:EOt,Fp:qze,n:BigInt(\\\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\\\"),Gx:BigInt(\\\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\\\"),Gy:BigInt(\\\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\\\"),h:BigInt(1),lowS:!1},K9),Nae=\\\"base10\\\",Ko=\\\"base16\\\",Vc=\\\"base64pad\\\",nh=\\\"base64url\\\",HC=\\\"utf8\\\",kae=0,nd=1,_2=2,COt=0,Fqe=1,D9=12,Bae=32;Wze=\\\"irn\\\";SOt=Object.defineProperty,AOt=Object.defineProperties,TOt=Object.getOwnPropertyDescriptors,jqe=Object.getOwnPropertySymbols,IOt=Object.prototype.hasOwnProperty,ROt=Object.prototype.propertyIsEnumerable,Hqe=(t,e,r)=>e in t?SOt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,POt=(t,e)=>{for(var r in e||(e={}))IOt.call(e,r)&&Hqe(t,r,e[r]);if(jqe)for(var r of jqe(e))ROt.call(e,r)&&Hqe(t,r,e[r]);return t},OOt=(t,e)=>AOt(t,TOt(e));t$e={INVALID_METHOD:{message:\\\"Invalid method.\\\",code:1001},INVALID_EVENT:{message:\\\"Invalid event.\\\",code:1002},INVALID_UPDATE_REQUEST:{message:\\\"Invalid update request.\\\",code:1003},INVALID_EXTEND_REQUEST:{message:\\\"Invalid extend request.\\\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\\\"Invalid session settle request.\\\",code:1005},UNAUTHORIZED_METHOD:{message:\\\"Unauthorized method.\\\",code:3001},UNAUTHORIZED_EVENT:{message:\\\"Unauthorized event.\\\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\\\"Unauthorized update request.\\\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\\\"Unauthorized extend request.\\\",code:3004},USER_REJECTED:{message:\\\"User rejected.\\\",code:5e3},USER_REJECTED_CHAINS:{message:\\\"User rejected chains.\\\",code:5001},USER_REJECTED_METHODS:{message:\\\"User rejected methods.\\\",code:5002},USER_REJECTED_EVENTS:{message:\\\"User rejected events.\\\",code:5003},UNSUPPORTED_CHAINS:{message:\\\"Unsupported chains.\\\",code:5100},UNSUPPORTED_METHODS:{message:\\\"Unsupported methods.\\\",code:5101},UNSUPPORTED_EVENTS:{message:\\\"Unsupported events.\\\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\\\"Unsupported accounts.\\\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\\\"Unsupported namespace key.\\\",code:5104},USER_DISCONNECTED:{message:\\\"User disconnected.\\\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\\\"Session settlement failed.\\\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\\\"Unsupported wc_ method.\\\",code:10001}},r$e={NOT_INITIALIZED:{message:\\\"Not initialized.\\\",code:1},NO_MATCHING_KEY:{message:\\\"No matching key.\\\",code:2},RESTORE_WILL_OVERRIDE:{message:\\\"Restore will override.\\\",code:3},RESUBSCRIBED:{message:\\\"Resubscribed.\\\",code:4},MISSING_OR_INVALID:{message:\\\"Missing or invalid.\\\",code:5},EXPIRED:{message:\\\"Expired.\\\",code:6},UNKNOWN_TYPE:{message:\\\"Unknown type.\\\",code:7},MISMATCHED_TOPIC:{message:\\\"Mismatched topic.\\\",code:8},NON_CONFORMING_NAMESPACES:{message:\\\"Non conforming namespaces.\\\",code:9}};Voe={},v0=class{static get(e){return Voe[e]}static set(e,r){Voe[e]=r}static delete(e){delete Voe[e]}}});var bo,h$e=x(()=>{u();bo=class{}});var wq=x(()=>{u();h$e()});var g$e,vq,fce,m$e,sc,VC,pce=x(()=>{u();g$e=Me(ho()),vq=Me(u0());wq();fce=class extends bo{constructor(e){super()}},m$e=vq.FIVE_SECONDS,sc={pulse:\\\"heartbeat_pulse\\\"},VC=class t extends fce{constructor(e){super(e),this.events=new g$e.EventEmitter,this.interval=m$e,this.interval=e?.interval||m$e}static async init(e){let r=new t(e);return await r.init(),r}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),(0,vq.toMiliseconds)(this.interval))}pulse(){this.events.emit(sc.pulse)}}});function FOt(t,e){if(t===\\\"__proto__\\\"||t===\\\"constructor\\\"&&e&&typeof e==\\\"object\\\"&&\\\"prototype\\\"in e){jOt(t);return}return e}function jOt(t){console.warn(`[destr] Dropping \\\"${t}\\\" key to prevent prototype pollution.`)}function X9(t,e={}){if(typeof t!=\\\"string\\\")return t;if(t[0]==='\\\"'&&t[t.length-1]==='\\\"'&&t.indexOf(\\\"\\\\\\\\\\\")===-1)return t.slice(1,-1);let r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case\\\"true\\\":return!0;case\\\"false\\\":return!1;case\\\"undefined\\\":return;case\\\"null\\\":return null;case\\\"nan\\\":return Number.NaN;case\\\"infinity\\\":return Number.POSITIVE_INFINITY;case\\\"-infinity\\\":return Number.NEGATIVE_INFINITY}if(!UOt.test(t)){if(e.strict)throw new SyntaxError(\\\"[destr] Invalid JSON\\\");return t}try{if(DOt.test(t)||LOt.test(t)){if(e.strict)throw new Error(\\\"[destr] Possible prototype pollution\\\");return JSON.parse(t,FOt)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}var DOt,LOt,UOt,y$e=x(()=>{u();DOt=/\\\"(?:_|\\\\\\\\u0{2}5[Ff]){2}(?:p|\\\\\\\\u0{2}70)(?:r|\\\\\\\\u0{2}72)(?:o|\\\\\\\\u0{2}6[Ff])(?:t|\\\\\\\\u0{2}74)(?:o|\\\\\\\\u0{2}6[Ff])(?:_|\\\\\\\\u0{2}5[Ff]){2}\\\"\\\\s*:/,LOt=/\\\"(?:c|\\\\\\\\u0063)(?:o|\\\\\\\\u006[Ff])(?:n|\\\\\\\\u006[Ee])(?:s|\\\\\\\\u0073)(?:t|\\\\\\\\u0074)(?:r|\\\\\\\\u0072)(?:u|\\\\\\\\u0075)(?:c|\\\\\\\\u0063)(?:t|\\\\\\\\u0074)(?:o|\\\\\\\\u006[Ff])(?:r|\\\\\\\\u0072)\\\"\\\\s*:/,UOt=/^\\\\s*[\\\"[{]|^\\\\s*-?\\\\d{1,16}(\\\\.\\\\d{1,17})?([Ee][+-]?\\\\d+)?\\\\s*$/});function HOt(t){return!t||typeof t.then!=\\\"function\\\"?Promise.resolve(t):t}function $s(t,...e){try{return HOt(t(...e))}catch(r){return Promise.reject(r)}}function qOt(t){let e=typeof t;return t===null||e!==\\\"object\\\"&&e!==\\\"function\\\"}function zOt(t){let e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function e7(t){if(qOt(t))return String(t);if(zOt(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON==\\\"function\\\")return e7(t.toJSON());throw new Error(\\\"[unstorage] Cannot stringify value!\\\")}function b$e(t){return typeof t==\\\"string\\\"?t:hce+VOt(t)}function w$e(t){return typeof t!=\\\"string\\\"||!t.startsWith(hce)?t:$Ot(t.slice(hce.length))}function $Ot(t){return globalThis.Buffer?globalThis.Buffer.from(t,\\\"base64\\\"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))}function VOt(t){return globalThis.Buffer?globalThis.Buffer.from(t).toString(\\\"base64\\\"):globalThis.btoa(String.fromCodePoint(...t))}function oc(t){return t&&t.split(\\\"?\\\")[0]?.replace(/[/\\\\\\\\]/g,\\\":\\\").replace(/:+/g,\\\":\\\").replace(/^:|:$/g,\\\"\\\")||\\\"\\\"}function v$e(...t){return oc(t.join(\\\":\\\"))}function t7(t){return t=oc(t),t?t+\\\":\\\":\\\"\\\"}function x$e(t,e){if(e===void 0)return!0;let r=0,n=t.indexOf(\\\":\\\");for(;n>-1;)r++,n=t.indexOf(\\\":\\\",n+1);return r<=e}function E$e(t,e){return e?t.startsWith(e)&&t[t.length-1]!==\\\"$\\\":t[t.length-1]!==\\\"$\\\"}var hce,_$e=x(()=>{u();hce=\\\"base64:\\\"});function A$e(t={}){let e={mounts:{\\\"\\\":t.driver||GOt()},mountpoints:[\\\"\\\"],watching:!1,watchListeners:[],unwatch:{}},r=l=>{for(let d of e.mountpoints)if(l.startsWith(d))return{base:d,relativeKey:l.slice(d.length),driver:e.mounts[d]};return{base:\\\"\\\",relativeKey:l,driver:e.mounts[\\\"\\\"]}},n=(l,d)=>e.mountpoints.filter(f=>f.startsWith(l)||d&&l.startsWith(f)).map(f=>({relativeBase:l.length>f.length?l.slice(f.length):void 0,mountpoint:f,driver:e.mounts[f]})),i=(l,d)=>{if(e.watching){d=oc(d);for(let f of e.watchListeners)f(l,d)}},s=async()=>{if(!e.watching){e.watching=!0;for(let l in e.mounts)e.unwatch[l]=await C$e(e.mounts[l],i,l)}},o=async()=>{if(e.watching){for(let l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},a=(l,d,f)=>{let p=new Map,h=m=>{let g=p.get(m.base);return g||(g={driver:m.driver,base:m.base,items:[]},p.set(m.base,g)),g};for(let m of l){let g=typeof m==\\\"string\\\",w=oc(g?m:m.key),v=g?void 0:m.value,b=g||!m.options?d:{...d,...m.options},_=r(w);h(_).items.push({key:w,value:v,relativeKey:_.relativeKey,options:b})}return Promise.all([...p.values()].map(m=>f(m))).then(m=>m.flat())},c={hasItem(l,d={}){l=oc(l);let{relativeKey:f,driver:p}=r(l);return $s(p.hasItem,f,d)},getItem(l,d={}){l=oc(l);let{relativeKey:f,driver:p}=r(l);return $s(p.getItem,f,d).then(h=>X9(h))},getItems(l,d={}){return a(l,d,f=>f.driver.getItems?$s(f.driver.getItems,f.items.map(p=>({key:p.relativeKey,options:p.options})),d).then(p=>p.map(h=>({key:v$e(f.base,h.key),value:X9(h.value)}))):Promise.all(f.items.map(p=>$s(f.driver.getItem,p.relativeKey,p.options).then(h=>({key:p.key,value:X9(h)})))))},getItemRaw(l,d={}){l=oc(l);let{relativeKey:f,driver:p}=r(l);return p.getItemRaw?$s(p.getItemRaw,f,d):$s(p.getItem,f,d).then(h=>w$e(h))},async setItem(l,d,f={}){if(d===void 0)return c.removeItem(l);l=oc(l);let{relativeKey:p,driver:h}=r(l);h.setItem&&(await $s(h.setItem,p,e7(d),f),h.watch||i(\\\"update\\\",l))},async setItems(l,d){await a(l,d,async f=>{if(f.driver.setItems)return $s(f.driver.setItems,f.items.map(p=>({key:p.relativeKey,value:e7(p.value),options:p.options})),d);f.driver.setItem&&await Promise.all(f.items.map(p=>$s(f.driver.setItem,p.relativeKey,e7(p.value),p.options)))})},async setItemRaw(l,d,f={}){if(d===void 0)return c.removeItem(l,f);l=oc(l);let{relativeKey:p,driver:h}=r(l);if(h.setItemRaw)await $s(h.setItemRaw,p,d,f);else if(h.setItem)await $s(h.setItem,p,b$e(d),f);else return;h.watch||i(\\\"update\\\",l)},async removeItem(l,d={}){typeof d==\\\"boolean\\\"&&(d={removeMeta:d}),l=oc(l);let{relativeKey:f,driver:p}=r(l);p.removeItem&&(await $s(p.removeItem,f,d),(d.removeMeta||d.removeMata)&&await $s(p.removeItem,f+\\\"$\\\",d),p.watch||i(\\\"remove\\\",l))},async getMeta(l,d={}){typeof d==\\\"boolean\\\"&&(d={nativeOnly:d}),l=oc(l);let{relativeKey:f,driver:p}=r(l),h=Object.create(null);if(p.getMeta&&Object.assign(h,await $s(p.getMeta,f,d)),!d.nativeOnly){let m=await $s(p.getItem,f+\\\"$\\\",d).then(g=>X9(g));m&&typeof m==\\\"object\\\"&&(typeof m.atime==\\\"string\\\"&&(m.atime=new Date(m.atime)),typeof m.mtime==\\\"string\\\"&&(m.mtime=new Date(m.mtime)),Object.assign(h,m))}return h},setMeta(l,d,f={}){return this.setItem(l+\\\"$\\\",d,f)},removeMeta(l,d={}){return this.removeItem(l+\\\"$\\\",d)},async getKeys(l,d={}){l=t7(l);let f=n(l,!0),p=[],h=[],m=!0;for(let w of f){w.driver.flags?.maxDepth||(m=!1);let v=await $s(w.driver.getKeys,w.relativeBase,d);for(let b of v){let _=w.mountpoint+oc(b);p.some(S=>_.startsWith(S))||h.push(_)}p=[w.mountpoint,...p.filter(b=>!b.startsWith(w.mountpoint))]}let g=d.maxDepth!==void 0&&!m;return h.filter(w=>(!g||x$e(w,d.maxDepth))&&E$e(w,l))},async clear(l,d={}){l=t7(l),await Promise.all(n(l,!1).map(async f=>{if(f.driver.clear)return $s(f.driver.clear,f.relativeBase,d);if(f.driver.removeItem){let p=await f.driver.getKeys(f.relativeBase||\\\"\\\",d);return Promise.all(p.map(h=>f.driver.removeItem(h,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>S$e(l)))},async watch(l){return await s(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==l),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(l,d){if(l=t7(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((f,p)=>p.length-f.length)),e.mounts[l]=d,e.watching&&Promise.resolve(C$e(d,i,l)).then(f=>{e.unwatch[l]=f}).catch(console.error),c},async unmount(l,d=!0){l=t7(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&(e.unwatch[l]?.(),delete e.unwatch[l]),d&&await S$e(e.mounts[l]),e.mountpoints=e.mountpoints.filter(f=>f!==l),delete e.mounts[l])},getMount(l=\\\"\\\"){l=oc(l)+\\\":\\\";let d=r(l);return{driver:d.driver,base:d.base}},getMounts(l=\\\"\\\",d={}){return l=oc(l),n(l,d.parents).map(p=>({driver:p.driver,base:p.mountpoint}))},keys:(l,d={})=>c.getKeys(l,d),get:(l,d={})=>c.getItem(l,d),set:(l,d,f={})=>c.setItem(l,d,f),has:(l,d={})=>c.hasItem(l,d),del:(l,d={})=>c.removeItem(l,d),remove:(l,d={})=>c.removeItem(l,d)};return c}function C$e(t,e,r){return t.watch?t.watch((n,i)=>e(n,r+i)):()=>{}}async function S$e(t){typeof t.dispose==\\\"function\\\"&&await $s(t.dispose)}var WOt,GOt,T$e=x(()=>{u();y$e();_$e();WOt=\\\"memory\\\",GOt=()=>{let t=new Map;return{name:WOt,getInstance:()=>t,hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,r){t.set(e,r)},setItemRaw(e,r){t.set(e,r)},removeItem(e){t.delete(e)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}}});function YOt(t){var e;return[t[0],nc((e=t[1])!=null?e:\\\"\\\")]}var KOt,ZOt,QOt,JOt,gce,mce,xq,yce,XOt,I$e,eNt,tNt,WC,bce=x(()=>{u();T$e();VFe();f1();KOt=\\\"idb-keyval\\\",ZOt=(t={})=>{let e=t.base&&t.base.length>0?`${t.base}:`:\\\"\\\",r=i=>e+i,n;return t.dbName&&t.storeName&&(n=Ase(t.dbName,t.storeName)),{name:KOt,options:t,async hasItem(i){return!(typeof await Tse(r(i),n)>\\\"u\\\")},async getItem(i){return await Tse(r(i),n)??null},setItem(i,s){return HFe(r(i),s,n)},removeItem(i){return qFe(r(i),n)},getKeys(){return $Fe(n)},clear(){return zFe(n)}}},QOt=\\\"WALLET_CONNECT_V2_INDEXED_DB\\\",JOt=\\\"keyvaluestorage\\\",gce=class{constructor(){this.indexedDb=A$e({driver:ZOt({dbName:QOt,storeName:JOt})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){let r=await this.indexedDb.getItem(e);if(r!==null)return r}async setItem(e,r){await this.indexedDb.setItem(e,Vo(r))}async removeItem(e){await this.indexedDb.removeItem(e)}},mce=typeof globalThis<\\\"u\\\"?globalThis:typeof window<\\\"u\\\"?window:typeof globalThis<\\\"u\\\"?globalThis:typeof self<\\\"u\\\"?self:{},xq={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,n){this[r]=String(n)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){let r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__(\\\"length\\\",function(){return Object.keys(this).length}),typeof mce<\\\"u\\\"&&mce.localStorage?xq.exports=mce.localStorage:typeof window<\\\"u\\\"&&window.localStorage?xq.exports=window.localStorage:xq.exports=new e})();yce=class{constructor(){this.localStorage=xq.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(YOt)}async getItem(e){let r=this.localStorage.getItem(e);if(r!==null)return nc(r)}async setItem(e,r){this.localStorage.setItem(e,Vo(r))}async removeItem(e){this.localStorage.removeItem(e)}},XOt=\\\"wc_storage_version\\\",I$e=1,eNt=async(t,e,r)=>{let n=XOt,i=await e.getItem(n);if(i&&i>=I$e){r(e);return}let s=await t.getKeys();if(!s.length){r(e);return}let o=[];for(;s.length;){let a=s.shift();if(!a)continue;let c=a.toLowerCase();if(c.includes(\\\"wc@\\\")||c.includes(\\\"walletconnect\\\")||c.includes(\\\"wc_\\\")||c.includes(\\\"wallet_connect\\\")){let l=await t.getItem(a);await e.setItem(a,l),o.push(a)}}await e.setItem(n,I$e),r(e),tNt(t,o)},tNt=async(t,e)=>{e.length&&e.forEach(async r=>{await t.removeItem(r)})},WC=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};let e=new yce;this.storage=e;try{let r=new gce;eNt(e,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,r){return await this.initialize(),this.storage.setItem(e,r)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{let r=setInterval(()=>{this.initialized&&(clearInterval(r),e())},20)})}}});var P$e=q((Kcn,R$e)=>{\\\"use strict\\\";u();function rNt(t){try{return JSON.stringify(t)}catch{return'\\\"[Circular]\\\"'}}R$e.exports=nNt;function nNt(t,e,r){var n=r&&r.stringify||rNt,i=1;if(typeof t==\\\"object\\\"&&t!==null){var s=e.length+i;if(s===1)return t;var o=new Array(s);o[0]=n(t);for(var a=1;a<s;a++)o[a]=n(e[a]);return o.join(\\\" \\\")}if(typeof t!=\\\"string\\\")return t;var c=e.length;if(c===0)return t;for(var l=\\\"\\\",d=1-i,f=-1,p=t&&t.length||0,h=0;h<p;){if(t.charCodeAt(h)===37&&h+1<p){switch(f=f>-1?f:0,t.charCodeAt(h+1)){case 100:case 102:if(d>=c||e[d]==null)break;f<h&&(l+=t.slice(f,h)),l+=Number(e[d]),f=h+2,h++;break;case 105:if(d>=c||e[d]==null)break;f<h&&(l+=t.slice(f,h)),l+=Math.floor(Number(e[d])),f=h+2,h++;break;case 79:case 111:case 106:if(d>=c||e[d]===void 0)break;f<h&&(l+=t.slice(f,h));var m=typeof e[d];if(m===\\\"string\\\"){l+=\\\"'\\\"+e[d]+\\\"'\\\",f=h+2,h++;break}if(m===\\\"function\\\"){l+=e[d].name||\\\"<anonymous>\\\",f=h+2,h++;break}l+=n(e[d]),f=h+2,h++;break;case 115:if(d>=c)break;f<h&&(l+=t.slice(f,h)),l+=String(e[d]),f=h+2,h++;break;case 37:f<h&&(l+=t.slice(f,h)),l+=\\\"%\\\",f=h+2,h++,d--;break}++d}++h}return f===-1?t:(f<p&&(l+=t.slice(f)),l)}});var xce=q((Qcn,B$e)=>{\\\"use strict\\\";u();var O$e=P$e();B$e.exports=ih;var r7=pNt().console||{},iNt={mapHttpRequest:Eq,mapHttpResponse:Eq,wrapRequestSerializer:wce,wrapResponseSerializer:wce,wrapErrorSerializer:wce,req:Eq,res:Eq,err:lNt};function sNt(t,e){return Array.isArray(t)?t.filter(function(n){return n!==\\\"!stdSerializers.err\\\"}):t===!0?Object.keys(e):!1}function ih(t){t=t||{},t.browser=t.browser||{};let e=t.browser.transmit;if(e&&typeof e.send!=\\\"function\\\")throw Error(\\\"pino: transmit option must have a send function\\\");let r=t.browser.write||r7;t.browser.write&&(t.browser.asObject=!0);let n=t.serializers||{},i=sNt(t.browser.serialize,n),s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf(\\\"!stdSerializers.err\\\")>-1&&(s=!1);let o=[\\\"error\\\",\\\"fatal\\\",\\\"warn\\\",\\\"info\\\",\\\"debug\\\",\\\"trace\\\"];typeof r==\\\"function\\\"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),t.enabled===!1&&(t.level=\\\"silent\\\");let a=t.level||\\\"info\\\",c=Object.create(r);c.log||(c.log=n7),Object.defineProperty(c,\\\"levelVal\\\",{get:d}),Object.defineProperty(c,\\\"level\\\",{get:f,set:p});let l={transmit:e,serialize:i,asObject:t.browser.asObject,levels:o,timestamp:uNt(t)};c.levels=ih.levels,c.level=a,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=n7,c.serializers=n,c._serialize=i,c._stdErrSerialize=s,c.child=h,e&&(c._logEvent=vce());function d(){return this.level===\\\"silent\\\"?1/0:this.levels.values[this.level]}function f(){return this._level}function p(m){if(m!==\\\"silent\\\"&&!this.levels.values[m])throw Error(\\\"unknown level \\\"+m);this._level=m,GC(l,c,\\\"error\\\",\\\"log\\\"),GC(l,c,\\\"fatal\\\",\\\"error\\\"),GC(l,c,\\\"warn\\\",\\\"error\\\"),GC(l,c,\\\"info\\\",\\\"log\\\"),GC(l,c,\\\"debug\\\",\\\"log\\\"),GC(l,c,\\\"trace\\\",\\\"log\\\")}function h(m,g){if(!m)throw new Error(\\\"missing bindings for child Pino\\\");g=g||{},i&&m.serializers&&(g.serializers=m.serializers);let w=g.serializers;if(i&&w){var v=Object.assign({},n,w),b=t.browser.serialize===!0?Object.keys(v):i;delete m.serializers,_q([m],b,v,this._stdErrSerialize)}function _(S){this._childLevel=(S._childLevel|0)+1,this.error=KC(S,m,\\\"error\\\"),this.fatal=KC(S,m,\\\"fatal\\\"),this.warn=KC(S,m,\\\"warn\\\"),this.info=KC(S,m,\\\"info\\\"),this.debug=KC(S,m,\\\"debug\\\"),this.trace=KC(S,m,\\\"trace\\\"),v&&(this.serializers=v,this._serialize=b),e&&(this._logEvent=vce([].concat(S._logEvent.bindings,m)))}return _.prototype=this,new _(this)}return c}ih.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:\\\"trace\\\",20:\\\"debug\\\",30:\\\"info\\\",40:\\\"warn\\\",50:\\\"error\\\",60:\\\"fatal\\\"}};ih.stdSerializers=iNt;ih.stdTimeFunctions=Object.assign({},{nullTime:N$e,epochTime:k$e,unixTime:dNt,isoTime:fNt});function GC(t,e,r,n){let i=Object.getPrototypeOf(e);e[r]=e.levelVal>e.levels.values[r]?n7:i[r]?i[r]:r7[r]||r7[n]||n7,oNt(t,e,r)}function oNt(t,e,r){!t.transmit&&e[r]===n7||(e[r]=(function(n){return function(){let s=t.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===r7?r7:this;for(var c=0;c<o.length;c++)o[c]=arguments[c];if(t.serialize&&!t.asObject&&_q(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject?n.call(a,aNt(this,r,o,s)):n.apply(a,o),t.transmit){let l=t.transmit.level||e.level,d=ih.levels.values[l],f=ih.levels.values[r];if(f<d)return;cNt(this,{ts:s,methodLevel:r,methodValue:f,transmitLevel:l,transmitValue:ih.levels.values[t.transmit.level||e.level],send:t.transmit.send,val:e.levelVal},o)}}})(e[r]))}function aNt(t,e,r,n){t._serialize&&_q(r,t._serialize,t.serializers,t._stdErrSerialize);let i=r.slice(),s=i[0],o={};n&&(o.time=n),o.level=ih.levels.values[e];let a=(t._childLevel|0)+1;if(a<1&&(a=1),s!==null&&typeof s==\\\"object\\\"){for(;a--&&typeof i[0]==\\\"object\\\";)Object.assign(o,i.shift());s=i.length?O$e(i.shift(),i):void 0}else typeof s==\\\"string\\\"&&(s=O$e(i.shift(),i));return s!==void 0&&(o.msg=s),o}function _q(t,e,r,n){for(let i in t)if(n&&t[i]instanceof Error)t[i]=ih.stdSerializers.err(t[i]);else if(typeof t[i]==\\\"object\\\"&&!Array.isArray(t[i]))for(let s in t[i])e&&e.indexOf(s)>-1&&s in r&&(t[i][s]=r[s](t[i][s]))}function KC(t,e,r){return function(){let n=new Array(1+arguments.length);n[0]=e;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return t[r].apply(this,n)}}function cNt(t,e,r){let n=e.send,i=e.ts,s=e.methodLevel,o=e.methodValue,a=e.val,c=t._logEvent.bindings;_q(r,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=i,t._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),t._logEvent.level.label=s,t._logEvent.level.value=o,n(s,t._logEvent,a),t._logEvent=vce(c)}function vce(t){return{ts:0,messages:[],bindings:t||[],level:{label:\\\"\\\",value:0}}}function lNt(t){let e={type:t.constructor.name,msg:t.message,stack:t.stack};for(let r in t)e[r]===void 0&&(e[r]=t[r]);return e}function uNt(t){return typeof t.timestamp==\\\"function\\\"?t.timestamp:t.timestamp===!1?N$e:k$e}function Eq(){return{}}function wce(t){return t}function n7(){}function N$e(){return!1}function k$e(){return Date.now()}function dNt(){return Math.round(Date.now()/1e3)}function fNt(){return new Date(Date.now()).toISOString()}function pNt(){function t(e){return typeof e<\\\"u\\\"&&e}try{return typeof globalThis<\\\"u\\\"||Object.defineProperty(Object.prototype,\\\"globalThis\\\",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return t(self)||t(window)||t(this)||{}}}});var Sce={};ue(Sce,{MAX_LOG_SIZE_IN_BYTES_DEFAULT:()=>Iq,PINO_CUSTOM_CONTEXT_KEY:()=>ZC,PINO_LOGGER_DEFAULTS:()=>L$e,formatChildLoggerContext:()=>j$e,generateChildLogger:()=>rr,generateClientLogger:()=>H$e,generatePlatformLogger:()=>P2,generateServerLogger:()=>q$e,getBrowserLoggerContext:()=>U$e,getDefaultLoggerOptions:()=>Ll,getLoggerContext:()=>Ir,pino:()=>sh.default,setBrowserLoggerContext:()=>F$e});function Ll(t){return Tq(Aq({},t),{level:t?.level||L$e.level})}function U$e(t,e=ZC){return t[e]||\\\"\\\"}function F$e(t,e,r=ZC){return t[r]=e,t}function Ir(t,e=ZC){let r=\\\"\\\";return typeof t.bindings>\\\"u\\\"?r=U$e(t,e):r=t.bindings().context||\\\"\\\",r}function j$e(t,e,r=ZC){let n=Ir(t,r);return n.trim()?`${n}/${e}`:e}function rr(t,e,r=ZC){let n=j$e(t,e,r),i=t.child({context:n});return F$e(i,n,r)}function H$e(t){var e,r;let n=new _ce((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:(0,x0.default)(Tq(Aq({},t.opts),{level:\\\"trace\\\",browser:Tq(Aq({},(r=t.opts)==null?void 0:r.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function q$e(t){var e;let r=new Cce((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:(0,x0.default)(Tq(Aq({},t.opts),{level:\\\"trace\\\"}),r),chunkLoggerController:r}}function P2(t){return typeof t.loggerOverride<\\\"u\\\"&&typeof t.loggerOverride!=\\\"string\\\"?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<\\\"u\\\"?H$e(t):q$e(t)}var x0,sh,L$e,ZC,Iq,Ece,Cq,Sq,_ce,Cce,hNt,mNt,gNt,M$e,yNt,bNt,D$e,Aq,Tq,C1=x(()=>{u();x0=Me(xce()),sh=Me(xce());f1();L$e={level:\\\"info\\\"},ZC=\\\"custom_context\\\",Iq=1e3*1024,Ece=class{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},Cq=class{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){let r=new Ece(e);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],r=this.head;for(;r!==null;)e.push(r.value),r=r.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let r=e.value;return e=e.next,{done:!1,value:r}}}}},Sq=class{constructor(e,r=Iq){this.level=e??\\\"error\\\",this.levelValue=x0.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new Cq(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,r){r===x0.levels.values.error?console.error(e):r===x0.levels.values.warn?console.warn(e):r===x0.levels.values.debug||r===x0.levels.values.trace&&console.trace(e)}appendToLogs(e){this.logs.append(Vo({timestamp:new Date().toISOString(),log:e}));let r=typeof e==\\\"string\\\"?JSON.parse(e).level:e.level;r>=this.levelValue&&this.forwardToConsole(e,r)}getLogs(){return this.logs}clearLogs(){this.logs=new Cq(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){let r=this.getLogArray();return r.push(Vo({extraMetadata:e})),new Blob(r,{type:\\\"application/json\\\"})}},_ce=class{constructor(e,r=Iq){this.baseChunkLogger=new Sq(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){let r=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement(\\\"a\\\");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}},Cce=class{constructor(e,r=Iq){this.baseChunkLogger=new Sq(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}},hNt=Object.defineProperty,mNt=Object.defineProperties,gNt=Object.getOwnPropertyDescriptors,M$e=Object.getOwnPropertySymbols,yNt=Object.prototype.hasOwnProperty,bNt=Object.prototype.propertyIsEnumerable,D$e=(t,e,r)=>e in t?hNt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Aq=(t,e)=>{for(var r in e||(e={}))yNt.call(e,r)&&D$e(t,r,e[r]);if(M$e)for(var r of M$e(e))bNt.call(e,r)&&D$e(t,r,e[r]);return t},Tq=(t,e)=>mNt(t,gNt(e))});var V$e,wNt,vNt,z$e,Rq,xNt,ENt,_Nt,Pq,Oq,Nq,kq,Bq,Mq,Dq,Lq,Uq,Fq,CNt,SNt,$$e,jq,Hq,Ace=x(()=>{u();wq();V$e=Me(ho()),wNt=Object.defineProperty,vNt=(t,e,r)=>e in t?wNt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,z$e=(t,e,r)=>vNt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Rq=class extends bo{constructor(e){super(),this.opts=e,z$e(this,\\\"protocol\\\",\\\"wc\\\"),z$e(this,\\\"version\\\",2)}},xNt=Object.defineProperty,ENt=(t,e,r)=>e in t?xNt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_Nt=(t,e,r)=>ENt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Pq=class extends bo{constructor(e,r){super(),this.core=e,this.logger=r,_Nt(this,\\\"records\\\",new Map)}},Oq=class{constructor(e,r){this.logger=e,this.core=r}},Nq=class extends bo{constructor(e,r){super(),this.relayer=e,this.logger=r}},kq=class extends bo{constructor(e){super()}},Bq=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},Mq=class extends bo{constructor(e,r){super(),this.relayer=e,this.logger=r}},Dq=class extends bo{constructor(e,r){super(),this.core=e,this.logger=r}},Lq=class{constructor(e,r,n){this.core=e,this.logger=r,this.store=n}},Uq=class{constructor(e,r){this.projectId=e,this.logger=r}},Fq=class{constructor(e,r,n){this.core=e,this.logger=r,this.telemetryEnabled=n}},CNt=Object.defineProperty,SNt=(t,e,r)=>e in t?CNt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$$e=(t,e,r)=>SNt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),jq=class{constructor(e){this.opts=e,$$e(this,\\\"protocol\\\",\\\"wc\\\"),$$e(this,\\\"version\\\",2)}},Hq=class{constructor(e){this.client=e}}});var W$e,G$e,K$e,Z$e,qq,i7,Tce,zq,S1,s7,$q=x(()=>{u();W$e=\\\"PARSE_ERROR\\\",G$e=\\\"INVALID_REQUEST\\\",K$e=\\\"METHOD_NOT_FOUND\\\",Z$e=\\\"INVALID_PARAMS\\\",qq=\\\"INTERNAL_ERROR\\\",i7=\\\"SERVER_ERROR\\\",Tce=[-32700,-32600,-32601,-32602,-32603],zq=[-32e3,-32099],S1={[W$e]:{code:-32700,message:\\\"Parse error\\\"},[G$e]:{code:-32600,message:\\\"Invalid Request\\\"},[K$e]:{code:-32601,message:\\\"Method not found\\\"},[Z$e]:{code:-32602,message:\\\"Invalid params\\\"},[qq]:{code:-32603,message:\\\"Internal error\\\"},[i7]:{code:-32e3,message:\\\"Server error\\\"}},s7=i7});function ANt(t){return t<=zq[0]&&t>=zq[1]}function Vq(t){return Tce.includes(t)}function Q$e(t){return typeof t==\\\"number\\\"}function Wq(t){return Object.keys(S1).includes(t)?S1[t]:S1[s7]}function Gq(t){let e=Object.values(S1).find(r=>r.code===t);return e||S1[s7]}function TNt(t){if(typeof t.error.code>\\\"u\\\")return{valid:!1,error:\\\"Missing code for JSON-RPC error\\\"};if(typeof t.error.message>\\\"u\\\")return{valid:!1,error:\\\"Missing message for JSON-RPC error\\\"};if(!Q$e(t.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${t.error.code}`};if(Vq(t.error.code)){let e=Gq(t.error.code);if(e.message!==S1[s7].message&&t.error.message===e.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${t.error.code}`}}return{valid:!0}}function o7(t,e,r){return t.message.includes(\\\"getaddrinfo ENOTFOUND\\\")||t.message.includes(\\\"connect ECONNREFUSED\\\")?new Error(`Unavailable ${r} RPC url at ${e}`):t}var Ice=x(()=>{u();$q()});var Y$e=q(A1=>{\\\"use strict\\\";u();Object.defineProperty(A1,\\\"__esModule\\\",{value:!0});A1.isBrowserCryptoAvailable=A1.getSubtleCrypto=A1.getBrowerCrypto=void 0;function Rce(){return globalThis?.crypto||globalThis?.msCrypto||{}}A1.getBrowerCrypto=Rce;function J$e(){let t=Rce();return t.subtle||t.webkitSubtle}A1.getSubtleCrypto=J$e;function INt(){return!!Rce()&&!!J$e()}A1.isBrowserCryptoAvailable=INt});var tVe=q(T1=>{\\\"use strict\\\";u();Object.defineProperty(T1,\\\"__esModule\\\",{value:!0});T1.isBrowser=T1.isNode=T1.isReactNative=void 0;function X$e(){return typeof document>\\\"u\\\"&&typeof navigator<\\\"u\\\"&&navigator.product===\\\"ReactNative\\\"}T1.isReactNative=X$e;function eVe(){return typeof process<\\\"u\\\"&&typeof process.versions<\\\"u\\\"&&typeof process.versions.node<\\\"u\\\"}T1.isNode=eVe;function RNt(){return!X$e()&&!eVe()}T1.isBrowser=RNt});var Pce=q(Kq=>{\\\"use strict\\\";u();Object.defineProperty(Kq,\\\"__esModule\\\",{value:!0});var rVe=dC();rVe.__exportStar(Y$e(),Kq);rVe.__exportStar(tVe(),Kq)});var wo={};ue(wo,{isNodeJs:()=>iVe});var nVe,iVe,sVe=x(()=>{u();nVe=Me(Pce());So(wo,Me(Pce()));iVe=nVe.isNode});function hs(t=3){let e=Date.now()*Math.pow(10,t),r=Math.floor(Math.random()*Math.pow(10,t));return e+r}function Vs(t=6){return BigInt(hs(t))}function Ws(t,e,r){return{id:r||hs(),jsonrpc:\\\"2.0\\\",method:t,params:e}}function gf(t,e){return{id:t,jsonrpc:\\\"2.0\\\",result:e}}function Ul(t,e,r){return{id:t,jsonrpc:\\\"2.0\\\",error:oVe(e,r)}}function oVe(t,e){return typeof t>\\\"u\\\"?Wq(qq):(typeof t==\\\"string\\\"&&(t=Object.assign(Object.assign({},Wq(i7)),{message:t})),typeof e<\\\"u\\\"&&(t.data=e),Vq(t.code)&&(t=Gq(t.code)),t)}var aVe=x(()=>{u();Ice();$q()});function PNt(t){return t.includes(\\\"*\\\")?Qq(t):!/\\\\W/g.test(t)}function Zq(t){return t===\\\"*\\\"}function Qq(t){return Zq(t)?!0:!(!t.includes(\\\"*\\\")||t.split(\\\"*\\\").length!==2||t.split(\\\"*\\\").filter(e=>e.trim()===\\\"\\\").length!==1)}function ONt(t){return!Zq(t)&&Qq(t)&&!t.split(\\\"*\\\")[0].trim()}function NNt(t){return!Zq(t)&&Qq(t)&&!t.split(\\\"*\\\")[1].trim()}var cVe=x(()=>{u()});var a7,Oce,Jq,c7,lVe=x(()=>{u();a7=class{},Oce=class extends a7{constructor(e){super()}},Jq=class extends a7{constructor(){super()}},c7=class extends Jq{constructor(e){super()}}});var uVe=x(()=>{u();lVe()});function MNt(t){let e=t.match(new RegExp(/^\\\\w+:/,\\\"gi\\\"));if(!(!e||!e.length))return e[0]}function dVe(t,e){let r=MNt(t);return typeof r>\\\"u\\\"?!1:new RegExp(e).test(r)}function Yq(t){return dVe(t,kNt)}function Xq(t){return dVe(t,BNt)}function Nce(t){return new RegExp(\\\"wss?://localhost(:d{2,5})?\\\").test(t)}var kNt,BNt,fVe=x(()=>{u();kNt=\\\"^https?:\\\",BNt=\\\"^wss?:\\\"});function kce(t){return typeof t==\\\"object\\\"&&\\\"id\\\"in t&&\\\"jsonrpc\\\"in t&&t.jsonrpc===\\\"2.0\\\"}function yf(t){return kce(t)&&\\\"method\\\"in t}function Fl(t){return kce(t)&&(Ii(t)||nn(t))}function Ii(t){return\\\"result\\\"in t}function nn(t){return\\\"error\\\"in t}function DNt(t){return\\\"error\\\"in t&&t.valid===!1}var pVe=x(()=>{u()});var Ra={};ue(Ra,{DEFAULT_ERROR:()=>s7,IBaseJsonRpcProvider:()=>Jq,IEvents:()=>a7,IJsonRpcConnection:()=>Oce,IJsonRpcProvider:()=>c7,INTERNAL_ERROR:()=>qq,INVALID_PARAMS:()=>Z$e,INVALID_REQUEST:()=>G$e,METHOD_NOT_FOUND:()=>K$e,PARSE_ERROR:()=>W$e,RESERVED_ERROR_CODES:()=>Tce,SERVER_ERROR:()=>i7,SERVER_ERROR_CODE_RANGE:()=>zq,STANDARD_ERROR_MAP:()=>S1,formatErrorMessage:()=>oVe,formatJsonRpcError:()=>Ul,formatJsonRpcRequest:()=>Ws,formatJsonRpcResult:()=>gf,getBigIntRpcId:()=>Vs,getError:()=>Wq,getErrorByCode:()=>Gq,isHttpUrl:()=>Yq,isJsonRpcError:()=>nn,isJsonRpcPayload:()=>kce,isJsonRpcRequest:()=>yf,isJsonRpcResponse:()=>Fl,isJsonRpcResult:()=>Ii,isJsonRpcValidationInvalid:()=>DNt,isLocalhostUrl:()=>Nce,isNodeJs:()=>iVe,isReservedErrorCode:()=>Vq,isServerErrorCode:()=>ANt,isValidDefaultRoute:()=>Zq,isValidErrorCode:()=>Q$e,isValidLeadingWildcardRoute:()=>ONt,isValidRoute:()=>PNt,isValidTrailingWildcardRoute:()=>NNt,isValidWildcardRoute:()=>Qq,isWsUrl:()=>Xq,parseConnectionError:()=>o7,payloadId:()=>hs,validateJsonRpcError:()=>TNt});var oh=x(()=>{u();$q();Ice();sVe();So(Ra,wo);aVe();cVe();uVe();fVe();pVe()});var Bce={};ue(Bce,{JsonRpcProvider:()=>O2,default:()=>O2});var hVe,O2,l7=x(()=>{u();hVe=Me(ho());oh();O2=class extends c7{constructor(e){super(e),this.events=new hVe.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(Ws(e.method,e.params||[],e.id||Vs().toString()),r)}async requestStrict(e,r){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{nn(s)?i(s.error):n(s.result)});try{await this.connection.send(e,r)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit(\\\"payload\\\",e),Fl(e)?this.events.emit(`${e.id}`,e):this.events.emit(\\\"message\\\",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit(\\\"error\\\",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:\\\"\\\"}`)),this.events.emit(\\\"disconnect\\\")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e==\\\"string\\\"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit(\\\"connect\\\"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on(\\\"payload\\\",e=>this.onPayload(e)),this.connection.on(\\\"close\\\",e=>this.onClose(e)),this.connection.on(\\\"error\\\",e=>this.events.emit(\\\"error\\\",e)),this.connection.on(\\\"register_error\\\",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}});var gVe=q((qln,mVe)=>{\\\"use strict\\\";u();mVe.exports=function(){throw new Error(\\\"ws does not work in the browser. Browser clients must use the native WebSocket object\\\")}});var wVe,LNt,UNt,yVe,bVe,FNt,QC,Mce=x(()=>{u();wVe=Me(ho());f1();oh();LNt=()=>typeof WebSocket<\\\"u\\\"?WebSocket:typeof globalThis<\\\"u\\\"&&typeof globalThis.WebSocket<\\\"u\\\"?globalThis.WebSocket:typeof window<\\\"u\\\"&&typeof window.WebSocket<\\\"u\\\"?window.WebSocket:typeof self<\\\"u\\\"&&typeof self.WebSocket<\\\"u\\\"?self.WebSocket:gVe(),UNt=()=>typeof WebSocket<\\\"u\\\"||typeof globalThis<\\\"u\\\"&&typeof globalThis.WebSocket<\\\"u\\\"||typeof window<\\\"u\\\"&&typeof window.WebSocket<\\\"u\\\"||typeof self<\\\"u\\\"&&typeof self.WebSocket<\\\"u\\\",yVe=t=>t.split(\\\"?\\\")[0],bVe=10,FNt=LNt(),QC=class{constructor(e){if(this.url=e,this.events=new wVe.EventEmitter,this.registering=!1,!Xq(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<\\\"u\\\"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,r)=>{if(typeof this.socket>\\\"u\\\"){r(new Error(\\\"Connection already closed\\\"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>\\\"u\\\"&&(this.socket=await this.register());try{this.socket.send(Vo(e))}catch(r){this.onError(e.id,r)}}register(e=this.url){if(!Xq(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount(\\\"register_error\\\")>=r||this.events.listenerCount(\\\"open\\\")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once(\\\"register_error\\\",s=>{this.resetMaxListeners(),i(s)}),this.events.once(\\\"open\\\",()=>{if(this.resetMaxListeners(),typeof this.socket>\\\"u\\\")return i(new Error(\\\"WebSocket connection is missing or invalid\\\"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,n)=>{let i=(0,Ra.isReactNative)()?void 0:{rejectUnauthorized:!Nce(e)},s=new FNt(e,[],i);UNt()?s.onerror=o=>{let a=o;n(this.emitError(a.error))}:s.on(\\\"error\\\",o=>{n(this.emitError(o))}),s.onopen=()=>{this.onOpen(s),r(s)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit(\\\"open\\\")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit(\\\"close\\\",e)}onPayload(e){if(typeof e.data>\\\"u\\\")return;let r=typeof e.data==\\\"string\\\"?nc(e.data):e.data;this.events.emit(\\\"payload\\\",r)}onError(e,r){let n=this.parseError(r),i=n.message||n.toString(),s=Ul(e,i);this.events.emit(\\\"payload\\\",s)}parseError(e,r=this.url){return o7(e,yVe(r),\\\"WS\\\")}resetMaxListeners(){this.events.getMaxListeners()>bVe&&this.events.setMaxListeners(bVe)}emitError(e){let r=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${yVe(this.url)}`));return this.events.emit(\\\"register_error\\\",r),r}}});function wkt(t,e){if(t.length>=255)throw new TypeError(\\\"Alphabet too long\\\");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+\\\" is ambiguous\\\");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError(\\\"Expected Uint8Array\\\");if(m.length===0)return\\\"\\\";for(var g=0,w=0,v=0,b=m.length;v!==b&&m[v]===0;)v++,g++;for(var _=(b-v)*d+1>>>0,S=new Uint8Array(_);v!==b;){for(var T=m[v],N=0,O=_-1;(T!==0||N<w)&&O!==-1;O--,N++)T+=256*S[O]>>>0,S[O]=T%a>>>0,T=T/a>>>0;if(T!==0)throw new Error(\\\"Non-zero carry\\\");w=N,v++}for(var L=_-w;L!==_&&S[L]===0;)L++;for(var B=c.repeat(g);L<_;++L)B+=t.charAt(S[L]);return B}function p(m){if(typeof m!=\\\"string\\\")throw new TypeError(\\\"Expected String\\\");if(m.length===0)return new Uint8Array;var g=0;if(m[g]!==\\\" \\\"){for(var w=0,v=0;m[g]===c;)w++,g++;for(var b=(m.length-g)*l+1>>>0,_=new Uint8Array(b);m[g];){var S=r[m.charCodeAt(g)];if(S===255)return;for(var T=0,N=b-1;(S!==0||T<v)&&N!==-1;N--,T++)S+=a*_[N]>>>0,_[N]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error(\\\"Non-zero carry\\\");v=T,g++}if(m[g]!==\\\" \\\"){for(var O=b-v;O!==b&&_[O]===0;)O++;for(var L=new Uint8Array(w+(b-O)),B=w;O!==b;)L[B++]=_[O++];return L}}}function h(m){var g=p(m);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:p,decode:h}}function oBt(t){return t.reduce((e,r)=>(e+=iBt[r],e),\\\"\\\")}function aBt(t){let e=[];for(let r of t){let n=sBt[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}function YVe(t,e,r){e=e||[],r=r||0;for(var n=r;t>=pBt;)e[r++]=t&255|_Ve,t/=128;for(;t&fBt;)e[r++]=t&255|_Ve,t>>>=7;return e[r]=t|0,YVe.bytes=r-n+1,e}function Vce(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw Vce.bytes=0,new RangeError(\\\"Could not decode varint\\\");o=t[s++],r+=i<28?(o&CVe)<<i:(o&CVe)*Math.pow(2,i),i+=7}while(o>=mBt);return Vce.bytes=s-n,r}function BBt(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function iWe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}function DBt(t,e=\\\"utf8\\\"){let r=MBt[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,\\\"utf8\\\"):r.decoder.decode(`${r.prefix}${t}`)}function lMt(){}function BVe(t){if(!t||typeof t!=\\\"object\\\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)===\\\"[object Object]\\\":!1}function MVe(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function DVe(t){return t==null?t===void 0?\\\"[object Undefined]\\\":\\\"[object Null]\\\":Object.prototype.toString.call(t)}function BMt(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function MMt(t,e,r){return p7(t,e,void 0,void 0,void 0,void 0,r)}function p7(t,e,r,n,i,s,o){let a=o(t,e,r,n,i,s);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case\\\"bigint\\\":case\\\"string\\\":case\\\"boolean\\\":case\\\"symbol\\\":case\\\"undefined\\\":return t===e;case\\\"number\\\":return t===e||Object.is(t,e);case\\\"function\\\":return t===e;case\\\"object\\\":return h7(t,e,s,o)}return h7(t,e,s,o)}function h7(t,e,r,n){if(Object.is(t,e))return!0;let i=DVe(t),s=DVe(e);if(i===LVe&&(i=Fce),s===LVe&&(s=Fce),i!==s)return!1;switch(i){case dMt:return t.toString()===e.toString();case fMt:{let c=t.valueOf(),l=e.valueOf();return BMt(c,l)}case pMt:case mMt:case hMt:return Object.is(t.valueOf(),e.valueOf());case uMt:return t.source===e.source&&t.flags===e.flags;case wMt:return t===e}r=r??new Map;let o=r.get(t),a=r.get(e);if(o!=null&&a!=null)return o===e;r.set(t,e),r.set(e,t);try{switch(i){case gMt:{if(t.size!==e.size)return!1;for(let[c,l]of t.entries())if(!e.has(c)||!p7(l,e.get(c),c,t,e,r,n))return!1;return!0}case yMt:{if(t.size!==e.size)return!1;let c=Array.from(t.values()),l=Array.from(e.values());for(let d=0;d<c.length;d++){let f=c[d],p=l.findIndex(h=>p7(f,h,void 0,t,e,r,n));if(p===-1)return!1;l.splice(p,1)}return!0}case bMt:case _Mt:case CMt:case SMt:case AMt:case TMt:case IMt:case RMt:case PMt:case OMt:case NMt:case kMt:{if(typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(t)!==globalThis.Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!p7(t[c],e[c],c,t,e,r,n))return!1;return!0}case vMt:return t.byteLength!==e.byteLength?!1:h7(new Uint8Array(t),new Uint8Array(e),r,n);case EMt:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:h7(new Uint8Array(t),new Uint8Array(e),r,n);case xMt:return t.name===e.name&&t.message===e.message;case Fce:{if(!(h7(t.constructor,e.constructor,r,n)||BVe(t)&&BVe(e)))return!1;let c=[...Object.keys(t),...MVe(t)],l=[...Object.keys(e),...MVe(e)];if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++){let f=c[d],p=t[f];if(!Object.hasOwn(e,f))return!1;let h=e[f];if(!p7(p,h,f,t,e,r,n))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function DMt(t,e){return MMt(t,e,lMt)}var E0,Ye,$Ve,VVe,WVe,rz,lh,jNt,HNt,qNt,vVe,zNt,$Nt,VNt,WNt,GNt,xVe,KNt,gle,ZNt,GVe,QNt,Gs,JNt,id,YNt,jce,kn,tz,XNt,ekt,EVe,Hl,tkt,rkt,sun,nkt,ikt,u7,I1,bf,skt,okt,akt,ql,ckt,lkt,ukt,KVe,YC,dkt,fkt,pkt,hkt,vf,ch,sd,R1,P1,XC,mkt,gkt,ykt,bkt,vkt,xkt,ZVe,Ekt,_kt,Hce,qce,zce,QVe,$ce,nz,m7,Ckt,Skt,Yo,Akt,Tkt,Ikt,Rkt,Pkt,Okt,Nkt,kkt,Bkt,Mkt,Dkt,Lkt,Ukt,Fkt,jkt,Hkt,qkt,zkt,$kt,Vkt,Wkt,Gkt,Kkt,Zkt,Qkt,Jkt,Ykt,Xkt,eBt,tBt,rBt,nBt,JVe,iBt,sBt,cBt,lBt,uBt,_Ve,dBt,fBt,pBt,hBt,mBt,CVe,gBt,yBt,bBt,wBt,vBt,xBt,EBt,_Bt,CBt,SBt,ABt,XVe,SVe,AVe,Wce,Gce,eWe,Kce,tWe,TBt,IBt,RBt,rWe,PBt,nWe,OBt,NBt,kBt,TVe,IVe,Dce,MBt,LBt,UBt,ah,Zce,FBt,jBt,Qo,Qce,HBt,qBt,zBt,RVe,$Bt,VBt,Jce,WBt,GBt,jl,Yce,KBt,ZBt,QBt,PVe,JBt,YBt,Xce,ez,Lce,wf,ele,XBt,eMt,JC,tle,tMt,rMt,nMt,OVe,iMt,sMt,rle,d7,Uce,hn,nle,oMt,NVe,aMt,cMt,ile,kVe,Rr,sle,uMt,dMt,fMt,pMt,LVe,hMt,mMt,gMt,yMt,bMt,wMt,vMt,Fce,xMt,EMt,_Mt,CMt,SMt,AMt,TMt,IMt,RMt,PMt,OMt,NMt,kMt,LMt,UVe,UMt,FMt,ole,FVe,Wc,uh,jMt,HMt,nr,ale,qMt,zMt,Jo,cle,$Mt,VMt,Pa,lle,WMt,GMt,Ns,ule,KMt,ZMt,jVe,dle,QMt,HVe,JMt,YMt,fle,f7,vo,ple,XMt,qVe,eDt,tDt,hle,zVe,Nn,mle,sWe,oWe=x(()=>{u();E0=Me(ho());pce();bce();C1();Ace();Ye=Me(u0());f1();g2();g2();Y9();B9();l7();oh();Mce();$Ve=Me(gC()),VVe=\\\"wc\\\",WVe=2,rz=\\\"core\\\",lh=`${VVe}@2:${rz}:`,jNt={name:rz,logger:\\\"error\\\"},HNt={database:\\\":memory:\\\"},qNt=\\\"crypto\\\",vVe=\\\"client_ed25519_seed\\\",zNt=Ye.ONE_DAY,$Nt=\\\"keychain\\\",VNt=\\\"0.3\\\",WNt=\\\"messages\\\",GNt=\\\"0.3\\\",xVe=Ye.SIX_HOURS,KNt=\\\"publisher\\\",gle=\\\"irn\\\",ZNt=\\\"error\\\",GVe=\\\"wss://relay.walletconnect.org\\\",QNt=\\\"relayer\\\",Gs={message:\\\"relayer_message\\\",message_ack:\\\"relayer_message_ack\\\",connect:\\\"relayer_connect\\\",disconnect:\\\"relayer_disconnect\\\",error:\\\"relayer_error\\\",connection_stalled:\\\"relayer_connection_stalled\\\",transport_closed:\\\"relayer_transport_closed\\\",publish:\\\"relayer_publish\\\"},JNt=\\\"_subscription\\\",id={payload:\\\"payload\\\",connect:\\\"connect\\\",disconnect:\\\"disconnect\\\",error:\\\"error\\\"},YNt=.1,jce=\\\"2.21.1\\\",kn={link_mode:\\\"link_mode\\\",relay:\\\"relay\\\"},tz={inbound:\\\"inbound\\\",outbound:\\\"outbound\\\"},XNt=\\\"0.3\\\",ekt=\\\"WALLETCONNECT_CLIENT_ID\\\",EVe=\\\"WALLETCONNECT_LINK_MODE_APPS\\\",Hl={created:\\\"subscription_created\\\",deleted:\\\"subscription_deleted\\\",expired:\\\"subscription_expired\\\",disabled:\\\"subscription_disabled\\\",sync:\\\"subscription_sync\\\",resubscribed:\\\"subscription_resubscribed\\\"},tkt=\\\"subscription\\\",rkt=\\\"0.3\\\",sun=Ye.FIVE_SECONDS*1e3,nkt=\\\"pairing\\\",ikt=\\\"0.3\\\",u7={wc_pairingDelete:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:Ye.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:Ye.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:Ye.ONE_DAY,prompt:!1,tag:0},res:{ttl:Ye.ONE_DAY,prompt:!1,tag:0}}},I1={create:\\\"pairing_create\\\",expire:\\\"pairing_expire\\\",delete:\\\"pairing_delete\\\",ping:\\\"pairing_ping\\\"},bf={created:\\\"history_created\\\",updated:\\\"history_updated\\\",deleted:\\\"history_deleted\\\",sync:\\\"history_sync\\\"},skt=\\\"history\\\",okt=\\\"0.3\\\",akt=\\\"expirer\\\",ql={created:\\\"expirer_created\\\",deleted:\\\"expirer_deleted\\\",expired:\\\"expirer_expired\\\",sync:\\\"expirer_sync\\\"},ckt=\\\"0.3\\\",lkt=\\\"verify-api\\\",ukt=\\\"https://verify.walletconnect.com\\\",KVe=\\\"https://verify.walletconnect.org\\\",YC=KVe,dkt=`${YC}/v3`,fkt=[ukt,KVe],pkt=\\\"echo\\\",hkt=\\\"https://echo.walletconnect.com\\\",vf={pairing_started:\\\"pairing_started\\\",pairing_uri_validation_success:\\\"pairing_uri_validation_success\\\",pairing_uri_not_expired:\\\"pairing_uri_not_expired\\\",store_new_pairing:\\\"store_new_pairing\\\",subscribing_pairing_topic:\\\"subscribing_pairing_topic\\\",subscribe_pairing_topic_success:\\\"subscribe_pairing_topic_success\\\",existing_pairing:\\\"existing_pairing\\\",pairing_not_expired:\\\"pairing_not_expired\\\",emit_inactive_pairing:\\\"emit_inactive_pairing\\\",emit_session_proposal:\\\"emit_session_proposal\\\",subscribing_to_pairing_topic:\\\"subscribing_to_pairing_topic\\\"},ch={no_wss_connection:\\\"no_wss_connection\\\",no_internet_connection:\\\"no_internet_connection\\\",malformed_pairing_uri:\\\"malformed_pairing_uri\\\",active_pairing_already_exists:\\\"active_pairing_already_exists\\\",subscribe_pairing_topic_failure:\\\"subscribe_pairing_topic_failure\\\",pairing_expired:\\\"pairing_expired\\\",proposal_expired:\\\"proposal_expired\\\",proposal_listener_not_found:\\\"proposal_listener_not_found\\\"},sd={session_approve_started:\\\"session_approve_started\\\",proposal_not_expired:\\\"proposal_not_expired\\\",session_namespaces_validation_success:\\\"session_namespaces_validation_success\\\",create_session_topic:\\\"create_session_topic\\\",subscribing_session_topic:\\\"subscribing_session_topic\\\",subscribe_session_topic_success:\\\"subscribe_session_topic_success\\\",publishing_session_approve:\\\"publishing_session_approve\\\",session_approve_publish_success:\\\"session_approve_publish_success\\\",store_session:\\\"store_session\\\",publishing_session_settle:\\\"publishing_session_settle\\\",session_settle_publish_success:\\\"session_settle_publish_success\\\"},R1={no_internet_connection:\\\"no_internet_connection\\\",no_wss_connection:\\\"no_wss_connection\\\",proposal_expired:\\\"proposal_expired\\\",subscribe_session_topic_failure:\\\"subscribe_session_topic_failure\\\",session_approve_publish_failure:\\\"session_approve_publish_failure\\\",session_settle_publish_failure:\\\"session_settle_publish_failure\\\",session_approve_namespace_validation_failure:\\\"session_approve_namespace_validation_failure\\\",proposal_not_found:\\\"proposal_not_found\\\"},P1={authenticated_session_approve_started:\\\"authenticated_session_approve_started\\\",authenticated_session_not_expired:\\\"authenticated_session_not_expired\\\",chains_caip2_compliant:\\\"chains_caip2_compliant\\\",chains_evm_compliant:\\\"chains_evm_compliant\\\",create_authenticated_session_topic:\\\"create_authenticated_session_topic\\\",cacaos_verified:\\\"cacaos_verified\\\",store_authenticated_session:\\\"store_authenticated_session\\\",subscribing_authenticated_session_topic:\\\"subscribing_authenticated_session_topic\\\",subscribe_authenticated_session_topic_success:\\\"subscribe_authenticated_session_topic_success\\\",publishing_authenticated_session_approve:\\\"publishing_authenticated_session_approve\\\",authenticated_session_approve_publish_success:\\\"authenticated_session_approve_publish_success\\\"},XC={no_internet_connection:\\\"no_internet_connection\\\",no_wss_connection:\\\"no_wss_connection\\\",missing_session_authenticate_request:\\\"missing_session_authenticate_request\\\",session_authenticate_request_expired:\\\"session_authenticate_request_expired\\\",chains_caip2_compliant_failure:\\\"chains_caip2_compliant_failure\\\",chains_evm_compliant_failure:\\\"chains_evm_compliant_failure\\\",invalid_cacao:\\\"invalid_cacao\\\",subscribe_authenticated_session_topic_failure:\\\"subscribe_authenticated_session_topic_failure\\\",authenticated_session_approve_publish_failure:\\\"authenticated_session_approve_publish_failure\\\",authenticated_session_pending_request_not_found:\\\"authenticated_session_pending_request_not_found\\\"},mkt=.1,gkt=\\\"event-client\\\",ykt=86400,bkt=\\\"https://pulse.walletconnect.org/batch\\\";vkt=wkt,xkt=vkt,ZVe=t=>{if(t instanceof Uint8Array&&t.constructor.name===\\\"Uint8Array\\\")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error(\\\"Unknown type, must be binary type\\\")},Ekt=t=>new TextEncoder().encode(t),_kt=t=>new TextDecoder().decode(t),Hce=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\\\"Unknown type, must be binary type\\\")}},qce=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error(\\\"Invalid prefix character\\\");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e==\\\"string\\\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\\\"Can only multibase decode strings\\\")}or(e){return QVe(this,e)}},zce=class{constructor(e){this.decoders=e}or(e){return QVe(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},QVe=(t,e)=>new zce({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),$ce=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new Hce(e,r,n),this.decoder=new qce(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},nz=({name:t,prefix:e,encode:r,decode:n})=>new $ce(t,e,r,n),m7=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=xkt(r,e);return nz({prefix:t,name:e,encode:n,decode:s=>ZVe(i(s))})},Ckt=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]===\\\"=\\\";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,l=0;for(let d=0;d<s;++d){let f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError(\\\"Unexpected end of data\\\");return o},Skt=(t,e,r)=>{let n=e[e.length-1]===\\\"=\\\",i=(1<<r)-1,s=\\\"\\\",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+=\\\"=\\\";return s},Yo=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>nz({prefix:e,name:t,encode(i){return Skt(i,n,r)},decode(i){return Ckt(i,n,r,t)}}),Akt=nz({prefix:\\\"\\\\0\\\",name:\\\"identity\\\",encode:t=>_kt(t),decode:t=>Ekt(t)}),Tkt=Object.freeze({__proto__:null,identity:Akt}),Ikt=Yo({prefix:\\\"0\\\",name:\\\"base2\\\",alphabet:\\\"01\\\",bitsPerChar:1}),Rkt=Object.freeze({__proto__:null,base2:Ikt}),Pkt=Yo({prefix:\\\"7\\\",name:\\\"base8\\\",alphabet:\\\"01234567\\\",bitsPerChar:3}),Okt=Object.freeze({__proto__:null,base8:Pkt}),Nkt=m7({prefix:\\\"9\\\",name:\\\"base10\\\",alphabet:\\\"0123456789\\\"}),kkt=Object.freeze({__proto__:null,base10:Nkt}),Bkt=Yo({prefix:\\\"f\\\",name:\\\"base16\\\",alphabet:\\\"0123456789abcdef\\\",bitsPerChar:4}),Mkt=Yo({prefix:\\\"F\\\",name:\\\"base16upper\\\",alphabet:\\\"0123456789ABCDEF\\\",bitsPerChar:4}),Dkt=Object.freeze({__proto__:null,base16:Bkt,base16upper:Mkt}),Lkt=Yo({prefix:\\\"b\\\",name:\\\"base32\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567\\\",bitsPerChar:5}),Ukt=Yo({prefix:\\\"B\\\",name:\\\"base32upper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\\\",bitsPerChar:5}),Fkt=Yo({prefix:\\\"c\\\",name:\\\"base32pad\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567=\\\",bitsPerChar:5}),jkt=Yo({prefix:\\\"C\\\",name:\\\"base32padupper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\\\",bitsPerChar:5}),Hkt=Yo({prefix:\\\"v\\\",name:\\\"base32hex\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv\\\",bitsPerChar:5}),qkt=Yo({prefix:\\\"V\\\",name:\\\"base32hexupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV\\\",bitsPerChar:5}),zkt=Yo({prefix:\\\"t\\\",name:\\\"base32hexpad\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv=\\\",bitsPerChar:5}),$kt=Yo({prefix:\\\"T\\\",name:\\\"base32hexpadupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\\\",bitsPerChar:5}),Vkt=Yo({prefix:\\\"h\\\",name:\\\"base32z\\\",alphabet:\\\"ybndrfg8ejkmcpqxot1uwisza345h769\\\",bitsPerChar:5}),Wkt=Object.freeze({__proto__:null,base32:Lkt,base32upper:Ukt,base32pad:Fkt,base32padupper:jkt,base32hex:Hkt,base32hexupper:qkt,base32hexpad:zkt,base32hexpadupper:$kt,base32z:Vkt}),Gkt=m7({prefix:\\\"k\\\",name:\\\"base36\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuvwxyz\\\"}),Kkt=m7({prefix:\\\"K\\\",name:\\\"base36upper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\\\"}),Zkt=Object.freeze({__proto__:null,base36:Gkt,base36upper:Kkt}),Qkt=m7({name:\\\"base58btc\\\",prefix:\\\"z\\\",alphabet:\\\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\\\"}),Jkt=m7({name:\\\"base58flickr\\\",prefix:\\\"Z\\\",alphabet:\\\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\\\"}),Ykt=Object.freeze({__proto__:null,base58btc:Qkt,base58flickr:Jkt}),Xkt=Yo({prefix:\\\"m\\\",name:\\\"base64\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",bitsPerChar:6}),eBt=Yo({prefix:\\\"M\\\",name:\\\"base64pad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\",bitsPerChar:6}),tBt=Yo({prefix:\\\"u\\\",name:\\\"base64url\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\\\",bitsPerChar:6}),rBt=Yo({prefix:\\\"U\\\",name:\\\"base64urlpad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\\\",bitsPerChar:6}),nBt=Object.freeze({__proto__:null,base64:Xkt,base64pad:eBt,base64url:tBt,base64urlpad:rBt}),JVe=Array.from(\\\"\\\\u{1F680}\\\\u{1FA90}\\\\u2604\\\\u{1F6F0}\\\\u{1F30C}\\\\u{1F311}\\\\u{1F312}\\\\u{1F313}\\\\u{1F314}\\\\u{1F315}\\\\u{1F316}\\\\u{1F317}\\\\u{1F318}\\\\u{1F30D}\\\\u{1F30F}\\\\u{1F30E}\\\\u{1F409}\\\\u2600\\\\u{1F4BB}\\\\u{1F5A5}\\\\u{1F4BE}\\\\u{1F4BF}\\\\u{1F602}\\\\u2764\\\\u{1F60D}\\\\u{1F923}\\\\u{1F60A}\\\\u{1F64F}\\\\u{1F495}\\\\u{1F62D}\\\\u{1F618}\\\\u{1F44D}\\\\u{1F605}\\\\u{1F44F}\\\\u{1F601}\\\\u{1F525}\\\\u{1F970}\\\\u{1F494}\\\\u{1F496}\\\\u{1F499}\\\\u{1F622}\\\\u{1F914}\\\\u{1F606}\\\\u{1F644}\\\\u{1F4AA}\\\\u{1F609}\\\\u263A\\\\u{1F44C}\\\\u{1F917}\\\\u{1F49C}\\\\u{1F614}\\\\u{1F60E}\\\\u{1F607}\\\\u{1F339}\\\\u{1F926}\\\\u{1F389}\\\\u{1F49E}\\\\u270C\\\\u2728\\\\u{1F937}\\\\u{1F631}\\\\u{1F60C}\\\\u{1F338}\\\\u{1F64C}\\\\u{1F60B}\\\\u{1F497}\\\\u{1F49A}\\\\u{1F60F}\\\\u{1F49B}\\\\u{1F642}\\\\u{1F493}\\\\u{1F929}\\\\u{1F604}\\\\u{1F600}\\\\u{1F5A4}\\\\u{1F603}\\\\u{1F4AF}\\\\u{1F648}\\\\u{1F447}\\\\u{1F3B6}\\\\u{1F612}\\\\u{1F92D}\\\\u2763\\\\u{1F61C}\\\\u{1F48B}\\\\u{1F440}\\\\u{1F62A}\\\\u{1F611}\\\\u{1F4A5}\\\\u{1F64B}\\\\u{1F61E}\\\\u{1F629}\\\\u{1F621}\\\\u{1F92A}\\\\u{1F44A}\\\\u{1F973}\\\\u{1F625}\\\\u{1F924}\\\\u{1F449}\\\\u{1F483}\\\\u{1F633}\\\\u270B\\\\u{1F61A}\\\\u{1F61D}\\\\u{1F634}\\\\u{1F31F}\\\\u{1F62C}\\\\u{1F643}\\\\u{1F340}\\\\u{1F337}\\\\u{1F63B}\\\\u{1F613}\\\\u2B50\\\\u2705\\\\u{1F97A}\\\\u{1F308}\\\\u{1F608}\\\\u{1F918}\\\\u{1F4A6}\\\\u2714\\\\u{1F623}\\\\u{1F3C3}\\\\u{1F490}\\\\u2639\\\\u{1F38A}\\\\u{1F498}\\\\u{1F620}\\\\u261D\\\\u{1F615}\\\\u{1F33A}\\\\u{1F382}\\\\u{1F33B}\\\\u{1F610}\\\\u{1F595}\\\\u{1F49D}\\\\u{1F64A}\\\\u{1F639}\\\\u{1F5E3}\\\\u{1F4AB}\\\\u{1F480}\\\\u{1F451}\\\\u{1F3B5}\\\\u{1F91E}\\\\u{1F61B}\\\\u{1F534}\\\\u{1F624}\\\\u{1F33C}\\\\u{1F62B}\\\\u26BD\\\\u{1F919}\\\\u2615\\\\u{1F3C6}\\\\u{1F92B}\\\\u{1F448}\\\\u{1F62E}\\\\u{1F646}\\\\u{1F37B}\\\\u{1F343}\\\\u{1F436}\\\\u{1F481}\\\\u{1F632}\\\\u{1F33F}\\\\u{1F9E1}\\\\u{1F381}\\\\u26A1\\\\u{1F31E}\\\\u{1F388}\\\\u274C\\\\u270A\\\\u{1F44B}\\\\u{1F630}\\\\u{1F928}\\\\u{1F636}\\\\u{1F91D}\\\\u{1F6B6}\\\\u{1F4B0}\\\\u{1F353}\\\\u{1F4A2}\\\\u{1F91F}\\\\u{1F641}\\\\u{1F6A8}\\\\u{1F4A8}\\\\u{1F92C}\\\\u2708\\\\u{1F380}\\\\u{1F37A}\\\\u{1F913}\\\\u{1F619}\\\\u{1F49F}\\\\u{1F331}\\\\u{1F616}\\\\u{1F476}\\\\u{1F974}\\\\u25B6\\\\u27A1\\\\u2753\\\\u{1F48E}\\\\u{1F4B8}\\\\u2B07\\\\u{1F628}\\\\u{1F31A}\\\\u{1F98B}\\\\u{1F637}\\\\u{1F57A}\\\\u26A0\\\\u{1F645}\\\\u{1F61F}\\\\u{1F635}\\\\u{1F44E}\\\\u{1F932}\\\\u{1F920}\\\\u{1F927}\\\\u{1F4CC}\\\\u{1F535}\\\\u{1F485}\\\\u{1F9D0}\\\\u{1F43E}\\\\u{1F352}\\\\u{1F617}\\\\u{1F911}\\\\u{1F30A}\\\\u{1F92F}\\\\u{1F437}\\\\u260E\\\\u{1F4A7}\\\\u{1F62F}\\\\u{1F486}\\\\u{1F446}\\\\u{1F3A4}\\\\u{1F647}\\\\u{1F351}\\\\u2744\\\\u{1F334}\\\\u{1F4A3}\\\\u{1F438}\\\\u{1F48C}\\\\u{1F4CD}\\\\u{1F940}\\\\u{1F922}\\\\u{1F445}\\\\u{1F4A1}\\\\u{1F4A9}\\\\u{1F450}\\\\u{1F4F8}\\\\u{1F47B}\\\\u{1F910}\\\\u{1F92E}\\\\u{1F3BC}\\\\u{1F975}\\\\u{1F6A9}\\\\u{1F34E}\\\\u{1F34A}\\\\u{1F47C}\\\\u{1F48D}\\\\u{1F4E3}\\\\u{1F942}\\\"),iBt=JVe.reduce((t,e,r)=>(t[r]=e,t),[]),sBt=JVe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);cBt=nz({prefix:\\\"\\\\u{1F680}\\\",name:\\\"base256emoji\\\",encode:oBt,decode:aBt}),lBt=Object.freeze({__proto__:null,base256emoji:cBt}),uBt=YVe,_Ve=128,dBt=127,fBt=~dBt,pBt=Math.pow(2,31);hBt=Vce,mBt=128,CVe=127;gBt=Math.pow(2,7),yBt=Math.pow(2,14),bBt=Math.pow(2,21),wBt=Math.pow(2,28),vBt=Math.pow(2,35),xBt=Math.pow(2,42),EBt=Math.pow(2,49),_Bt=Math.pow(2,56),CBt=Math.pow(2,63),SBt=function(t){return t<gBt?1:t<yBt?2:t<bBt?3:t<wBt?4:t<vBt?5:t<xBt?6:t<EBt?7:t<_Bt?8:t<CBt?9:10},ABt={encode:uBt,decode:hBt,encodingLength:SBt},XVe=ABt,SVe=(t,e,r=0)=>(XVe.encode(t,e,r),e),AVe=t=>XVe.encodingLength(t),Wce=(t,e)=>{let r=e.byteLength,n=AVe(t),i=n+AVe(r),s=new Uint8Array(i+r);return SVe(t,s,0),SVe(r,s,n),s.set(e,i),new Gce(t,r,e,s)},Gce=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}},eWe=({name:t,code:e,encode:r})=>new Kce(t,e,r),Kce=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?Wce(this.code,r):r.then(n=>Wce(this.code,n))}else throw Error(\\\"Unknown type, must be binary type\\\")}},tWe=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),TBt=eWe({name:\\\"sha2-256\\\",code:18,encode:tWe(\\\"SHA-256\\\")}),IBt=eWe({name:\\\"sha2-512\\\",code:19,encode:tWe(\\\"SHA-512\\\")}),RBt=Object.freeze({__proto__:null,sha256:TBt,sha512:IBt}),rWe=0,PBt=\\\"identity\\\",nWe=ZVe,OBt=t=>Wce(rWe,nWe(t)),NBt={code:rWe,name:PBt,encode:nWe,digest:OBt},kBt=Object.freeze({__proto__:null,identity:NBt});new TextEncoder,new TextDecoder;TVe={...Tkt,...Rkt,...Okt,...kkt,...Dkt,...Wkt,...Zkt,...Ykt,...nBt,...lBt};({...RBt,...kBt});IVe=iWe(\\\"utf8\\\",\\\"u\\\",t=>\\\"u\\\"+new TextDecoder(\\\"utf8\\\").decode(t),t=>new TextEncoder().encode(t.substring(1))),Dce=iWe(\\\"ascii\\\",\\\"a\\\",t=>{let e=\\\"a\\\";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=BBt(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),MBt={utf8:IVe,\\\"utf-8\\\":IVe,hex:TVe.base16,latin1:Dce,ascii:Dce,binary:Dce,...TVe};LBt=Object.defineProperty,UBt=(t,e,r)=>e in t?LBt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ah=(t,e,r)=>UBt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Zce=class{constructor(e,r){this.core=e,this.logger=r,ah(this,\\\"keychain\\\",new Map),ah(this,\\\"name\\\",$Nt),ah(this,\\\"version\\\",VNt),ah(this,\\\"initialized\\\",!1),ah(this,\\\"storagePrefix\\\",lh),ah(this,\\\"init\\\",async()=>{if(!this.initialized){let n=await this.getKeyChain();typeof n<\\\"u\\\"&&(this.keychain=n),this.initialized=!0}}),ah(this,\\\"has\\\",n=>(this.isInitialized(),this.keychain.has(n))),ah(this,\\\"set\\\",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),ah(this,\\\"get\\\",n=>{this.isInitialized();let i=this.keychain.get(n);if(typeof i>\\\"u\\\"){let{message:s}=Ce(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${n}`);throw new Error(s)}return i}),ah(this,\\\"del\\\",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,z9(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<\\\"u\\\"?$9(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},FBt=Object.defineProperty,jBt=(t,e,r)=>e in t?FBt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qo=(t,e,r)=>jBt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Qce=class{constructor(e,r,n){this.core=e,this.logger=r,Qo(this,\\\"name\\\",qNt),Qo(this,\\\"keychain\\\"),Qo(this,\\\"randomSessionIdentifier\\\",Q9()),Qo(this,\\\"initialized\\\",!1),Qo(this,\\\"init\\\",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Qo(this,\\\"hasKeys\\\",i=>(this.isInitialized(),this.keychain.has(i))),Qo(this,\\\"getClientId\\\",async()=>{this.isInitialized();let i=await this.getClientSeed(),s=vC(i);return T9(s.publicKey)}),Qo(this,\\\"generateKeyPair\\\",()=>{this.isInitialized();let i=Mae();return this.setPrivateKey(i.publicKey,i.privateKey)}),Qo(this,\\\"signJWT\\\",async i=>{this.isInitialized();let s=await this.getClientSeed(),o=vC(s),a=this.randomSessionIdentifier;return await OH(a,i,zNt,o)}),Qo(this,\\\"generateSharedKey\\\",(i,s,o)=>{this.isInitialized();let a=this.getPrivateKey(i),c=Dae(a,s);return this.setSymKey(c,o)}),Qo(this,\\\"setSymKey\\\",async(i,s)=>{this.isInitialized();let o=s||C2(i);return await this.keychain.set(o,i),o}),Qo(this,\\\"deleteKeyPair\\\",async i=>{this.isInitialized(),await this.keychain.del(i)}),Qo(this,\\\"deleteSymKey\\\",async i=>{this.isInitialized(),await this.keychain.del(i)}),Qo(this,\\\"encode\\\",async(i,s,o)=>{this.isInitialized();let a=lq(o),c=Vo(s);if(dq(a))return jae(c,o?.encoding);if(uq(a)){let p=a.senderPublicKey,h=a.receiverPublicKey;i=await this.generateSharedKey(p,h)}let l=this.getSymKey(i),{type:d,senderPublicKey:f}=a;return Uae({type:d,symKey:l,message:c,senderPublicKey:f,encoding:o?.encoding})}),Qo(this,\\\"decode\\\",async(i,s,o)=>{this.isInitialized();let a=zae(s,o);if(dq(a)){let c=Hae(s,o?.encoding);return nc(c)}if(uq(a)){let c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{let c=this.getSymKey(i),l=Fae({symKey:c,encoded:s,encoding:o?.encoding});return nc(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),Qo(this,\\\"getPayloadType\\\",(i,s=Vc)=>{let o=S2({encoded:i,encoding:s});return w0(o.type)}),Qo(this,\\\"getPayloadSenderPublicKey\\\",(i,s=Vc)=>{let o=S2({encoded:i,encoding:s});return o.senderPublicKey?yr(o.senderPublicKey,Ko):void 0}),this.core=e,this.logger=rr(r,this.name),this.keychain=n||new Zce(this.core,this.logger)}get context(){return Ir(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\\\"\\\";try{e=this.keychain.get(vVe)}catch{e=Q9(),await this.keychain.set(vVe,e)}return DBt(e,\\\"base16\\\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},HBt=Object.defineProperty,qBt=Object.defineProperties,zBt=Object.getOwnPropertyDescriptors,RVe=Object.getOwnPropertySymbols,$Bt=Object.prototype.hasOwnProperty,VBt=Object.prototype.propertyIsEnumerable,Jce=(t,e,r)=>e in t?HBt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,WBt=(t,e)=>{for(var r in e||(e={}))$Bt.call(e,r)&&Jce(t,r,e[r]);if(RVe)for(var r of RVe(e))VBt.call(e,r)&&Jce(t,r,e[r]);return t},GBt=(t,e)=>qBt(t,zBt(e)),jl=(t,e,r)=>Jce(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Yce=class extends Oq{constructor(e,r){super(e,r),this.logger=e,this.core=r,jl(this,\\\"messages\\\",new Map),jl(this,\\\"messagesWithoutClientAck\\\",new Map),jl(this,\\\"name\\\",WNt),jl(this,\\\"version\\\",GNt),jl(this,\\\"initialized\\\",!1),jl(this,\\\"storagePrefix\\\",lh),jl(this,\\\"init\\\",async()=>{if(!this.initialized){this.logger.trace(\\\"Initialized\\\");try{let n=await this.getRelayerMessages();typeof n<\\\"u\\\"&&(this.messages=n);let i=await this.getRelayerMessagesWithoutClientAck();typeof i<\\\"u\\\"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),jl(this,\\\"set\\\",async(n,i,s)=>{this.isInitialized();let o=Dl(i),a=this.messages.get(n);if(typeof a>\\\"u\\\"&&(a={}),typeof a[o]<\\\"u\\\")return o;if(a[o]=i,this.messages.set(n,a),s===tz.inbound){let c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,GBt(WBt({},c),{[o]:i}))}return await this.persist(),o}),jl(this,\\\"get\\\",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>\\\"u\\\"&&(i={}),i}),jl(this,\\\"getWithoutAck\\\",n=>{this.isInitialized();let i={};for(let s of n){let o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),jl(this,\\\"has\\\",(n,i)=>{this.isInitialized();let s=this.get(n),o=Dl(i);return typeof s[o]<\\\"u\\\"}),jl(this,\\\"ack\\\",async(n,i)=>{this.isInitialized();let s=this.messagesWithoutClientAck.get(n);if(typeof s>\\\"u\\\")return;let o=Dl(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,s),await this.persist()}),jl(this,\\\"del\\\",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=rr(e,this.name),this.core=r}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name+\\\"_withoutClientAck\\\"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,z9(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,z9(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<\\\"u\\\"?$9(e):void 0}async getRelayerMessagesWithoutClientAck(){let e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<\\\"u\\\"?$9(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},KBt=Object.defineProperty,ZBt=Object.defineProperties,QBt=Object.getOwnPropertyDescriptors,PVe=Object.getOwnPropertySymbols,JBt=Object.prototype.hasOwnProperty,YBt=Object.prototype.propertyIsEnumerable,Xce=(t,e,r)=>e in t?KBt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ez=(t,e)=>{for(var r in e||(e={}))JBt.call(e,r)&&Xce(t,r,e[r]);if(PVe)for(var r of PVe(e))YBt.call(e,r)&&Xce(t,r,e[r]);return t},Lce=(t,e)=>ZBt(t,QBt(e)),wf=(t,e,r)=>Xce(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ele=class extends Nq{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,wf(this,\\\"events\\\",new E0.EventEmitter),wf(this,\\\"name\\\",KNt),wf(this,\\\"queue\\\",new Map),wf(this,\\\"publishTimeout\\\",(0,Ye.toMiliseconds)(Ye.ONE_MINUTE)),wf(this,\\\"initialPublishTimeout\\\",(0,Ye.toMiliseconds)(Ye.ONE_SECOND*15)),wf(this,\\\"needsTransportRestart\\\",!1),wf(this,\\\"publish\\\",async(n,i,s)=>{var o;this.logger.debug(\\\"Publishing Payload\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"publish\\\",params:{topic:n,message:i,opts:s}});let a=s?.ttl||xVe,c=qC(s),l=s?.prompt||!1,d=s?.tag||0,f=s?.id||Vs().toString(),p={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:d,id:f,attestation:s?.attestation,tvf:s?.tvf}},h=`Failed to publish payload, please try again. id:${f} tag:${d}`;try{let m=new Promise(async g=>{let w=({id:b})=>{p.opts.id===b&&(this.removeRequestFromQueue(b),this.relayer.events.removeListener(Gs.publish,w),g(p))};this.relayer.events.on(Gs.publish,w);let v=rh(new Promise((b,_)=>{this.rpcPublish({topic:n,message:i,ttl:a,prompt:l,tag:d,id:f,attestation:s?.attestation,tvf:s?.tvf}).then(b).catch(S=>{this.logger.warn(S,S?.message),_(S)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${f} tag:${d}`);try{await v,this.events.removeListener(Gs.publish,w)}catch(b){this.queue.set(f,Lce(ez({},p),{attempt:1})),this.logger.warn(b,b?.message)}});this.logger.trace({type:\\\"method\\\",method:\\\"publish\\\",params:{id:f,topic:n,message:i,opts:s}}),await rh(m,this.publishTimeout,h)}catch(m){if(this.logger.debug(\\\"Failed to Publish Payload\\\"),this.logger.error(m),(o=s?.internal)!=null&&o.throwOnFailedPublish)throw m}finally{this.queue.delete(f)}}),wf(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),wf(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),wf(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),wf(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=rr(r,this.name),this.registerEventListeners()}get context(){return Ir(this.logger)}async rpcPublish(e){var r,n,i,s;let{topic:o,message:a,ttl:c=xVe,prompt:l,tag:d,id:f,attestation:p,tvf:h}=e,m={method:A2(qC().protocol).publish,params:ez({topic:o,message:a,ttl:c,prompt:l,tag:d,attestation:p},h),id:f};Os((r=m.params)==null?void 0:r.prompt)&&((n=m.params)==null||delete n.prompt),Os((i=m.params)==null?void 0:i.tag)&&((s=m.params)==null||delete s.tag),this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"message\\\",direction:\\\"outgoing\\\",request:m});let g=await this.relayer.request(m);return this.relayer.events.emit(Gs.publish,e),this.logger.debug(\\\"Successfully Published Payload\\\"),g}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,r)=>{let n=e.attempt+1;this.queue.set(r,Lce(ez({},e),{attempt:n}));let{topic:i,message:s,opts:o,attestation:a}=e;this.logger.warn({},`Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${n}`),await this.rpcPublish(Lce(ez({},e),{topic:i,message:s,ttl:o.ttl,prompt:o.prompt,tag:o.tag,id:o.id,attestation:a,tvf:o.tvf})),this.logger.warn({},`Publisher: queue->published: ${e.opts.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(sc.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Gs.connection_stalled);return}this.checkQueue()}),this.relayer.on(Gs.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},XBt=Object.defineProperty,eMt=(t,e,r)=>e in t?XBt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,JC=(t,e,r)=>eMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),tle=class{constructor(){JC(this,\\\"map\\\",new Map),JC(this,\\\"set\\\",(e,r)=>{let n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])}),JC(this,\\\"get\\\",e=>this.map.get(e)||[]),JC(this,\\\"exists\\\",(e,r)=>this.get(e).includes(r)),JC(this,\\\"delete\\\",(e,r)=>{if(typeof r>\\\"u\\\"){this.map.delete(e);return}if(!this.map.has(e))return;let n=this.get(e);if(!this.exists(e,r))return;let i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),JC(this,\\\"clear\\\",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}},tMt=Object.defineProperty,rMt=Object.defineProperties,nMt=Object.getOwnPropertyDescriptors,OVe=Object.getOwnPropertySymbols,iMt=Object.prototype.hasOwnProperty,sMt=Object.prototype.propertyIsEnumerable,rle=(t,e,r)=>e in t?tMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,d7=(t,e)=>{for(var r in e||(e={}))iMt.call(e,r)&&rle(t,r,e[r]);if(OVe)for(var r of OVe(e))sMt.call(e,r)&&rle(t,r,e[r]);return t},Uce=(t,e)=>rMt(t,nMt(e)),hn=(t,e,r)=>rle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),nle=class extends Mq{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,hn(this,\\\"subscriptions\\\",new Map),hn(this,\\\"topicMap\\\",new tle),hn(this,\\\"events\\\",new E0.EventEmitter),hn(this,\\\"name\\\",tkt),hn(this,\\\"version\\\",rkt),hn(this,\\\"pending\\\",new Map),hn(this,\\\"cached\\\",[]),hn(this,\\\"initialized\\\",!1),hn(this,\\\"storagePrefix\\\",lh),hn(this,\\\"subscribeTimeout\\\",(0,Ye.toMiliseconds)(Ye.ONE_MINUTE)),hn(this,\\\"initialSubscribeTimeout\\\",(0,Ye.toMiliseconds)(Ye.ONE_SECOND*15)),hn(this,\\\"clientId\\\"),hn(this,\\\"batchSubscribeTopicsLimit\\\",500),hn(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),hn(this,\\\"subscribe\\\",async(n,i)=>{this.isInitialized(),this.logger.debug(\\\"Subscribing Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"subscribe\\\",params:{topic:n,opts:i}});try{let s=qC(i),o={topic:n,relay:s,transportType:i?.transportType};this.pending.set(n,o);let a=await this.rpcSubscribe(n,s,i);return typeof a==\\\"string\\\"&&(this.onSubscribe(a,o),this.logger.debug(\\\"Successfully Subscribed Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"subscribe\\\",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug(\\\"Failed to Subscribe Topic\\\"),this.logger.error(s),s}}),hn(this,\\\"unsubscribe\\\",async(n,i)=>{this.isInitialized(),typeof i?.id<\\\"u\\\"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),hn(this,\\\"isSubscribed\\\",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),hn(this,\\\"isKnownTopic\\\",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(s=>s.topic===n))})),hn(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),hn(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),hn(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),hn(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),hn(this,\\\"start\\\",async()=>{await this.onConnect()}),hn(this,\\\"stop\\\",async()=>{await this.onDisconnect()}),hn(this,\\\"restart\\\",async()=>{await this.restore(),await this.onRestart()}),hn(this,\\\"checkPending\\\",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;let n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),hn(this,\\\"registerEventListeners\\\",()=>{this.relayer.core.heartbeat.on(sc.pulse,async()=>{await this.checkPending()}),this.events.on(Hl.created,async n=>{let i=Hl.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:\\\"event\\\",event:i,data:n}),await this.persist()}),this.events.on(Hl.deleted,async n=>{let i=Hl.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:\\\"event\\\",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=rr(r,this.name),this.clientId=\\\"\\\"}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){let n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug(\\\"Unsubscribing Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"unsubscribe\\\",params:{topic:e,id:r,opts:n}});try{let i=qC(n);await this.restartToComplete({topic:e,id:r,relay:i}),await this.rpcUnsubscribe(e,r,i);let s=Kr(\\\"USER_DISCONNECTED\\\",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,s),this.logger.debug(\\\"Successfully Unsubscribed Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"unsubscribe\\\",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug(\\\"Failed to Unsubscribe Topic\\\"),this.logger.error(i),i}}async rpcSubscribe(e,r,n){var i;(!n||n?.transportType===kn.relay)&&await this.restartToComplete({topic:e,id:e,relay:r});let s={method:A2(r.protocol).subscribe,params:{topic:e}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:s});let o=(i=n?.internal)==null?void 0:i.throwOnFailedPublish;try{let a=await this.getSubscriptionId(e);if(n?.transportType===kn.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(d=>this.logger.warn(d))},(0,Ye.toMiliseconds)(Ye.ONE_SECOND)),a;let c=new Promise(async d=>{let f=p=>{p.topic===e&&(this.events.removeListener(Hl.created,f),d(p.id))};this.events.on(Hl.created,f);try{let p=await rh(new Promise((h,m)=>{this.relayer.request(s).catch(g=>{this.logger.warn(g,g?.message),m(g)}).then(h)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(Hl.created,f),d(p)}catch{}}),l=await rh(c,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&o)throw new Error(`Subscribing to ${e} failed, please try again`);return l?a:null}catch(a){if(this.logger.debug(\\\"Outgoing Relay Subscribe Payload stalled\\\"),this.relayer.events.emit(Gs.connection_stalled),o)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;let r=e[0].relay,n={method:A2(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:n});try{await await rh(new Promise(i=>{this.relayer.request(n).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,\\\"rpcBatchSubscribe failed, please try again\\\")}catch{this.relayer.events.emit(Gs.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;let r=e[0].relay,n={method:A2(r.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:n});let i;try{i=await await rh(new Promise((s,o)=>{this.relayer.request(n).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,\\\"rpcBatchFetchMessages failed, please try again\\\")}catch{this.relayer.events.emit(Gs.connection_stalled)}return i}rpcUnsubscribe(e,r,n){let i={method:A2(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,Uce(d7({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,d7({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.logger.debug(\\\"Setting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"setSubscription\\\",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,d7({},r)),this.topicMap.set(r.topic,e),this.events.emit(Hl.created,r)}getSubscription(e){this.logger.debug(\\\"Getting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"getSubscription\\\",id:e});let r=this.subscriptions.get(e);if(!r){let{message:n}=Ce(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug(\\\"Deleting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"deleteSubscription\\\",id:e,reason:r});let n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Hl.deleted,Uce(d7({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Hl.sync)}async onRestart(){if(this.cached.length){let e=[...this.cached],r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<r;n++){let i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Hl.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>\\\"u\\\"||!e.length)return;if(this.subscriptions.size){let{message:r}=Ce(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async r=>Uce(d7({},r),{id:await this.getSubscriptionId(r.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);let r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await vae((0,Ye.toMiliseconds)(Ye.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return Dl(e+await this.getClientId())}},oMt=Object.defineProperty,NVe=Object.getOwnPropertySymbols,aMt=Object.prototype.hasOwnProperty,cMt=Object.prototype.propertyIsEnumerable,ile=(t,e,r)=>e in t?oMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,kVe=(t,e)=>{for(var r in e||(e={}))aMt.call(e,r)&&ile(t,r,e[r]);if(NVe)for(var r of NVe(e))cMt.call(e,r)&&ile(t,r,e[r]);return t},Rr=(t,e,r)=>ile(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),sle=class extends kq{constructor(e){super(e),Rr(this,\\\"protocol\\\",\\\"wc\\\"),Rr(this,\\\"version\\\",2),Rr(this,\\\"core\\\"),Rr(this,\\\"logger\\\"),Rr(this,\\\"events\\\",new E0.EventEmitter),Rr(this,\\\"provider\\\"),Rr(this,\\\"messages\\\"),Rr(this,\\\"subscriber\\\"),Rr(this,\\\"publisher\\\"),Rr(this,\\\"name\\\",QNt),Rr(this,\\\"transportExplicitlyClosed\\\",!1),Rr(this,\\\"initialized\\\",!1),Rr(this,\\\"connectionAttemptInProgress\\\",!1),Rr(this,\\\"relayUrl\\\"),Rr(this,\\\"projectId\\\"),Rr(this,\\\"packageName\\\"),Rr(this,\\\"bundleId\\\"),Rr(this,\\\"hasExperiencedNetworkDisruption\\\",!1),Rr(this,\\\"pingTimeout\\\"),Rr(this,\\\"heartBeatTimeout\\\",(0,Ye.toMiliseconds)(Ye.THIRTY_SECONDS+Ye.FIVE_SECONDS)),Rr(this,\\\"reconnectTimeout\\\"),Rr(this,\\\"connectPromise\\\"),Rr(this,\\\"reconnectInProgress\\\",!1),Rr(this,\\\"requestsInFlight\\\",[]),Rr(this,\\\"connectTimeout\\\",(0,Ye.toMiliseconds)(Ye.ONE_SECOND*15)),Rr(this,\\\"request\\\",async r=>{var n,i;this.logger.debug(\\\"Publishing Request Payload\\\");let s=r.id||Vs().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:r.method,topic:(n=r.params)==null?void 0:n.topic},\\\"relayer.request - publishing...\\\");let o=`${s}:${((i=r.params)==null?void 0:i.tag)||\\\"\\\"}`;this.requestsInFlight.push(o);let a=await this.provider.request(r);return this.requestsInFlight=this.requestsInFlight.filter(c=>c!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),Rr(this,\\\"resetPingTimeout\\\",()=>{DC()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var r,n,i,s;try{this.logger.debug({},\\\"pingTimeout: Connection stalled, terminating...\\\"),(s=(i=(n=(r=this.provider)==null?void 0:r.connection)==null?void 0:n.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o?.message)}},this.heartBeatTimeout))}),Rr(this,\\\"onPayloadHandler\\\",r=>{this.onProviderPayload(r),this.resetPingTimeout()}),Rr(this,\\\"onConnectHandler\\\",()=>{this.logger.warn({},\\\"Relayer connected \\\\u{1F6DC}\\\"),this.startPingTimeout(),this.events.emit(Gs.connect)}),Rr(this,\\\"onDisconnectHandler\\\",()=>{this.logger.warn({},\\\"Relayer disconnected \\\\u{1F6D1}\\\"),this.requestsInFlight=[],this.onProviderDisconnect()}),Rr(this,\\\"onProviderErrorHandler\\\",r=>{this.logger.fatal(`Fatal socket error: ${r.message}`),this.events.emit(Gs.error,r),this.logger.fatal(\\\"Fatal socket error received, closing transport\\\"),this.transportClose()}),Rr(this,\\\"registerProviderListeners\\\",()=>{this.provider.on(id.payload,this.onPayloadHandler),this.provider.on(id.connect,this.onConnectHandler),this.provider.on(id.disconnect,this.onDisconnectHandler),this.provider.on(id.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=typeof e.logger<\\\"u\\\"&&typeof e.logger!=\\\"string\\\"?rr(e.logger,this.name):(0,sh.default)(Ll({level:e.logger||ZNt})),this.messages=new Yce(this.logger,e.core),this.subscriber=new nle(this,this.logger),this.publisher=new ele(this,this.logger),this.relayUrl=e?.relayUrl||GVe,this.projectId=e.projectId,uae()?this.packageName=GH():dae()&&(this.bundleId=GH()),this.provider={}}async init(){if(this.logger.trace(\\\"Initialized\\\"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.hasAnyTopics)try{await this.transportOpen()}catch(e){this.logger.warn(e,e?.message)}}get context(){return Ir(this.logger)}get connected(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now(),transportType:kn.relay},tz.outbound)}async subscribe(e,r){var n,i,s;this.isInitialized(),(!(r!=null&&r.transportType)||r?.transportType===\\\"relay\\\")&&await this.toEstablishConnection();let o=typeof((n=r?.internal)==null?void 0:n.throwOnFailedPublish)>\\\"u\\\"?!0:(i=r?.internal)==null?void 0:i.throwOnFailedPublish,a=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||\\\"\\\",c,l=d=>{d.topic===e&&(this.subscriber.off(Hl.created,l),c())};return await Promise.all([new Promise(d=>{c=d,this.subscriber.on(Hl.created,l)}),new Promise(async(d,f)=>{a=await this.subscriber.subscribe(e,kVe({internal:{throwOnFailedPublish:o}},r)).catch(p=>{o&&f(p)})||a,d()})]),a}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await rh(this.provider.disconnect(),2e3,\\\"provider.disconnect()\\\").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.warn(\\\"Starting WS connection skipped because the client has no topics to work with.\\\");return}if(this.connectPromise?(this.logger.debug({},\\\"Waiting for existing connection attempt to resolve...\\\"),await this.connectPromise,this.logger.debug({},\\\"Existing connection attempt resolved\\\")):(this.connectPromise=new Promise(async(r,n)=>{await this.connect(e).then(r).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},\\\"Restarting transport...\\\"),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await bq())throw new Error(\\\"No internet connection detected. Please restart your network and try again.\\\")}async handleBatchMessageEvents(e){if(e?.length===0){this.logger.trace(\\\"Batch message events is empty. Ignoring...\\\");return}let r=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${r.length} message events sorted`);for(let n of r)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,\\\"Error while processing batch message event: \\\"+i?.message)}this.logger.trace(`Batch of ${r.length} message events processed`)}async onLinkMessageEvent(e,r){let{topic:n}=e;if(!r.sessionExists){let i=rs(Ye.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:\\\"irn\\\"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Gs.message,e),await this.recordMessageEvent(e,tz.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let r=1;for(;r<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${r}...`),await this.createProvider(),await new Promise(async(n,i)=>{let s=()=>{i(new Error(\\\"Connection interrupted while trying to subscribe\\\"))};this.provider.once(id.disconnect,s),await rh(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(id.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{let c=()=>{a(new Error(\\\"Connection interrupted while trying to subscribe\\\"))};this.provider.once(id.disconnect,c),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(id.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();let i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${r}`);break}await new Promise(n=>setTimeout(n,(0,Ye.toMiliseconds)(r*1))),r++}}startPingTimeout(){var e,r,n,i,s;if(DC())try{(r=(e=this.provider)==null?void 0:e.connection)!=null&&r.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.on(\\\"ping\\\",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o?.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new O2(new QC(pae({sdkVersion:jce,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,r){let{topic:n,message:i}=e;await this.messages.set(n,i,r)}async shouldIgnoreMessageEvent(e){let{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(r))return this.logger.warn(`Ignoring message for unknown topic ${r}`),!0;let i=this.messages.has(r,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug(\\\"Incoming Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"incoming\\\",payload:e}),yf(e)){if(!e.method.endsWith(JNt))return;let r=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=r.data,a={topic:n,message:i,publishedAt:s,transportType:kn.relay,attestation:o};this.logger.debug(\\\"Emitting Relayer Payload\\\"),this.logger.trace(kVe({type:\\\"event\\\",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else Fl(e)&&this.events.emit(Gs.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,tz.inbound),this.events.emit(Gs.message,e))}async acknowledgePayload(e){let r=gf(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(id.payload,this.onPayloadHandler),this.provider.off(id.connect,this.onConnectHandler),this.provider.off(id.disconnect,this.onDisconnectHandler),this.provider.off(id.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await bq();lce(async r=>{e!==r&&(e=r,r?await this.transportOpen().catch(n=>this.logger.error(n,n?.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(sc.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&uce())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(r){this.logger.warn(r,r?.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Gs.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e?.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},(0,Ye.toMiliseconds)(YNt)))))}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}};uMt=\\\"[object RegExp]\\\",dMt=\\\"[object String]\\\",fMt=\\\"[object Number]\\\",pMt=\\\"[object Boolean]\\\",LVe=\\\"[object Arguments]\\\",hMt=\\\"[object Symbol]\\\",mMt=\\\"[object Date]\\\",gMt=\\\"[object Map]\\\",yMt=\\\"[object Set]\\\",bMt=\\\"[object Array]\\\",wMt=\\\"[object Function]\\\",vMt=\\\"[object ArrayBuffer]\\\",Fce=\\\"[object Object]\\\",xMt=\\\"[object Error]\\\",EMt=\\\"[object DataView]\\\",_Mt=\\\"[object Uint8Array]\\\",CMt=\\\"[object Uint8ClampedArray]\\\",SMt=\\\"[object Uint16Array]\\\",AMt=\\\"[object Uint32Array]\\\",TMt=\\\"[object BigUint64Array]\\\",IMt=\\\"[object Int8Array]\\\",RMt=\\\"[object Int16Array]\\\",PMt=\\\"[object Int32Array]\\\",OMt=\\\"[object BigInt64Array]\\\",NMt=\\\"[object Float32Array]\\\",kMt=\\\"[object Float64Array]\\\";LMt=Object.defineProperty,UVe=Object.getOwnPropertySymbols,UMt=Object.prototype.hasOwnProperty,FMt=Object.prototype.propertyIsEnumerable,ole=(t,e,r)=>e in t?LMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FVe=(t,e)=>{for(var r in e||(e={}))UMt.call(e,r)&&ole(t,r,e[r]);if(UVe)for(var r of UVe(e))FMt.call(e,r)&&ole(t,r,e[r]);return t},Wc=(t,e,r)=>ole(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),uh=class extends Bq{constructor(e,r,n,i=lh,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,Wc(this,\\\"map\\\",new Map),Wc(this,\\\"version\\\",XNt),Wc(this,\\\"cached\\\",[]),Wc(this,\\\"initialized\\\",!1),Wc(this,\\\"getKey\\\"),Wc(this,\\\"storagePrefix\\\",lh),Wc(this,\\\"recentlyDeleted\\\",[]),Wc(this,\\\"recentlyDeletedLimit\\\",200),Wc(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!Os(o)?this.map.set(this.getKey(o),o):Zae(o)?this.map.set(o.id,o):Qae(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),Wc(this,\\\"set\\\",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug(\\\"Setting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"set\\\",key:o,value:a}),this.map.set(o,a),await this.persist())}),Wc(this,\\\"get\\\",o=>(this.isInitialized(),this.logger.debug(\\\"Getting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"get\\\",key:o}),this.getData(o))),Wc(this,\\\"getAll\\\",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>DMt(a[c],o[c]))):this.values)),Wc(this,\\\"update\\\",async(o,a)=>{this.isInitialized(),this.logger.debug(\\\"Updating value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"update\\\",key:o,update:a});let c=FVe(FVe({},this.getData(o)),a);this.map.set(o,c),await this.persist()}),Wc(this,\\\"delete\\\",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug(\\\"Deleting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"delete\\\",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=rr(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}let{message:n}=Ce(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>\\\"u\\\"||!e.length)return;if(this.map.size){let{message:r}=Ce(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},jMt=Object.defineProperty,HMt=(t,e,r)=>e in t?jMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,nr=(t,e,r)=>HMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ale=class{constructor(e,r){this.core=e,this.logger=r,nr(this,\\\"name\\\",nkt),nr(this,\\\"version\\\",ikt),nr(this,\\\"events\\\",new E0.default),nr(this,\\\"pairings\\\"),nr(this,\\\"initialized\\\",!1),nr(this,\\\"storagePrefix\\\",lh),nr(this,\\\"ignoredPayloadTypes\\\",[nd]),nr(this,\\\"registeredMethods\\\",[]),nr(this,\\\"init\\\",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\\\"Initialized\\\"))}),nr(this,\\\"register\\\",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),nr(this,\\\"create\\\",async n=>{this.isInitialized();let i=Q9(),s=await this.core.crypto.setSymKey(i),o=rs(Ye.FIVE_MINUTES),a={protocol:gle},c={topic:s,expiry:o,relay:a,active:!1,methods:n?.methods},l=pq({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n?.methods});return this.events.emit(I1.create,c),this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s,{transportType:n?.transportType}),{topic:s,uri:l}}),nr(this,\\\"pair\\\",async n=>{this.isInitialized();let i=this.core.eventClient.createEvent({properties:{topic:n?.uri,trace:[vf.pairing_started]}});this.isValidPair(n,i);let{topic:s,symKey:o,relay:a,expiryTimestamp:c,methods:l}=fq(n.uri);i.props.properties.topic=s,i.addTrace(vf.pairing_uri_validation_success),i.addTrace(vf.pairing_uri_not_expired);let d;if(this.pairings.keys.includes(s)){if(d=this.pairings.get(s),i.addTrace(vf.existing_pairing),d.active)throw i.setError(ch.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(vf.pairing_not_expired)}let f=c||rs(Ye.FIVE_MINUTES),p={topic:s,relay:a,expiry:f,active:!1,methods:l};this.core.expirer.set(s,f),await this.pairings.set(s,p),i.addTrace(vf.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(I1.create,p),i.addTrace(vf.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(vf.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(ch.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(h){throw i.setError(ch.subscribe_pairing_topic_failure),h}return i.addTrace(vf.subscribe_pairing_topic_success),p}),nr(this,\\\"activate\\\",async({topic:n})=>{this.isInitialized();let i=rs(Ye.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),nr(this,\\\"ping\\\",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn(\\\"ping() is deprecated and will be removed in the next major release.\\\");let{topic:i}=n;if(this.pairings.keys.includes(i)){let s=await this.sendRequest(i,\\\"wc_pairingPing\\\",{}),{done:o,resolve:a,reject:c}=th();this.events.once(br(\\\"pairing_ping\\\",s),({error:l})=>{l?c(l):a()}),await o()}}),nr(this,\\\"updateExpiry\\\",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),nr(this,\\\"updateMetadata\\\",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),nr(this,\\\"getPairings\\\",()=>(this.isInitialized(),this.pairings.values)),nr(this,\\\"disconnect\\\",async n=>{this.isInitialized(),await this.isValidDisconnect(n);let{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,\\\"wc_pairingDelete\\\",Kr(\\\"USER_DISCONNECTED\\\")),await this.deletePairing(i))}),nr(this,\\\"formatUriFromPairing\\\",n=>{this.isInitialized();let{topic:i,relay:s,expiry:o,methods:a}=n,c=this.core.crypto.keychain.get(i);return pq({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:s,expiryTimestamp:o,methods:a})}),nr(this,\\\"sendRequest\\\",async(n,i,s)=>{let o=Ws(i,s),a=await this.core.crypto.encode(n,o),c=u7[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),nr(this,\\\"sendResult\\\",async(n,i,s)=>{let o=gf(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=u7[c].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),nr(this,\\\"sendError\\\",async(n,i,s)=>{let o=Ul(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=u7[c]?u7[c].res:u7.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),nr(this,\\\"deletePairing\\\",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Kr(\\\"USER_DISCONNECTED\\\")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),nr(this,\\\"cleanup\\\",async()=>{let n=this.pairings.getAll().filter(i=>mf(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),nr(this,\\\"onRelayEventRequest\\\",async n=>{let{topic:i,payload:s}=n;switch(s.method){case\\\"wc_pairingPing\\\":return await this.onPairingPingRequest(i,s);case\\\"wc_pairingDelete\\\":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),nr(this,\\\"onRelayEventResponse\\\",async n=>{let{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;return o===\\\"wc_pairingPing\\\"?this.onPairingPingResponse(i,s):this.onUnknownRpcMethodResponse(o)}),nr(this,\\\"onPairingPingRequest\\\",async(n,i)=>{let{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(I1.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),nr(this,\\\"onPairingPingResponse\\\",(n,i)=>{let{id:s}=i;setTimeout(()=>{Ii(i)?this.events.emit(br(\\\"pairing_ping\\\",s),{}):nn(i)&&this.events.emit(br(\\\"pairing_ping\\\",s),{error:i.error})},500)}),nr(this,\\\"onPairingDeleteRequest\\\",async(n,i)=>{let{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(I1.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),nr(this,\\\"onUnknownRpcMethodRequest\\\",async(n,i)=>{let{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;let a=Kr(\\\"WC_METHOD_UNSUPPORTED\\\",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}}),nr(this,\\\"onUnknownRpcMethodResponse\\\",n=>{this.registeredMethods.includes(n)||this.logger.error(Kr(\\\"WC_METHOD_UNSUPPORTED\\\",n))}),nr(this,\\\"isValidPair\\\",(n,i)=>{var s;if(!Zo(n)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`pair() params: ${n}`);throw i.setError(ch.malformed_pairing_uri),new Error(a)}if(!Kae(n.uri)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`pair() uri: ${n.uri}`);throw i.setError(ch.malformed_pairing_uri),new Error(a)}let o=fq(n?.uri);if(!((s=o?.relay)!=null&&s.protocol)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",\\\"pair() uri#relay-protocol\\\");throw i.setError(ch.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",\\\"pair() uri#symKey\\\");throw i.setError(ch.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&(0,Ye.toMiliseconds)(o?.expiryTimestamp)<Date.now()){i.setError(ch.pairing_expired);let{message:a}=Ce(\\\"EXPIRED\\\",\\\"pair() URI has expired. Please try again with a new connection URI.\\\");throw new Error(a)}}),nr(this,\\\"isValidPing\\\",async n=>{if(!Zo(n)){let{message:s}=Ce(\\\"MISSING_OR_INVALID\\\",`ping() params: ${n}`);throw new Error(s)}let{topic:i}=n;await this.isValidPairingTopic(i)}),nr(this,\\\"isValidDisconnect\\\",async n=>{if(!Zo(n)){let{message:s}=Ce(\\\"MISSING_OR_INVALID\\\",`disconnect() params: ${n}`);throw new Error(s)}let{topic:i}=n;await this.isValidPairingTopic(i)}),nr(this,\\\"isValidPairingTopic\\\",async n=>{if(!Fi(n,!1)){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){let{message:i}=Ce(\\\"NO_MATCHING_KEY\\\",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(mf(this.pairings.get(n).expiry)){await this.deletePairing(n);let{message:i}=Ce(\\\"EXPIRED\\\",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=rr(r,this.name),this.pairings=new uh(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ir(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Gs.message,async e=>{let{topic:r,message:n,transportType:i}=e;if(this.pairings.keys.includes(r)&&i!==kn.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{let s=await this.core.crypto.decode(r,n);yf(s)?(this.core.history.set(r,s),await this.onRelayEventRequest({topic:r,payload:s})):Fl(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:r,payload:s}),this.core.history.delete(r,s.id)),await this.core.relayer.messages.ack(r,n)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(ql.expired,async e=>{let{topic:r}=V9(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(I1.expire,{topic:r}))})}},qMt=Object.defineProperty,zMt=(t,e,r)=>e in t?qMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Jo=(t,e,r)=>zMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),cle=class extends Pq{constructor(e,r){super(e,r),this.core=e,this.logger=r,Jo(this,\\\"records\\\",new Map),Jo(this,\\\"events\\\",new E0.EventEmitter),Jo(this,\\\"name\\\",skt),Jo(this,\\\"version\\\",okt),Jo(this,\\\"cached\\\",[]),Jo(this,\\\"initialized\\\",!1),Jo(this,\\\"storagePrefix\\\",lh),Jo(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Jo(this,\\\"set\\\",(n,i,s)=>{if(this.isInitialized(),this.logger.debug(\\\"Setting JSON-RPC request history record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"set\\\",topic:n,request:i,chainId:s}),this.records.has(i.id))return;let o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:rs(Ye.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(bf.created,o)}),Jo(this,\\\"resolve\\\",async n=>{if(this.isInitialized(),this.logger.debug(\\\"Updating JSON-RPC response history record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"update\\\",response:n}),!this.records.has(n.id))return;let i=await this.getRecord(n.id);typeof i.response>\\\"u\\\"&&(i.response=nn(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(bf.updated,i))}),Jo(this,\\\"get\\\",async(n,i)=>(this.isInitialized(),this.logger.debug(\\\"Getting record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"get\\\",topic:n,id:i}),await this.getRecord(i))),Jo(this,\\\"delete\\\",(n,i)=>{this.isInitialized(),this.logger.debug(\\\"Deleting record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"delete\\\",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<\\\"u\\\"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(bf.deleted,s)}}),this.persist()}),Jo(this,\\\"exists\\\",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),Jo(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),Jo(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),Jo(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),Jo(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(r=>{if(typeof r.response<\\\"u\\\")return;let n={topic:r.topic,request:Ws(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let r=this.records.get(e);if(!r){let{message:n}=Ce(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(bf.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>\\\"u\\\"||!e.length)return;if(this.records.size){let{message:r}=Ce(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(bf.created,e=>{let r=bf.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.events.on(bf.updated,e=>{let r=bf.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.events.on(bf.deleted,e=>{let r=bf.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.core.heartbeat.on(sc.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{(0,Ye.toMiliseconds)(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(bf.deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},$Mt=Object.defineProperty,VMt=(t,e,r)=>e in t?$Mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pa=(t,e,r)=>VMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),lle=class extends Dq{constructor(e,r){super(e,r),this.core=e,this.logger=r,Pa(this,\\\"expirations\\\",new Map),Pa(this,\\\"events\\\",new E0.EventEmitter),Pa(this,\\\"name\\\",akt),Pa(this,\\\"version\\\",ckt),Pa(this,\\\"cached\\\",[]),Pa(this,\\\"initialized\\\",!1),Pa(this,\\\"storagePrefix\\\",lh),Pa(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Pa(this,\\\"has\\\",n=>{try{let i=this.formatTarget(n);return typeof this.getExpiration(i)<\\\"u\\\"}catch{return!1}}),Pa(this,\\\"set\\\",(n,i)=>{this.isInitialized();let s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(ql.created,{target:s,expiration:o})}),Pa(this,\\\"get\\\",n=>{this.isInitialized();let i=this.formatTarget(n);return this.getExpiration(i)}),Pa(this,\\\"del\\\",n=>{if(this.isInitialized(),this.has(n)){let i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(ql.deleted,{target:i,expiration:s})}}),Pa(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),Pa(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),Pa(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),Pa(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\\\"string\\\")return mae(e);if(typeof e==\\\"number\\\")return gae(e);let{message:r}=Ce(\\\"UNKNOWN_TYPE\\\",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(ql.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>\\\"u\\\"||!e.length)return;if(this.expirations.size){let{message:r}=Ce(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let r=this.expirations.get(e);if(!r){let{message:n}=Ce(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return r}checkExpiry(e,r){let{expiry:n}=r;(0,Ye.toMiliseconds)(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(ql.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(sc.pulse,()=>this.checkExpirations()),this.events.on(ql.created,e=>{let r=ql.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()}),this.events.on(ql.expired,e=>{let r=ql.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()}),this.events.on(ql.deleted,e=>{let r=ql.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},WMt=Object.defineProperty,GMt=(t,e,r)=>e in t?WMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ns=(t,e,r)=>GMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ule=class extends Lq{constructor(e,r,n){super(e,r,n),this.core=e,this.logger=r,this.store=n,Ns(this,\\\"name\\\",lkt),Ns(this,\\\"abortController\\\"),Ns(this,\\\"isDevEnv\\\"),Ns(this,\\\"verifyUrlV3\\\",dkt),Ns(this,\\\"storagePrefix\\\",lh),Ns(this,\\\"version\\\",WVe),Ns(this,\\\"publicKey\\\"),Ns(this,\\\"fetchPromise\\\"),Ns(this,\\\"init\\\",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,Ye.toMiliseconds)((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug(\\\"verify v2 public key expired\\\"),await this.removePublicKey()))}),Ns(this,\\\"register\\\",async i=>{if(!E1()||this.isDevEnv)return;let s=window.location.origin,{id:o,decryptedId:a}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{let l=(0,$Ve.getDocument)(),d=this.startAbortTimer(Ye.ONE_SECOND*5),f=await new Promise((p,h)=>{let m=()=>{window.removeEventListener(\\\"message\\\",w),l.body.removeChild(g),h(\\\"attestation aborted\\\")};this.abortController.signal.addEventListener(\\\"abort\\\",m);let g=l.createElement(\\\"iframe\\\");g.src=c,g.style.display=\\\"none\\\",g.addEventListener(\\\"error\\\",m,{signal:this.abortController.signal});let w=v=>{if(v.data&&typeof v.data==\\\"string\\\")try{let b=JSON.parse(v.data);if(b.type===\\\"verify_attestation\\\"){if(Qp(b.attestation).payload.id!==o)return;clearInterval(d),l.body.removeChild(g),this.abortController.signal.removeEventListener(\\\"abort\\\",m),window.removeEventListener(\\\"message\\\",w),p(b.attestation===null?\\\"\\\":b.attestation)}}catch(b){this.logger.warn(b)}};l.body.appendChild(g),window.addEventListener(\\\"message\\\",w,{signal:this.abortController.signal})});return this.logger.debug(\\\"jwt attestation\\\",f),f}catch(l){this.logger.warn(l)}return\\\"\\\"}),Ns(this,\\\"resolve\\\",async i=>{if(this.isDevEnv)return\\\"\\\";let{attestationId:s,hash:o,encryptedId:a}=i;if(s===\\\"\\\"){this.logger.debug(\\\"resolve: attestationId is empty, skipping\\\");return}if(s){if(Qp(s).payload.id!==a)return;let l=await this.isValidJwtAttestation(s);if(l){if(!l.isVerified){this.logger.warn(\\\"resolve: jwt attestation: origin url not verified\\\");return}return l}}if(!o)return;let c=this.getVerifyUrl(i?.verifyUrl);return this.fetchAttestation(o,c)}),Ns(this,\\\"fetchAttestation\\\",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);let o=this.startAbortTimer(Ye.ONE_SECOND*5),a=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),Ns(this,\\\"getVerifyUrl\\\",i=>{let s=i||YC;return fkt.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${YC}`),s=YC),s}),Ns(this,\\\"fetchPublicKey\\\",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);let i=this.startAbortTimer(Ye.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),Ns(this,\\\"persistPublicKey\\\",async i=>{this.logger.debug(\\\"persisting public key to local storage\\\",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),Ns(this,\\\"removePublicKey\\\",async()=>{this.logger.debug(\\\"removing verify v2 public key from storage\\\"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),Ns(this,\\\"isValidJwtAttestation\\\",async i=>{let s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(a){this.logger.error(a),this.logger.warn(\\\"error validating attestation\\\")}let o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(a){this.logger.error(a),this.logger.warn(\\\"error validating attestation\\\")}}),Ns(this,\\\"getPublicKey\\\",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),Ns(this,\\\"fetchAndPersistPublicKey\\\",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{let o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});let i=await this.fetchPromise;return this.fetchPromise=void 0,i}),Ns(this,\\\"validateAttestation\\\",(i,s)=>{let o=$ae(i,s.publicKey),a={hasExpired:(0,Ye.toMiliseconds)(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn(\\\"resolve: jwt attestation expired\\\"),new Error(\\\"JWT attestation expired\\\");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=rr(r,this.name),this.abortController=new AbortController,this.isDevEnv=LC(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//verify:public:key\\\"}get context(){return Ir(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,Ye.toMiliseconds)(e))}},KMt=Object.defineProperty,ZMt=(t,e,r)=>e in t?KMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jVe=(t,e,r)=>ZMt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),dle=class extends Uq{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,jVe(this,\\\"context\\\",pkt),jVe(this,\\\"registerDeviceToken\\\",async n=>{let{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${hkt}/${this.projectId}/clients`;await fetch(c,{method:\\\"POST\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=rr(r,this.context)}},QMt=Object.defineProperty,HVe=Object.getOwnPropertySymbols,JMt=Object.prototype.hasOwnProperty,YMt=Object.prototype.propertyIsEnumerable,fle=(t,e,r)=>e in t?QMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,f7=(t,e)=>{for(var r in e||(e={}))JMt.call(e,r)&&fle(t,r,e[r]);if(HVe)for(var r of HVe(e))YMt.call(e,r)&&fle(t,r,e[r]);return t},vo=(t,e,r)=>fle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ple=class extends Fq{constructor(e,r,n=!0){super(e,r,n),this.core=e,this.logger=r,vo(this,\\\"context\\\",gkt),vo(this,\\\"storagePrefix\\\",lh),vo(this,\\\"storageVersion\\\",mkt),vo(this,\\\"events\\\",new Map),vo(this,\\\"shouldPersist\\\",!1),vo(this,\\\"init\\\",async()=>{if(!LC())try{let i={eventId:JH(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:\\\"INIT\\\",type:\\\"\\\",properties:{client_id:await this.core.crypto.getClientId(),user_agent:ZH(this.core.relayer.protocol,this.core.relayer.version,jce)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),vo(this,\\\"createEvent\\\",i=>{let{event:s=\\\"ERROR\\\",type:o=\\\"\\\",properties:{topic:a,trace:c}}=i,l=JH(),d=this.core.projectId||\\\"\\\",f=Date.now(),p=f7({eventId:l,timestamp:f,props:{event:s,type:o,properties:{topic:a,trace:c}},bundleId:d,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,p),this.shouldPersist=!0),p}),vo(this,\\\"getEvent\\\",i=>{let{eventId:s,topic:o}=i;if(s)return this.events.get(s);let a=Array.from(this.events.values()).find(c=>c.props.properties.topic===o);if(a)return f7(f7({},a),this.setMethods(a.eventId))}),vo(this,\\\"deleteEvent\\\",i=>{let{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),vo(this,\\\"setEventListeners\\\",()=>{this.core.heartbeat.on(sc.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{(0,Ye.fromMiliseconds)(Date.now())-(0,Ye.fromMiliseconds)(i.timestamp)>ykt&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),vo(this,\\\"setMethods\\\",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),vo(this,\\\"addTrace\\\",(i,s)=>{let o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),vo(this,\\\"setError\\\",(i,s)=>{let o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),vo(this,\\\"persist\\\",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),vo(this,\\\"restore\\\",async()=>{try{let i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,f7(f7({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),vo(this,\\\"submit\\\",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;let i=[];for(let[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(let s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),vo(this,\\\"sendEvent\\\",async i=>{let s=this.getAppDomain()?\\\"\\\":\\\"&sp=desktop\\\";return await fetch(`${bkt}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${jce}${s}`,{method:\\\"POST\\\",body:JSON.stringify(i)})}),vo(this,\\\"getAppDomain\\\",()=>KH().url),this.logger=rr(r,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+\\\"//\\\"+this.context}},XMt=Object.defineProperty,qVe=Object.getOwnPropertySymbols,eDt=Object.prototype.hasOwnProperty,tDt=Object.prototype.propertyIsEnumerable,hle=(t,e,r)=>e in t?XMt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zVe=(t,e)=>{for(var r in e||(e={}))eDt.call(e,r)&&hle(t,r,e[r]);if(qVe)for(var r of qVe(e))tDt.call(e,r)&&hle(t,r,e[r]);return t},Nn=(t,e,r)=>hle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),mle=class t extends Rq{constructor(e){var r;super(e),Nn(this,\\\"protocol\\\",VVe),Nn(this,\\\"version\\\",WVe),Nn(this,\\\"name\\\",rz),Nn(this,\\\"relayUrl\\\"),Nn(this,\\\"projectId\\\"),Nn(this,\\\"customStoragePrefix\\\"),Nn(this,\\\"events\\\",new E0.EventEmitter),Nn(this,\\\"logger\\\"),Nn(this,\\\"heartbeat\\\"),Nn(this,\\\"relayer\\\"),Nn(this,\\\"crypto\\\"),Nn(this,\\\"storage\\\"),Nn(this,\\\"history\\\"),Nn(this,\\\"expirer\\\"),Nn(this,\\\"pairing\\\"),Nn(this,\\\"verify\\\"),Nn(this,\\\"echoClient\\\"),Nn(this,\\\"linkModeSupportedApps\\\"),Nn(this,\\\"eventClient\\\"),Nn(this,\\\"initialized\\\",!1),Nn(this,\\\"logChunkController\\\"),Nn(this,\\\"on\\\",(a,c)=>this.events.on(a,c)),Nn(this,\\\"once\\\",(a,c)=>this.events.once(a,c)),Nn(this,\\\"off\\\",(a,c)=>this.events.off(a,c)),Nn(this,\\\"removeListener\\\",(a,c)=>this.events.removeListener(a,c)),Nn(this,\\\"dispatchEnvelope\\\",({topic:a,message:c,sessionExists:l})=>{if(!a||!c)return;let d={topic:a,message:c,publishedAt:Date.now(),transportType:kn.link_mode};this.relayer.onLinkMessageEvent(d,{sessionExists:l})});let n=this.getGlobalCore(e?.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(a){console.warn(\\\"Failed to copy global core\\\",a)}this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||GVe,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\\\"\\\";let i=Ll({level:typeof e?.logger==\\\"string\\\"&&e.logger?e.logger:jNt.logger,name:rz}),{logger:s,chunkLoggerController:o}=P2({opts:i,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=o,(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,c;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=rr(s,this.name),this.heartbeat=new VC,this.crypto=new Qce(this,this.logger,e?.keychain),this.history=new cle(this,this.logger),this.expirer=new lle(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new WC(zVe(zVe({},HNt),e?.storageOptions)),this.relayer=new sle({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new ale(this,this.logger),this.verify=new ule(this,this.logger,this.storage),this.echoClient=new dle(this.projectId||\\\"\\\",this.logger),this.linkModeSupportedApps=[],this.eventClient=new ple(this,this.logger,e?.telemetryEnabled),this.setGlobalCore(this)}static async init(e){let r=new t(e);await r.initialize();let n=await r.crypto.getClientId();return await r.storage.setItem(ekt,n),r}get context(){return Ir(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(EVe,this.linkModeSupportedApps))}async initialize(){this.logger.trace(\\\"Initialized\\\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(EVe)||[],this.initialized=!0,this.logger.info(\\\"Core Initialization Success\\\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}getGlobalCore(e=\\\"\\\"){try{if(this.isGlobalCoreDisabled())return;let r=`_walletConnectCore_${e}`,n=`${r}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[r]}catch(r){console.warn(\\\"Failed to get global WalletConnect core\\\",r);return}}setGlobalCore(e){var r;try{if(this.isGlobalCoreDisabled())return;let n=`_walletConnectCore_${((r=e.opts)==null?void 0:r.customStoragePrefix)||\\\"\\\"}`;globalThis[n]=e}catch(n){console.warn(\\\"Failed to set global WalletConnect core\\\",n)}}isGlobalCoreDisabled(){try{return typeof process<\\\"u\\\"&&process.env.DISABLE_GLOBAL_CORE===\\\"true\\\"}catch{return!0}}},sWe=mle});var bWe={};ue(bWe,{AUTH_CONTEXT:()=>hWe,AUTH_KEYS_CONTEXT:()=>mWe,AUTH_PAIRING_TOPIC_CONTEXT:()=>gWe,AUTH_PROTOCOL:()=>pWe,AUTH_PUBLIC_KEY_NAME:()=>g7,AUTH_REQUEST_CONTEXT:()=>yWe,AUTH_STORAGE_PREFIX:()=>y7,AUTH_VERSION:()=>cDt,ENGINE_CONTEXT:()=>uWe,ENGINE_QUEUE_STATES:()=>xf,ENGINE_RPC_OPTS:()=>Ks,HISTORY_CONTEXT:()=>sDt,HISTORY_EVENTS:()=>iDt,HISTORY_STORAGE_VERSION:()=>oDt,METHODS_TO_VERIFY:()=>fWe,PROPOSAL_CONTEXT:()=>cWe,PROPOSAL_EXPIRY:()=>aDt,PROPOSAL_EXPIRY_MESSAGE:()=>wle,REQUEST_CONTEXT:()=>dWe,SESSION_CONTEXT:()=>lWe,SESSION_EXPIRY:()=>N2,SESSION_REQUEST_EXPIRY_BOUNDARIES:()=>sz,SIGN_CLIENT_CONTEXT:()=>Ole,SIGN_CLIENT_DEFAULT:()=>iz,SIGN_CLIENT_EVENTS:()=>rDt,SIGN_CLIENT_PROTOCOL:()=>Rle,SIGN_CLIENT_STORAGE_OPTIONS:()=>nDt,SIGN_CLIENT_STORAGE_PREFIX:()=>lz,SIGN_CLIENT_VERSION:()=>Ple,SessionStore:()=>bDt,SignClient:()=>wDt,TVF_METHODS:()=>vle,WALLETCONNECT_DEEPLINK_CHOICE:()=>ble,default:()=>az});var jt,cz,Rle,Ple,Ole,lz,iz,rDt,nDt,ble,iDt,sDt,oDt,cWe,aDt,wle,lWe,N2,uWe,Ks,sz,xf,vle,dWe,fWe,pWe,cDt,hWe,mWe,gWe,yWe,y7,g7,lDt,uDt,dDt,aWe,fDt,pDt,xle,mn,ac,ge,Ele,_le,oz,Cle,Sle,Ale,Tle,hDt,mDt,yle,Ile,gDt,yDt,ir,az,bDt,wDt,wWe=x(()=>{u();oWe();C1();Ace();jt=Me(u0());Y9();cz=Me(ho());oh();Rle=\\\"wc\\\",Ple=2,Ole=\\\"client\\\",lz=`${Rle}@${Ple}:${Ole}:`,iz={name:Ole,logger:\\\"error\\\",controller:!1,relayUrl:\\\"wss://relay.walletconnect.org\\\"},rDt={session_proposal:\\\"session_proposal\\\",session_update:\\\"session_update\\\",session_extend:\\\"session_extend\\\",session_ping:\\\"session_ping\\\",session_delete:\\\"session_delete\\\",session_expire:\\\"session_expire\\\",session_request:\\\"session_request\\\",session_request_sent:\\\"session_request_sent\\\",session_event:\\\"session_event\\\",proposal_expire:\\\"proposal_expire\\\",session_authenticate:\\\"session_authenticate\\\",session_request_expire:\\\"session_request_expire\\\",session_connect:\\\"session_connect\\\"},nDt={database:\\\":memory:\\\"},ble=\\\"WALLETCONNECT_DEEPLINK_CHOICE\\\",iDt={created:\\\"history_created\\\",updated:\\\"history_updated\\\",deleted:\\\"history_deleted\\\",sync:\\\"history_sync\\\"},sDt=\\\"history\\\",oDt=\\\"0.3\\\",cWe=\\\"proposal\\\",aDt=jt.THIRTY_DAYS,wle=\\\"Proposal expired\\\",lWe=\\\"session\\\",N2=jt.SEVEN_DAYS,uWe=\\\"engine\\\",Ks={wc_sessionPropose:{req:{ttl:jt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:jt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:jt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:jt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:jt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:jt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:jt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:jt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:jt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:jt.ONE_DAY,prompt:!1,tag:1114},res:{ttl:jt.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:jt.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:jt.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:jt.FIVE_MINUTES,prompt:!1,tag:1119}}},sz={min:jt.FIVE_MINUTES,max:jt.SEVEN_DAYS},xf={idle:\\\"IDLE\\\",active:\\\"ACTIVE\\\"},vle={eth_sendTransaction:{key:\\\"\\\"},eth_sendRawTransaction:{key:\\\"\\\"},wallet_sendCalls:{key:\\\"\\\"},solana_signTransaction:{key:\\\"signature\\\"},solana_signAllTransactions:{key:\\\"transactions\\\"},solana_signAndSendTransaction:{key:\\\"signature\\\"}},dWe=\\\"request\\\",fWe=[\\\"wc_sessionPropose\\\",\\\"wc_sessionRequest\\\",\\\"wc_authRequest\\\",\\\"wc_sessionAuthenticate\\\"],pWe=\\\"wc\\\",cDt=1.5,hWe=\\\"auth\\\",mWe=\\\"authKeys\\\",gWe=\\\"pairingTopics\\\",yWe=\\\"requests\\\",y7=`${pWe}@${1.5}:${hWe}:`,g7=`${y7}:PUB_KEY`,lDt=Object.defineProperty,uDt=Object.defineProperties,dDt=Object.getOwnPropertyDescriptors,aWe=Object.getOwnPropertySymbols,fDt=Object.prototype.hasOwnProperty,pDt=Object.prototype.propertyIsEnumerable,xle=(t,e,r)=>e in t?lDt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mn=(t,e)=>{for(var r in e||(e={}))fDt.call(e,r)&&xle(t,r,e[r]);if(aWe)for(var r of aWe(e))pDt.call(e,r)&&xle(t,r,e[r]);return t},ac=(t,e)=>uDt(t,dDt(e)),ge=(t,e,r)=>xle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Ele=class extends Hq{constructor(e){super(e),ge(this,\\\"name\\\",uWe),ge(this,\\\"events\\\",new cz.default),ge(this,\\\"initialized\\\",!1),ge(this,\\\"requestQueue\\\",{state:xf.idle,queue:[]}),ge(this,\\\"sessionRequestQueue\\\",{state:xf.idle,queue:[]}),ge(this,\\\"requestQueueDelay\\\",jt.ONE_SECOND),ge(this,\\\"expectedPairingMethodMap\\\",new Map),ge(this,\\\"recentlyDeletedMap\\\",new Map),ge(this,\\\"recentlyDeletedLimit\\\",200),ge(this,\\\"relayMessageCache\\\",[]),ge(this,\\\"pendingSessions\\\",new Map),ge(this,\\\"init\\\",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Ks)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,jt.toMiliseconds)(this.requestQueueDelay)))}),ge(this,\\\"connect\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();let n=ac(mn({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=Wae(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};let{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:c,relays:l}=n,d=i,f,p=!1;try{if(d){let N=this.client.core.pairing.pairings.get(d);this.client.logger.warn(\\\"connect() with existing pairing topic is deprecated and will be removed in the next major release.\\\"),p=N.active}}catch(N){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),N}if(!d||!p){let{topic:N,uri:O}=await this.client.core.pairing.create();d=N,f=O}if(!d){let{message:N}=Ce(\\\"NO_MATCHING_KEY\\\",`connect() pairing topic: ${d}`);throw new Error(N)}let h=await this.client.core.crypto.generateKeyPair(),m=Ks.wc_sessionPropose.req.ttl||jt.FIVE_MINUTES,g=rs(m),w=ac(mn(mn({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:gle}],proposer:{publicKey:h,metadata:this.client.metadata},expiryTimestamp:g,pairingTopic:d},a&&{sessionProperties:a}),c&&{scopedProperties:c}),{id:hs()}),v=br(\\\"session_connect\\\",w.id),{reject:b,resolve:_,done:S}=th(m,wle),T=({id:N})=>{N===w.id&&(this.client.events.off(\\\"proposal_expire\\\",T),this.pendingSessions.delete(w.id),this.events.emit(v,{error:{message:wle,code:0}}))};return this.client.events.on(\\\"proposal_expire\\\",T),this.events.once(v,({error:N,session:O})=>{this.client.events.off(\\\"proposal_expire\\\",T),N?b(N):O&&_(O)}),await this.sendRequest({topic:d,method:\\\"wc_sessionPropose\\\",params:w,throwOnFailedPublish:!0,clientRpcId:w.id}),await this.setProposal(w.id,w),{uri:f,approval:S}}),ge(this,\\\"pair\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(r)}catch(n){throw this.client.logger.error(\\\"pair() failed\\\"),n}}),ge(this,\\\"approve\\\",async r=>{var n,i,s;let o=this.client.core.eventClient.createEvent({properties:{topic:(n=r?.id)==null?void 0:n.toString(),trace:[sd.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(B){throw o.setError(R1.no_internet_connection),B}try{await this.isValidProposalId(r?.id)}catch(B){throw this.client.logger.error(`approve() -> proposal.get(${r?.id}) failed`),o.setError(R1.proposal_not_found),B}try{await this.isValidApprove(r)}catch(B){throw this.client.logger.error(\\\"approve() -> isValidApprove() failed\\\"),o.setError(R1.session_approve_namespace_validation_failure),B}let{id:a,relayProtocol:c,namespaces:l,sessionProperties:d,scopedProperties:f,sessionConfig:p}=r,h=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});let{pairingTopic:m,proposer:g,requiredNamespaces:w,optionalNamespaces:v}=h,b=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:m});b||(b=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:sd.session_approve_started,properties:{topic:m,trace:[sd.session_approve_started,sd.session_namespaces_validation_success]}}));let _=await this.client.core.crypto.generateKeyPair(),S=g.publicKey,T=await this.client.core.crypto.generateSharedKey(_,S),N=mn(mn(mn({relay:{protocol:c??\\\"irn\\\"},namespaces:l,controller:{publicKey:_,metadata:this.client.metadata},expiry:rs(N2)},d&&{sessionProperties:d}),f&&{scopedProperties:f}),p&&{sessionConfig:p}),O=kn.relay;b.addTrace(sd.subscribing_session_topic);try{await this.client.core.relayer.subscribe(T,{transportType:O})}catch(B){throw b.setError(R1.subscribe_session_topic_failure),B}b.addTrace(sd.subscribe_session_topic_success);let L=ac(mn({},N),{topic:T,requiredNamespaces:w,optionalNamespaces:v,pairingTopic:m,acknowledged:!1,self:N.controller,peer:{publicKey:g.publicKey,metadata:g.metadata},controller:_,transportType:kn.relay});await this.client.session.set(T,L),b.addTrace(sd.store_session);try{b.addTrace(sd.publishing_session_settle),await this.sendRequest({topic:T,method:\\\"wc_sessionSettle\\\",params:N,throwOnFailedPublish:!0}).catch(B=>{throw b?.setError(R1.session_settle_publish_failure),B}),b.addTrace(sd.session_settle_publish_success),b.addTrace(sd.publishing_session_approve),await this.sendResult({id:a,topic:m,result:{relay:{protocol:c??\\\"irn\\\"},responderPublicKey:_},throwOnFailedPublish:!0}).catch(B=>{throw b?.setError(R1.session_approve_publish_failure),B}),b.addTrace(sd.session_approve_publish_success)}catch(B){throw this.client.logger.error(B),this.client.session.delete(T,Kr(\\\"USER_DISCONNECTED\\\")),await this.client.core.relayer.unsubscribe(T),B}return this.client.core.eventClient.deleteEvent({eventId:b.eventId}),await this.client.core.pairing.updateMetadata({topic:m,metadata:g.metadata}),await this.client.proposal.delete(a,Kr(\\\"USER_DISCONNECTED\\\")),await this.client.core.pairing.activate({topic:m}),await this.setExpiry(T,rs(N2)),{topic:T,acknowledged:()=>Promise.resolve(this.client.session.get(T))}}),ge(this,\\\"reject\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(r)}catch(o){throw this.client.logger.error(\\\"reject() -> isValidReject() failed\\\"),o}let{id:n,reason:i}=r,s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&(await this.sendError({id:n,topic:s,error:i,rpcOpts:Ks.wc_sessionPropose.reject}),await this.client.proposal.delete(n,Kr(\\\"USER_DISCONNECTED\\\")))}),ge(this,\\\"update\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(r)}catch(f){throw this.client.logger.error(\\\"update() -> isValidUpdate() failed\\\"),f}let{topic:n,namespaces:i}=r,{done:s,resolve:o,reject:a}=th(),c=hs(),l=Vs().toString(),d=this.client.session.get(n).namespaces;return this.events.once(br(\\\"session_update\\\",c),({error:f})=>{f?a(f):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:\\\"wc_sessionUpdate\\\",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(f=>{this.client.logger.error(f),this.client.session.update(n,{namespaces:d}),a(f)}),{acknowledged:s}}),ge(this,\\\"extend\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(r)}catch(c){throw this.client.logger.error(\\\"extend() -> isValidExtend() failed\\\"),c}let{topic:n}=r,i=hs(),{done:s,resolve:o,reject:a}=th();return this.events.once(br(\\\"session_extend\\\",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,rs(N2)),this.sendRequest({topic:n,method:\\\"wc_sessionExtend\\\",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}}),ge(this,\\\"request\\\",async r=>{this.isInitialized();try{await this.isValidRequest(r)}catch(v){throw this.client.logger.error(\\\"request() -> isValidRequest() failed\\\"),v}let{chainId:n,request:i,topic:s,expiry:o=Ks.wc_sessionRequest.req.ttl}=r,a=this.client.session.get(s);a?.transportType===kn.relay&&await this.confirmOnlineStateOrThrow();let c=hs(),l=Vs().toString(),{done:d,resolve:f,reject:p}=th(o,\\\"Request expired. Please try again.\\\");this.events.once(br(\\\"session_request\\\",c),({error:v,result:b})=>{v?p(v):f(b)});let h=\\\"wc_sessionRequest\\\",m=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(m)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:h,params:{request:ac(mn({},i),{expiryTimestamp:rs(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0,appLink:m}).catch(v=>p(v)),this.client.events.emit(\\\"session_request_sent\\\",{topic:s,request:i,chainId:n,id:c}),await d();let g={request:ac(mn({},i),{expiryTimestamp:rs(o)}),chainId:n},w=this.shouldSetTVF(h,g);return await Promise.all([new Promise(async v=>{await this.sendRequest(mn({clientRpcId:c,relayRpcId:l,topic:s,method:h,params:g,expiry:o,throwOnFailedPublish:!0},w&&{tvf:this.getTVFParams(c,g)})).catch(b=>p(b)),this.client.events.emit(\\\"session_request_sent\\\",{topic:s,request:i,chainId:n,id:c}),v()}),new Promise(async v=>{var b;if(!((b=a.sessionConfig)!=null&&b.disableDeepLink)){let _=await bae(this.client.core.storage,ble);await yae({id:c,topic:s,wcDeepLink:_})}v()}),d()]).then(v=>v[2])}),ge(this,\\\"respond\\\",async r=>{this.isInitialized(),await this.isValidRespond(r);let{topic:n,response:i}=r,{id:s}=i,o=this.client.session.get(n);o.transportType===kn.relay&&await this.confirmOnlineStateOrThrow();let a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Ii(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:a}):nn(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:a}),this.cleanupAfterResponse(r)}),ge(this,\\\"ping\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(r)}catch(i){throw this.client.logger.error(\\\"ping() -> isValidPing() failed\\\"),i}let{topic:n}=r;if(this.client.session.keys.includes(n)){let i=hs(),s=Vs().toString(),{done:o,resolve:a,reject:c}=th();this.events.once(br(\\\"session_ping\\\",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:\\\"wc_sessionPing\\\",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn(\\\"ping() on pairing topic is deprecated and will be removed in the next major release.\\\"),await this.client.core.pairing.ping({topic:n}))}),ge(this,\\\"emit\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(r);let{topic:n,event:i,chainId:s}=r,o=Vs().toString(),a=hs();await this.sendRequest({topic:n,method:\\\"wc_sessionEvent\\\",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),ge(this,\\\"disconnect\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(r);let{topic:n}=r;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:\\\"wc_sessionDelete\\\",params:Kr(\\\"USER_DISCONNECTED\\\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{let{message:i}=Ce(\\\"MISMATCHED_TOPIC\\\",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),ge(this,\\\"find\\\",r=>(this.isInitialized(),this.client.session.getAll().filter(n=>Gae(n,r)))),ge(this,\\\"getPendingSessionRequests\\\",()=>this.client.pendingRequest.getAll()),ge(this,\\\"authenticate\\\",async(r,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(r);let s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?kn.link_mode:kn.relay;o===kn.relay&&await this.confirmOnlineStateOrThrow();let{chains:a,statement:c=\\\"\\\",uri:l,domain:d,nonce:f,type:p,exp:h,nbf:m,methods:g=[],expiry:w}=r,v=[...r.resources||[]],{topic:b,uri:_}=await this.client.core.pairing.create({methods:[\\\"wc_sessionAuthenticate\\\"],transportType:o});this.client.logger.info({message:\\\"Generated new pairing\\\",pairing:{topic:b,uri:_}});let S=await this.client.core.crypto.generateKeyPair(),T=C2(S);if(await Promise.all([this.client.auth.authKeys.set(g7,{responseTopic:T,publicKey:S}),this.client.auth.pairingTopics.set(T,{topic:T,pairingTopic:b})]),await this.client.core.relayer.subscribe(T,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${b}`),g.length>0){let{namespace:k}=x2(a[0]),U=Aae(k,\\\"request\\\",g);_1(v)&&(U=Iae(U,v.pop())),v.push(U)}let N=w&&w>Ks.wc_sessionAuthenticate.req.ttl?w:Ks.wc_sessionAuthenticate.req.ttl,O={authPayload:{type:p??\\\"caip122\\\",chains:a,statement:c,aud:l,domain:d,version:\\\"1\\\",nonce:f,iat:new Date().toISOString(),exp:h,nbf:m,resources:v},requester:{publicKey:S,metadata:this.client.metadata},expiryTimestamp:rs(N)},L={eip155:{chains:a,methods:[...new Set([\\\"personal_sign\\\",...g])],events:[\\\"chainChanged\\\",\\\"accountsChanged\\\"]}},B={requiredNamespaces:{},optionalNamespaces:L,relays:[{protocol:\\\"irn\\\"}],pairingTopic:b,proposer:{publicKey:S,metadata:this.client.metadata},expiryTimestamp:rs(Ks.wc_sessionPropose.req.ttl),id:hs()},{done:H,resolve:M,reject:F}=th(N,\\\"Request expired\\\"),R=hs(),y=br(\\\"session_connect\\\",B.id),E=br(\\\"session_request\\\",R),C=async({error:k,session:U})=>{this.events.off(E,I),k?F(k):U&&M({session:U})},I=async k=>{var U,D,A;if(await this.deletePendingAuthRequest(R,{message:\\\"fulfilled\\\",code:0}),k.error){let ce=Kr(\\\"WC_METHOD_UNSUPPORTED\\\",\\\"wc_sessionAuthenticate\\\");return k.error.code===ce.code?void 0:(this.events.off(y,C),F(k.error.message))}await this.deleteProposal(B.id),this.events.off(y,C);let{cacaos:j,responder:K}=k.result,J=[],X=[];for(let ce of j){await XH({cacao:ce,projectId:this.client.core.projectId})||(this.client.logger.error(ce,\\\"Signature verification failed\\\"),F(Kr(\\\"SESSION_SETTLEMENT_FAILED\\\",\\\"Signature verification failed\\\")));let{p:We}=ce,Ue=_1(We.resources),je=[G9(We.iss)],Lt=FC(We.iss);if(Ue){let pt=rq(Ue),Ct=nq(Ue);J.push(...pt),je.push(...Ct)}for(let pt of je)X.push(`${pt}:${Lt}`)}let re=await this.client.core.crypto.generateSharedKey(S,K.publicKey),fe;J.length>0&&(fe={topic:re,acknowledged:!0,self:{publicKey:S,metadata:this.client.metadata},peer:K,controller:K.publicKey,expiry:rs(N2),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\\\"irn\\\"},pairingTopic:b,namespaces:hq([...new Set(J)],[...new Set(X)]),transportType:o},await this.client.core.relayer.subscribe(re,{transportType:o}),await this.client.session.set(re,fe),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:K.metadata}),fe=this.client.session.get(re)),(U=this.client.metadata.redirect)!=null&&U.linkMode&&(D=K.metadata.redirect)!=null&&D.linkMode&&(A=K.metadata.redirect)!=null&&A.universal&&n&&(this.client.core.addLinkModeSupportedApp(K.metadata.redirect.universal),this.client.session.update(re,{transportType:kn.link_mode})),M({auths:j,session:fe})};this.events.once(y,C),this.events.once(E,I);let P;try{if(s){let k=Ws(\\\"wc_sessionAuthenticate\\\",O,R);this.client.core.history.set(b,k);let U=await this.client.core.crypto.encode(\\\"\\\",k,{type:_2,encoding:nh});P=zC(n,b,U)}else await Promise.all([this.sendRequest({topic:b,method:\\\"wc_sessionAuthenticate\\\",params:O,expiry:r.expiry,throwOnFailedPublish:!0,clientRpcId:R}),this.sendRequest({topic:b,method:\\\"wc_sessionPropose\\\",params:B,expiry:Ks.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:B.id})])}catch(k){throw this.events.off(y,C),this.events.off(E,I),k}return await this.setProposal(B.id,B),await this.setAuthRequest(R,{request:ac(mn({},O),{verifyContext:{}}),pairingTopic:b,transportType:o}),{uri:P??_,response:H}}),ge(this,\\\"approveSessionAuthenticate\\\",async r=>{let{id:n,auths:i}=r,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[P1.authenticated_session_approve_started]}});try{this.isInitialized()}catch(w){throw s.setError(XC.no_internet_connection),w}let o=this.getPendingAuthRequest(n);if(!o)throw s.setError(XC.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);let a=o.transportType||kn.relay;a===kn.relay&&await this.confirmOnlineStateOrThrow();let c=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),d=C2(c),f={type:nd,receiverPublicKey:c,senderPublicKey:l},p=[],h=[];for(let w of i){if(!await XH({cacao:w,projectId:this.client.core.projectId})){s.setError(XC.invalid_cacao);let T=Kr(\\\"SESSION_SETTLEMENT_FAILED\\\",\\\"Signature verification failed\\\");throw await this.sendError({id:n,topic:d,error:T,encodeOpts:f}),new Error(T.message)}s.addTrace(P1.cacaos_verified);let{p:v}=w,b=_1(v.resources),_=[G9(v.iss)],S=FC(v.iss);if(b){let T=rq(b),N=nq(b);p.push(...T),_.push(...N)}for(let T of _)h.push(`${T}:${S}`)}let m=await this.client.core.crypto.generateSharedKey(l,c);s.addTrace(P1.create_authenticated_session_topic);let g;if(p?.length>0){g={topic:m,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:o.requester.metadata},controller:c,expiry:rs(N2),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\\\"irn\\\"},pairingTopic:o.pairingTopic,namespaces:hq([...new Set(p)],[...new Set(h)]),transportType:a},s.addTrace(P1.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(m,{transportType:a})}catch(w){throw s.setError(XC.subscribe_authenticated_session_topic_failure),w}s.addTrace(P1.subscribe_authenticated_session_topic_success),await this.client.session.set(m,g),s.addTrace(P1.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(P1.publishing_authenticated_session_approve);try{await this.sendResult({topic:d,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:f,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(w){throw s.setError(XC.authenticated_session_approve_publish_failure),w}return await this.client.auth.requests.delete(n,{message:\\\"fulfilled\\\",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:g}}),ge(this,\\\"rejectSessionAuthenticate\\\",async r=>{this.isInitialized();let{id:n,reason:i}=r,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===kn.relay&&await this.confirmOnlineStateOrThrow();let o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=C2(o),l={type:nd,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:Ks.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:\\\"rejected\\\",code:0}),await this.client.proposal.delete(n,Kr(\\\"USER_DISCONNECTED\\\"))}),ge(this,\\\"formatAuthMessage\\\",r=>{this.isInitialized();let{request:n,iss:i}=r;return eq(n,i)}),ge(this,\\\"processRelayMessageCache\\\",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{let r=this.relayMessageCache.shift();r&&await this.onRelayMessage(r)}catch(r){this.client.logger.error(r)}},50)}),ge(this,\\\"cleanupDuplicatePairings\\\",async r=>{if(r.pairingTopic)try{let n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info(\\\"Duplicate pairings clean up finished\\\")}catch(n){this.client.logger.error(n)}}),ge(this,\\\"deleteSession\\\",async r=>{var n;let{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=r,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,Kr(\\\"USER_DISCONNECTED\\\")),this.addToRecentlyDeleted(i,\\\"session\\\"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(ble).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,Kr(\\\"USER_DISCONNECTED\\\"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=xf.idle),o&&this.client.events.emit(\\\"session_delete\\\",{id:a,topic:i})}),ge(this,\\\"deleteProposal\\\",async(r,n)=>{if(n)try{let i=this.client.proposal.get(r);this.client.core.eventClient.getEvent({topic:i.pairingTopic})?.setError(R1.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(r,Kr(\\\"USER_DISCONNECTED\\\")),n?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,\\\"proposal\\\")}),ge(this,\\\"deletePendingSessionRequest\\\",async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,\\\"request\\\"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=xf.idle,this.client.events.emit(\\\"session_request_expire\\\",{id:r}))}),ge(this,\\\"deletePendingAuthRequest\\\",async(r,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])}),ge(this,\\\"setExpiry\\\",async(r,n)=>{this.client.session.keys.includes(r)&&(this.client.core.expirer.set(r,n),await this.client.session.update(r,{expiry:n}))}),ge(this,\\\"setProposal\\\",async(r,n)=>{this.client.core.expirer.set(r,rs(Ks.wc_sessionPropose.req.ttl)),await this.client.proposal.set(r,n)}),ge(this,\\\"setAuthRequest\\\",async(r,n)=>{let{request:i,pairingTopic:s,transportType:o=kn.relay}=n;this.client.core.expirer.set(r,i.expiryTimestamp),await this.client.auth.requests.set(r,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:r,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),ge(this,\\\"setPendingSessionRequest\\\",async r=>{let{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||rs(Ks.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})}),ge(this,\\\"sendRequest\\\",async r=>{let{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l,appLink:d,tvf:f}=r,p=Ws(i,s,c),h,m=!!d;try{let v=m?nh:Vc;h=await this.client.core.crypto.encode(n,p,{encoding:v})}catch(v){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),v}let g;if(fWe.includes(i)){let v=Dl(JSON.stringify(p)),b=Dl(h);g=await this.client.core.verify.register({id:b,decryptedId:v})}let w=Ks[i].req;if(w.attestation=g,o&&(w.ttl=o),a&&(w.id=a),this.client.core.history.set(n,p),m){let v=zC(d,n,h);await globalThis.Linking.openURL(v,this.client.name)}else{let v=Ks[i].req;o&&(v.ttl=o),a&&(v.id=a),v.tvf=ac(mn({},f),{correlationId:p.id}),l?(v.internal=ac(mn({},v.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,h,v)):this.client.core.relayer.publish(n,h,v).catch(b=>this.client.logger.error(b))}return p.id}),ge(this,\\\"sendResult\\\",async r=>{let{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:c}=r,l=gf(n,s),d,f=c&&typeof globalThis?.Linking<\\\"u\\\";try{let m=f?nh:Vc;d=await this.client.core.crypto.encode(i,l,ac(mn({},a||{}),{encoding:m}))}catch(m){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),m}let p,h;try{p=await this.client.core.history.get(i,n);let m=p.request;try{this.shouldSetTVF(m.method,m.params)&&(h=this.getTVFParams(n,m.params,s))}catch(g){this.client.logger.warn(\\\"sendResult() -> getTVFParams() failed\\\",g)}}catch(m){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),m}if(f){let m=zC(c,i,d);await globalThis.Linking.openURL(m,this.client.name)}else{let m=p.request.method,g=Ks[m].res;g.tvf=ac(mn({},h),{correlationId:n}),o?(g.internal=ac(mn({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,d,g)):this.client.core.relayer.publish(i,d,g).catch(w=>this.client.logger.error(w))}await this.client.core.history.resolve(l)}),ge(this,\\\"sendError\\\",async r=>{let{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a,appLink:c}=r,l=Ul(n,s),d,f=c&&typeof globalThis?.Linking<\\\"u\\\";try{let h=f?nh:Vc;d=await this.client.core.crypto.encode(i,l,ac(mn({},o||{}),{encoding:h}))}catch(h){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),h}let p;try{p=await this.client.core.history.get(i,n)}catch(h){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),h}if(f){let h=zC(c,i,d);await globalThis.Linking.openURL(h,this.client.name)}else{let h=p.request.method,m=a||Ks[h].res;this.client.core.relayer.publish(i,d,m)}await this.client.core.history.resolve(l)}),ge(this,\\\"cleanup\\\",async()=>{let r=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;mf(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{mf(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),ge(this,\\\"onProviderMessageEvent\\\",async r=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(r):await this.onRelayMessage(r)}),ge(this,\\\"onRelayEventRequest\\\",async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()}),ge(this,\\\"processRequestsQueue\\\",async()=>{if(this.requestQueue.state===xf.active){this.client.logger.info(\\\"Request queue already active, skipping...\\\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=xf.active;let r=this.requestQueue.queue.shift();if(r)try{await this.processRequest(r)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=xf.idle}),ge(this,\\\"processRequest\\\",async r=>{let{topic:n,payload:i,attestation:s,transportType:o,encryptedId:a}=r,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case\\\"wc_sessionPropose\\\":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:s,encryptedId:a});case\\\"wc_sessionSettle\\\":return await this.onSessionSettleRequest(n,i);case\\\"wc_sessionUpdate\\\":return await this.onSessionUpdateRequest(n,i);case\\\"wc_sessionExtend\\\":return await this.onSessionExtendRequest(n,i);case\\\"wc_sessionPing\\\":return await this.onSessionPingRequest(n,i);case\\\"wc_sessionDelete\\\":return await this.onSessionDeleteRequest(n,i);case\\\"wc_sessionRequest\\\":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});case\\\"wc_sessionEvent\\\":return await this.onSessionEventRequest(n,i);case\\\"wc_sessionAuthenticate\\\":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),ge(this,\\\"onRelayEventResponse\\\",async r=>{let{topic:n,payload:i,transportType:s}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case\\\"wc_sessionPropose\\\":return this.onSessionProposeResponse(n,i,s);case\\\"wc_sessionSettle\\\":return this.onSessionSettleResponse(n,i);case\\\"wc_sessionUpdate\\\":return this.onSessionUpdateResponse(n,i);case\\\"wc_sessionExtend\\\":return this.onSessionExtendResponse(n,i);case\\\"wc_sessionPing\\\":return this.onSessionPingResponse(n,i);case\\\"wc_sessionRequest\\\":return this.onSessionRequestResponse(n,i);case\\\"wc_sessionAuthenticate\\\":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),ge(this,\\\"onRelayEventUnknownPayload\\\",r=>{let{topic:n}=r,{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),ge(this,\\\"shouldIgnorePairingRequest\\\",r=>{let{topic:n,requestMethod:i}=r,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes(\\\"wc_sessionAuthenticate\\\")&&this.client.events.listenerCount(\\\"session_authenticate\\\")>0)}),ge(this,\\\"onSessionProposeRequest\\\",async r=>{let{topic:n,payload:i,attestation:s,encryptedId:o}=r,{params:a,id:c}=i;try{let l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount(\\\"session_proposal\\\")===0&&(console.warn(\\\"No listener for session_proposal event\\\"),l?.setError(ch.proposal_listener_not_found)),this.isValidConnect(mn({},i.params));let d=a.expiryTimestamp||rs(Ks.wc_sessionPropose.req.ttl),f=mn({id:c,pairingTopic:n,expiryTimestamp:d},a);await this.setProposal(c,f);let p=await this.getVerifyContext({attestationId:s,hash:Dl(JSON.stringify(i)),encryptedId:o,metadata:f.proposer.metadata});l?.addTrace(vf.emit_session_proposal),this.client.events.emit(\\\"session_proposal\\\",{id:c,params:f,verifyContext:p})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:Ks.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),ge(this,\\\"onSessionProposeResponse\\\",async(r,n,i)=>{let{id:s}=n;if(Ii(n)){let{result:o}=n;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",result:o});let a=this.client.proposal.get(s);this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",proposal:a});let c=a.proposer.publicKey;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",selfPublicKey:c});let l=o.responderPublicKey;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",peerPublicKey:l});let d=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(s,{sessionTopic:d,pairingTopic:r,proposalId:s,publicKey:c});let f=await this.client.core.relayer.subscribe(d,{transportType:i});this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",subscriptionId:f}),await this.client.core.pairing.activate({topic:r})}else if(nn(n)){await this.client.proposal.delete(s,Kr(\\\"USER_DISCONNECTED\\\"));let o=br(\\\"session_connect\\\",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:n.error})}}),ge(this,\\\"onSessionSettleRequest\\\",async(r,n)=>{let{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);let{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:d,scopedProperties:f,sessionConfig:p}=n.params,h=[...this.pendingSessions.values()].find(w=>w.sessionTopic===r);if(!h)return this.client.logger.error(`Pending session not found for topic ${r}`);let m=this.client.proposal.get(h.proposalId),g=ac(mn(mn(mn({topic:r,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:h.pairingTopic,requiredNamespaces:m.requiredNamespaces,optionalNamespaces:m.optionalNamespaces,controller:a.publicKey,self:{publicKey:h.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},d&&{sessionProperties:d}),f&&{scopedProperties:f}),p&&{sessionConfig:p}),{transportType:kn.relay});await this.client.session.set(g.topic,g),await this.setExpiry(g.topic,g.expiry),await this.client.core.pairing.updateMetadata({topic:h.pairingTopic,metadata:g.peer.metadata}),this.client.events.emit(\\\"session_connect\\\",{session:g}),this.events.emit(br(\\\"session_connect\\\",h.proposalId),{session:g}),this.pendingSessions.delete(h.proposalId),this.deleteProposal(h.proposalId,!1),this.cleanupDuplicatePairings(g),await this.sendResult({id:n.id,topic:r,result:!0,throwOnFailedPublish:!0})}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),ge(this,\\\"onSessionSettleResponse\\\",async(r,n)=>{let{id:i}=n;Ii(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(br(\\\"session_approve\\\",i),{})):nn(n)&&(await this.client.session.delete(r,Kr(\\\"USER_DISCONNECTED\\\")),this.events.emit(br(\\\"session_approve\\\",i),{error:n.error}))}),ge(this,\\\"onSessionUpdateRequest\\\",async(r,n)=>{let{params:i,id:s}=n;try{let o=`${r}_session_update`,a=v0.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:r,error:Kr(\\\"INVALID_UPDATE_REQUEST\\\")});return}this.isValidUpdate(mn({topic:r},i));try{v0.set(o,s),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:r,result:!0,throwOnFailedPublish:!0})}catch(c){throw v0.delete(o),c}this.client.events.emit(\\\"session_update\\\",{id:s,topic:r,params:i})}catch(o){await this.sendError({id:s,topic:r,error:o}),this.client.logger.error(o)}}),ge(this,\\\"isRequestOutOfSync\\\",(r,n)=>n.toString().slice(0,-3)<r.toString().slice(0,-3)),ge(this,\\\"onSessionUpdateResponse\\\",(r,n)=>{let{id:i}=n,s=br(\\\"session_update\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(br(\\\"session_update\\\",i),{}):nn(n)&&this.events.emit(br(\\\"session_update\\\",i),{error:n.error})}),ge(this,\\\"onSessionExtendRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,rs(N2)),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\\\"session_extend\\\",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),ge(this,\\\"onSessionExtendResponse\\\",(r,n)=>{let{id:i}=n,s=br(\\\"session_extend\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(br(\\\"session_extend\\\",i),{}):nn(n)&&this.events.emit(br(\\\"session_extend\\\",i),{error:n.error})}),ge(this,\\\"onSessionPingRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\\\"session_ping\\\",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),ge(this,\\\"onSessionPingResponse\\\",(r,n)=>{let{id:i}=n,s=br(\\\"session_ping\\\",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Ii(n)?this.events.emit(br(\\\"session_ping\\\",i),{}):nn(n)&&this.events.emit(br(\\\"session_ping\\\",i),{error:n.error})},500)}),ge(this,\\\"onSessionDeleteRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Gs.publish,async()=>{s(await this.deleteSession({topic:r,id:i}))})}),this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:Kr(\\\"USER_DISCONNECTED\\\")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),ge(this,\\\"onSessionRequest\\\",async r=>{var n,i,s;let{topic:o,payload:a,attestation:c,encryptedId:l,transportType:d}=r,{id:f,params:p}=a;try{await this.isValidRequest(mn({topic:o},p));let h=this.client.session.get(o),m=await this.getVerifyContext({attestationId:c,hash:Dl(JSON.stringify(Ws(\\\"wc_sessionRequest\\\",p,f))),encryptedId:l,metadata:h.peer.metadata,transportType:d}),g={id:f,topic:o,params:p,verifyContext:m};await this.setPendingSessionRequest(g),d===kn.link_mode&&(n=h.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=h.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(g):(this.addSessionRequestToSessionRequestQueue(g),this.processSessionRequestQueue())}catch(h){await this.sendError({id:f,topic:o,error:h}),this.client.logger.error(h)}}),ge(this,\\\"onSessionRequestResponse\\\",(r,n)=>{let{id:i}=n,s=br(\\\"session_request\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(br(\\\"session_request\\\",i),{result:n.result}):nn(n)&&this.events.emit(br(\\\"session_request\\\",i),{error:n.error})}),ge(this,\\\"onSessionEventRequest\\\",async(r,n)=>{let{id:i,params:s}=n;try{let o=`${r}_session_event_${s.event.name}`,a=v0.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(mn({topic:r},s)),this.client.events.emit(\\\"session_event\\\",{id:i,topic:r,params:s}),v0.set(o,i)}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),ge(this,\\\"onSessionAuthenticateResponse\\\",(r,n)=>{let{id:i}=n;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionAuthenticateResponse\\\",topic:r,payload:n}),Ii(n)?this.events.emit(br(\\\"session_request\\\",i),{result:n.result}):nn(n)&&this.events.emit(br(\\\"session_request\\\",i),{error:n.error})}),ge(this,\\\"onSessionAuthenticateRequest\\\",async r=>{var n;let{topic:i,payload:s,attestation:o,encryptedId:a,transportType:c}=r;try{let{requester:l,authPayload:d,expiryTimestamp:f}=s.params,p=await this.getVerifyContext({attestationId:o,hash:Dl(JSON.stringify(s)),encryptedId:a,metadata:l.metadata,transportType:c}),h={requester:l,pairingTopic:i,id:s.id,authPayload:d,verifyContext:p,expiryTimestamp:f};await this.setAuthRequest(s.id,{request:h,pairingTopic:i,transportType:c}),c===kn.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit(\\\"session_authenticate\\\",{topic:i,params:s.params,id:s.id,verifyContext:p})}catch(l){this.client.logger.error(l);let d=s.params.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),p=this.getAppLinkIfEnabled(s.params.requester.metadata,c),h={type:nd,receiverPublicKey:d,senderPublicKey:f};await this.sendError({id:s.id,topic:i,error:l,encodeOpts:h,rpcOpts:Ks.wc_sessionAuthenticate.autoReject,appLink:p})}}),ge(this,\\\"addSessionRequestToSessionRequestQueue\\\",r=>{this.sessionRequestQueue.queue.push(r)}),ge(this,\\\"cleanupAfterResponse\\\",r=>{this.deletePendingSessionRequest(r.response.id,{message:\\\"fulfilled\\\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=xf.idle,this.processSessionRequestQueue()},(0,jt.toMiliseconds)(this.requestQueueDelay))}),ge(this,\\\"cleanupPendingSentRequestsForTopic\\\",({topic:r,error:n})=>{let i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method===\\\"wc_sessionRequest\\\").forEach(s=>{let o=s.request.id,a=br(\\\"session_request\\\",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(br(\\\"session_request\\\",s.request.id),{error:n})})}),ge(this,\\\"processSessionRequestQueue\\\",()=>{if(this.sessionRequestQueue.state===xf.active){this.client.logger.info(\\\"session request queue is already active.\\\");return}let r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info(\\\"session request queue is empty.\\\");return}try{this.sessionRequestQueue.state=xf.active,this.emitSessionRequest(r)}catch(n){this.client.logger.error(n)}}),ge(this,\\\"emitSessionRequest\\\",r=>{this.client.events.emit(\\\"session_request\\\",r)}),ge(this,\\\"onPairingCreated\\\",r=>{if(r.methods&&this.expectedPairingMethodMap.set(r.topic,r.methods),r.active)return;let n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);n&&this.onSessionProposeRequest({topic:r.topic,payload:Ws(\\\"wc_sessionPropose\\\",ac(mn({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id)})}),ge(this,\\\"isValidConnect\\\",async r=>{if(!Zo(r)){let{message:l}=Ce(\\\"MISSING_OR_INVALID\\\",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}let{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:c}=r;if(Os(n)||await this.isValidPairingTopic(n),!ece(c,!0)){let{message:l}=Ce(\\\"MISSING_OR_INVALID\\\",`connect() relays: ${c}`);throw new Error(l)}if(!Os(i)&&R2(i)!==0){let l=\\\"requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces\\\";[\\\"fatal\\\",\\\"error\\\",\\\"silent\\\"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,\\\"requiredNamespaces\\\")}if(!Os(s)&&R2(s)!==0&&this.validateNamespaces(s,\\\"optionalNamespaces\\\"),Os(o)||this.validateSessionProps(o,\\\"sessionProperties\\\"),!Os(a)){this.validateSessionProps(a,\\\"scopedProperties\\\");let l=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(d=>l.includes(d)))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),ge(this,\\\"validateNamespaces\\\",(r,n)=>{let i=Xae(r,\\\"connect()\\\",n);if(i)throw new Error(i.message)}),ge(this,\\\"isValidApprove\\\",async r=>{if(!Zo(r))throw new Error(Ce(\\\"MISSING_OR_INVALID\\\",`approve() params: ${r}`).message);let{id:n,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:a}=r;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);let c=this.client.proposal.get(n),l=$C(i,\\\"approve()\\\");if(l)throw new Error(l.message);let d=J9(c.requiredNamespaces,i,\\\"approve()\\\");if(d)throw new Error(d.message);if(!Fi(s,!0)){let{message:f}=Ce(\\\"MISSING_OR_INVALID\\\",`approve() relayProtocol: ${s}`);throw new Error(f)}if(Os(o)||this.validateSessionProps(o,\\\"sessionProperties\\\"),!Os(a)){this.validateSessionProps(a,\\\"scopedProperties\\\");let f=new Set(Object.keys(i));if(!Object.keys(a).every(p=>f.has(p)))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(f).join(\\\", \\\")}`)}}),ge(this,\\\"isValidReject\\\",async r=>{if(!Zo(r)){let{message:s}=Ce(\\\"MISSING_OR_INVALID\\\",`reject() params: ${r}`);throw new Error(s)}let{id:n,reason:i}=r;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!rce(i)){let{message:s}=Ce(\\\"MISSING_OR_INVALID\\\",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),ge(this,\\\"isValidSessionSettleRequest\\\",r=>{if(!Zo(r)){let{message:l}=Ce(\\\"MISSING_OR_INVALID\\\",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}let{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!gq(n)){let{message:l}=Ce(\\\"MISSING_OR_INVALID\\\",\\\"onSessionSettleRequest() relay protocol should be a string\\\");throw new Error(l)}let a=Jae(i,\\\"onSessionSettleRequest()\\\");if(a)throw new Error(a.message);let c=$C(s,\\\"onSessionSettleRequest()\\\");if(c)throw new Error(c.message);if(mf(o)){let{message:l}=Ce(\\\"EXPIRED\\\",\\\"onSessionSettleRequest()\\\");throw new Error(l)}}),ge(this,\\\"isValidUpdate\\\",async r=>{if(!Zo(r)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`update() params: ${r}`);throw new Error(c)}let{topic:n,namespaces:i}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);let s=this.client.session.get(n),o=$C(i,\\\"update()\\\");if(o)throw new Error(o.message);let a=J9(s.requiredNamespaces,i,\\\"update()\\\");if(a)throw new Error(a.message)}),ge(this,\\\"isValidExtend\\\",async r=>{if(!Zo(r)){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`extend() params: ${r}`);throw new Error(i)}let{topic:n}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),ge(this,\\\"isValidRequest\\\",async r=>{if(!Zo(r)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`request() params: ${r}`);throw new Error(c)}let{topic:n,request:i,chainId:s,expiry:o}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);let{namespaces:a}=this.client.session.get(n);if(!yq(a,s)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`request() chainId: ${s}`);throw new Error(c)}if(!nce(i)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!oce(a,s,i.method)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`request() method: ${i.method}`);throw new Error(c)}if(o&&!cce(o,sz)){let{message:c}=Ce(\\\"MISSING_OR_INVALID\\\",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${sz.min} and ${sz.max}`);throw new Error(c)}}),ge(this,\\\"isValidRespond\\\",async r=>{var n;if(!Zo(r)){let{message:o}=Ce(\\\"MISSING_OR_INVALID\\\",`respond() params: ${r}`);throw new Error(o)}let{topic:i,response:s}=r;try{await this.isValidSessionTopic(i)}catch(o){throw(n=r?.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}if(!ice(s)){let{message:o}=Ce(\\\"MISSING_OR_INVALID\\\",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),ge(this,\\\"isValidPing\\\",async r=>{if(!Zo(r)){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`ping() params: ${r}`);throw new Error(i)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),ge(this,\\\"isValidEmit\\\",async r=>{if(!Zo(r)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`emit() params: ${r}`);throw new Error(a)}let{topic:n,event:i,chainId:s}=r;await this.isValidSessionTopic(n);let{namespaces:o}=this.client.session.get(n);if(!yq(o,s)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`emit() chainId: ${s}`);throw new Error(a)}if(!sce(i)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!ace(o,s,i.name)){let{message:a}=Ce(\\\"MISSING_OR_INVALID\\\",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),ge(this,\\\"isValidDisconnect\\\",async r=>{if(!Zo(r)){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`disconnect() params: ${r}`);throw new Error(i)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),ge(this,\\\"isValidAuthenticate\\\",r=>{let{chains:n,uri:i,domain:s,nonce:o}=r;if(!Array.isArray(n)||n.length===0)throw new Error(\\\"chains is required and must be a non-empty array\\\");if(!Fi(i,!1))throw new Error(\\\"uri is required parameter\\\");if(!Fi(s,!1))throw new Error(\\\"domain is required parameter\\\");if(!Fi(o,!1))throw new Error(\\\"nonce is required parameter\\\");if([...new Set(n.map(c=>x2(c).namespace))].length>1)throw new Error(\\\"Multi-namespace requests are not supported. Please request single namespace only.\\\");let{namespace:a}=x2(n[0]);if(a!==\\\"eip155\\\")throw new Error(\\\"Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.\\\")}),ge(this,\\\"getVerifyContext\\\",async r=>{let{attestationId:n,hash:i,encryptedId:s,metadata:o,transportType:a}=r,c={verified:{verifyUrl:o.verifyUrl||YC,validation:\\\"UNKNOWN\\\",origin:o.url||\\\"\\\"}};try{if(a===kn.link_mode){let d=this.getAppLinkIfEnabled(o,a);return c.verified.validation=d&&new URL(d).origin===new URL(o.url).origin?\\\"VALID\\\":\\\"INVALID\\\",c}let l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(o.url).origin?\\\"VALID\\\":\\\"INVALID\\\")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),ge(this,\\\"validateSessionProps\\\",(r,n)=>{Object.values(r).forEach((i,s)=>{if(i==null){let{message:o}=Ce(\\\"MISSING_OR_INVALID\\\",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(r)[s]}`);throw new Error(o)}})}),ge(this,\\\"getPendingAuthRequest\\\",r=>{let n=this.client.auth.requests.get(r);return typeof n==\\\"object\\\"?n:void 0}),ge(this,\\\"addToRecentlyDeleted\\\",(r,n)=>{if(this.recentlyDeletedMap.set(r,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0,s=this.recentlyDeletedLimit/2;for(let o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),ge(this,\\\"checkRecentlyDeleted\\\",r=>{let n=this.recentlyDeletedMap.get(r);if(n){let{message:i}=Ce(\\\"MISSING_OR_INVALID\\\",`Record was recently deleted - ${n}: ${r}`);throw new Error(i)}}),ge(this,\\\"isLinkModeEnabled\\\",(r,n)=>{var i,s,o,a,c,l,d,f,p;return!r||n!==kn.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==\\\"\\\"&&((d=r?.redirect)==null?void 0:d.universal)!==void 0&&((f=r?.redirect)==null?void 0:f.universal)!==\\\"\\\"&&((p=r?.redirect)==null?void 0:p.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(r.redirect.universal)&&typeof globalThis?.Linking<\\\"u\\\"}),ge(this,\\\"getAppLinkIfEnabled\\\",(r,n)=>{var i;return this.isLinkModeEnabled(r,n)?(i=r?.redirect)==null?void 0:i.universal:void 0}),ge(this,\\\"handleLinkModeMessage\\\",({url:r})=>{if(!r||!r.includes(\\\"wc_ev\\\")||!r.includes(\\\"topic\\\"))return;let n=QH(r,\\\"topic\\\")||\\\"\\\",i=decodeURIComponent(QH(r,\\\"wc_ev\\\")||\\\"\\\"),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:kn.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})}),ge(this,\\\"registerLinkModeListeners\\\",async()=>{var r;if(LC()||eh()&&(r=this.client.metadata.redirect)!=null&&r.linkMode){let n=globalThis?.Linking;if(typeof n<\\\"u\\\"){n.addEventListener(\\\"url\\\",this.handleLinkModeMessage,this.client.name);let i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),ge(this,\\\"shouldSetTVF\\\",(r,n)=>{if(!n||r!==\\\"wc_sessionRequest\\\")return!1;let{request:i}=n;return Object.keys(vle).includes(i.method)}),ge(this,\\\"getTVFParams\\\",(r,n,i)=>{var s,o;try{let a=n.request.method,c=this.extractTxHashesFromResult(a,i);return ac(mn({correlationId:r,rpcMethods:[a],chainId:n.chainId},this.isValidContractData(n.request.params)&&{contractAddresses:[(o=(s=n.request.params)==null?void 0:s[0])==null?void 0:o.to]}),{txHashes:c})}catch(a){this.client.logger.warn(\\\"Error getting TVF params\\\",a)}return{}}),ge(this,\\\"isValidContractData\\\",r=>{var n;if(!r)return!1;try{let i=r?.data||((n=r?.[0])==null?void 0:n.data);if(!i.startsWith(\\\"0x\\\"))return!1;let s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),ge(this,\\\"extractTxHashesFromResult\\\",(r,n)=>{try{let i=vle[r];if(typeof n==\\\"string\\\")return[n];let s=n[i.key];if(I2(s))return r===\\\"solana_signAllTransactions\\\"?s.map(o=>_ae(o)):s;if(typeof s==\\\"string\\\")return[s]}catch(i){this.client.logger.warn(\\\"Error extracting tx hashes from result\\\",i)}return[]})}async processPendingMessageEvents(){try{let e=this.client.session.keys,r=this.client.core.relayer.messages.getWithoutAck(e);for(let[n,i]of Object.entries(r))for(let s of i)try{await this.onProviderMessageEvent({topic:n,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${s}`)}}catch(e){this.client.logger.warn(\\\"processPendingMessageEvents failed\\\",e)}}isInitialized(){if(!this.initialized){let{message:e}=Ce(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Gs.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){let{topic:r,message:n,attestation:i,transportType:s}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(g7)?this.client.auth.authKeys.get(g7):{responseTopic:void 0,publicKey:void 0};try{let a=await this.client.core.crypto.decode(r,n,{receiverPublicKey:o,encoding:s===kn.link_mode?nh:Vc});yf(a)?(this.client.core.history.set(r,a),await this.onRelayEventRequest({topic:r,payload:a,attestation:i,transportType:s,encryptedId:Dl(n)})):Fl(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:r,payload:a,transportType:s}),this.client.core.history.delete(r,a.id)):await this.onRelayEventUnknownPayload({topic:r,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(r,n)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(ql.expired,async e=>{let{topic:r,id:n}=V9(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Ce(\\\"EXPIRED\\\"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,Ce(\\\"EXPIRED\\\"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit(\\\"session_expire\\\",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit(\\\"proposal_expire\\\",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(I1.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(I1.delete,e=>{this.addToRecentlyDeleted(e.topic,\\\"pairing\\\")})}isValidPairingTopic(e){if(!Fi(e,!1)){let{message:r}=Ce(\\\"MISSING_OR_INVALID\\\",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:r}=Ce(\\\"NO_MATCHING_KEY\\\",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(mf(this.client.core.pairing.pairings.get(e).expiry)){let{message:r}=Ce(\\\"EXPIRED\\\",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Fi(e,!1)){let{message:r}=Ce(\\\"MISSING_OR_INVALID\\\",`session topic should be a string: ${e}`);throw new Error(r)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:r}=Ce(\\\"NO_MATCHING_KEY\\\",`session topic doesn't exist: ${e}`);throw new Error(r)}if(mf(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:r}=Ce(\\\"EXPIRED\\\",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){let{message:r}=Ce(\\\"MISSING_OR_INVALID\\\",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Fi(e,!1)){let{message:r}=Ce(\\\"NO_MATCHING_KEY\\\",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{let{message:r}=Ce(\\\"MISSING_OR_INVALID\\\",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!tce(e)){let{message:r}=Ce(\\\"MISSING_OR_INVALID\\\",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){let{message:r}=Ce(\\\"NO_MATCHING_KEY\\\",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(mf(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:r}=Ce(\\\"EXPIRED\\\",`proposal id: ${e}`);throw new Error(r)}}},_le=class extends uh{constructor(e,r){super(e,r,cWe,lz),this.core=e,this.logger=r}},oz=class extends uh{constructor(e,r){super(e,r,lWe,lz),this.core=e,this.logger=r}},Cle=class extends uh{constructor(e,r){super(e,r,dWe,lz,n=>n.id),this.core=e,this.logger=r}},Sle=class extends uh{constructor(e,r){super(e,r,mWe,y7,()=>g7),this.core=e,this.logger=r}},Ale=class extends uh{constructor(e,r){super(e,r,gWe,y7),this.core=e,this.logger=r}},Tle=class extends uh{constructor(e,r){super(e,r,yWe,y7,n=>n.id),this.core=e,this.logger=r}},hDt=Object.defineProperty,mDt=(t,e,r)=>e in t?hDt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yle=(t,e,r)=>mDt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Ile=class{constructor(e,r){this.core=e,this.logger=r,yle(this,\\\"authKeys\\\"),yle(this,\\\"pairingTopics\\\"),yle(this,\\\"requests\\\"),this.authKeys=new Sle(this.core,this.logger),this.pairingTopics=new Ale(this.core,this.logger),this.requests=new Tle(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}},gDt=Object.defineProperty,yDt=(t,e,r)=>e in t?gDt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e,r)=>yDt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),az=class t extends jq{constructor(e){super(e),ir(this,\\\"protocol\\\",Rle),ir(this,\\\"version\\\",Ple),ir(this,\\\"name\\\",iz.name),ir(this,\\\"metadata\\\"),ir(this,\\\"core\\\"),ir(this,\\\"logger\\\"),ir(this,\\\"events\\\",new cz.EventEmitter),ir(this,\\\"engine\\\"),ir(this,\\\"session\\\"),ir(this,\\\"proposal\\\"),ir(this,\\\"pendingRequest\\\"),ir(this,\\\"auth\\\"),ir(this,\\\"signConfig\\\"),ir(this,\\\"on\\\",(n,i)=>this.events.on(n,i)),ir(this,\\\"once\\\",(n,i)=>this.events.once(n,i)),ir(this,\\\"off\\\",(n,i)=>this.events.off(n,i)),ir(this,\\\"removeListener\\\",(n,i)=>this.events.removeListener(n,i)),ir(this,\\\"removeAllListeners\\\",n=>this.events.removeAllListeners(n)),ir(this,\\\"connect\\\",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"pair\\\",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"approve\\\",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"reject\\\",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"update\\\",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"extend\\\",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"request\\\",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"respond\\\",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"ping\\\",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"emit\\\",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"disconnect\\\",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"find\\\",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"getPendingSessionRequests\\\",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),ir(this,\\\"authenticate\\\",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}}),ir(this,\\\"formatAuthMessage\\\",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"approveSessionAuthenticate\\\",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),ir(this,\\\"rejectSessionAuthenticate\\\",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=e?.name||iz.name,this.metadata=fae(e?.metadata),this.signConfig=e?.signConfig;let r=typeof e?.logger<\\\"u\\\"&&typeof e?.logger!=\\\"string\\\"?e.logger:(0,sh.default)(Ll({level:e?.logger||iz.logger}));this.core=e?.core||new sWe(e),this.logger=rr(r,this.name),this.session=new oz(this.core,this.logger),this.proposal=new _le(this.core,this.logger),this.pendingRequest=new Cle(this.core,this.logger),this.engine=new Ele(this),this.auth=new Ile(this.core,this.logger)}static async init(e){let r=new t(e);return await r.initialize(),r}get context(){return Ir(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\\\"Initialized\\\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info(\\\"SignClient Initialization Success\\\"),setTimeout(()=>{this.engine.processRelayMessageCache()},(0,jt.toMiliseconds)(jt.ONE_SECOND))}catch(e){throw this.logger.info(\\\"SignClient Initialization Failure\\\"),this.logger.error(e.message),e}}},bDt=oz,wDt=az});var xWe=q((O1,vWe)=>{u();var uz=typeof globalThis<\\\"u\\\"&&globalThis||typeof self<\\\"u\\\"&&self||typeof globalThis<\\\"u\\\"&&globalThis,dz=(function(){function t(){this.fetch=!1,this.DOMException=uz.DOMException}return t.prototype=uz,new t})();(function(t){var e=(function(r){var n=typeof t<\\\"u\\\"&&t||typeof self<\\\"u\\\"&&self||typeof t<\\\"u\\\"&&t||{},i={searchParams:\\\"URLSearchParams\\\"in n,iterable:\\\"Symbol\\\"in n&&\\\"iterator\\\"in Symbol,blob:\\\"FileReader\\\"in n&&\\\"Blob\\\"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:\\\"FormData\\\"in n,arrayBuffer:\\\"ArrayBuffer\\\"in n};function s(M){return M&&DataView.prototype.isPrototypeOf(M)}if(i.arrayBuffer)var o=[\\\"[object Int8Array]\\\",\\\"[object Uint8Array]\\\",\\\"[object Uint8ClampedArray]\\\",\\\"[object Int16Array]\\\",\\\"[object Uint16Array]\\\",\\\"[object Int32Array]\\\",\\\"[object Uint32Array]\\\",\\\"[object Float32Array]\\\",\\\"[object Float64Array]\\\"],a=ArrayBuffer.isView||function(M){return M&&o.indexOf(Object.prototype.toString.call(M))>-1};function c(M){if(typeof M!=\\\"string\\\"&&(M=String(M)),/[^a-z0-9\\\\-#$%&'*+.^_`|~!]/i.test(M)||M===\\\"\\\")throw new TypeError('Invalid character in header field name: \\\"'+M+'\\\"');return M.toLowerCase()}function l(M){return typeof M!=\\\"string\\\"&&(M=String(M)),M}function d(M){var F={next:function(){var R=M.shift();return{done:R===void 0,value:R}}};return i.iterable&&(F[Symbol.iterator]=function(){return F}),F}function f(M){this.map={},M instanceof f?M.forEach(function(F,R){this.append(R,F)},this):Array.isArray(M)?M.forEach(function(F){if(F.length!=2)throw new TypeError(\\\"Headers constructor: expected name/value pair to be length 2, found\\\"+F.length);this.append(F[0],F[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(F){this.append(F,M[F])},this)}f.prototype.append=function(M,F){M=c(M),F=l(F);var R=this.map[M];this.map[M]=R?R+\\\", \\\"+F:F},f.prototype.delete=function(M){delete this.map[c(M)]},f.prototype.get=function(M){return M=c(M),this.has(M)?this.map[M]:null},f.prototype.has=function(M){return this.map.hasOwnProperty(c(M))},f.prototype.set=function(M,F){this.map[c(M)]=l(F)},f.prototype.forEach=function(M,F){for(var R in this.map)this.map.hasOwnProperty(R)&&M.call(F,this.map[R],R,this)},f.prototype.keys=function(){var M=[];return this.forEach(function(F,R){M.push(R)}),d(M)},f.prototype.values=function(){var M=[];return this.forEach(function(F){M.push(F)}),d(M)},f.prototype.entries=function(){var M=[];return this.forEach(function(F,R){M.push([R,F])}),d(M)},i.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function p(M){if(!M._noBody){if(M.bodyUsed)return Promise.reject(new TypeError(\\\"Already read\\\"));M.bodyUsed=!0}}function h(M){return new Promise(function(F,R){M.onload=function(){F(M.result)},M.onerror=function(){R(M.error)}})}function m(M){var F=new FileReader,R=h(F);return F.readAsArrayBuffer(M),R}function g(M){var F=new FileReader,R=h(F),y=/charset=([A-Za-z0-9_-]+)/.exec(M.type),E=y?y[1]:\\\"utf-8\\\";return F.readAsText(M,E),R}function w(M){for(var F=new Uint8Array(M),R=new Array(F.length),y=0;y<F.length;y++)R[y]=String.fromCharCode(F[y]);return R.join(\\\"\\\")}function v(M){if(M.slice)return M.slice(0);var F=new Uint8Array(M.byteLength);return F.set(new Uint8Array(M)),F.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(M){this.bodyUsed=this.bodyUsed,this._bodyInit=M,M?typeof M==\\\"string\\\"?this._bodyText=M:i.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:i.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():i.arrayBuffer&&i.blob&&s(M)?(this._bodyArrayBuffer=v(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||a(M))?this._bodyArrayBuffer=v(M):this._bodyText=M=Object.prototype.toString.call(M):(this._noBody=!0,this._bodyText=\\\"\\\"),this.headers.get(\\\"content-type\\\")||(typeof M==\\\"string\\\"?this.headers.set(\\\"content-type\\\",\\\"text/plain;charset=UTF-8\\\"):this._bodyBlob&&this._bodyBlob.type?this.headers.set(\\\"content-type\\\",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set(\\\"content-type\\\",\\\"application/x-www-form-urlencoded;charset=UTF-8\\\"))},i.blob&&(this.blob=function(){var M=p(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error(\\\"could not read FormData body as blob\\\");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var M=p(this);return M||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(m);throw new Error(\\\"could not read as ArrayBuffer\\\")}},this.text=function(){var M=p(this);if(M)return M;if(this._bodyBlob)return g(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error(\\\"could not read FormData body as text\\\");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(N)}),this.json=function(){return this.text().then(JSON.parse)},this}var _=[\\\"CONNECT\\\",\\\"DELETE\\\",\\\"GET\\\",\\\"HEAD\\\",\\\"OPTIONS\\\",\\\"PATCH\\\",\\\"POST\\\",\\\"PUT\\\",\\\"TRACE\\\"];function S(M){var F=M.toUpperCase();return _.indexOf(F)>-1?F:M}function T(M,F){if(!(this instanceof T))throw new TypeError('Please use the \\\"new\\\" operator, this DOM object constructor cannot be called as a function.');F=F||{};var R=F.body;if(M instanceof T){if(M.bodyUsed)throw new TypeError(\\\"Already read\\\");this.url=M.url,this.credentials=M.credentials,F.headers||(this.headers=new f(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!R&&M._bodyInit!=null&&(R=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=F.credentials||this.credentials||\\\"same-origin\\\",(F.headers||!this.headers)&&(this.headers=new f(F.headers)),this.method=S(F.method||this.method||\\\"GET\\\"),this.mode=F.mode||this.mode||null,this.signal=F.signal||this.signal||(function(){if(\\\"AbortController\\\"in n){var C=new AbortController;return C.signal}})(),this.referrer=null,(this.method===\\\"GET\\\"||this.method===\\\"HEAD\\\")&&R)throw new TypeError(\\\"Body not allowed for GET or HEAD requests\\\");if(this._initBody(R),(this.method===\\\"GET\\\"||this.method===\\\"HEAD\\\")&&(F.cache===\\\"no-store\\\"||F.cache===\\\"no-cache\\\")){var y=/([?&])_=[^&]*/;if(y.test(this.url))this.url=this.url.replace(y,\\\"$1_=\\\"+new Date().getTime());else{var E=/\\\\?/;this.url+=(E.test(this.url)?\\\"&\\\":\\\"?\\\")+\\\"_=\\\"+new Date().getTime()}}}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function N(M){var F=new FormData;return M.trim().split(\\\"&\\\").forEach(function(R){if(R){var y=R.split(\\\"=\\\"),E=y.shift().replace(/\\\\+/g,\\\" \\\"),C=y.join(\\\"=\\\").replace(/\\\\+/g,\\\" \\\");F.append(decodeURIComponent(E),decodeURIComponent(C))}}),F}function O(M){var F=new f,R=M.replace(/\\\\r?\\\\n[\\\\t ]+/g,\\\" \\\");return R.split(\\\"\\\\r\\\").map(function(y){return y.indexOf(`\\n`)===0?y.substr(1,y.length):y}).forEach(function(y){var E=y.split(\\\":\\\"),C=E.shift().trim();if(C){var I=E.join(\\\":\\\").trim();try{F.append(C,I)}catch(P){console.warn(\\\"Response \\\"+P.message)}}}),F}b.call(T.prototype);function L(M,F){if(!(this instanceof L))throw new TypeError('Please use the \\\"new\\\" operator, this DOM object constructor cannot be called as a function.');if(F||(F={}),this.type=\\\"default\\\",this.status=F.status===void 0?200:F.status,this.status<200||this.status>599)throw new RangeError(\\\"Failed to construct 'Response': The status provided (0) is outside the range [200, 599].\\\");this.ok=this.status>=200&&this.status<300,this.statusText=F.statusText===void 0?\\\"\\\":\\\"\\\"+F.statusText,this.headers=new f(F.headers),this.url=F.url||\\\"\\\",this._initBody(M)}b.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},L.error=function(){var M=new L(null,{status:200,statusText:\\\"\\\"});return M.ok=!1,M.status=0,M.type=\\\"error\\\",M};var B=[301,302,303,307,308];L.redirect=function(M,F){if(B.indexOf(F)===-1)throw new RangeError(\\\"Invalid status code\\\");return new L(null,{status:F,headers:{location:M}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(F,R){this.message=F,this.name=R;var y=Error(F);this.stack=y.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function H(M,F){return new Promise(function(R,y){var E=new T(M,F);if(E.signal&&E.signal.aborted)return y(new r.DOMException(\\\"Aborted\\\",\\\"AbortError\\\"));var C=new XMLHttpRequest;function I(){C.abort()}C.onload=function(){var U={statusText:C.statusText,headers:O(C.getAllResponseHeaders()||\\\"\\\")};E.url.indexOf(\\\"file://\\\")===0&&(C.status<200||C.status>599)?U.status=200:U.status=C.status,U.url=\\\"responseURL\\\"in C?C.responseURL:U.headers.get(\\\"X-Request-URL\\\");var D=\\\"response\\\"in C?C.response:C.responseText;setTimeout(function(){R(new L(D,U))},0)},C.onerror=function(){setTimeout(function(){y(new TypeError(\\\"Network request failed\\\"))},0)},C.ontimeout=function(){setTimeout(function(){y(new TypeError(\\\"Network request timed out\\\"))},0)},C.onabort=function(){setTimeout(function(){y(new r.DOMException(\\\"Aborted\\\",\\\"AbortError\\\"))},0)};function P(U){try{return U===\\\"\\\"&&n.location.href?n.location.href:U}catch{return U}}if(C.open(E.method,P(E.url),!0),E.credentials===\\\"include\\\"?C.withCredentials=!0:E.credentials===\\\"omit\\\"&&(C.withCredentials=!1),\\\"responseType\\\"in C&&(i.blob?C.responseType=\\\"blob\\\":i.arrayBuffer&&(C.responseType=\\\"arraybuffer\\\")),F&&typeof F.headers==\\\"object\\\"&&!(F.headers instanceof f||n.Headers&&F.headers instanceof n.Headers)){var k=[];Object.getOwnPropertyNames(F.headers).forEach(function(U){k.push(c(U)),C.setRequestHeader(U,l(F.headers[U]))}),E.headers.forEach(function(U,D){k.indexOf(D)===-1&&C.setRequestHeader(D,U)})}else E.headers.forEach(function(U,D){C.setRequestHeader(D,U)});E.signal&&(E.signal.addEventListener(\\\"abort\\\",I),C.onreadystatechange=function(){C.readyState===4&&E.signal.removeEventListener(\\\"abort\\\",I)}),C.send(typeof E._bodyInit>\\\"u\\\"?null:E._bodyInit)})}return H.polyfill=!0,n.fetch||(n.fetch=H,n.Headers=f,n.Request=T,n.Response=L),r.Headers=f,r.Request=T,r.Response=L,r.fetch=H,Object.defineProperty(r,\\\"__esModule\\\",{value:!0}),r})({})})(dz);dz.fetch.ponyfill=!0;delete dz.fetch.polyfill;var e4=uz.fetch?uz:dz;O1=e4.fetch;O1.default=e4.fetch;O1.fetch=e4.fetch;O1.Headers=e4.Headers;O1.Request=e4.Request;O1.Response=e4.Response;vWe.exports=O1});var Ble={};ue(Ble,{HttpConnection:()=>kle,default:()=>kle});var IWe,Nle,vDt,xDt,EDt,EWe,_Dt,CDt,_We,CWe,SWe,SDt,ADt,AWe,TWe,kle,Mle=x(()=>{u();IWe=Me(ho()),Nle=Me(xWe());f1();oh();vDt=Object.defineProperty,xDt=Object.defineProperties,EDt=Object.getOwnPropertyDescriptors,EWe=Object.getOwnPropertySymbols,_Dt=Object.prototype.hasOwnProperty,CDt=Object.prototype.propertyIsEnumerable,_We=(t,e,r)=>e in t?vDt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,CWe=(t,e)=>{for(var r in e||(e={}))_Dt.call(e,r)&&_We(t,r,e[r]);if(EWe)for(var r of EWe(e))CDt.call(e,r)&&_We(t,r,e[r]);return t},SWe=(t,e)=>xDt(t,EDt(e)),SDt={Accept:\\\"application/json\\\",\\\"Content-Type\\\":\\\"application/json\\\"},ADt=\\\"POST\\\",AWe={headers:SDt,method:ADt},TWe=10,kle=class{constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new IWe.EventEmitter,this.isAvailable=!1,this.registering=!1,!Yq(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error(\\\"Connection already closed\\\");this.onClose()}async send(e){this.isAvailable||await this.register();try{let r=Vo(e),n=await(await(0,Nle.default)(this.url,SWe(CWe({},AWe),{body:r}))).json();this.onPayload({data:n})}catch(r){this.onError(e.id,r)}}async register(e=this.url){if(!Yq(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount(\\\"register_error\\\")>=r||this.events.listenerCount(\\\"open\\\")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,i)=>{this.events.once(\\\"register_error\\\",s=>{this.resetMaxListeners(),i(s)}),this.events.once(\\\"open\\\",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>\\\"u\\\")return i(new Error(\\\"HTTP connection is missing or invalid\\\"));n()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let r=Vo({id:1,jsonrpc:\\\"2.0\\\",method:\\\"test\\\",params:[]});await(0,Nle.default)(e,SWe(CWe({},AWe),{body:r}))}this.onOpen()}catch(r){let n=this.parseError(r);throw this.events.emit(\\\"register_error\\\",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit(\\\"open\\\")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit(\\\"close\\\")}onPayload(e){if(typeof e.data>\\\"u\\\")return;let r=typeof e.data==\\\"string\\\"?nc(e.data):e.data;this.events.emit(\\\"payload\\\",r)}onError(e,r){let n=this.parseError(r),i=n.message||n.toString(),s=Ul(e,i);this.events.emit(\\\"payload\\\",s)}parseError(e,r=this.url){return o7(e,r,\\\"HTTP\\\")}resetMaxListeners(){this.events.getMaxListeners()>TWe&&this.events.setMaxListeners(TWe)}}});var eGe=q(yz=>{\\\"use strict\\\";u();Object.defineProperty(yz,\\\"__esModule\\\",{value:!0});var TDt=(wWe(),mt(bWe)),ks=(Y9(),mt(dce)),RWe=(C1(),mt(Sce)),zWe=(Mle(),mt(Ble)),Ef=(l7(),mt(Bce)),$We=(oh(),mt(Ra)),IDt=ho();function Xle(t){return t&&typeof t==\\\"object\\\"&&\\\"default\\\"in t?t:{default:t}}var RDt=Xle(TDt),dh=Xle(zWe),PDt=Xle(IDt),PWe=\\\"error\\\",ODt=\\\"wss://relay.walletconnect.org\\\",NDt=\\\"wc\\\",kDt=\\\"universal_provider\\\",fz=`${NDt}@2:${kDt}:`,VWe=\\\"https://rpc.walletconnect.org/v1/\\\",f4=\\\"generic\\\",BDt=`${VWe}bundler`,ad={DEFAULT_CHAIN_CHANGED:\\\"default_chain_changed\\\"};function MDt(){}function eue(t){return t==null||typeof t!=\\\"object\\\"&&typeof t!=\\\"function\\\"}function tue(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function DDt(t){if(eue(t))return t;if(Array.isArray(t)||tue(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<\\\"u\\\"&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let n=new r(t.message);return n.stack=t.stack,n.name=t.name,n.cause=t.cause,n}if(typeof File<\\\"u\\\"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t==\\\"object\\\"){let n=Object.create(e);return Object.assign(n,t)}return t}function OWe(t){return typeof t==\\\"object\\\"&&t!==null}function WWe(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function GWe(t){return t==null?t===void 0?\\\"[object Undefined]\\\":\\\"[object Null]\\\":Object.prototype.toString.call(t)}var LDt=\\\"[object RegExp]\\\",KWe=\\\"[object String]\\\",ZWe=\\\"[object Number]\\\",QWe=\\\"[object Boolean]\\\",JWe=\\\"[object Arguments]\\\",UDt=\\\"[object Symbol]\\\",FDt=\\\"[object Date]\\\",jDt=\\\"[object Map]\\\",HDt=\\\"[object Set]\\\",qDt=\\\"[object Array]\\\",zDt=\\\"[object ArrayBuffer]\\\",$Dt=\\\"[object Object]\\\",VDt=\\\"[object DataView]\\\",WDt=\\\"[object Uint8Array]\\\",GDt=\\\"[object Uint8ClampedArray]\\\",KDt=\\\"[object Uint16Array]\\\",ZDt=\\\"[object Uint32Array]\\\",QDt=\\\"[object Int8Array]\\\",JDt=\\\"[object Int16Array]\\\",YDt=\\\"[object Int32Array]\\\",XDt=\\\"[object Float32Array]\\\",eLt=\\\"[object Float64Array]\\\";function tLt(t,e){return p4(t,void 0,t,new Map,e)}function p4(t,e,r,n=new Map,i=void 0){let s=i?.(t,e,r,n);if(s!=null)return s;if(eue(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){let o=new Array(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=p4(t[a],a,r,n,i);return Object.hasOwn(t,\\\"index\\\")&&(o.index=t.index),Object.hasOwn(t,\\\"input\\\")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){let o=new Map;n.set(t,o);for(let[a,c]of t)o.set(a,p4(c,a,r,n,i));return o}if(t instanceof Set){let o=new Set;n.set(t,o);for(let a of t)o.add(p4(a,void 0,r,n,i));return o}if(typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(t))return t.subarray();if(tue(t)){let o=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=p4(t[a],a,r,n,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<\\\"u\\\"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,o),k2(o,t,r,n,i),o}if(typeof File<\\\"u\\\"&&t instanceof File){let o=new File([t],t.name,{type:t.type});return n.set(t,o),k2(o,t,r,n,i),o}if(t instanceof Blob){let o=new Blob([t],{type:t.type});return n.set(t,o),k2(o,t,r,n,i),o}if(t instanceof Error){let o=new t.constructor;return n.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,k2(o,t,r,n,i),o}if(typeof t==\\\"object\\\"&&rLt(t)){let o=Object.create(Object.getPrototypeOf(t));return n.set(t,o),k2(o,t,r,n,i),o}return t}function k2(t,e,r=t,n,i){let s=[...Object.keys(e),...WWe(e)];for(let o=0;o<s.length;o++){let a=s[o],c=Object.getOwnPropertyDescriptor(t,a);(c==null||c.writable)&&(t[a]=p4(e[a],a,r,n,i))}}function rLt(t){switch(GWe(t)){case JWe:case qDt:case zDt:case VDt:case QWe:case FDt:case XDt:case eLt:case QDt:case JDt:case YDt:case jDt:case ZWe:case $Dt:case LDt:case HDt:case KWe:case UDt:case WDt:case GDt:case KDt:case ZDt:return!0;default:return!1}}function nLt(t,e){return tLt(t,(r,n,i,s)=>{let o=e?.(r,n,i,s);if(o!=null)return o;if(typeof t==\\\"object\\\")switch(Object.prototype.toString.call(t)){case ZWe:case KWe:case QWe:{let a=new t.constructor(t?.valueOf());return k2(a,t),a}case JWe:{let a={};return k2(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}})}function NWe(t){return nLt(t)}function kWe(t){return t!==null&&typeof t==\\\"object\\\"&&GWe(t)===\\\"[object Arguments]\\\"}function iLt(t){return tue(t)}function sLt(t){if(typeof t!=\\\"object\\\"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!==\\\"[object Object]\\\"){let r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function oLt(t,...e){let r=e.slice(0,-1),n=e[e.length-1],i=t;for(let s=0;s<r.length;s++){let o=r[s];i=Fle(i,o,n,new Map)}return i}function Fle(t,e,r,n){if(eue(t)&&(t=Object(t)),e==null||typeof e!=\\\"object\\\")return t;if(n.has(e))return DDt(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}let i=[...Object.keys(e),...WWe(e)];for(let s=0;s<i.length;s++){let o=i[s],a=e[o],c=t[o];if(kWe(a)&&(a={...a}),kWe(c)&&(c={...c}),typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(a)&&(a=NWe(a)),Array.isArray(a))if(typeof c==\\\"object\\\"&&c!=null){let d=[],f=Reflect.ownKeys(c);for(let p=0;p<f.length;p++){let h=f[p];d[h]=c[h]}c=d}else c=[];let l=r(c,a,o,t,e,n);l!=null?t[o]=l:Array.isArray(a)||OWe(c)&&OWe(a)?t[o]=Fle(c,a,r,n):c==null&&sLt(a)?t[o]=Fle({},a,r,n):c==null&&iLt(a)?t[o]=NWe(a):(c===void 0||a!==void 0)&&(t[o]=a)}return t}function aLt(t,...e){return oLt(t,...e,MDt)}var cLt=Object.defineProperty,lLt=Object.defineProperties,uLt=Object.getOwnPropertyDescriptors,BWe=Object.getOwnPropertySymbols,dLt=Object.prototype.hasOwnProperty,fLt=Object.prototype.propertyIsEnumerable,MWe=(t,e,r)=>e in t?cLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pz=(t,e)=>{for(var r in e||(e={}))dLt.call(e,r)&&MWe(t,r,e[r]);if(BWe)for(var r of BWe(e))fLt.call(e,r)&&MWe(t,r,e[r]);return t},pLt=(t,e)=>lLt(t,uLt(e));function zl(t,e,r){var n;let i=ks.parseChainId(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${VWe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function B2(t){return t.includes(\\\":\\\")?t.split(\\\":\\\")[1]:t}function YWe(t){return t.map(e=>`${e.split(\\\":\\\")[0]}:${e.split(\\\":\\\")[1]}`)}function hLt(t,e){let r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];let n=[];return r.forEach(i=>{let s=e.namespaces[i].accounts;n.push(...s)}),n}function hz(t={},e={}){let r=DWe(t),n=DWe(e);return aLt(r,n)}function DWe(t){var e,r,n,i,s;let o={};if(!ks.isValidObject(t))return o;for(let[a,c]of Object.entries(t)){let l=ks.isCaipNamespace(a)?[a]:c.chains,d=c.methods||[],f=c.events||[],p=c.rpcMap||{},h=ks.parseNamespaceKey(a);o[h]=pLt(pz(pz({},o[h]),c),{chains:ks.mergeArrays(l,(e=o[h])==null?void 0:e.chains),methods:ks.mergeArrays(d,(r=o[h])==null?void 0:r.methods),events:ks.mergeArrays(f,(n=o[h])==null?void 0:n.events)}),(ks.isValidObject(p)||ks.isValidObject(((i=o[h])==null?void 0:i.rpcMap)||{}))&&(o[h].rpcMap=pz(pz({},p),(s=o[h])==null?void 0:s.rpcMap))}return o}function LWe(t){return t.includes(\\\":\\\")?t.split(\\\":\\\")[2]:t}function UWe(t){let e={};for(let[r,n]of Object.entries(t)){let i=n.methods||[],s=n.events||[],o=n.accounts||[],a=ks.isCaipNamespace(r)?[r]:n.chains?n.chains:YWe(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function Dle(t){return typeof t==\\\"number\\\"?t:t.includes(\\\"0x\\\")?parseInt(t,16):(t=t.includes(\\\":\\\")?t.split(\\\":\\\")[1]:t,isNaN(Number(t))?t:Number(t))}var XWe={},Pr=t=>XWe[t],Lle=(t,e)=>{XWe[t]=e},mLt=Object.defineProperty,gLt=(t,e,r)=>e in t?mLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,t4=(t,e,r)=>gLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),jle=class{constructor(e){t4(this,\\\"name\\\",\\\"polkadot\\\"),t4(this,\\\"client\\\"),t4(this,\\\"httpProviders\\\"),t4(this,\\\"events\\\"),t4(this,\\\"namespace\\\"),t4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=B2(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},yLt=Object.defineProperty,bLt=Object.defineProperties,wLt=Object.getOwnPropertyDescriptors,FWe=Object.getOwnPropertySymbols,vLt=Object.prototype.hasOwnProperty,xLt=Object.prototype.propertyIsEnumerable,Hle=(t,e,r)=>e in t?yLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jWe=(t,e)=>{for(var r in e||(e={}))vLt.call(e,r)&&Hle(t,r,e[r]);if(FWe)for(var r of FWe(e))xLt.call(e,r)&&Hle(t,r,e[r]);return t},HWe=(t,e)=>bLt(t,wLt(e)),r4=(t,e,r)=>Hle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),qle=class{constructor(e){r4(this,\\\"name\\\",\\\"eip155\\\"),r4(this,\\\"client\\\"),r4(this,\\\"chainId\\\"),r4(this,\\\"namespace\\\"),r4(this,\\\"httpProviders\\\"),r4(this,\\\"events\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case\\\"eth_requestAccounts\\\":return this.getAccounts();case\\\"eth_accounts\\\":return this.getAccounts();case\\\"wallet_switchEthereumChain\\\":return await this.handleSwitchChain(e);case\\\"eth_chainId\\\":return parseInt(this.getDefaultChain());case\\\"wallet_getCapabilities\\\":return await this.getCapabilities(e);case\\\"wallet_getCallsStatus\\\":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}createHttpProvider(e,r){let n=r||zl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new zWe.HttpConnection(n,Pr(\\\"disableProviderPing\\\")))}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=parseInt(B2(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}getHttpProvider(){let e=this.chainId,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:\\\"0x0\\\";i=i.startsWith(\\\"0x\\\")?i:`0x${i}`;let s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes(\\\"wallet_switchEthereumChain\\\"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var r,n,i,s,o;let a=(n=(r=e.request)==null?void 0:r.params)==null?void 0:n[0],c=((s=(i=e.request)==null?void 0:i.params)==null?void 0:s[1])||[],l=`${a}${c.join(\\\",\\\")}`;if(!a)throw new Error(\\\"Missing address parameter in `wallet_getCapabilities` request\\\");let d=this.client.session.get(e.topic),f=((o=d?.sessionProperties)==null?void 0:o.capabilities)||{};if(f!=null&&f[l])return f?.[l];let p=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:HWe(jWe({},d.sessionProperties||{}),{capabilities:HWe(jWe({},f||{}),{[l]:p})})})}catch(h){console.warn(\\\"Failed to update session with capabilities\\\",h)}return p}async getCallStatus(e){var r,n;let i=this.client.session.get(e.topic),s=(r=i.sessionProperties)==null?void 0:r.bundler_name;if(s){let a=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(a,e)}catch(c){console.warn(\\\"Failed to fetch call status from bundler\\\",c,a)}}let o=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(a){console.warn(\\\"Failed to fetch call status from custom bundler\\\",a,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error(\\\"Fetching call status not approved by the wallet.\\\")}async getUserOperationReceipt(e,r){var n;let i=new URL(e),s=await fetch(i,{method:\\\"POST\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},body:JSON.stringify($We.formatJsonRpcRequest(\\\"eth_getUserOperationReceipt\\\",[(n=r.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}getBundlerUrl(e,r){return`${BDt}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${r}`}},ELt=Object.defineProperty,_Lt=(t,e,r)=>e in t?ELt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n4=(t,e,r)=>_Lt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),zle=class{constructor(e){n4(this,\\\"name\\\",\\\"solana\\\"),n4(this,\\\"client\\\"),n4(this,\\\"httpProviders\\\"),n4(this,\\\"events\\\"),n4(this,\\\"namespace\\\"),n4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=B2(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},CLt=Object.defineProperty,SLt=(t,e,r)=>e in t?CLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,i4=(t,e,r)=>SLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),$le=class{constructor(e){i4(this,\\\"name\\\",\\\"cosmos\\\"),i4(this,\\\"client\\\"),i4(this,\\\"httpProviders\\\"),i4(this,\\\"events\\\"),i4(this,\\\"namespace\\\"),i4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=B2(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},ALt=Object.defineProperty,TLt=(t,e,r)=>e in t?ALt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s4=(t,e,r)=>TLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Vle=class{constructor(e){s4(this,\\\"name\\\",\\\"algorand\\\"),s4(this,\\\"client\\\"),s4(this,\\\"httpProviders\\\"),s4(this,\\\"events\\\"),s4(this,\\\"namespace\\\"),s4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){let n=r||zl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);return typeof n>\\\"u\\\"?void 0:new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},ILt=Object.defineProperty,RLt=(t,e,r)=>e in t?ILt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,o4=(t,e,r)=>RLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Wle=class{constructor(e){o4(this,\\\"name\\\",\\\"cip34\\\"),o4(this,\\\"client\\\"),o4(this,\\\"httpProviders\\\"),o4(this,\\\"events\\\"),o4(this,\\\"namespace\\\"),o4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{let n=this.getCardanoRPCUrl(r),i=B2(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){let r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},PLt=Object.defineProperty,OLt=(t,e,r)=>e in t?PLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,a4=(t,e,r)=>OLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Gle=class{constructor(e){a4(this,\\\"name\\\",\\\"elrond\\\"),a4(this,\\\"client\\\"),a4(this,\\\"httpProviders\\\"),a4(this,\\\"events\\\"),a4(this,\\\"namespace\\\"),a4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=B2(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},NLt=Object.defineProperty,kLt=(t,e,r)=>e in t?NLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c4=(t,e,r)=>kLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Kle=class{constructor(e){c4(this,\\\"name\\\",\\\"multiversx\\\"),c4(this,\\\"client\\\"),c4(this,\\\"httpProviders\\\"),c4(this,\\\"events\\\"),c4(this,\\\"namespace\\\"),c4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=B2(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},BLt=Object.defineProperty,MLt=(t,e,r)=>e in t?BLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l4=(t,e,r)=>MLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Zle=class{constructor(e){l4(this,\\\"name\\\",\\\"near\\\"),l4(this,\\\"client\\\"),l4(this,\\\"httpProviders\\\"),l4(this,\\\"events\\\"),l4(this,\\\"namespace\\\"),l4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){let n=r||zl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace);return typeof n>\\\"u\\\"?void 0:new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},DLt=Object.defineProperty,LLt=(t,e,r)=>e in t?DLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u4=(t,e,r)=>LLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Qle=class{constructor(e){u4(this,\\\"name\\\",\\\"tezos\\\"),u4(this,\\\"client\\\"),u4(this,\\\"httpProviders\\\"),u4(this,\\\"events\\\"),u4(this,\\\"namespace\\\"),u4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){let n=r||zl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{e[r]=this.createHttpProvider(r)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace);return typeof n>\\\"u\\\"?void 0:new Ef.JsonRpcProvider(new dh.default(n))}},ULt=Object.defineProperty,FLt=(t,e,r)=>e in t?ULt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,d4=(t,e,r)=>FLt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Jle=class{constructor(e){d4(this,\\\"name\\\",f4),d4(this,\\\"client\\\"),d4(this,\\\"httpProviders\\\"),d4(this,\\\"events\\\"),d4(this,\\\"namespace\\\"),d4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Pr(\\\"events\\\"),this.client=Pr(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(ad.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){var e,r;let n={};return(r=(e=this.namespace)==null?void 0:e.accounts)==null||r.forEach(i=>{let s=ks.parseChainId(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){let r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||zl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new Ef.JsonRpcProvider(new dh.default(n,Pr(\\\"disableProviderPing\\\")))}},jLt=Object.defineProperty,HLt=Object.defineProperties,qLt=Object.getOwnPropertyDescriptors,qWe=Object.getOwnPropertySymbols,zLt=Object.prototype.hasOwnProperty,$Lt=Object.prototype.propertyIsEnumerable,Yle=(t,e,r)=>e in t?jLt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,mz=(t,e)=>{for(var r in e||(e={}))zLt.call(e,r)&&Yle(t,r,e[r]);if(qWe)for(var r of qWe(e))$Lt.call(e,r)&&Yle(t,r,e[r]);return t},Ule=(t,e)=>HLt(t,qLt(e)),od=(t,e,r)=>Yle(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),gz=class t{constructor(e){od(this,\\\"client\\\"),od(this,\\\"namespaces\\\"),od(this,\\\"optionalNamespaces\\\"),od(this,\\\"sessionProperties\\\"),od(this,\\\"scopedProperties\\\"),od(this,\\\"events\\\",new PDt.default),od(this,\\\"rpcProviders\\\",{}),od(this,\\\"session\\\"),od(this,\\\"providerOpts\\\"),od(this,\\\"logger\\\"),od(this,\\\"uri\\\"),od(this,\\\"disableProviderPing\\\",!1),this.providerOpts=e,this.logger=typeof e?.logger<\\\"u\\\"&&typeof e?.logger!=\\\"string\\\"?e.logger:RWe.pino(RWe.getDefaultLoggerOptions({level:e?.logger||PWe})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let r=new t(e);return await r.initialize(),r}async request(e,r,n){let[i,s]=this.validateChain(r);if(!this.session)throw new Error(\\\"Please call connect() before request()\\\");return await this.getProvider(i).request({request:mz({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,r,n,i){let s=new Date().getTime();this.request(e,n,i).then(o=>r(null,$We.formatJsonRpcResult(s,o))).catch(o=>r(o,void 0))}async enable(){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error(\\\"Please call connect() before enable()\\\");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:ks.getSdkError(\\\"USER_DISCONNECTED\\\")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,r){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:n,response:i}=await this.client.authenticate(e,r);n&&(this.uri=n,this.events.emit(\\\"display_uri\\\",n));let s=await i();if(this.session=s.session,this.session){let o=UWe(this.session.namespaces);this.namespaces=hz(this.namespaces,o),await this.persist(\\\"namespaces\\\",this.namespaces),this.onConnect()}return s}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){let{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});r&&(this.uri=r,this.events.emit(\\\"display_uri\\\",r));let i=await n();this.session=i;let s=UWe(i.namespaces);return this.namespaces=hz(this.namespaces,s),await this.persist(\\\"namespaces\\\",this.namespaces),await this.persist(\\\"optionalNamespaces\\\",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;let[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===f4?s.setDefaultChain(`${n}:${i}`,r):s.setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info(\\\"Cleaning up inactive pairings...\\\");let r=this.client.pairing.getAll();if(ks.isValidArray(r)){for(let n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.logger.warn(\\\"abortPairingAttempt is deprecated. This is now a no-op.\\\")}async checkStorage(){this.namespaces=await this.getFromStore(\\\"namespaces\\\")||{},this.optionalNamespaces=await this.getFromStore(\\\"optionalNamespaces\\\")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace(\\\"Initialized\\\"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,r;if(this.client=this.providerOpts.client||await RDt.default.init({core:this.providerOpts.core,logger:this.providerOpts.logger||PWe,relayUrl:this.providerOpts.relayUrl||ODt,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error(\\\"Failed to get session\\\",n),new Error(`The provided session: ${(r=(e=this.providerOpts)==null?void 0:e.session)==null?void 0:r.topic} doesn't exist in the Sign client`)}else{let n=this.client.session.getAll();this.session=n[0]}this.logger.trace(\\\"SignClient Initialized\\\")}createProviders(){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");if(!this.session)throw new Error(\\\"Session not initialized. Please call connect() before enable()\\\");let e=[...new Set(Object.keys(this.session.namespaces).map(r=>ks.parseNamespaceKey(r)))];Lle(\\\"client\\\",this.client),Lle(\\\"events\\\",this.events),Lle(\\\"disableProviderPing\\\",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;let n=hLt(r,this.session),i=YWe(n),s=hz(this.namespaces,this.optionalNamespaces),o=Ule(mz({},s[r]),{accounts:n,chains:i});switch(r){case\\\"eip155\\\":this.rpcProviders[r]=new qle({namespace:o});break;case\\\"algorand\\\":this.rpcProviders[r]=new Vle({namespace:o});break;case\\\"solana\\\":this.rpcProviders[r]=new zle({namespace:o});break;case\\\"cosmos\\\":this.rpcProviders[r]=new $le({namespace:o});break;case\\\"polkadot\\\":this.rpcProviders[r]=new jle({namespace:o});break;case\\\"cip34\\\":this.rpcProviders[r]=new Wle({namespace:o});break;case\\\"elrond\\\":this.rpcProviders[r]=new Gle({namespace:o});break;case\\\"multiversx\\\":this.rpcProviders[r]=new Kle({namespace:o});break;case\\\"near\\\":this.rpcProviders[r]=new Zle({namespace:o});break;case\\\"tezos\\\":this.rpcProviders[r]=new Qle({namespace:o});break;default:this.rpcProviders[f4]?this.rpcProviders[f4].updateNamespace(o):this.rpcProviders[f4]=new Jle({namespace:o})}})}registerEventListeners(){if(typeof this.client>\\\"u\\\")throw new Error(\\\"Sign Client is not initialized\\\");this.client.on(\\\"session_ping\\\",e=>{var r;let{topic:n}=e;n===((r=this.session)==null?void 0:r.topic)&&this.events.emit(\\\"session_ping\\\",e)}),this.client.on(\\\"session_event\\\",e=>{var r;let{params:n,topic:i}=e;if(i!==((r=this.session)==null?void 0:r.topic))return;let{event:s}=n;if(s.name===\\\"accountsChanged\\\"){let o=s.data;o&&ks.isValidArray(o)&&this.events.emit(\\\"accountsChanged\\\",o.map(LWe))}else if(s.name===\\\"chainChanged\\\"){let o=n.chainId,a=n.event.data,c=ks.parseNamespaceKey(o),l=Dle(o)!==Dle(a)?`${c}:${Dle(a)}`:o;this.onChainChanged(l)}else this.events.emit(s.name,s.data);this.events.emit(\\\"session_event\\\",e)}),this.client.on(\\\"session_update\\\",({topic:e,params:r})=>{var n,i;if(e!==((n=this.session)==null?void 0:n.topic))return;let{namespaces:s}=r,o=(i=this.client)==null?void 0:i.session.get(e);this.session=Ule(mz({},o),{namespaces:s}),this.onSessionUpdate(),this.events.emit(\\\"session_update\\\",{topic:e,params:r})}),this.client.on(\\\"session_delete\\\",async e=>{var r;e.topic===((r=this.session)==null?void 0:r.topic)&&(await this.cleanup(),this.events.emit(\\\"session_delete\\\",e),this.events.emit(\\\"disconnect\\\",Ule(mz({},ks.getSdkError(\\\"USER_DISCONNECTED\\\")),{data:e.topic})))}),this.on(ad.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[f4]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){let{namespaces:r={},optionalNamespaces:n={},sessionProperties:i,scopedProperties:s}=e;this.optionalNamespaces=hz(r,n),this.sessionProperties=i,this.scopedProperties=s}validateChain(e){let[r,n]=e?.split(\\\":\\\")||[\\\"\\\",\\\"\\\"];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>ks.parseNamespaceKey(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];let i=ks.parseNamespaceKey(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e,r=!1){if(!this.namespaces)return;let[n,i]=this.validateChain(e);if(!i)return;this.updateNamespaceChain(n,i),this.events.emit(\\\"chainChanged\\\",i);let s=this.getProvider(n).getDefaultChain();r||this.getProvider(n).setDefaultChain(i),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:s,newChainId:e}),await this.persist(\\\"namespaces\\\",this.namespaces)}emitAccountsChangedOnChainChange({namespace:e,previousChainId:r,newChainId:n}){var i,s;try{if(r===n)return;let o=(s=(i=this.session)==null?void 0:i.namespaces[e])==null?void 0:s.accounts;if(!o)return;let a=o.filter(c=>c.includes(`${n}:`)).map(LWe);if(!ks.isValidArray(a))return;this.events.emit(\\\"accountsChanged\\\",a)}catch(o){this.logger.warn(\\\"Failed to emit accountsChanged on chain change\\\",o)}}updateNamespaceChain(e,r){if(!this.namespaces)return;let n=this.namespaces[e]?e:`${e}:${r}`,i={chains:[],methods:[],events:[],defaultChain:r};this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=r):this.namespaces[n]=i}onConnect(){this.createProviders(),this.events.emit(\\\"connect\\\",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore(\\\"namespaces\\\"),await this.deleteFromStore(\\\"optionalNamespaces\\\"),await this.deleteFromStore(\\\"sessionProperties\\\"),this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,r){var n;let i=((n=this.session)==null?void 0:n.topic)||\\\"\\\";await this.client.core.storage.setItem(`${fz}/${e}${i}`,r)}async getFromStore(e){var r;let n=((r=this.session)==null?void 0:r.topic)||\\\"\\\";return await this.client.core.storage.getItem(`${fz}/${e}${n}`)}async deleteFromStore(e){var r;let n=((r=this.session)==null?void 0:r.topic)||\\\"\\\";await this.client.core.storage.removeItem(`${fz}/${e}${n}`)}async cleanupStorage(){var e;try{if(((e=this.client)==null?void 0:e.session.length)>0)return;let r=await this.client.core.storage.getKeys();for(let n of r)n.startsWith(fz)&&await this.client.core.storage.removeItem(n)}catch(r){this.logger.warn(\\\"Failed to cleanup storage\\\",r)}}},VLt=gz;yz.UniversalProvider=VLt,yz.default=gz});var _e,bz=x(()=>{u();_e={WC_NAME_SUFFIX:\\\".reown.id\\\",WC_NAME_SUFFIX_LEGACY:\\\".wcn.id\\\",BLOCKCHAIN_API_RPC_URL:\\\"https://rpc.walletconnect.org\\\",PULSE_API_URL:\\\"https://pulse.walletconnect.org\\\",W3M_API_URL:\\\"https://api.web3modal.org\\\",CONNECTOR_ID:{WALLET_CONNECT:\\\"walletConnect\\\",INJECTED:\\\"injected\\\",WALLET_STANDARD:\\\"announced\\\",COINBASE:\\\"coinbaseWallet\\\",COINBASE_SDK:\\\"coinbaseWalletSDK\\\",SAFE:\\\"safe\\\",LEDGER:\\\"ledger\\\",OKX:\\\"okx\\\",EIP6963:\\\"eip6963\\\",AUTH:\\\"ID_AUTH\\\"},CONNECTOR_NAMES:{AUTH:\\\"Auth\\\"},AUTH_CONNECTOR_SUPPORTED_CHAINS:[\\\"eip155\\\",\\\"solana\\\"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:\\\"eip155\\\",SOLANA:\\\"solana\\\",POLKADOT:\\\"polkadot\\\",BITCOIN:\\\"bip122\\\"},CHAIN_NAME_MAP:{eip155:\\\"EVM Networks\\\",solana:\\\"Solana\\\",polkadot:\\\"Polkadot\\\",bip122:\\\"Bitcoin\\\",cosmos:\\\"Cosmos\\\"},ADAPTER_TYPES:{BITCOIN:\\\"bitcoin\\\",SOLANA:\\\"solana\\\",WAGMI:\\\"wagmi\\\",ETHERS:\\\"ethers\\\",ETHERS5:\\\"ethers5\\\"},USDT_CONTRACT_ADDRESSES:[\\\"0xdac17f958d2ee523a2206206994597c13d831ec7\\\",\\\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\\\",\\\"0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7\\\",\\\"0x919C1c267BC06a7039e03fcc2eF738525769109c\\\",\\\"0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e\\\",\\\"0x55d398326f99059fF775485246999027B3197955\\\",\\\"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9\\\"],HTTP_STATUS_CODES:{SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:\\\"Unknown Network\\\",SECURE_SITE_SDK_ORIGIN:(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||\\\"https://secure.walletconnect.org\\\"}});var b7,tGe=x(()=>{u();bz();b7={caipNetworkIdToNumber(t){return t?Number(t.split(\\\":\\\")[1]):void 0},parseEvmChainId(t){return typeof t==\\\"string\\\"?this.caipNetworkIdToNumber(t):t},getNetworksByNamespace(t,e){return t?.filter(r=>r.chainNamespace===e)||[]},getFirstNetworkByNamespace(t,e){return this.getNetworksByNamespace(t,e)[0]},getNetworkNameByCaipNetworkId(t,e){if(!e)return;let r=t.find(i=>i.caipNetworkId===e);if(r)return r.name;let[n]=e.split(\\\":\\\");return _e.CHAIN_NAME_MAP?.[n]||void 0}}});function iGe(){function t(e){var r=this;if(!(r instanceof t))return e===fh?iGe():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!=\\\"string\\\"){if(t.strict===!0&&typeof e!=\\\"bigint\\\")throw TypeError(D2+\\\"value\\\");e=e===0&&1/e<0?\\\"-0\\\":String(e)}XLt(r,e)}r.constructor=t}return t.prototype=Zr,t.DP=WLt,t.RM=GLt,t.NE=KLt,t.PE=ZLt,t.strict=QLt,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function XLt(t,e){var r,n,i;if(!YLt.test(e))throw Error(D2+\\\"number\\\");for(t.s=e.charAt(0)==\\\"-\\\"?(e=e.slice(1),-1):1,(r=e.indexOf(\\\".\\\"))>-1&&(e=e.replace(\\\".\\\",\\\"\\\")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),i=e.length,n=0;n<i&&e.charAt(n)==\\\"0\\\";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)==\\\"0\\\";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function L2(t,e,r,n){var i=t.c;if(r===fh&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(JLt);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==fh))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==fh||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function U2(t,e,r){var n=t.e,i=t.c.join(\\\"\\\"),s=i.length;if(e)i=i.charAt(0)+(s>1?\\\".\\\"+i.slice(1):\\\"\\\")+(n<0?\\\"e\\\":\\\"e+\\\")+n;else if(n<0){for(;++n;)i=\\\"0\\\"+i;i=\\\"0.\\\"+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+=\\\"0\\\";else n<s&&(i=i.slice(0,n)+\\\".\\\"+i.slice(n));else s>1&&(i=i.charAt(0)+\\\".\\\"+i.slice(1));return t.s<0&&r?\\\"-\\\"+i:i}var WLt,GLt,M2,rGe,KLt,ZLt,QLt,w7,D2,wz,JLt,nGe,Zr,fh,YLt,eUt,h4,sGe=x(()=>{u();WLt=20,GLt=1,M2=1e6,rGe=1e6,KLt=-7,ZLt=21,QLt=!1,w7=\\\"[big.js] \\\",D2=w7+\\\"Invalid \\\",wz=D2+\\\"decimal places\\\",JLt=D2+\\\"rounding mode\\\",nGe=w7+\\\"Division by zero\\\",Zr={},fh=void 0,YLt=/^-?(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)(e[+-]?\\\\d+)?$/i;Zr.abs=function(){var t=new this.constructor(this);return t.s=1,t};Zr.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,o=t.s,a=r.e,c=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-o:0;if(s!=o)return s;if(e=s<0,a!=c)return a>c^e?1:-1;for(o=(a=n.length)<(c=i.length)?a:c,s=-1;++s<o;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return a==c?0:a>c^e?1:-1};Zr.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,o=r.DP;if(o!==~~o||o<0||o>M2)throw Error(wz);if(!i[0])throw Error(nGe);if(!n[0])return t.s=s,t.c=[t.e=0],t;var a,c,l,d,f,p=i.slice(),h=a=i.length,m=n.length,g=n.slice(0,a),w=g.length,v=t,b=v.c=[],_=0,S=o+(v.e=e.e-t.e)+1;for(v.s=s,s=S<0?0:S,p.unshift(0);w++<a;)g.push(0);do{for(l=0;l<10;l++){if(a!=(w=g.length))d=a>w?1:-1;else for(f=-1,d=0;++f<a;)if(i[f]!=g[f]){d=i[f]>g[f]?1:-1;break}if(d<0){for(c=w==a?i:p;w;){if(g[--w]<c[w]){for(f=w;f&&!g[--f];)g[f]=9;--g[f],g[w]+=10}g[w]-=c[w]}for(;!g[0];)g.shift()}else break}b[_++]=d?l:++l,g[0]&&d?g[w]=n[h]||0:g=[n[h]]}while((h++<m||g[0]!==fh)&&s--);return!b[0]&&_!=1&&(b.shift(),v.e--,S--),_>S&&L2(v,S,r.RM,g[0]!==fh),v};Zr.eq=function(t){return this.cmp(t)===0};Zr.gt=function(t){return this.cmp(t)>0};Zr.gte=function(t){return this.cmp(t)>-1};Zr.lt=function(t){return this.cmp(t)<0};Zr.lte=function(t){return this.cmp(t)<1};Zr.minus=Zr.sub=function(t){var e,r,n,i,s=this,o=s.constructor,a=s.s,c=(t=new o(t)).s;if(a!=c)return t.s=-c,s.plus(t);var l=s.c.slice(),d=s.e,f=t.c,p=t.e;if(!l[0]||!f[0])return f[0]?t.s=-c:l[0]?t=new o(s):t.s=1,t;if(a=d-p){for((i=a<0)?(a=-a,n=l):(p=d,n=f),n.reverse(),c=a;c--;)n.push(0);n.reverse()}else for(r=((i=l.length<f.length)?l:f).length,a=c=0;c<r;c++)if(l[c]!=f[c]){i=l[c]<f[c];break}if(i&&(n=l,l=f,f=n,t.s=-t.s),(c=(r=f.length)-(e=l.length))>0)for(;c--;)l[e++]=0;for(c=e;r>a;){if(l[--r]<f[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=f[r]}for(;l[--c]===0;)l.pop();for(;l[0]===0;)l.shift(),--p;return l[0]||(t.s=1,l=[p=0]),t.c=l,t.e=p,t};Zr.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(nGe);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};Zr.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};Zr.plus=Zr.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var o=i.e,a=i.c,c=t.e,l=t.c;if(!a[0]||!l[0])return l[0]||(a[0]?t=new s(i):t.s=i.s),t;if(a=a.slice(),e=o-c){for(e>0?(c=o,n=l):(e=-e,n=a),n.reverse();e--;)n.push(0);n.reverse()}for(a.length-l.length<0&&(n=l,l=a,a=n),e=l.length,r=0;e;a[e]%=10)r=(a[--e]=a[e]+l[e]+r)/10|0;for(r&&(a.unshift(r),++c),e=a.length;a[--e]===0;)a.pop();return t.c=a,t.e=c,t};Zr.pow=function(t){var e=this,r=new e.constructor(\\\"1\\\"),n=r,i=t<0;if(t!==~~t||t<-rGe||t>rGe)throw Error(D2+\\\"exponent\\\");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};Zr.prec=function(t,e){if(t!==~~t||t<1||t>M2)throw Error(D2+\\\"precision\\\");return L2(new this.constructor(this),t,e)};Zr.round=function(t,e){if(t===fh)t=0;else if(t!==~~t||t<-M2||t>M2)throw Error(wz);return L2(new this.constructor(this),t+this.e+1,e)};Zr.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,o=n.e,a=new i(\\\"0.5\\\");if(!n.c[0])return new i(n);if(s<0)throw Error(w7+\\\"No square root\\\");s=Math.sqrt(+U2(n,!0,!0)),s===0||s===1/0?(e=n.c.join(\\\"\\\"),e.length+o&1||(e+=\\\"0\\\"),s=Math.sqrt(e),o=((o+1)/2|0)-(o<0||o&1),t=new i((s==1/0?\\\"5e\\\":(s=s.toExponential()).slice(0,s.indexOf(\\\"e\\\")+1))+o)):t=new i(s+\\\"\\\"),o=t.e+(i.DP+=4);do r=t,t=a.times(r.plus(n.div(r)));while(r.c.slice(0,o).join(\\\"\\\")!==t.c.slice(0,o).join(\\\"\\\"));return L2(t,(i.DP-=4)+t.e+1,i.RM)};Zr.times=Zr.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,o=i.length,a=s.length,c=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=c+l,o<a&&(e=i,i=s,s=e,l=o,o=a,a=l),e=new Array(l=o+a);l--;)e[l]=0;for(c=a;c--;){for(a=0,l=o+c;l>c;)a=e[l]+s[c]*i[l-c-1]+a,e[l--]=a%10,a=a/10|0;e[l]=a}for(a?++t.e:e.shift(),c=e.length;!e[--c];)e.pop();return t.c=e,t};Zr.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==fh){if(t!==~~t||t<0||t>M2)throw Error(wz);for(r=L2(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return U2(r,!0,!!n)};Zr.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==fh){if(t!==~~t||t<0||t>M2)throw Error(wz);for(r=L2(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return U2(r,!1,!!n)};Zr[Symbol.for(\\\"nodejs.util.inspect.custom\\\")]=Zr.toJSON=Zr.toString=function(){var t=this,e=t.constructor;return U2(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};Zr.toNumber=function(){var t=+U2(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(w7+\\\"Imprecise conversion\\\");return t};Zr.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==fh){if(t!==~~t||t<1||t>M2)throw Error(D2+\\\"precision\\\");for(r=L2(new n(r),t,e);r.c.length<t;)r.c.push(0)}return U2(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};Zr.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(w7+\\\"valueOf disallowed\\\");return U2(t,t.e<=e.NE||t.e>=e.PE,!0)};eUt=iGe(),h4=eUt});var rue,oGe=x(()=>{u();sGe();rue={bigNumber(t){return t?new h4(t):new h4(0)},multiply(t,e){if(t===void 0||e===void 0)return new h4(0);let r=new h4(t),n=new h4(e);return r.times(n)},formatNumberToLocalString(t,e=2){return t===void 0?\\\"0.00\\\":typeof t==\\\"number\\\"?t.toLocaleString(\\\"en-US\\\",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString(\\\"en-US\\\",{maximumFractionDigits:e,minimumFractionDigits:e})},parseLocalStringToNumber(t){return t===void 0?0:parseFloat(t.replace(/,/gu,\\\"\\\"))}}});var aGe,cGe=x(()=>{u();aGe=[{type:\\\"function\\\",name:\\\"transfer\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"_to\\\",type:\\\"address\\\"},{name:\\\"_value\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"bool\\\"}]},{type:\\\"function\\\",name:\\\"transferFrom\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"_from\\\",type:\\\"address\\\"},{name:\\\"_to\\\",type:\\\"address\\\"},{name:\\\"_value\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"bool\\\"}]}]});var lGe,uGe=x(()=>{u();lGe=[{type:\\\"function\\\",name:\\\"approve\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"spender\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[{type:\\\"bool\\\"}]}]});var dGe,fGe=x(()=>{u();dGe=[{type:\\\"function\\\",name:\\\"transfer\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"recipient\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[]},{type:\\\"function\\\",name:\\\"transferFrom\\\",stateMutability:\\\"nonpayable\\\",inputs:[{name:\\\"sender\\\",type:\\\"address\\\"},{name:\\\"recipient\\\",type:\\\"address\\\"},{name:\\\"amount\\\",type:\\\"uint256\\\"}],outputs:[{name:\\\"\\\",type:\\\"bool\\\"}]}]});var nue,pGe=x(()=>{u();cGe();uGe();fGe();bz();nue={getERC20Abi:t=>_e.USDT_CONTRACT_ADDRESSES.includes(t)?dGe:aGe,getSwapAbi:()=>lGe}});var ph,hGe=x(()=>{u();ph={validateCaipAddress(t){if(t.split(\\\":\\\")?.length!==3)throw new Error(\\\"Invalid CAIP Address\\\");return t},parseCaipAddress(t){let e=t.split(\\\":\\\");if(e.length!==3)throw new Error(`Invalid CAIP-10 address: ${t}`);let[r,n,i]=e;if(!r||!n||!i)throw new Error(`Invalid CAIP-10 address: ${t}`);return{chainNamespace:r,chainId:n,address:i}},parseCaipNetworkId(t){let e=t.split(\\\":\\\");if(e.length!==2)throw new Error(`Invalid CAIP-2 network id: ${t}`);let[r,n]=e;if(!r||!n)throw new Error(`Invalid CAIP-2 network id: ${t}`);return{chainNamespace:r,chainId:n}}}});function v7(t){if(!t)throw new Error(\\\"Namespace is required for CONNECTED_CONNECTOR_ID\\\");return`@appkit/${t}:connected_connector_id`}function F2(){return typeof window<\\\"u\\\"&&typeof localStorage<\\\"u\\\"}var vt,ft,mGe=x(()=>{u();vt={WALLET_ID:\\\"@appkit/wallet_id\\\",WALLET_NAME:\\\"@appkit/wallet_name\\\",SOLANA_WALLET:\\\"@appkit/solana_wallet\\\",SOLANA_CAIP_CHAIN:\\\"@appkit/solana_caip_chain\\\",ACTIVE_CAIP_NETWORK_ID:\\\"@appkit/active_caip_network_id\\\",CONNECTED_SOCIAL:\\\"@appkit/connected_social\\\",CONNECTED_SOCIAL_USERNAME:\\\"@appkit-wallet/SOCIAL_USERNAME\\\",RECENT_WALLETS:\\\"@appkit/recent_wallets\\\",DEEPLINK_CHOICE:\\\"WALLETCONNECT_DEEPLINK_CHOICE\\\",ACTIVE_NAMESPACE:\\\"@appkit/active_namespace\\\",CONNECTED_NAMESPACES:\\\"@appkit/connected_namespaces\\\",CONNECTION_STATUS:\\\"@appkit/connection_status\\\",SIWX_AUTH_TOKEN:\\\"@appkit/siwx-auth-token\\\",SIWX_NONCE_TOKEN:\\\"@appkit/siwx-nonce-token\\\",TELEGRAM_SOCIAL_PROVIDER:\\\"@appkit/social_provider\\\",NATIVE_BALANCE_CACHE:\\\"@appkit/native_balance_cache\\\",PORTFOLIO_CACHE:\\\"@appkit/portfolio_cache\\\",ENS_CACHE:\\\"@appkit/ens_cache\\\",IDENTITY_CACHE:\\\"@appkit/identity_cache\\\",PREFERRED_ACCOUNT_TYPES:\\\"@appkit/preferred_account_types\\\",CONNECTIONS:\\\"@appkit/connections\\\"};ft={setItem(t,e){F2()&&e!==void 0&&localStorage.setItem(t,e)},getItem(t){if(F2())return localStorage.getItem(t)||void 0},removeItem(t){F2()&&localStorage.removeItem(t)},clear(){F2()&&localStorage.clear()}}});function cd(t,e){return e===\\\"light\\\"?{\\\"--w3m-accent\\\":t?.[\\\"--w3m-accent\\\"]||\\\"hsla(231, 100%, 70%, 1)\\\",\\\"--w3m-background\\\":\\\"#fff\\\"}:{\\\"--w3m-accent\\\":t?.[\\\"--w3m-accent\\\"]||\\\"hsla(230, 100%, 67%, 1)\\\",\\\"--w3m-background\\\":\\\"#121313\\\"}}var gGe=x(()=>{u()});var Ri=x(()=>{u();tGe();oGe();pGe();bz();hGe();mGe();gGe()});var tUt,yGe,iue,rUt,bGe,sue,wGe=x(()=>{u();tUt=Symbol(),yGe=Object.getPrototypeOf,iue=new WeakMap,rUt=t=>t&&(iue.has(t)?iue.get(t):yGe(t)===Object.prototype||yGe(t)===Array.prototype),bGe=t=>rUt(t)&&t[tUt]||null,sue=(t,e=!0)=>{iue.set(t,e)}});function ot(t={}){return iUt(t)}function Lr(t,e,r){let n=N1.get(t);(k1.env?k1.env.MODE:void 0)!==\\\"production\\\"&&!n&&console.warn(\\\"Please use proxy object\\\");let i,s=[],o=n[3],a=!1,l=o(d=>{if(s.push(d),r){e(s.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function hh(t,e){let r=N1.get(t);(k1.env?k1.env.MODE:void 0)!==\\\"production\\\"&&!r&&console.warn(\\\"Please use proxy object\\\");let[n,i,s]=r;return s(n,i(),e)}function $l(t){return x7.add(t),t}var k1,oue,N1,x7,nUt,iUt,Kn=x(()=>{u();wGe();k1={},oue=t=>typeof t==\\\"object\\\"&&t!==null,N1=new WeakMap,x7=new WeakSet,nUt=(t=Object.is,e=(l,d)=>new Proxy(l,d),r=l=>oue(l)&&!x7.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),n=l=>{switch(l.status){case\\\"fulfilled\\\":return l.value;case\\\"rejected\\\":throw l.reason;default:throw l}},i=new WeakMap,s=(l,d,f=n)=>{let p=i.get(l);if(p?.[0]===d)return p[1];let h=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return sue(h,!0),i.set(l,[d,h]),Reflect.ownKeys(l).forEach(m=>{if(Object.getOwnPropertyDescriptor(h,m))return;let g=Reflect.get(l,m),{enumerable:w}=Reflect.getOwnPropertyDescriptor(l,m),v={value:g,enumerable:w,configurable:!0};if(x7.has(g))sue(g,!1);else if(g instanceof Promise)delete v.value,v.get=()=>f(g);else if(N1.has(g)){let[b,_]=N1.get(g);v.value=s(b,_(),f)}Object.defineProperty(h,m,v)}),Object.preventExtensions(h)},o=new WeakMap,a=[1,1],c=l=>{if(!oue(l))throw new Error(\\\"object required\\\");let d=o.get(l);if(d)return d;let f=a[0],p=new Set,h=(B,H=++a[0])=>{f!==H&&(f=H,p.forEach(M=>M(B,H)))},m=a[1],g=(B=++a[1])=>(m!==B&&!p.size&&(m=B,v.forEach(([H])=>{let M=H[1](B);M>f&&(f=M)})),f),w=B=>(H,M)=>{let F=[...H];F[1]=[B,...F[1]],h(F,M)},v=new Map,b=(B,H)=>{if((k1.env?k1.env.MODE:void 0)!==\\\"production\\\"&&v.has(B))throw new Error(\\\"prop listener already exists\\\");if(p.size){let M=H[3](w(B));v.set(B,[H,M])}else v.set(B,[H])},_=B=>{var H;let M=v.get(B);M&&(v.delete(B),(H=M[1])==null||H.call(M))},S=B=>(p.add(B),p.size===1&&v.forEach(([M,F],R)=>{if((k1.env?k1.env.MODE:void 0)!==\\\"production\\\"&&F)throw new Error(\\\"remove already exists\\\");let y=M[3](w(R));v.set(R,[M,y])}),()=>{p.delete(B),p.size===0&&v.forEach(([M,F],R)=>{F&&(F(),v.set(R,[M]))})}),T=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),O=e(T,{deleteProperty(B,H){let M=Reflect.get(B,H);_(H);let F=Reflect.deleteProperty(B,H);return F&&h([\\\"delete\\\",[H],M]),F},set(B,H,M,F){let R=Reflect.has(B,H),y=Reflect.get(B,H,F);if(R&&(t(y,M)||o.has(M)&&t(y,o.get(M))))return!0;_(H),oue(M)&&(M=bGe(M)||M);let E=M;if(M instanceof Promise)M.then(C=>{M.status=\\\"fulfilled\\\",M.value=C,h([\\\"resolve\\\",[H],C])}).catch(C=>{M.status=\\\"rejected\\\",M.reason=C,h([\\\"reject\\\",[H],C])});else{!N1.has(M)&&r(M)&&(E=c(M));let C=!x7.has(E)&&N1.get(E);C&&b(H,C)}return Reflect.set(B,H,E,F),h([\\\"set\\\",[H],M,y]),!0}});o.set(l,O);let L=[T,g,s,S];return N1.set(O,L),Reflect.ownKeys(l).forEach(B=>{let H=Object.getOwnPropertyDescriptor(l,B);\\\"value\\\"in H&&(O[B]=l[B],delete H.value,delete H.writable),Object.defineProperty(T,B,H)}),O})=>[c,N1,x7,t,e,r,n,i,s,o,a],[iUt]=nUt()});function lr(t,e,r,n){let i=t[e];return Lr(t,()=>{let s=t[e];Object.is(i,s)||r(i=s)},n)}function vGe(t){let e=ot({data:Array.from(t||[]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){let i=this.data.find(s=>s[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){let n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return\\\"Map\\\"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(e,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(e),e}var xo=x(()=>{u();Kn()});var aue,cue,xGe,Rt,mh=x(()=>{u();aue=(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||\\\"https://secure.walletconnect.org\\\",cue=[{label:\\\"Coinbase\\\",name:\\\"coinbase\\\",feeRange:\\\"1-2%\\\",url:\\\"\\\",supportedChains:[\\\"eip155\\\"]},{label:\\\"Meld.io\\\",name:\\\"meld\\\",feeRange:\\\"1-2%\\\",url:\\\"https://meldcrypto.com\\\",supportedChains:[\\\"eip155\\\",\\\"solana\\\"]}],xGe=\\\"WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU\\\",Rt={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,FIVE_SEC_MS:5e3,THREE_SEC_MS:3e3,ONE_SEC_MS:1e3,SECURE_SITE:aue,SECURE_SITE_DASHBOARD:`${aue}/dashboard`,SECURE_SITE_FAVICON:`${aue}/images/favicon.png`,RESTRICTED_TIMEZONES:[\\\"ASIA/SHANGHAI\\\",\\\"ASIA/URUMQI\\\",\\\"ASIA/CHONGQING\\\",\\\"ASIA/HARBIN\\\",\\\"ASIA/KASHGAR\\\",\\\"ASIA/MACAU\\\",\\\"ASIA/HONG_KONG\\\",\\\"ASIA/MACAO\\\",\\\"ASIA/BEIJING\\\",\\\"ASIA/HARBIN\\\"],WC_COINBASE_PAY_SDK_CHAINS:[\\\"ethereum\\\",\\\"arbitrum\\\",\\\"polygon\\\",\\\"berachain\\\",\\\"avalanche-c-chain\\\",\\\"optimism\\\",\\\"celo\\\",\\\"base\\\"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:\\\"ethereum\\\",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:\\\"ethereum\\\",\\\"Arbitrum One\\\":\\\"arbitrum\\\",Polygon:\\\"polygon\\\",Berachain:\\\"berachain\\\",Avalanche:\\\"avalanche-c-chain\\\",\\\"OP Mainnet\\\":\\\"optimism\\\",Celo:\\\"celo\\\",Base:\\\"base\\\"},WC_COINBASE_ONRAMP_APP_ID:\\\"bf18c88d-495a-463b-b249-0b9d3656cf5e\\\",SWAP_SUGGESTED_TOKENS:[\\\"ETH\\\",\\\"UNI\\\",\\\"1INCH\\\",\\\"AAVE\\\",\\\"SOL\\\",\\\"ADA\\\",\\\"AVAX\\\",\\\"DOT\\\",\\\"LINK\\\",\\\"NITRO\\\",\\\"GAIA\\\",\\\"MILK\\\",\\\"TRX\\\",\\\"NEAR\\\",\\\"GNO\\\",\\\"WBTC\\\",\\\"DAI\\\",\\\"WETH\\\",\\\"USDC\\\",\\\"USDT\\\",\\\"ARB\\\",\\\"BAL\\\",\\\"BICO\\\",\\\"CRV\\\",\\\"ENS\\\",\\\"MATIC\\\",\\\"OP\\\"],SWAP_POPULAR_TOKENS:[\\\"ETH\\\",\\\"UNI\\\",\\\"1INCH\\\",\\\"AAVE\\\",\\\"SOL\\\",\\\"ADA\\\",\\\"AVAX\\\",\\\"DOT\\\",\\\"LINK\\\",\\\"NITRO\\\",\\\"GAIA\\\",\\\"MILK\\\",\\\"TRX\\\",\\\"NEAR\\\",\\\"GNO\\\",\\\"WBTC\\\",\\\"DAI\\\",\\\"WETH\\\",\\\"USDC\\\",\\\"USDT\\\",\\\"ARB\\\",\\\"BAL\\\",\\\"BICO\\\",\\\"CRV\\\",\\\"ENS\\\",\\\"MATIC\\\",\\\"OP\\\",\\\"METAL\\\",\\\"DAI\\\",\\\"CHAMP\\\",\\\"WOLF\\\",\\\"SALE\\\",\\\"BAL\\\",\\\"BUSD\\\",\\\"MUST\\\",\\\"BTCpx\\\",\\\"ROUTE\\\",\\\"HEX\\\",\\\"WELT\\\",\\\"amDAI\\\",\\\"VSQ\\\",\\\"VISION\\\",\\\"AURUM\\\",\\\"pSP\\\",\\\"SNX\\\",\\\"VC\\\",\\\"LINK\\\",\\\"CHP\\\",\\\"amUSDT\\\",\\\"SPHERE\\\",\\\"FOX\\\",\\\"GIDDY\\\",\\\"GFC\\\",\\\"OMEN\\\",\\\"OX_OLD\\\",\\\"DE\\\",\\\"WNT\\\"],BALANCE_SUPPORTED_CHAINS:[\\\"eip155\\\",\\\"solana\\\"],SWAP_SUPPORTED_NETWORKS:[\\\"eip155:1\\\",\\\"eip155:42161\\\",\\\"eip155:10\\\",\\\"eip155:324\\\",\\\"eip155:8453\\\",\\\"eip155:56\\\",\\\"eip155:137\\\",\\\"eip155:100\\\",\\\"eip155:43114\\\",\\\"eip155:250\\\",\\\"eip155:8217\\\",\\\"eip155:1313161554\\\"],NAMES_SUPPORTED_CHAIN_NAMESPACES:[\\\"eip155\\\"],ONRAMP_SUPPORTED_CHAIN_NAMESPACES:[\\\"eip155\\\",\\\"solana\\\"],ACTIVITY_ENABLED_CHAIN_NAMESPACES:[\\\"eip155\\\"],NATIVE_TOKEN_ADDRESS:{eip155:\\\"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\\\",solana:\\\"So11111111111111111111111111111111111111111\\\",polkadot:\\\"0x\\\",bip122:\\\"0x\\\",cosmos:\\\"0x\\\"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:\\\"Open and continue in the wallet app\\\",WEB:\\\"Open and continue in the wallet app\\\"},SEND_SUPPORTED_NAMESPACES:[\\\"eip155\\\",\\\"solana\\\"],DEFAULT_REMOTE_FEATURES:{swaps:[\\\"1inch\\\"],onramp:[\\\"coinbase\\\",\\\"meld\\\"],email:!0,socials:[\\\"google\\\",\\\"x\\\",\\\"discord\\\",\\\"farcaster\\\",\\\"github\\\",\\\"apple\\\",\\\"facebook\\\"],activity:!0,reownBranding:!0},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:[\\\"walletConnect\\\",\\\"recent\\\",\\\"injected\\\",\\\"featured\\\",\\\"custom\\\",\\\"external\\\",\\\"recommended\\\"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:[\\\"onramp\\\",\\\"swaps\\\",\\\"receive\\\",\\\"send\\\"],connectMethodsOrder:void 0,pay:!1},DEFAULT_SOCIALS:[\\\"google\\\",\\\"x\\\",\\\"farcaster\\\",\\\"discord\\\",\\\"apple\\\",\\\"github\\\",\\\"facebook\\\"],DEFAULT_ACCOUNT_TYPES:{bip122:\\\"payment\\\",eip155:\\\"smartAccount\\\",polkadot:\\\"eoa\\\",solana:\\\"eoa\\\"},ADAPTER_TYPES:{UNIVERSAL:\\\"universal\\\",SOLANA:\\\"solana\\\",WAGMI:\\\"wagmi\\\",ETHERS:\\\"ethers\\\",ETHERS5:\\\"ethers5\\\",BITCOIN:\\\"bitcoin\\\"}}});var Te,_0=x(()=>{u();Ri();Te={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5},isCacheExpired(t,e){return Date.now()-t>e},getActiveNetworkProps(){let t=Te.getActiveNamespace(),e=Te.getActiveCaipNetworkId(),r=e?e.split(\\\":\\\")[1]:void 0,n=r?isNaN(Number(r))?r:Number(r):void 0;return{namespace:t,caipNetworkId:e,chainId:n}},setWalletConnectDeepLink({name:t,href:e}){try{ft.setItem(vt.DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info(\\\"Unable to set WalletConnect deep link\\\")}},getWalletConnectDeepLink(){try{let t=ft.getItem(vt.DEEPLINK_CHOICE);if(t)return JSON.parse(t)}catch{console.info(\\\"Unable to get WalletConnect deep link\\\")}},deleteWalletConnectDeepLink(){try{ft.removeItem(vt.DEEPLINK_CHOICE)}catch{console.info(\\\"Unable to delete WalletConnect deep link\\\")}},setActiveNamespace(t){try{ft.setItem(vt.ACTIVE_NAMESPACE,t)}catch{console.info(\\\"Unable to set active namespace\\\")}},setActiveCaipNetworkId(t){try{ft.setItem(vt.ACTIVE_CAIP_NETWORK_ID,t),Te.setActiveNamespace(t.split(\\\":\\\")[0])}catch{console.info(\\\"Unable to set active caip network id\\\")}},getActiveCaipNetworkId(){try{return ft.getItem(vt.ACTIVE_CAIP_NETWORK_ID)}catch{console.info(\\\"Unable to get active caip network id\\\");return}},deleteActiveCaipNetworkId(){try{ft.removeItem(vt.ACTIVE_CAIP_NETWORK_ID)}catch{console.info(\\\"Unable to delete active caip network id\\\")}},deleteConnectedConnectorId(t){try{let e=v7(t);ft.removeItem(e)}catch{console.info(\\\"Unable to delete connected connector id\\\")}},setAppKitRecent(t){try{let e=Te.getRecentWallets();e.find(n=>n.id===t.id)||(e.unshift(t),e.length>2&&e.pop(),ft.setItem(vt.RECENT_WALLETS,JSON.stringify(e)))}catch{console.info(\\\"Unable to set AppKit recent\\\")}},getRecentWallets(){try{let t=ft.getItem(vt.RECENT_WALLETS);return t?JSON.parse(t):[]}catch{console.info(\\\"Unable to get AppKit recent\\\")}return[]},setConnectedConnectorId(t,e){try{let r=v7(t);ft.setItem(r,e)}catch{console.info(\\\"Unable to set Connected Connector Id\\\")}},getActiveNamespace(){try{return ft.getItem(vt.ACTIVE_NAMESPACE)}catch{console.info(\\\"Unable to get active namespace\\\")}},getConnectedConnectorId(t){if(t)try{let e=v7(t);return ft.getItem(e)}catch{console.info(\\\"Unable to get connected connector id in namespace \\\",t)}},setConnectedSocialProvider(t){try{ft.setItem(vt.CONNECTED_SOCIAL,t)}catch{console.info(\\\"Unable to set connected social provider\\\")}},getConnectedSocialProvider(){try{return ft.getItem(vt.CONNECTED_SOCIAL)}catch{console.info(\\\"Unable to get connected social provider\\\")}},deleteConnectedSocialProvider(){try{ft.removeItem(vt.CONNECTED_SOCIAL)}catch{console.info(\\\"Unable to delete connected social provider\\\")}},getConnectedSocialUsername(){try{return ft.getItem(vt.CONNECTED_SOCIAL_USERNAME)}catch{console.info(\\\"Unable to get connected social username\\\")}},getStoredActiveCaipNetworkId(){return ft.getItem(vt.ACTIVE_CAIP_NETWORK_ID)?.split(\\\":\\\")?.[1]},setConnectionStatus(t){try{ft.setItem(vt.CONNECTION_STATUS,t)}catch{console.info(\\\"Unable to set connection status\\\")}},getConnectionStatus(){try{return ft.getItem(vt.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{let t=ft.getItem(vt.CONNECTED_NAMESPACES);return t?.length?t.split(\\\",\\\"):[]}catch{return[]}},setConnectedNamespaces(t){try{let e=Array.from(new Set(t));ft.setItem(vt.CONNECTED_NAMESPACES,e.join(\\\",\\\"))}catch{console.info(\\\"Unable to set namespaces in storage\\\")}},addConnectedNamespace(t){try{let e=Te.getConnectedNamespaces();e.includes(t)||(e.push(t),Te.setConnectedNamespaces(e))}catch{console.info(\\\"Unable to add connected namespace\\\")}},removeConnectedNamespace(t){try{let e=Te.getConnectedNamespaces(),r=e.indexOf(t);r>-1&&(e.splice(r,1),Te.setConnectedNamespaces(e))}catch{console.info(\\\"Unable to remove connected namespace\\\")}},getTelegramSocialProvider(){try{return ft.getItem(vt.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info(\\\"Unable to get telegram social provider\\\"),null}},setTelegramSocialProvider(t){try{ft.setItem(vt.TELEGRAM_SOCIAL_PROVIDER,t)}catch{console.info(\\\"Unable to set telegram social provider\\\")}},removeTelegramSocialProvider(){try{ft.removeItem(vt.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info(\\\"Unable to remove telegram social provider\\\")}},getBalanceCache(){let t={};try{let e=ft.getItem(vt.PORTFOLIO_CACHE);t=e?JSON.parse(e):{}}catch{console.info(\\\"Unable to get balance cache\\\")}return t},removeAddressFromBalanceCache(t){try{let e=Te.getBalanceCache();ft.setItem(vt.PORTFOLIO_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info(\\\"Unable to remove address from balance cache\\\",t)}},getBalanceCacheForCaipAddress(t){try{let r=Te.getBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.portfolio))return r.balance;Te.removeAddressFromBalanceCache(t)}catch{console.info(\\\"Unable to get balance cache for address\\\",t)}},updateBalanceCache(t){try{let e=Te.getBalanceCache();e[t.caipAddress]=t,ft.setItem(vt.PORTFOLIO_CACHE,JSON.stringify(e))}catch{console.info(\\\"Unable to update balance cache\\\",t)}},getNativeBalanceCache(){let t={};try{let e=ft.getItem(vt.NATIVE_BALANCE_CACHE);t=e?JSON.parse(e):{}}catch{console.info(\\\"Unable to get balance cache\\\")}return t},removeAddressFromNativeBalanceCache(t){try{let e=Te.getBalanceCache();ft.setItem(vt.NATIVE_BALANCE_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info(\\\"Unable to remove address from balance cache\\\",t)}},getNativeBalanceCacheForCaipAddress(t){try{let r=Te.getNativeBalanceCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.nativeBalance))return r;console.info(\\\"Discarding cache for address\\\",t),Te.removeAddressFromBalanceCache(t)}catch{console.info(\\\"Unable to get balance cache for address\\\",t)}},updateNativeBalanceCache(t){try{let e=Te.getNativeBalanceCache();e[t.caipAddress]=t,ft.setItem(vt.NATIVE_BALANCE_CACHE,JSON.stringify(e))}catch{console.info(\\\"Unable to update balance cache\\\",t)}},getEnsCache(){let t={};try{let e=ft.getItem(vt.ENS_CACHE);t=e?JSON.parse(e):{}}catch{console.info(\\\"Unable to get ens name cache\\\")}return t},getEnsFromCacheForAddress(t){try{let r=Te.getEnsCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.ens))return r.ens;Te.removeEnsFromCache(t)}catch{console.info(\\\"Unable to get ens name from cache\\\",t)}},updateEnsCache(t){try{let e=Te.getEnsCache();e[t.address]=t,ft.setItem(vt.ENS_CACHE,JSON.stringify(e))}catch{console.info(\\\"Unable to update ens name cache\\\",t)}},removeEnsFromCache(t){try{let e=Te.getEnsCache();ft.setItem(vt.ENS_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info(\\\"Unable to remove ens name from cache\\\",t)}},getIdentityCache(){let t={};try{let e=ft.getItem(vt.IDENTITY_CACHE);t=e?JSON.parse(e):{}}catch{console.info(\\\"Unable to get identity cache\\\")}return t},getIdentityFromCacheForAddress(t){try{let r=Te.getIdentityCache()[t];if(r&&!this.isCacheExpired(r.timestamp,this.cacheExpiry.identity))return r.identity;Te.removeIdentityFromCache(t)}catch{console.info(\\\"Unable to get identity from cache\\\",t)}},updateIdentityCache(t){try{let e=Te.getIdentityCache();e[t.address]={identity:t.identity,timestamp:t.timestamp},ft.setItem(vt.IDENTITY_CACHE,JSON.stringify(e))}catch{console.info(\\\"Unable to update identity cache\\\",t)}},removeIdentityFromCache(t){try{let e=Te.getIdentityCache();ft.setItem(vt.IDENTITY_CACHE,JSON.stringify({...e,[t]:void 0}))}catch{console.info(\\\"Unable to remove identity from cache\\\",t)}},clearAddressCache(){try{ft.removeItem(vt.PORTFOLIO_CACHE),ft.removeItem(vt.NATIVE_BALANCE_CACHE),ft.removeItem(vt.ENS_CACHE),ft.removeItem(vt.IDENTITY_CACHE)}catch{console.info(\\\"Unable to clear address cache\\\")}},setPreferredAccountTypes(t){try{ft.setItem(vt.PREFERRED_ACCOUNT_TYPES,JSON.stringify(t))}catch{console.info(\\\"Unable to set preferred account types\\\",t)}},getPreferredAccountTypes(){try{let t=ft.getItem(vt.PREFERRED_ACCOUNT_TYPES);return t?JSON.parse(t):{}}catch{console.info(\\\"Unable to get preferred account types\\\")}return{}},setConnections(t,e){try{let r={...Te.getConnections(),[e]:t};ft.setItem(vt.CONNECTIONS,JSON.stringify(r))}catch(r){console.error(\\\"Unable to sync connections to storage\\\",r)}},getConnections(){try{let t=ft.getItem(vt.CONNECTIONS);return t?JSON.parse(t):{}}catch(t){return console.error(\\\"Unable to get connections from storage\\\",t),{}}}}});var oe,Gc=x(()=>{u();Ri();mh();_0();oe={isMobile(){return this.isClient()?!!(typeof window?.matchMedia==\\\"function\\\"&&window?.matchMedia(\\\"(pointer:coarse)\\\")?.matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(t,e=\\\"\\\"){return t?.caipNetworkId.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){if(!this.isMobile())return!1;let t=window?.navigator.userAgent.toLowerCase();return oe.isMobile()&&t.includes(\\\"android\\\")},isIos(){if(!this.isMobile())return!1;let t=window?.navigator.userAgent.toLowerCase();return t.includes(\\\"iphone\\\")||t.includes(\\\"ipad\\\")},isSafari(){return this.isClient()?(window?.navigator.userAgent.toLowerCase()).includes(\\\"safari\\\"):!1},isClient(){return typeof window<\\\"u\\\"},isPairingExpired(t){return t?t-Date.now()<=Rt.TEN_SEC_MS:!0},isAllowedRetry(t,e=Rt.ONE_SEC_MS){return Date.now()-t>=e},copyToClopboard(t){navigator.clipboard.writeText(t)},isIframe(){try{return window?.self!==window?.top}catch{return!1}},isSafeApp(){if(oe.isClient()&&window.self!==window.top)try{let t=window?.location?.ancestorOrigins?.[0],e=\\\"https://app.safe.global\\\";if(t){let r=new URL(t),n=new URL(e);return r.hostname===n.hostname}}catch{return!1}return!1},getPairingExpiry(){return Date.now()+Rt.FOUR_MINUTES_MS},getNetworkId(t){return t?.split(\\\":\\\")[1]},getPlainAddress(t){return t?.split(\\\":\\\")[2]},async wait(t){return new Promise(e=>{setTimeout(e,t)})},debounce(t,e=500){let r;return(...n)=>{function i(){t(...n)}r&&clearTimeout(r),r=setTimeout(i,e)}},isHttpUrl(t){return t.startsWith(\\\"http://\\\")||t.startsWith(\\\"https://\\\")},formatNativeUrl(t,e,r=null){if(oe.isHttpUrl(t))return this.formatUniversalUrl(t,e);let n=t,i=r;n.includes(\\\"://\\\")||(n=t.replaceAll(\\\"/\\\",\\\"\\\").replaceAll(\\\":\\\",\\\"\\\"),n=`${n}://`),n.endsWith(\\\"/\\\")||(n=`${n}/`),i&&!i?.endsWith(\\\"/\\\")&&(i=`${i}/`),this.isTelegram()&&this.isAndroid()&&(e=encodeURIComponent(e));let s=encodeURIComponent(e);return{redirect:`${n}wc?uri=${s}`,redirectUniversalLink:i?`${i}wc?uri=${s}`:void 0,href:n}},formatUniversalUrl(t,e){if(!oe.isHttpUrl(t))return this.formatNativeUrl(t,e);let r=t;r.endsWith(\\\"/\\\")||(r=`${r}/`);let n=encodeURIComponent(e);return{redirect:`${r}wc?uri=${n}`,href:r}},getOpenTargetForPlatform(t){return t===\\\"popupWindow\\\"?t:this.isTelegram()?Te.getTelegramSocialProvider()?\\\"_top\\\":\\\"_blank\\\":t},openHref(t,e,r){window?.open(t,this.getOpenTargetForPlatform(e),r||\\\"noreferrer noopener\\\")},returnOpenHref(t,e,r){return window?.open(t,this.getOpenTargetForPlatform(e),r||\\\"noreferrer noopener\\\")},isTelegram(){return typeof window<\\\"u\\\"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},isPWA(){if(typeof window>\\\"u\\\")return!1;let t=window.matchMedia?.(\\\"(display-mode: standalone)\\\")?.matches,e=window?.navigator?.standalone;return!!(t||e)},async preloadImage(t){let e=new Promise((r,n)=>{let i=new Image;i.onload=r,i.onerror=n,i.crossOrigin=\\\"anonymous\\\",i.src=t});return Promise.race([e,oe.wait(2e3)])},formatBalance(t,e){let r=\\\"0.000\\\";if(typeof t==\\\"string\\\"){let n=Number(t);if(n){let i=Math.floor(n*1e3)/1e3;i&&(r=i.toString())}}return`${r}${e?` ${e}`:\\\"\\\"}`},formatBalance2(t,e){let r;if(t===\\\"0\\\")r=\\\"0\\\";else if(typeof t==\\\"string\\\"){let n=Number(t);n&&(r=n.toString().match(/^-?\\\\d+(?:\\\\.\\\\d{0,3})?/u)?.[0])}return{value:r??\\\"0\\\",rest:r===\\\"0\\\"?\\\"000\\\":\\\"\\\",symbol:e}},getApiUrl(){return _e.W3M_API_URL},getBlockchainApiUrl(){return _e.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return _e.PULSE_API_URL},getUUID(){return crypto?.randomUUID?crypto.randomUUID():\\\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\\".replace(/[xy]/gu,t=>{let e=Math.random()*16|0;return(t===\\\"x\\\"?e:e&3|8).toString(16)})},parseError(t){return typeof t==\\\"string\\\"?t:typeof t?.issues?.[0]?.message==\\\"string\\\"?t.issues[0].message:t instanceof Error?t.message:\\\"Unknown error\\\"},sortRequestedNetworks(t,e=[]){let r={};return e&&t&&(t.forEach((n,i)=>{r[n]=i}),e.sort((n,i)=>{let s=r[n.id],o=r[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(t){let e=0;for(let r of t)e+=r.value??0;return e},formatTokenBalance(t){let e=t.toFixed(2),[r,n]=e.split(\\\".\\\");return{dollars:r,pennies:n}},isAddress(t,e=\\\"eip155\\\"){switch(e){case\\\"eip155\\\":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)||/^(?:0x)?[0-9A-F]{40}$/iu.test(t))return!0}else return!1;return!1;case\\\"solana\\\":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(t);default:return!1}},uniqueBy(t,e){let r=new Set;return t.filter(n=>{let i=n[e];return r.has(i)?!1:(r.add(i),!0)})},generateSdkVersion(t,e,r){let i=t.length===0?Rt.ADAPTER_TYPES.UNIVERSAL:t.map(s=>s.adapterType).join(\\\",\\\");return`${e}-${i}-${r}`},createAccount(t,e,r,n,i){return{namespace:t,address:e,type:r,publicKey:n,path:i}},isCaipAddress(t){if(typeof t!=\\\"string\\\")return!1;let e=t.split(\\\":\\\"),r=e[0];return e.filter(Boolean).length===3&&r in _e.CHAIN_NAME_MAP},isMac(){let t=window?.navigator.userAgent.toLowerCase();return t.includes(\\\"macintosh\\\")&&!t.includes(\\\"safari\\\")},formatTelegramSocialLoginUrl(t){let e=`--${encodeURIComponent(window?.location.href)}`,r=\\\"state=\\\";if(new URL(t).host===\\\"auth.magic.link\\\"){let i=\\\"provider_authorization_url=\\\",s=t.substring(t.indexOf(i)+i.length),o=this.injectIntoUrl(decodeURIComponent(s),r,e);return t.replace(s,encodeURIComponent(o))}return this.injectIntoUrl(t,r,e)},injectIntoUrl(t,e,r){let n=t.indexOf(e);if(n===-1)throw new Error(`${e} parameter not found in the URL: ${t}`);let i=t.indexOf(\\\"&\\\",n),s=e.length,o=i!==-1?i:t.length,a=t.substring(0,n+s),c=t.substring(n+s,o),l=t.substring(i),d=c+r;return a+d+l}}});async function E7(...t){let e=await fetch(...t);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}var _f,_7=x(()=>{u();_f=class{constructor({baseUrl:e,clientId:r}){this.baseUrl=e,this.clientId=r}async get({headers:e,signal:r,cache:n,...i}){let s=this.createUrl(i);return(await E7(s,{method:\\\"GET\\\",headers:e,signal:r,cache:n})).json()}async getBlob({headers:e,signal:r,...n}){let i=this.createUrl(n);return(await E7(i,{method:\\\"GET\\\",headers:e,signal:r})).blob()}async post({body:e,headers:r,signal:n,...i}){let s=this.createUrl(i);return(await E7(s,{method:\\\"POST\\\",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async put({body:e,headers:r,signal:n,...i}){let s=this.createUrl(i);return(await E7(s,{method:\\\"PUT\\\",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}async delete({body:e,headers:r,signal:n,...i}){let s=this.createUrl(i);return(await E7(s,{method:\\\"DELETE\\\",headers:r,body:e?JSON.stringify(e):void 0,signal:n})).json()}createUrl({path:e,params:r}){let n=new URL(e,this.baseUrl);return r&&Object.entries(r).forEach(([i,s])=>{s&&n.searchParams.append(i,s)}),this.clientId&&n.searchParams.append(\\\"clientId\\\",this.clientId),n}}});var EGe,_Ge=x(()=>{u();mh();Gc();EGe={getFeatureValue(t,e){let r=e?.[t];return r===void 0?Rt.DEFAULT_FEATURES[t]:r},filterSocialsByPlatform(t){if(!t||!t.length)return t;if(oe.isTelegram()){if(oe.isIos())return t.filter(e=>e!==\\\"google\\\");if(oe.isMac())return t.filter(e=>e!==\\\"x\\\");if(oe.isAndroid())return t.filter(e=>![\\\"facebook\\\",\\\"x\\\"].includes(e))}return t}}});var rt,ee,Kc=x(()=>{u();Kn();xo();mh();_Ge();rt=ot({features:Rt.DEFAULT_FEATURES,projectId:\\\"\\\",sdkType:\\\"appkit\\\",sdkVersion:\\\"html-wagmi-undefined\\\",defaultAccountTypes:Rt.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{}}),ee={state:rt,subscribeKey(t,e){return lr(rt,t,e)},setOptions(t){Object.assign(rt,t)},setRemoteFeatures(t){if(!t)return;let e={...rt.remoteFeatures,...t};rt.remoteFeatures=e,rt.remoteFeatures?.socials&&(rt.remoteFeatures.socials=EGe.filterSocialsByPlatform(rt.remoteFeatures.socials))},setFeatures(t){if(!t)return;rt.features||(rt.features=Rt.DEFAULT_FEATURES);let e={...rt.features,...t};rt.features=e},setProjectId(t){rt.projectId=t},setCustomRpcUrls(t){rt.customRpcUrls=t},setAllWallets(t){rt.allWallets=t},setIncludeWalletIds(t){rt.includeWalletIds=t},setExcludeWalletIds(t){rt.excludeWalletIds=t},setFeaturedWalletIds(t){rt.featuredWalletIds=t},setTokens(t){rt.tokens=t},setTermsConditionsUrl(t){rt.termsConditionsUrl=t},setPrivacyPolicyUrl(t){rt.privacyPolicyUrl=t},setCustomWallets(t){rt.customWallets=t},setIsSiweEnabled(t){rt.isSiweEnabled=t},setIsUniversalProvider(t){rt.isUniversalProvider=t},setSdkVersion(t){rt.sdkVersion=t},setMetadata(t){rt.metadata=t},setDisableAppend(t){rt.disableAppend=t},setEIP6963Enabled(t){rt.enableEIP6963=t},setDebug(t){rt.debug=t},setEnableWalletConnect(t){rt.enableWalletConnect=t},setEnableWalletGuide(t){rt.enableWalletGuide=t},setEnableAuthLogger(t){rt.enableAuthLogger=t},setEnableWallets(t){rt.enableWallets=t},setPreferUniversalLinks(t){rt.experimental_preferUniversalLinks=t},setHasMultipleAddresses(t){rt.hasMultipleAddresses=t},setSIWX(t){rt.siwx=t},setConnectMethodsOrder(t){rt.features={...rt.features,connectMethodsOrder:t}},setWalletFeaturesOrder(t){rt.features={...rt.features,walletFeaturesOrder:t}},setSocialsOrder(t){rt.remoteFeatures={...rt.remoteFeatures,socials:t}},setCollapseWallets(t){rt.features={...rt.features,collapseWallets:t}},setEnableEmbedded(t){rt.enableEmbedded=t},setAllowUnsupportedChain(t){rt.allowUnsupportedChain=t},setManualWCControl(t){rt.manualWCControl=t},setEnableNetworkSwitch(t){rt.enableNetworkSwitch=t},setDefaultAccountTypes(t={}){Object.entries(t).forEach(([e,r])=>{r&&(rt.defaultAccountTypes[e]=r)})},setUniversalProviderConfigOverride(t){rt.universalProviderConfigOverride=t},getUniversalProviderConfigOverride(){return rt.universalProviderConfigOverride},getSnapshot(){return hh(rt)}}});var sUt,oUt,aUt,cUt,B1,CGe,SGe=x(()=>{u();Kn();xo();Gc();_7();Kc();sUt=Object.freeze({enabled:!0,events:[]}),oUt=new _f({baseUrl:oe.getAnalyticsUrl(),clientId:null}),aUt=5,cUt=60*1e3,B1=ot({...sUt}),CGe={state:B1,subscribeKey(t,e){return lr(B1,t,e)},async sendError(t,e){if(!B1.enabled)return;let r=Date.now();if(B1.events.filter(s=>{let o=new Date(s.properties.timestamp||\\\"\\\").getTime();return r-o<cUt}).length>=aUt)return;let i={type:\\\"error\\\",event:e,properties:{errorType:t.name,errorMessage:t.message,stackTrace:t.stack,timestamp:new Date().toISOString()}};B1.events.push(i);try{if(typeof window>\\\"u\\\")return;let{projectId:s,sdkType:o,sdkVersion:a}=ee.state;await oUt.post({path:\\\"/e\\\",params:{projectId:s,st:o,sv:a||\\\"html-wagmi-4.2.2\\\"},body:{eventId:oe.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:\\\"error\\\",event:e,errorType:t.name,errorMessage:t.message,stackTrace:t.stack}}})}catch{}},enable(){B1.enabled=!0},disable(){B1.enabled=!1},clearEvents(){B1.events=[]}}});function AGe(t,e){let r=t instanceof m4?t:new m4(t instanceof Error?t.message:String(t),e,t);throw CGe.sendError(r,r.category),r}function sn(t,e=\\\"INTERNAL_SDK_ERROR\\\"){let r={};return Object.keys(t).forEach(n=>{let i=t[n];if(typeof i==\\\"function\\\"){let s=i;i.constructor.name===\\\"AsyncFunction\\\"?s=async(...o)=>{try{return await i(...o)}catch(a){return AGe(a,e)}}:s=(...o)=>{try{return i(...o)}catch(a){return AGe(a,e)}},r[n]=s}else r[n]=i}),r}var m4,cc=x(()=>{u();SGe();m4=class t extends Error{constructor(e,r,n){super(e),this.name=\\\"AppKitError\\\",this.category=r,this.originalError=n,Object.setPrototypeOf(this,t.prototype);let i=!1;if(n instanceof Error&&typeof n.stack==\\\"string\\\"&&n.stack){let s=n.stack,o=s.indexOf(`\\n`);if(o>-1){let a=s.substring(o+1);this.stack=`${this.name}: ${this.message}\\n${a}`,i=!0}}i||(Error.captureStackTrace?Error.captureStackTrace(this,t):this.stack||(this.stack=`${this.name}: ${this.message}`))}}});var Cf,TGe,lue=x(()=>{u();Ri();Cf={PHANTOM:{id:\\\"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393\\\",url:\\\"https://phantom.app\\\"},SOLFLARE:{id:\\\"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79\\\",url:\\\"https://solflare.com\\\"},COINBASE:{id:\\\"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa\\\",url:\\\"https://go.cb-w.com\\\"}},TGe={handleMobileDeeplinkRedirect(t,e){let r=window.location.href,n=encodeURIComponent(r);if(t===Cf.PHANTOM.id&&!(\\\"phantom\\\"in window)){let i=r.startsWith(\\\"https\\\")?\\\"https\\\":\\\"http\\\",s=r.split(\\\"/\\\")[2],o=encodeURIComponent(`${i}://${s}`);window.location.href=`${Cf.PHANTOM.url}/ul/browse/${n}?ref=${o}`}t===Cf.SOLFLARE.id&&!(\\\"solflare\\\"in window)&&(window.location.href=`${Cf.SOLFLARE.url}/ul/v1/browse/${n}?ref=${n}`),e===_e.CHAIN.SOLANA&&t===Cf.COINBASE.id&&!(\\\"coinbaseSolana\\\"in window)&&(window.location.href=`${Cf.COINBASE.url}/dapp?cb_url=${n}`)}}});var Vl,lUt,Zs,vz=x(()=>{u();Kn();xo();cc();Vl=ot({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),lUt={state:Vl,subscribeNetworkImages(t){return Lr(Vl.networkImages,()=>t(Vl.networkImages))},subscribeKey(t,e){return lr(Vl,t,e)},subscribe(t){return Lr(Vl,()=>t(Vl))},setWalletImage(t,e){Vl.walletImages[t]=e},setNetworkImage(t,e){Vl.networkImages[t]=e},setChainImage(t,e){Vl.chainImages[t]=e},setConnectorImage(t,e){Vl.connectorImages={...Vl.connectorImages,[t]:e}},setTokenImage(t,e){Vl.tokenImages[t]=e},setCurrencyImage(t,e){Vl.currencyImages[t]=e}},Zs=sn(lUt)});var uUt,uue,sr,due=x(()=>{u();Kn();g4();vz();uUt={eip155:\\\"ba0ba0cd-17c6-4806-ad93-f9d174f17900\\\",solana:\\\"a1b58899-f671-4276-6a5e-56ca5bd59700\\\",polkadot:\\\"\\\",bip122:\\\"0b4838db-0161-4ffe-022d-532bf03dba00\\\",cosmos:\\\"\\\"},uue=ot({networkImagePromises:{}}),sr={async fetchWalletImage(t){if(t)return await ye._fetchWalletImage(t),this.getWalletImageById(t)},async fetchNetworkImage(t){if(!t)return;let e=this.getNetworkImageById(t);return e||(uue.networkImagePromises[t]||(uue.networkImagePromises[t]=ye._fetchNetworkImage(t)),await uue.networkImagePromises[t],this.getNetworkImageById(t))},getWalletImageById(t){if(t)return Zs.state.walletImages[t]},getWalletImage(t){if(t?.image_url)return t?.image_url;if(t?.image_id)return Zs.state.walletImages[t.image_id]},getNetworkImage(t){if(t?.assets?.imageUrl)return t?.assets?.imageUrl;if(t?.assets?.imageId)return Zs.state.networkImages[t.assets.imageId]},getNetworkImageById(t){if(t)return Zs.state.networkImages[t]},getConnectorImage(t){if(t?.imageUrl)return t.imageUrl;if(t?.imageId)return Zs.state.connectorImages[t.imageId]},getChainImage(t){return Zs.state.networkImages[uUt[t]]}}});var M1,dUt,Xo,fue=x(()=>{u();Kn();xo();cc();Kc();M1=ot({message:\\\"\\\",variant:\\\"info\\\",open:!1}),dUt={state:M1,subscribeKey(t,e){return lr(M1,t,e)},open(t,e){let{debug:r}=ee.state,{shortMessage:n,longMessage:i}=t;r&&(M1.message=n,M1.variant=e,M1.open=!0),i&&console.error(typeof i==\\\"function\\\"?i():i)},close(){M1.open=!1,M1.message=\\\"\\\",M1.variant=\\\"info\\\"}},Xo=sn(dUt)});var fUt,pUt,hUt,C0,Xe,S0=x(()=>{u();Kn();Ri();Gc();_7();lc();fue();Kc();fUt=oe.getAnalyticsUrl(),pUt=new _f({baseUrl:fUt,clientId:null}),hUt=[\\\"MODAL_CREATED\\\"],C0=ot({timestamp:Date.now(),reportedErrors:{},data:{type:\\\"track\\\",event:\\\"MODAL_CREATED\\\"}}),Xe={state:C0,subscribe(t){return Lr(C0,()=>t(C0))},getSdkProperties(){let{projectId:t,sdkType:e,sdkVersion:r}=ee.state;return{projectId:t,st:e,sv:r||\\\"html-wagmi-4.2.2\\\"}},async _sendAnalyticsEvent(t){try{let e=Ie.state.address;if(hUt.includes(t.data.event)||typeof window>\\\"u\\\")return;await pUt.post({path:\\\"/e\\\",params:Xe.getSdkProperties(),body:{eventId:oe.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:t.timestamp,props:{...t.data,address:e}}}),C0.reportedErrors.FORBIDDEN=!1}catch(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===_e.HTTP_STATUS_CODES.FORBIDDEN&&!C0.reportedErrors.FORBIDDEN&&(Xo.open({shortMessage:\\\"Invalid App Configuration\\\",longMessage:`Origin ${F2()?window.origin:\\\"uknown\\\"} not found on Allowlist - update configuration on cloud.reown.com`},\\\"error\\\"),C0.reportedErrors.FORBIDDEN=!0)}},sendEvent(t){C0.timestamp=Date.now(),C0.data=t,ee.state.features?.analytics&&Xe._sendAnalyticsEvent(C0)}}});var mUt,Zc,gUt,IGe,yUt,Pt,ye,g4=x(()=>{u();Kn();xo();due();Gc();_7();lue();_0();vz();ea();ld();S0();Kc();mUt=oe.getApiUrl(),Zc=new _f({baseUrl:mUt,clientId:null}),gUt=40,IGe=4,yUt=20,Pt=ot({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1}),ye={state:Pt,subscribeKey(t,e){return lr(Pt,t,e)},_getSdkProperties(){let{projectId:t,sdkType:e,sdkVersion:r}=ee.state;return{projectId:t,st:e||\\\"appkit\\\",sv:r||\\\"html-wagmi-4.2.2\\\"}},_filterOutExtensions(t){return ee.state.isUniversalProvider?t.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):t},async _fetchWalletImage(t){let e=`${Zc.baseUrl}/getWalletImage/${t}`,r=await Zc.getBlob({path:e,params:ye._getSdkProperties()});Zs.setWalletImage(t,URL.createObjectURL(r))},async _fetchNetworkImage(t){let e=`${Zc.baseUrl}/public/getAssetImage/${t}`,r=await Zc.getBlob({path:e,params:ye._getSdkProperties()});Zs.setNetworkImage(t,URL.createObjectURL(r))},async _fetchConnectorImage(t){let e=`${Zc.baseUrl}/public/getAssetImage/${t}`,r=await Zc.getBlob({path:e,params:ye._getSdkProperties()});Zs.setConnectorImage(t,URL.createObjectURL(r))},async _fetchCurrencyImage(t){let e=`${Zc.baseUrl}/public/getCurrencyImage/${t}`,r=await Zc.getBlob({path:e,params:ye._getSdkProperties()});Zs.setCurrencyImage(t,URL.createObjectURL(r))},async _fetchTokenImage(t){let e=`${Zc.baseUrl}/public/getTokenImage/${t}`,r=await Zc.getBlob({path:e,params:ye._getSdkProperties()});Zs.setTokenImage(t,URL.createObjectURL(r))},_filterWalletsByPlatform(t){return oe.isMobile()?t?.filter(r=>r.mobile_link||r.id===Cf.COINBASE.id?!0:z.state.activeChain===\\\"solana\\\"&&(r.id===Cf.SOLFLARE.id||r.id===Cf.PHANTOM.id)):t},async fetchProjectConfig(){return(await Zc.get({path:\\\"/appkit/v1/config\\\",params:ye._getSdkProperties()})).features},async fetchAllowedOrigins(){try{let{allowedOrigins:t}=await Zc.get({path:\\\"/projects/v1/origins\\\",params:ye._getSdkProperties()});return t}catch{return[]}},async fetchNetworkImages(){let e=z.getAllRequestedCaipNetworks()?.map(({assets:r})=>r?.imageId).filter(Boolean).filter(r=>!sr.getNetworkImageById(r));e&&await Promise.allSettled(e.map(r=>ye._fetchNetworkImage(r)))},async fetchConnectorImages(){let{connectors:t}=ie.state,e=t.map(({imageId:r})=>r).filter(Boolean);await Promise.allSettled(e.map(r=>ye._fetchConnectorImage(r)))},async fetchCurrencyImages(t=[]){await Promise.allSettled(t.map(e=>ye._fetchCurrencyImage(e)))},async fetchTokenImages(t=[]){await Promise.allSettled(t.map(e=>ye._fetchTokenImage(e)))},async fetchWallets(t){let e=t.exclude??[];ye._getSdkProperties().sv.startsWith(\\\"html-core-\\\")&&e.push(...Object.values(Cf).map(s=>s.id));let n=await Zc.get({path:\\\"/getWallets\\\",params:{...ye._getSdkProperties(),...t,page:String(t.page),entries:String(t.entries),include:t.include?.join(\\\",\\\"),exclude:e.join(\\\",\\\")}});return{data:ye._filterWalletsByPlatform(n?.data)||[],count:n?.count}},async fetchFeaturedWallets(){let{featuredWalletIds:t}=ee.state;if(t?.length){let e={...ye._getSdkProperties(),page:1,entries:t?.length??IGe,include:t},{data:r}=await ye.fetchWallets(e),n=[...r].sort((s,o)=>t.indexOf(s.id)-t.indexOf(o.id)),i=n.map(s=>s.image_id).filter(Boolean);await Promise.allSettled(i.map(s=>ye._fetchWalletImage(s))),Pt.featured=n,Pt.allFeatured=n}},async fetchRecommendedWallets(){try{Pt.isFetchingRecommendedWallets=!0;let{includeWalletIds:t,excludeWalletIds:e,featuredWalletIds:r}=ee.state,n=[...e??[],...r??[]].filter(Boolean),i=z.getRequestedCaipNetworkIds().join(\\\",\\\"),s={page:1,entries:IGe,include:t,exclude:n,chains:i},{data:o,count:a}=await ye.fetchWallets(s),c=Te.getRecentWallets(),l=o.map(f=>f.image_id).filter(Boolean),d=c.map(f=>f.image_id).filter(Boolean);await Promise.allSettled([...l,...d].map(f=>ye._fetchWalletImage(f))),Pt.recommended=o,Pt.allRecommended=o,Pt.count=a??0}catch{}finally{Pt.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:t}){let{includeWalletIds:e,excludeWalletIds:r,featuredWalletIds:n}=ee.state,i=z.getRequestedCaipNetworkIds().join(\\\",\\\"),s=[...Pt.recommended.map(({id:d})=>d),...r??[],...n??[]].filter(Boolean),o={page:t,entries:gUt,include:e,exclude:s,chains:i},{data:a,count:c}=await ye.fetchWallets(o),l=a.slice(0,yUt).map(d=>d.image_id).filter(Boolean);await Promise.allSettled(l.map(d=>ye._fetchWalletImage(d))),Pt.wallets=oe.uniqueBy([...Pt.wallets,...ye._filterOutExtensions(a)],\\\"id\\\").filter(d=>d.chains?.some(f=>i.includes(f))),Pt.count=c>Pt.count?c:Pt.count,Pt.page=t},async initializeExcludedWallets({ids:t}){let e={page:1,entries:t.length,include:t},{data:r}=await ye.fetchWallets(e);r&&r.forEach(n=>{Pt.excludedWallets.push({rdns:n.rdns,name:n.name})})},async searchWallet({search:t,badge:e}){let{includeWalletIds:r,excludeWalletIds:n}=ee.state,i=z.getRequestedCaipNetworkIds().join(\\\",\\\");Pt.search=[];let s={page:1,entries:100,search:t?.trim(),badge_type:e,include:r,exclude:n,chains:i},{data:o}=await ye.fetchWallets(s);Xe.sendEvent({type:\\\"track\\\",event:\\\"SEARCH_WALLET\\\",properties:{badge:e??\\\"\\\",search:t??\\\"\\\"}});let a=o.map(c=>c.image_id).filter(Boolean);await Promise.allSettled([...a.map(c=>ye._fetchWalletImage(c)),oe.wait(300)]),Pt.search=ye._filterOutExtensions(o)},initPromise(t,e){let r=Pt.promises[t];return r||(Pt.promises[t]=e())},prefetch({fetchConnectorImages:t=!0,fetchFeaturedWallets:e=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:n=!0}={}){let i=[t&&ye.initPromise(\\\"connectorImages\\\",ye.fetchConnectorImages),e&&ye.initPromise(\\\"featuredWallets\\\",ye.fetchFeaturedWallets),r&&ye.initPromise(\\\"recommendedWallets\\\",ye.fetchRecommendedWallets),n&&ye.initPromise(\\\"networkImages\\\",ye.fetchNetworkImages)].filter(Boolean);return Promise.allSettled(i)},prefetchAnalyticsConfig(){ee.state.features?.analytics&&ye.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{let{isAnalyticsEnabled:t}=await Zc.get({path:\\\"/getAnalyticsConfig\\\",params:ye._getSdkProperties()});ee.setFeatures({analytics:t})}catch{ee.setFeatures({analytics:!1})}},filterByNamespaces(t){if(!t?.length){Pt.featured=Pt.allFeatured,Pt.recommended=Pt.allRecommended;return}let e=z.getRequestedCaipNetworkIds().join(\\\",\\\");Pt.featured=Pt.allFeatured.filter(r=>r.chains?.some(n=>e.includes(n))),Pt.recommended=Pt.allRecommended.filter(r=>r.chains?.some(n=>e.includes(n))),Pt.filteredWallets=Pt.wallets.filter(r=>r.chains?.some(n=>e.includes(n)))},clearFilterByNamespaces(){Pt.filteredWallets=[]},setFilterByNamespace(t){if(!t){Pt.featured=Pt.allFeatured,Pt.recommended=Pt.allRecommended;return}let e=z.getRequestedCaipNetworkIds().join(\\\",\\\");Pt.featured=Pt.allFeatured.filter(r=>r.chains?.some(n=>e.includes(n))),Pt.recommended=Pt.allRecommended.filter(r=>r.chains?.some(n=>e.includes(n))),Pt.filteredWallets=Pt.wallets.filter(r=>r.chains?.some(n=>e.includes(n)))}}});var on,bUt,de,Sf=x(()=>{u();Kn();xo();cc();lc();ea();ld();j2();Kc();on=ot({view:\\\"Connect\\\",history:[\\\"Connect\\\"],transactionStack:[]}),bUt={state:on,subscribeKey(t,e){return lr(on,t,e)},pushTransactionStack(t){on.transactionStack.push(t)},popTransactionStack(t){let e=on.transactionStack.pop();if(!e)return;let{onSuccess:r,onError:n,onCancel:i}=e;switch(t){case\\\"success\\\":r?.();break;case\\\"error\\\":n?.(),de.goBack();break;case\\\"cancel\\\":i?.(),de.goBack();break;default:}},push(t,e){t!==on.view&&(on.view=t,on.history.push(t),on.data=e)},reset(t,e){on.view=t,on.history=[t],on.data=e},replace(t,e){on.history.at(-1)===t||(on.view=t,on.history[on.history.length-1]=t,on.data=e)},goBack(){let t=z.state.activeCaipAddress,e=de.state.view===\\\"ConnectingFarcaster\\\",r=!t&&e;if(on.history.length>1){on.history.pop();let[n]=on.history.slice(-1);n&&(t&&n===\\\"Connect\\\"?on.view=\\\"Account\\\":on.view=n)}else Dt.close();on.data?.wallet&&(on.data.wallet=void 0),setTimeout(()=>{if(r){Ie.setFarcasterUrl(void 0,z.state.activeChain);let n=ie.getAuthConnector();n?.provider?.reload();let i=hh(ee.state);n?.provider?.syncDappData?.({metadata:i.metadata,sdkVersion:i.sdkVersion,projectId:i.projectId,sdkType:i.sdkType})}},100)},goBackToIndex(t){if(on.history.length>1){on.history=on.history.slice(0,t+1);let[e]=on.history.slice(-1);e&&(on.view=e)}},goBackOrCloseModal(){de.state.history.length>1?de.goBack():Dt.close()}},de=sn(bUt)});var A0,pue,ji,hue=x(()=>{u();Kn();Ri();cc();ld();A0=ot({themeMode:\\\"dark\\\",themeVariables:{},w3mThemeVariables:void 0}),pue={state:A0,subscribe(t){return Lr(A0,()=>t(A0))},setThemeMode(t){A0.themeMode=t;try{let e=ie.getAuthConnector();if(e){let r=pue.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:t,themeVariables:r,w3mThemeVariables:cd(r,t)})}}catch{console.info(\\\"Unable to sync theme to auth connector\\\")}},setThemeVariables(t){A0.themeVariables={...A0.themeVariables,...t};try{let e=ie.getAuthConnector();if(e){let r=pue.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:r,w3mThemeVariables:cd(A0.themeVariables,A0.themeMode)})}}catch{console.info(\\\"Unable to sync theme to auth connector\\\")}},getSnapshot(){return hh(A0)}},ji=sn(pue)});var RGe,Or,wUt,ie,ld=x(()=>{u();Kn();xo();Ri();lue();_0();cc();g4();ea();Kc();Sf();hue();RGe={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},Or=ot({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:{...RGe},filterByNamespaceMap:{eip155:!0,solana:!0,polkadot:!0,bip122:!0,cosmos:!0}}),wUt={state:Or,subscribe(t){return Lr(Or,()=>{t(Or)})},subscribeKey(t,e){return lr(Or,t,e)},initialize(t){t.forEach(e=>{let r=Te.getConnectedConnectorId(e);r&&ie.setConnectorId(r,e)})},setActiveConnector(t){t&&(Or.activeConnector=$l(t))},setConnectors(t){t.filter(i=>!Or.allConnectors.some(s=>s.id===i.id&&ie.getConnectorName(s.name)===ie.getConnectorName(i.name)&&s.chain===i.chain)).forEach(i=>{i.type!==\\\"MULTI_CHAIN\\\"&&Or.allConnectors.push($l(i))});let r=ie.getEnabledNamespaces(),n=ie.getEnabledConnectors(r);Or.connectors=ie.mergeMultiChainConnectors(n)},filterByNamespaces(t){Object.keys(Or.filterByNamespaceMap).forEach(e=>{Or.filterByNamespaceMap[e]=!1}),t.forEach(e=>{Or.filterByNamespaceMap[e]=!0}),ie.updateConnectorsForEnabledNamespaces()},filterByNamespace(t,e){Or.filterByNamespaceMap[t]=e,ie.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){let t=ie.getEnabledNamespaces(),e=ie.getEnabledConnectors(t),r=ie.areAllNamespacesEnabled();Or.connectors=ie.mergeMultiChainConnectors(e),r?ye.clearFilterByNamespaces():ye.filterByNamespaces(t)},getEnabledNamespaces(){return Object.entries(Or.filterByNamespaceMap).filter(([t,e])=>e).map(([t])=>t)},getEnabledConnectors(t){return Or.allConnectors.filter(e=>t.includes(e.chain))},areAllNamespacesEnabled(){return Object.values(Or.filterByNamespaceMap).every(t=>t)},mergeMultiChainConnectors(t){let e=ie.generateConnectorMapByName(t),r=[];return e.forEach(n=>{let i=n[0],s=i?.id===_e.CONNECTOR_ID.AUTH;n.length>1&&i?r.push({name:i.name,imageUrl:i.imageUrl,imageId:i.imageId,connectors:[...n],type:s?\\\"AUTH\\\":\\\"MULTI_CHAIN\\\",chain:\\\"eip155\\\",id:i?.id||\\\"\\\"}):i&&r.push(i)}),r},generateConnectorMapByName(t){let e=new Map;return t.forEach(r=>{let{name:n}=r,i=ie.getConnectorName(n);if(!i)return;let s=e.get(i)||[];s.find(a=>a.chain===r.chain)||s.push(r),e.set(i,s)}),e},getConnectorName(t){return t&&({\\\"Trust Wallet\\\":\\\"Trust\\\"}[t]||t)},getUniqueConnectorsByName(t){let e=[];return t.forEach(r=>{e.find(n=>n.chain===r.chain)||e.push(r)}),e},addConnector(t){if(t.id===_e.CONNECTOR_ID.AUTH){let e=t,r=hh(ee.state),n=ji.getSnapshot().themeMode,i=ji.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:r.metadata,sdkVersion:r.sdkVersion,projectId:r.projectId,sdkType:r.sdkType}),e?.provider?.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:cd(i,n)}),ie.setConnectors([t])}else ie.setConnectors([t])},getAuthConnector(t){let e=t||z.state.activeChain,r=Or.connectors.find(n=>n.id===_e.CONNECTOR_ID.AUTH);if(r)return r?.connectors?.length?r.connectors.find(i=>i.chain===e):r},getAnnouncedConnectorRdns(){return Or.connectors.filter(t=>t.type===\\\"ANNOUNCED\\\").map(t=>t.info?.rdns)},getConnectorById(t){return Or.allConnectors.find(e=>e.id===t)},getConnector(t,e){return Or.allConnectors.filter(n=>n.chain===z.state.activeChain).find(n=>n.explorerId===t||n.info?.rdns===e)},syncIfAuthConnector(t){if(t.id!==\\\"ID_AUTH\\\")return;let e=t,r=hh(ee.state),n=ji.getSnapshot().themeMode,i=ji.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:r.metadata,sdkVersion:r.sdkVersion,sdkType:r.sdkType,projectId:r.projectId}),e.provider.syncTheme({themeMode:n,themeVariables:i,w3mThemeVariables:cd(i,n)})},getConnectorsByNamespace(t){let e=Or.allConnectors.filter(r=>r.chain===t);return ie.mergeMultiChainConnectors(e)},selectWalletConnector(t){let e=ie.getConnector(t.id,t.rdns),r=z.state.activeChain;TGe.handleMobileDeeplinkRedirect(e?.explorerId||t.id,r),e?de.push(\\\"ConnectingExternal\\\",{connector:e}):de.push(\\\"ConnectingWalletConnect\\\",{wallet:t})},getConnectors(t){return t?ie.getConnectorsByNamespace(t):ie.mergeMultiChainConnectors(Or.allConnectors)},setFilterByNamespace(t){Or.filterByNamespace=t,Or.connectors=ie.getConnectors(t),ye.setFilterByNamespace(t)},setConnectorId(t,e){t&&(Or.activeConnectorIds={...Or.activeConnectorIds,[e]:t},Te.setConnectedConnectorId(e,t))},removeConnectorId(t){Or.activeConnectorIds={...Or.activeConnectorIds,[t]:void 0},Te.deleteConnectedConnectorId(t)},getConnectorId(t){if(t)return Or.activeConnectorIds[t]},isConnected(t){return t?!!Or.activeConnectorIds[t]:Object.values(Or.activeConnectorIds).some(e=>!!e)},resetConnectorIds(){Or.activeConnectorIds={...RGe}}},ie=sn(wUt)});var vUt,apn,cpn,lpn,T0,PGe=x(()=>{u();vUt=\\\"https://secure.walletconnect.org/sdk\\\",apn=(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL:void 0)||vUt,cpn=(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_DEFAULT_LOG_LEVEL:void 0)||\\\"error\\\",lpn=(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION:void 0)||\\\"4\\\",T0={SAFE_RPC_METHODS:[\\\"eth_accounts\\\",\\\"eth_blockNumber\\\",\\\"eth_call\\\",\\\"eth_chainId\\\",\\\"eth_estimateGas\\\",\\\"eth_feeHistory\\\",\\\"eth_gasPrice\\\",\\\"eth_getAccount\\\",\\\"eth_getBalance\\\",\\\"eth_getBlockByHash\\\",\\\"eth_getBlockByNumber\\\",\\\"eth_getBlockReceipts\\\",\\\"eth_getBlockTransactionCountByHash\\\",\\\"eth_getBlockTransactionCountByNumber\\\",\\\"eth_getCode\\\",\\\"eth_getFilterChanges\\\",\\\"eth_getFilterLogs\\\",\\\"eth_getLogs\\\",\\\"eth_getProof\\\",\\\"eth_getStorageAt\\\",\\\"eth_getTransactionByBlockHashAndIndex\\\",\\\"eth_getTransactionByBlockNumberAndIndex\\\",\\\"eth_getTransactionByHash\\\",\\\"eth_getTransactionCount\\\",\\\"eth_getTransactionReceipt\\\",\\\"eth_getUncleCountByBlockHash\\\",\\\"eth_getUncleCountByBlockNumber\\\",\\\"eth_maxPriorityFeePerGas\\\",\\\"eth_newBlockFilter\\\",\\\"eth_newFilter\\\",\\\"eth_newPendingTransactionFilter\\\",\\\"eth_sendRawTransaction\\\",\\\"eth_syncing\\\",\\\"eth_uninstallFilter\\\",\\\"wallet_getCapabilities\\\",\\\"wallet_getCallsStatus\\\",\\\"eth_getUserOperationReceipt\\\",\\\"eth_estimateUserOperationGas\\\",\\\"eth_getUserOperationByHash\\\",\\\"eth_supportedEntryPoints\\\",\\\"wallet_getAssets\\\"],NOT_SAFE_RPC_METHODS:[\\\"personal_sign\\\",\\\"eth_signTypedData_v4\\\",\\\"eth_sendTransaction\\\",\\\"solana_signMessage\\\",\\\"solana_signTransaction\\\",\\\"solana_signAllTransactions\\\",\\\"solana_signAndSendTransaction\\\",\\\"wallet_sendCalls\\\",\\\"wallet_grantPermissions\\\",\\\"wallet_revokePermissions\\\",\\\"eth_sendUserOperation\\\"],GET_CHAIN_ID:\\\"eth_chainId\\\",RPC_METHOD_NOT_ALLOWED_MESSAGE:\\\"Requested RPC call is not allowed\\\",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:\\\"Action not allowed\\\",ACCOUNT_TYPES:{EOA:\\\"eoa\\\",SMART_ACCOUNT:\\\"smartAccount\\\"}}});var xz=x(()=>{u();PGe()});var H2,Qs,xUt,wr,q2=x(()=>{u();Kn();xo();Gc();H2=Object.freeze({message:\\\"\\\",variant:\\\"success\\\",svg:void 0,open:!1,autoClose:!0}),Qs=ot({...H2}),xUt={state:Qs,subscribeKey(t,e){return lr(Qs,t,e)},showLoading(t,e={}){this._showMessage({message:t,variant:\\\"loading\\\",...e})},showSuccess(t){this._showMessage({message:t,variant:\\\"success\\\"})},showSvg(t,e){this._showMessage({message:t,svg:e})},showError(t){let e=oe.parseError(t);this._showMessage({message:e,variant:\\\"error\\\"})},hide(){Qs.message=H2.message,Qs.variant=H2.variant,Qs.svg=H2.svg,Qs.open=H2.open,Qs.autoClose=H2.autoClose},_showMessage({message:t,svg:e,variant:r=\\\"success\\\",autoClose:n=H2.autoClose}){Qs.open?(Qs.open=!1,setTimeout(()=>{Qs.message=t,Qs.variant=r,Qs.svg=e,Qs.open=!0,Qs.autoClose=n},150)):(Qs.message=t,Qs.variant=r,Qs.svg=e,Qs.open=!0,Qs.autoClose=n)}},wr=xUt});var Bn,EUt,y4,OGe=x(()=>{u();Kn();xz();cc();lc();z2();ea();S0();Kc();q2();Bn=ot({transactions:[],coinbaseTransactions:{},transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),EUt={state:Bn,subscribe(t){return Lr(Bn,()=>t(Bn))},setLastNetworkInView(t){Bn.lastNetworkInView=t},async fetchTransactions(t,e){if(!t)throw new Error(\\\"Transactions can't be fetched without an accountAddress\\\");Bn.loading=!0;try{let r=await Qe.fetchTransactions({account:t,cursor:Bn.next,onramp:e,cache:e===\\\"coinbase\\\"?\\\"no-cache\\\":void 0,chainId:z.state.activeCaipNetwork?.caipNetworkId}),n=y4.filterSpamTransactions(r.data),i=y4.filterByConnectedChain(n),s=[...Bn.transactions,...i];Bn.loading=!1,e===\\\"coinbase\\\"?Bn.coinbaseTransactions=y4.groupTransactionsByYearAndMonth(Bn.coinbaseTransactions,r.data):(Bn.transactions=s,Bn.transactionsByYear=y4.groupTransactionsByYearAndMonth(Bn.transactionsByYear,i)),Bn.empty=s.length===0,Bn.next=r.next?r.next:void 0}catch{let n=z.state.activeChain;Xe.sendEvent({type:\\\"track\\\",event:\\\"ERROR_FETCH_TRANSACTIONS\\\",properties:{address:t,projectId:ee.state.projectId,cursor:Bn.next,isSmartAccount:Ie.state.preferredAccountTypes?.[n]===T0.ACCOUNT_TYPES.SMART_ACCOUNT}}),wr.showError(\\\"Failed to fetch transactions\\\"),Bn.loading=!1,Bn.empty=!0,Bn.next=void 0}},groupTransactionsByYearAndMonth(t={},e=[]){let r=t;return e.forEach(n=>{let i=new Date(n.metadata.minedAt).getFullYear(),s=new Date(n.metadata.minedAt).getMonth(),o=r[i]??{},c=(o[s]??[]).filter(l=>l.id!==n.id);r[i]={...o,[s]:[...c,n].sort((l,d)=>new Date(d.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),r},filterSpamTransactions(t){return t.filter(e=>!e.transfers.every(n=>n.nft_info?.flags.is_spam===!0))},filterByConnectedChain(t){let e=z.state.activeCaipNetwork?.caipNetworkId;return t.filter(n=>n.metadata.chain===e)},clearCursor(){Bn.next=void 0},resetTransactions(){Bn.transactions=[],Bn.transactionsByYear={},Bn.lastNetworkInView=void 0,Bn.loading=!1,Bn.empty=!1,Bn.next=void 0}},y4=sn(EUt,\\\"API_ERROR\\\")});var Zn,$2,_Ut,me,D1=x(()=>{u();Kn();xo();Gc();_0();cc();lc();ea();ld();S0();j2();Sf();OGe();Zn=ot({connections:new Map,wcError:!1,buffering:!1,status:\\\"disconnected\\\"}),_Ut={state:Zn,subscribeKey(t,e){return lr(Zn,t,e)},_getClient(){return Zn._client},setClient(t){Zn._client=$l(t)},async connectWalletConnect(){if(oe.isTelegram()||oe.isSafari()&&oe.isIos()){if($2){await $2,$2=void 0;return}if(!oe.isPairingExpired(Zn?.wcPairingExpiry)){let t=Zn.wcUri;Zn.wcUri=t;return}$2=me._getClient()?.connectWalletConnect?.().catch(()=>{}),me.state.status=\\\"connecting\\\",await $2,$2=void 0,Zn.wcPairingExpiry=void 0,me.state.status=\\\"connected\\\"}else await me._getClient()?.connectWalletConnect?.()},async connectExternal(t,e,r=!0){await me._getClient()?.connectExternal?.(t),r&&z.setActiveNamespace(e)},async reconnectExternal(t){await me._getClient()?.reconnectExternal?.(t);let e=t.chain||z.state.activeChain;e&&ie.setConnectorId(t.id,e)},async setPreferredAccountType(t,e){Dt.setLoading(!0,z.state.activeChain);let r=ie.getAuthConnector();r&&(Ie.setPreferredAccountType(t,e),await r.provider.setPreferredAccount(t),Te.setPreferredAccountTypes(Ie.state.preferredAccountTypes??{[e]:t}),await me.reconnectExternal(r),Dt.setLoading(!1,z.state.activeChain),Xe.sendEvent({type:\\\"track\\\",event:\\\"SET_PREFERRED_ACCOUNT_TYPE\\\",properties:{accountType:t,network:z.state.activeCaipNetwork?.caipNetworkId||\\\"\\\"}}))},async signMessage(t){return me._getClient()?.signMessage(t)},parseUnits(t,e){return me._getClient()?.parseUnits(t,e)},formatUnits(t,e){return me._getClient()?.formatUnits(t,e)},async sendTransaction(t){return me._getClient()?.sendTransaction(t)},async getCapabilities(t){return me._getClient()?.getCapabilities(t)},async grantPermissions(t){return me._getClient()?.grantPermissions(t)},async walletGetAssets(t){return me._getClient()?.walletGetAssets(t)??{}},async estimateGas(t){return me._getClient()?.estimateGas(t)},async writeContract(t){return me._getClient()?.writeContract(t)},async getEnsAddress(t){return me._getClient()?.getEnsAddress(t)},async getEnsAvatar(t){return me._getClient()?.getEnsAvatar(t)},checkInstalled(t){return me._getClient()?.checkInstalled?.(t)||!1},resetWcConnection(){Zn.wcUri=void 0,Zn.wcPairingExpiry=void 0,Zn.wcLinking=void 0,Zn.recentWallet=void 0,Zn.status=\\\"disconnected\\\",y4.resetTransactions(),Te.deleteWalletConnectDeepLink()},resetUri(){Zn.wcUri=void 0,Zn.wcPairingExpiry=void 0,$2=void 0},finalizeWcConnection(){let{wcLinking:t,recentWallet:e}=me.state;t&&Te.setWalletConnectDeepLink(t),e&&Te.setAppKitRecent(e),Xe.sendEvent({type:\\\"track\\\",event:\\\"CONNECT_SUCCESS\\\",properties:{method:t?\\\"mobile\\\":\\\"qrcode\\\",name:de.state.data?.wallet?.name||\\\"Unknown\\\"}})},setWcBasic(t){Zn.wcBasic=t},setUri(t){Zn.wcUri=t,Zn.wcPairingExpiry=oe.getPairingExpiry()},setWcLinking(t){Zn.wcLinking=t},setWcError(t){Zn.wcError=t,Zn.buffering=!1},setRecentWallet(t){Zn.recentWallet=t},setBuffering(t){Zn.buffering=t},setStatus(t){Zn.status=t},async disconnect(t){try{await me._getClient()?.disconnect(t)}catch(e){throw new m4(\\\"Failed to disconnect\\\",\\\"INTERNAL_SDK_ERROR\\\",e)}},setConnections(t,e){Zn.connections.set(e,t)},switchAccount({connection:t,address:e,namespace:r}){if(ie.state.activeConnectorIds[r]===t.connectorId){let s=z.state.activeCaipNetwork;if(s){let o=`${r}:${s.id}:${e}`;Ie.setCaipAddress(o,r)}else console.warn(`No current network found for namespace \\\"${r}\\\"`)}else{let s=ie.getConnector(t.connectorId);s?me.connectExternal(s,r):console.warn(`No connector found for namespace \\\"${r}\\\"`)}}},me=sn(_Ut)});var b4,ud,Ez=x(()=>{u();Kn();xo();b4=ot({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1}),ud={state:b4,subscribe(t){return Lr(b4,()=>t(b4))},subscribeOpen(t){return lr(b4,\\\"open\\\",t)},set(t){Object.assign(b4,{...b4,...t})}}});var _z,NGe=x(()=>{u();un();_z={createBalance(t,e){let r={name:t.metadata.name||\\\"\\\",symbol:t.metadata.symbol||\\\"\\\",decimals:t.metadata.decimals||0,value:t.metadata.value||0,price:t.metadata.price||0,iconUrl:t.metadata.iconUrl||\\\"\\\"};return{name:r.name,symbol:r.symbol,chainId:e,address:t.address===\\\"native\\\"?void 0:this.convertAddressToCAIP10Address(t.address,e),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:t.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance({hex:t,decimals:e}){return cm(BigInt(t),e)},convertAddressToCAIP10Address(t,e){return`${e}:${t}`},createCAIP2ChainId(t,e){return`${e}:${parseInt(t,16)}`},getChainIdHexFromCAIP2ChainId(t){let e=t.split(\\\":\\\");if(e.length<2||!e[1])return\\\"0x0\\\";let r=e[1],n=parseInt(r,10);return isNaN(n)?\\\"0x0\\\":`0x${n.toString(16)}`},isWalletGetAssetsResponse(t){return typeof t!=\\\"object\\\"||t===null?!1:Object.values(t).every(e=>Array.isArray(e)&&e.every(r=>this.isValidAsset(r)))},isValidAsset(t){return typeof t==\\\"object\\\"&&t!==null&&typeof t.address==\\\"string\\\"&&typeof t.balance==\\\"string\\\"&&(t.type===\\\"ERC20\\\"||t.type===\\\"NATIVE\\\")&&typeof t.metadata==\\\"object\\\"&&t.metadata!==null&&typeof t.metadata.name==\\\"string\\\"&&typeof t.metadata.symbol==\\\"string\\\"&&typeof t.metadata.decimals==\\\"number\\\"&&typeof t.metadata.price==\\\"number\\\"&&typeof t.metadata.iconUrl==\\\"string\\\"}}});var mue,kGe=x(()=>{u();lc();z2();ea();D1();NGe();mue={async getMyTokensWithBalance(t){let e=Ie.state.address,r=z.state.activeCaipNetwork;if(!e||!r)return[];if(r.chainNamespace===\\\"eip155\\\"){let i=await this.getEIP155Balances(e,r);if(i)return this.filterLowQualityTokens(i)}let n=await Qe.getBalance(e,r.caipNetworkId,t);return this.filterLowQualityTokens(n.balances)},async getEIP155Balances(t,e){try{let r=_z.getChainIdHexFromCAIP2ChainId(e.caipNetworkId);if(!(await me.getCapabilities(t))?.[r]?.assetDiscovery?.supported)return null;let i=await me.walletGetAssets({account:t,chainFilter:[r]});return _z.isWalletGetAssetsResponse(i)?(i[r]||[]).map(o=>_z.createBalance(o,e.caipNetworkId)):null}catch{return null}},filterLowQualityTokens(t){return t.filter(e=>e.quantity.decimals!==\\\"0\\\")},mapBalancesToSwapTokens(t){return t?.map(e=>({...e,address:e?.address?e.address:z.getActiveNetworkTokenAddress(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1}))||[]}}});var Qr,CUt,ur,gue=x(()=>{u();Kn();xo();Ri();Ri();xz();mh();Gc();kGe();cc();lc();ea();D1();S0();Sf();q2();Qr=ot({tokenBalances:[],loading:!1}),CUt={state:Qr,subscribe(t){return Lr(Qr,()=>t(Qr))},subscribeKey(t,e){return lr(Qr,t,e)},setToken(t){t&&(Qr.token=$l(t))},setTokenAmount(t){Qr.sendTokenAmount=t},setReceiverAddress(t){Qr.receiverAddress=t},setReceiverProfileImageUrl(t){Qr.receiverProfileImageUrl=t},setReceiverProfileName(t){Qr.receiverProfileName=t},setNetworkBalanceInUsd(t){Qr.networkBalanceInUSD=t},setLoading(t){Qr.loading=t},async sendToken(){try{switch(ur.setLoading(!0),z.state.activeCaipNetwork?.chainNamespace){case\\\"eip155\\\":await ur.sendEvmToken();return;case\\\"solana\\\":await ur.sendSolanaToken();return;default:throw new Error(\\\"Unsupported chain\\\")}}finally{ur.setLoading(!1)}},async sendEvmToken(){let t=z.state.activeChain,e=Ie.state.preferredAccountTypes?.[t];if(!ur.state.sendTokenAmount||!ur.state.receiverAddress)throw new Error(\\\"An amount and receiver address are required\\\");if(!ur.state.token)throw new Error(\\\"A token is required\\\");ur.state.token?.address?(Xe.sendEvent({type:\\\"track\\\",event:\\\"SEND_INITIATED\\\",properties:{isSmartAccount:e===T0.ACCOUNT_TYPES.SMART_ACCOUNT,token:ur.state.token.address,amount:ur.state.sendTokenAmount,network:z.state.activeCaipNetwork?.caipNetworkId||\\\"\\\"}}),await ur.sendERC20Token({receiverAddress:ur.state.receiverAddress,tokenAddress:ur.state.token.address,sendTokenAmount:ur.state.sendTokenAmount,decimals:ur.state.token.quantity.decimals})):(Xe.sendEvent({type:\\\"track\\\",event:\\\"SEND_INITIATED\\\",properties:{isSmartAccount:e===T0.ACCOUNT_TYPES.SMART_ACCOUNT,token:ur.state.token.symbol||\\\"\\\",amount:ur.state.sendTokenAmount,network:z.state.activeCaipNetwork?.caipNetworkId||\\\"\\\"}}),await ur.sendNativeToken({receiverAddress:ur.state.receiverAddress,sendTokenAmount:ur.state.sendTokenAmount,decimals:ur.state.token.quantity.decimals}))},async fetchTokenBalance(t){Qr.loading=!0;let e=z.state.activeCaipNetwork?.caipNetworkId,r=z.state.activeCaipNetwork?.chainNamespace,n=z.state.activeCaipAddress,i=n?oe.getPlainAddress(n):void 0;if(Qr.lastRetry&&!oe.isAllowedRetry(Qr.lastRetry,30*Rt.ONE_SEC_MS))return Qr.loading=!1,[];try{if(i&&e&&r){let s=await mue.getMyTokensWithBalance();return Qr.tokenBalances=s,Qr.lastRetry=void 0,s}}catch(s){Qr.lastRetry=Date.now(),t?.(s),wr.showError(\\\"Token Balance Unavailable\\\")}finally{Qr.loading=!1}return[]},fetchNetworkBalance(){if(Qr.tokenBalances.length===0)return;let t=mue.mapBalancesToSwapTokens(Qr.tokenBalances);if(!t)return;let e=t.find(r=>r.address===z.getActiveNetworkTokenAddress());e&&(Qr.networkBalanceInUSD=e?rue.multiply(e.quantity.numeric,e.price).toString():\\\"0\\\")},async sendNativeToken(t){de.pushTransactionStack({});let e=t.receiverAddress,r=Ie.state.address,n=me.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));await me.sendTransaction({chainNamespace:\\\"eip155\\\",to:e,address:r,data:\\\"0x\\\",value:n??BigInt(0)}),Xe.sendEvent({type:\\\"track\\\",event:\\\"SEND_SUCCESS\\\",properties:{isSmartAccount:Ie.state.preferredAccountTypes?.eip155===T0.ACCOUNT_TYPES.SMART_ACCOUNT,token:ur.state.token?.symbol||\\\"\\\",amount:t.sendTokenAmount,network:z.state.activeCaipNetwork?.caipNetworkId||\\\"\\\"}}),me._getClient()?.updateBalance(\\\"eip155\\\"),ur.resetSend()},async sendERC20Token(t){de.pushTransactionStack({onSuccess(){de.replace(\\\"Account\\\")}});let e=me.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));if(Ie.state.address&&t.sendTokenAmount&&t.receiverAddress&&t.tokenAddress){let r=oe.getPlainAddress(t.tokenAddress);await me.writeContract({fromAddress:Ie.state.address,tokenAddress:r,args:[t.receiverAddress,e??BigInt(0)],method:\\\"transfer\\\",abi:nue.getERC20Abi(r),chainNamespace:\\\"eip155\\\"}),ur.resetSend()}},async sendSolanaToken(){if(!ur.state.sendTokenAmount||!ur.state.receiverAddress)throw new Error(\\\"An amount and receiver address are required\\\");de.pushTransactionStack({onSuccess(){de.replace(\\\"Account\\\")}}),await me.sendTransaction({chainNamespace:\\\"solana\\\",to:ur.state.receiverAddress,value:ur.state.sendTokenAmount}),me._getClient()?.updateBalance(\\\"solana\\\"),ur.resetSend()},resetSend(){Qr.token=void 0,Qr.sendTokenAmount=void 0,Qr.receiverAddress=void 0,Qr.receiverProfileImageUrl=void 0,Qr.receiverProfileName=void 0,Qr.loading=!1,Qr.tokenBalances=[]}},ur=sn(CUt)});var yue,Cz,Ne,SUt,z,ea=x(()=>{u();Kn();xo();Ri();mh();Gc();_0();cc();lc();D1();ld();S0();j2();Kc();Ez();Sf();gue();yue={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[],user:void 0},Cz={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},Ne=ot({chains:vGe(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter:{networkControllerClient:void 0,connectionControllerClient:void 0},isSwitchingNamespace:!1}),SUt={state:Ne,subscribe(t){return Lr(Ne,()=>{t(Ne)})},subscribeKey(t,e){return lr(Ne,t,e)},subscribeChainProp(t,e,r){let n;return Lr(Ne.chains,()=>{let i=r||Ne.activeChain;if(i){let s=Ne.chains.get(i)?.[t];n!==s&&(n=s,e(s))}})},initialize(t,e,r){let{chainId:n,namespace:i}=Te.getActiveNetworkProps(),s=e?.find(d=>d.id.toString()===n?.toString()),a=t.find(d=>d?.namespace===i)||t?.[0],c=t.map(d=>d.namespace).filter(d=>d!==void 0),l=ee.state.enableEmbedded?new Set([...c]):new Set([...e?.map(d=>d.chainNamespace)??[]]);(t?.length===0||!a)&&(Ne.noAdapters=!0),Ne.noAdapters||(Ne.activeChain=a?.namespace,Ne.activeCaipNetwork=s,z.setChainNetworkData(a?.namespace,{caipNetwork:s}),Ne.activeChain&&ud.set({activeChain:a?.namespace})),l.forEach(d=>{let f=e?.filter(p=>p.chainNamespace===d);z.state.chains.set(d,{namespace:d,networkState:ot({...Cz,caipNetwork:f?.[0]}),accountState:ot(yue),caipNetworks:f??[],...r}),z.setRequestedCaipNetworks(f??[],d)})},removeAdapter(t){if(Ne.activeChain===t){let e=Array.from(Ne.chains.entries()).find(([r])=>r!==t);if(e){let r=e[1]?.caipNetworks?.[0];r&&z.setActiveCaipNetwork(r)}}Ne.chains.delete(t)},addAdapter(t,{networkControllerClient:e,connectionControllerClient:r},n){Ne.chains.set(t.namespace,{namespace:t.namespace,networkState:{...Cz,caipNetwork:n[0]},accountState:yue,caipNetworks:n,connectionControllerClient:r,networkControllerClient:e}),z.setRequestedCaipNetworks(n?.filter(i=>i.chainNamespace===t.namespace)??[],t.namespace)},addNetwork(t){let e=Ne.chains.get(t.chainNamespace);if(e){let r=[...e.caipNetworks||[]];e.caipNetworks?.find(n=>n.id===t.id)||r.push(t),Ne.chains.set(t.chainNamespace,{...e,caipNetworks:r}),z.setRequestedCaipNetworks(r,t.chainNamespace),ie.filterByNamespace(t.chainNamespace,!0)}},removeNetwork(t,e){let r=Ne.chains.get(t);if(r){let n=Ne.activeCaipNetwork?.id===e,i=[...r.caipNetworks?.filter(s=>s.id!==e)||[]];n&&r?.caipNetworks?.[0]&&z.setActiveCaipNetwork(r.caipNetworks[0]),Ne.chains.set(t,{...r,caipNetworks:i}),z.setRequestedCaipNetworks(i||[],t),i.length===0&&ie.filterByNamespace(t,!1)}},setAdapterNetworkState(t,e){let r=Ne.chains.get(t);r&&(r.networkState={...r.networkState||Cz,...e},Ne.chains.set(t,r))},setChainAccountData(t,e,r=!0){if(!t)throw new Error(\\\"Chain is required to update chain account data\\\");let n=Ne.chains.get(t);if(n){let i={...n.accountState||yue,...e};Ne.chains.set(t,{...n,accountState:i}),(Ne.chains.size===1||Ne.activeChain===t)&&(e.caipAddress&&(Ne.activeCaipAddress=e.caipAddress),Ie.replaceState(i))}},setChainNetworkData(t,e){if(!t)return;let r=Ne.chains.get(t);if(r){let n={...r.networkState||Cz,...e};Ne.chains.set(t,{...r,networkState:n})}},setAccountProp(t,e,r,n=!0){z.setChainAccountData(r,{[t]:e},n),t===\\\"status\\\"&&e===\\\"disconnected\\\"&&r&&ie.removeConnectorId(r)},setActiveNamespace(t){Ne.activeChain=t;let e=t?Ne.chains.get(t):void 0,r=e?.networkState?.caipNetwork;r?.id&&t&&(Ne.activeCaipAddress=e?.accountState?.caipAddress,Ne.activeCaipNetwork=r,z.setChainNetworkData(t,{caipNetwork:r}),Te.setActiveCaipNetworkId(r?.caipNetworkId),ud.set({activeChain:t,selectedNetworkId:r?.caipNetworkId}))},setActiveCaipNetwork(t){if(!t)return;Ne.activeChain!==t.chainNamespace&&z.setIsSwitchingNamespace(!0);let e=Ne.chains.get(t.chainNamespace);Ne.activeChain=t.chainNamespace,Ne.activeCaipNetwork=t,z.setChainNetworkData(t.chainNamespace,{caipNetwork:t}),e?.accountState?.address?Ne.activeCaipAddress=`${t.chainNamespace}:${t.id}:${e?.accountState?.address}`:Ne.activeCaipAddress=void 0,z.setAccountProp(\\\"caipAddress\\\",Ne.activeCaipAddress,t.chainNamespace),e&&Ie.replaceState(e.accountState),ur.resetSend(),ud.set({activeChain:Ne.activeChain,selectedNetworkId:Ne.activeCaipNetwork?.caipNetworkId}),Te.setActiveCaipNetworkId(t.caipNetworkId),!z.checkIfSupportedNetwork(t.chainNamespace)&&ee.state.enableNetworkSwitch&&!ee.state.allowUnsupportedChain&&!me.state.wcBasic&&z.showUnsupportedChainUI()},addCaipNetwork(t){if(!t)return;let e=Ne.chains.get(t.chainNamespace);e&&e?.caipNetworks?.push(t)},async switchActiveNamespace(t){if(!t)return;let e=t!==z.state.activeChain,r=z.getNetworkData(t)?.caipNetwork,n=z.getCaipNetworkByNamespace(t,r?.id);e&&n&&await z.switchActiveNetwork(n)},async switchActiveNetwork(t){let r=!z.state.chains.get(z.state.activeChain)?.caipNetworks?.some(i=>i.id===Ne.activeCaipNetwork?.id),n=z.getNetworkControllerClient(t.chainNamespace);if(n){try{await n.switchCaipNetwork(t),r&&Dt.close()}catch{de.goBack()}Xe.sendEvent({type:\\\"track\\\",event:\\\"SWITCH_NETWORK\\\",properties:{network:t.caipNetworkId}})}},getNetworkControllerClient(t){let e=t||Ne.activeChain,r=Ne.chains.get(e);if(!r)throw new Error(\\\"Chain adapter not found\\\");if(!r.networkControllerClient)throw new Error(\\\"NetworkController client not set\\\");return r.networkControllerClient},getConnectionControllerClient(t){let e=t||Ne.activeChain;if(!e)throw new Error(\\\"Chain is required to get connection controller client\\\");let r=Ne.chains.get(e);if(!r?.connectionControllerClient)throw new Error(\\\"ConnectionController client not set\\\");return r.connectionControllerClient},getAccountProp(t,e){let r=Ne.activeChain;if(e&&(r=e),!r)return;let n=Ne.chains.get(r)?.accountState;if(n)return n[t]},getNetworkProp(t,e){let r=Ne.chains.get(e)?.networkState;if(r)return r[t]},getRequestedCaipNetworks(t){let e=Ne.chains.get(t),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:n=[]}=e?.networkState||{};return oe.sortRequestedNetworks(r,n)},getAllRequestedCaipNetworks(){let t=[];return Ne.chains.forEach(e=>{let r=z.getRequestedCaipNetworks(e.namespace);t.push(...r)}),t},setRequestedCaipNetworks(t,e){z.setAdapterNetworkState(e,{requestedCaipNetworks:t});let n=z.getAllRequestedCaipNetworks().map(s=>s.chainNamespace),i=Array.from(new Set(n));ie.filterByNamespaces(i)},getAllApprovedCaipNetworkIds(){let t=[];return Ne.chains.forEach(e=>{let r=z.getApprovedCaipNetworkIds(e.namespace);t.push(...r)}),t},getActiveCaipNetwork(){return Ne.activeCaipNetwork},getActiveCaipAddress(){return Ne.activeCaipAddress},getApprovedCaipNetworkIds(t){return Ne.chains.get(t)?.networkState?.approvedCaipNetworkIds||[]},async setApprovedCaipNetworksData(t){let r=await z.getNetworkControllerClient()?.getApprovedCaipNetworksData();z.setAdapterNetworkState(t,{approvedCaipNetworkIds:r?.approvedCaipNetworkIds,supportsAllNetworks:r?.supportsAllNetworks})},checkIfSupportedNetwork(t,e){let r=e||Ne.activeCaipNetwork,n=z.getRequestedCaipNetworks(t);return n.length?n?.some(i=>i.id===r?.id):!0},checkIfSupportedChainId(t){return Ne.activeChain?z.getRequestedCaipNetworks(Ne.activeChain)?.some(r=>r.id===t):!0},setSmartAccountEnabledNetworks(t,e){z.setAdapterNetworkState(e,{smartAccountEnabledNetworks:t})},checkIfSmartAccountEnabled(){let t=b7.caipNetworkIdToNumber(Ne.activeCaipNetwork?.caipNetworkId),e=Ne.activeChain;return!e||!t?!1:!!z.getNetworkProp(\\\"smartAccountEnabledNetworks\\\",e)?.includes(Number(t))},getActiveNetworkTokenAddress(){let t=Ne.activeCaipNetwork?.chainNamespace||\\\"eip155\\\",e=Ne.activeCaipNetwork?.id||1,r=Rt.NATIVE_TOKEN_ADDRESS[t];return`${t}:${e}:${r}`},showUnsupportedChainUI(){Dt.open({view:\\\"UnsupportedChain\\\"})},checkIfNamesSupported(){let t=Ne.activeCaipNetwork;return!!(t?.chainNamespace&&Rt.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(t.chainNamespace))},resetNetwork(t){z.setAdapterNetworkState(t,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]})},resetAccount(t){let e=t;if(!e)throw new Error(\\\"Chain is required to set account prop\\\");Ne.activeCaipAddress=void 0,z.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountTypes:void 0,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,allAccounts:[],user:void 0,status:\\\"disconnected\\\"}),ie.removeConnectorId(e)},setIsSwitchingNamespace(t){Ne.isSwitchingNamespace=t},getFirstCaipNetworkSupportsAuthConnector(){let t=[],e;if(Ne.chains.forEach(r=>{_e.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(n=>n===r.namespace)&&r.namespace&&t.push(r.namespace)}),t.length>0){let r=t[0];return e=r?Ne.chains.get(r)?.caipNetworks?.[0]:void 0,e}},getAccountData(t){return t?z.state.chains.get(t)?.accountState:Ie.state},getNetworkData(t){let e=t||Ne.activeChain;if(e)return z.state.chains.get(e)?.networkState},getCaipNetworkByNamespace(t,e){if(!t)return;let r=z.state.chains.get(t),n=r?.caipNetworks?.find(i=>i.id===e);return n||r?.networkState?.caipNetwork||r?.caipNetworks?.[0]},getRequestedCaipNetworkIds(){let t=ie.state.filterByNamespace;return(t?[Ne.chains.get(t)]:Array.from(Ne.chains.values())).flatMap(r=>r?.caipNetworks||[]).map(r=>r.caipNetworkId)},getCaipNetworks(t){return t?z.getRequestedCaipNetworks(t):z.getAllRequestedCaipNetworks()}},z=sn(SUt)});var AUt,BGe,Qc,Qe,z2=x(()=>{u();Kn();mh();Gc();_7();_0();lc();ea();Kc();q2();AUt={purchaseCurrencies:[{id:\\\"2b92315d-eab7-5bef-84fa-089a131333f5\\\",name:\\\"USD Coin\\\",symbol:\\\"USDC\\\",networks:[{name:\\\"ethereum-mainnet\\\",display_name:\\\"Ethereum\\\",chain_id:\\\"1\\\",contract_address:\\\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\\\"},{name:\\\"polygon-mainnet\\\",display_name:\\\"Polygon\\\",chain_id:\\\"137\\\",contract_address:\\\"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\\\"}]},{id:\\\"2b92315d-eab7-5bef-84fa-089a131333f5\\\",name:\\\"Ether\\\",symbol:\\\"ETH\\\",networks:[{name:\\\"ethereum-mainnet\\\",display_name:\\\"Ethereum\\\",chain_id:\\\"1\\\",contract_address:\\\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\\\"},{name:\\\"polygon-mainnet\\\",display_name:\\\"Polygon\\\",chain_id:\\\"137\\\",contract_address:\\\"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\\\"}]}],paymentCurrencies:[{id:\\\"USD\\\",payment_method_limits:[{id:\\\"card\\\",min:\\\"10.00\\\",max:\\\"7500.00\\\"},{id:\\\"ach_bank_account\\\",min:\\\"10.00\\\",max:\\\"25000.00\\\"}]},{id:\\\"EUR\\\",payment_method_limits:[{id:\\\"card\\\",min:\\\"10.00\\\",max:\\\"7500.00\\\"},{id:\\\"ach_bank_account\\\",min:\\\"10.00\\\",max:\\\"25000.00\\\"}]}]},BGe=oe.getBlockchainApiUrl(),Qc=ot({clientId:null,api:new _f({baseUrl:BGe,clientId:null}),supportedChains:{http:[],ws:[]}}),Qe={state:Qc,async get(t){let{st:e,sv:r}=Qe.getSdkProperties(),n=ee.state.projectId,i={...t.params||{},st:e,sv:r,projectId:n};return Qc.api.get({...t,params:i})},getSdkProperties(){let{sdkType:t,sdkVersion:e}=ee.state;return{st:t||\\\"unknown\\\",sv:e||\\\"unknown\\\"}},async isNetworkSupported(t){if(!t)return!1;try{Qc.supportedChains.http.length||await Qe.getSupportedNetworks()}catch{return!1}return Qc.supportedChains.http.includes(t)},async getSupportedNetworks(){try{let t=await Qe.get({path:\\\"v1/supported-chains\\\"});return Qc.supportedChains=t,t}catch{return Qc.supportedChains}},async fetchIdentity({address:t,caipNetworkId:e}){if(!await Qe.isNetworkSupported(e))return{avatar:\\\"\\\",name:\\\"\\\"};let n=Te.getIdentityFromCacheForAddress(t);if(n)return n;let i=await Qe.get({path:`/v1/identity/${t}`,params:{sender:z.state.activeCaipAddress?oe.getPlainAddress(z.state.activeCaipAddress):void 0}});return Te.updateIdentityCache({address:t,identity:i,timestamp:Date.now()}),i},async fetchTransactions({account:t,cursor:e,onramp:r,signal:n,cache:i,chainId:s}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:`/v1/account/${t}/history`,params:{cursor:e,onramp:r,chainId:s},signal:n,cache:i}):{data:[],next:void 0}},async fetchSwapQuote({amount:t,userAddress:e,from:r,to:n,gasPrice:i}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:\\\"/v1/convert/quotes\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},params:{amount:t,userAddress:e,from:r,to:n,gasPrice:i}}):{quotes:[]}},async fetchSwapTokens({chainId:t}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:\\\"/v1/convert/tokens\\\",params:{chainId:t}}):{tokens:[]}},async fetchTokenPrice({addresses:t}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qc.api.post({path:\\\"/v1/fungible/price\\\",body:{currency:\\\"usd\\\",addresses:t,projectId:ee.state.projectId},headers:{\\\"Content-Type\\\":\\\"application/json\\\"}}):{fungibles:[]}},async fetchSwapAllowance({tokenAddress:t,userAddress:e}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:\\\"/v1/convert/allowance\\\",params:{tokenAddress:t,userAddress:e},headers:{\\\"Content-Type\\\":\\\"application/json\\\"}}):{allowance:\\\"0\\\"}},async fetchGasPrice({chainId:t}){let{st:e,sv:r}=Qe.getSdkProperties();if(!await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId))throw new Error(\\\"Network not supported for Gas Price\\\");return Qe.get({path:\\\"/v1/convert/gas-price\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},params:{chainId:t,st:e,sv:r}})},async generateSwapCalldata({amount:t,from:e,to:r,userAddress:n,disableEstimate:i}){if(!await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId))throw new Error(\\\"Network not supported for Swaps\\\");return Qc.api.post({path:\\\"/v1/convert/build-transaction\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},body:{amount:t,eip155:{slippage:Rt.CONVERT_SLIPPAGE_TOLERANCE},projectId:ee.state.projectId,from:e,to:r,userAddress:n,disableEstimate:i}})},async generateApproveCalldata({from:t,to:e,userAddress:r}){let{st:n,sv:i}=Qe.getSdkProperties();if(!await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId))throw new Error(\\\"Network not supported for Swaps\\\");return Qe.get({path:\\\"/v1/convert/build-approve\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},params:{userAddress:r,from:t,to:e,st:n,sv:i}})},async getBalance(t,e,r){let{st:n,sv:i}=Qe.getSdkProperties();if(!await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId))return wr.showError(\\\"Token Balance Unavailable\\\"),{balances:[]};let o=`${e}:${t}`,a=Te.getBalanceCacheForCaipAddress(o);if(a)return a;let c=await Qe.get({path:`/v1/account/${t}/balance`,params:{currency:\\\"usd\\\",chainId:e,forceUpdate:r,st:n,sv:i}});return Te.updateBalanceCache({caipAddress:o,balance:c,timestamp:Date.now()}),c},async lookupEnsName(t){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:`/v1/profile/account/${t}`,params:{apiVersion:\\\"2\\\"}}):{addresses:{},attributes:[]}},async reverseLookupEnsName({address:t}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:`/v1/profile/reverse/${t}`,params:{sender:Ie.state.address,apiVersion:\\\"2\\\"}}):[]},async getEnsNameSuggestions(t){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:`/v1/profile/suggestions/${t}`,params:{zone:\\\"reown.id\\\"}}):{suggestions:[]}},async registerEnsName({coinType:t,address:e,message:r,signature:n}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qc.api.post({path:\\\"/v1/profile/account\\\",body:{coin_type:t,address:e,message:r,signature:n},headers:{\\\"Content-Type\\\":\\\"application/json\\\"}}):{success:!1}},async generateOnRampURL({destinationWallets:t,partnerUserId:e,defaultNetwork:r,purchaseAmount:n,paymentAmount:i}){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?(await Qc.api.post({path:\\\"/v1/generators/onrampurl\\\",params:{projectId:ee.state.projectId},body:{destinationWallets:t,defaultNetwork:r,partnerUserId:e,defaultExperience:\\\"buy\\\",presetCryptoAmount:n,presetFiatAmount:i}})).url:\\\"\\\"},async getOnrampOptions(){if(!await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await Qe.get({path:\\\"/v1/onramp/options\\\"})}catch{return AUt}},async getOnrampQuote({purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}){try{return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?await Qc.api.post({path:\\\"/v1/onramp/quote\\\",params:{projectId:ee.state.projectId},body:{purchaseCurrency:t,paymentCurrency:e,amount:r,network:n}}):null}catch{return{coinbaseFee:{amount:r,currency:e.id},networkFee:{amount:r,currency:e.id},paymentSubtotal:{amount:r,currency:e.id},paymentTotal:{amount:r,currency:e.id},purchaseAmount:{amount:r,currency:e.id},quoteId:\\\"mocked-quote-id\\\"}}},async getSmartSessions(t){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qe.get({path:`/v1/sessions/${t}`}):[]},async revokeSmartSession(t,e,r){return await Qe.isNetworkSupported(z.state.activeCaipNetwork?.caipNetworkId)?Qc.api.post({path:`/v1/sessions/${t}/revoke`,params:{projectId:ee.state.projectId},body:{pci:e,signature:r}}):{success:!1}},setClientId(t){Qc.clientId=t,Qc.api=new _f({baseUrl:BGe,clientId:t})}}});var dd,TUt,Ie,lc=x(()=>{u();Kn();mh();Gc();cc();z2();ea();q2();dd=ot({currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]}),TUt={state:dd,replaceState(t){t&&Object.assign(dd,$l(t))},subscribe(t){return z.subscribeChainProp(\\\"accountState\\\",e=>{if(e)return t(e)})},subscribeKey(t,e,r){let n;return z.subscribeChainProp(\\\"accountState\\\",i=>{if(i){let s=i[t];n!==s&&(n=s,e(s))}},r)},setStatus(t,e){z.setAccountProp(\\\"status\\\",t,e)},getCaipAddress(t){return z.getAccountProp(\\\"caipAddress\\\",t)},setCaipAddress(t,e){let r=t?oe.getPlainAddress(t):void 0;e===z.state.activeChain&&(z.state.activeCaipAddress=t),z.setAccountProp(\\\"caipAddress\\\",t,e),z.setAccountProp(\\\"address\\\",r,e)},setBalance(t,e,r){z.setAccountProp(\\\"balance\\\",t,r),z.setAccountProp(\\\"balanceSymbol\\\",e,r)},setProfileName(t,e){z.setAccountProp(\\\"profileName\\\",t,e)},setProfileImage(t,e){z.setAccountProp(\\\"profileImage\\\",t,e)},setUser(t,e){z.setAccountProp(\\\"user\\\",t,e)},setAddressExplorerUrl(t,e){z.setAccountProp(\\\"addressExplorerUrl\\\",t,e)},setSmartAccountDeployed(t,e){z.setAccountProp(\\\"smartAccountDeployed\\\",t,e)},setCurrentTab(t){z.setAccountProp(\\\"currentTab\\\",t,z.state.activeChain)},setTokenBalance(t,e){t&&z.setAccountProp(\\\"tokenBalance\\\",t,e)},setShouldUpdateToAddress(t,e){z.setAccountProp(\\\"shouldUpdateToAddress\\\",t,e)},setAllAccounts(t,e){z.setAccountProp(\\\"allAccounts\\\",t,e)},addAddressLabel(t,e,r){let n=z.getAccountProp(\\\"addressLabels\\\",r)||new Map;n.set(t,e),z.setAccountProp(\\\"addressLabels\\\",n,r)},removeAddressLabel(t,e){let r=z.getAccountProp(\\\"addressLabels\\\",e)||new Map;r.delete(t),z.setAccountProp(\\\"addressLabels\\\",r,e)},setConnectedWalletInfo(t,e){z.setAccountProp(\\\"connectedWalletInfo\\\",t,e,!1)},setPreferredAccountType(t,e){z.setAccountProp(\\\"preferredAccountTypes\\\",{...dd.preferredAccountTypes,[e]:t},e)},setPreferredAccountTypes(t){dd.preferredAccountTypes=t},setSocialProvider(t,e){t&&z.setAccountProp(\\\"socialProvider\\\",t,e)},setSocialWindow(t,e){z.setAccountProp(\\\"socialWindow\\\",t?$l(t):void 0,e)},setFarcasterUrl(t,e){z.setAccountProp(\\\"farcasterUrl\\\",t,e)},async fetchTokenBalance(t){dd.balanceLoading=!0;let e=z.state.activeCaipNetwork?.caipNetworkId,r=z.state.activeCaipNetwork?.chainNamespace,n=z.state.activeCaipAddress,i=n?oe.getPlainAddress(n):void 0;if(dd.lastRetry&&!oe.isAllowedRetry(dd.lastRetry,30*Rt.ONE_SEC_MS))return dd.balanceLoading=!1,[];try{if(i&&e&&r){let o=(await Qe.getBalance(i,e)).balances.filter(a=>a.quantity.decimals!==\\\"0\\\");return Ie.setTokenBalance(o,r),dd.lastRetry=void 0,dd.balanceLoading=!1,o}}catch(s){dd.lastRetry=Date.now(),t?.(s),wr.showError(\\\"Token Balance Unavailable\\\")}finally{dd.balanceLoading=!1}return[]},resetAccount(t){z.resetAccount(t)}},Ie=sn(TUt)});var MGe,DGe=x(()=>{u();Ri();lc();ea();ld();Sf();MGe={onSwitchNetwork({network:t,ignoreSwitchConfirmation:e=!1}){let r=z.state.activeCaipNetwork,n=de.state.data;if(t.id===r?.id)return;let s=Ie.getCaipAddress(z.state.activeChain),o=t.chainNamespace!==z.state.activeChain,a=Ie.getCaipAddress(t.chainNamespace),l=ie.getConnectorId(z.state.activeChain)===_e.CONNECTOR_ID.AUTH,d=_e.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(f=>f===t.chainNamespace);e||l&&d?de.push(\\\"SwitchNetwork\\\",{...n,network:t}):s&&o&&!a?de.push(\\\"SwitchActiveChain\\\",{switchToChain:t.chainNamespace,navigateTo:\\\"Connect\\\",navigateWithReplace:!0,network:t}):de.push(\\\"SwitchNetwork\\\",{...n,network:t})}}});var Jc,IUt,Dt,j2=x(()=>{u();Kn();xo();Gc();DGe();cc();lc();g4();ea();D1();ld();S0();Kc();Ez();Sf();Jc=ot({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),IUt={state:Jc,subscribe(t){return Lr(Jc,()=>t(Jc))},subscribeKey(t,e){return lr(Jc,t,e)},async open(t){let e=Ie.state.status===\\\"connected\\\",r=t?.namespace,n=z.state.activeChain,i=r&&r!==n,s=z.getAccountData(t?.namespace)?.caipAddress;if(me.state.wcBasic?ye.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1}):await ye.prefetch({fetchConnectorImages:!e,fetchFeaturedWallets:!e,fetchRecommendedWallets:!e}),ie.setFilterByNamespace(t?.namespace),Dt.setLoading(!0,r),r&&i){let o=z.getNetworkData(r)?.caipNetwork||z.getRequestedCaipNetworks(r)[0];o&&MGe.onSwitchNetwork({network:o,ignoreSwitchConfirmation:!0})}else{let o=z.state.noAdapters;ee.state.manualWCControl||o&&!s?oe.isMobile()?de.reset(\\\"AllWallets\\\"):de.reset(\\\"ConnectingWalletConnectBasic\\\"):t?.view?de.reset(t.view,t.data):s?de.reset(\\\"Account\\\"):de.reset(\\\"Connect\\\")}Jc.open=!0,ud.set({open:!0}),Xe.sendEvent({type:\\\"track\\\",event:\\\"MODAL_OPEN\\\",properties:{connected:!!s}})},close(){let t=ee.state.enableEmbedded,e=!!z.state.activeCaipAddress;Jc.open&&Xe.sendEvent({type:\\\"track\\\",event:\\\"MODAL_CLOSE\\\",properties:{connected:e}}),Jc.open=!1,de.reset(\\\"Connect\\\"),Dt.clearLoading(),t?e?de.replace(\\\"Account\\\"):de.push(\\\"Connect\\\"):ud.set({open:!1}),me.resetUri()},setLoading(t,e){e&&Jc.loadingNamespaceMap.set(e,t),Jc.loading=t,ud.set({loading:t})},clearLoading(){Jc.loadingNamespaceMap.clear(),Jc.loading=!1},shake(){Jc.shake||(Jc.shake=!0,setTimeout(()=>{Jc.shake=!1},500))}},Dt=sn(IUt)});var C7,bue,RUt,vr,PUt,S7,LGe=x(()=>{u();Kn();xo();Ri();mh();cc();lc();g4();z2();ea();Kc();C7={id:\\\"2b92315d-eab7-5bef-84fa-089a131333f5\\\",name:\\\"USD Coin\\\",symbol:\\\"USDC\\\",networks:[{name:\\\"ethereum-mainnet\\\",display_name:\\\"Ethereum\\\",chain_id:\\\"1\\\",contract_address:\\\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\\\"},{name:\\\"polygon-mainnet\\\",display_name:\\\"Polygon\\\",chain_id:\\\"137\\\",contract_address:\\\"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\\\"}]},bue={id:\\\"USD\\\",payment_method_limits:[{id:\\\"card\\\",min:\\\"10.00\\\",max:\\\"7500.00\\\"},{id:\\\"ach_bank_account\\\",min:\\\"10.00\\\",max:\\\"25000.00\\\"}]},RUt={providers:cue,selectedProvider:null,error:null,purchaseCurrency:C7,paymentCurrency:bue,purchaseCurrencies:[C7],paymentCurrencies:[],quotesLoading:!1},vr=ot(RUt),PUt={state:vr,subscribe(t){return Lr(vr,()=>t(vr))},subscribeKey(t,e){return lr(vr,t,e)},setSelectedProvider(t){if(t&&t.name===\\\"meld\\\"){let e=z.state.activeChain===_e.CHAIN.SOLANA?\\\"SOL\\\":\\\"USDC\\\",r=Ie.state.address??\\\"\\\",n=new URL(t.url);n.searchParams.append(\\\"publicKey\\\",xGe),n.searchParams.append(\\\"destinationCurrencyCode\\\",e),n.searchParams.append(\\\"walletAddress\\\",r),n.searchParams.append(\\\"externalCustomerId\\\",ee.state.projectId),vr.selectedProvider={...t,url:n.toString()}}else vr.selectedProvider=t},setOnrampProviders(t){if(Array.isArray(t)&&t.every(e=>typeof e==\\\"string\\\")){let e=t,r=cue.filter(n=>e.includes(n.name));vr.providers=r}else vr.providers=[]},setPurchaseCurrency(t){vr.purchaseCurrency=t},setPaymentCurrency(t){vr.paymentCurrency=t},setPurchaseAmount(t){S7.state.purchaseAmount=t},setPaymentAmount(t){S7.state.paymentAmount=t},async getAvailableCurrencies(){let t=await Qe.getOnrampOptions();vr.purchaseCurrencies=t.purchaseCurrencies,vr.paymentCurrencies=t.paymentCurrencies,vr.paymentCurrency=t.paymentCurrencies[0]||bue,vr.purchaseCurrency=t.purchaseCurrencies[0]||C7,await ye.fetchCurrencyImages(t.paymentCurrencies.map(e=>e.id)),await ye.fetchTokenImages(t.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){vr.quotesLoading=!0;try{let t=await Qe.getOnrampQuote({purchaseCurrency:vr.purchaseCurrency,paymentCurrency:vr.paymentCurrency,amount:vr.paymentAmount?.toString()||\\\"0\\\",network:vr.purchaseCurrency?.symbol});return vr.quotesLoading=!1,vr.purchaseAmount=Number(t?.purchaseAmount.amount),t}catch(t){return vr.error=t.message,vr.quotesLoading=!1,null}finally{vr.quotesLoading=!1}},resetState(){vr.selectedProvider=null,vr.error=null,vr.purchaseCurrency=C7,vr.paymentCurrency=bue,vr.purchaseCurrencies=[C7],vr.paymentCurrencies=[],vr.paymentAmount=void 0,vr.purchaseAmount=void 0,vr.quotesLoading=!1}},S7=sn(PUt)});var Af,OUt,I0,UGe=x(()=>{u();Kn();xo();cc();Af=ot({message:\\\"\\\",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:\\\"shade\\\"}),OUt={state:Af,subscribe(t){return Lr(Af,()=>t(Af))},subscribeKey(t,e){return lr(Af,t,e)},showTooltip({message:t,triggerRect:e,variant:r}){Af.open=!0,Af.message=t,Af.triggerRect=e,Af.variant=r},hide(){Af.open=!1,Af.message=\\\"\\\",Af.triggerRect={width:0,height:0,top:0,left:0}}},I0=sn(OUt)});var FGe,jGe=x(()=>{u();FGe={convertEVMChainIdToCoinType(t){if(t>=2147483648)throw new Error(\\\"Invalid chainId\\\");return(2147483648|t)>>>0}}});var fd,NUt,L1,HGe=x(()=>{u();Kn();xo();jGe();_0();cc();lc();z2();ea();D1();ld();Sf();fd=ot({suggestions:[],loading:!1}),NUt={state:fd,subscribe(t){return Lr(fd,()=>t(fd))},subscribeKey(t,e){return lr(fd,t,e)},async resolveName(t){try{return await Qe.lookupEnsName(t)}catch(e){let r=e;throw new Error(r?.reasons?.[0]?.description||\\\"Error resolving name\\\")}},async isNameRegistered(t){try{return await Qe.lookupEnsName(t),!0}catch{return!1}},async getSuggestions(t){try{fd.loading=!0,fd.suggestions=[];let e=await Qe.getEnsNameSuggestions(t);return fd.suggestions=e.suggestions.map(r=>({...r,name:r.name}))||[],fd.suggestions}catch(e){let r=L1.parseEnsApiError(e,\\\"Error fetching name suggestions\\\");throw new Error(r)}finally{fd.loading=!1}},async getNamesForAddress(t){try{if(!z.state.activeCaipNetwork)return[];let r=Te.getEnsFromCacheForAddress(t);if(r)return r;let n=await Qe.reverseLookupEnsName({address:t});return Te.updateEnsCache({address:t,ens:n,timestamp:Date.now()}),n}catch(e){let r=L1.parseEnsApiError(e,\\\"Error fetching names for address\\\");throw new Error(r)}},async registerName(t){let e=z.state.activeCaipNetwork;if(!e)throw new Error(\\\"Network not found\\\");let r=Ie.state.address,n=ie.getAuthConnector();if(!r||!n)throw new Error(\\\"Address or auth connector not found\\\");fd.loading=!0;try{let i=JSON.stringify({name:t,attributes:{},timestamp:Math.floor(Date.now()/1e3)});de.pushTransactionStack({onCancel(){de.replace(\\\"RegisterAccountName\\\")}});let s=await me.signMessage(i);fd.loading=!1;let o=e.id;if(!o)throw new Error(\\\"Network not found\\\");let a=FGe.convertEVMChainIdToCoinType(Number(o));await Qe.registerEnsName({coinType:a,address:r,signature:s,message:i}),Ie.setProfileName(t,e.chainNamespace),de.replace(\\\"RegisterAccountNameSuccess\\\")}catch(i){let s=L1.parseEnsApiError(i,`Error registering name ${t}`);throw de.replace(\\\"RegisterAccountName\\\"),new Error(s)}finally{fd.loading=!1}},validateName(t){return/^[a-zA-Z0-9-]{4,}$/u.test(t)},parseEnsApiError(t,e){return t?.reasons?.[0]?.description||e}},L1=sn(NUt)});var $Ge,kUt,BUt,qGe,Sz,MUt,DUt,LUt,Az,Tz,Iz,Rz,Pz,Oz,Nz,kz,Bz,Mz,UUt,FUt,zGe,Dz,Lz,wue=x(()=>{u();wq();$Ge=Me(ho()),kUt=Object.defineProperty,BUt=(t,e,r)=>e in t?kUt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,qGe=(t,e,r)=>BUt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Sz=class extends bo{constructor(e){super(),this.opts=e,qGe(this,\\\"protocol\\\",\\\"wc\\\"),qGe(this,\\\"version\\\",2)}},MUt=Object.defineProperty,DUt=(t,e,r)=>e in t?MUt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,LUt=(t,e,r)=>DUt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Az=class extends bo{constructor(e,r){super(),this.core=e,this.logger=r,LUt(this,\\\"records\\\",new Map)}},Tz=class{constructor(e,r){this.logger=e,this.core=r}},Iz=class extends bo{constructor(e,r){super(),this.relayer=e,this.logger=r}},Rz=class extends bo{constructor(e){super()}},Pz=class{constructor(e,r,n,i){this.core=e,this.logger=r,this.name=n}},Oz=class extends bo{constructor(e,r){super(),this.relayer=e,this.logger=r}},Nz=class extends bo{constructor(e,r){super(),this.core=e,this.logger=r}},kz=class{constructor(e,r,n){this.core=e,this.logger=r,this.store=n}},Bz=class{constructor(e,r){this.projectId=e,this.logger=r}},Mz=class{constructor(e,r,n){this.core=e,this.logger=r,this.telemetryEnabled=n}},UUt=Object.defineProperty,FUt=(t,e,r)=>e in t?UUt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,zGe=(t,e,r)=>FUt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Dz=class{constructor(e){this.opts=e,zGe(this,\\\"protocol\\\",\\\"wc\\\"),zGe(this,\\\"version\\\",2)}},Lz=class{constructor(e){this.client=e}}});var WZe={};ue(WZe,{BASE10:()=>yde,BASE16:()=>ra,BASE64:()=>Xc,BASE64URL:()=>xh,COLON:()=>JUt,DEFAULT_DEPTH:()=>Kue,EMPTY_SPACE:()=>Hz,ENV_MAP:()=>uc,INTERNAL_ERRORS:()=>BZe,MemoryStore:()=>M0,ONE_THOUSAND:()=>YUt,REACT_NATIVE_PRODUCT:()=>TKe,RELAYER_DEFAULT_PROTOCOL:()=>CZe,SDK_ERRORS:()=>kZe,SDK_TYPE:()=>RKe,SLASH:()=>IKe,TYPE_0:()=>bde,TYPE_1:()=>md,TYPE_2:()=>Q2,UTF8:()=>B4,addResourceToRecap:()=>nZe,appendToQueryString:()=>PKe,assertType:()=>tFt,assignAbilityToActions:()=>ude,base64Decode:()=>tZe,base64Encode:()=>eZe,buildApprovedNamespaces:()=>lHt,buildAuthObject:()=>MFt,buildNamespacesFromAuth:()=>f$,buildRecapStatement:()=>sZe,calcExpiry:()=>ns,capitalize:()=>sFt,capitalizeWord:()=>MKe,createDelayedPromise:()=>wh,createEncodedRecap:()=>dde,createExpiringPromise:()=>vh,createRecap:()=>rZe,decodeRecap:()=>q1,decodeTypeByte:()=>B0,decodeTypeTwoEnvelope:()=>Ade,decrypt:()=>Cde,deriveSymKey:()=>xde,deserialize:()=>Y2,encodeRecap:()=>Xz,encodeTypeByte:()=>Ede,encodeTypeTwoEnvelope:()=>Sde,encrypt:()=>_de,engineEvent:()=>xr,enumify:()=>iFt,extractSolanaTransactionId:()=>cde,formatAccountId:()=>_Ke,formatAccountWithChain:()=>jUt,formatChainId:()=>EKe,formatDeeplinkUrl:()=>DKe,formatExpirerTarget:()=>Xue,formatIdTarget:()=>tde,formatMessage:()=>Yz,formatMessageContext:()=>rFt,formatRelayParams:()=>TZe,formatRelayRpcUrl:()=>Yue,formatStatementFromRecap:()=>hde,formatTopicTarget:()=>ede,formatUA:()=>Gz,formatUri:()=>d$,fromBase64:()=>ide,generateKeyPair:()=>vde,generateRandomBytes32:()=>H7,getAccountsChains:()=>ex,getAccountsFromNamespaces:()=>qUt,getAddressFromAccount:()=>CKe,getAddressesFromAccounts:()=>HUt,getAppId:()=>Vz,getAppMetadata:()=>Wz,getBrowserOnlineStatus:()=>HZe,getChainFromAccount:()=>SKe,getChainsFromAccounts:()=>AKe,getChainsFromNamespace:()=>$z,getChainsFromNamespaces:()=>zUt,getChainsFromRecap:()=>t$,getChainsFromRequiredNamespaces:()=>$Ut,getCommonValuesInArrays:()=>Oue,getCryptoKeyFromKeyData:()=>_Ze,getDecodedRecapFromResources:()=>JKe,getDeepLink:()=>nde,getDidAddress:()=>N4,getDidAddressSegments:()=>Qz,getDidChainId:()=>QKe,getEnvironment:()=>Z2,getHttpUrl:()=>eFt,getInternalError:()=>Se,getJavascriptID:()=>NKe,getJavascriptOS:()=>OKe,getLastItems:()=>BKe,getLinkModeURL:()=>D4,getMethodsFromRecap:()=>e$,getNamespacedDidChainId:()=>U7,getNamespacesChains:()=>IZe,getNamespacesEventsForChainId:()=>PZe,getNamespacesFromAccounts:()=>NZe,getNamespacesMethodsForChainId:()=>RZe,getNodeOnlineStatus:()=>zZe,getReCapActions:()=>XKe,getReactNativeOnlineStatus:()=>qZe,getRecapAbilitiesFromResource:()=>UFt,getRecapFromResources:()=>$1,getRecapResource:()=>YKe,getRelayClientMetadata:()=>XUt,getRelayProtocolApi:()=>X2,getRelayProtocolName:()=>M4,getRequiredNamespacesFromNamespaces:()=>cHt,getSdkError:()=>Jr,getSearchParamFromURL:()=>Kz,getUniqueValues:()=>Gue,handleDeeplinkRedirect:()=>rde,hasOverlap:()=>j1,hashEthereumMessage:()=>ade,hashKey:()=>J2,hashMessage:()=>Kl,isAndroid:()=>Zue,isAppVisible:()=>Zde,isBrowser:()=>z1,isCaipNamespace:()=>Pde,isConformingNamespaces:()=>q7,isExpired:()=>If,isIframe:()=>FKe,isIos:()=>Que,isNode:()=>R4,isOnline:()=>g$,isProposalStruct:()=>Bde,isReactNative:()=>bh,isRecap:()=>fde,isSessionCompatible:()=>Nde,isSessionStruct:()=>Mde,isTelegram:()=>UKe,isTestRun:()=>P4,isTypeOneEnvelope:()=>c$,isTypeTwoEnvelope:()=>l$,isUndefined:()=>Bs,isValidAccountId:()=>MZe,isValidAccounts:()=>UZe,isValidActions:()=>jZe,isValidArray:()=>tx,isValidChainId:()=>k7,isValidChains:()=>DZe,isValidController:()=>Dde,isValidEip1271Signature:()=>KKe,isValidEip191Signature:()=>GKe,isValidErrorReason:()=>Hde,isValidEvent:()=>$de,isValidId:()=>jde,isValidNamespaceAccounts:()=>FZe,isValidNamespaceActions:()=>Lde,isValidNamespaceChains:()=>LZe,isValidNamespaceMethodsOrEvents:()=>Vue,isValidNamespaces:()=>L4,isValidNamespacesChainId:()=>m$,isValidNamespacesEvent:()=>Wde,isValidNamespacesRequest:()=>Vde,isValidNumber:()=>p$,isValidObject:()=>rx,isValidParams:()=>na,isValidRecap:()=>yh,isValidRelay:()=>h$,isValidRelays:()=>Fde,isValidRequest:()=>qde,isValidRequestExpiry:()=>Gde,isValidRequiredNamespaces:()=>Ude,isValidResponse:()=>zde,isValidString:()=>Hi,isValidUrl:()=>kde,mapEntries:()=>nFt,mapToObj:()=>B7,mergeArrays:()=>pd,mergeEncodedRecaps:()=>pde,mergeRecaps:()=>iZe,mergeRequiredAndOptionalNamespaces:()=>Ode,normalizeNamespaces:()=>N7,objToMap:()=>M7,openDeeplink:()=>LKe,parseAccountId:()=>Wue,parseChainId:()=>K2,parseContextNames:()=>kKe,parseExpirerTarget:()=>D7,parseNamespaceKey:()=>OZe,parseRelayParams:()=>SZe,parseTopic:()=>AZe,parseUri:()=>u$,populateAppMetadata:()=>Jue,populateAuthPayload:()=>DFt,recapHasResource:()=>LFt,serialize:()=>Tde,sleep:()=>sde,subscribeToBrowserNetworkChange:()=>$Ze,subscribeToNetworkChange:()=>Kde,subscribeToReactNativeNetworkChange:()=>VZe,toBase64:()=>jKe,uuidv4:()=>Zz,validateDecoding:()=>Ide,validateEncoding:()=>a$,validateSignedCacao:()=>Jz,verifyP256Jwt:()=>Rde,verifySignature:()=>WKe});function K2(t){let[e,r]=t.split(zz);return{namespace:e,reference:r}}function EKe(t){let{namespace:e,reference:r}=t;return[e,r].join(zz)}function Wue(t){let[e,r,n]=t.split(zz);return{namespace:e,reference:r,address:n}}function _Ke(t){let{namespace:e,reference:r,address:n}=t;return[e,r,n].join(zz)}function Gue(t,e){let r=[];return t.forEach(n=>{let i=e(n);r.includes(i)||r.push(i)}),r}function CKe(t){let{address:e}=Wue(t);return e}function SKe(t){let{namespace:e,reference:r}=Wue(t);return EKe({namespace:e,reference:r})}function jUt(t,e){let{namespace:r,reference:n}=K2(e);return _Ke({namespace:r,reference:n,address:t})}function HUt(t){return Gue(t,CKe)}function AKe(t){return Gue(t,SKe)}function qUt(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...i.accounts)}),r}function zUt(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...AKe(i.accounts))}),r}function $Ut(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...$z(n,i))}),r}function $z(t,e){return t.includes(\\\":\\\")?[t]:e.chains||[]}function R4(){return typeof process<\\\"u\\\"&&typeof process.versions<\\\"u\\\"&&typeof process.versions.node<\\\"u\\\"}function bh(){return!(0,hd.getDocument)()&&!!(0,hd.getNavigator)()&&navigator.product===TKe}function Zue(){return bh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"&&globalThis?.Platform.OS===\\\"android\\\"}function Que(){return bh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"&&globalThis?.Platform.OS===\\\"ios\\\"}function z1(){return!R4()&&!!(0,hd.getNavigator)()&&!!(0,hd.getDocument)()}function Z2(){return bh()?uc.reactNative:R4()?uc.node:z1()?uc.browser:uc.unknown}function Vz(){var t;try{return bh()&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Application<\\\"u\\\"?(t=globalThis.Application)==null?void 0:t.applicationId:void 0}catch{return}}function PKe(t,e){let r=new URLSearchParams(t);for(let n of Object.keys(e).sort())if(e.hasOwnProperty(n)){let i=e[n];i!==void 0&&r.set(n,i)}return r.toString()}function Jue(t){var e,r;let n=Wz();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t?.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!==\\\"\\\")),QUt(GGe(GGe({},n),t),{url:t?.url||n.url,name:t?.name||n.name,description:t?.description||n.description,icons:(r=t?.icons)!=null&&r.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn(\\\"Error populating app metadata\\\",i),t||n}}function Wz(){return(0,xKe.getWindowMetadata)()||{name:\\\"\\\",description:\\\"\\\",url:\\\"\\\",icons:[\\\"\\\"]}}function XUt(t,e){var r;let n=Z2(),i={protocol:t,version:e,env:n};return n===\\\"browser\\\"&&(i.host=((r=(0,hd.getLocation)())==null?void 0:r.host)||\\\"unknown\\\"),i}function OKe(){if(Z2()===uc.reactNative&&typeof globalThis<\\\"u\\\"&&typeof globalThis?.Platform<\\\"u\\\"){let{OS:r,Version:n}=globalThis.Platform;return[r,n].join(\\\"-\\\")}let t=dH();if(t===null)return\\\"unknown\\\";let e=t.os?t.os.replace(\\\" \\\",\\\"\\\").toLowerCase():\\\"unknown\\\";return t.type===\\\"browser\\\"?[e,t.name,t.version].join(\\\"-\\\"):[e,t.version].join(\\\"-\\\")}function NKe(){var t;let e=Z2();return e===uc.browser?[e,((t=(0,hd.getLocation)())==null?void 0:t.host)||\\\"unknown\\\"].join(\\\":\\\"):e}function Gz(t,e,r){let n=OKe(),i=NKe();return[[t,e].join(\\\"-\\\"),[RKe,r].join(\\\"-\\\"),n,i].join(\\\"/\\\")}function Yue({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a,packageName:c}){let l=r.split(\\\"?\\\"),d=Gz(t,e,n),f={auth:i,ua:d,projectId:s,useOnCloseEvent:o||void 0,packageName:c||void 0,bundleId:a||void 0},p=PKe(l[1]||\\\"\\\",f);return l[0]+\\\"?\\\"+p}function eFt(t){let e=(t.match(/^[^:]+(?=:\\\\/\\\\/)/gi)||[])[0],r=typeof e<\\\"u\\\"?t.split(\\\"://\\\")[1]:t;return e=e===\\\"wss\\\"?\\\"https\\\":\\\"http\\\",[e,r].join(\\\"://\\\")}function tFt(t,e,r){if(!t[e]||typeof t[e]!==r)throw new Error(`Missing or invalid \\\"${e}\\\" param`)}function kKe(t,e=Kue){return BKe(t.split(IKe),e)}function rFt(t){return kKe(t).join(Hz)}function j1(t,e){return t.filter(r=>e.includes(r)).length===t.length}function BKe(t,e=Kue){return t.slice(Math.max(t.length-e,0))}function B7(t){return Object.fromEntries(t.entries())}function M7(t){return new Map(Object.entries(t))}function nFt(t,e){let r={};return Object.keys(t).forEach(n=>{r[n]=e(t[n])}),r}function MKe(t){return t.trim().replace(/^\\\\w/,e=>e.toUpperCase())}function sFt(t){return t.split(Hz).map(e=>MKe(e)).join(Hz)}function wh(t=k0.FIVE_MINUTES,e){let r=(0,k0.toMiliseconds)(t||k0.FIVE_MINUTES),n,i,s,o;return{resolve:a=>{s&&n&&(clearTimeout(s),n(a),o=Promise.resolve(a))},reject:a=>{s&&i&&(clearTimeout(s),i(a))},done:()=>new Promise((a,c)=>{if(o)return a(o);s=setTimeout(()=>{let l=new Error(e);o=Promise.reject(l),c(l)},r),n=a,i=c})}}function vh(t,e,r){return new Promise(async(n,i)=>{let s=setTimeout(()=>i(new Error(r)),e);try{let o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function Xue(t,e){if(typeof e==\\\"string\\\"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()===\\\"topic\\\"){if(typeof e!=\\\"string\\\")throw new Error('Value must be \\\"string\\\" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()===\\\"id\\\"){if(typeof e!=\\\"number\\\")throw new Error('Value must be \\\"number\\\" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function ede(t){return Xue(\\\"topic\\\",t)}function tde(t){return Xue(\\\"id\\\",t)}function D7(t){let[e,r]=t.split(\\\":\\\"),n={id:void 0,topic:void 0};if(e===\\\"topic\\\"&&typeof r==\\\"string\\\")n.topic=r;else if(e===\\\"id\\\"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function ns(t,e){return(0,k0.fromMiliseconds)((e||Date.now())+(0,k0.toMiliseconds)(t))}function If(t){return Date.now()>=(0,k0.toMiliseconds)(t)}function xr(t,e){return`${t}${e?`:${e}`:\\\"\\\"}`}function pd(t=[],e=[]){return[...new Set([...t,...e])]}async function rde({id:t,topic:e,wcDeepLink:r}){var n;try{if(!r)return;let i=typeof r==\\\"string\\\"?JSON.parse(r):r,s=i?.href;if(typeof s!=\\\"string\\\")return;let o=DKe(s,t,e),a=Z2();if(a===uc.browser){if(!((n=(0,hd.getDocument)())!=null&&n.hasFocus())){console.warn(\\\"Document does not have focus, skipping deeplink.\\\");return}LKe(o)}else a===uc.reactNative&&typeof globalThis?.Linking<\\\"u\\\"&&await globalThis.Linking.openURL(o)}catch(i){console.error(i)}}function DKe(t,e,r){let n=`requestId=${e}&sessionTopic=${r}`;t.endsWith(\\\"/\\\")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith(\\\"https://t.me\\\")){let s=t.includes(\\\"?\\\")?\\\"&startapp=\\\":\\\"?startapp=\\\";i=`${i}${s}${jKe(n,!0)}`}else i=`${i}/wc?${n}`;return i}function LKe(t){let e=\\\"_self\\\";FKe()?e=\\\"_top\\\":(UKe()||t.startsWith(\\\"https://\\\")||t.startsWith(\\\"http://\\\"))&&(e=\\\"_blank\\\"),window.open(t,e,\\\"noreferrer noopener\\\")}async function nde(t,e){let r=\\\"\\\";try{if(z1()&&(r=localStorage.getItem(e),r))return r;r=await t.getItem(e)}catch(n){console.error(n)}return r}function Oue(t,e){return t.filter(r=>e.includes(r))}function Kz(t,e){if(!t.includes(e))return null;let r=t.split(/([&,?,=])/),n=r.indexOf(e);return r[n+2]}function Zz(){return typeof crypto<\\\"u\\\"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():\\\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\\".replace(/[xy]/gu,t=>{let e=Math.random()*16|0;return(t===\\\"x\\\"?e:e&3|8).toString(16)})}function P4(){return typeof process<\\\"u\\\"&&process.env.IS_VITEST===\\\"true\\\"}function UKe(){return typeof window<\\\"u\\\"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function FKe(){try{return window.self!==window.top}catch{return!1}}function jKe(t,e=!1){let r=globalThis.Buffer.from(t).toString(\\\"base64\\\");return e?r.replace(/[=]/g,\\\"\\\"):r}function ide(t){return globalThis.Buffer.from(t,\\\"base64\\\").toString(\\\"utf-8\\\")}function sde(t){return new Promise(e=>setTimeout(e,t))}function I7(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\\\"positive integer expected, got \\\"+t)}function oFt(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function L7(t,...e){if(!oFt(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function ode(t){if(typeof t!=\\\"function\\\"||typeof t.create!=\\\"function\\\")throw new Error(\\\"Hash should be wrapped by utils.wrapConstructor\\\");I7(t.outputLen),I7(t.blockLen)}function E4(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function HKe(t,e){L7(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function aFt(t,e=!1){return e?{h:Number(t&Uz),l:Number(t>>KGe&Uz)}:{h:Number(t>>KGe&Uz)|0,l:Number(t&Uz)|0}}function cFt(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){let{h:s,l:o}=aFt(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}function pFt(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function vue(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function gh(t,e){return t<<32-e|t>>>e}function hFt(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function QGe(t){for(let e=0;e<t.length;e++)t[e]=hFt(t[e])}function mFt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"utf8ToBytes expected string, got \\\"+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function _4(t){return typeof t==\\\"string\\\"&&(t=mFt(t)),L7(t),t}function gFt(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];L7(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function qKe(t){let e=n=>t().update(_4(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function O4(t=32){if(w4&&typeof w4.getRandomValues==\\\"function\\\")return w4.getRandomValues(new Uint8Array(t));if(w4&&typeof w4.randomBytes==\\\"function\\\")return w4.randomBytes(t);throw new Error(\\\"crypto.getRandomValues must be defined\\\")}function CFt(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,l=r[c],d=r[c+1],f=JGe(l,d,1)^r[a],p=YGe(l,d,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=p}let i=t[2],s=t[3];for(let o=0;o<24;o++){let a=$Ke[o],c=JGe(i,s,a),l=YGe(i,s,a),d=zKe[o];i=t[d],s=t[d+1],t[d]=c,t[d+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=EFt[n],t[1]^=_Ft[n]}r.fill(0)}function ade(t){let e=`\\u0019Ethereum Signed Message:\\n${t.length}`,r=new TextEncoder().encode(e+t);return\\\"0x\\\"+globalThis.Buffer.from(AFt(r)).toString(\\\"hex\\\")}async function WKe(t,e,r,n,i,s){switch(r.t){case\\\"eip191\\\":return await GKe(t,e,r.s);case\\\"eip1271\\\":return await KKe(t,e,r.s,n,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function GKe(t,e,r){return(await ap({hash:ade(e),signature:r})).toLowerCase()===t.toLowerCase()}async function KKe(t,e,r,n,i,s){let o=K2(n);if(!o.namespace||!o.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{let a=\\\"0x1626ba7e\\\",c=\\\"0000000000000000000000000000000000000000000000000000000000000040\\\",l=\\\"0000000000000000000000000000000000000000000000000000000000000041\\\",d=r.substring(2),f=ade(e).substring(2),p=a+f+c+l+d,h=await fetch(`${s||TFt}/?chainId=${n}&projectId=${i}`,{method:\\\"POST\\\",body:JSON.stringify({id:IFt(),jsonrpc:\\\"2.0\\\",method:\\\"eth_call\\\",params:[{to:t,data:p},\\\"latest\\\"]})}),{result:m}=await h.json();return m?m.slice(0,a.length).toLowerCase()===a.toLowerCase():!1}catch(a){return console.error(\\\"isValidEip1271Signature: \\\",a),!1}}function IFt(){return Date.now()+Math.floor(Math.random()*1e3)}function cde(t){let e=atob(t),r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o);let n=r[0];if(n===0)throw new Error(\\\"No signatures found\\\");let i=1+n*64;if(r.length<i)throw new Error(\\\"Transaction data too short for claimed signature count\\\");if(r.length<100)throw new Error(\\\"Transaction too short\\\");let s=globalThis.Buffer.from(t,\\\"base64\\\").slice(1,65);return yC.encode(s)}async function Jz(t){let{cacao:e,projectId:r}=t,{s:n,p:i}=e,s=Yz(i,i.iss),o=N4(i.iss);return await WKe(o,s,n,U7(i.iss),r)}function MFt(t,e,r){return r.includes(\\\"did:pkh:\\\")||(r=`did:pkh:${r}`),{h:{t:\\\"caip122\\\"},p:{iss:r,domain:t.domain,aud:t.aud,version:t.version,nonce:t.nonce,iat:t.iat,statement:t.statement,requestId:t.requestId,resources:t.resources,nbf:t.nbf,exp:t.exp},s:e}}function DFt(t){var e;let{authPayload:r,chains:n,methods:i}=t,s=r.statement||\\\"\\\";if(!(n!=null&&n.length))return r;let o=r.chains,a=Oue(o,n);if(!(a!=null&&a.length))throw new Error(\\\"No supported chains\\\");let c=JKe(r.resources);if(!c)return r;yh(c);let l=YKe(c,\\\"eip155\\\"),d=r?.resources||[];if(l!=null&&l.length){let f=XKe(l),p=Oue(f,i);if(!(p!=null&&p.length))throw new Error(`Supported methods don't satisfy the requested: ${JSON.stringify(f)}, supported: ${JSON.stringify(i)}`);let h=ude(\\\"request\\\",p,{chains:a}),m=nZe(c,\\\"eip155\\\",h);d=((e=r?.resources)==null?void 0:e.slice(0,-1))||[],d.push(Xz(m))}return ZKe(lde({},r),{statement:sZe(s,$1(d)),chains:a,resources:r!=null&&r.resources||d.length>0?d:void 0})}function JKe(t){let e=$1(t);if(e&&fde(e))return q1(e)}function LFt(t,e){var r;return(r=t?.att)==null?void 0:r.hasOwnProperty(e)}function YKe(t,e){var r,n;return(r=t?.att)!=null&&r[e]?Object.keys((n=t?.att)==null?void 0:n[e]):[]}function UFt(t){return t?.map(e=>Object.keys(e))||[]}function XKe(t){return t?.map(e=>{var r;return(r=e.split(\\\"/\\\"))==null?void 0:r[1]})||[]}function eZe(t){return globalThis.Buffer.from(JSON.stringify(t)).toString(\\\"base64\\\")}function tZe(t){return JSON.parse(globalThis.Buffer.from(t,\\\"base64\\\").toString(\\\"utf-8\\\"))}function yh(t){if(!t)throw new Error(\\\"No recap provided, value is undefined\\\");if(!t.att)throw new Error(\\\"No `att` property found\\\");let e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error(\\\"No resources found in `att` property\\\");e.forEach(r=>{let n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!=\\\"object\\\")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{let s=n[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!=\\\"object\\\")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function rZe(t,e,r,n={}){return r?.sort((i,s)=>i.localeCompare(s)),{att:{[t]:ude(e,r,n)}}}function nZe(t,e,r){var n;t.att[e]=lde({},r);let i=(n=Object.keys(t.att))==null?void 0:n.sort((o,a)=>o.localeCompare(a)),s={att:{}};return i.reduce((o,a)=>(o.att[a]=t.att[a],o),s)}function ude(t,e,r={}){e=e?.sort((i,s)=>i.localeCompare(s));let n=e.map(i=>({[`${t}/${i}`]:[r]}));return Object.assign({},...n)}function Xz(t){return yh(t),`urn:recap:${eZe(t).replace(/=/g,\\\"\\\")}`}function q1(t){let e=tZe(t.replace(\\\"urn:recap:\\\",\\\"\\\"));return yh(e),e}function dde(t,e,r){let n=rZe(t,e,r);return Xz(n)}function fde(t){return t&&t.includes(\\\"urn:recap:\\\")}function pde(t,e){let r=q1(t),n=q1(e),i=iZe(r,n);return Xz(i)}function iZe(t,e){yh(t),yh(e);let r=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),n={att:{}};return r.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;n.att[i]=ZKe(lde({},n.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),n}function hde(t=\\\"\\\",e){yh(e);let r=\\\"I further authorize the stated URI to perform the following actions on my behalf: \\\";if(t.includes(r))return t;let n=[],i=0;Object.keys(e.att).forEach(a=>{let c=Object.keys(e.att[a]).map(f=>({ability:f.split(\\\"/\\\")[0],action:f.split(\\\"/\\\")[1]}));c.sort((f,p)=>f.action.localeCompare(p.action));let l={};c.forEach(f=>{l[f.ability]||(l[f.ability]=[]),l[f.ability].push(f.action)});let d=Object.keys(l).map(f=>(i++,`(${i}) '${f}': '${l[f].join(\\\"', '\\\")}' for '${a}'.`));n.push(d.join(\\\", \\\").replace(\\\".,\\\",\\\".\\\"))});let s=n.join(\\\" \\\"),o=`${r}${s}`;return`${t?t+\\\" \\\":\\\"\\\"}${o}`}function e$(t){var e;let r=q1(t);yh(r);let n=(e=r.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split(\\\"/\\\")[1]):[]}function t$(t){let e=q1(t);yh(e);let r=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var s;(s=i?.[0])!=null&&s.chains&&r.push(i[0].chains)})}),[...new Set(r.flat())]}function sZe(t,e){if(!e)return t;let r=q1(e);return yh(r),hde(t,r)}function $1(t){if(!t)return;let e=t?.[t.length-1];return fde(e)?e:void 0}function xue(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(\\\"positive integer expected, got \\\"+t)}function oZe(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function Gl(t,...e){if(!oZe(t))throw new Error(\\\"Uint8Array expected\\\");if(e.length>0&&!e.includes(t.length))throw new Error(\\\"Uint8Array expected of length \\\"+e+\\\", got length=\\\"+t.length)}function tKe(t,e=!0){if(t.destroyed)throw new Error(\\\"Hash instance has been destroyed\\\");if(e&&t.finished)throw new Error(\\\"Hash#digest() has already been called\\\")}function FFt(t,e){Gl(t);let r=e.outputLen;if(t.length<r)throw new Error(\\\"digestInto() expects output buffer of length at least \\\"+r)}function rKe(t){if(typeof t!=\\\"boolean\\\")throw new Error(`boolean expected, not ${t}`)}function qFt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function kue(t){if(typeof t==\\\"string\\\")t=qFt(t);else if(oZe(t))t=Bue(t);else throw new Error(\\\"Uint8Array expected, got \\\"+typeof t);return t}function zFt(t,e){if(e==null||typeof e!=\\\"object\\\")throw new Error(\\\"options must be defined\\\");return Object.assign(t,e)}function $Ft(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function nKe(t,e,r=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error(\\\"invalid output length, expected \\\"+t+\\\", got: \\\"+e.length);if(r&&!WFt(e))throw new Error(\\\"invalid output, must be aligned\\\");return e}function iKe(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function WFt(t){return t.byteOffset%4===0}function Bue(t){return Uint8Array.from(t)}function C4(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Nr(t,e){return t<<e|t>>>32-e}function Mue(t){return t.byteOffset%4===0}function YFt(t,e,r,n,i,s,o,a){let c=i.length,l=new Uint8Array(Fz),d=H1(l),f=Mue(i)&&Mue(s),p=f?H1(i):sKe,h=f?H1(s):sKe;for(let m=0;m<c;o++){if(t(e,r,n,d,o,a),o>=cZe)throw new Error(\\\"arx: counter overflow\\\");let g=Math.min(Fz,c-m);if(f&&g===Fz){let w=m/4;if(m%4!==0)throw new Error(\\\"arx: invalid block position\\\");for(let v=0,b;v<JFt;v++)b=w+v,h[b]=p[b]^d[v];m+=Fz;continue}for(let w=0,v;w<g;w++)v=m+w,s[v]=i[v]^l[w];m+=g}}function XFt(t,e){let{allowShortKeys:r,extendNonceFn:n,counterLength:i,counterRight:s,rounds:o}=zFt({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!=\\\"function\\\")throw new Error(\\\"core must be a function\\\");return xue(i),xue(o),rKe(s),rKe(r),(a,c,l,d,f=0)=>{Gl(a),Gl(c),Gl(l);let p=l.length;if(d===void 0&&(d=new Uint8Array(p)),Gl(d),xue(f),f<0||f>=cZe)throw new Error(\\\"arx: counter overflow\\\");if(d.length<p)throw new Error(`arx: output (${d.length}) is shorter than data (${p})`);let h=[],m=a.length,g,w;if(m===32)h.push(g=Bue(a)),w=QFt;else if(m===16&&r)g=new Uint8Array(32),g.set(a),g.set(a,16),w=ZFt,h.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${m}`);Mue(c)||h.push(c=Bue(c));let v=H1(g);if(n){if(c.length!==24)throw new Error(\\\"arx: extended nonce must be 24 bytes\\\");n(w,v,H1(c.subarray(0,16)),v),c=c.subarray(16)}let b=16-i;if(b!==c.length)throw new Error(`arx: nonce must be ${b} or 16 bytes`);if(b!==12){let S=new Uint8Array(12);S.set(c,s?0:12-c.length),c=S,h.push(c)}let _=H1(c);return YFt(t,w,v,_,l,d,f,o),C4(...h),d}}function ejt(t){let e=(n,i)=>t(i).update(kue(n)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function rjt(t,e,r,n,i,s=20){let o=t[0],a=t[1],c=t[2],l=t[3],d=e[0],f=e[1],p=e[2],h=e[3],m=e[4],g=e[5],w=e[6],v=e[7],b=i,_=r[0],S=r[1],T=r[2],N=o,O=a,L=c,B=l,H=d,M=f,F=p,R=h,y=m,E=g,C=w,I=v,P=b,k=_,U=S,D=T;for(let j=0;j<s;j+=2)N=N+H|0,P=Nr(P^N,16),y=y+P|0,H=Nr(H^y,12),N=N+H|0,P=Nr(P^N,8),y=y+P|0,H=Nr(H^y,7),O=O+M|0,k=Nr(k^O,16),E=E+k|0,M=Nr(M^E,12),O=O+M|0,k=Nr(k^O,8),E=E+k|0,M=Nr(M^E,7),L=L+F|0,U=Nr(U^L,16),C=C+U|0,F=Nr(F^C,12),L=L+F|0,U=Nr(U^L,8),C=C+U|0,F=Nr(F^C,7),B=B+R|0,D=Nr(D^B,16),I=I+D|0,R=Nr(R^I,12),B=B+R|0,D=Nr(D^B,8),I=I+D|0,R=Nr(R^I,7),N=N+M|0,D=Nr(D^N,16),C=C+D|0,M=Nr(M^C,12),N=N+M|0,D=Nr(D^N,8),C=C+D|0,M=Nr(M^C,7),O=O+F|0,P=Nr(P^O,16),I=I+P|0,F=Nr(F^I,12),O=O+F|0,P=Nr(P^O,8),I=I+P|0,F=Nr(F^I,7),L=L+R|0,k=Nr(k^L,16),y=y+k|0,R=Nr(R^y,12),L=L+R|0,k=Nr(k^L,8),y=y+k|0,R=Nr(R^y,7),B=B+H|0,U=Nr(U^B,16),E=E+U|0,H=Nr(H^E,12),B=B+H|0,U=Nr(U^B,8),E=E+U|0,H=Nr(H^E,7);let A=0;n[A++]=o+N|0,n[A++]=a+O|0,n[A++]=c+L|0,n[A++]=l+B|0,n[A++]=d+H|0,n[A++]=f+M|0,n[A++]=p+F|0,n[A++]=h+R|0,n[A++]=m+y|0,n[A++]=g+E|0,n[A++]=w+C|0,n[A++]=v+I|0,n[A++]=b+P|0,n[A++]=_+k|0,n[A++]=S+U|0,n[A++]=T+D|0}function aKe(t,e,r,n,i){let s=t(e,r,sjt),o=tjt.create(s);i&&oKe(o,i),oKe(o,n);let a=new Uint8Array(16),c=jFt(a);iKe(c,0,BigInt(i?i.length:0),!0),iKe(c,8,BigInt(n.length),!0),o.update(a);let l=o.digest();return C4(s,a),l}function ajt(t,e,r){return ode(t),r===void 0&&(r=new Uint8Array(t.outputLen)),r$(t,_4(r),_4(e))}function cjt(t,e,r,n=32){if(ode(t),I7(n),n>255*t.outputLen)throw new Error(\\\"Length should be <= 255*HashLen\\\");let i=Math.ceil(n/t.outputLen);r===void 0&&(r=cKe);let s=new Uint8Array(i*t.outputLen),o=r$.create(t,e),a=o._cloneInto(),c=new Uint8Array(o.outputLen);for(let l=0;l<i;l++)Eue[0]=l+1,a.update(l===0?cKe:c).update(r).update(Eue).digestInto(c),s.set(c,t.outputLen*l),o._cloneInto(a);return o.destroy(),a.destroy(),c.fill(0),Eue.fill(0),s.slice(0,n)}function ujt(t,e,r,n){if(typeof t.setBigUint64==\\\"function\\\")return t.setBigUint64(e,r,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}function djt(t,e,r){return t&e^~t&r}function fjt(t,e,r){return t&e^t&r^e&r}function G2(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name===\\\"Uint8Array\\\"}function j7(t){if(!G2(t))throw new Error(\\\"Uint8Array expected\\\")}function S4(t,e){if(typeof e!=\\\"boolean\\\")throw new Error(t+\\\" boolean expected, got \\\"+e)}function A4(t){j7(t);let e=\\\"\\\";for(let r=0;r<t.length;r++)e+=mjt[t[r]];return e}function x4(t){let e=t.toString(16);return e.length&1?\\\"0\\\"+e:e}function mde(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);return t===\\\"\\\"?n$:BigInt(\\\"0x\\\"+t)}function lKe(t){if(t>=R0._0&&t<=R0._9)return t-R0._0;if(t>=R0.A&&t<=R0.F)return t-(R0.A-10);if(t>=R0.a&&t<=R0.f)return t-(R0.a-10)}function T4(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"hex string expected, got \\\"+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error(\\\"hex string expected, got unpadded hex of length \\\"+e);let n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){let o=lKe(t.charCodeAt(s)),a=lKe(t.charCodeAt(s+1));if(o===void 0||a===void 0){let c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character \\\"'+c+'\\\" at index '+s)}n[i]=o*16+a}return n}function W2(t){return mde(A4(t))}function P7(t){return j7(t),mde(A4(Uint8Array.from(t).reverse()))}function I4(t,e){return T4(t.toString(16).padStart(e*2,\\\"0\\\"))}function s$(t,e){return I4(t,e).reverse()}function gjt(t){return T4(x4(t))}function Wl(t,e,r){let n;if(typeof e==\\\"string\\\")try{n=T4(e)}catch(s){throw new Error(t+\\\" must be hex string or Uint8Array, cause: \\\"+s)}else if(G2(e))n=Uint8Array.from(e);else throw new Error(t+\\\" must be hex string or Uint8Array\\\");let i=n.length;if(typeof r==\\\"number\\\"&&i!==r)throw new Error(t+\\\" of length \\\"+r+\\\" expected, got \\\"+i);return n}function O7(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];j7(i),e+=i.length}let r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let s=t[n];r.set(s,i),i+=s.length}return r}function yjt(t,e){if(t.length!==e.length)return!1;let r=0;for(let n=0;n<t.length;n++)r|=t[n]^e[n];return r===0}function bjt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"string expected\\\");return new Uint8Array(new TextEncoder().encode(t))}function o$(t,e,r){return _ue(t)&&_ue(e)&&_ue(r)&&e<=t&&t<r}function N0(t,e,r,n){if(!o$(e,r,n))throw new Error(\\\"expected valid \\\"+t+\\\": \\\"+r+\\\" <= n < \\\"+n+\\\", got \\\"+e)}function uZe(t){let e;for(e=0;t>n$;t>>=i$,e+=1);return e}function wjt(t,e){return t>>BigInt(e)&i$}function vjt(t,e,r){return t|(r?i$:n$)<<BigInt(e)}function dZe(t,e,r){if(typeof t!=\\\"number\\\"||t<2)throw new Error(\\\"hashLen must be a number\\\");if(typeof e!=\\\"number\\\"||e<2)throw new Error(\\\"qByteLen must be a number\\\");if(typeof r!=\\\"function\\\")throw new Error(\\\"hmacFn must be a function\\\");let n=Cue(t),i=Cue(t),s=0,o=()=>{n.fill(1),i.fill(0),s=0},a=(...d)=>r(i,n,...d),c=(d=Cue())=>{i=a(uKe([0]),d),n=a(),d.length!==0&&(i=a(uKe([1]),d),n=a())},l=()=>{if(s++>=1e3)throw new Error(\\\"drbg: tried 1000 values\\\");let d=0,f=[];for(;d<e;){n=a();let p=n.slice();f.push(p),d+=n.length}return O7(...f)};return(d,f)=>{o(),c(d);let p;for(;!(p=f(l()));)c();return o(),p}}function k4(t,e,r={}){let n=(i,s,o)=>{let a=xjt[s];if(typeof a!=\\\"function\\\")throw new Error(\\\"invalid validator function\\\");let c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(\\\"param \\\"+String(i)+\\\" is invalid. Expected \\\"+s+\\\", got \\\"+c)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(r))n(i,s,!0);return t}function Fue(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(i!==void 0)return i;let s=t(r,...n);return e.set(r,s),s}}function Yc(t,e){let r=t%e;return r>=_o?r:e+r}function fZe(t,e,r){if(e<_o)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r<=_o)throw new Error(\\\"invalid modulus\\\");if(r===ms)return _o;let n=ms;for(;e>_o;)e&ms&&(n=n*t%r),t=t*t%r,e>>=ms;return n}function Tf(t,e,r){let n=t;for(;e-- >_o;)n*=n,n%=r;return n}function Hue(t,e){if(t===_o)throw new Error(\\\"invert: expected non-zero number\\\");if(e<=_o)throw new Error(\\\"invert: expected positive modulus, got \\\"+e);let r=Yc(t,e),n=e,i=_o,s=ms;for(;r!==_o;){let o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==ms)throw new Error(\\\"invert: does not exist\\\");return Yc(i,e)}function Sjt(t){let e=(t-ms)/V2,r,n,i;for(r=t-ms,n=0;r%V2===_o;r/=V2,n++);for(i=V2;i<t&&fZe(i,e,t)!==t-ms;i++)if(i>1e3)throw new Error(\\\"Cannot find square root: likely non-prime P\\\");if(n===1){let o=(t+ms)/jue;return function(a,c){let l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error(\\\"Cannot find square root\\\");return l}}let s=(r+ms)/V2;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error(\\\"Cannot find square root\\\");let c=n,l=o.pow(o.mul(o.ONE,i),r),d=o.pow(a,s),f=o.pow(a,r);for(;!o.eql(f,o.ONE);){if(o.eql(f,o.ZERO))return o.ZERO;let p=1;for(let m=o.sqr(f);p<c&&!o.eql(m,o.ONE);p++)m=o.sqr(m);let h=o.pow(l,ms<<BigInt(c-p-1));l=o.sqr(h),d=o.mul(d,h),f=o.mul(f,l),c=p}return d}}function Ajt(t){if(t%jue===Cjt){let e=(t+ms)/jue;return function(r,n){let i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error(\\\"Cannot find square root\\\");return i}}if(t%fKe===dKe){let e=(t-dKe)/fKe;return function(r,n){let i=r.mul(n,V2),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,V2),s),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error(\\\"Cannot find square root\\\");return c}}return Sjt(t)}function Ijt(t){let e={ORDER:\\\"bigint\\\",MASK:\\\"bigint\\\",BYTES:\\\"isSafeInteger\\\",BITS:\\\"isSafeInteger\\\"},r=Tjt.reduce((n,i)=>(n[i]=\\\"function\\\",n),e);return k4(t,r)}function Rjt(t,e,r){if(r<_o)throw new Error(\\\"invalid exponent, negatives unsupported\\\");if(r===_o)return t.ONE;if(r===ms)return e;let n=t.ONE,i=e;for(;r>_o;)r&ms&&(n=t.mul(n,i)),i=t.sqr(i),r>>=ms;return n}function Pjt(t,e){let r=new Array(e.length),n=e.reduce((s,o,a)=>t.is0(o)?s:(r[a]=s,t.mul(s,o)),t.ONE),i=t.inv(n);return e.reduceRight((s,o,a)=>t.is0(o)?s:(r[a]=t.mul(s,r[a]),t.mul(s,o)),i),r}function pZe(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function hZe(t,e,r=!1,n={}){if(t<=_o)throw new Error(\\\"invalid field: expected ORDER > 0, got \\\"+t);let{nBitLength:i,nByteLength:s}=pZe(t,e);if(s>2048)throw new Error(\\\"invalid field: expected ORDER of <= 2048 bytes\\\");let o,a=Object.freeze({ORDER:t,isLE:r,BITS:i,BYTES:s,MASK:gde(i),ZERO:_o,ONE:ms,create:c=>Yc(c,t),isValid:c=>{if(typeof c!=\\\"bigint\\\")throw new Error(\\\"invalid field element: expected bigint, got \\\"+typeof c);return _o<=c&&c<t},is0:c=>c===_o,isOdd:c=>(c&ms)===ms,neg:c=>Yc(-c,t),eql:(c,l)=>c===l,sqr:c=>Yc(c*c,t),add:(c,l)=>Yc(c+l,t),sub:(c,l)=>Yc(c-l,t),mul:(c,l)=>Yc(c*l,t),pow:(c,l)=>Rjt(a,c,l),div:(c,l)=>Yc(c*Hue(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Hue(c,t),sqrt:n.sqrt||(c=>(o||(o=Ajt(t)),o(a,c))),invertBatch:c=>Pjt(a,c),cmov:(c,l,d)=>d?l:c,toBytes:c=>r?s$(c,s):I4(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(\\\"Field.fromBytes: expected \\\"+s+\\\" bytes, got \\\"+c.length);return r?P7(c):W2(c)}});return Object.freeze(a)}function mZe(t){if(typeof t!=\\\"bigint\\\")throw new Error(\\\"field order must be bigint\\\");let e=t.toString(2).length;return Math.ceil(e/8)}function gZe(t){let e=mZe(t);return e+Math.ceil(e/2)}function Ojt(t,e,r=!1){let n=t.length,i=mZe(e),s=gZe(e);if(n<16||n<s||n>1024)throw new Error(\\\"expected \\\"+s+\\\"-1024 bytes of input, got \\\"+n);let o=r?P7(t):W2(t),a=Yc(o,e-ms)+ms;return r?s$(a,i):I4(a,i)}function Sue(t,e){let r=e.negate();return t?r:e}function yZe(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error(\\\"invalid window size, expected [1..\\\"+e+\\\"], got W=\\\"+t)}function Aue(t,e){yZe(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1);return{windows:r,windowSize:n}}function Njt(t,e){if(!Array.isArray(t))throw new Error(\\\"array expected\\\");t.forEach((r,n)=>{if(!(r instanceof e))throw new Error(\\\"invalid point at index \\\"+n)})}function kjt(t,e){if(!Array.isArray(t))throw new Error(\\\"array of scalars expected\\\");t.forEach((r,n)=>{if(!e.isValid(r))throw new Error(\\\"invalid scalar at index \\\"+n)})}function Iue(t){return bZe.get(t)||1}function Bjt(t,e){return{constTimeNegate:Sue,hasPrecomputes(r){return Iue(r)!==1},unsafeLadder(r,n,i=t.ZERO){let s=r;for(;n>pKe;)n&jz&&(i=i.add(s)),s=s.double(),n>>=jz;return i},precomputeWindow(r,n){let{windows:i,windowSize:s}=Aue(n,e),o=[],a=r,c=a;for(let l=0;l<i;l++){c=a,o.push(c);for(let d=1;d<s;d++)c=c.add(a),o.push(c);a=c.double()}return o},wNAF(r,n,i){let{windows:s,windowSize:o}=Aue(r,e),a=t.ZERO,c=t.BASE,l=BigInt(2**r-1),d=2**r,f=BigInt(r);for(let p=0;p<s;p++){let h=p*o,m=Number(i&l);i>>=f,m>o&&(m-=d,i+=jz);let g=h,w=h+Math.abs(m)-1,v=p%2!==0,b=m<0;m===0?c=c.add(Sue(v,n[g])):a=a.add(Sue(b,n[w]))}return{p:a,f:c}},wNAFUnsafe(r,n,i,s=t.ZERO){let{windows:o,windowSize:a}=Aue(r,e),c=BigInt(2**r-1),l=2**r,d=BigInt(r);for(let f=0;f<o;f++){let p=f*a;if(i===pKe)break;let h=Number(i&c);if(i>>=d,h>a&&(h-=l,i+=jz),h===0)continue;let m=n[p+Math.abs(h)-1];h<0&&(m=m.negate()),s=s.add(m)}return s},getPrecomputes(r,n,i){let s=Tue.get(n);return s||(s=this.precomputeWindow(n,r),r!==1&&Tue.set(n,i(s))),s},wNAFCached(r,n,i){let s=Iue(r);return this.wNAF(s,this.getPrecomputes(s,r,i),n)},wNAFCachedUnsafe(r,n,i,s){let o=Iue(r);return o===1?this.unsafeLadder(r,n,s):this.wNAFUnsafe(o,this.getPrecomputes(o,r,i),n,s)},setWindowSize(r,n){yZe(n,e),bZe.set(r,n),Tue.delete(r)}}}function Mjt(t,e,r,n){if(Njt(r,t),kjt(n,e),r.length!==n.length)throw new Error(\\\"arrays of points and scalars must have equal length\\\");let i=t.ZERO,s=uZe(BigInt(r.length)),o=s>12?s-3:s>4?s-2:s?2:1,a=(1<<o)-1,c=new Array(a+1).fill(i),l=Math.floor((e.BITS-1)/o)*o,d=i;for(let f=l;f>=0;f-=o){c.fill(i);for(let h=0;h<n.length;h++){let m=n[h],g=Number(m>>BigInt(f)&BigInt(a));c[g]=c[g].add(r[h])}let p=i;for(let h=c.length-1,m=i;h>0;h--)m=m.add(c[h]),p=p.add(m);if(d=d.add(p),f!==0)for(let h=0;h<o;h++)d=d.double()}return d}function wZe(t){return Ijt(t.Fp),k4(t,{n:\\\"bigint\\\",h:\\\"bigint\\\",Gx:\\\"field\\\",Gy:\\\"field\\\"},{nBitLength:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\"}),Object.freeze({...pZe(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function Djt(t){return k4(t,{a:\\\"bigint\\\"},{montgomeryBits:\\\"isSafeInteger\\\",nByteLength:\\\"isSafeInteger\\\",adjustScalarBytes:\\\"function\\\",domain:\\\"function\\\",powPminus2:\\\"function\\\",Gu:\\\"bigint\\\"}),Object.freeze({...t})}function Ljt(t){let e=Djt(t),{P:r}=e,n=b=>Yc(b,r),i=e.montgomeryBits,s=Math.ceil(i/8),o=e.nByteLength,a=e.adjustScalarBytes||(b=>b),c=e.powPminus2||(b=>fZe(b,r-BigInt(2),r));function l(b,_,S){let T=n(b*(_-S));return _=n(_-T),S=n(S+T),[_,S]}let d=(e.a-BigInt(2))/BigInt(4);function f(b,_){N0(\\\"u\\\",b,v4,r),N0(\\\"scalar\\\",_,v4,r);let S=_,T=b,N=Rue,O=v4,L=b,B=Rue,H=v4,M;for(let R=BigInt(i-1);R>=v4;R--){let y=S>>R&Rue;H^=y,M=l(H,N,L),N=M[0],L=M[1],M=l(H,O,B),O=M[0],B=M[1],H=y;let E=N+O,C=n(E*E),I=N-O,P=n(I*I),k=C-P,U=L+B,D=L-B,A=n(D*E),j=n(U*I),K=A+j,J=A-j;L=n(K*K),B=n(T*n(J*J)),N=n(C*P),O=n(k*(C+n(d*k)))}M=l(H,N,L),N=M[0],L=M[1],M=l(H,O,B),O=M[0],B=M[1];let F=c(O);return n(N*F)}function p(b){return s$(n(b),s)}function h(b){let _=Wl(\\\"u coordinate\\\",b,s);return o===32&&(_[31]&=127),P7(_)}function m(b){let _=Wl(\\\"scalar\\\",b),S=_.length;if(S!==s&&S!==o){let T=\\\"\\\"+s+\\\" or \\\"+o;throw new Error(\\\"invalid scalar, expected \\\"+T+\\\" bytes, got \\\"+S)}return P7(a(_))}function g(b,_){let S=h(_),T=m(b),N=f(S,T);if(N===v4)throw new Error(\\\"invalid private or public key received\\\");return p(N)}let w=p(e.Gu);function v(b){return g(b,w)}return{scalarMult:g,scalarMultBase:v,getSharedSecret:(b,_)=>g(b,_),getPublicKey:b=>v(b),utils:{randomPrivateKey:()=>e.randomBytes(e.nByteLength)},GuBytes:w}}function Hjt(t){let e=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),s=que,o=t*t%s*t%s,a=Tf(o,hKe,s)*o%s,c=Tf(a,Ujt,s)*t%s,l=Tf(c,jjt,s)*c%s,d=Tf(l,e,s)*l%s,f=Tf(d,r,s)*d%s,p=Tf(f,n,s)*f%s,h=Tf(p,i,s)*p%s,m=Tf(h,i,s)*p%s,g=Tf(m,e,s)*l%s;return{pow_p_5_8:Tf(g,hKe,s)*t%s,b2:o}}function qjt(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function mKe(t){t.lowS!==void 0&&S4(\\\"lowS\\\",t.lowS),t.prehash!==void 0&&S4(\\\"prehash\\\",t.prehash)}function zjt(t){let e=wZe(t);k4(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 new Error(\\\"invalid endomorphism, can only be defined for Koblitz curves that have a=0\\\");if(typeof r!=\\\"object\\\"||typeof r.beta!=\\\"bigint\\\"||typeof r.splitScalar!=\\\"function\\\")throw new Error(\\\"invalid endomorphism, expected beta: bigint and splitScalar: function\\\")}return Object.freeze({...e})}function Wjt(t){let e=zjt(t),{Fp:r}=e,n=hZe(e.n,e.nBitLength),i=e.toBytes||((g,w,v)=>{let b=w.toAffine();return O7(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),s=e.fromBytes||(g=>{let w=g.subarray(1),v=r.fromBytes(w.subarray(0,r.BYTES)),b=r.fromBytes(w.subarray(r.BYTES,2*r.BYTES));return{x:v,y:b}});function o(g){let{a:w,b:v}=e,b=r.sqr(g),_=r.mul(b,g);return r.add(r.add(_,r.mul(g,w)),v)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error(\\\"bad generator point: equation left != right\\\");function a(g){return o$(g,Eo,e.n)}function c(g){let{allowedPrivateKeyLengths:w,nByteLength:v,wrapPrivateKey:b,n:_}=e;if(w&&typeof g!=\\\"bigint\\\"){if(G2(g)&&(g=A4(g)),typeof g!=\\\"string\\\"||!w.includes(g.length))throw new Error(\\\"invalid private key\\\");g=g.padStart(v*2,\\\"0\\\")}let S;try{S=typeof g==\\\"bigint\\\"?g:W2(Wl(\\\"private key\\\",g,v))}catch{throw new Error(\\\"invalid private key, expected hex or \\\"+v+\\\" bytes, got \\\"+typeof g)}return b&&(S=Yc(S,_)),N0(\\\"private key\\\",S,Eo,_),S}function l(g){if(!(g instanceof p))throw new Error(\\\"ProjectivePoint expected\\\")}let d=Fue((g,w)=>{let{px:v,py:b,pz:_}=g;if(r.eql(_,r.ONE))return{x:v,y:b};let S=g.is0();w==null&&(w=S?r.ONE:r.inv(_));let T=r.mul(v,w),N=r.mul(b,w),O=r.mul(_,w);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(O,r.ONE))throw new Error(\\\"invZ was invalid\\\");return{x:T,y:N}}),f=Fue(g=>{if(g.is0()){if(e.allowInfinityPoint&&!r.is0(g.py))return;throw new Error(\\\"bad point: ZERO\\\")}let{x:w,y:v}=g.toAffine();if(!r.isValid(w)||!r.isValid(v))throw new Error(\\\"bad point: x or y not FE\\\");let b=r.sqr(v),_=o(w);if(!r.eql(b,_))throw new Error(\\\"bad point: equation left != right\\\");if(!g.isTorsionFree())throw new Error(\\\"bad point: not in prime-order subgroup\\\");return!0});class p{constructor(w,v,b){if(this.px=w,this.py=v,this.pz=b,w==null||!r.isValid(w))throw new Error(\\\"x required\\\");if(v==null||!r.isValid(v))throw new Error(\\\"y required\\\");if(b==null||!r.isValid(b))throw new Error(\\\"z required\\\");Object.freeze(this)}static fromAffine(w){let{x:v,y:b}=w||{};if(!w||!r.isValid(v)||!r.isValid(b))throw new Error(\\\"invalid affine point\\\");if(w instanceof p)throw new Error(\\\"projective point not allowed\\\");let _=S=>r.eql(S,r.ZERO);return _(v)&&_(b)?p.ZERO:new p(v,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(w){let v=r.invertBatch(w.map(b=>b.pz));return w.map((b,_)=>b.toAffine(v[_])).map(p.fromAffine)}static fromHex(w){let v=p.fromAffine(s(Wl(\\\"pointHex\\\",w)));return v.assertValidity(),v}static fromPrivateKey(w){return p.BASE.multiply(c(w))}static msm(w,v){return Mjt(p,n,w,v)}_setWindowSize(w){m.setWindowSize(this,w)}assertValidity(){f(this)}hasEvenY(){let{y:w}=this.toAffine();if(r.isOdd)return!r.isOdd(w);throw new Error(\\\"Field doesn't support isOdd\\\")}equals(w){l(w);let{px:v,py:b,pz:_}=this,{px:S,py:T,pz:N}=w,O=r.eql(r.mul(v,N),r.mul(S,_)),L=r.eql(r.mul(b,N),r.mul(T,_));return O&&L}negate(){return new p(this.px,r.neg(this.py),this.pz)}double(){let{a:w,b:v}=e,b=r.mul(v,gKe),{px:_,py:S,pz:T}=this,N=r.ZERO,O=r.ZERO,L=r.ZERO,B=r.mul(_,_),H=r.mul(S,S),M=r.mul(T,T),F=r.mul(_,S);return F=r.add(F,F),L=r.mul(_,T),L=r.add(L,L),N=r.mul(w,L),O=r.mul(b,M),O=r.add(N,O),N=r.sub(H,O),O=r.add(H,O),O=r.mul(N,O),N=r.mul(F,N),L=r.mul(b,L),M=r.mul(w,M),F=r.sub(B,M),F=r.mul(w,F),F=r.add(F,L),L=r.add(B,B),B=r.add(L,B),B=r.add(B,M),B=r.mul(B,F),O=r.add(O,B),M=r.mul(S,T),M=r.add(M,M),B=r.mul(M,F),N=r.sub(N,B),L=r.mul(M,H),L=r.add(L,L),L=r.add(L,L),new p(N,O,L)}add(w){l(w);let{px:v,py:b,pz:_}=this,{px:S,py:T,pz:N}=w,O=r.ZERO,L=r.ZERO,B=r.ZERO,H=e.a,M=r.mul(e.b,gKe),F=r.mul(v,S),R=r.mul(b,T),y=r.mul(_,N),E=r.add(v,b),C=r.add(S,T);E=r.mul(E,C),C=r.add(F,R),E=r.sub(E,C),C=r.add(v,_);let I=r.add(S,N);return C=r.mul(C,I),I=r.add(F,y),C=r.sub(C,I),I=r.add(b,_),O=r.add(T,N),I=r.mul(I,O),O=r.add(R,y),I=r.sub(I,O),B=r.mul(H,C),O=r.mul(M,y),B=r.add(O,B),O=r.sub(R,B),B=r.add(R,B),L=r.mul(O,B),R=r.add(F,F),R=r.add(R,F),y=r.mul(H,y),C=r.mul(M,C),R=r.add(R,y),y=r.sub(F,y),y=r.mul(H,y),C=r.add(C,y),F=r.mul(R,C),L=r.add(L,F),F=r.mul(I,C),O=r.mul(E,O),O=r.sub(O,F),F=r.mul(E,R),B=r.mul(I,B),B=r.add(B,F),new p(O,L,B)}subtract(w){return this.add(w.negate())}is0(){return this.equals(p.ZERO)}wNAF(w){return m.wNAFCached(this,w,p.normalizeZ)}multiplyUnsafe(w){let{endo:v,n:b}=e;N0(\\\"scalar\\\",w,O0,b);let _=p.ZERO;if(w===O0)return _;if(this.is0()||w===Eo)return this;if(!v||m.hasPrecomputes(this))return m.wNAFCachedUnsafe(this,w,p.normalizeZ);let{k1neg:S,k1:T,k2neg:N,k2:O}=v.splitScalar(w),L=_,B=_,H=this;for(;T>O0||O>O0;)T&Eo&&(L=L.add(H)),O&Eo&&(B=B.add(H)),H=H.double(),T>>=Eo,O>>=Eo;return S&&(L=L.negate()),N&&(B=B.negate()),B=new p(r.mul(B.px,v.beta),B.py,B.pz),L.add(B)}multiply(w){let{endo:v,n:b}=e;N0(\\\"scalar\\\",w,Eo,b);let _,S;if(v){let{k1neg:T,k1:N,k2neg:O,k2:L}=v.splitScalar(w),{p:B,f:H}=this.wNAF(N),{p:M,f:F}=this.wNAF(L);B=m.constTimeNegate(T,B),M=m.constTimeNegate(O,M),M=new p(r.mul(M.px,v.beta),M.py,M.pz),_=B.add(M),S=H.add(F)}else{let{p:T,f:N}=this.wNAF(w);_=T,S=N}return p.normalizeZ([_,S])[0]}multiplyAndAddUnsafe(w,v,b){let _=p.BASE,S=(N,O)=>O===O0||O===Eo||!N.equals(_)?N.multiplyUnsafe(O):N.multiply(O),T=S(this,v).add(S(w,b));return T.is0()?void 0:T}toAffine(w){return d(this,w)}isTorsionFree(){let{h:w,isTorsionFree:v}=e;if(w===Eo)return!0;if(v)return v(p,this);throw new Error(\\\"isTorsionFree() has not been declared for the elliptic curve\\\")}clearCofactor(){let{h:w,clearCofactor:v}=e;return w===Eo?this:v?v(p,this):this.multiplyUnsafe(e.h)}toRawBytes(w=!0){return S4(\\\"isCompressed\\\",w),this.assertValidity(),i(p,this,w)}toHex(w=!0){return S4(\\\"isCompressed\\\",w),A4(this.toRawBytes(w))}}p.BASE=new p(e.Gx,e.Gy,r.ONE),p.ZERO=new p(r.ZERO,r.ONE,r.ZERO);let h=e.nBitLength,m=Bjt(p,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:p,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:a}}function Gjt(t){let e=wZe(t);return k4(e,{hash:\\\"hash\\\",hmac:\\\"function\\\",randomBytes:\\\"function\\\"},{bits2int:\\\"function\\\",bits2int_modN:\\\"function\\\",lowS:\\\"boolean\\\"}),Object.freeze({lowS:!0,...e})}function Kjt(t){let e=Gjt(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(y){return Yc(y,n)}function a(y){return Hue(y,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:l,weierstrassEquation:d,isWithinCurveOrder:f}=Wjt({...e,toBytes(y,E,C){let I=E.toAffine(),P=r.toBytes(I.x),k=O7;return S4(\\\"isCompressed\\\",C),C?k(Uint8Array.from([E.hasEvenY()?2:3]),P):k(Uint8Array.from([4]),P,r.toBytes(I.y))},fromBytes(y){let E=y.length,C=y[0],I=y.subarray(1);if(E===i&&(C===2||C===3)){let P=W2(I);if(!o$(P,Eo,r.ORDER))throw new Error(\\\"Point is not on curve\\\");let k=d(P),U;try{U=r.sqrt(k)}catch(A){let j=A instanceof Error?\\\": \\\"+A.message:\\\"\\\";throw new Error(\\\"Point is not on curve\\\"+j)}let D=(U&Eo)===Eo;return(C&1)===1!==D&&(U=r.neg(U)),{x:P,y:U}}else if(E===s&&C===4){let P=r.fromBytes(I.subarray(0,r.BYTES)),k=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return{x:P,y:k}}else{let P=i,k=s;throw new Error(\\\"invalid Point, expected length of \\\"+P+\\\", or uncompressed \\\"+k+\\\", got \\\"+E)}}}),p=y=>A4(I4(y,e.nByteLength));function h(y){let E=n>>Eo;return y>E}function m(y){return h(y)?o(-y):y}let g=(y,E,C)=>W2(y.slice(E,C));class w{constructor(E,C,I){this.r=E,this.s=C,this.recovery=I,this.assertValidity()}static fromCompact(E){let C=e.nByteLength;return E=Wl(\\\"compactSignature\\\",E,C*2),new w(g(E,0,C),g(E,C,2*C))}static fromDER(E){let{r:C,s:I}=P0.toSig(Wl(\\\"DER\\\",E));return new w(C,I)}assertValidity(){N0(\\\"r\\\",this.r,Eo,n),N0(\\\"s\\\",this.s,Eo,n)}addRecoveryBit(E){return new w(this.r,this.s,E)}recoverPublicKey(E){let{r:C,s:I,recovery:P}=this,k=N(Wl(\\\"msgHash\\\",E));if(P==null||![0,1,2,3].includes(P))throw new Error(\\\"recovery id invalid\\\");let U=P===2||P===3?C+e.n:C;if(U>=r.ORDER)throw new Error(\\\"recovery id 2 or 3 invalid\\\");let D=(P&1)===0?\\\"02\\\":\\\"03\\\",A=c.fromHex(D+p(U)),j=a(U),K=o(-k*j),J=o(I*j),X=c.BASE.multiplyAndAddUnsafe(A,K,J);if(!X)throw new Error(\\\"point at infinify\\\");return X.assertValidity(),X}hasHighS(){return h(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return T4(this.toDERHex())}toDERHex(){return P0.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return T4(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}let v={isValidPrivateKey(y){try{return l(y),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let y=gZe(e.n);return Ojt(e.randomBytes(y),e.n)},precompute(y=8,E=c.BASE){return E._setWindowSize(y),E.multiply(BigInt(3)),E}};function b(y,E=!0){return c.fromPrivateKey(y).toRawBytes(E)}function _(y){let E=G2(y),C=typeof y==\\\"string\\\",I=(E||C)&&y.length;return E?I===i||I===s:C?I===2*i||I===2*s:y instanceof c}function S(y,E,C=!0){if(_(y))throw new Error(\\\"first arg must be private key\\\");if(!_(E))throw new Error(\\\"second arg must be public key\\\");return c.fromHex(E).multiply(l(y)).toRawBytes(C)}let T=e.bits2int||function(y){if(y.length>8192)throw new Error(\\\"input is too large\\\");let E=W2(y),C=y.length*8-e.nBitLength;return C>0?E>>BigInt(C):E},N=e.bits2int_modN||function(y){return o(T(y))},O=gde(e.nBitLength);function L(y){return N0(\\\"num < 2^\\\"+e.nBitLength,y,O0,O),I4(y,e.nByteLength)}function B(y,E,C=H){if([\\\"recovered\\\",\\\"canonical\\\"].some(fe=>fe in C))throw new Error(\\\"sign() legacy options not supported\\\");let{hash:I,randomBytes:P}=e,{lowS:k,prehash:U,extraEntropy:D}=C;k==null&&(k=!0),y=Wl(\\\"msgHash\\\",y),mKe(C),U&&(y=Wl(\\\"prehashed msgHash\\\",I(y)));let A=N(y),j=l(E),K=[L(j),L(A)];if(D!=null&&D!==!1){let fe=D===!0?P(r.BYTES):D;K.push(Wl(\\\"extraEntropy\\\",fe))}let J=O7(...K),X=A;function re(fe){let ce=T(fe);if(!f(ce))return;let We=a(ce),Ue=c.BASE.multiply(ce).toAffine(),je=o(Ue.x);if(je===O0)return;let Lt=o(We*o(X+je*j));if(Lt===O0)return;let pt=(Ue.x===je?0:2)|Number(Ue.y&Eo),Ct=Lt;return k&&h(Lt)&&(Ct=m(Lt),pt^=1),new w(je,Ct,pt)}return{seed:J,k2sig:re}}let H={lowS:e.lowS,prehash:!1},M={lowS:e.lowS,prehash:!1};function F(y,E,C=H){let{seed:I,k2sig:P}=B(y,E,C),k=e;return dZe(k.hash.outputLen,k.nByteLength,k.hmac)(I,P)}c.BASE._setWindowSize(8);function R(y,E,C,I=M){let P=y;E=Wl(\\\"msgHash\\\",E),C=Wl(\\\"publicKey\\\",C);let{lowS:k,prehash:U,format:D}=I;if(mKe(I),\\\"strict\\\"in I)throw new Error(\\\"options.strict was renamed to lowS\\\");if(D!==void 0&&D!==\\\"compact\\\"&&D!==\\\"der\\\")throw new Error(\\\"format must be compact or der\\\");let A=typeof P==\\\"string\\\"||G2(P),j=!A&&!D&&typeof P==\\\"object\\\"&&P!==null&&typeof P.r==\\\"bigint\\\"&&typeof P.s==\\\"bigint\\\";if(!A&&!j)throw new Error(\\\"invalid signature, expected Uint8Array, hex string or Signature instance\\\");let K,J;try{if(j&&(K=new w(P.r,P.s)),A){try{D!==\\\"compact\\\"&&(K=w.fromDER(P))}catch(Lt){if(!(Lt instanceof P0.Err))throw Lt}!K&&D!==\\\"der\\\"&&(K=w.fromCompact(P))}J=c.fromHex(C)}catch{return!1}if(!K||k&&K.hasHighS())return!1;U&&(E=e.hash(E));let{r:X,s:re}=K,fe=N(E),ce=a(re),We=o(fe*ce),Ue=o(X*ce),je=c.BASE.multiplyAndAddUnsafe(J,We,Ue)?.toAffine();return je?o(je.x)===X:!1}return{CURVE:e,getPublicKey:b,getSharedSecret:S,sign:F,verify:R,ProjectivePoint:c,Signature:w,utils:v}}function Zjt(t){return{hash:t,hmac:(e,...r)=>r$(t,e,gFt(...r)),randomBytes:O4}}function Qjt(t,e){let r=n=>Kjt({...t,...Zjt(n)});return{...r(e),create:r}}function vde(){let t=zue.utils.randomPrivateKey(),e=zue.getPublicKey(t);return{privateKey:yr(t,ra),publicKey:yr(e,ra)}}function H7(){let t=O4(wde);return yr(t,ra)}function xde(t,e){let r=zue.getSharedSecret(pn(t,ra),pn(e,ra)),n=ljt(F7,r,void 0,void 0,wde);return yr(n,ra)}function J2(t){let e=F7(pn(t,ra));return yr(e,ra)}function Kl(t){let e=F7(pn(t,B4));return yr(e,ra)}function Ede(t){return pn(`${t}`,yde)}function B0(t){return Number(yr(t,yde))}function xZe(t){return t.replace(/\\\\+/g,\\\"-\\\").replace(/\\\\//g,\\\"_\\\").replace(/=/g,\\\"\\\")}function EZe(t){let e=t.replace(/-/g,\\\"+\\\").replace(/_/g,\\\"/\\\"),r=(4-e.length%4)%4;return e+\\\"=\\\".repeat(r)}function _de(t){let e=Ede(typeof t.type<\\\"u\\\"?t.type:bde);if(B0(e)===md&&typeof t.senderPublicKey>\\\"u\\\")throw new Error(\\\"Missing sender public key for type 1 envelope\\\");let r=typeof t.senderPublicKey<\\\"u\\\"?pn(t.senderPublicKey,ra):void 0,n=typeof t.iv<\\\"u\\\"?pn(t.iv,ra):O4(T7),i=pn(t.symKey,ra),s=lZe(i,n).encrypt(pn(t.message,B4)),o=Tde({type:e,sealed:s,iv:n,senderPublicKey:r});return t.encoding===xh?xZe(o):o}function Cde(t){let e=pn(t.symKey,ra),{sealed:r,iv:n}=Y2({encoded:t.encoded,encoding:t.encoding}),i=lZe(e,n).decrypt(r);if(i===null)throw new Error(\\\"Failed to decrypt\\\");return yr(i,B4)}function Sde(t,e){let r=Ede(Q2),n=O4(T7),i=pn(t,B4),s=Tde({type:r,sealed:i,iv:n});return e===xh?xZe(s):s}function Ade(t,e){let{sealed:r}=Y2({encoded:t,encoding:e});return yr(r,B4)}function Tde(t){if(B0(t.type)===Q2)return yr(kl([t.type,t.sealed]),Xc);if(B0(t.type)===md){if(typeof t.senderPublicKey>\\\"u\\\")throw new Error(\\\"Missing sender public key for type 1 envelope\\\");return yr(kl([t.type,t.senderPublicKey,t.iv,t.sealed]),Xc)}return yr(kl([t.type,t.iv,t.sealed]),Xc)}function Y2(t){let e=(t.encoding||Xc)===xh?EZe(t.encoded):t.encoded,r=pn(e,Xc),n=r.slice(eHt,yKe),i=yKe;if(B0(n)===md){let c=i+wde,l=c+T7,d=r.slice(i,c),f=r.slice(c,l),p=r.slice(l);return{type:n,sealed:p,iv:f,senderPublicKey:d}}if(B0(n)===Q2){let c=r.slice(i),l=O4(T7);return{type:n,sealed:c,iv:l}}let s=i+T7,o=r.slice(i,s),a=r.slice(s);return{type:n,sealed:a,iv:o}}function Ide(t,e){let r=Y2({encoded:t,encoding:e?.encoding});return a$({type:B0(r.type),senderPublicKey:typeof r.senderPublicKey<\\\"u\\\"?yr(r.senderPublicKey,ra):void 0,receiverPublicKey:e?.receiverPublicKey})}function a$(t){let e=t?.type||bde;if(e===md){if(typeof t?.senderPublicKey>\\\"u\\\")throw new Error(\\\"missing sender public key\\\");if(typeof t?.receiverPublicKey>\\\"u\\\")throw new Error(\\\"missing receiver public key\\\")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function c$(t){return t.type===md&&typeof t.senderPublicKey==\\\"string\\\"&&typeof t.receiverPublicKey==\\\"string\\\"}function l$(t){return t.type===Q2}function _Ze(t){let e=globalThis.Buffer.from(t.x,\\\"base64\\\"),r=globalThis.Buffer.from(t.y,\\\"base64\\\");return kl([new Uint8Array([4]),e,r])}function Rde(t,e){let[r,n,i]=t.split(\\\".\\\"),s=globalThis.Buffer.from(EZe(i),\\\"base64\\\");if(s.length!==64)throw new Error(\\\"Invalid signature length\\\");let o=s.slice(0,32),a=s.slice(32,64),c=`${r}.${n}`,l=F7(c),d=_Ze(e);if(!Xjt.verify(kl([o,a]),l,d))throw new Error(\\\"Invalid signature\\\");return Qp(t).payload}function M4(t){return t?.relay||{protocol:CZe}}function X2(t){let e=FH[t];if(typeof e>\\\"u\\\")throw new Error(`Relay Protocol not supported: ${t}`);return e}function SZe(t,e=\\\"-\\\"){let r={},n=\\\"relay\\\"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){let s=i.replace(n,\\\"\\\"),o=t[i];r[s]=o}}),r}function u$(t){if(!t.includes(\\\"wc:\\\")){let l=ide(t);l!=null&&l.includes(\\\"wc:\\\")&&(t=l)}t=t.includes(\\\"wc://\\\")?t.replace(\\\"wc://\\\",\\\"\\\"):t,t=t.includes(\\\"wc:\\\")?t.replace(\\\"wc:\\\",\\\"\\\"):t;let e=t.indexOf(\\\":\\\"),r=t.indexOf(\\\"?\\\")!==-1?t.indexOf(\\\"?\\\"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split(\\\"@\\\"),s=typeof r<\\\"u\\\"?t.substring(r):\\\"\\\",o=new URLSearchParams(s),a={};o.forEach((l,d)=>{a[d]=l});let c=typeof a.methods==\\\"string\\\"?a.methods.split(\\\",\\\"):void 0;return{protocol:n,topic:AZe(i[0]),version:parseInt(i[1],10),symKey:a.symKey,relay:SZe(a),methods:c,expiryTimestamp:a.expiryTimestamp?parseInt(a.expiryTimestamp,10):void 0}}function AZe(t){return t.startsWith(\\\"//\\\")?t.substring(2):t}function TZe(t,e=\\\"-\\\"){let r=\\\"relay\\\",n={};return Object.keys(t).forEach(i=>{let s=i,o=r+e+s;t[s]&&(n[o]=t[s])}),n}function d$(t){let e=new URLSearchParams,r=TZe(t.relay);Object.keys(r).sort().forEach(i=>{e.set(i,r[i])}),e.set(\\\"symKey\\\",t.symKey),t.expiryTimestamp&&e.set(\\\"expiryTimestamp\\\",t.expiryTimestamp.toString()),t.methods&&e.set(\\\"methods\\\",t.methods.join(\\\",\\\"));let n=e.toString();return`${t.protocol}:${t.topic}@${t.version}?${n}`}function D4(t,e,r){return`${t}?wc_ev=${r}&topic=${e}`}function ex(t){let e=[];return t.forEach(r=>{let[n,i]=r.split(\\\":\\\");e.push(`${n}:${i}`)}),e}function IZe(t){let e=[];return Object.values(t).forEach(r=>{e.push(...ex(r.accounts))}),e}function RZe(t,e){let r=[];return Object.values(t).forEach(n=>{ex(n.accounts).includes(e)&&r.push(...n.methods)}),r}function PZe(t,e){let r=[];return Object.values(t).forEach(n=>{ex(n.accounts).includes(e)&&r.push(...n.events)}),r}function cHt(t,e){let r=L4(t,e);if(r)throw new Error(r.message);let n={};for(let[i,s]of Object.entries(t))n[i]={methods:s.methods,events:s.events,chains:s.accounts.map(o=>`${o.split(\\\":\\\")[0]}:${o.split(\\\":\\\")[1]}`)};return n}function lHt(t){let{proposal:{requiredNamespaces:e,optionalNamespaces:r={}},supportedNamespaces:n}=t,i=N7(e),s=N7(r),o={};Object.keys(n).forEach(l=>{let d=n[l].chains,f=n[l].methods,p=n[l].events,h=n[l].accounts;d.forEach(m=>{if(!h.some(g=>g.includes(m)))throw new Error(`No accounts provided for chain ${m} in namespace ${l}`)}),o[l]={chains:d,methods:f,events:p,accounts:h}});let a=q7(e,o,\\\"approve()\\\");if(a)throw new Error(a.message);let c={};return!Object.keys(e).length&&!Object.keys(r).length?o:(Object.keys(i).forEach(l=>{let d=n[l].chains.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.chains)==null?void 0:w.includes(m)}),f=n[l].methods.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.methods)==null?void 0:w.includes(m)}),p=n[l].events.filter(m=>{var g,w;return(w=(g=i[l])==null?void 0:g.events)==null?void 0:w.includes(m)}),h=d.map(m=>n[l].accounts.filter(g=>g.includes(`${m}:`))).flat();c[l]={chains:d,methods:f,events:p,accounts:h}}),Object.keys(s).forEach(l=>{var d,f,p,h,m,g;if(!n[l])return;let w=(f=(d=s[l])==null?void 0:d.chains)==null?void 0:f.filter(S=>n[l].chains.includes(S)),v=n[l].methods.filter(S=>{var T,N;return(N=(T=s[l])==null?void 0:T.methods)==null?void 0:N.includes(S)}),b=n[l].events.filter(S=>{var T,N;return(N=(T=s[l])==null?void 0:T.events)==null?void 0:N.includes(S)}),_=w?.map(S=>n[l].accounts.filter(T=>T.includes(`${S}:`))).flat();c[l]={chains:pd((p=c[l])==null?void 0:p.chains,w),methods:pd((h=c[l])==null?void 0:h.methods,v),events:pd((m=c[l])==null?void 0:m.events,b),accounts:pd((g=c[l])==null?void 0:g.accounts,_)}}),c)}function Pde(t){return t.includes(\\\":\\\")}function OZe(t){return Pde(t)?t.split(\\\":\\\")[0]:t}function N7(t){var e,r,n;let i={};if(!rx(t))return i;for(let[s,o]of Object.entries(t)){let a=Pde(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],d=OZe(s);i[d]=aHt(oHt({},i[d]),{chains:pd(a,(e=i[d])==null?void 0:e.chains),methods:pd(c,(r=i[d])==null?void 0:r.methods),events:pd(l,(n=i[d])==null?void 0:n.events)})}return i}function NZe(t){let e={};return t?.forEach(r=>{var n;let[i,s]=r.split(\\\":\\\");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(r),(n=e[i].chains)==null||n.push(`${i}:${s}`)}),e}function f$(t,e){e=e.map(n=>n.replace(\\\"did:pkh:\\\",\\\"\\\"));let r=NZe(e);for(let[n,i]of Object.entries(r))i.methods?i.methods=pd(i.methods,t):i.methods=t,i.events=[\\\"chainChanged\\\",\\\"accountsChanged\\\"];return r}function Ode(t,e){var r,n,i,s,o,a;let c=N7(t),l=N7(e),d={},f=Object.keys(c).concat(Object.keys(l));for(let p of f)d[p]={chains:pd((r=c[p])==null?void 0:r.chains,(n=l[p])==null?void 0:n.chains),methods:pd((i=c[p])==null?void 0:i.methods,(s=l[p])==null?void 0:s.methods),events:pd((o=c[p])==null?void 0:o.events,(a=l[p])==null?void 0:a.events)};return d}function Se(t,e){let{message:r,code:n}=BZe[t];return{message:e?`${r} ${e}`:r,code:n}}function Jr(t,e){let{message:r,code:n}=kZe[t];return{message:e?`${r} ${e}`:r,code:n}}function tx(t,e){return Array.isArray(t)?typeof e<\\\"u\\\"&&t.length?t.every(e):!0:!1}function rx(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Bs(t){return typeof t>\\\"u\\\"}function Hi(t,e){return e&&Bs(t)?!0:typeof t==\\\"string\\\"&&!!t.trim().length}function p$(t,e){return e&&Bs(t)?!0:typeof t==\\\"number\\\"&&!isNaN(t)}function Nde(t,e){let{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r),s=!0;return j1(i,n)?(n.forEach(o=>{let{accounts:a,methods:c,events:l}=t.namespaces[o],d=ex(a),f=r[o];(!j1($z(o,f),d)||!j1(f.methods,c)||!j1(f.events,l))&&(s=!1)}),s):!1}function k7(t){return Hi(t,!1)&&t.includes(\\\":\\\")?t.split(\\\":\\\").length===2:!1}function MZe(t){if(Hi(t,!1)&&t.includes(\\\":\\\")){let e=t.split(\\\":\\\");if(e.length===3){let r=e[0]+\\\":\\\"+e[1];return!!e[2]&&k7(r)}}return!1}function kde(t){function e(r){try{return typeof new URL(r)<\\\"u\\\"}catch{return!1}}try{if(Hi(t,!1)){if(e(t))return!0;let r=ide(t);return e(r)}}catch{}return!1}function Bde(t){var e;return(e=t?.proposer)==null?void 0:e.publicKey}function Mde(t){return t?.topic}function Dde(t,e){let r=null;return Hi(t?.publicKey,!1)||(r=Se(\\\"MISSING_OR_INVALID\\\",`${e} controller public key should be a string`)),r}function Vue(t){let e=!0;return tx(t)?t.length&&(e=t.every(r=>Hi(r,!1))):e=!1,e}function DZe(t,e,r){let n=null;return tx(e)&&e.length?e.forEach(i=>{n||k7(i)||(n=Jr(\\\"UNSUPPORTED_CHAINS\\\",`${r}, chain ${i} should be a string and conform to \\\"namespace:chainId\\\" format`))}):k7(t)||(n=Jr(\\\"UNSUPPORTED_CHAINS\\\",`${r}, chains must be defined as \\\"namespace:chainId\\\" e.g. \\\"eip155:1\\\": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: [\\\"eip155:1\\\", \\\"eip155:5\\\"] }`)),n}function LZe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;let o=DZe(i,$z(i,s),`${e} ${r}`);o&&(n=o)}),n}function UZe(t,e){let r=null;return tx(t)?t.forEach(n=>{r||MZe(n)||(r=Jr(\\\"UNSUPPORTED_ACCOUNTS\\\",`${e}, account ${n} should be a string and conform to \\\"namespace:chainId:address\\\" format`))}):r=Jr(\\\"UNSUPPORTED_ACCOUNTS\\\",`${e}, accounts should be an array of strings conforming to \\\"namespace:chainId:address\\\" format`),r}function FZe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=UZe(n?.accounts,`${e} namespace`);i&&(r=i)}),r}function jZe(t,e){let r=null;return Vue(t?.methods)?Vue(t?.events)||(r=Jr(\\\"UNSUPPORTED_EVENTS\\\",`${e}, events should be an array of strings or empty array for no events`)):r=Jr(\\\"UNSUPPORTED_METHODS\\\",`${e}, methods should be an array of strings or empty array for no methods`),r}function Lde(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;let i=jZe(n,`${e}, namespace`);i&&(r=i)}),r}function Ude(t,e,r){let n=null;if(t&&rx(t)){let i=Lde(t,e);i&&(n=i);let s=LZe(t,e,r);s&&(n=s)}else n=Se(\\\"MISSING_OR_INVALID\\\",`${e}, ${r} should be an object with data`);return n}function L4(t,e){let r=null;if(t&&rx(t)){let n=Lde(t,e);n&&(r=n);let i=FZe(t,e);i&&(r=i)}else r=Se(\\\"MISSING_OR_INVALID\\\",`${e}, namespaces should be an object with data`);return r}function h$(t){return Hi(t.protocol,!0)}function Fde(t,e){let r=!1;return e&&!t?r=!0:t&&tx(t)&&t.length&&t.forEach(n=>{r=h$(n)}),r}function jde(t){return typeof t==\\\"number\\\"}function na(t){return typeof t<\\\"u\\\"&&typeof t!==null}function Hde(t){return!(!t||typeof t!=\\\"object\\\"||!t.code||!p$(t.code,!1)||!t.message||!Hi(t.message,!1))}function qde(t){return!(Bs(t)||!Hi(t.method,!1))}function zde(t){return!(Bs(t)||Bs(t.result)&&Bs(t.error)||!p$(t.id,!1)||!Hi(t.jsonrpc,!1))}function $de(t){return!(Bs(t)||!Hi(t.name,!1))}function m$(t,e){return!(!k7(e)||!IZe(t).includes(e))}function Vde(t,e,r){return Hi(r,!1)?RZe(t,e).includes(r):!1}function Wde(t,e,r){return Hi(r,!1)?PZe(t,e).includes(r):!1}function q7(t,e,r){let n=null,i=uHt(t),s=dHt(e),o=Object.keys(i),a=Object.keys(s),c=vKe(Object.keys(t)),l=vKe(Object.keys(e)),d=c.filter(f=>!l.includes(f));return d.length&&(n=Se(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces keys don't satisfy requiredNamespaces.\\n      Required: ${d.toString()}\\n      Received: ${Object.keys(e).toString()}`)),j1(o,a)||(n=Se(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces chains don't satisfy required namespaces.\\n      Required: ${o.toString()}\\n      Approved: ${a.toString()}`)),Object.keys(e).forEach(f=>{if(!f.includes(\\\":\\\")||n)return;let p=ex(e[f].accounts);p.includes(f)||(n=Se(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces accounts don't satisfy namespace accounts for ${f}\\n        Required: ${f}\\n        Approved: ${p.toString()}`))}),o.forEach(f=>{n||(j1(i[f].methods,s[f].methods)?j1(i[f].events,s[f].events)||(n=Se(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=Se(\\\"NON_CONFORMING_NAMESPACES\\\",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function uHt(t){let e={};return Object.keys(t).forEach(r=>{var n;r.includes(\\\":\\\")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function vKe(t){return[...new Set(t.map(e=>e.includes(\\\":\\\")?e.split(\\\":\\\")[0]:e))]}function dHt(t){let e={};return Object.keys(t).forEach(r=>{r.includes(\\\":\\\")?e[r]=t[r]:ex(t[r].accounts)?.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}),e}function Gde(t,e){return p$(t,!1)&&t<=e.max&&t>=e.min}function g$(){let t=Z2();return new Promise(e=>{switch(t){case uc.browser:e(HZe());break;case uc.reactNative:e(qZe());break;case uc.node:e(zZe());break;default:e(!0)}})}function HZe(){return z1()&&navigator?.onLine}async function qZe(){return bh()&&typeof globalThis<\\\"u\\\"&&globalThis!=null&&globalThis.NetInfo?(await globalThis?.NetInfo.fetch())?.isConnected:!0}function zZe(){return!0}function Kde(t){switch(Z2()){case uc.browser:$Ze(t);break;case uc.reactNative:VZe(t);break;case uc.node:break}}function $Ze(t){!bh()&&z1()&&(window.addEventListener(\\\"online\\\",()=>t(!0)),window.addEventListener(\\\"offline\\\",()=>t(!1)))}function VZe(t){bh()&&typeof globalThis<\\\"u\\\"&&globalThis!=null&&globalThis.NetInfo&&globalThis?.NetInfo.addEventListener(e=>t(e?.isConnected))}function Zde(){var t;return z1()&&(0,hd.getDocument)()?((t=(0,hd.getDocument)())==null?void 0:t.visibilityState)===\\\"visible\\\":!0}var k0,hd,xKe,zz,VUt,WUt,GUt,VGe,KUt,ZUt,WGe,GGe,QUt,TKe,uc,Hz,JUt,IKe,Kue,YUt,RKe,iFt,Uz,KGe,lFt,uFt,dFt,fFt,w4,ZGe,R7,zKe,$Ke,VKe,yFt,A7,bFt,wFt,vFt,xFt,EFt,_Ft,JGe,YGe,Nue,SFt,AFt,TFt,RFt,PFt,OFt,XGe,NFt,kFt,eKe,lde,ZKe,BFt,Qz,QKe,U7,N4,Yz,H1,jFt,HFt,VFt,aZe,GFt,KFt,ZFt,QFt,Fz,JFt,cZe,sKe,ta,Due,tjt,njt,ijt,oKe,sjt,ojt,lZe,qz,r$,Eue,cKe,ljt,Lue,pjt,U1,F1,Uue,F7,n$,i$,hjt,mjt,R0,_ue,gde,Cue,uKe,xjt,Ejt,_jt,_o,ms,V2,Cjt,jue,dKe,fKe,Tjt,pKe,jz,Tue,bZe,v4,Rue,que,Ujt,hKe,Fjt,jjt,zue,$jt,Vjt,$ue,P0,O0,Eo,gKe,vZe,Jjt,Yjt,Xjt,yde,ra,Xc,xh,B4,bde,md,Q2,eHt,yKe,T7,wde,CZe,tHt,rHt,nHt,bKe,iHt,sHt,wKe,oHt,aHt,kZe,BZe,Pue,M0,y$=x(()=>{u();Ise();k0=Me(u0()),hd=Me(gC()),xKe=Me(kse());un();xH();g2();B9();Boe();zz=\\\":\\\";VUt=Object.defineProperty,WUt=Object.defineProperties,GUt=Object.getOwnPropertyDescriptors,VGe=Object.getOwnPropertySymbols,KUt=Object.prototype.hasOwnProperty,ZUt=Object.prototype.propertyIsEnumerable,WGe=(t,e,r)=>e in t?VUt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,GGe=(t,e)=>{for(var r in e||(e={}))KUt.call(e,r)&&WGe(t,r,e[r]);if(VGe)for(var r of VGe(e))ZUt.call(e,r)&&WGe(t,r,e[r]);return t},QUt=(t,e)=>WUt(t,GUt(e)),TKe=\\\"ReactNative\\\",uc={reactNative:\\\"react-native\\\",node:\\\"node\\\",browser:\\\"browser\\\",unknown:\\\"unknown\\\"},Hz=\\\" \\\",JUt=\\\":\\\",IKe=\\\"/\\\",Kue=2,YUt=1e3,RKe=\\\"js\\\";iFt=t=>t;Uz=BigInt(2**32-1),KGe=BigInt(32);lFt=(t,e,r)=>t<<r|e>>>32-r,uFt=(t,e,r)=>e<<r|t>>>32-r,dFt=(t,e,r)=>e<<r-32|t>>>64-r,fFt=(t,e,r)=>t<<r-32|e>>>64-r,w4=typeof globalThis==\\\"object\\\"&&\\\"crypto\\\"in globalThis?globalThis.crypto:void 0;ZGe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;R7=class{clone(){return this._cloneInto()}};zKe=[],$Ke=[],VKe=[],yFt=BigInt(0),A7=BigInt(1),bFt=BigInt(2),wFt=BigInt(7),vFt=BigInt(256),xFt=BigInt(113);for(let t=0,e=A7,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],zKe.push(2*(5*n+r)),$Ke.push((t+1)*(t+2)/2%64);let i=yFt;for(let s=0;s<7;s++)e=(e<<A7^(e>>wFt)*xFt)%vFt,e&bFt&&(i^=A7<<(A7<<BigInt(s))-A7);VKe.push(i)}[EFt,_Ft]=cFt(VKe,!0),JGe=(t,e,r)=>r>32?dFt(t,e,r):lFt(t,e,r),YGe=(t,e,r)=>r>32?fFt(t,e,r):uFt(t,e,r);Nue=class t extends R7{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,I7(n),0>=this.blockLen||this.blockLen>=200)throw new Error(\\\"Sha3 supports only keccak-f1600 function\\\");this.state=new Uint8Array(200),this.state32=pFt(this.state)}keccak(){ZGe||QGe(this.state32),CFt(this.state32,this.rounds),ZGe||QGe(this.state32),this.posOut=0,this.pos=0}update(e){E4(this);let{blockLen:r,state:n}=this;e=_4(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){E4(this,!1),L7(e),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error(\\\"XOF is not possible for this instance\\\");return this.writeInto(e)}xof(e){return I7(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(HKe(e,this),this.finished)throw new Error(\\\"digest() was already called\\\");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new t(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},SFt=(t,e,r)=>qKe(()=>new Nue(e,t,r)),AFt=SFt(1,136,256/8),TFt=\\\"https://rpc.walletconnect.org/v1\\\";RFt=Object.defineProperty,PFt=Object.defineProperties,OFt=Object.getOwnPropertyDescriptors,XGe=Object.getOwnPropertySymbols,NFt=Object.prototype.hasOwnProperty,kFt=Object.prototype.propertyIsEnumerable,eKe=(t,e,r)=>e in t?RFt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,lde=(t,e)=>{for(var r in e||(e={}))NFt.call(e,r)&&eKe(t,r,e[r]);if(XGe)for(var r of XGe(e))kFt.call(e,r)&&eKe(t,r,e[r]);return t},ZKe=(t,e)=>PFt(t,OFt(e)),BFt=\\\"did:pkh:\\\",Qz=t=>t?.split(\\\":\\\"),QKe=t=>{let e=t&&Qz(t);if(e)return t.includes(BFt)?e[3]:e[1]},U7=t=>{let e=t&&Qz(t);if(e)return e[2]+\\\":\\\"+e[3]},N4=t=>{let e=t&&Qz(t);if(e)return e.pop()};Yz=(t,e)=>{let r=`${t.domain} wants you to sign in with your Ethereum account:`,n=N4(e);if(!t.aud&&!t.uri)throw new Error(\\\"Either `aud` or `uri` is required to construct the message\\\");let i=t.statement||void 0,s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${QKe(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,d=t.exp?`Expiration Time: ${t.exp}`:void 0,f=t.nbf?`Not Before: ${t.nbf}`:void 0,p=t.requestId?`Request ID: ${t.requestId}`:void 0,h=t.resources?`Resources:${t.resources.map(g=>`\\n- ${g}`).join(\\\"\\\")}`:void 0,m=$1(t.resources);if(m){let g=q1(m);i=hde(i,g)}return[r,n,\\\"\\\",i,\\\"\\\",s,o,a,c,l,d,f,p,h].filter(g=>g!=null).join(`\\n`)};H1=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),jFt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),HFt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HFt)throw new Error(\\\"Non little-endian hardware is not supported\\\");VFt=(t,e)=>{function r(n,...i){if(Gl(n),t.nonceLength!==void 0){let l=i[0];if(!l)throw new Error(\\\"nonce / iv required\\\");t.varSizeNonce?Gl(l):Gl(l,t.nonceLength)}let s=t.tagLength;s&&i[1]!==void 0&&Gl(i[1]);let o=e(n,...i),a=(l,d)=>{if(d!==void 0){if(l!==2)throw new Error(\\\"cipher output not supported\\\");Gl(d)}},c=!1;return{encrypt(l,d){if(c)throw new Error(\\\"cannot encrypt() twice with same key + nonce\\\");return c=!0,Gl(l),a(o.encrypt.length,d),o.encrypt(l,d)},decrypt(l,d){if(Gl(l),s&&l.length<s)throw new Error(\\\"invalid ciphertext length: smaller than tagLength=\\\"+s);return a(o.decrypt.length,d),o.decrypt(l,d)}}}return Object.assign(r,t),r};aZe=t=>Uint8Array.from(t.split(\\\"\\\").map(e=>e.charCodeAt(0))),GFt=aZe(\\\"expand 16-byte k\\\"),KFt=aZe(\\\"expand 32-byte k\\\"),ZFt=H1(GFt),QFt=H1(KFt);Fz=64,JFt=16,cZe=2**32-1,sKe=new Uint32Array;ta=(t,e)=>t[e++]&255|(t[e++]&255)<<8,Due=class{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=kue(e),Gl(e,32);let r=ta(e,0),n=ta(e,2),i=ta(e,4),s=ta(e,6),o=ta(e,8),a=ta(e,10),c=ta(e,12),l=ta(e,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|s<<9)&8191,this.r[4]=(s>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let d=0;d<8;d++)this.pad[d]=ta(e,16+2*d)}process(e,r,n=!1){let i=n?0:2048,{h:s,r:o}=this,a=o[0],c=o[1],l=o[2],d=o[3],f=o[4],p=o[5],h=o[6],m=o[7],g=o[8],w=o[9],v=ta(e,r+0),b=ta(e,r+2),_=ta(e,r+4),S=ta(e,r+6),T=ta(e,r+8),N=ta(e,r+10),O=ta(e,r+12),L=ta(e,r+14),B=s[0]+(v&8191),H=s[1]+((v>>>13|b<<3)&8191),M=s[2]+((b>>>10|_<<6)&8191),F=s[3]+((_>>>7|S<<9)&8191),R=s[4]+((S>>>4|T<<12)&8191),y=s[5]+(T>>>1&8191),E=s[6]+((T>>>14|N<<2)&8191),C=s[7]+((N>>>11|O<<5)&8191),I=s[8]+((O>>>8|L<<8)&8191),P=s[9]+(L>>>5|i),k=0,U=k+B*a+H*(5*w)+M*(5*g)+F*(5*m)+R*(5*h);k=U>>>13,U&=8191,U+=y*(5*p)+E*(5*f)+C*(5*d)+I*(5*l)+P*(5*c),k+=U>>>13,U&=8191;let D=k+B*c+H*a+M*(5*w)+F*(5*g)+R*(5*m);k=D>>>13,D&=8191,D+=y*(5*h)+E*(5*p)+C*(5*f)+I*(5*d)+P*(5*l),k+=D>>>13,D&=8191;let A=k+B*l+H*c+M*a+F*(5*w)+R*(5*g);k=A>>>13,A&=8191,A+=y*(5*m)+E*(5*h)+C*(5*p)+I*(5*f)+P*(5*d),k+=A>>>13,A&=8191;let j=k+B*d+H*l+M*c+F*a+R*(5*w);k=j>>>13,j&=8191,j+=y*(5*g)+E*(5*m)+C*(5*h)+I*(5*p)+P*(5*f),k+=j>>>13,j&=8191;let K=k+B*f+H*d+M*l+F*c+R*a;k=K>>>13,K&=8191,K+=y*(5*w)+E*(5*g)+C*(5*m)+I*(5*h)+P*(5*p),k+=K>>>13,K&=8191;let J=k+B*p+H*f+M*d+F*l+R*c;k=J>>>13,J&=8191,J+=y*a+E*(5*w)+C*(5*g)+I*(5*m)+P*(5*h),k+=J>>>13,J&=8191;let X=k+B*h+H*p+M*f+F*d+R*l;k=X>>>13,X&=8191,X+=y*c+E*a+C*(5*w)+I*(5*g)+P*(5*m),k+=X>>>13,X&=8191;let re=k+B*m+H*h+M*p+F*f+R*d;k=re>>>13,re&=8191,re+=y*l+E*c+C*a+I*(5*w)+P*(5*g),k+=re>>>13,re&=8191;let fe=k+B*g+H*m+M*h+F*p+R*f;k=fe>>>13,fe&=8191,fe+=y*d+E*l+C*c+I*a+P*(5*w),k+=fe>>>13,fe&=8191;let ce=k+B*w+H*g+M*m+F*h+R*p;k=ce>>>13,ce&=8191,ce+=y*f+E*d+C*l+I*c+P*a,k+=ce>>>13,ce&=8191,k=(k<<2)+k|0,k=k+U|0,U=k&8191,k=k>>>13,D+=k,s[0]=U,s[1]=D,s[2]=A,s[3]=j,s[4]=K,s[5]=J,s[6]=X,s[7]=re,s[8]=fe,s[9]=ce}finalize(){let{h:e,pad:r}=this,n=new Uint16Array(10),i=e[1]>>>13;e[1]&=8191;for(let a=2;a<10;a++)e[a]+=i,i=e[a]>>>13,e[a]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let a=1;a<10;a++)n[a]=e[a]+i,i=n[a]>>>13,n[a]&=8191;n[9]-=8192;let s=(i^1)-1;for(let a=0;a<10;a++)n[a]&=s;s=~s;for(let a=0;a<10;a++)e[a]=e[a]&s|n[a];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+r[0];e[0]=o&65535;for(let a=1;a<8;a++)o=(e[a]+r[a]|0)+(o>>>16)|0,e[a]=o&65535;C4(n)}update(e){tKe(this);let{buffer:r,blockLen:n}=this;e=kue(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(n-this.pos,i-s);if(o===n){for(;n<=i-s;s+=n)this.process(e,s);continue}r.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(r,0,!1),this.pos=0)}return this}destroy(){C4(this.h,this.r,this.buffer,this.pad)}digestInto(e){tKe(this),FFt(e,this),this.finished=!0;let{buffer:r,h:n}=this,{pos:i}=this;if(i){for(r[i++]=1;i<16;i++)r[i]=0;this.process(r,0,!0)}this.finalize();let s=0;for(let o=0;o<8;o++)e[s++]=n[o]>>>0,e[s++]=n[o]>>>8;return e}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}};tjt=ejt(t=>new Due(t));njt=XFt(rjt,{counterRight:!1,counterLength:4,allowShortKeys:!1}),ijt=new Uint8Array(16),oKe=(t,e)=>{t.update(e);let r=e.length%16;r&&t.update(ijt.subarray(r))},sjt=new Uint8Array(32);ojt=t=>(e,r,n)=>({encrypt(i,s){let o=i.length;s=nKe(o+16,s,!1),s.set(i);let a=s.subarray(0,-16);t(e,r,a,a,1);let c=aKe(t,e,r,a,n);return s.set(c,o),C4(c),s},decrypt(i,s){s=nKe(i.length-16,s,!1);let o=i.subarray(0,-16),a=i.subarray(-16),c=aKe(t,e,r,o,n);if(!$Ft(a,c))throw new Error(\\\"invalid tag\\\");return s.set(i.subarray(0,-16)),t(e,r,s,s,1),C4(c),s}}),lZe=VFt({blockSize:64,nonceLength:12,tagLength:16},ojt(njt)),qz=class extends R7{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,ode(e);let n=_4(r);if(this.iHash=e.create(),typeof this.iHash.update!=\\\"function\\\")throw new Error(\\\"Expected instance of class which extends utils.Hash\\\");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return E4(this),this.iHash.update(e),this}digestInto(e){E4(this),L7(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},r$=(t,e,r)=>new qz(t,e).update(r).digest();r$.create=(t,e)=>new qz(t,e);Eue=new Uint8Array([0]),cKe=new Uint8Array;ljt=(t,e,r,n,i)=>cjt(t,ajt(t,e,r),n,i);Lue=class extends R7{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=vue(this.buffer)}update(e){E4(this);let{view:r,buffer:n,blockLen:i}=this;e=_4(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=vue(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){E4(this),HKe(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let f=o;f<i;f++)r[f]=0;ujt(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=vue(e),c=this.outputLen;if(c%4)throw new Error(\\\"_sha2: outputLen should be aligned to 32bit\\\");let l=c/4,d=this.get();if(l>d.length)throw new Error(\\\"_sha2: outputLen bigger than state\\\");for(let f=0;f<l;f++)a.setUint32(4*f,d[f],s)}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%r&&e.buffer.set(n),e}},pjt=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]),U1=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),F1=new Uint32Array(64),Uue=class extends Lue{constructor(){super(64,32,8,!1),this.A=U1[0]|0,this.B=U1[1]|0,this.C=U1[2]|0,this.D=U1[3]|0,this.E=U1[4]|0,this.F=U1[5]|0,this.G=U1[6]|0,this.H=U1[7]|0}get(){let{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)F1[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){let p=F1[f-15],h=F1[f-2],m=gh(p,7)^gh(p,18)^p>>>3,g=gh(h,17)^gh(h,19)^h>>>10;F1[f]=g+F1[f-7]+m+F1[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:d}=this;for(let f=0;f<64;f++){let p=gh(a,6)^gh(a,11)^gh(a,25),h=d+p+djt(a,c,l)+pjt[f]+F1[f]|0,m=(gh(n,2)^gh(n,13)^gh(n,22))+fjt(n,i,s)|0;d=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+m|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,s,o,a,c,l,d)}roundClean(){F1.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},F7=qKe(()=>new Uue);n$=BigInt(0),i$=BigInt(1),hjt=BigInt(2);mjt=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,\\\"0\\\"));R0={_0:48,_9:57,A:65,F:70,a:97,f:102};_ue=t=>typeof t==\\\"bigint\\\"&&n$<=t;gde=t=>(hjt<<BigInt(t-1))-i$,Cue=t=>new Uint8Array(t),uKe=t=>Uint8Array.from(t);xjt={bigint:t=>typeof t==\\\"bigint\\\",function:t=>typeof t==\\\"function\\\",boolean:t=>typeof t==\\\"boolean\\\",string:t=>typeof t==\\\"string\\\",stringOrUint8Array:t=>typeof t==\\\"string\\\"||G2(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t==\\\"function\\\"&&Number.isSafeInteger(t.outputLen)};Ejt=()=>{throw new Error(\\\"not implemented\\\")};_jt=Object.freeze({__proto__:null,isBytes:G2,abytes:j7,abool:S4,bytesToHex:A4,numberToHexUnpadded:x4,hexToNumber:mde,hexToBytes:T4,bytesToNumberBE:W2,bytesToNumberLE:P7,numberToBytesBE:I4,numberToBytesLE:s$,numberToVarBytesBE:gjt,ensureBytes:Wl,concatBytes:O7,equalBytes:yjt,utf8ToBytes:bjt,inRange:o$,aInRange:N0,bitLen:uZe,bitGet:wjt,bitSet:vjt,bitMask:gde,createHmacDrbg:dZe,validateObject:k4,notImplemented:Ejt,memoized:Fue}),_o=BigInt(0),ms=BigInt(1),V2=BigInt(2),Cjt=BigInt(3),jue=BigInt(4),dKe=BigInt(5),fKe=BigInt(8);Tjt=[\\\"create\\\",\\\"isValid\\\",\\\"is0\\\",\\\"neg\\\",\\\"inv\\\",\\\"sqrt\\\",\\\"sqr\\\",\\\"eql\\\",\\\"add\\\",\\\"sub\\\",\\\"mul\\\",\\\"pow\\\",\\\"div\\\",\\\"addN\\\",\\\"subN\\\",\\\"mulN\\\",\\\"sqrN\\\"];pKe=BigInt(0),jz=BigInt(1);Tue=new WeakMap,bZe=new WeakMap;BigInt(0),BigInt(1),BigInt(2),BigInt(8);v4=BigInt(0),Rue=BigInt(1);que=BigInt(\\\"57896044618658097711785492504343953926634992332820282019728792003956564819949\\\");BigInt(0);Ujt=BigInt(1),hKe=BigInt(2),Fjt=BigInt(3),jjt=BigInt(5);BigInt(8);zue=Ljt({P:que,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:t=>{let e=que,{pow_p_5_8:r,b2:n}=Hjt(t);return Yc(Tf(r,Fjt,e)*n,e)},adjustScalarBytes:qjt,randomBytes:O4});({bytesToNumberBE:$jt,hexToBytes:Vjt}=_jt),$ue=class extends Error{constructor(e=\\\"\\\"){super(e)}},P0={Err:$ue,_tlv:{encode:(t,e)=>{let{Err:r}=P0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length&1)throw new r(\\\"tlv.encode: unpadded data\\\");let n=e.length/2,i=x4(n);if(i.length/2&128)throw new r(\\\"tlv.encode: long form length too big\\\");let s=n>127?x4(i.length/2|128):\\\"\\\";return x4(t)+s+i+e},decode(t,e){let{Err:r}=P0,n=0;if(t<0||t>256)throw new r(\\\"tlv.encode: wrong tag\\\");if(e.length<2||e[n++]!==t)throw new r(\\\"tlv.decode: wrong tlv\\\");let i=e[n++],s=!!(i&128),o=0;if(!s)o=i;else{let c=i&127;if(!c)throw new r(\\\"tlv.decode(long): indefinite length not supported\\\");if(c>4)throw new r(\\\"tlv.decode(long): byte length is too big\\\");let l=e.subarray(n,n+c);if(l.length!==c)throw new r(\\\"tlv.decode: length bytes not complete\\\");if(l[0]===0)throw new r(\\\"tlv.decode(long): zero leftmost byte\\\");for(let d of l)o=o<<8|d;if(n+=c,o<128)throw new r(\\\"tlv.decode(long): not minimal encoding\\\")}let a=e.subarray(n,n+o);if(a.length!==o)throw new r(\\\"tlv.decode: wrong value length\\\");return{v:a,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=P0;if(t<O0)throw new e(\\\"integer: negative integers are not allowed\\\");let r=x4(t);if(Number.parseInt(r[0],16)&8&&(r=\\\"00\\\"+r),r.length&1)throw new e(\\\"unexpected DER parsing assertion: unpadded hex\\\");return r},decode(t){let{Err:e}=P0;if(t[0]&128)throw new e(\\\"invalid signature integer: negative\\\");if(t[0]===0&&!(t[1]&128))throw new e(\\\"invalid signature integer: unnecessary leading zero\\\");return $jt(t)}},toSig(t){let{Err:e,_int:r,_tlv:n}=P0,i=typeof t==\\\"string\\\"?Vjt(t):t;j7(i);let{v:s,l:o}=n.decode(48,i);if(o.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");let{v:a,l:c}=n.decode(2,s),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e(\\\"invalid signature: left bytes after parsing\\\");return{r:r.decode(a),s:r.decode(l)}},hexFromSig(t){let{_tlv:e,_int:r}=P0,n=e.encode(2,r.encode(t.r)),i=e.encode(2,r.encode(t.s)),s=n+i;return e.encode(48,s)}},O0=BigInt(0),Eo=BigInt(1);BigInt(2);gKe=BigInt(3);BigInt(4);vZe=hZe(BigInt(\\\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\\\")),Jjt=vZe.create(BigInt(\\\"-3\\\")),Yjt=BigInt(\\\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\\\"),Xjt=Qjt({a:Jjt,b:Yjt,Fp:vZe,n:BigInt(\\\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\\\"),Gx:BigInt(\\\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\\\"),Gy:BigInt(\\\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\\\"),h:BigInt(1),lowS:!1},F7),yde=\\\"base10\\\",ra=\\\"base16\\\",Xc=\\\"base64pad\\\",xh=\\\"base64url\\\",B4=\\\"utf8\\\",bde=0,md=1,Q2=2,eHt=0,yKe=1,T7=12,wde=32;CZe=\\\"irn\\\";tHt=Object.defineProperty,rHt=Object.defineProperties,nHt=Object.getOwnPropertyDescriptors,bKe=Object.getOwnPropertySymbols,iHt=Object.prototype.hasOwnProperty,sHt=Object.prototype.propertyIsEnumerable,wKe=(t,e,r)=>e in t?tHt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oHt=(t,e)=>{for(var r in e||(e={}))iHt.call(e,r)&&wKe(t,r,e[r]);if(bKe)for(var r of bKe(e))sHt.call(e,r)&&wKe(t,r,e[r]);return t},aHt=(t,e)=>rHt(t,nHt(e));kZe={INVALID_METHOD:{message:\\\"Invalid method.\\\",code:1001},INVALID_EVENT:{message:\\\"Invalid event.\\\",code:1002},INVALID_UPDATE_REQUEST:{message:\\\"Invalid update request.\\\",code:1003},INVALID_EXTEND_REQUEST:{message:\\\"Invalid extend request.\\\",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:\\\"Invalid session settle request.\\\",code:1005},UNAUTHORIZED_METHOD:{message:\\\"Unauthorized method.\\\",code:3001},UNAUTHORIZED_EVENT:{message:\\\"Unauthorized event.\\\",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:\\\"Unauthorized update request.\\\",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:\\\"Unauthorized extend request.\\\",code:3004},USER_REJECTED:{message:\\\"User rejected.\\\",code:5e3},USER_REJECTED_CHAINS:{message:\\\"User rejected chains.\\\",code:5001},USER_REJECTED_METHODS:{message:\\\"User rejected methods.\\\",code:5002},USER_REJECTED_EVENTS:{message:\\\"User rejected events.\\\",code:5003},UNSUPPORTED_CHAINS:{message:\\\"Unsupported chains.\\\",code:5100},UNSUPPORTED_METHODS:{message:\\\"Unsupported methods.\\\",code:5101},UNSUPPORTED_EVENTS:{message:\\\"Unsupported events.\\\",code:5102},UNSUPPORTED_ACCOUNTS:{message:\\\"Unsupported accounts.\\\",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:\\\"Unsupported namespace key.\\\",code:5104},USER_DISCONNECTED:{message:\\\"User disconnected.\\\",code:6e3},SESSION_SETTLEMENT_FAILED:{message:\\\"Session settlement failed.\\\",code:7e3},WC_METHOD_UNSUPPORTED:{message:\\\"Unsupported wc_ method.\\\",code:10001}},BZe={NOT_INITIALIZED:{message:\\\"Not initialized.\\\",code:1},NO_MATCHING_KEY:{message:\\\"No matching key.\\\",code:2},RESTORE_WILL_OVERRIDE:{message:\\\"Restore will override.\\\",code:3},RESUBSCRIBED:{message:\\\"Resubscribed.\\\",code:4},MISSING_OR_INVALID:{message:\\\"Missing or invalid.\\\",code:5},EXPIRED:{message:\\\"Expired.\\\",code:6},UNKNOWN_TYPE:{message:\\\"Unknown type.\\\",code:7},MISMATCHED_TOPIC:{message:\\\"Mismatched topic.\\\",code:8},NON_CONFORMING_NAMESPACES:{message:\\\"Non conforming namespaces.\\\",code:9}};Pue={},M0=class{static get(e){return Pue[e]}static set(e,r){Pue[e]=r}static delete(e){delete Pue[e]}}});function VHt(t,e){if(t.length>=255)throw new TypeError(\\\"Alphabet too long\\\");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(r[o]!==255)throw new TypeError(s+\\\" is ambiguous\\\");r[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function f(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError(\\\"Expected Uint8Array\\\");if(m.length===0)return\\\"\\\";for(var g=0,w=0,v=0,b=m.length;v!==b&&m[v]===0;)v++,g++;for(var _=(b-v)*d+1>>>0,S=new Uint8Array(_);v!==b;){for(var T=m[v],N=0,O=_-1;(T!==0||N<w)&&O!==-1;O--,N++)T+=256*S[O]>>>0,S[O]=T%a>>>0,T=T/a>>>0;if(T!==0)throw new Error(\\\"Non-zero carry\\\");w=N,v++}for(var L=_-w;L!==_&&S[L]===0;)L++;for(var B=c.repeat(g);L<_;++L)B+=t.charAt(S[L]);return B}function p(m){if(typeof m!=\\\"string\\\")throw new TypeError(\\\"Expected String\\\");if(m.length===0)return new Uint8Array;var g=0;if(m[g]!==\\\" \\\"){for(var w=0,v=0;m[g]===c;)w++,g++;for(var b=(m.length-g)*l+1>>>0,_=new Uint8Array(b);m[g];){var S=r[m.charCodeAt(g)];if(S===255)return;for(var T=0,N=b-1;(S!==0||T<v)&&N!==-1;N--,T++)S+=a*_[N]>>>0,_[N]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error(\\\"Non-zero carry\\\");v=T,g++}if(m[g]!==\\\" \\\"){for(var O=b-v;O!==b&&_[O]===0;)O++;for(var L=new Uint8Array(w+(b-O)),B=w;O!==b;)L[B++]=_[O++];return L}}}function h(m){var g=p(m);if(g)return g;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:p,decode:h}}function Nqt(t){return t.reduce((e,r)=>(e+=Pqt[r],e),\\\"\\\")}function kqt(t){let e=[];for(let r of t){let n=Oqt[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}function SQe(t,e,r){e=e||[],r=r||0;for(var n=r;t>=Fqt;)e[r++]=t&255|QZe,t/=128;for(;t&Uqt;)e[r++]=t&255|QZe,t>>>=7;return e[r]=t|0,SQe.bytes=r-n+1,e}function sfe(t,n){var r=0,n=n||0,i=0,s=n,o,a=t.length;do{if(s>=a)throw sfe.bytes=0,new RangeError(\\\"Could not decode varint\\\");o=t[s++],r+=i<28?(o&JZe)<<i:(o&JZe)*Math.pow(2,i),i+=7}while(o>=Hqt);return sfe.bytes=s-n,r}function ozt(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function OQe(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}function czt(t,e=\\\"utf8\\\"){let r=azt[e];if(!r)throw new Error(`Unsupported encoding \\\"${e}\\\"`);return(e===\\\"utf8\\\"||e===\\\"utf-8\\\")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,\\\"utf8\\\"):r.decoder.decode(`${r.prefix}${t}`)}function Mzt(){}function aQe(t){if(!t||typeof t!=\\\"object\\\")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)===\\\"[object Object]\\\":!1}function cQe(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function lQe(t){return t==null?t===void 0?\\\"[object Undefined]\\\":\\\"[object Null]\\\":Object.prototype.toString.call(t)}function o$t(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function a$t(t,e,r){return W7(t,e,void 0,void 0,void 0,void 0,r)}function W7(t,e,r,n,i,s,o){let a=o(t,e,r,n,i,s);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case\\\"bigint\\\":case\\\"string\\\":case\\\"boolean\\\":case\\\"symbol\\\":case\\\"undefined\\\":return t===e;case\\\"number\\\":return t===e||Object.is(t,e);case\\\"function\\\":return t===e;case\\\"object\\\":return G7(t,e,s,o)}return G7(t,e,s,o)}function G7(t,e,r,n){if(Object.is(t,e))return!0;let i=lQe(t),s=lQe(e);if(i===uQe&&(i=Xde),s===uQe&&(s=Xde),i!==s)return!1;switch(i){case Lzt:return t.toString()===e.toString();case Uzt:{let c=t.valueOf(),l=e.valueOf();return o$t(c,l)}case Fzt:case Hzt:case jzt:return Object.is(t.valueOf(),e.valueOf());case Dzt:return t.source===e.source&&t.flags===e.flags;case Vzt:return t===e}r=r??new Map;let o=r.get(t),a=r.get(e);if(o!=null&&a!=null)return o===e;r.set(t,e),r.set(e,t);try{switch(i){case qzt:{if(t.size!==e.size)return!1;for(let[c,l]of t.entries())if(!e.has(c)||!W7(l,e.get(c),c,t,e,r,n))return!1;return!0}case zzt:{if(t.size!==e.size)return!1;let c=Array.from(t.values()),l=Array.from(e.values());for(let d=0;d<c.length;d++){let f=c[d],p=l.findIndex(h=>W7(f,h,void 0,t,e,r,n));if(p===-1)return!1;l.splice(p,1)}return!0}case $zt:case Zzt:case Qzt:case Jzt:case Yzt:case Xzt:case e$t:case t$t:case r$t:case n$t:case i$t:case s$t:{if(typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(t)!==globalThis.Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!W7(t[c],e[c],c,t,e,r,n))return!1;return!0}case Wzt:return t.byteLength!==e.byteLength?!1:G7(new Uint8Array(t),new Uint8Array(e),r,n);case Kzt:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:G7(new Uint8Array(t),new Uint8Array(e),r,n);case Gzt:return t.name===e.name&&t.message===e.message;case Xde:{if(!(G7(t.constructor,e.constructor,r,n)||aQe(t)&&aQe(e)))return!1;let c=[...Object.keys(t),...cQe(t)],l=[...Object.keys(e),...cQe(e)];if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++){let f=c[d],p=t[f];if(!Object.hasOwn(e,f))return!1;let h=e[f];if(!W7(p,h,f,t,e,r,n))return!1}return!0}default:return!1}}finally{r.delete(t),r.delete(e)}}function c$t(t,e){return a$t(t,e,Mzt)}var D0,et,yQe,bQe,wQe,v$,Ch,fHt,pHt,hHt,GZe,mHt,gHt,yHt,bHt,wHt,KZe,vHt,Pfe,xHt,vQe,EHt,Js,_Ht,gd,CHt,efe,Dn,w$,SHt,AHt,ZZe,Ql,THt,IHt,I0n,RHt,PHt,z7,V1,Rf,OHt,NHt,kHt,Jl,BHt,MHt,DHt,xQe,F4,LHt,UHt,FHt,jHt,Of,_h,yd,W1,G1,j4,HHt,qHt,zHt,$Ht,WHt,GHt,EQe,KHt,ZHt,tfe,rfe,nfe,_Qe,ife,x$,K7,QHt,JHt,oa,YHt,XHt,eqt,tqt,rqt,nqt,iqt,sqt,oqt,aqt,cqt,lqt,uqt,dqt,fqt,pqt,hqt,mqt,gqt,yqt,bqt,wqt,vqt,xqt,Eqt,_qt,Cqt,Sqt,Aqt,Tqt,Iqt,Rqt,CQe,Pqt,Oqt,Bqt,Mqt,Dqt,QZe,Lqt,Uqt,Fqt,jqt,Hqt,JZe,qqt,zqt,$qt,Vqt,Wqt,Gqt,Kqt,Zqt,Qqt,Jqt,Yqt,AQe,YZe,XZe,ofe,afe,TQe,cfe,IQe,Xqt,ezt,tzt,RQe,rzt,PQe,nzt,izt,szt,eQe,tQe,Qde,azt,lzt,uzt,Eh,lfe,dzt,fzt,ia,ufe,pzt,hzt,mzt,rQe,gzt,yzt,dfe,bzt,wzt,Zl,ffe,vzt,xzt,Ezt,nQe,_zt,Czt,pfe,b$,Jde,Pf,hfe,Szt,Azt,U4,mfe,Tzt,Izt,Rzt,iQe,Pzt,Ozt,gfe,$7,Yde,gn,yfe,Nzt,sQe,kzt,Bzt,bfe,oQe,kr,wfe,Dzt,Lzt,Uzt,Fzt,uQe,jzt,Hzt,qzt,zzt,$zt,Vzt,Wzt,Xde,Gzt,Kzt,Zzt,Qzt,Jzt,Yzt,Xzt,e$t,t$t,r$t,n$t,i$t,s$t,l$t,dQe,u$t,d$t,vfe,fQe,el,Sh,f$t,p$t,or,xfe,h$t,m$t,sa,Efe,g$t,y$t,Oa,_fe,b$t,w$t,Ms,Cfe,v$t,x$t,pQe,Sfe,E$t,hQe,_$t,C$t,Afe,V7,Co,Tfe,S$t,mQe,A$t,T$t,Ife,gQe,Mn,Rfe,NQe,kQe=x(()=>{u();D0=Me(ho());pce();bce();C1();wue();et=Me(u0());f1();g2();g2();y$();B9();l7();oh();Mce();yQe=Me(gC()),bQe=\\\"wc\\\",wQe=2,v$=\\\"core\\\",Ch=`${bQe}@2:${v$}:`,fHt={name:v$,logger:\\\"error\\\"},pHt={database:\\\":memory:\\\"},hHt=\\\"crypto\\\",GZe=\\\"client_ed25519_seed\\\",mHt=et.ONE_DAY,gHt=\\\"keychain\\\",yHt=\\\"0.3\\\",bHt=\\\"messages\\\",wHt=\\\"0.3\\\",KZe=et.SIX_HOURS,vHt=\\\"publisher\\\",Pfe=\\\"irn\\\",xHt=\\\"error\\\",vQe=\\\"wss://relay.walletconnect.org\\\",EHt=\\\"relayer\\\",Js={message:\\\"relayer_message\\\",message_ack:\\\"relayer_message_ack\\\",connect:\\\"relayer_connect\\\",disconnect:\\\"relayer_disconnect\\\",error:\\\"relayer_error\\\",connection_stalled:\\\"relayer_connection_stalled\\\",transport_closed:\\\"relayer_transport_closed\\\",publish:\\\"relayer_publish\\\"},_Ht=\\\"_subscription\\\",gd={payload:\\\"payload\\\",connect:\\\"connect\\\",disconnect:\\\"disconnect\\\",error:\\\"error\\\"},CHt=.1,efe=\\\"2.21.0\\\",Dn={link_mode:\\\"link_mode\\\",relay:\\\"relay\\\"},w$={inbound:\\\"inbound\\\",outbound:\\\"outbound\\\"},SHt=\\\"0.3\\\",AHt=\\\"WALLETCONNECT_CLIENT_ID\\\",ZZe=\\\"WALLETCONNECT_LINK_MODE_APPS\\\",Ql={created:\\\"subscription_created\\\",deleted:\\\"subscription_deleted\\\",expired:\\\"subscription_expired\\\",disabled:\\\"subscription_disabled\\\",sync:\\\"subscription_sync\\\",resubscribed:\\\"subscription_resubscribed\\\"},THt=\\\"subscription\\\",IHt=\\\"0.3\\\",I0n=et.FIVE_SECONDS*1e3,RHt=\\\"pairing\\\",PHt=\\\"0.3\\\",z7={wc_pairingDelete:{req:{ttl:et.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:et.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:et.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:et.ONE_DAY,prompt:!1,tag:0},res:{ttl:et.ONE_DAY,prompt:!1,tag:0}}},V1={create:\\\"pairing_create\\\",expire:\\\"pairing_expire\\\",delete:\\\"pairing_delete\\\",ping:\\\"pairing_ping\\\"},Rf={created:\\\"history_created\\\",updated:\\\"history_updated\\\",deleted:\\\"history_deleted\\\",sync:\\\"history_sync\\\"},OHt=\\\"history\\\",NHt=\\\"0.3\\\",kHt=\\\"expirer\\\",Jl={created:\\\"expirer_created\\\",deleted:\\\"expirer_deleted\\\",expired:\\\"expirer_expired\\\",sync:\\\"expirer_sync\\\"},BHt=\\\"0.3\\\",MHt=\\\"verify-api\\\",DHt=\\\"https://verify.walletconnect.com\\\",xQe=\\\"https://verify.walletconnect.org\\\",F4=xQe,LHt=`${F4}/v3`,UHt=[DHt,xQe],FHt=\\\"echo\\\",jHt=\\\"https://echo.walletconnect.com\\\",Of={pairing_started:\\\"pairing_started\\\",pairing_uri_validation_success:\\\"pairing_uri_validation_success\\\",pairing_uri_not_expired:\\\"pairing_uri_not_expired\\\",store_new_pairing:\\\"store_new_pairing\\\",subscribing_pairing_topic:\\\"subscribing_pairing_topic\\\",subscribe_pairing_topic_success:\\\"subscribe_pairing_topic_success\\\",existing_pairing:\\\"existing_pairing\\\",pairing_not_expired:\\\"pairing_not_expired\\\",emit_inactive_pairing:\\\"emit_inactive_pairing\\\",emit_session_proposal:\\\"emit_session_proposal\\\",subscribing_to_pairing_topic:\\\"subscribing_to_pairing_topic\\\"},_h={no_wss_connection:\\\"no_wss_connection\\\",no_internet_connection:\\\"no_internet_connection\\\",malformed_pairing_uri:\\\"malformed_pairing_uri\\\",active_pairing_already_exists:\\\"active_pairing_already_exists\\\",subscribe_pairing_topic_failure:\\\"subscribe_pairing_topic_failure\\\",pairing_expired:\\\"pairing_expired\\\",proposal_expired:\\\"proposal_expired\\\",proposal_listener_not_found:\\\"proposal_listener_not_found\\\"},yd={session_approve_started:\\\"session_approve_started\\\",proposal_not_expired:\\\"proposal_not_expired\\\",session_namespaces_validation_success:\\\"session_namespaces_validation_success\\\",create_session_topic:\\\"create_session_topic\\\",subscribing_session_topic:\\\"subscribing_session_topic\\\",subscribe_session_topic_success:\\\"subscribe_session_topic_success\\\",publishing_session_approve:\\\"publishing_session_approve\\\",session_approve_publish_success:\\\"session_approve_publish_success\\\",store_session:\\\"store_session\\\",publishing_session_settle:\\\"publishing_session_settle\\\",session_settle_publish_success:\\\"session_settle_publish_success\\\"},W1={no_internet_connection:\\\"no_internet_connection\\\",no_wss_connection:\\\"no_wss_connection\\\",proposal_expired:\\\"proposal_expired\\\",subscribe_session_topic_failure:\\\"subscribe_session_topic_failure\\\",session_approve_publish_failure:\\\"session_approve_publish_failure\\\",session_settle_publish_failure:\\\"session_settle_publish_failure\\\",session_approve_namespace_validation_failure:\\\"session_approve_namespace_validation_failure\\\",proposal_not_found:\\\"proposal_not_found\\\"},G1={authenticated_session_approve_started:\\\"authenticated_session_approve_started\\\",authenticated_session_not_expired:\\\"authenticated_session_not_expired\\\",chains_caip2_compliant:\\\"chains_caip2_compliant\\\",chains_evm_compliant:\\\"chains_evm_compliant\\\",create_authenticated_session_topic:\\\"create_authenticated_session_topic\\\",cacaos_verified:\\\"cacaos_verified\\\",store_authenticated_session:\\\"store_authenticated_session\\\",subscribing_authenticated_session_topic:\\\"subscribing_authenticated_session_topic\\\",subscribe_authenticated_session_topic_success:\\\"subscribe_authenticated_session_topic_success\\\",publishing_authenticated_session_approve:\\\"publishing_authenticated_session_approve\\\",authenticated_session_approve_publish_success:\\\"authenticated_session_approve_publish_success\\\"},j4={no_internet_connection:\\\"no_internet_connection\\\",no_wss_connection:\\\"no_wss_connection\\\",missing_session_authenticate_request:\\\"missing_session_authenticate_request\\\",session_authenticate_request_expired:\\\"session_authenticate_request_expired\\\",chains_caip2_compliant_failure:\\\"chains_caip2_compliant_failure\\\",chains_evm_compliant_failure:\\\"chains_evm_compliant_failure\\\",invalid_cacao:\\\"invalid_cacao\\\",subscribe_authenticated_session_topic_failure:\\\"subscribe_authenticated_session_topic_failure\\\",authenticated_session_approve_publish_failure:\\\"authenticated_session_approve_publish_failure\\\",authenticated_session_pending_request_not_found:\\\"authenticated_session_pending_request_not_found\\\"},HHt=.1,qHt=\\\"event-client\\\",zHt=86400,$Ht=\\\"https://pulse.walletconnect.org/batch\\\";WHt=VHt,GHt=WHt,EQe=t=>{if(t instanceof Uint8Array&&t.constructor.name===\\\"Uint8Array\\\")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error(\\\"Unknown type, must be binary type\\\")},KHt=t=>new TextEncoder().encode(t),ZHt=t=>new TextDecoder().decode(t),tfe=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error(\\\"Unknown type, must be binary type\\\")}},rfe=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error(\\\"Invalid prefix character\\\");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e==\\\"string\\\"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error(\\\"Can only multibase decode strings\\\")}or(e){return _Qe(this,e)}},nfe=class{constructor(e){this.decoders=e}or(e){return _Qe(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},_Qe=(t,e)=>new nfe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),ife=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new tfe(e,r,n),this.decoder=new rfe(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},x$=({name:t,prefix:e,encode:r,decode:n})=>new ife(t,e,r,n),K7=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=GHt(r,e);return x$({prefix:t,name:e,encode:n,decode:s=>EQe(i(s))})},QHt=(t,e,r,n)=>{let i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let s=t.length;for(;t[s-1]===\\\"=\\\";)--s;let o=new Uint8Array(s*r/8|0),a=0,c=0,l=0;for(let d=0;d<s;++d){let f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|f,a+=r,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError(\\\"Unexpected end of data\\\");return o},JHt=(t,e,r)=>{let n=e[e.length-1]===\\\"=\\\",i=(1<<r)-1,s=\\\"\\\",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+=\\\"=\\\";return s},oa=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>x$({prefix:e,name:t,encode(i){return JHt(i,n,r)},decode(i){return QHt(i,n,r,t)}}),YHt=x$({prefix:\\\"\\\\0\\\",name:\\\"identity\\\",encode:t=>ZHt(t),decode:t=>KHt(t)}),XHt=Object.freeze({__proto__:null,identity:YHt}),eqt=oa({prefix:\\\"0\\\",name:\\\"base2\\\",alphabet:\\\"01\\\",bitsPerChar:1}),tqt=Object.freeze({__proto__:null,base2:eqt}),rqt=oa({prefix:\\\"7\\\",name:\\\"base8\\\",alphabet:\\\"01234567\\\",bitsPerChar:3}),nqt=Object.freeze({__proto__:null,base8:rqt}),iqt=K7({prefix:\\\"9\\\",name:\\\"base10\\\",alphabet:\\\"0123456789\\\"}),sqt=Object.freeze({__proto__:null,base10:iqt}),oqt=oa({prefix:\\\"f\\\",name:\\\"base16\\\",alphabet:\\\"0123456789abcdef\\\",bitsPerChar:4}),aqt=oa({prefix:\\\"F\\\",name:\\\"base16upper\\\",alphabet:\\\"0123456789ABCDEF\\\",bitsPerChar:4}),cqt=Object.freeze({__proto__:null,base16:oqt,base16upper:aqt}),lqt=oa({prefix:\\\"b\\\",name:\\\"base32\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567\\\",bitsPerChar:5}),uqt=oa({prefix:\\\"B\\\",name:\\\"base32upper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\\\",bitsPerChar:5}),dqt=oa({prefix:\\\"c\\\",name:\\\"base32pad\\\",alphabet:\\\"abcdefghijklmnopqrstuvwxyz234567=\\\",bitsPerChar:5}),fqt=oa({prefix:\\\"C\\\",name:\\\"base32padupper\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=\\\",bitsPerChar:5}),pqt=oa({prefix:\\\"v\\\",name:\\\"base32hex\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv\\\",bitsPerChar:5}),hqt=oa({prefix:\\\"V\\\",name:\\\"base32hexupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV\\\",bitsPerChar:5}),mqt=oa({prefix:\\\"t\\\",name:\\\"base32hexpad\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuv=\\\",bitsPerChar:5}),gqt=oa({prefix:\\\"T\\\",name:\\\"base32hexpadupper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUV=\\\",bitsPerChar:5}),yqt=oa({prefix:\\\"h\\\",name:\\\"base32z\\\",alphabet:\\\"ybndrfg8ejkmcpqxot1uwisza345h769\\\",bitsPerChar:5}),bqt=Object.freeze({__proto__:null,base32:lqt,base32upper:uqt,base32pad:dqt,base32padupper:fqt,base32hex:pqt,base32hexupper:hqt,base32hexpad:mqt,base32hexpadupper:gqt,base32z:yqt}),wqt=K7({prefix:\\\"k\\\",name:\\\"base36\\\",alphabet:\\\"0123456789abcdefghijklmnopqrstuvwxyz\\\"}),vqt=K7({prefix:\\\"K\\\",name:\\\"base36upper\\\",alphabet:\\\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\\\"}),xqt=Object.freeze({__proto__:null,base36:wqt,base36upper:vqt}),Eqt=K7({name:\\\"base58btc\\\",prefix:\\\"z\\\",alphabet:\\\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\\\"}),_qt=K7({name:\\\"base58flickr\\\",prefix:\\\"Z\\\",alphabet:\\\"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\\\"}),Cqt=Object.freeze({__proto__:null,base58btc:Eqt,base58flickr:_qt}),Sqt=oa({prefix:\\\"m\\\",name:\\\"base64\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\",bitsPerChar:6}),Aqt=oa({prefix:\\\"M\\\",name:\\\"base64pad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\",bitsPerChar:6}),Tqt=oa({prefix:\\\"u\\\",name:\\\"base64url\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\\\",bitsPerChar:6}),Iqt=oa({prefix:\\\"U\\\",name:\\\"base64urlpad\\\",alphabet:\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=\\\",bitsPerChar:6}),Rqt=Object.freeze({__proto__:null,base64:Sqt,base64pad:Aqt,base64url:Tqt,base64urlpad:Iqt}),CQe=Array.from(\\\"\\\\u{1F680}\\\\u{1FA90}\\\\u2604\\\\u{1F6F0}\\\\u{1F30C}\\\\u{1F311}\\\\u{1F312}\\\\u{1F313}\\\\u{1F314}\\\\u{1F315}\\\\u{1F316}\\\\u{1F317}\\\\u{1F318}\\\\u{1F30D}\\\\u{1F30F}\\\\u{1F30E}\\\\u{1F409}\\\\u2600\\\\u{1F4BB}\\\\u{1F5A5}\\\\u{1F4BE}\\\\u{1F4BF}\\\\u{1F602}\\\\u2764\\\\u{1F60D}\\\\u{1F923}\\\\u{1F60A}\\\\u{1F64F}\\\\u{1F495}\\\\u{1F62D}\\\\u{1F618}\\\\u{1F44D}\\\\u{1F605}\\\\u{1F44F}\\\\u{1F601}\\\\u{1F525}\\\\u{1F970}\\\\u{1F494}\\\\u{1F496}\\\\u{1F499}\\\\u{1F622}\\\\u{1F914}\\\\u{1F606}\\\\u{1F644}\\\\u{1F4AA}\\\\u{1F609}\\\\u263A\\\\u{1F44C}\\\\u{1F917}\\\\u{1F49C}\\\\u{1F614}\\\\u{1F60E}\\\\u{1F607}\\\\u{1F339}\\\\u{1F926}\\\\u{1F389}\\\\u{1F49E}\\\\u270C\\\\u2728\\\\u{1F937}\\\\u{1F631}\\\\u{1F60C}\\\\u{1F338}\\\\u{1F64C}\\\\u{1F60B}\\\\u{1F497}\\\\u{1F49A}\\\\u{1F60F}\\\\u{1F49B}\\\\u{1F642}\\\\u{1F493}\\\\u{1F929}\\\\u{1F604}\\\\u{1F600}\\\\u{1F5A4}\\\\u{1F603}\\\\u{1F4AF}\\\\u{1F648}\\\\u{1F447}\\\\u{1F3B6}\\\\u{1F612}\\\\u{1F92D}\\\\u2763\\\\u{1F61C}\\\\u{1F48B}\\\\u{1F440}\\\\u{1F62A}\\\\u{1F611}\\\\u{1F4A5}\\\\u{1F64B}\\\\u{1F61E}\\\\u{1F629}\\\\u{1F621}\\\\u{1F92A}\\\\u{1F44A}\\\\u{1F973}\\\\u{1F625}\\\\u{1F924}\\\\u{1F449}\\\\u{1F483}\\\\u{1F633}\\\\u270B\\\\u{1F61A}\\\\u{1F61D}\\\\u{1F634}\\\\u{1F31F}\\\\u{1F62C}\\\\u{1F643}\\\\u{1F340}\\\\u{1F337}\\\\u{1F63B}\\\\u{1F613}\\\\u2B50\\\\u2705\\\\u{1F97A}\\\\u{1F308}\\\\u{1F608}\\\\u{1F918}\\\\u{1F4A6}\\\\u2714\\\\u{1F623}\\\\u{1F3C3}\\\\u{1F490}\\\\u2639\\\\u{1F38A}\\\\u{1F498}\\\\u{1F620}\\\\u261D\\\\u{1F615}\\\\u{1F33A}\\\\u{1F382}\\\\u{1F33B}\\\\u{1F610}\\\\u{1F595}\\\\u{1F49D}\\\\u{1F64A}\\\\u{1F639}\\\\u{1F5E3}\\\\u{1F4AB}\\\\u{1F480}\\\\u{1F451}\\\\u{1F3B5}\\\\u{1F91E}\\\\u{1F61B}\\\\u{1F534}\\\\u{1F624}\\\\u{1F33C}\\\\u{1F62B}\\\\u26BD\\\\u{1F919}\\\\u2615\\\\u{1F3C6}\\\\u{1F92B}\\\\u{1F448}\\\\u{1F62E}\\\\u{1F646}\\\\u{1F37B}\\\\u{1F343}\\\\u{1F436}\\\\u{1F481}\\\\u{1F632}\\\\u{1F33F}\\\\u{1F9E1}\\\\u{1F381}\\\\u26A1\\\\u{1F31E}\\\\u{1F388}\\\\u274C\\\\u270A\\\\u{1F44B}\\\\u{1F630}\\\\u{1F928}\\\\u{1F636}\\\\u{1F91D}\\\\u{1F6B6}\\\\u{1F4B0}\\\\u{1F353}\\\\u{1F4A2}\\\\u{1F91F}\\\\u{1F641}\\\\u{1F6A8}\\\\u{1F4A8}\\\\u{1F92C}\\\\u2708\\\\u{1F380}\\\\u{1F37A}\\\\u{1F913}\\\\u{1F619}\\\\u{1F49F}\\\\u{1F331}\\\\u{1F616}\\\\u{1F476}\\\\u{1F974}\\\\u25B6\\\\u27A1\\\\u2753\\\\u{1F48E}\\\\u{1F4B8}\\\\u2B07\\\\u{1F628}\\\\u{1F31A}\\\\u{1F98B}\\\\u{1F637}\\\\u{1F57A}\\\\u26A0\\\\u{1F645}\\\\u{1F61F}\\\\u{1F635}\\\\u{1F44E}\\\\u{1F932}\\\\u{1F920}\\\\u{1F927}\\\\u{1F4CC}\\\\u{1F535}\\\\u{1F485}\\\\u{1F9D0}\\\\u{1F43E}\\\\u{1F352}\\\\u{1F617}\\\\u{1F911}\\\\u{1F30A}\\\\u{1F92F}\\\\u{1F437}\\\\u260E\\\\u{1F4A7}\\\\u{1F62F}\\\\u{1F486}\\\\u{1F446}\\\\u{1F3A4}\\\\u{1F647}\\\\u{1F351}\\\\u2744\\\\u{1F334}\\\\u{1F4A3}\\\\u{1F438}\\\\u{1F48C}\\\\u{1F4CD}\\\\u{1F940}\\\\u{1F922}\\\\u{1F445}\\\\u{1F4A1}\\\\u{1F4A9}\\\\u{1F450}\\\\u{1F4F8}\\\\u{1F47B}\\\\u{1F910}\\\\u{1F92E}\\\\u{1F3BC}\\\\u{1F975}\\\\u{1F6A9}\\\\u{1F34E}\\\\u{1F34A}\\\\u{1F47C}\\\\u{1F48D}\\\\u{1F4E3}\\\\u{1F942}\\\"),Pqt=CQe.reduce((t,e,r)=>(t[r]=e,t),[]),Oqt=CQe.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);Bqt=x$({prefix:\\\"\\\\u{1F680}\\\",name:\\\"base256emoji\\\",encode:Nqt,decode:kqt}),Mqt=Object.freeze({__proto__:null,base256emoji:Bqt}),Dqt=SQe,QZe=128,Lqt=127,Uqt=~Lqt,Fqt=Math.pow(2,31);jqt=sfe,Hqt=128,JZe=127;qqt=Math.pow(2,7),zqt=Math.pow(2,14),$qt=Math.pow(2,21),Vqt=Math.pow(2,28),Wqt=Math.pow(2,35),Gqt=Math.pow(2,42),Kqt=Math.pow(2,49),Zqt=Math.pow(2,56),Qqt=Math.pow(2,63),Jqt=function(t){return t<qqt?1:t<zqt?2:t<$qt?3:t<Vqt?4:t<Wqt?5:t<Gqt?6:t<Kqt?7:t<Zqt?8:t<Qqt?9:10},Yqt={encode:Dqt,decode:jqt,encodingLength:Jqt},AQe=Yqt,YZe=(t,e,r=0)=>(AQe.encode(t,e,r),e),XZe=t=>AQe.encodingLength(t),ofe=(t,e)=>{let r=e.byteLength,n=XZe(t),i=n+XZe(r),s=new Uint8Array(i+r);return YZe(t,s,0),YZe(r,s,n),s.set(e,i),new afe(t,r,e,s)},afe=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}},TQe=({name:t,code:e,encode:r})=>new cfe(t,e,r),cfe=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?ofe(this.code,r):r.then(n=>ofe(this.code,n))}else throw Error(\\\"Unknown type, must be binary type\\\")}},IQe=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Xqt=TQe({name:\\\"sha2-256\\\",code:18,encode:IQe(\\\"SHA-256\\\")}),ezt=TQe({name:\\\"sha2-512\\\",code:19,encode:IQe(\\\"SHA-512\\\")}),tzt=Object.freeze({__proto__:null,sha256:Xqt,sha512:ezt}),RQe=0,rzt=\\\"identity\\\",PQe=EQe,nzt=t=>ofe(RQe,PQe(t)),izt={code:RQe,name:rzt,encode:PQe,digest:nzt},szt=Object.freeze({__proto__:null,identity:izt});new TextEncoder,new TextDecoder;eQe={...XHt,...tqt,...nqt,...sqt,...cqt,...bqt,...xqt,...Cqt,...Rqt,...Mqt};({...tzt,...szt});tQe=OQe(\\\"utf8\\\",\\\"u\\\",t=>\\\"u\\\"+new TextDecoder(\\\"utf8\\\").decode(t),t=>new TextEncoder().encode(t.substring(1))),Qde=OQe(\\\"ascii\\\",\\\"a\\\",t=>{let e=\\\"a\\\";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);let e=ozt(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),azt={utf8:tQe,\\\"utf-8\\\":tQe,hex:eQe.base16,latin1:Qde,ascii:Qde,binary:Qde,...eQe};lzt=Object.defineProperty,uzt=(t,e,r)=>e in t?lzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Eh=(t,e,r)=>uzt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),lfe=class{constructor(e,r){this.core=e,this.logger=r,Eh(this,\\\"keychain\\\",new Map),Eh(this,\\\"name\\\",gHt),Eh(this,\\\"version\\\",yHt),Eh(this,\\\"initialized\\\",!1),Eh(this,\\\"storagePrefix\\\",Ch),Eh(this,\\\"init\\\",async()=>{if(!this.initialized){let n=await this.getKeyChain();typeof n<\\\"u\\\"&&(this.keychain=n),this.initialized=!0}}),Eh(this,\\\"has\\\",n=>(this.isInitialized(),this.keychain.has(n))),Eh(this,\\\"set\\\",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),Eh(this,\\\"get\\\",n=>{this.isInitialized();let i=this.keychain.get(n);if(typeof i>\\\"u\\\"){let{message:s}=Se(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${n}`);throw new Error(s)}return i}),Eh(this,\\\"del\\\",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,B7(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<\\\"u\\\"?M7(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},dzt=Object.defineProperty,fzt=(t,e,r)=>e in t?dzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ia=(t,e,r)=>fzt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ufe=class{constructor(e,r,n){this.core=e,this.logger=r,ia(this,\\\"name\\\",hHt),ia(this,\\\"keychain\\\"),ia(this,\\\"randomSessionIdentifier\\\",H7()),ia(this,\\\"initialized\\\",!1),ia(this,\\\"init\\\",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),ia(this,\\\"hasKeys\\\",i=>(this.isInitialized(),this.keychain.has(i))),ia(this,\\\"getClientId\\\",async()=>{this.isInitialized();let i=await this.getClientSeed(),s=vC(i);return T9(s.publicKey)}),ia(this,\\\"generateKeyPair\\\",()=>{this.isInitialized();let i=vde();return this.setPrivateKey(i.publicKey,i.privateKey)}),ia(this,\\\"signJWT\\\",async i=>{this.isInitialized();let s=await this.getClientSeed(),o=vC(s),a=this.randomSessionIdentifier;return await OH(a,i,mHt,o)}),ia(this,\\\"generateSharedKey\\\",(i,s,o)=>{this.isInitialized();let a=this.getPrivateKey(i),c=xde(a,s);return this.setSymKey(c,o)}),ia(this,\\\"setSymKey\\\",async(i,s)=>{this.isInitialized();let o=s||J2(i);return await this.keychain.set(o,i),o}),ia(this,\\\"deleteKeyPair\\\",async i=>{this.isInitialized(),await this.keychain.del(i)}),ia(this,\\\"deleteSymKey\\\",async i=>{this.isInitialized(),await this.keychain.del(i)}),ia(this,\\\"encode\\\",async(i,s,o)=>{this.isInitialized();let a=a$(o),c=Vo(s);if(l$(a))return Sde(c,o?.encoding);if(c$(a)){let p=a.senderPublicKey,h=a.receiverPublicKey;i=await this.generateSharedKey(p,h)}let l=this.getSymKey(i),{type:d,senderPublicKey:f}=a;return _de({type:d,symKey:l,message:c,senderPublicKey:f,encoding:o?.encoding})}),ia(this,\\\"decode\\\",async(i,s,o)=>{this.isInitialized();let a=Ide(s,o);if(l$(a)){let c=Ade(s,o?.encoding);return nc(c)}if(c$(a)){let c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{let c=this.getSymKey(i),l=Cde({symKey:c,encoded:s,encoding:o?.encoding});return nc(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),ia(this,\\\"getPayloadType\\\",(i,s=Xc)=>{let o=Y2({encoded:i,encoding:s});return B0(o.type)}),ia(this,\\\"getPayloadSenderPublicKey\\\",(i,s=Xc)=>{let o=Y2({encoded:i,encoding:s});return o.senderPublicKey?yr(o.senderPublicKey,ra):void 0}),this.core=e,this.logger=rr(r,this.name),this.keychain=n||new lfe(this.core,this.logger)}get context(){return Ir(this.logger)}async setPrivateKey(e,r){return await this.keychain.set(e,r),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e=\\\"\\\";try{e=this.keychain.get(GZe)}catch{e=H7(),await this.keychain.set(GZe,e)}return czt(e,\\\"base16\\\")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},pzt=Object.defineProperty,hzt=Object.defineProperties,mzt=Object.getOwnPropertyDescriptors,rQe=Object.getOwnPropertySymbols,gzt=Object.prototype.hasOwnProperty,yzt=Object.prototype.propertyIsEnumerable,dfe=(t,e,r)=>e in t?pzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,bzt=(t,e)=>{for(var r in e||(e={}))gzt.call(e,r)&&dfe(t,r,e[r]);if(rQe)for(var r of rQe(e))yzt.call(e,r)&&dfe(t,r,e[r]);return t},wzt=(t,e)=>hzt(t,mzt(e)),Zl=(t,e,r)=>dfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ffe=class extends Tz{constructor(e,r){super(e,r),this.logger=e,this.core=r,Zl(this,\\\"messages\\\",new Map),Zl(this,\\\"messagesWithoutClientAck\\\",new Map),Zl(this,\\\"name\\\",bHt),Zl(this,\\\"version\\\",wHt),Zl(this,\\\"initialized\\\",!1),Zl(this,\\\"storagePrefix\\\",Ch),Zl(this,\\\"init\\\",async()=>{if(!this.initialized){this.logger.trace(\\\"Initialized\\\");try{let n=await this.getRelayerMessages();typeof n<\\\"u\\\"&&(this.messages=n);let i=await this.getRelayerMessagesWithoutClientAck();typeof i<\\\"u\\\"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),Zl(this,\\\"set\\\",async(n,i,s)=>{this.isInitialized();let o=Kl(i),a=this.messages.get(n);if(typeof a>\\\"u\\\"&&(a={}),typeof a[o]<\\\"u\\\")return o;if(a[o]=i,this.messages.set(n,a),s===w$.inbound){let c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,wzt(bzt({},c),{[o]:i}))}return await this.persist(),o}),Zl(this,\\\"get\\\",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>\\\"u\\\"&&(i={}),i}),Zl(this,\\\"getWithoutAck\\\",n=>{this.isInitialized();let i={};for(let s of n){let o=this.messagesWithoutClientAck.get(s)||{};i[s]=Object.values(o)}return i}),Zl(this,\\\"has\\\",(n,i)=>{this.isInitialized();let s=this.get(n),o=Kl(i);return typeof s[o]<\\\"u\\\"}),Zl(this,\\\"ack\\\",async(n,i)=>{this.isInitialized();let s=this.messagesWithoutClientAck.get(n);if(typeof s>\\\"u\\\")return;let o=Kl(i);delete s[o],Object.keys(s).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,s),await this.persist()}),Zl(this,\\\"del\\\",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=rr(e,this.name),this.core=r}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name+\\\"_withoutClientAck\\\"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,B7(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,B7(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return typeof e<\\\"u\\\"?M7(e):void 0}async getRelayerMessagesWithoutClientAck(){let e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<\\\"u\\\"?M7(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},vzt=Object.defineProperty,xzt=Object.defineProperties,Ezt=Object.getOwnPropertyDescriptors,nQe=Object.getOwnPropertySymbols,_zt=Object.prototype.hasOwnProperty,Czt=Object.prototype.propertyIsEnumerable,pfe=(t,e,r)=>e in t?vzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b$=(t,e)=>{for(var r in e||(e={}))_zt.call(e,r)&&pfe(t,r,e[r]);if(nQe)for(var r of nQe(e))Czt.call(e,r)&&pfe(t,r,e[r]);return t},Jde=(t,e)=>xzt(t,Ezt(e)),Pf=(t,e,r)=>pfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),hfe=class extends Iz{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,Pf(this,\\\"events\\\",new D0.EventEmitter),Pf(this,\\\"name\\\",vHt),Pf(this,\\\"queue\\\",new Map),Pf(this,\\\"publishTimeout\\\",(0,et.toMiliseconds)(et.ONE_MINUTE)),Pf(this,\\\"initialPublishTimeout\\\",(0,et.toMiliseconds)(et.ONE_SECOND*15)),Pf(this,\\\"needsTransportRestart\\\",!1),Pf(this,\\\"publish\\\",async(n,i,s)=>{var o;this.logger.debug(\\\"Publishing Payload\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"publish\\\",params:{topic:n,message:i,opts:s}});let a=s?.ttl||KZe,c=M4(s),l=s?.prompt||!1,d=s?.tag||0,f=s?.id||Vs().toString(),p={topic:n,message:i,opts:{ttl:a,relay:c,prompt:l,tag:d,id:f,attestation:s?.attestation,tvf:s?.tvf}},h=`Failed to publish payload, please try again. id:${f} tag:${d}`;try{let m=new Promise(async g=>{let w=({id:b})=>{p.opts.id===b&&(this.removeRequestFromQueue(b),this.relayer.events.removeListener(Js.publish,w),g(p))};this.relayer.events.on(Js.publish,w);let v=vh(new Promise((b,_)=>{this.rpcPublish({topic:n,message:i,ttl:a,prompt:l,tag:d,id:f,attestation:s?.attestation,tvf:s?.tvf}).then(b).catch(S=>{this.logger.warn(S,S?.message),_(S)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${f} tag:${d}`);try{await v,this.events.removeListener(Js.publish,w)}catch(b){this.queue.set(f,Jde(b$({},p),{attempt:1})),this.logger.warn(b,b?.message)}});this.logger.trace({type:\\\"method\\\",method:\\\"publish\\\",params:{id:f,topic:n,message:i,opts:s}}),await vh(m,this.publishTimeout,h)}catch(m){if(this.logger.debug(\\\"Failed to Publish Payload\\\"),this.logger.error(m),(o=s?.internal)!=null&&o.throwOnFailedPublish)throw m}finally{this.queue.delete(f)}}),Pf(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),Pf(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),Pf(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),Pf(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=rr(r,this.name),this.registerEventListeners()}get context(){return Ir(this.logger)}async rpcPublish(e){var r,n,i,s;let{topic:o,message:a,ttl:c=KZe,prompt:l,tag:d,id:f,attestation:p,tvf:h}=e,m={method:X2(M4().protocol).publish,params:b$({topic:o,message:a,ttl:c,prompt:l,tag:d,attestation:p},h),id:f};Bs((r=m.params)==null?void 0:r.prompt)&&((n=m.params)==null||delete n.prompt),Bs((i=m.params)==null?void 0:i.tag)&&((s=m.params)==null||delete s.tag),this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"message\\\",direction:\\\"outgoing\\\",request:m});let g=await this.relayer.request(m);return this.relayer.events.emit(Js.publish,e),this.logger.debug(\\\"Successfully Published Payload\\\"),g}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,r)=>{let n=e.attempt+1;this.queue.set(r,Jde(b$({},e),{attempt:n}));let{topic:i,message:s,opts:o,attestation:a}=e;this.logger.warn({},`Publisher: queue->publishing: ${e.opts.id}, tag: ${e.opts.tag}, attempt: ${n}`),await this.rpcPublish(Jde(b$({},e),{topic:i,message:s,ttl:o.ttl,prompt:o.prompt,tag:o.tag,id:o.id,attestation:a,tvf:o.tvf})),this.logger.warn({},`Publisher: queue->published: ${e.opts.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(sc.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Js.connection_stalled);return}this.checkQueue()}),this.relayer.on(Js.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}},Szt=Object.defineProperty,Azt=(t,e,r)=>e in t?Szt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U4=(t,e,r)=>Azt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),mfe=class{constructor(){U4(this,\\\"map\\\",new Map),U4(this,\\\"set\\\",(e,r)=>{let n=this.get(e);this.exists(e,r)||this.map.set(e,[...n,r])}),U4(this,\\\"get\\\",e=>this.map.get(e)||[]),U4(this,\\\"exists\\\",(e,r)=>this.get(e).includes(r)),U4(this,\\\"delete\\\",(e,r)=>{if(typeof r>\\\"u\\\"){this.map.delete(e);return}if(!this.map.has(e))return;let n=this.get(e);if(!this.exists(e,r))return;let i=n.filter(s=>s!==r);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),U4(this,\\\"clear\\\",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}},Tzt=Object.defineProperty,Izt=Object.defineProperties,Rzt=Object.getOwnPropertyDescriptors,iQe=Object.getOwnPropertySymbols,Pzt=Object.prototype.hasOwnProperty,Ozt=Object.prototype.propertyIsEnumerable,gfe=(t,e,r)=>e in t?Tzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$7=(t,e)=>{for(var r in e||(e={}))Pzt.call(e,r)&&gfe(t,r,e[r]);if(iQe)for(var r of iQe(e))Ozt.call(e,r)&&gfe(t,r,e[r]);return t},Yde=(t,e)=>Izt(t,Rzt(e)),gn=(t,e,r)=>gfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),yfe=class extends Oz{constructor(e,r){super(e,r),this.relayer=e,this.logger=r,gn(this,\\\"subscriptions\\\",new Map),gn(this,\\\"topicMap\\\",new mfe),gn(this,\\\"events\\\",new D0.EventEmitter),gn(this,\\\"name\\\",THt),gn(this,\\\"version\\\",IHt),gn(this,\\\"pending\\\",new Map),gn(this,\\\"cached\\\",[]),gn(this,\\\"initialized\\\",!1),gn(this,\\\"storagePrefix\\\",Ch),gn(this,\\\"subscribeTimeout\\\",(0,et.toMiliseconds)(et.ONE_MINUTE)),gn(this,\\\"initialSubscribeTimeout\\\",(0,et.toMiliseconds)(et.ONE_SECOND*15)),gn(this,\\\"clientId\\\"),gn(this,\\\"batchSubscribeTopicsLimit\\\",500),gn(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),gn(this,\\\"subscribe\\\",async(n,i)=>{this.isInitialized(),this.logger.debug(\\\"Subscribing Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"subscribe\\\",params:{topic:n,opts:i}});try{let s=M4(i),o={topic:n,relay:s,transportType:i?.transportType};this.pending.set(n,o);let a=await this.rpcSubscribe(n,s,i);return typeof a==\\\"string\\\"&&(this.onSubscribe(a,o),this.logger.debug(\\\"Successfully Subscribed Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"subscribe\\\",params:{topic:n,opts:i}})),a}catch(s){throw this.logger.debug(\\\"Failed to Subscribe Topic\\\"),this.logger.error(s),s}}),gn(this,\\\"unsubscribe\\\",async(n,i)=>{this.isInitialized(),typeof i?.id<\\\"u\\\"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),gn(this,\\\"isSubscribed\\\",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),gn(this,\\\"isKnownTopic\\\",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(s=>s.topic===n))})),gn(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),gn(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),gn(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),gn(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),gn(this,\\\"start\\\",async()=>{await this.onConnect()}),gn(this,\\\"stop\\\",async()=>{await this.onDisconnect()}),gn(this,\\\"restart\\\",async()=>{await this.restore(),await this.onRestart()}),gn(this,\\\"checkPending\\\",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;let n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),gn(this,\\\"registerEventListeners\\\",()=>{this.relayer.core.heartbeat.on(sc.pulse,async()=>{await this.checkPending()}),this.events.on(Ql.created,async n=>{let i=Ql.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:\\\"event\\\",event:i,data:n}),await this.persist()}),this.events.on(Ql.deleted,async n=>{let i=Ql.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:\\\"event\\\",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=rr(r,this.name),this.clientId=\\\"\\\"}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,r){let n=!1;try{n=this.getSubscription(e).topic===r}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,r){let n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,r)))}async unsubscribeById(e,r,n){this.logger.debug(\\\"Unsubscribing Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"unsubscribe\\\",params:{topic:e,id:r,opts:n}});try{let i=M4(n);await this.restartToComplete({topic:e,id:r,relay:i}),await this.rpcUnsubscribe(e,r,i);let s=Jr(\\\"USER_DISCONNECTED\\\",`${this.name}, ${e}`);await this.onUnsubscribe(e,r,s),this.logger.debug(\\\"Successfully Unsubscribed Topic\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"unsubscribe\\\",params:{topic:e,id:r,opts:n}})}catch(i){throw this.logger.debug(\\\"Failed to Unsubscribe Topic\\\"),this.logger.error(i),i}}async rpcSubscribe(e,r,n){var i;(!n||n?.transportType===Dn.relay)&&await this.restartToComplete({topic:e,id:e,relay:r});let s={method:X2(r.protocol).subscribe,params:{topic:e}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:s});let o=(i=n?.internal)==null?void 0:i.throwOnFailedPublish;try{let a=await this.getSubscriptionId(e);if(n?.transportType===Dn.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(d=>this.logger.warn(d))},(0,et.toMiliseconds)(et.ONE_SECOND)),a;let c=new Promise(async d=>{let f=p=>{p.topic===e&&(this.events.removeListener(Ql.created,f),d(p.id))};this.events.on(Ql.created,f);try{let p=await vh(new Promise((h,m)=>{this.relayer.request(s).catch(g=>{this.logger.warn(g,g?.message),m(g)}).then(h)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(Ql.created,f),d(p)}catch{}}),l=await vh(c,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!l&&o)throw new Error(`Subscribing to ${e} failed, please try again`);return l?a:null}catch(a){if(this.logger.debug(\\\"Outgoing Relay Subscribe Payload stalled\\\"),this.relayer.events.emit(Js.connection_stalled),o)throw a}return null}async rpcBatchSubscribe(e){if(!e.length)return;let r=e[0].relay,n={method:X2(r.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:n});try{await await vh(new Promise(i=>{this.relayer.request(n).catch(s=>this.logger.warn(s)).then(i)}),this.subscribeTimeout,\\\"rpcBatchSubscribe failed, please try again\\\")}catch{this.relayer.events.emit(Js.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;let r=e[0].relay,n={method:X2(r.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:n});let i;try{i=await await vh(new Promise((s,o)=>{this.relayer.request(n).catch(a=>{this.logger.warn(a),o(a)}).then(s)}),this.subscribeTimeout,\\\"rpcBatchFetchMessages failed, please try again\\\")}catch{this.relayer.events.emit(Js.connection_stalled)}return i}rpcUnsubscribe(e,r,n){let i={method:X2(n.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug(\\\"Outgoing Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"outgoing\\\",request:i}),this.relayer.request(i)}onSubscribe(e,r){this.setSubscription(e,Yde($7({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,$7({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(e,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,e)&&this.deleteSubscription(r,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,r){this.logger.debug(\\\"Setting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"setSubscription\\\",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,$7({},r)),this.topicMap.set(r.topic,e),this.events.emit(Ql.created,r)}getSubscription(e){this.logger.debug(\\\"Getting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"getSubscription\\\",id:e});let r=this.subscriptions.get(e);if(!r){let{message:n}=Se(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw new Error(n)}return r}deleteSubscription(e,r){this.logger.debug(\\\"Deleting subscription\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"deleteSubscription\\\",id:e,reason:r});let n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Ql.deleted,Yde($7({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ql.sync)}async onRestart(){if(this.cached.length){let e=[...this.cached],r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<r;n++){let i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Ql.resubscribed)}async restore(){try{let e=await this.getRelayerSubscriptions();if(typeof e>\\\"u\\\"||!e.length)return;if(this.subscriptions.size){let{message:r}=Se(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async r=>Yde($7({},r),{id:await this.getSubscriptionId(r.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);let r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await sde((0,et.toMiliseconds)(et.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return Kl(e+await this.getClientId())}},Nzt=Object.defineProperty,sQe=Object.getOwnPropertySymbols,kzt=Object.prototype.hasOwnProperty,Bzt=Object.prototype.propertyIsEnumerable,bfe=(t,e,r)=>e in t?Nzt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oQe=(t,e)=>{for(var r in e||(e={}))kzt.call(e,r)&&bfe(t,r,e[r]);if(sQe)for(var r of sQe(e))Bzt.call(e,r)&&bfe(t,r,e[r]);return t},kr=(t,e,r)=>bfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),wfe=class extends Rz{constructor(e){super(e),kr(this,\\\"protocol\\\",\\\"wc\\\"),kr(this,\\\"version\\\",2),kr(this,\\\"core\\\"),kr(this,\\\"logger\\\"),kr(this,\\\"events\\\",new D0.EventEmitter),kr(this,\\\"provider\\\"),kr(this,\\\"messages\\\"),kr(this,\\\"subscriber\\\"),kr(this,\\\"publisher\\\"),kr(this,\\\"name\\\",EHt),kr(this,\\\"transportExplicitlyClosed\\\",!1),kr(this,\\\"initialized\\\",!1),kr(this,\\\"connectionAttemptInProgress\\\",!1),kr(this,\\\"relayUrl\\\"),kr(this,\\\"projectId\\\"),kr(this,\\\"packageName\\\"),kr(this,\\\"bundleId\\\"),kr(this,\\\"hasExperiencedNetworkDisruption\\\",!1),kr(this,\\\"pingTimeout\\\"),kr(this,\\\"heartBeatTimeout\\\",(0,et.toMiliseconds)(et.THIRTY_SECONDS+et.FIVE_SECONDS)),kr(this,\\\"reconnectTimeout\\\"),kr(this,\\\"connectPromise\\\"),kr(this,\\\"reconnectInProgress\\\",!1),kr(this,\\\"requestsInFlight\\\",[]),kr(this,\\\"connectTimeout\\\",(0,et.toMiliseconds)(et.ONE_SECOND*15)),kr(this,\\\"request\\\",async r=>{var n,i;this.logger.debug(\\\"Publishing Request Payload\\\");let s=r.id||Vs().toString();await this.toEstablishConnection();try{this.logger.trace({id:s,method:r.method,topic:(n=r.params)==null?void 0:n.topic},\\\"relayer.request - publishing...\\\");let o=`${s}:${((i=r.params)==null?void 0:i.tag)||\\\"\\\"}`;this.requestsInFlight.push(o);let a=await this.provider.request(r);return this.requestsInFlight=this.requestsInFlight.filter(c=>c!==o),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}}),kr(this,\\\"resetPingTimeout\\\",()=>{R4()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var r,n,i,s;try{this.logger.debug({},\\\"pingTimeout: Connection stalled, terminating...\\\"),(s=(i=(n=(r=this.provider)==null?void 0:r.connection)==null?void 0:n.socket)==null?void 0:i.terminate)==null||s.call(i)}catch(o){this.logger.warn(o,o?.message)}},this.heartBeatTimeout))}),kr(this,\\\"onPayloadHandler\\\",r=>{this.onProviderPayload(r),this.resetPingTimeout()}),kr(this,\\\"onConnectHandler\\\",()=>{this.logger.warn({},\\\"Relayer connected \\\\u{1F6DC}\\\"),this.startPingTimeout(),this.events.emit(Js.connect)}),kr(this,\\\"onDisconnectHandler\\\",()=>{this.logger.warn({},\\\"Relayer disconnected \\\\u{1F6D1}\\\"),this.requestsInFlight=[],this.onProviderDisconnect()}),kr(this,\\\"onProviderErrorHandler\\\",r=>{this.logger.fatal(`Fatal socket error: ${r.message}`),this.events.emit(Js.error,r),this.logger.fatal(\\\"Fatal socket error received, closing transport\\\"),this.transportClose()}),kr(this,\\\"registerProviderListeners\\\",()=>{this.provider.on(gd.payload,this.onPayloadHandler),this.provider.on(gd.connect,this.onConnectHandler),this.provider.on(gd.disconnect,this.onDisconnectHandler),this.provider.on(gd.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=typeof e.logger<\\\"u\\\"&&typeof e.logger!=\\\"string\\\"?rr(e.logger,this.name):(0,sh.default)(Ll({level:e.logger||xHt})),this.messages=new ffe(this.logger,e.core),this.subscriber=new yfe(this,this.logger),this.publisher=new hfe(this,this.logger),this.relayUrl=e?.relayUrl||vQe,this.projectId=e.projectId,Zue()?this.packageName=Vz():Que()&&(this.bundleId=Vz()),this.provider={}}async init(){if(this.logger.trace(\\\"Initialized\\\"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.subscriber.hasAnyTopics)try{await this.transportOpen()}catch(e){this.logger.warn(e,e?.message)}}get context(){return Ir(this.logger)}get connected(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,r,n;return((n=(r=(e=this.provider)==null?void 0:e.connection)==null?void 0:r.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,r,n){this.isInitialized(),await this.publisher.publish(e,r,n),await this.recordMessageEvent({topic:e,message:r,publishedAt:Date.now(),transportType:Dn.relay},w$.outbound)}async subscribe(e,r){var n,i,s;this.isInitialized(),(!(r!=null&&r.transportType)||r?.transportType===\\\"relay\\\")&&await this.toEstablishConnection();let o=typeof((n=r?.internal)==null?void 0:n.throwOnFailedPublish)>\\\"u\\\"?!0:(i=r?.internal)==null?void 0:i.throwOnFailedPublish,a=((s=this.subscriber.topicMap.get(e))==null?void 0:s[0])||\\\"\\\",c,l=d=>{d.topic===e&&(this.subscriber.off(Ql.created,l),c())};return await Promise.all([new Promise(d=>{c=d,this.subscriber.on(Ql.created,l)}),new Promise(async(d,f)=>{a=await this.subscriber.subscribe(e,oQe({internal:{throwOnFailedPublish:o}},r)).catch(p=>{o&&f(p)})||a,d()})]),a}async unsubscribe(e,r){this.isInitialized(),await this.subscriber.unsubscribe(e,r)}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await vh(this.provider.disconnect(),2e3,\\\"provider.disconnect()\\\").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.warn(\\\"Starting WS connection skipped because the client has no topics to work with.\\\");return}if(this.connectPromise?(this.logger.debug({},\\\"Waiting for existing connection attempt to resolve...\\\"),await this.connectPromise,this.logger.debug({},\\\"Existing connection attempt resolved\\\")):(this.connectPromise=new Promise(async(r,n)=>{await this.connect(e).then(r).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},\\\"Restarting transport...\\\"),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await g$())throw new Error(\\\"No internet connection detected. Please restart your network and try again.\\\")}async handleBatchMessageEvents(e){if(e?.length===0){this.logger.trace(\\\"Batch message events is empty. Ignoring...\\\");return}let r=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${r.length} message events sorted`);for(let n of r)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,\\\"Error while processing batch message event: \\\"+i?.message)}this.logger.trace(`Batch of ${r.length} message events processed`)}async onLinkMessageEvent(e,r){let{topic:n}=e;if(!r.sessionExists){let i=ns(et.FIVE_MINUTES),s={topic:n,expiry:i,relay:{protocol:\\\"irn\\\"},active:!1};await this.core.pairing.pairings.set(n,s)}this.events.emit(Js.message,e),await this.recordMessageEvent(e,w$.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let r=1;for(;r<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${r}...`),await this.createProvider(),await new Promise(async(n,i)=>{let s=()=>{i(new Error(\\\"Connection interrupted while trying to subscribe\\\"))};this.provider.once(gd.disconnect,s),await vh(new Promise((o,a)=>{this.provider.connect().then(o).catch(a)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>{i(o)}).finally(()=>{this.provider.off(gd.disconnect,s),clearTimeout(this.reconnectTimeout)}),await new Promise(async(o,a)=>{let c=()=>{a(new Error(\\\"Connection interrupted while trying to subscribe\\\"))};this.provider.once(gd.disconnect,c),await this.subscriber.start().then(o).catch(a).finally(()=>{this.provider.off(gd.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();let i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${r}`);break}await new Promise(n=>setTimeout(n,(0,et.toMiliseconds)(r*1))),r++}}startPingTimeout(){var e,r,n,i,s;if(R4())try{(r=(e=this.provider)==null?void 0:e.connection)!=null&&r.socket&&((s=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||s.on(\\\"ping\\\",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o,o?.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new O2(new QC(Yue({sdkVersion:efe,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,r){let{topic:n,message:i}=e;await this.messages.set(n,i,r)}async shouldIgnoreMessageEvent(e){let{topic:r,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(r))return this.logger.warn(`Ignoring message for unknown topic ${r}`),!0;let i=this.messages.has(r,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug(\\\"Incoming Relay Payload\\\"),this.logger.trace({type:\\\"payload\\\",direction:\\\"incoming\\\",payload:e}),yf(e)){if(!e.method.endsWith(_Ht))return;let r=e.params,{topic:n,message:i,publishedAt:s,attestation:o}=r.data,a={topic:n,message:i,publishedAt:s,transportType:Dn.relay,attestation:o};this.logger.debug(\\\"Emitting Relayer Payload\\\"),this.logger.trace(oQe({type:\\\"event\\\",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(e),await this.onMessageEvent(a)}else Fl(e)&&this.events.emit(Js.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,w$.inbound),this.events.emit(Js.message,e))}async acknowledgePayload(e){let r=gf(e.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(gd.payload,this.onPayloadHandler),this.provider.off(gd.connect,this.onConnectHandler),this.provider.off(gd.disconnect,this.onDisconnectHandler),this.provider.off(gd.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await g$();Kde(async r=>{e!==r&&(e=r,r?await this.transportOpen().catch(n=>this.logger.error(n,n?.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(sc.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&Zde())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(r){this.logger.warn(r,r?.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Js.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e?.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},(0,et.toMiliseconds)(CHt)))))}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}};Dzt=\\\"[object RegExp]\\\",Lzt=\\\"[object String]\\\",Uzt=\\\"[object Number]\\\",Fzt=\\\"[object Boolean]\\\",uQe=\\\"[object Arguments]\\\",jzt=\\\"[object Symbol]\\\",Hzt=\\\"[object Date]\\\",qzt=\\\"[object Map]\\\",zzt=\\\"[object Set]\\\",$zt=\\\"[object Array]\\\",Vzt=\\\"[object Function]\\\",Wzt=\\\"[object ArrayBuffer]\\\",Xde=\\\"[object Object]\\\",Gzt=\\\"[object Error]\\\",Kzt=\\\"[object DataView]\\\",Zzt=\\\"[object Uint8Array]\\\",Qzt=\\\"[object Uint8ClampedArray]\\\",Jzt=\\\"[object Uint16Array]\\\",Yzt=\\\"[object Uint32Array]\\\",Xzt=\\\"[object BigUint64Array]\\\",e$t=\\\"[object Int8Array]\\\",t$t=\\\"[object Int16Array]\\\",r$t=\\\"[object Int32Array]\\\",n$t=\\\"[object BigInt64Array]\\\",i$t=\\\"[object Float32Array]\\\",s$t=\\\"[object Float64Array]\\\";l$t=Object.defineProperty,dQe=Object.getOwnPropertySymbols,u$t=Object.prototype.hasOwnProperty,d$t=Object.prototype.propertyIsEnumerable,vfe=(t,e,r)=>e in t?l$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,fQe=(t,e)=>{for(var r in e||(e={}))u$t.call(e,r)&&vfe(t,r,e[r]);if(dQe)for(var r of dQe(e))d$t.call(e,r)&&vfe(t,r,e[r]);return t},el=(t,e,r)=>vfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Sh=class extends Pz{constructor(e,r,n,i=Ch,s=void 0){super(e,r,n,i),this.core=e,this.logger=r,this.name=n,el(this,\\\"map\\\",new Map),el(this,\\\"version\\\",SHt),el(this,\\\"cached\\\",[]),el(this,\\\"initialized\\\",!1),el(this,\\\"getKey\\\"),el(this,\\\"storagePrefix\\\",Ch),el(this,\\\"recentlyDeleted\\\",[]),el(this,\\\"recentlyDeletedLimit\\\",200),el(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!Bs(o)?this.map.set(this.getKey(o),o):Bde(o)?this.map.set(o.id,o):Mde(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)}),el(this,\\\"set\\\",async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug(\\\"Setting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"set\\\",key:o,value:a}),this.map.set(o,a),await this.persist())}),el(this,\\\"get\\\",o=>(this.isInitialized(),this.logger.debug(\\\"Getting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"get\\\",key:o}),this.getData(o))),el(this,\\\"getAll\\\",o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>c$t(a[c],o[c]))):this.values)),el(this,\\\"update\\\",async(o,a)=>{this.isInitialized(),this.logger.debug(\\\"Updating value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"update\\\",key:o,update:a});let c=fQe(fQe({},this.getData(o)),a);this.map.set(o,c),await this.persist()}),el(this,\\\"delete\\\",async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug(\\\"Deleting value\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"delete\\\",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())}),this.logger=rr(r,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}let{message:n}=Se(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>\\\"u\\\"||!e.length)return;if(this.map.size){let{message:r}=Se(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},f$t=Object.defineProperty,p$t=(t,e,r)=>e in t?f$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,or=(t,e,r)=>p$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),xfe=class{constructor(e,r){this.core=e,this.logger=r,or(this,\\\"name\\\",RHt),or(this,\\\"version\\\",PHt),or(this,\\\"events\\\",new D0.default),or(this,\\\"pairings\\\"),or(this,\\\"initialized\\\",!1),or(this,\\\"storagePrefix\\\",Ch),or(this,\\\"ignoredPayloadTypes\\\",[md]),or(this,\\\"registeredMethods\\\",[]),or(this,\\\"init\\\",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace(\\\"Initialized\\\"))}),or(this,\\\"register\\\",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),or(this,\\\"create\\\",async n=>{this.isInitialized();let i=H7(),s=await this.core.crypto.setSymKey(i),o=ns(et.FIVE_MINUTES),a={protocol:Pfe},c={topic:s,expiry:o,relay:a,active:!1,methods:n?.methods},l=d$({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:n?.methods});return this.events.emit(V1.create,c),this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s,{transportType:n?.transportType}),{topic:s,uri:l}}),or(this,\\\"pair\\\",async n=>{this.isInitialized();let i=this.core.eventClient.createEvent({properties:{topic:n?.uri,trace:[Of.pairing_started]}});this.isValidPair(n,i);let{topic:s,symKey:o,relay:a,expiryTimestamp:c,methods:l}=u$(n.uri);i.props.properties.topic=s,i.addTrace(Of.pairing_uri_validation_success),i.addTrace(Of.pairing_uri_not_expired);let d;if(this.pairings.keys.includes(s)){if(d=this.pairings.get(s),i.addTrace(Of.existing_pairing),d.active)throw i.setError(_h.active_pairing_already_exists),new Error(`Pairing already exists: ${s}. Please try again with a new connection URI.`);i.addTrace(Of.pairing_not_expired)}let f=c||ns(et.FIVE_MINUTES),p={topic:s,relay:a,expiry:f,active:!1,methods:l};this.core.expirer.set(s,f),await this.pairings.set(s,p),i.addTrace(Of.store_new_pairing),n.activatePairing&&await this.activate({topic:s}),this.events.emit(V1.create,p),i.addTrace(Of.emit_inactive_pairing),this.core.crypto.keychain.has(s)||await this.core.crypto.setSymKey(o,s),i.addTrace(Of.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(_h.no_internet_connection)}try{await this.core.relayer.subscribe(s,{relay:a})}catch(h){throw i.setError(_h.subscribe_pairing_topic_failure),h}return i.addTrace(Of.subscribe_pairing_topic_success),p}),or(this,\\\"activate\\\",async({topic:n})=>{this.isInitialized();let i=ns(et.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),or(this,\\\"ping\\\",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn(\\\"ping() is deprecated and will be removed in the next major release.\\\");let{topic:i}=n;if(this.pairings.keys.includes(i)){let s=await this.sendRequest(i,\\\"wc_pairingPing\\\",{}),{done:o,resolve:a,reject:c}=wh();this.events.once(xr(\\\"pairing_ping\\\",s),({error:l})=>{l?c(l):a()}),await o()}}),or(this,\\\"updateExpiry\\\",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),or(this,\\\"updateMetadata\\\",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),or(this,\\\"getPairings\\\",()=>(this.isInitialized(),this.pairings.values)),or(this,\\\"disconnect\\\",async n=>{this.isInitialized(),await this.isValidDisconnect(n);let{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,\\\"wc_pairingDelete\\\",Jr(\\\"USER_DISCONNECTED\\\")),await this.deletePairing(i))}),or(this,\\\"formatUriFromPairing\\\",n=>{this.isInitialized();let{topic:i,relay:s,expiry:o,methods:a}=n,c=this.core.crypto.keychain.get(i);return d$({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:s,expiryTimestamp:o,methods:a})}),or(this,\\\"sendRequest\\\",async(n,i,s)=>{let o=Ws(i,s),a=await this.core.crypto.encode(n,o),c=z7[i].req;return this.core.history.set(n,o),this.core.relayer.publish(n,a,c),o.id}),or(this,\\\"sendResult\\\",async(n,i,s)=>{let o=gf(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=z7[c].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),or(this,\\\"sendError\\\",async(n,i,s)=>{let o=Ul(n,s),a=await this.core.crypto.encode(i,o),c=(await this.core.history.get(i,n)).request.method,l=z7[c]?z7[c].res:z7.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)}),or(this,\\\"deletePairing\\\",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Jr(\\\"USER_DISCONNECTED\\\")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),or(this,\\\"cleanup\\\",async()=>{let n=this.pairings.getAll().filter(i=>If(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),or(this,\\\"onRelayEventRequest\\\",async n=>{let{topic:i,payload:s}=n;switch(s.method){case\\\"wc_pairingPing\\\":return await this.onPairingPingRequest(i,s);case\\\"wc_pairingDelete\\\":return await this.onPairingDeleteRequest(i,s);default:return await this.onUnknownRpcMethodRequest(i,s)}}),or(this,\\\"onRelayEventResponse\\\",async n=>{let{topic:i,payload:s}=n,o=(await this.core.history.get(i,s.id)).request.method;return o===\\\"wc_pairingPing\\\"?this.onPairingPingResponse(i,s):this.onUnknownRpcMethodResponse(o)}),or(this,\\\"onPairingPingRequest\\\",async(n,i)=>{let{id:s}=i;try{this.isValidPing({topic:n}),await this.sendResult(s,n,!0),this.events.emit(V1.ping,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),or(this,\\\"onPairingPingResponse\\\",(n,i)=>{let{id:s}=i;setTimeout(()=>{Ii(i)?this.events.emit(xr(\\\"pairing_ping\\\",s),{}):nn(i)&&this.events.emit(xr(\\\"pairing_ping\\\",s),{error:i.error})},500)}),or(this,\\\"onPairingDeleteRequest\\\",async(n,i)=>{let{id:s}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(V1.delete,{id:s,topic:n})}catch(o){await this.sendError(s,n,o),this.logger.error(o)}}),or(this,\\\"onUnknownRpcMethodRequest\\\",async(n,i)=>{let{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;let a=Jr(\\\"WC_METHOD_UNSUPPORTED\\\",o);await this.sendError(s,n,a),this.logger.error(a)}catch(a){await this.sendError(s,n,a),this.logger.error(a)}}),or(this,\\\"onUnknownRpcMethodResponse\\\",n=>{this.registeredMethods.includes(n)||this.logger.error(Jr(\\\"WC_METHOD_UNSUPPORTED\\\",n))}),or(this,\\\"isValidPair\\\",(n,i)=>{var s;if(!na(n)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`pair() params: ${n}`);throw i.setError(_h.malformed_pairing_uri),new Error(a)}if(!kde(n.uri)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`pair() uri: ${n.uri}`);throw i.setError(_h.malformed_pairing_uri),new Error(a)}let o=u$(n?.uri);if(!((s=o?.relay)!=null&&s.protocol)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",\\\"pair() uri#relay-protocol\\\");throw i.setError(_h.malformed_pairing_uri),new Error(a)}if(!(o!=null&&o.symKey)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",\\\"pair() uri#symKey\\\");throw i.setError(_h.malformed_pairing_uri),new Error(a)}if(o!=null&&o.expiryTimestamp&&(0,et.toMiliseconds)(o?.expiryTimestamp)<Date.now()){i.setError(_h.pairing_expired);let{message:a}=Se(\\\"EXPIRED\\\",\\\"pair() URI has expired. Please try again with a new connection URI.\\\");throw new Error(a)}}),or(this,\\\"isValidPing\\\",async n=>{if(!na(n)){let{message:s}=Se(\\\"MISSING_OR_INVALID\\\",`ping() params: ${n}`);throw new Error(s)}let{topic:i}=n;await this.isValidPairingTopic(i)}),or(this,\\\"isValidDisconnect\\\",async n=>{if(!na(n)){let{message:s}=Se(\\\"MISSING_OR_INVALID\\\",`disconnect() params: ${n}`);throw new Error(s)}let{topic:i}=n;await this.isValidPairingTopic(i)}),or(this,\\\"isValidPairingTopic\\\",async n=>{if(!Hi(n,!1)){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){let{message:i}=Se(\\\"NO_MATCHING_KEY\\\",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(If(this.pairings.get(n).expiry)){await this.deletePairing(n);let{message:i}=Se(\\\"EXPIRED\\\",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=rr(r,this.name),this.pairings=new Sh(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ir(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Js.message,async e=>{let{topic:r,message:n,transportType:i}=e;if(this.pairings.keys.includes(r)&&i!==Dn.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{let s=await this.core.crypto.decode(r,n);yf(s)?(this.core.history.set(r,s),await this.onRelayEventRequest({topic:r,payload:s})):Fl(s)&&(await this.core.history.resolve(s),await this.onRelayEventResponse({topic:r,payload:s}),this.core.history.delete(r,s.id)),await this.core.relayer.messages.ack(r,n)}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(Jl.expired,async e=>{let{topic:r}=D7(e.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(V1.expire,{topic:r}))})}},h$t=Object.defineProperty,m$t=(t,e,r)=>e in t?h$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,sa=(t,e,r)=>m$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Efe=class extends Az{constructor(e,r){super(e,r),this.core=e,this.logger=r,sa(this,\\\"records\\\",new Map),sa(this,\\\"events\\\",new D0.EventEmitter),sa(this,\\\"name\\\",OHt),sa(this,\\\"version\\\",NHt),sa(this,\\\"cached\\\",[]),sa(this,\\\"initialized\\\",!1),sa(this,\\\"storagePrefix\\\",Ch),sa(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),sa(this,\\\"set\\\",(n,i,s)=>{if(this.isInitialized(),this.logger.debug(\\\"Setting JSON-RPC request history record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"set\\\",topic:n,request:i,chainId:s}),this.records.has(i.id))return;let o={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:s,expiry:ns(et.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit(Rf.created,o)}),sa(this,\\\"resolve\\\",async n=>{if(this.isInitialized(),this.logger.debug(\\\"Updating JSON-RPC response history record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"update\\\",response:n}),!this.records.has(n.id))return;let i=await this.getRecord(n.id);typeof i.response>\\\"u\\\"&&(i.response=nn(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Rf.updated,i))}),sa(this,\\\"get\\\",async(n,i)=>(this.isInitialized(),this.logger.debug(\\\"Getting record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"get\\\",topic:n,id:i}),await this.getRecord(i))),sa(this,\\\"delete\\\",(n,i)=>{this.isInitialized(),this.logger.debug(\\\"Deleting record\\\"),this.logger.trace({type:\\\"method\\\",method:\\\"delete\\\",id:i}),this.values.forEach(s=>{if(s.topic===n){if(typeof i<\\\"u\\\"&&s.id!==i)return;this.records.delete(s.id),this.events.emit(Rf.deleted,s)}}),this.persist()}),sa(this,\\\"exists\\\",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),sa(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),sa(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),sa(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),sa(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(r=>{if(typeof r.response<\\\"u\\\")return;let n={topic:r.topic,request:Ws(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let r=this.records.get(e);if(!r){let{message:n}=Se(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Rf.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>\\\"u\\\"||!e.length)return;if(this.records.size){let{message:r}=Se(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Rf.created,e=>{let r=Rf.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.events.on(Rf.updated,e=>{let r=Rf.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.events.on(Rf.deleted,e=>{let r=Rf.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,record:e})}),this.core.heartbeat.on(sc.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{(0,et.toMiliseconds)(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(Rf.deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},g$t=Object.defineProperty,y$t=(t,e,r)=>e in t?g$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Oa=(t,e,r)=>y$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),_fe=class extends Nz{constructor(e,r){super(e,r),this.core=e,this.logger=r,Oa(this,\\\"expirations\\\",new Map),Oa(this,\\\"events\\\",new D0.EventEmitter),Oa(this,\\\"name\\\",kHt),Oa(this,\\\"version\\\",BHt),Oa(this,\\\"cached\\\",[]),Oa(this,\\\"initialized\\\",!1),Oa(this,\\\"storagePrefix\\\",Ch),Oa(this,\\\"init\\\",async()=>{this.initialized||(this.logger.trace(\\\"Initialized\\\"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),Oa(this,\\\"has\\\",n=>{try{let i=this.formatTarget(n);return typeof this.getExpiration(i)<\\\"u\\\"}catch{return!1}}),Oa(this,\\\"set\\\",(n,i)=>{this.isInitialized();let s=this.formatTarget(n),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Jl.created,{target:s,expiration:o})}),Oa(this,\\\"get\\\",n=>{this.isInitialized();let i=this.formatTarget(n);return this.getExpiration(i)}),Oa(this,\\\"del\\\",n=>{if(this.isInitialized(),this.has(n)){let i=this.formatTarget(n),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Jl.deleted,{target:i,expiration:s})}}),Oa(this,\\\"on\\\",(n,i)=>{this.events.on(n,i)}),Oa(this,\\\"once\\\",(n,i)=>{this.events.once(n,i)}),Oa(this,\\\"off\\\",(n,i)=>{this.events.off(n,i)}),Oa(this,\\\"removeListener\\\",(n,i)=>{this.events.removeListener(n,i)}),this.logger=rr(r,this.name)}get context(){return Ir(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//\\\"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e==\\\"string\\\")return ede(e);if(typeof e==\\\"number\\\")return tde(e);let{message:r}=Se(\\\"UNKNOWN_TYPE\\\",`Target type: ${typeof e}`);throw new Error(r)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Jl.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>\\\"u\\\"||!e.length)return;if(this.expirations.size){let{message:r}=Se(\\\"RESTORE_WILL_OVERRIDE\\\",this.name);throw this.logger.error(r),new Error(r)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:\\\"method\\\",method:\\\"restore\\\",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let r=this.expirations.get(e);if(!r){let{message:n}=Se(\\\"NO_MATCHING_KEY\\\",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return r}checkExpiry(e,r){let{expiry:n}=r;(0,et.toMiliseconds)(n)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Jl.expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(sc.pulse,()=>this.checkExpirations()),this.events.on(Jl.created,e=>{let r=Jl.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()}),this.events.on(Jl.expired,e=>{let r=Jl.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()}),this.events.on(Jl.deleted,e=>{let r=Jl.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:\\\"event\\\",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}},b$t=Object.defineProperty,w$t=(t,e,r)=>e in t?b$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ms=(t,e,r)=>w$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Cfe=class extends kz{constructor(e,r,n){super(e,r,n),this.core=e,this.logger=r,this.store=n,Ms(this,\\\"name\\\",MHt),Ms(this,\\\"abortController\\\"),Ms(this,\\\"isDevEnv\\\"),Ms(this,\\\"verifyUrlV3\\\",LHt),Ms(this,\\\"storagePrefix\\\",Ch),Ms(this,\\\"version\\\",wQe),Ms(this,\\\"publicKey\\\"),Ms(this,\\\"fetchPromise\\\"),Ms(this,\\\"init\\\",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,et.toMiliseconds)((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug(\\\"verify v2 public key expired\\\"),await this.removePublicKey()))}),Ms(this,\\\"register\\\",async i=>{if(!z1()||this.isDevEnv)return;let s=window.location.origin,{id:o,decryptedId:a}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${s}&id=${o}&decryptedId=${a}`;try{let l=(0,yQe.getDocument)(),d=this.startAbortTimer(et.ONE_SECOND*5),f=await new Promise((p,h)=>{let m=()=>{window.removeEventListener(\\\"message\\\",w),l.body.removeChild(g),h(\\\"attestation aborted\\\")};this.abortController.signal.addEventListener(\\\"abort\\\",m);let g=l.createElement(\\\"iframe\\\");g.src=c,g.style.display=\\\"none\\\",g.addEventListener(\\\"error\\\",m,{signal:this.abortController.signal});let w=v=>{if(v.data&&typeof v.data==\\\"string\\\")try{let b=JSON.parse(v.data);if(b.type===\\\"verify_attestation\\\"){if(Qp(b.attestation).payload.id!==o)return;clearInterval(d),l.body.removeChild(g),this.abortController.signal.removeEventListener(\\\"abort\\\",m),window.removeEventListener(\\\"message\\\",w),p(b.attestation===null?\\\"\\\":b.attestation)}}catch(b){this.logger.warn(b)}};l.body.appendChild(g),window.addEventListener(\\\"message\\\",w,{signal:this.abortController.signal})});return this.logger.debug(\\\"jwt attestation\\\",f),f}catch(l){this.logger.warn(l)}return\\\"\\\"}),Ms(this,\\\"resolve\\\",async i=>{if(this.isDevEnv)return\\\"\\\";let{attestationId:s,hash:o,encryptedId:a}=i;if(s===\\\"\\\"){this.logger.debug(\\\"resolve: attestationId is empty, skipping\\\");return}if(s){if(Qp(s).payload.id!==a)return;let l=await this.isValidJwtAttestation(s);if(l){if(!l.isVerified){this.logger.warn(\\\"resolve: jwt attestation: origin url not verified\\\");return}return l}}if(!o)return;let c=this.getVerifyUrl(i?.verifyUrl);return this.fetchAttestation(o,c)}),Ms(this,\\\"fetchAttestation\\\",async(i,s)=>{this.logger.debug(`resolving attestation: ${i} from url: ${s}`);let o=this.startAbortTimer(et.ONE_SECOND*5),a=await fetch(`${s}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(o),a.status===200?await a.json():void 0}),Ms(this,\\\"getVerifyUrl\\\",i=>{let s=i||F4;return UHt.includes(s)||(this.logger.info(`verify url: ${s}, not included in trusted list, assigning default: ${F4}`),s=F4),s}),Ms(this,\\\"fetchPublicKey\\\",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);let i=this.startAbortTimer(et.FIVE_SECONDS),s=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await s.json()}catch(i){this.logger.warn(i)}}),Ms(this,\\\"persistPublicKey\\\",async i=>{this.logger.debug(\\\"persisting public key to local storage\\\",i),await this.store.setItem(this.storeKey,i),this.publicKey=i}),Ms(this,\\\"removePublicKey\\\",async()=>{this.logger.debug(\\\"removing verify v2 public key from storage\\\"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),Ms(this,\\\"isValidJwtAttestation\\\",async i=>{let s=await this.getPublicKey();try{if(s)return this.validateAttestation(i,s)}catch(a){this.logger.error(a),this.logger.warn(\\\"error validating attestation\\\")}let o=await this.fetchAndPersistPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(a){this.logger.error(a),this.logger.warn(\\\"error validating attestation\\\")}}),Ms(this,\\\"getPublicKey\\\",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),Ms(this,\\\"fetchAndPersistPublicKey\\\",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async s=>{let o=await this.fetchPublicKey();o&&(await this.persistPublicKey(o),s(o))});let i=await this.fetchPromise;return this.fetchPromise=void 0,i}),Ms(this,\\\"validateAttestation\\\",(i,s)=>{let o=Rde(i,s.publicKey),a={hasExpired:(0,et.toMiliseconds)(o.exp)<Date.now(),payload:o};if(a.hasExpired)throw this.logger.warn(\\\"resolve: jwt attestation expired\\\"),new Error(\\\"JWT attestation expired\\\");return{origin:a.payload.origin,isScam:a.payload.isScam,isVerified:a.payload.isVerified}}),this.logger=rr(r,this.name),this.abortController=new AbortController,this.isDevEnv=P4(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+\\\"//verify:public:key\\\"}get context(){return Ir(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,et.toMiliseconds)(e))}},v$t=Object.defineProperty,x$t=(t,e,r)=>e in t?v$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,pQe=(t,e,r)=>x$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Sfe=class extends Bz{constructor(e,r){super(e,r),this.projectId=e,this.logger=r,pQe(this,\\\"context\\\",FHt),pQe(this,\\\"registerDeviceToken\\\",async n=>{let{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=n,c=`${jHt}/${this.projectId}/clients`;await fetch(c,{method:\\\"POST\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})}),this.logger=rr(r,this.context)}},E$t=Object.defineProperty,hQe=Object.getOwnPropertySymbols,_$t=Object.prototype.hasOwnProperty,C$t=Object.prototype.propertyIsEnumerable,Afe=(t,e,r)=>e in t?E$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V7=(t,e)=>{for(var r in e||(e={}))_$t.call(e,r)&&Afe(t,r,e[r]);if(hQe)for(var r of hQe(e))C$t.call(e,r)&&Afe(t,r,e[r]);return t},Co=(t,e,r)=>Afe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Tfe=class extends Mz{constructor(e,r,n=!0){super(e,r,n),this.core=e,this.logger=r,Co(this,\\\"context\\\",qHt),Co(this,\\\"storagePrefix\\\",Ch),Co(this,\\\"storageVersion\\\",HHt),Co(this,\\\"events\\\",new Map),Co(this,\\\"shouldPersist\\\",!1),Co(this,\\\"init\\\",async()=>{if(!P4())try{let i={eventId:Zz(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:\\\"INIT\\\",type:\\\"\\\",properties:{client_id:await this.core.crypto.getClientId(),user_agent:Gz(this.core.relayer.protocol,this.core.relayer.version,efe)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),Co(this,\\\"createEvent\\\",i=>{let{event:s=\\\"ERROR\\\",type:o=\\\"\\\",properties:{topic:a,trace:c}}=i,l=Zz(),d=this.core.projectId||\\\"\\\",f=Date.now(),p=V7({eventId:l,timestamp:f,props:{event:s,type:o,properties:{topic:a,trace:c}},bundleId:d,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,p),this.shouldPersist=!0),p}),Co(this,\\\"getEvent\\\",i=>{let{eventId:s,topic:o}=i;if(s)return this.events.get(s);let a=Array.from(this.events.values()).find(c=>c.props.properties.topic===o);if(a)return V7(V7({},a),this.setMethods(a.eventId))}),Co(this,\\\"deleteEvent\\\",i=>{let{eventId:s}=i;this.events.delete(s),this.shouldPersist=!0}),Co(this,\\\"setEventListeners\\\",()=>{this.core.heartbeat.on(sc.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{(0,et.fromMiliseconds)(Date.now())-(0,et.fromMiliseconds)(i.timestamp)>zHt&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),Co(this,\\\"setMethods\\\",i=>({addTrace:s=>this.addTrace(i,s),setError:s=>this.setError(i,s)})),Co(this,\\\"addTrace\\\",(i,s)=>{let o=this.events.get(i);o&&(o.props.properties.trace.push(s),this.events.set(i,o),this.shouldPersist=!0)}),Co(this,\\\"setError\\\",(i,s)=>{let o=this.events.get(i);o&&(o.props.type=s,o.timestamp=Date.now(),this.events.set(i,o),this.shouldPersist=!0)}),Co(this,\\\"persist\\\",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),Co(this,\\\"restore\\\",async()=>{try{let i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(s=>{this.events.set(s.eventId,V7(V7({},s),this.setMethods(s.eventId)))})}catch(i){this.logger.warn(i)}}),Co(this,\\\"submit\\\",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;let i=[];for(let[s,o]of this.events)o.props.type&&i.push(o);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(let s of i)this.events.delete(s.eventId),this.shouldPersist=!0}catch(s){this.logger.warn(s)}}),Co(this,\\\"sendEvent\\\",async i=>{let s=this.getAppDomain()?\\\"\\\":\\\"&sp=desktop\\\";return await fetch(`${$Ht}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${efe}${s}`,{method:\\\"POST\\\",body:JSON.stringify(i)})}),Co(this,\\\"getAppDomain\\\",()=>Wz().url),this.logger=rr(r,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+\\\"//\\\"+this.context}},S$t=Object.defineProperty,mQe=Object.getOwnPropertySymbols,A$t=Object.prototype.hasOwnProperty,T$t=Object.prototype.propertyIsEnumerable,Ife=(t,e,r)=>e in t?S$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,gQe=(t,e)=>{for(var r in e||(e={}))A$t.call(e,r)&&Ife(t,r,e[r]);if(mQe)for(var r of mQe(e))T$t.call(e,r)&&Ife(t,r,e[r]);return t},Mn=(t,e,r)=>Ife(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Rfe=class t extends Sz{constructor(e){var r;super(e),Mn(this,\\\"protocol\\\",bQe),Mn(this,\\\"version\\\",wQe),Mn(this,\\\"name\\\",v$),Mn(this,\\\"relayUrl\\\"),Mn(this,\\\"projectId\\\"),Mn(this,\\\"customStoragePrefix\\\"),Mn(this,\\\"events\\\",new D0.EventEmitter),Mn(this,\\\"logger\\\"),Mn(this,\\\"heartbeat\\\"),Mn(this,\\\"relayer\\\"),Mn(this,\\\"crypto\\\"),Mn(this,\\\"storage\\\"),Mn(this,\\\"history\\\"),Mn(this,\\\"expirer\\\"),Mn(this,\\\"pairing\\\"),Mn(this,\\\"verify\\\"),Mn(this,\\\"echoClient\\\"),Mn(this,\\\"linkModeSupportedApps\\\"),Mn(this,\\\"eventClient\\\"),Mn(this,\\\"initialized\\\",!1),Mn(this,\\\"logChunkController\\\"),Mn(this,\\\"on\\\",(a,c)=>this.events.on(a,c)),Mn(this,\\\"once\\\",(a,c)=>this.events.once(a,c)),Mn(this,\\\"off\\\",(a,c)=>this.events.off(a,c)),Mn(this,\\\"removeListener\\\",(a,c)=>this.events.removeListener(a,c)),Mn(this,\\\"dispatchEnvelope\\\",({topic:a,message:c,sessionExists:l})=>{if(!a||!c)return;let d={topic:a,message:c,publishedAt:Date.now(),transportType:Dn.link_mode};this.relayer.onLinkMessageEvent(d,{sessionExists:l})});let n=this.getGlobalCore(e?.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(a){console.warn(\\\"Failed to copy global core\\\",a)}this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||vQe,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:\\\"\\\";let i=Ll({level:typeof e?.logger==\\\"string\\\"&&e.logger?e.logger:fHt.logger,name:v$}),{logger:s,chunkLoggerController:o}=P2({opts:i,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=o,(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var a,c;(a=this.logChunkController)!=null&&a.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=rr(s,this.name),this.heartbeat=new VC,this.crypto=new ufe(this,this.logger,e?.keychain),this.history=new Efe(this,this.logger),this.expirer=new _fe(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new WC(gQe(gQe({},pHt),e?.storageOptions)),this.relayer=new wfe({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new xfe(this,this.logger),this.verify=new Cfe(this,this.logger,this.storage),this.echoClient=new Sfe(this.projectId||\\\"\\\",this.logger),this.linkModeSupportedApps=[],this.eventClient=new Tfe(this,this.logger,e?.telemetryEnabled),this.setGlobalCore(this)}static async init(e){let r=new t(e);await r.initialize();let n=await r.crypto.getClientId();return await r.storage.setItem(AHt,n),r}get context(){return Ir(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(ZZe,this.linkModeSupportedApps))}async initialize(){this.logger.trace(\\\"Initialized\\\");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(ZZe)||[],this.initialized=!0,this.logger.info(\\\"Core Initialization Success\\\")}catch(e){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,e),this.logger.error(e.message),e}}getGlobalCore(e=\\\"\\\"){try{if(this.isGlobalCoreDisabled())return;let r=`_walletConnectCore_${e}`,n=`${r}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[r]}catch(r){console.warn(\\\"Failed to get global WalletConnect core\\\",r);return}}setGlobalCore(e){var r;try{if(this.isGlobalCoreDisabled())return;let n=`_walletConnectCore_${((r=e.opts)==null?void 0:r.customStoragePrefix)||\\\"\\\"}`;globalThis[n]=e}catch(n){console.warn(\\\"Failed to set global WalletConnect core\\\",n)}}isGlobalCoreDisabled(){try{return typeof process<\\\"u\\\"&&process.env.DISABLE_GLOBAL_CORE===\\\"true\\\"}catch{return!0}}},NQe=Rfe});var VQe={};ue(VQe,{AUTH_CONTEXT:()=>HQe,AUTH_KEYS_CONTEXT:()=>qQe,AUTH_PAIRING_TOPIC_CONTEXT:()=>zQe,AUTH_PROTOCOL:()=>jQe,AUTH_PUBLIC_KEY_NAME:()=>Z7,AUTH_REQUEST_CONTEXT:()=>$Qe,AUTH_STORAGE_PREFIX:()=>Q7,AUTH_VERSION:()=>B$t,ENGINE_CONTEXT:()=>LQe,ENGINE_QUEUE_STATES:()=>Nf,ENGINE_RPC_OPTS:()=>Ys,HISTORY_CONTEXT:()=>O$t,HISTORY_EVENTS:()=>P$t,HISTORY_STORAGE_VERSION:()=>N$t,METHODS_TO_VERIFY:()=>FQe,PROPOSAL_CONTEXT:()=>MQe,PROPOSAL_EXPIRY:()=>k$t,PROPOSAL_EXPIRY_MESSAGE:()=>kfe,REQUEST_CONTEXT:()=>UQe,SESSION_CONTEXT:()=>DQe,SESSION_EXPIRY:()=>nx,SESSION_REQUEST_EXPIRY_BOUNDARIES:()=>_$,SIGN_CLIENT_CONTEXT:()=>Vfe,SIGN_CLIENT_DEFAULT:()=>E$,SIGN_CLIENT_EVENTS:()=>I$t,SIGN_CLIENT_PROTOCOL:()=>zfe,SIGN_CLIENT_STORAGE_OPTIONS:()=>R$t,SIGN_CLIENT_STORAGE_PREFIX:()=>T$,SIGN_CLIENT_VERSION:()=>$fe,SessionStore:()=>$$t,SignClient:()=>V$t,TVF_METHODS:()=>Bfe,WALLETCONNECT_DEEPLINK_CHOICE:()=>Nfe,default:()=>S$});var Ht,A$,zfe,$fe,Vfe,T$,E$,I$t,R$t,Nfe,P$t,O$t,N$t,MQe,k$t,kfe,DQe,nx,LQe,Ys,_$,Nf,Bfe,UQe,FQe,jQe,B$t,HQe,qQe,zQe,$Qe,Q7,Z7,M$t,D$t,L$t,BQe,U$t,F$t,Mfe,yn,dc,be,Dfe,Lfe,C$,Ufe,Ffe,jfe,Hfe,j$t,H$t,Ofe,qfe,q$t,z$t,ar,S$,$$t,V$t,WQe=x(()=>{u();kQe();C1();wue();Ht=Me(u0());y$();A$=Me(ho());oh();zfe=\\\"wc\\\",$fe=2,Vfe=\\\"client\\\",T$=`${zfe}@${$fe}:${Vfe}:`,E$={name:Vfe,logger:\\\"error\\\",controller:!1,relayUrl:\\\"wss://relay.walletconnect.org\\\"},I$t={session_proposal:\\\"session_proposal\\\",session_update:\\\"session_update\\\",session_extend:\\\"session_extend\\\",session_ping:\\\"session_ping\\\",session_delete:\\\"session_delete\\\",session_expire:\\\"session_expire\\\",session_request:\\\"session_request\\\",session_request_sent:\\\"session_request_sent\\\",session_event:\\\"session_event\\\",proposal_expire:\\\"proposal_expire\\\",session_authenticate:\\\"session_authenticate\\\",session_request_expire:\\\"session_request_expire\\\",session_connect:\\\"session_connect\\\"},R$t={database:\\\":memory:\\\"},Nfe=\\\"WALLETCONNECT_DEEPLINK_CHOICE\\\",P$t={created:\\\"history_created\\\",updated:\\\"history_updated\\\",deleted:\\\"history_deleted\\\",sync:\\\"history_sync\\\"},O$t=\\\"history\\\",N$t=\\\"0.3\\\",MQe=\\\"proposal\\\",k$t=Ht.THIRTY_DAYS,kfe=\\\"Proposal expired\\\",DQe=\\\"session\\\",nx=Ht.SEVEN_DAYS,LQe=\\\"engine\\\",Ys={wc_sessionPropose:{req:{ttl:Ht.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Ht.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Ht.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Ht.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Ht.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Ht.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Ht.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Ht.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Ht.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Ht.ONE_DAY,prompt:!1,tag:1114},res:{ttl:Ht.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:Ht.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:Ht.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:Ht.FIVE_MINUTES,prompt:!1,tag:1119}}},_$={min:Ht.FIVE_MINUTES,max:Ht.SEVEN_DAYS},Nf={idle:\\\"IDLE\\\",active:\\\"ACTIVE\\\"},Bfe={eth_sendTransaction:{key:\\\"\\\"},eth_sendRawTransaction:{key:\\\"\\\"},wallet_sendCalls:{key:\\\"\\\"},solana_signTransaction:{key:\\\"signature\\\"},solana_signAllTransactions:{key:\\\"transactions\\\"},solana_signAndSendTransaction:{key:\\\"signature\\\"}},UQe=\\\"request\\\",FQe=[\\\"wc_sessionPropose\\\",\\\"wc_sessionRequest\\\",\\\"wc_authRequest\\\",\\\"wc_sessionAuthenticate\\\"],jQe=\\\"wc\\\",B$t=1.5,HQe=\\\"auth\\\",qQe=\\\"authKeys\\\",zQe=\\\"pairingTopics\\\",$Qe=\\\"requests\\\",Q7=`${jQe}@${1.5}:${HQe}:`,Z7=`${Q7}:PUB_KEY`,M$t=Object.defineProperty,D$t=Object.defineProperties,L$t=Object.getOwnPropertyDescriptors,BQe=Object.getOwnPropertySymbols,U$t=Object.prototype.hasOwnProperty,F$t=Object.prototype.propertyIsEnumerable,Mfe=(t,e,r)=>e in t?M$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,yn=(t,e)=>{for(var r in e||(e={}))U$t.call(e,r)&&Mfe(t,r,e[r]);if(BQe)for(var r of BQe(e))F$t.call(e,r)&&Mfe(t,r,e[r]);return t},dc=(t,e)=>D$t(t,L$t(e)),be=(t,e,r)=>Mfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Dfe=class extends Lz{constructor(e){super(e),be(this,\\\"name\\\",LQe),be(this,\\\"events\\\",new A$.default),be(this,\\\"initialized\\\",!1),be(this,\\\"requestQueue\\\",{state:Nf.idle,queue:[]}),be(this,\\\"sessionRequestQueue\\\",{state:Nf.idle,queue:[]}),be(this,\\\"requestQueueDelay\\\",Ht.ONE_SECOND),be(this,\\\"expectedPairingMethodMap\\\",new Map),be(this,\\\"recentlyDeletedMap\\\",new Map),be(this,\\\"recentlyDeletedLimit\\\",200),be(this,\\\"relayMessageCache\\\",[]),be(this,\\\"pendingSessions\\\",new Map),be(this,\\\"init\\\",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(Ys)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,Ht.toMiliseconds)(this.requestQueueDelay)))}),be(this,\\\"connect\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();let n=dc(yn({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=Ode(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};let{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,scopedProperties:c,relays:l}=n,d=i,f,p=!1;try{if(d){let N=this.client.core.pairing.pairings.get(d);this.client.logger.warn(\\\"connect() with existing pairing topic is deprecated and will be removed in the next major release.\\\"),p=N.active}}catch(N){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),N}if(!d||!p){let{topic:N,uri:O}=await this.client.core.pairing.create();d=N,f=O}if(!d){let{message:N}=Se(\\\"NO_MATCHING_KEY\\\",`connect() pairing topic: ${d}`);throw new Error(N)}let h=await this.client.core.crypto.generateKeyPair(),m=Ys.wc_sessionPropose.req.ttl||Ht.FIVE_MINUTES,g=ns(m),w=dc(yn(yn({requiredNamespaces:s,optionalNamespaces:o,relays:l??[{protocol:Pfe}],proposer:{publicKey:h,metadata:this.client.metadata},expiryTimestamp:g,pairingTopic:d},a&&{sessionProperties:a}),c&&{scopedProperties:c}),{id:hs()}),v=xr(\\\"session_connect\\\",w.id),{reject:b,resolve:_,done:S}=wh(m,kfe),T=({id:N})=>{N===w.id&&(this.client.events.off(\\\"proposal_expire\\\",T),this.pendingSessions.delete(w.id),this.events.emit(v,{error:{message:kfe,code:0}}))};return this.client.events.on(\\\"proposal_expire\\\",T),this.events.once(v,({error:N,session:O})=>{this.client.events.off(\\\"proposal_expire\\\",T),N?b(N):O&&_(O)}),await this.sendRequest({topic:d,method:\\\"wc_sessionPropose\\\",params:w,throwOnFailedPublish:!0,clientRpcId:w.id}),await this.setProposal(w.id,w),{uri:f,approval:S}}),be(this,\\\"pair\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(r)}catch(n){throw this.client.logger.error(\\\"pair() failed\\\"),n}}),be(this,\\\"approve\\\",async r=>{var n,i,s;let o=this.client.core.eventClient.createEvent({properties:{topic:(n=r?.id)==null?void 0:n.toString(),trace:[yd.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(B){throw o.setError(W1.no_internet_connection),B}try{await this.isValidProposalId(r?.id)}catch(B){throw this.client.logger.error(`approve() -> proposal.get(${r?.id}) failed`),o.setError(W1.proposal_not_found),B}try{await this.isValidApprove(r)}catch(B){throw this.client.logger.error(\\\"approve() -> isValidApprove() failed\\\"),o.setError(W1.session_approve_namespace_validation_failure),B}let{id:a,relayProtocol:c,namespaces:l,sessionProperties:d,scopedProperties:f,sessionConfig:p}=r,h=this.client.proposal.get(a);this.client.core.eventClient.deleteEvent({eventId:o.eventId});let{pairingTopic:m,proposer:g,requiredNamespaces:w,optionalNamespaces:v}=h,b=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:m});b||(b=(s=this.client.core.eventClient)==null?void 0:s.createEvent({type:yd.session_approve_started,properties:{topic:m,trace:[yd.session_approve_started,yd.session_namespaces_validation_success]}}));let _=await this.client.core.crypto.generateKeyPair(),S=g.publicKey,T=await this.client.core.crypto.generateSharedKey(_,S),N=yn(yn(yn({relay:{protocol:c??\\\"irn\\\"},namespaces:l,controller:{publicKey:_,metadata:this.client.metadata},expiry:ns(nx)},d&&{sessionProperties:d}),f&&{scopedProperties:f}),p&&{sessionConfig:p}),O=Dn.relay;b.addTrace(yd.subscribing_session_topic);try{await this.client.core.relayer.subscribe(T,{transportType:O})}catch(B){throw b.setError(W1.subscribe_session_topic_failure),B}b.addTrace(yd.subscribe_session_topic_success);let L=dc(yn({},N),{topic:T,requiredNamespaces:w,optionalNamespaces:v,pairingTopic:m,acknowledged:!1,self:N.controller,peer:{publicKey:g.publicKey,metadata:g.metadata},controller:_,transportType:Dn.relay});await this.client.session.set(T,L),b.addTrace(yd.store_session);try{b.addTrace(yd.publishing_session_settle),await this.sendRequest({topic:T,method:\\\"wc_sessionSettle\\\",params:N,throwOnFailedPublish:!0}).catch(B=>{throw b?.setError(W1.session_settle_publish_failure),B}),b.addTrace(yd.session_settle_publish_success),b.addTrace(yd.publishing_session_approve),await this.sendResult({id:a,topic:m,result:{relay:{protocol:c??\\\"irn\\\"},responderPublicKey:_},throwOnFailedPublish:!0}).catch(B=>{throw b?.setError(W1.session_approve_publish_failure),B}),b.addTrace(yd.session_approve_publish_success)}catch(B){throw this.client.logger.error(B),this.client.session.delete(T,Jr(\\\"USER_DISCONNECTED\\\")),await this.client.core.relayer.unsubscribe(T),B}return this.client.core.eventClient.deleteEvent({eventId:b.eventId}),await this.client.core.pairing.updateMetadata({topic:m,metadata:g.metadata}),await this.client.proposal.delete(a,Jr(\\\"USER_DISCONNECTED\\\")),await this.client.core.pairing.activate({topic:m}),await this.setExpiry(T,ns(nx)),{topic:T,acknowledged:()=>Promise.resolve(this.client.session.get(T))}}),be(this,\\\"reject\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(r)}catch(o){throw this.client.logger.error(\\\"reject() -> isValidReject() failed\\\"),o}let{id:n,reason:i}=r,s;try{s=this.client.proposal.get(n).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),o}s&&(await this.sendError({id:n,topic:s,error:i,rpcOpts:Ys.wc_sessionPropose.reject}),await this.client.proposal.delete(n,Jr(\\\"USER_DISCONNECTED\\\")))}),be(this,\\\"update\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(r)}catch(f){throw this.client.logger.error(\\\"update() -> isValidUpdate() failed\\\"),f}let{topic:n,namespaces:i}=r,{done:s,resolve:o,reject:a}=wh(),c=hs(),l=Vs().toString(),d=this.client.session.get(n).namespaces;return this.events.once(xr(\\\"session_update\\\",c),({error:f})=>{f?a(f):o()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:\\\"wc_sessionUpdate\\\",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(f=>{this.client.logger.error(f),this.client.session.update(n,{namespaces:d}),a(f)}),{acknowledged:s}}),be(this,\\\"extend\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(r)}catch(c){throw this.client.logger.error(\\\"extend() -> isValidExtend() failed\\\"),c}let{topic:n}=r,i=hs(),{done:s,resolve:o,reject:a}=wh();return this.events.once(xr(\\\"session_extend\\\",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(n,ns(nx)),this.sendRequest({topic:n,method:\\\"wc_sessionExtend\\\",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}}),be(this,\\\"request\\\",async r=>{this.isInitialized();try{await this.isValidRequest(r)}catch(v){throw this.client.logger.error(\\\"request() -> isValidRequest() failed\\\"),v}let{chainId:n,request:i,topic:s,expiry:o=Ys.wc_sessionRequest.req.ttl}=r,a=this.client.session.get(s);a?.transportType===Dn.relay&&await this.confirmOnlineStateOrThrow();let c=hs(),l=Vs().toString(),{done:d,resolve:f,reject:p}=wh(o,\\\"Request expired. Please try again.\\\");this.events.once(xr(\\\"session_request\\\",c),({error:v,result:b})=>{v?p(v):f(b)});let h=\\\"wc_sessionRequest\\\",m=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);if(m)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:h,params:{request:dc(yn({},i),{expiryTimestamp:ns(o)}),chainId:n},expiry:o,throwOnFailedPublish:!0,appLink:m}).catch(v=>p(v)),this.client.events.emit(\\\"session_request_sent\\\",{topic:s,request:i,chainId:n,id:c}),await d();let g={request:dc(yn({},i),{expiryTimestamp:ns(o)}),chainId:n},w=this.shouldSetTVF(h,g);return await Promise.all([new Promise(async v=>{await this.sendRequest(yn({clientRpcId:c,relayRpcId:l,topic:s,method:h,params:g,expiry:o,throwOnFailedPublish:!0},w&&{tvf:this.getTVFParams(c,g)})).catch(b=>p(b)),this.client.events.emit(\\\"session_request_sent\\\",{topic:s,request:i,chainId:n,id:c}),v()}),new Promise(async v=>{var b;if(!((b=a.sessionConfig)!=null&&b.disableDeepLink)){let _=await nde(this.client.core.storage,Nfe);await rde({id:c,topic:s,wcDeepLink:_})}v()}),d()]).then(v=>v[2])}),be(this,\\\"respond\\\",async r=>{this.isInitialized(),await this.isValidRespond(r);let{topic:n,response:i}=r,{id:s}=i,o=this.client.session.get(n);o.transportType===Dn.relay&&await this.confirmOnlineStateOrThrow();let a=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);Ii(i)?await this.sendResult({id:s,topic:n,result:i.result,throwOnFailedPublish:!0,appLink:a}):nn(i)&&await this.sendError({id:s,topic:n,error:i.error,appLink:a}),this.cleanupAfterResponse(r)}),be(this,\\\"ping\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(r)}catch(i){throw this.client.logger.error(\\\"ping() -> isValidPing() failed\\\"),i}let{topic:n}=r;if(this.client.session.keys.includes(n)){let i=hs(),s=Vs().toString(),{done:o,resolve:a,reject:c}=wh();this.events.once(xr(\\\"session_ping\\\",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:n,method:\\\"wc_sessionPing\\\",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn(\\\"ping() on pairing topic is deprecated and will be removed in the next major release.\\\"),await this.client.core.pairing.ping({topic:n}))}),be(this,\\\"emit\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(r);let{topic:n,event:i,chainId:s}=r,o=Vs().toString(),a=hs();await this.sendRequest({topic:n,method:\\\"wc_sessionEvent\\\",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o,clientRpcId:a})}),be(this,\\\"disconnect\\\",async r=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(r);let{topic:n}=r;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:\\\"wc_sessionDelete\\\",params:Jr(\\\"USER_DISCONNECTED\\\"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{let{message:i}=Se(\\\"MISMATCHED_TOPIC\\\",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),be(this,\\\"find\\\",r=>(this.isInitialized(),this.client.session.getAll().filter(n=>Nde(n,r)))),be(this,\\\"getPendingSessionRequests\\\",()=>this.client.pendingRequest.getAll()),be(this,\\\"authenticate\\\",async(r,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(r);let s=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),o=s?Dn.link_mode:Dn.relay;o===Dn.relay&&await this.confirmOnlineStateOrThrow();let{chains:a,statement:c=\\\"\\\",uri:l,domain:d,nonce:f,type:p,exp:h,nbf:m,methods:g=[],expiry:w}=r,v=[...r.resources||[]],{topic:b,uri:_}=await this.client.core.pairing.create({methods:[\\\"wc_sessionAuthenticate\\\"],transportType:o});this.client.logger.info({message:\\\"Generated new pairing\\\",pairing:{topic:b,uri:_}});let S=await this.client.core.crypto.generateKeyPair(),T=J2(S);if(await Promise.all([this.client.auth.authKeys.set(Z7,{responseTopic:T,publicKey:S}),this.client.auth.pairingTopics.set(T,{topic:T,pairingTopic:b})]),await this.client.core.relayer.subscribe(T,{transportType:o}),this.client.logger.info(`sending request to new pairing topic: ${b}`),g.length>0){let{namespace:k}=K2(a[0]),U=dde(k,\\\"request\\\",g);$1(v)&&(U=pde(U,v.pop())),v.push(U)}let N=w&&w>Ys.wc_sessionAuthenticate.req.ttl?w:Ys.wc_sessionAuthenticate.req.ttl,O={authPayload:{type:p??\\\"caip122\\\",chains:a,statement:c,aud:l,domain:d,version:\\\"1\\\",nonce:f,iat:new Date().toISOString(),exp:h,nbf:m,resources:v},requester:{publicKey:S,metadata:this.client.metadata},expiryTimestamp:ns(N)},L={eip155:{chains:a,methods:[...new Set([\\\"personal_sign\\\",...g])],events:[\\\"chainChanged\\\",\\\"accountsChanged\\\"]}},B={requiredNamespaces:{},optionalNamespaces:L,relays:[{protocol:\\\"irn\\\"}],pairingTopic:b,proposer:{publicKey:S,metadata:this.client.metadata},expiryTimestamp:ns(Ys.wc_sessionPropose.req.ttl),id:hs()},{done:H,resolve:M,reject:F}=wh(N,\\\"Request expired\\\"),R=hs(),y=xr(\\\"session_connect\\\",B.id),E=xr(\\\"session_request\\\",R),C=async({error:k,session:U})=>{this.events.off(E,I),k?F(k):U&&M({session:U})},I=async k=>{var U,D,A;if(await this.deletePendingAuthRequest(R,{message:\\\"fulfilled\\\",code:0}),k.error){let ce=Jr(\\\"WC_METHOD_UNSUPPORTED\\\",\\\"wc_sessionAuthenticate\\\");return k.error.code===ce.code?void 0:(this.events.off(y,C),F(k.error.message))}await this.deleteProposal(B.id),this.events.off(y,C);let{cacaos:j,responder:K}=k.result,J=[],X=[];for(let ce of j){await Jz({cacao:ce,projectId:this.client.core.projectId})||(this.client.logger.error(ce,\\\"Signature verification failed\\\"),F(Jr(\\\"SESSION_SETTLEMENT_FAILED\\\",\\\"Signature verification failed\\\")));let{p:We}=ce,Ue=$1(We.resources),je=[U7(We.iss)],Lt=N4(We.iss);if(Ue){let pt=e$(Ue),Ct=t$(Ue);J.push(...pt),je.push(...Ct)}for(let pt of je)X.push(`${pt}:${Lt}`)}let re=await this.client.core.crypto.generateSharedKey(S,K.publicKey),fe;J.length>0&&(fe={topic:re,acknowledged:!0,self:{publicKey:S,metadata:this.client.metadata},peer:K,controller:K.publicKey,expiry:ns(nx),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\\\"irn\\\"},pairingTopic:b,namespaces:f$([...new Set(J)],[...new Set(X)]),transportType:o},await this.client.core.relayer.subscribe(re,{transportType:o}),await this.client.session.set(re,fe),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:K.metadata}),fe=this.client.session.get(re)),(U=this.client.metadata.redirect)!=null&&U.linkMode&&(D=K.metadata.redirect)!=null&&D.linkMode&&(A=K.metadata.redirect)!=null&&A.universal&&n&&(this.client.core.addLinkModeSupportedApp(K.metadata.redirect.universal),this.client.session.update(re,{transportType:Dn.link_mode})),M({auths:j,session:fe})};this.events.once(y,C),this.events.once(E,I);let P;try{if(s){let k=Ws(\\\"wc_sessionAuthenticate\\\",O,R);this.client.core.history.set(b,k);let U=await this.client.core.crypto.encode(\\\"\\\",k,{type:Q2,encoding:xh});P=D4(n,b,U)}else await Promise.all([this.sendRequest({topic:b,method:\\\"wc_sessionAuthenticate\\\",params:O,expiry:r.expiry,throwOnFailedPublish:!0,clientRpcId:R}),this.sendRequest({topic:b,method:\\\"wc_sessionPropose\\\",params:B,expiry:Ys.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:B.id})])}catch(k){throw this.events.off(y,C),this.events.off(E,I),k}return await this.setProposal(B.id,B),await this.setAuthRequest(R,{request:dc(yn({},O),{verifyContext:{}}),pairingTopic:b,transportType:o}),{uri:P??_,response:H}}),be(this,\\\"approveSessionAuthenticate\\\",async r=>{let{id:n,auths:i}=r,s=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[G1.authenticated_session_approve_started]}});try{this.isInitialized()}catch(w){throw s.setError(j4.no_internet_connection),w}let o=this.getPendingAuthRequest(n);if(!o)throw s.setError(j4.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);let a=o.transportType||Dn.relay;a===Dn.relay&&await this.confirmOnlineStateOrThrow();let c=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),d=J2(c),f={type:md,receiverPublicKey:c,senderPublicKey:l},p=[],h=[];for(let w of i){if(!await Jz({cacao:w,projectId:this.client.core.projectId})){s.setError(j4.invalid_cacao);let T=Jr(\\\"SESSION_SETTLEMENT_FAILED\\\",\\\"Signature verification failed\\\");throw await this.sendError({id:n,topic:d,error:T,encodeOpts:f}),new Error(T.message)}s.addTrace(G1.cacaos_verified);let{p:v}=w,b=$1(v.resources),_=[U7(v.iss)],S=N4(v.iss);if(b){let T=e$(b),N=t$(b);p.push(...T),_.push(...N)}for(let T of _)h.push(`${T}:${S}`)}let m=await this.client.core.crypto.generateSharedKey(l,c);s.addTrace(G1.create_authenticated_session_topic);let g;if(p?.length>0){g={topic:m,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:o.requester.metadata},controller:c,expiry:ns(nx),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:\\\"irn\\\"},pairingTopic:o.pairingTopic,namespaces:f$([...new Set(p)],[...new Set(h)]),transportType:a},s.addTrace(G1.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(m,{transportType:a})}catch(w){throw s.setError(j4.subscribe_authenticated_session_topic_failure),w}s.addTrace(G1.subscribe_authenticated_session_topic_success),await this.client.session.set(m,g),s.addTrace(G1.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}s.addTrace(G1.publishing_authenticated_session_approve);try{await this.sendResult({topic:d,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:f,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,a)})}catch(w){throw s.setError(j4.authenticated_session_approve_publish_failure),w}return await this.client.auth.requests.delete(n,{message:\\\"fulfilled\\\",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:s.eventId}),{session:g}}),be(this,\\\"rejectSessionAuthenticate\\\",async r=>{this.isInitialized();let{id:n,reason:i}=r,s=this.getPendingAuthRequest(n);if(!s)throw new Error(`Could not find pending auth request with id ${n}`);s.transportType===Dn.relay&&await this.confirmOnlineStateOrThrow();let o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=J2(o),l={type:md,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:Ys.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(s.requester.metadata,s.transportType)}),await this.client.auth.requests.delete(n,{message:\\\"rejected\\\",code:0}),await this.client.proposal.delete(n,Jr(\\\"USER_DISCONNECTED\\\"))}),be(this,\\\"formatAuthMessage\\\",r=>{this.isInitialized();let{request:n,iss:i}=r;return Yz(n,i)}),be(this,\\\"processRelayMessageCache\\\",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{let r=this.relayMessageCache.shift();r&&await this.onRelayMessage(r)}catch(r){this.client.logger.error(r)}},50)}),be(this,\\\"cleanupDuplicatePairings\\\",async r=>{if(r.pairingTopic)try{let n=this.client.core.pairing.pairings.get(r.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===r.peer.metadata.url&&s.topic&&s.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info(\\\"Duplicate pairings clean up finished\\\")}catch(n){this.client.logger.error(n)}}),be(this,\\\"deleteSession\\\",async r=>{var n;let{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=r,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,Jr(\\\"USER_DISCONNECTED\\\")),this.addToRecentlyDeleted(i,\\\"session\\\"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(Nfe).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,Jr(\\\"USER_DISCONNECTED\\\"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=Nf.idle),o&&this.client.events.emit(\\\"session_delete\\\",{id:a,topic:i})}),be(this,\\\"deleteProposal\\\",async(r,n)=>{if(n)try{let i=this.client.proposal.get(r);this.client.core.eventClient.getEvent({topic:i.pairingTopic})?.setError(W1.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(r,Jr(\\\"USER_DISCONNECTED\\\")),n?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,\\\"proposal\\\")}),be(this,\\\"deletePendingSessionRequest\\\",async(r,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)]),this.addToRecentlyDeleted(r,\\\"request\\\"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==r),i&&(this.sessionRequestQueue.state=Nf.idle,this.client.events.emit(\\\"session_request_expire\\\",{id:r}))}),be(this,\\\"deletePendingAuthRequest\\\",async(r,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(r,n),i?Promise.resolve():this.client.core.expirer.del(r)])}),be(this,\\\"setExpiry\\\",async(r,n)=>{this.client.session.keys.includes(r)&&(this.client.core.expirer.set(r,n),await this.client.session.update(r,{expiry:n}))}),be(this,\\\"setProposal\\\",async(r,n)=>{this.client.core.expirer.set(r,ns(Ys.wc_sessionPropose.req.ttl)),await this.client.proposal.set(r,n)}),be(this,\\\"setAuthRequest\\\",async(r,n)=>{let{request:i,pairingTopic:s,transportType:o=Dn.relay}=n;this.client.core.expirer.set(r,i.expiryTimestamp),await this.client.auth.requests.set(r,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:r,pairingTopic:s,verifyContext:i.verifyContext,transportType:o})}),be(this,\\\"setPendingSessionRequest\\\",async r=>{let{id:n,topic:i,params:s,verifyContext:o}=r,a=s.request.expiryTimestamp||ns(Ys.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,a),await this.client.pendingRequest.set(n,{id:n,topic:i,params:s,verifyContext:o})}),be(this,\\\"sendRequest\\\",async r=>{let{topic:n,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l,appLink:d,tvf:f}=r,p=Ws(i,s,c),h,m=!!d;try{let v=m?xh:Xc;h=await this.client.core.crypto.encode(n,p,{encoding:v})}catch(v){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),v}let g;if(FQe.includes(i)){let v=Kl(JSON.stringify(p)),b=Kl(h);g=await this.client.core.verify.register({id:b,decryptedId:v})}let w=Ys[i].req;if(w.attestation=g,o&&(w.ttl=o),a&&(w.id=a),this.client.core.history.set(n,p),m){let v=D4(d,n,h);await globalThis.Linking.openURL(v,this.client.name)}else{let v=Ys[i].req;o&&(v.ttl=o),a&&(v.id=a),v.tvf=dc(yn({},f),{correlationId:p.id}),l?(v.internal=dc(yn({},v.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,h,v)):this.client.core.relayer.publish(n,h,v).catch(b=>this.client.logger.error(b))}return p.id}),be(this,\\\"sendResult\\\",async r=>{let{id:n,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a,appLink:c}=r,l=gf(n,s),d,f=c&&typeof globalThis?.Linking<\\\"u\\\";try{let m=f?xh:Xc;d=await this.client.core.crypto.encode(i,l,dc(yn({},a||{}),{encoding:m}))}catch(m){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),m}let p,h;try{p=await this.client.core.history.get(i,n);let m=p.request;try{this.shouldSetTVF(m.method,m.params)&&(h=this.getTVFParams(n,m.params,s))}catch(g){this.client.logger.warn(\\\"sendResult() -> getTVFParams() failed\\\",g)}}catch(m){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),m}if(f){let m=D4(c,i,d);await globalThis.Linking.openURL(m,this.client.name)}else{let m=p.request.method,g=Ys[m].res;g.tvf=dc(yn({},h),{correlationId:n}),o?(g.internal=dc(yn({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,d,g)):this.client.core.relayer.publish(i,d,g).catch(w=>this.client.logger.error(w))}await this.client.core.history.resolve(l)}),be(this,\\\"sendError\\\",async r=>{let{id:n,topic:i,error:s,encodeOpts:o,rpcOpts:a,appLink:c}=r,l=Ul(n,s),d,f=c&&typeof globalThis?.Linking<\\\"u\\\";try{let h=f?xh:Xc;d=await this.client.core.crypto.encode(i,l,dc(yn({},o||{}),{encoding:h}))}catch(h){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),h}let p;try{p=await this.client.core.history.get(i,n)}catch(h){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),h}if(f){let h=D4(c,i,d);await globalThis.Linking.openURL(h,this.client.name)}else{let h=p.request.method,m=a||Ys[h].res;this.client.core.relayer.publish(i,d,m)}await this.client.core.history.resolve(l)}),be(this,\\\"cleanup\\\",async()=>{let r=[],n=[];this.client.session.getAll().forEach(i=>{let s=!1;If(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&r.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{If(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...r.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),be(this,\\\"onProviderMessageEvent\\\",async r=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(r):await this.onRelayMessage(r)}),be(this,\\\"onRelayEventRequest\\\",async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()}),be(this,\\\"processRequestsQueue\\\",async()=>{if(this.requestQueue.state===Nf.active){this.client.logger.info(\\\"Request queue already active, skipping...\\\");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Nf.active;let r=this.requestQueue.queue.shift();if(r)try{await this.processRequest(r)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Nf.idle}),be(this,\\\"processRequest\\\",async r=>{let{topic:n,payload:i,attestation:s,transportType:o,encryptedId:a}=r,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case\\\"wc_sessionPropose\\\":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:s,encryptedId:a});case\\\"wc_sessionSettle\\\":return await this.onSessionSettleRequest(n,i);case\\\"wc_sessionUpdate\\\":return await this.onSessionUpdateRequest(n,i);case\\\"wc_sessionExtend\\\":return await this.onSessionExtendRequest(n,i);case\\\"wc_sessionPing\\\":return await this.onSessionPingRequest(n,i);case\\\"wc_sessionDelete\\\":return await this.onSessionDeleteRequest(n,i);case\\\"wc_sessionRequest\\\":return await this.onSessionRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});case\\\"wc_sessionEvent\\\":return await this.onSessionEventRequest(n,i);case\\\"wc_sessionAuthenticate\\\":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:s,encryptedId:a,transportType:o});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),be(this,\\\"onRelayEventResponse\\\",async r=>{let{topic:n,payload:i,transportType:s}=r,o=(await this.client.core.history.get(n,i.id)).request.method;switch(o){case\\\"wc_sessionPropose\\\":return this.onSessionProposeResponse(n,i,s);case\\\"wc_sessionSettle\\\":return this.onSessionSettleResponse(n,i);case\\\"wc_sessionUpdate\\\":return this.onSessionUpdateResponse(n,i);case\\\"wc_sessionExtend\\\":return this.onSessionExtendResponse(n,i);case\\\"wc_sessionPing\\\":return this.onSessionPingResponse(n,i);case\\\"wc_sessionRequest\\\":return this.onSessionRequestResponse(n,i);case\\\"wc_sessionAuthenticate\\\":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${o}`)}}),be(this,\\\"onRelayEventUnknownPayload\\\",r=>{let{topic:n}=r,{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),be(this,\\\"shouldIgnorePairingRequest\\\",r=>{let{topic:n,requestMethod:i}=r,s=this.expectedPairingMethodMap.get(n);return!s||s.includes(i)?!1:!!(s.includes(\\\"wc_sessionAuthenticate\\\")&&this.client.events.listenerCount(\\\"session_authenticate\\\")>0)}),be(this,\\\"onSessionProposeRequest\\\",async r=>{let{topic:n,payload:i,attestation:s,encryptedId:o}=r,{params:a,id:c}=i;try{let l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount(\\\"session_proposal\\\")===0&&(console.warn(\\\"No listener for session_proposal event\\\"),l?.setError(_h.proposal_listener_not_found)),this.isValidConnect(yn({},i.params));let d=a.expiryTimestamp||ns(Ys.wc_sessionPropose.req.ttl),f=yn({id:c,pairingTopic:n,expiryTimestamp:d},a);await this.setProposal(c,f);let p=await this.getVerifyContext({attestationId:s,hash:Kl(JSON.stringify(i)),encryptedId:o,metadata:f.proposer.metadata});l?.addTrace(Of.emit_session_proposal),this.client.events.emit(\\\"session_proposal\\\",{id:c,params:f,verifyContext:p})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:Ys.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),be(this,\\\"onSessionProposeResponse\\\",async(r,n,i)=>{let{id:s}=n;if(Ii(n)){let{result:o}=n;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",result:o});let a=this.client.proposal.get(s);this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",proposal:a});let c=a.proposer.publicKey;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",selfPublicKey:c});let l=o.responderPublicKey;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",peerPublicKey:l});let d=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(s,{sessionTopic:d,pairingTopic:r,proposalId:s,publicKey:c});let f=await this.client.core.relayer.subscribe(d,{transportType:i});this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionProposeResponse\\\",subscriptionId:f}),await this.client.core.pairing.activate({topic:r})}else if(nn(n)){await this.client.proposal.delete(s,Jr(\\\"USER_DISCONNECTED\\\"));let o=xr(\\\"session_connect\\\",s);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners, 954`);this.events.emit(o,{error:n.error})}}),be(this,\\\"onSessionSettleRequest\\\",async(r,n)=>{let{id:i,params:s}=n;try{this.isValidSessionSettleRequest(s);let{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:d,scopedProperties:f,sessionConfig:p}=n.params,h=[...this.pendingSessions.values()].find(w=>w.sessionTopic===r);if(!h)return this.client.logger.error(`Pending session not found for topic ${r}`);let m=this.client.proposal.get(h.proposalId),g=dc(yn(yn(yn({topic:r,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:h.pairingTopic,requiredNamespaces:m.requiredNamespaces,optionalNamespaces:m.optionalNamespaces,controller:a.publicKey,self:{publicKey:h.publicKey,metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},d&&{sessionProperties:d}),f&&{scopedProperties:f}),p&&{sessionConfig:p}),{transportType:Dn.relay});await this.client.session.set(g.topic,g),await this.setExpiry(g.topic,g.expiry),await this.client.core.pairing.updateMetadata({topic:h.pairingTopic,metadata:g.peer.metadata}),this.client.events.emit(\\\"session_connect\\\",{session:g}),this.events.emit(xr(\\\"session_connect\\\",h.proposalId),{session:g}),this.pendingSessions.delete(h.proposalId),this.deleteProposal(h.proposalId,!1),this.cleanupDuplicatePairings(g),await this.sendResult({id:n.id,topic:r,result:!0,throwOnFailedPublish:!0})}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),be(this,\\\"onSessionSettleResponse\\\",async(r,n)=>{let{id:i}=n;Ii(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(xr(\\\"session_approve\\\",i),{})):nn(n)&&(await this.client.session.delete(r,Jr(\\\"USER_DISCONNECTED\\\")),this.events.emit(xr(\\\"session_approve\\\",i),{error:n.error}))}),be(this,\\\"onSessionUpdateRequest\\\",async(r,n)=>{let{params:i,id:s}=n;try{let o=`${r}_session_update`,a=M0.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.warn(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:r,error:Jr(\\\"INVALID_UPDATE_REQUEST\\\")});return}this.isValidUpdate(yn({topic:r},i));try{M0.set(o,s),await this.client.session.update(r,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:r,result:!0,throwOnFailedPublish:!0})}catch(c){throw M0.delete(o),c}this.client.events.emit(\\\"session_update\\\",{id:s,topic:r,params:i})}catch(o){await this.sendError({id:s,topic:r,error:o}),this.client.logger.error(o)}}),be(this,\\\"isRequestOutOfSync\\\",(r,n)=>n.toString().slice(0,-3)<r.toString().slice(0,-3)),be(this,\\\"onSessionUpdateResponse\\\",(r,n)=>{let{id:i}=n,s=xr(\\\"session_update\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(xr(\\\"session_update\\\",i),{}):nn(n)&&this.events.emit(xr(\\\"session_update\\\",i),{error:n.error})}),be(this,\\\"onSessionExtendRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,ns(nx)),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\\\"session_extend\\\",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),be(this,\\\"onSessionExtendResponse\\\",(r,n)=>{let{id:i}=n,s=xr(\\\"session_extend\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(xr(\\\"session_extend\\\",i),{}):nn(n)&&this.events.emit(xr(\\\"session_extend\\\",i),{error:n.error})}),be(this,\\\"onSessionPingRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.client.events.emit(\\\"session_ping\\\",{id:i,topic:r})}catch(s){await this.sendError({id:i,topic:r,error:s}),this.client.logger.error(s)}}),be(this,\\\"onSessionPingResponse\\\",(r,n)=>{let{id:i}=n,s=xr(\\\"session_ping\\\",i);setTimeout(()=>{if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners 2176`);Ii(n)?this.events.emit(xr(\\\"session_ping\\\",i),{}):nn(n)&&this.events.emit(xr(\\\"session_ping\\\",i),{error:n.error})},500)}),be(this,\\\"onSessionDeleteRequest\\\",async(r,n)=>{let{id:i}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),Promise.all([new Promise(s=>{this.client.core.relayer.once(Js.publish,async()=>{s(await this.deleteSession({topic:r,id:i}))})}),this.sendResult({id:i,topic:r,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:r,error:Jr(\\\"USER_DISCONNECTED\\\")})]).catch(s=>this.client.logger.error(s))}catch(s){this.client.logger.error(s)}}),be(this,\\\"onSessionRequest\\\",async r=>{var n,i,s;let{topic:o,payload:a,attestation:c,encryptedId:l,transportType:d}=r,{id:f,params:p}=a;try{await this.isValidRequest(yn({topic:o},p));let h=this.client.session.get(o),m=await this.getVerifyContext({attestationId:c,hash:Kl(JSON.stringify(Ws(\\\"wc_sessionRequest\\\",p,f))),encryptedId:l,metadata:h.peer.metadata,transportType:d}),g={id:f,topic:o,params:p,verifyContext:m};await this.setPendingSessionRequest(g),d===Dn.link_mode&&(n=h.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=h.peer.metadata.redirect)==null?void 0:i.universal),(s=this.client.signConfig)!=null&&s.disableRequestQueue?this.emitSessionRequest(g):(this.addSessionRequestToSessionRequestQueue(g),this.processSessionRequestQueue())}catch(h){await this.sendError({id:f,topic:o,error:h}),this.client.logger.error(h)}}),be(this,\\\"onSessionRequestResponse\\\",(r,n)=>{let{id:i}=n,s=xr(\\\"session_request\\\",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);Ii(n)?this.events.emit(xr(\\\"session_request\\\",i),{result:n.result}):nn(n)&&this.events.emit(xr(\\\"session_request\\\",i),{error:n.error})}),be(this,\\\"onSessionEventRequest\\\",async(r,n)=>{let{id:i,params:s}=n;try{let o=`${r}_session_event_${s.event.name}`,a=M0.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(yn({topic:r},s)),this.client.events.emit(\\\"session_event\\\",{id:i,topic:r,params:s}),M0.set(o,i)}catch(o){await this.sendError({id:i,topic:r,error:o}),this.client.logger.error(o)}}),be(this,\\\"onSessionAuthenticateResponse\\\",(r,n)=>{let{id:i}=n;this.client.logger.trace({type:\\\"method\\\",method:\\\"onSessionAuthenticateResponse\\\",topic:r,payload:n}),Ii(n)?this.events.emit(xr(\\\"session_request\\\",i),{result:n.result}):nn(n)&&this.events.emit(xr(\\\"session_request\\\",i),{error:n.error})}),be(this,\\\"onSessionAuthenticateRequest\\\",async r=>{var n;let{topic:i,payload:s,attestation:o,encryptedId:a,transportType:c}=r;try{let{requester:l,authPayload:d,expiryTimestamp:f}=s.params,p=await this.getVerifyContext({attestationId:o,hash:Kl(JSON.stringify(s)),encryptedId:a,metadata:l.metadata,transportType:c}),h={requester:l,pairingTopic:i,id:s.id,authPayload:d,verifyContext:p,expiryTimestamp:f};await this.setAuthRequest(s.id,{request:h,pairingTopic:i,transportType:c}),c===Dn.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit(\\\"session_authenticate\\\",{topic:i,params:s.params,id:s.id,verifyContext:p})}catch(l){this.client.logger.error(l);let d=s.params.requester.publicKey,f=await this.client.core.crypto.generateKeyPair(),p=this.getAppLinkIfEnabled(s.params.requester.metadata,c),h={type:md,receiverPublicKey:d,senderPublicKey:f};await this.sendError({id:s.id,topic:i,error:l,encodeOpts:h,rpcOpts:Ys.wc_sessionAuthenticate.autoReject,appLink:p})}}),be(this,\\\"addSessionRequestToSessionRequestQueue\\\",r=>{this.sessionRequestQueue.queue.push(r)}),be(this,\\\"cleanupAfterResponse\\\",r=>{this.deletePendingSessionRequest(r.response.id,{message:\\\"fulfilled\\\",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Nf.idle,this.processSessionRequestQueue()},(0,Ht.toMiliseconds)(this.requestQueueDelay))}),be(this,\\\"cleanupPendingSentRequestsForTopic\\\",({topic:r,error:n})=>{let i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===r&&s.request.method===\\\"wc_sessionRequest\\\").forEach(s=>{let o=s.request.id,a=xr(\\\"session_request\\\",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(xr(\\\"session_request\\\",s.request.id),{error:n})})}),be(this,\\\"processSessionRequestQueue\\\",()=>{if(this.sessionRequestQueue.state===Nf.active){this.client.logger.info(\\\"session request queue is already active.\\\");return}let r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info(\\\"session request queue is empty.\\\");return}try{this.sessionRequestQueue.state=Nf.active,this.emitSessionRequest(r)}catch(n){this.client.logger.error(n)}}),be(this,\\\"emitSessionRequest\\\",r=>{this.client.events.emit(\\\"session_request\\\",r)}),be(this,\\\"onPairingCreated\\\",r=>{if(r.methods&&this.expectedPairingMethodMap.set(r.topic,r.methods),r.active)return;let n=this.client.proposal.getAll().find(i=>i.pairingTopic===r.topic);n&&this.onSessionProposeRequest({topic:r.topic,payload:Ws(\\\"wc_sessionPropose\\\",dc(yn({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id)})}),be(this,\\\"isValidConnect\\\",async r=>{if(!na(r)){let{message:l}=Se(\\\"MISSING_OR_INVALID\\\",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}let{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,scopedProperties:a,relays:c}=r;if(Bs(n)||await this.isValidPairingTopic(n),!Fde(c,!0)){let{message:l}=Se(\\\"MISSING_OR_INVALID\\\",`connect() relays: ${c}`);throw new Error(l)}if(!Bs(i)&&rx(i)!==0){let l=\\\"requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces\\\";[\\\"fatal\\\",\\\"error\\\",\\\"silent\\\"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,\\\"requiredNamespaces\\\")}if(!Bs(s)&&rx(s)!==0&&this.validateNamespaces(s,\\\"optionalNamespaces\\\"),Bs(o)||this.validateSessionProps(o,\\\"sessionProperties\\\"),!Bs(a)){this.validateSessionProps(a,\\\"scopedProperties\\\");let l=Object.keys(i||{}).concat(Object.keys(s||{}));if(!Object.keys(a).every(d=>l.includes(d)))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(a)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),be(this,\\\"validateNamespaces\\\",(r,n)=>{let i=Ude(r,\\\"connect()\\\",n);if(i)throw new Error(i.message)}),be(this,\\\"isValidApprove\\\",async r=>{if(!na(r))throw new Error(Se(\\\"MISSING_OR_INVALID\\\",`approve() params: ${r}`).message);let{id:n,namespaces:i,relayProtocol:s,sessionProperties:o,scopedProperties:a}=r;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);let c=this.client.proposal.get(n),l=L4(i,\\\"approve()\\\");if(l)throw new Error(l.message);let d=q7(c.requiredNamespaces,i,\\\"approve()\\\");if(d)throw new Error(d.message);if(!Hi(s,!0)){let{message:f}=Se(\\\"MISSING_OR_INVALID\\\",`approve() relayProtocol: ${s}`);throw new Error(f)}if(Bs(o)||this.validateSessionProps(o,\\\"sessionProperties\\\"),!Bs(a)){this.validateSessionProps(a,\\\"scopedProperties\\\");let f=new Set(Object.keys(i));if(!Object.keys(a).every(p=>f.has(p)))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(a)}, approved namespaces: ${Array.from(f).join(\\\", \\\")}`)}}),be(this,\\\"isValidReject\\\",async r=>{if(!na(r)){let{message:s}=Se(\\\"MISSING_OR_INVALID\\\",`reject() params: ${r}`);throw new Error(s)}let{id:n,reason:i}=r;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!Hde(i)){let{message:s}=Se(\\\"MISSING_OR_INVALID\\\",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}}),be(this,\\\"isValidSessionSettleRequest\\\",r=>{if(!na(r)){let{message:l}=Se(\\\"MISSING_OR_INVALID\\\",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}let{relay:n,controller:i,namespaces:s,expiry:o}=r;if(!h$(n)){let{message:l}=Se(\\\"MISSING_OR_INVALID\\\",\\\"onSessionSettleRequest() relay protocol should be a string\\\");throw new Error(l)}let a=Dde(i,\\\"onSessionSettleRequest()\\\");if(a)throw new Error(a.message);let c=L4(s,\\\"onSessionSettleRequest()\\\");if(c)throw new Error(c.message);if(If(o)){let{message:l}=Se(\\\"EXPIRED\\\",\\\"onSessionSettleRequest()\\\");throw new Error(l)}}),be(this,\\\"isValidUpdate\\\",async r=>{if(!na(r)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`update() params: ${r}`);throw new Error(c)}let{topic:n,namespaces:i}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);let s=this.client.session.get(n),o=L4(i,\\\"update()\\\");if(o)throw new Error(o.message);let a=q7(s.requiredNamespaces,i,\\\"update()\\\");if(a)throw new Error(a.message)}),be(this,\\\"isValidExtend\\\",async r=>{if(!na(r)){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`extend() params: ${r}`);throw new Error(i)}let{topic:n}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),be(this,\\\"isValidRequest\\\",async r=>{if(!na(r)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`request() params: ${r}`);throw new Error(c)}let{topic:n,request:i,chainId:s,expiry:o}=r;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);let{namespaces:a}=this.client.session.get(n);if(!m$(a,s)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`request() chainId: ${s}`);throw new Error(c)}if(!qde(i)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!Vde(a,s,i.method)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`request() method: ${i.method}`);throw new Error(c)}if(o&&!Gde(o,_$)){let{message:c}=Se(\\\"MISSING_OR_INVALID\\\",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${_$.min} and ${_$.max}`);throw new Error(c)}}),be(this,\\\"isValidRespond\\\",async r=>{var n;if(!na(r)){let{message:o}=Se(\\\"MISSING_OR_INVALID\\\",`respond() params: ${r}`);throw new Error(o)}let{topic:i,response:s}=r;try{await this.isValidSessionTopic(i)}catch(o){throw(n=r?.response)!=null&&n.id&&this.cleanupAfterResponse(r),o}if(!zde(s)){let{message:o}=Se(\\\"MISSING_OR_INVALID\\\",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}}),be(this,\\\"isValidPing\\\",async r=>{if(!na(r)){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`ping() params: ${r}`);throw new Error(i)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),be(this,\\\"isValidEmit\\\",async r=>{if(!na(r)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`emit() params: ${r}`);throw new Error(a)}let{topic:n,event:i,chainId:s}=r;await this.isValidSessionTopic(n);let{namespaces:o}=this.client.session.get(n);if(!m$(o,s)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`emit() chainId: ${s}`);throw new Error(a)}if(!$de(i)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!Wde(o,s,i.name)){let{message:a}=Se(\\\"MISSING_OR_INVALID\\\",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}}),be(this,\\\"isValidDisconnect\\\",async r=>{if(!na(r)){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`disconnect() params: ${r}`);throw new Error(i)}let{topic:n}=r;await this.isValidSessionOrPairingTopic(n)}),be(this,\\\"isValidAuthenticate\\\",r=>{let{chains:n,uri:i,domain:s,nonce:o}=r;if(!Array.isArray(n)||n.length===0)throw new Error(\\\"chains is required and must be a non-empty array\\\");if(!Hi(i,!1))throw new Error(\\\"uri is required parameter\\\");if(!Hi(s,!1))throw new Error(\\\"domain is required parameter\\\");if(!Hi(o,!1))throw new Error(\\\"nonce is required parameter\\\");if([...new Set(n.map(c=>K2(c).namespace))].length>1)throw new Error(\\\"Multi-namespace requests are not supported. Please request single namespace only.\\\");let{namespace:a}=K2(n[0]);if(a!==\\\"eip155\\\")throw new Error(\\\"Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.\\\")}),be(this,\\\"getVerifyContext\\\",async r=>{let{attestationId:n,hash:i,encryptedId:s,metadata:o,transportType:a}=r,c={verified:{verifyUrl:o.verifyUrl||F4,validation:\\\"UNKNOWN\\\",origin:o.url||\\\"\\\"}};try{if(a===Dn.link_mode){let d=this.getAppLinkIfEnabled(o,a);return c.verified.validation=d&&new URL(d).origin===new URL(o.url).origin?\\\"VALID\\\":\\\"INVALID\\\",c}let l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:s,verifyUrl:o.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(o.url).origin?\\\"VALID\\\":\\\"INVALID\\\")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),be(this,\\\"validateSessionProps\\\",(r,n)=>{Object.values(r).forEach((i,s)=>{if(i==null){let{message:o}=Se(\\\"MISSING_OR_INVALID\\\",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(r)[s]}`);throw new Error(o)}})}),be(this,\\\"getPendingAuthRequest\\\",r=>{let n=this.client.auth.requests.get(r);return typeof n==\\\"object\\\"?n:void 0}),be(this,\\\"addToRecentlyDeleted\\\",(r,n)=>{if(this.recentlyDeletedMap.set(r,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0,s=this.recentlyDeletedLimit/2;for(let o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}}),be(this,\\\"checkRecentlyDeleted\\\",r=>{let n=this.recentlyDeletedMap.get(r);if(n){let{message:i}=Se(\\\"MISSING_OR_INVALID\\\",`Record was recently deleted - ${n}: ${r}`);throw new Error(i)}}),be(this,\\\"isLinkModeEnabled\\\",(r,n)=>{var i,s,o,a,c,l,d,f,p;return!r||n!==Dn.link_mode?!1:((s=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:s.linkMode)===!0&&((a=(o=this.client.metadata)==null?void 0:o.redirect)==null?void 0:a.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==\\\"\\\"&&((d=r?.redirect)==null?void 0:d.universal)!==void 0&&((f=r?.redirect)==null?void 0:f.universal)!==\\\"\\\"&&((p=r?.redirect)==null?void 0:p.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(r.redirect.universal)&&typeof globalThis?.Linking<\\\"u\\\"}),be(this,\\\"getAppLinkIfEnabled\\\",(r,n)=>{var i;return this.isLinkModeEnabled(r,n)?(i=r?.redirect)==null?void 0:i.universal:void 0}),be(this,\\\"handleLinkModeMessage\\\",({url:r})=>{if(!r||!r.includes(\\\"wc_ev\\\")||!r.includes(\\\"topic\\\"))return;let n=Kz(r,\\\"topic\\\")||\\\"\\\",i=decodeURIComponent(Kz(r,\\\"wc_ev\\\")||\\\"\\\"),s=this.client.session.keys.includes(n);s&&this.client.session.update(n,{transportType:Dn.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:s})}),be(this,\\\"registerLinkModeListeners\\\",async()=>{var r;if(P4()||bh()&&(r=this.client.metadata.redirect)!=null&&r.linkMode){let n=globalThis?.Linking;if(typeof n<\\\"u\\\"){n.addEventListener(\\\"url\\\",this.handleLinkModeMessage,this.client.name);let i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),be(this,\\\"shouldSetTVF\\\",(r,n)=>{if(!n||r!==\\\"wc_sessionRequest\\\")return!1;let{request:i}=n;return Object.keys(Bfe).includes(i.method)}),be(this,\\\"getTVFParams\\\",(r,n,i)=>{var s,o;try{let a=n.request.method,c=this.extractTxHashesFromResult(a,i);return dc(yn({correlationId:r,rpcMethods:[a],chainId:n.chainId},this.isValidContractData(n.request.params)&&{contractAddresses:[(o=(s=n.request.params)==null?void 0:s[0])==null?void 0:o.to]}),{txHashes:c})}catch(a){this.client.logger.warn(\\\"Error getting TVF params\\\",a)}return{}}),be(this,\\\"isValidContractData\\\",r=>{var n;if(!r)return!1;try{let i=r?.data||((n=r?.[0])==null?void 0:n.data);if(!i.startsWith(\\\"0x\\\"))return!1;let s=i.slice(2);return/^[0-9a-fA-F]*$/.test(s)?s.length%2===0:!1}catch{}return!1}),be(this,\\\"extractTxHashesFromResult\\\",(r,n)=>{try{let i=Bfe[r];if(typeof n==\\\"string\\\")return[n];let s=n[i.key];if(tx(s))return r===\\\"solana_signAllTransactions\\\"?s.map(o=>cde(o)):s;if(typeof s==\\\"string\\\")return[s]}catch(i){this.client.logger.warn(\\\"Error extracting tx hashes from result\\\",i)}return[]})}async processPendingMessageEvents(){try{let e=this.client.session.keys,r=this.client.core.relayer.messages.getWithoutAck(e);for(let[n,i]of Object.entries(r))for(let s of i)try{await this.onProviderMessageEvent({topic:n,message:s,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${s}`)}}catch(e){this.client.logger.warn(\\\"processPendingMessageEvents failed\\\",e)}}isInitialized(){if(!this.initialized){let{message:e}=Se(\\\"NOT_INITIALIZED\\\",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Js.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){let{topic:r,message:n,attestation:i,transportType:s}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(Z7)?this.client.auth.authKeys.get(Z7):{responseTopic:void 0,publicKey:void 0};try{let a=await this.client.core.crypto.decode(r,n,{receiverPublicKey:o,encoding:s===Dn.link_mode?xh:Xc});yf(a)?(this.client.core.history.set(r,a),await this.onRelayEventRequest({topic:r,payload:a,attestation:i,transportType:s,encryptedId:Kl(n)})):Fl(a)?(await this.client.core.history.resolve(a),await this.onRelayEventResponse({topic:r,payload:a,transportType:s}),this.client.core.history.delete(r,a.id)):await this.onRelayEventUnknownPayload({topic:r,payload:a,transportType:s}),await this.client.core.relayer.messages.ack(r,n)}catch(a){this.client.logger.error(a)}}registerExpirerEvents(){this.client.core.expirer.on(Jl.expired,async e=>{let{topic:r,id:n}=D7(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Se(\\\"EXPIRED\\\"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,Se(\\\"EXPIRED\\\"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession({topic:r,expirerHasDeleted:!0}),this.client.events.emit(\\\"session_expire\\\",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit(\\\"proposal_expire\\\",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(V1.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(V1.delete,e=>{this.addToRecentlyDeleted(e.topic,\\\"pairing\\\")})}isValidPairingTopic(e){if(!Hi(e,!1)){let{message:r}=Se(\\\"MISSING_OR_INVALID\\\",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:r}=Se(\\\"NO_MATCHING_KEY\\\",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(If(this.client.core.pairing.pairings.get(e).expiry)){let{message:r}=Se(\\\"EXPIRED\\\",`pairing topic: ${e}`);throw new Error(r)}}async isValidSessionTopic(e){if(!Hi(e,!1)){let{message:r}=Se(\\\"MISSING_OR_INVALID\\\",`session topic should be a string: ${e}`);throw new Error(r)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:r}=Se(\\\"NO_MATCHING_KEY\\\",`session topic doesn't exist: ${e}`);throw new Error(r)}if(If(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:r}=Se(\\\"EXPIRED\\\",`session topic: ${e}`);throw new Error(r)}if(!this.client.core.crypto.keychain.has(e)){let{message:r}=Se(\\\"MISSING_OR_INVALID\\\",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(r)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Hi(e,!1)){let{message:r}=Se(\\\"NO_MATCHING_KEY\\\",`session or pairing topic doesn't exist: ${e}`);throw new Error(r)}else{let{message:r}=Se(\\\"MISSING_OR_INVALID\\\",`session or pairing topic should be a string: ${e}`);throw new Error(r)}}async isValidProposalId(e){if(!jde(e)){let{message:r}=Se(\\\"MISSING_OR_INVALID\\\",`proposal id should be a number: ${e}`);throw new Error(r)}if(!this.client.proposal.keys.includes(e)){let{message:r}=Se(\\\"NO_MATCHING_KEY\\\",`proposal id doesn't exist: ${e}`);throw new Error(r)}if(If(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:r}=Se(\\\"EXPIRED\\\",`proposal id: ${e}`);throw new Error(r)}}},Lfe=class extends Sh{constructor(e,r){super(e,r,MQe,T$),this.core=e,this.logger=r}},C$=class extends Sh{constructor(e,r){super(e,r,DQe,T$),this.core=e,this.logger=r}},Ufe=class extends Sh{constructor(e,r){super(e,r,UQe,T$,n=>n.id),this.core=e,this.logger=r}},Ffe=class extends Sh{constructor(e,r){super(e,r,qQe,Q7,()=>Z7),this.core=e,this.logger=r}},jfe=class extends Sh{constructor(e,r){super(e,r,zQe,Q7),this.core=e,this.logger=r}},Hfe=class extends Sh{constructor(e,r){super(e,r,$Qe,Q7,n=>n.id),this.core=e,this.logger=r}},j$t=Object.defineProperty,H$t=(t,e,r)=>e in t?j$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ofe=(t,e,r)=>H$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),qfe=class{constructor(e,r){this.core=e,this.logger=r,Ofe(this,\\\"authKeys\\\"),Ofe(this,\\\"pairingTopics\\\"),Ofe(this,\\\"requests\\\"),this.authKeys=new Ffe(this.core,this.logger),this.pairingTopics=new jfe(this.core,this.logger),this.requests=new Hfe(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}},q$t=Object.defineProperty,z$t=(t,e,r)=>e in t?q$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ar=(t,e,r)=>z$t(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),S$=class t extends Dz{constructor(e){super(e),ar(this,\\\"protocol\\\",zfe),ar(this,\\\"version\\\",$fe),ar(this,\\\"name\\\",E$.name),ar(this,\\\"metadata\\\"),ar(this,\\\"core\\\"),ar(this,\\\"logger\\\"),ar(this,\\\"events\\\",new A$.EventEmitter),ar(this,\\\"engine\\\"),ar(this,\\\"session\\\"),ar(this,\\\"proposal\\\"),ar(this,\\\"pendingRequest\\\"),ar(this,\\\"auth\\\"),ar(this,\\\"signConfig\\\"),ar(this,\\\"on\\\",(n,i)=>this.events.on(n,i)),ar(this,\\\"once\\\",(n,i)=>this.events.once(n,i)),ar(this,\\\"off\\\",(n,i)=>this.events.off(n,i)),ar(this,\\\"removeListener\\\",(n,i)=>this.events.removeListener(n,i)),ar(this,\\\"removeAllListeners\\\",n=>this.events.removeAllListeners(n)),ar(this,\\\"connect\\\",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"pair\\\",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"approve\\\",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"reject\\\",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"update\\\",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"extend\\\",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"request\\\",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"respond\\\",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"ping\\\",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"emit\\\",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"disconnect\\\",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"find\\\",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"getPendingSessionRequests\\\",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),ar(this,\\\"authenticate\\\",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(s){throw this.logger.error(s.message),s}}),ar(this,\\\"formatAuthMessage\\\",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"approveSessionAuthenticate\\\",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),ar(this,\\\"rejectSessionAuthenticate\\\",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=e?.name||E$.name,this.metadata=Jue(e?.metadata),this.signConfig=e?.signConfig;let r=typeof e?.logger<\\\"u\\\"&&typeof e?.logger!=\\\"string\\\"?e.logger:(0,sh.default)(Ll({level:e?.logger||E$.logger}));this.core=e?.core||new NQe(e),this.logger=rr(r,this.name),this.session=new C$(this.core,this.logger),this.proposal=new Lfe(this.core,this.logger),this.pendingRequest=new Ufe(this.core,this.logger),this.engine=new Dfe(this),this.auth=new qfe(this.core,this.logger)}static async init(e){let r=new t(e);return await r.initialize(),r}get context(){return Ir(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace(\\\"Initialized\\\");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info(\\\"SignClient Initialization Success\\\"),setTimeout(()=>{this.engine.processRelayMessageCache()},(0,Ht.toMiliseconds)(Ht.ONE_SECOND))}catch(e){throw this.logger.info(\\\"SignClient Initialization Failure\\\"),this.logger.error(e.message),e}}},$$t=C$,V$t=S$});var J7=q(k$=>{\\\"use strict\\\";u();Object.defineProperty(k$,\\\"__esModule\\\",{value:!0});var W$t=(WQe(),mt(VQe)),Ds=(y$(),mt(WZe)),GQe=(C1(),mt(Sce)),aJe=(Mle(),mt(Ble)),kf=(l7(),mt(Bce)),cJe=(oh(),mt(Ra)),G$t=ho();function lpe(t){return t&&typeof t==\\\"object\\\"&&\\\"default\\\"in t?t:{default:t}}var K$t=lpe(W$t),Ah=lpe(aJe),Z$t=lpe(G$t),KQe=\\\"error\\\",Q$t=\\\"wss://relay.walletconnect.org\\\",J$t=\\\"wc\\\",Y$t=\\\"universal_provider\\\",I$=`${J$t}@2:${Y$t}:`,lJe=\\\"https://rpc.walletconnect.org/v1/\\\",Y4=\\\"generic\\\",X$t=`${lJe}bundler`,wd={DEFAULT_CHAIN_CHANGED:\\\"default_chain_changed\\\"};function eVt(){}function upe(t){return t==null||typeof t!=\\\"object\\\"&&typeof t!=\\\"function\\\"}function dpe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function tVt(t){if(upe(t))return t;if(Array.isArray(t)||dpe(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<\\\"u\\\"&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t),r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){let n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let n=new r(t.message);return n.stack=t.stack,n.name=t.name,n.cause=t.cause,n}if(typeof File<\\\"u\\\"&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t==\\\"object\\\"){let n=Object.create(e);return Object.assign(n,t)}return t}function ZQe(t){return typeof t==\\\"object\\\"&&t!==null}function uJe(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function dJe(t){return t==null?t===void 0?\\\"[object Undefined]\\\":\\\"[object Null]\\\":Object.prototype.toString.call(t)}var rVt=\\\"[object RegExp]\\\",fJe=\\\"[object String]\\\",pJe=\\\"[object Number]\\\",hJe=\\\"[object Boolean]\\\",mJe=\\\"[object Arguments]\\\",nVt=\\\"[object Symbol]\\\",iVt=\\\"[object Date]\\\",sVt=\\\"[object Map]\\\",oVt=\\\"[object Set]\\\",aVt=\\\"[object Array]\\\",cVt=\\\"[object ArrayBuffer]\\\",lVt=\\\"[object Object]\\\",uVt=\\\"[object DataView]\\\",dVt=\\\"[object Uint8Array]\\\",fVt=\\\"[object Uint8ClampedArray]\\\",pVt=\\\"[object Uint16Array]\\\",hVt=\\\"[object Uint32Array]\\\",mVt=\\\"[object Int8Array]\\\",gVt=\\\"[object Int16Array]\\\",yVt=\\\"[object Int32Array]\\\",bVt=\\\"[object Float32Array]\\\",wVt=\\\"[object Float64Array]\\\";function vVt(t,e){return X4(t,void 0,t,new Map,e)}function X4(t,e,r,n=new Map,i=void 0){let s=i?.(t,e,r,n);if(s!=null)return s;if(upe(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){let o=new Array(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=X4(t[a],a,r,n,i);return Object.hasOwn(t,\\\"index\\\")&&(o.index=t.index),Object.hasOwn(t,\\\"input\\\")&&(o.input=t.input),o}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let o=new RegExp(t.source,t.flags);return o.lastIndex=t.lastIndex,o}if(t instanceof Map){let o=new Map;n.set(t,o);for(let[a,c]of t)o.set(a,X4(c,a,r,n,i));return o}if(t instanceof Set){let o=new Set;n.set(t,o);for(let a of t)o.add(X4(a,void 0,r,n,i));return o}if(typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(t))return t.subarray();if(dpe(t)){let o=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,o);for(let a=0;a<t.length;a++)o[a]=X4(t[a],a,r,n,i);return o}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<\\\"u\\\"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let o=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,o),ix(o,t,r,n,i),o}if(typeof File<\\\"u\\\"&&t instanceof File){let o=new File([t],t.name,{type:t.type});return n.set(t,o),ix(o,t,r,n,i),o}if(t instanceof Blob){let o=new Blob([t],{type:t.type});return n.set(t,o),ix(o,t,r,n,i),o}if(t instanceof Error){let o=new t.constructor;return n.set(t,o),o.message=t.message,o.name=t.name,o.stack=t.stack,o.cause=t.cause,ix(o,t,r,n,i),o}if(typeof t==\\\"object\\\"&&xVt(t)){let o=Object.create(Object.getPrototypeOf(t));return n.set(t,o),ix(o,t,r,n,i),o}return t}function ix(t,e,r=t,n,i){let s=[...Object.keys(e),...uJe(e)];for(let o=0;o<s.length;o++){let a=s[o],c=Object.getOwnPropertyDescriptor(t,a);(c==null||c.writable)&&(t[a]=X4(e[a],a,r,n,i))}}function xVt(t){switch(dJe(t)){case mJe:case aVt:case cVt:case uVt:case hJe:case iVt:case bVt:case wVt:case mVt:case gVt:case yVt:case sVt:case pJe:case lVt:case rVt:case oVt:case fJe:case nVt:case dVt:case fVt:case pVt:case hVt:return!0;default:return!1}}function EVt(t,e){return vVt(t,(r,n,i,s)=>{let o=e?.(r,n,i,s);if(o!=null)return o;if(typeof t==\\\"object\\\")switch(Object.prototype.toString.call(t)){case pJe:case fJe:case hJe:{let a=new t.constructor(t?.valueOf());return ix(a,t),a}case mJe:{let a={};return ix(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}})}function QQe(t){return EVt(t)}function JQe(t){return t!==null&&typeof t==\\\"object\\\"&&dJe(t)===\\\"[object Arguments]\\\"}function _Vt(t){return dpe(t)}function CVt(t){if(typeof t!=\\\"object\\\"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!==\\\"[object Object]\\\"){let r=t[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${r}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function SVt(t,...e){let r=e.slice(0,-1),n=e[e.length-1],i=t;for(let s=0;s<r.length;s++){let o=r[s];i=Zfe(i,o,n,new Map)}return i}function Zfe(t,e,r,n){if(upe(t)&&(t=Object(t)),e==null||typeof e!=\\\"object\\\")return t;if(n.has(e))return tVt(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}let i=[...Object.keys(e),...uJe(e)];for(let s=0;s<i.length;s++){let o=i[s],a=e[o],c=t[o];if(JQe(a)&&(a={...a}),JQe(c)&&(c={...c}),typeof globalThis.Buffer<\\\"u\\\"&&globalThis.Buffer.isBuffer(a)&&(a=QQe(a)),Array.isArray(a))if(typeof c==\\\"object\\\"&&c!=null){let d=[],f=Reflect.ownKeys(c);for(let p=0;p<f.length;p++){let h=f[p];d[h]=c[h]}c=d}else c=[];let l=r(c,a,o,t,e,n);l!=null?t[o]=l:Array.isArray(a)||ZQe(c)&&ZQe(a)?t[o]=Zfe(c,a,r,n):c==null&&CVt(a)?t[o]=Zfe({},a,r,n):c==null&&_Vt(a)?t[o]=QQe(a):(c===void 0||a!==void 0)&&(t[o]=a)}return t}function AVt(t,...e){return SVt(t,...e,eVt)}var TVt=Object.defineProperty,IVt=Object.defineProperties,RVt=Object.getOwnPropertyDescriptors,YQe=Object.getOwnPropertySymbols,PVt=Object.prototype.hasOwnProperty,OVt=Object.prototype.propertyIsEnumerable,XQe=(t,e,r)=>e in t?TVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R$=(t,e)=>{for(var r in e||(e={}))PVt.call(e,r)&&XQe(t,r,e[r]);if(YQe)for(var r of YQe(e))OVt.call(e,r)&&XQe(t,r,e[r]);return t},NVt=(t,e)=>IVt(t,RVt(e));function Yl(t,e,r){var n;let i=Ds.parseChainId(t);return((n=e.rpcMap)==null?void 0:n[i.reference])||`${lJe}?chainId=${i.namespace}:${i.reference}&projectId=${r}`}function sx(t){return t.includes(\\\":\\\")?t.split(\\\":\\\")[1]:t}function gJe(t){return t.map(e=>`${e.split(\\\":\\\")[0]}:${e.split(\\\":\\\")[1]}`)}function kVt(t,e){let r=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!r.length)return[];let n=[];return r.forEach(i=>{let s=e.namespaces[i].accounts;n.push(...s)}),n}function P$(t={},e={}){let r=eJe(t),n=eJe(e);return AVt(r,n)}function eJe(t){var e,r,n,i,s;let o={};if(!Ds.isValidObject(t))return o;for(let[a,c]of Object.entries(t)){let l=Ds.isCaipNamespace(a)?[a]:c.chains,d=c.methods||[],f=c.events||[],p=c.rpcMap||{},h=Ds.parseNamespaceKey(a);o[h]=NVt(R$(R$({},o[h]),c),{chains:Ds.mergeArrays(l,(e=o[h])==null?void 0:e.chains),methods:Ds.mergeArrays(d,(r=o[h])==null?void 0:r.methods),events:Ds.mergeArrays(f,(n=o[h])==null?void 0:n.events)}),(Ds.isValidObject(p)||Ds.isValidObject(((i=o[h])==null?void 0:i.rpcMap)||{}))&&(o[h].rpcMap=R$(R$({},p),(s=o[h])==null?void 0:s.rpcMap))}return o}function tJe(t){return t.includes(\\\":\\\")?t.split(\\\":\\\")[2]:t}function rJe(t){let e={};for(let[r,n]of Object.entries(t)){let i=n.methods||[],s=n.events||[],o=n.accounts||[],a=Ds.isCaipNamespace(r)?[r]:n.chains?n.chains:gJe(n.accounts);e[r]={chains:a,methods:i,events:s,accounts:o}}return e}function Wfe(t){return typeof t==\\\"number\\\"?t:t.includes(\\\"0x\\\")?parseInt(t,16):(t=t.includes(\\\":\\\")?t.split(\\\":\\\")[1]:t,isNaN(Number(t))?t:Number(t))}var yJe={},Br=t=>yJe[t],Gfe=(t,e)=>{yJe[t]=e},BVt=Object.defineProperty,MVt=(t,e,r)=>e in t?BVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H4=(t,e,r)=>MVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Qfe=class{constructor(e){H4(this,\\\"name\\\",\\\"polkadot\\\"),H4(this,\\\"client\\\"),H4(this,\\\"httpProviders\\\"),H4(this,\\\"events\\\"),H4(this,\\\"namespace\\\"),H4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=sx(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},DVt=Object.defineProperty,LVt=Object.defineProperties,UVt=Object.getOwnPropertyDescriptors,nJe=Object.getOwnPropertySymbols,FVt=Object.prototype.hasOwnProperty,jVt=Object.prototype.propertyIsEnumerable,Jfe=(t,e,r)=>e in t?DVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,iJe=(t,e)=>{for(var r in e||(e={}))FVt.call(e,r)&&Jfe(t,r,e[r]);if(nJe)for(var r of nJe(e))jVt.call(e,r)&&Jfe(t,r,e[r]);return t},sJe=(t,e)=>LVt(t,UVt(e)),q4=(t,e,r)=>Jfe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Yfe=class{constructor(e){q4(this,\\\"name\\\",\\\"eip155\\\"),q4(this,\\\"client\\\"),q4(this,\\\"chainId\\\"),q4(this,\\\"namespace\\\"),q4(this,\\\"httpProviders\\\"),q4(this,\\\"events\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case\\\"eth_requestAccounts\\\":return this.getAccounts();case\\\"eth_accounts\\\":return this.getAccounts();case\\\"wallet_switchEthereumChain\\\":return await this.handleSwitchChain(e);case\\\"eth_chainId\\\":return parseInt(this.getDefaultChain());case\\\"wallet_getCapabilities\\\":return await this.getCapabilities(e);case\\\"wallet_getCallsStatus\\\":return await this.getCallStatus(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(parseInt(e),r),this.chainId=parseInt(e),this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}createHttpProvider(e,r){let n=r||Yl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new aJe.HttpConnection(n,Br(\\\"disableProviderPing\\\")))}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=parseInt(sx(r));e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}getHttpProvider(){let e=this.chainId,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}async handleSwitchChain(e){var r,n;let i=e.request.params?(r=e.request.params[0])==null?void 0:r.chainId:\\\"0x0\\\";i=i.startsWith(\\\"0x\\\")?i:`0x${i}`;let s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes(\\\"wallet_switchEthereumChain\\\"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var r,n,i,s,o;let a=(n=(r=e.request)==null?void 0:r.params)==null?void 0:n[0],c=((s=(i=e.request)==null?void 0:i.params)==null?void 0:s[1])||[],l=`${a}${c.join(\\\",\\\")}`;if(!a)throw new Error(\\\"Missing address parameter in `wallet_getCapabilities` request\\\");let d=this.client.session.get(e.topic),f=((o=d?.sessionProperties)==null?void 0:o.capabilities)||{};if(f!=null&&f[l])return f?.[l];let p=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:sJe(iJe({},d.sessionProperties||{}),{capabilities:sJe(iJe({},f||{}),{[l]:p})})})}catch(h){console.warn(\\\"Failed to update session with capabilities\\\",h)}return p}async getCallStatus(e){var r,n;let i=this.client.session.get(e.topic),s=(r=i.sessionProperties)==null?void 0:r.bundler_name;if(s){let a=this.getBundlerUrl(e.chainId,s);try{return await this.getUserOperationReceipt(a,e)}catch(c){console.warn(\\\"Failed to fetch call status from bundler\\\",c,a)}}let o=(n=i.sessionProperties)==null?void 0:n.bundler_url;if(o)try{return await this.getUserOperationReceipt(o,e)}catch(a){console.warn(\\\"Failed to fetch call status from custom bundler\\\",a,o)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw new Error(\\\"Fetching call status not approved by the wallet.\\\")}async getUserOperationReceipt(e,r){var n;let i=new URL(e),s=await fetch(i,{method:\\\"POST\\\",headers:{\\\"Content-Type\\\":\\\"application/json\\\"},body:JSON.stringify(cJe.formatJsonRpcRequest(\\\"eth_getUserOperationReceipt\\\",[(n=r.request.params)==null?void 0:n[0]]))});if(!s.ok)throw new Error(`Failed to fetch user operation receipt - ${s.status}`);return await s.json()}getBundlerUrl(e,r){return`${X$t}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${r}`}},HVt=Object.defineProperty,qVt=(t,e,r)=>e in t?HVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,z4=(t,e,r)=>qVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),Xfe=class{constructor(e){z4(this,\\\"name\\\",\\\"solana\\\"),z4(this,\\\"client\\\"),z4(this,\\\"httpProviders\\\"),z4(this,\\\"events\\\"),z4(this,\\\"namespace\\\"),z4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=sx(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},zVt=Object.defineProperty,$Vt=(t,e,r)=>e in t?zVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$4=(t,e,r)=>$Vt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),epe=class{constructor(e){$4(this,\\\"name\\\",\\\"cosmos\\\"),$4(this,\\\"client\\\"),$4(this,\\\"httpProviders\\\"),$4(this,\\\"events\\\"),$4(this,\\\"namespace\\\"),$4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=sx(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},VVt=Object.defineProperty,WVt=(t,e,r)=>e in t?VVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,V4=(t,e,r)=>WVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),tpe=class{constructor(e){V4(this,\\\"name\\\",\\\"algorand\\\"),V4(this,\\\"client\\\"),V4(this,\\\"httpProviders\\\"),V4(this,\\\"events\\\"),V4(this,\\\"namespace\\\"),V4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(!this.httpProviders[e]){let n=r||Yl(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);return typeof n>\\\"u\\\"?void 0:new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},GVt=Object.defineProperty,KVt=(t,e,r)=>e in t?GVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,W4=(t,e,r)=>KVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),rpe=class{constructor(e){W4(this,\\\"name\\\",\\\"cip34\\\"),W4(this,\\\"client\\\"),W4(this,\\\"httpProviders\\\"),W4(this,\\\"events\\\"),W4(this,\\\"namespace\\\"),W4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{let n=this.getCardanoRPCUrl(r),i=sx(r);e[i]=this.createHttpProvider(i,n)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}getCardanoRPCUrl(e){let r=this.namespace.rpcMap;if(r)return r[e]}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},ZVt=Object.defineProperty,QVt=(t,e,r)=>e in t?ZVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G4=(t,e,r)=>QVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),npe=class{constructor(e){G4(this,\\\"name\\\",\\\"elrond\\\"),G4(this,\\\"client\\\"),G4(this,\\\"httpProviders\\\"),G4(this,\\\"events\\\"),G4(this,\\\"namespace\\\"),G4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=sx(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},JVt=Object.defineProperty,YVt=(t,e,r)=>e in t?JVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,K4=(t,e,r)=>YVt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ipe=class{constructor(e){K4(this,\\\"name\\\",\\\"multiversx\\\"),K4(this,\\\"client\\\"),K4(this,\\\"httpProviders\\\"),K4(this,\\\"events\\\"),K4(this,\\\"namespace\\\"),K4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;let i=sx(r);e[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},XVt=Object.defineProperty,eWt=(t,e,r)=>e in t?XVt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Z4=(t,e,r)=>eWt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),spe=class{constructor(e){Z4(this,\\\"name\\\",\\\"near\\\"),Z4(this,\\\"client\\\"),Z4(this,\\\"httpProviders\\\"),Z4(this,\\\"events\\\"),Z4(this,\\\"namespace\\\"),Z4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){let n=r||Yl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{var n;e[r]=this.createHttpProvider(r,(n=this.namespace.rpcMap)==null?void 0:n[r])}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace);return typeof n>\\\"u\\\"?void 0:new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},tWt=Object.defineProperty,rWt=(t,e,r)=>e in t?tWt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q4=(t,e,r)=>rWt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ope=class{constructor(e){Q4(this,\\\"name\\\",\\\"tezos\\\"),Q4(this,\\\"client\\\"),Q4(this,\\\"httpProviders\\\"),Q4(this,\\\"events\\\"),Q4(this,\\\"namespace\\\"),Q4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,r){if(this.chainId=e,!this.httpProviders[e]){let n=r||Yl(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){let e=this.namespace.accounts;return e?e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2])||[]:[]}createHttpProviders(){let e={};return this.namespace.chains.forEach(r=>{e[r]=this.createHttpProvider(r)}),e}getHttpProvider(){let e=`${this.name}:${this.chainId}`,r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace);return typeof n>\\\"u\\\"?void 0:new kf.JsonRpcProvider(new Ah.default(n))}},nWt=Object.defineProperty,iWt=(t,e,r)=>e in t?nWt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J4=(t,e,r)=>iWt(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),ape=class{constructor(e){J4(this,\\\"name\\\",Y4),J4(this,\\\"client\\\"),J4(this,\\\"httpProviders\\\"),J4(this,\\\"events\\\"),J4(this,\\\"namespace\\\"),J4(this,\\\"chainId\\\"),this.namespace=e.namespace,this.events=Br(\\\"events\\\"),this.client=Br(\\\"client\\\"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,r){this.httpProviders[e]||this.setHttpProvider(e,r),this.chainId=e,this.events.emit(wd.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw new Error(\\\"ChainId not found\\\");return e.split(\\\":\\\")[1]}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(r=>r.split(\\\":\\\")[1]===this.chainId.toString()).map(r=>r.split(\\\":\\\")[2]))]:[]}createHttpProviders(){var e,r;let n={};return(r=(e=this.namespace)==null?void 0:e.accounts)==null||r.forEach(i=>{let s=Ds.parseChainId(i);n[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),n}getHttpProvider(e){let r=this.httpProviders[e];if(typeof r>\\\"u\\\")throw new Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,r){let n=this.createHttpProvider(e,r);n&&(this.httpProviders[e]=n)}createHttpProvider(e,r){let n=r||Yl(e,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);return new kf.JsonRpcProvider(new Ah.default(n,Br(\\\"disableProviderPing\\\")))}},sWt=Object.defineProperty,oWt=Object.defineProperties,aWt=Object.getOwnPropertyDescriptors,oJe=Object.getOwnPropertySymbols,cWt=Object.prototype.hasOwnProperty,lWt=Object.prototype.propertyIsEnumerable,cpe=(t,e,r)=>e in t?sWt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,O$=(t,e)=>{for(var r in e||(e={}))cWt.call(e,r)&&cpe(t,r,e[r]);if(oJe)for(var r of oJe(e))lWt.call(e,r)&&cpe(t,r,e[r]);return t},Kfe=(t,e)=>oWt(t,aWt(e)),bd=(t,e,r)=>cpe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r),N$=class t{constructor(e){bd(this,\\\"client\\\"),bd(this,\\\"namespaces\\\"),bd(this,\\\"optionalNamespaces\\\"),bd(this,\\\"sessionProperties\\\"),bd(this,\\\"scopedProperties\\\"),bd(this,\\\"events\\\",new Z$t.default),bd(this,\\\"rpcProviders\\\",{}),bd(this,\\\"session\\\"),bd(this,\\\"providerOpts\\\"),bd(this,\\\"logger\\\"),bd(this,\\\"uri\\\"),bd(this,\\\"disableProviderPing\\\",!1),this.providerOpts=e,this.logger=typeof e?.logger<\\\"u\\\"&&typeof e?.logger!=\\\"string\\\"?e.logger:GQe.pino(GQe.getDefaultLoggerOptions({level:e?.logger||KQe})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let r=new t(e);return await r.initialize(),r}async request(e,r,n){let[i,s]=this.validateChain(r);if(!this.session)throw new Error(\\\"Please call connect() before request()\\\");return await this.getProvider(i).request({request:O$({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:n})}sendAsync(e,r,n,i){let s=new Date().getTime();this.request(e,n,i).then(o=>r(null,cJe.formatJsonRpcResult(s,o))).catch(o=>r(o,void 0))}async enable(){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error(\\\"Please call connect() before enable()\\\");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:Ds.getSdkError(\\\"USER_DISCONNECTED\\\")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,r){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:n,response:i}=await this.client.authenticate(e,r);n&&(this.uri=n,this.events.emit(\\\"display_uri\\\",n));let s=await i();if(this.session=s.session,this.session){let o=rJe(this.session.namespaces);this.namespaces=P$(this.namespaces,o),await this.persist(\\\"namespaces\\\",this.namespaces),this.onConnect()}return s}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}removeListener(e,r){this.events.removeListener(e,r)}off(e,r){this.events.off(e,r)}get isWalletConnect(){return!0}async pair(e){let{uri:r,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties});r&&(this.uri=r,this.events.emit(\\\"display_uri\\\",r));let i=await n();this.session=i;let s=rJe(i.namespaces);return this.namespaces=P$(this.namespaces,s),await this.persist(\\\"namespaces\\\",this.namespaces),await this.persist(\\\"optionalNamespaces\\\",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,r){try{if(!this.session)return;let[n,i]=this.validateChain(e),s=this.getProvider(n);s.name===Y4?s.setDefaultChain(`${n}:${i}`,r):s.setDefaultChain(i,r)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(e={}){this.logger.info(\\\"Cleaning up inactive pairings...\\\");let r=this.client.pairing.getAll();if(Ds.isValidArray(r)){for(let n of r)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${r.length}`)}}abortPairingAttempt(){this.logger.warn(\\\"abortPairingAttempt is deprecated. This is now a no-op.\\\")}async checkStorage(){this.namespaces=await this.getFromStore(\\\"namespaces\\\")||{},this.optionalNamespaces=await this.getFromStore(\\\"optionalNamespaces\\\")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace(\\\"Initialized\\\"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,r;if(this.client=this.providerOpts.client||await K$t.default.init({core:this.providerOpts.core,logger:this.providerOpts.logger||KQe,relayUrl:this.providerOpts.relayUrl||Q$t,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(n){throw this.logger.error(\\\"Failed to get session\\\",n),new Error(`The provided session: ${(r=(e=this.providerOpts)==null?void 0:e.session)==null?void 0:r.topic} doesn't exist in the Sign client`)}else{let n=this.client.session.getAll();this.session=n[0]}this.logger.trace(\\\"SignClient Initialized\\\")}createProviders(){if(!this.client)throw new Error(\\\"Sign Client not initialized\\\");if(!this.session)throw new Error(\\\"Session not initialized. Please call connect() before enable()\\\");let e=[...new Set(Object.keys(this.session.namespaces).map(r=>Ds.parseNamespaceKey(r)))];Gfe(\\\"client\\\",this.client),Gfe(\\\"events\\\",this.events),Gfe(\\\"disableProviderPing\\\",this.disableProviderPing),e.forEach(r=>{if(!this.session)return;let n=kVt(r,this.session),i=gJe(n),s=P$(this.namespaces,this.optionalNamespaces),o=Kfe(O$({},s[r]),{accounts:n,chains:i});switch(r){case\\\"eip155\\\":this.rpcProviders[r]=new Yfe({namespace:o});break;case\\\"algorand\\\":this.rpcProviders[r]=new tpe({namespace:o});break;case\\\"solana\\\":this.rpcProviders[r]=new Xfe({namespace:o});break;case\\\"cosmos\\\":this.rpcProviders[r]=new epe({namespace:o});break;case\\\"polkadot\\\":this.rpcProviders[r]=new Qfe({namespace:o});break;case\\\"cip34\\\":this.rpcProviders[r]=new rpe({namespace:o});break;case\\\"elrond\\\":this.rpcProviders[r]=new npe({namespace:o});break;case\\\"multiversx\\\":this.rpcProviders[r]=new ipe({namespace:o});break;case\\\"near\\\":this.rpcProviders[r]=new spe({namespace:o});break;case\\\"tezos\\\":this.rpcProviders[r]=new ope({namespace:o});break;default:this.rpcProviders[Y4]?this.rpcProviders[Y4].updateNamespace(o):this.rpcProviders[Y4]=new ape({namespace:o})}})}registerEventListeners(){if(typeof this.client>\\\"u\\\")throw new Error(\\\"Sign Client is not initialized\\\");this.client.on(\\\"session_ping\\\",e=>{var r;let{topic:n}=e;n===((r=this.session)==null?void 0:r.topic)&&this.events.emit(\\\"session_ping\\\",e)}),this.client.on(\\\"session_event\\\",e=>{var r;let{params:n,topic:i}=e;if(i!==((r=this.session)==null?void 0:r.topic))return;let{event:s}=n;if(s.name===\\\"accountsChanged\\\"){let o=s.data;o&&Ds.isValidArray(o)&&this.events.emit(\\\"accountsChanged\\\",o.map(tJe))}else if(s.name===\\\"chainChanged\\\"){let o=n.chainId,a=n.event.data,c=Ds.parseNamespaceKey(o),l=Wfe(o)!==Wfe(a)?`${c}:${Wfe(a)}`:o;this.onChainChanged(l)}else this.events.emit(s.name,s.data);this.events.emit(\\\"session_event\\\",e)}),this.client.on(\\\"session_update\\\",({topic:e,params:r})=>{var n,i;if(e!==((n=this.session)==null?void 0:n.topic))return;let{namespaces:s}=r,o=(i=this.client)==null?void 0:i.session.get(e);this.session=Kfe(O$({},o),{namespaces:s}),this.onSessionUpdate(),this.events.emit(\\\"session_update\\\",{topic:e,params:r})}),this.client.on(\\\"session_delete\\\",async e=>{var r;e.topic===((r=this.session)==null?void 0:r.topic)&&(await this.cleanup(),this.events.emit(\\\"session_delete\\\",e),this.events.emit(\\\"disconnect\\\",Kfe(O$({},Ds.getSdkError(\\\"USER_DISCONNECTED\\\")),{data:e.topic})))}),this.on(wd.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Y4]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var r;this.getProvider(e).updateNamespace((r=this.session)==null?void 0:r.namespaces[e])})}setNamespaces(e){let{namespaces:r={},optionalNamespaces:n={},sessionProperties:i,scopedProperties:s}=e;this.optionalNamespaces=P$(r,n),this.sessionProperties=i,this.scopedProperties=s}validateChain(e){let[r,n]=e?.split(\\\":\\\")||[\\\"\\\",\\\"\\\"];if(!this.namespaces||!Object.keys(this.namespaces).length)return[r,n];if(r&&!Object.keys(this.namespaces||{}).map(o=>Ds.parseNamespaceKey(o)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&n)return[r,n];let i=Ds.parseNamespaceKey(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged(e,r=!1){if(!this.namespaces)return;let[n,i]=this.validateChain(e);if(!i)return;this.updateNamespaceChain(n,i),this.events.emit(\\\"chainChanged\\\",i);let s=this.getProvider(n).getDefaultChain();r||this.getProvider(n).setDefaultChain(i),this.emitAccountsChangedOnChainChange({namespace:n,previousChainId:s,newChainId:e}),await this.persist(\\\"namespaces\\\",this.namespaces)}emitAccountsChangedOnChainChange({namespace:e,previousChainId:r,newChainId:n}){var i,s;try{if(r===n)return;let o=(s=(i=this.session)==null?void 0:i.namespaces[e])==null?void 0:s.accounts;if(!o)return;let a=o.filter(c=>c.includes(`${n}:`)).map(tJe);if(!Ds.isValidArray(a))return;this.events.emit(\\\"accountsChanged\\\",a)}catch(o){this.logger.warn(\\\"Failed to emit accountsChanged on chain change\\\",o)}}updateNamespaceChain(e,r){if(!this.namespaces)return;let n=this.namespaces[e]?e:`${e}:${r}`,i={chains:[],methods:[],events:[],defaultChain:r};this.namespaces[n]?this.namespaces[n]&&(this.namespaces[n].defaultChain=r):this.namespaces[n]=i}onConnect(){this.createProviders(),this.events.emit(\\\"connect\\\",{session:this.session})}async cleanup(){this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore(\\\"namespaces\\\"),await this.deleteFromStore(\\\"optionalNamespaces\\\"),await this.deleteFromStore(\\\"sessionProperties\\\"),this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,r){var n;let i=((n=this.session)==null?void 0:n.topic)||\\\"\\\";await this.client.core.storage.setItem(`${I$}/${e}${i}`,r)}async getFromStore(e){var r;let n=((r=this.session)==null?void 0:r.topic)||\\\"\\\";return await this.client.core.storage.getItem(`${I$}/${e}${n}`)}async deleteFromStore(e){var r;let n=((r=this.session)==null?void 0:r.topic)||\\\"\\\";await this.client.core.storage.removeItem(`${I$}/${e}${n}`)}async cleanupStorage(){var e;try{if(((e=this.client)==null?void 0:e.session.length)>0)return;let r=await this.client.core.storage.getKeys();for(let n of r)n.startsWith(I$)&&await this.client.core.storage.removeItem(n)}catch(r){this.logger.warn(\\\"Failed to cleanup storage\\\",r)}}},uWt=N$;k$.UniversalProvider=uWt,k$.default=N$});var F0n,vd,fpe=x(()=>{u();F0n=Me(J7(),1);Ri();xz();lc();ea();D1();ld();S0();j2();Kc();Sf();q2();Gc();vd={getSIWX(){return ee.state.siwx},async initializeIfEnabled(){let t=ee.state.siwx,e=z.getActiveCaipAddress();if(!(t&&e))return;let[r,n,i]=e.split(\\\":\\\");if(z.checkIfSupportedNetwork(r))try{if((await t.getSessions(`${r}:${n}`,i)).length)return;await Dt.open({view:\\\"SIWXSignMessage\\\"})}catch(s){console.error(\\\"SIWXUtil:initializeIfEnabled\\\",s),Xe.sendEvent({type:\\\"track\\\",event:\\\"SIWX_AUTH_ERROR\\\",properties:this.getSIWXEventProperties()}),await me._getClient()?.disconnect().catch(console.error),de.reset(\\\"Connect\\\"),wr.showError(\\\"A problem occurred while trying initialize authentication\\\")}},async requestSignMessage(){let t=ee.state.siwx,e=oe.getPlainAddress(z.getActiveCaipAddress()),r=z.getActiveCaipNetwork(),n=me._getClient();if(!t)throw new Error(\\\"SIWX is not enabled\\\");if(!e)throw new Error(\\\"No ActiveCaipAddress found\\\");if(!r)throw new Error(\\\"No ActiveCaipNetwork or client found\\\");if(!n)throw new Error(\\\"No ConnectionController client found\\\");try{let i=await t.createMessage({chainId:r.caipNetworkId,accountAddress:e}),s=i.toString();ie.getConnectorId(r.chainNamespace)===_e.CONNECTOR_ID.AUTH&&de.pushTransactionStack({});let a=await n.signMessage(s);await t.addSession({data:i,message:s,signature:a}),Dt.close(),Xe.sendEvent({type:\\\"track\\\",event:\\\"SIWX_AUTH_SUCCESS\\\",properties:this.getSIWXEventProperties()})}catch(i){let s=this.getSIWXEventProperties();(!Dt.state.open||de.state.view===\\\"ApproveTransaction\\\")&&await Dt.open({view:\\\"SIWXSignMessage\\\"}),s.isSmartAccount?wr.showError(\\\"This application might not support Smart Accounts\\\"):wr.showError(\\\"Signature declined\\\"),Xe.sendEvent({type:\\\"track\\\",event:\\\"SIWX_AUTH_ERROR\\\",properties:s}),console.error(\\\"SWIXUtil:requestSignMessage\\\",i)}},async cancelSignMessage(){try{this.getSIWX()?.getRequired?.()?await me.disconnect():Dt.close(),de.reset(\\\"Connect\\\"),Xe.sendEvent({event:\\\"CLICK_CANCEL_SIWX\\\",type:\\\"track\\\",properties:this.getSIWXEventProperties()})}catch(t){console.error(\\\"SIWXUtil:cancelSignMessage\\\",t)}},async getSessions(){let t=ee.state.siwx,e=oe.getPlainAddress(z.getActiveCaipAddress()),r=z.getActiveCaipNetwork();return t&&e&&r?t.getSessions(r.caipNetworkId,e):[]},async isSIWXCloseDisabled(){let t=this.getSIWX();if(t){let e=de.state.view===\\\"ApproveTransaction\\\",r=de.state.view===\\\"SIWXSignMessage\\\";if(e||r)return t.getRequired?.()&&(await this.getSessions()).length===0}return!1},async universalProviderAuthenticate({universalProvider:t,chains:e,methods:r}){let n=vd.getSIWX(),i=new Set(e.map(a=>a.split(\\\":\\\")[0]));if(!n||i.size!==1||!i.has(\\\"eip155\\\"))return!1;let s=await n.createMessage({chainId:z.getActiveCaipNetwork()?.caipNetworkId||\\\"\\\",accountAddress:\\\"\\\"}),o=await t.authenticate({nonce:s.nonce,domain:s.domain,uri:s.uri,exp:s.expirationTime,iat:s.issuedAt,nbf:s.notBefore,requestId:s.requestId,version:s.version,resources:s.resources,statement:s.statement,chainId:s.chainId,methods:r,chains:[s.chainId,...e.filter(a=>a!==s.chainId)]});if(wr.showLoading(\\\"Authenticating...\\\",{autoClose:!1}),Ie.setConnectedWalletInfo({...o.session.peer.metadata,name:o.session.peer.metadata.name,icon:o.session.peer.metadata.icons?.[0],type:\\\"WALLET_CONNECT\\\"},Array.from(i)[0]),o?.auths?.length){let a=o.auths.map(c=>{let l=t.client.formatAuthMessage({request:c.p,iss:c.p.iss});return{data:{...c.p,accountAddress:c.p.iss.split(\\\":\\\").slice(-1).join(\\\"\\\"),chainId:c.p.iss.split(\\\":\\\").slice(2,4).join(\\\":\\\"),uri:c.p.aud,version:c.p.version||s.version,expirationTime:c.p.exp,issuedAt:c.p.iat,notBefore:c.p.nbf},message:l,signature:c.s.s,cacao:c}});try{await n.setSessions(a),Xe.sendEvent({type:\\\"track\\\",event:\\\"SIWX_AUTH_SUCCESS\\\",properties:vd.getSIWXEventProperties()})}catch(c){throw console.error(\\\"SIWX:universalProviderAuth - failed to set sessions\\\",c),Xe.sendEvent({type:\\\"track\\\",event:\\\"SIWX_AUTH_ERROR\\\",properties:vd.getSIWXEventProperties()}),await t.disconnect().catch(console.error),c}finally{wr.hide()}}return!0},getSIWXEventProperties(){let t=z.state.activeChain;return{network:z.state.activeCaipNetwork?.caipNetworkId||\\\"\\\",isSmartAccount:Ie.state.preferredAccountTypes?.[t]===T0.ACCOUNT_TYPES.SMART_ACCOUNT}},async clearSessions(){let t=this.getSIWX();t&&await t.setSessions([])}}});var Y7,bJe=x(()=>{u();j2();Sf();fpe();Y7={isUnsupportedChainView(){return de.state.view===\\\"UnsupportedChain\\\"||de.state.view===\\\"SwitchNetwork\\\"&&de.state.history.includes(\\\"UnsupportedChain\\\")},async safeClose(){if(this.isUnsupportedChainView()){Dt.shake();return}if(await vd.isSIWXCloseDisabled()){Dt.shake();return}Dt.close()}}});var xt=x(()=>{u();j2();Sf();lc();ea();LGe();D1();ld();q2();g4();vz();hue();Kc();z2();Ez();S0();gue();UGe();HGe();fue();due();mh();Gc();_0();fpe();bJe()});function X7(t,e){return ie.getConnectorId(t)===e}var wJe=x(()=>{u();ld()});function ppe(t){let e=Array.from(z.state.chains.keys()),r=[];return t?(r.push([t,z.state.chains.get(t)]),X7(t,_e.CONNECTOR_ID.WALLET_CONNECT)?e.forEach(n=>{n!==t&&X7(n,_e.CONNECTOR_ID.WALLET_CONNECT)&&r.push([n,z.state.chains.get(n)])}):X7(t,_e.CONNECTOR_ID.AUTH)&&e.forEach(n=>{n!==t&&X7(n,_e.CONNECTOR_ID.AUTH)&&r.push([n,z.state.chains.get(n)])})):r=Array.from(z.state.chains.entries()),r}var vJe=x(()=>{u();Ri();ea();wJe()});var xJe=x(()=>{u();vJe()});var qi,B$=x(()=>{u();qi={METMASK_CONNECTOR_NAME:\\\"MetaMask\\\",TRUST_CONNECTOR_NAME:\\\"Trust Wallet\\\",SOLFLARE_CONNECTOR_NAME:\\\"Solflare\\\",PHANTOM_CONNECTOR_NAME:\\\"Phantom\\\",COIN98_CONNECTOR_NAME:\\\"Coin98\\\",MAGIC_EDEN_CONNECTOR_NAME:\\\"Magic Eden\\\",BACKPACK_CONNECTOR_NAME:\\\"Backpack\\\",BITGET_CONNECTOR_NAME:\\\"Bitget Wallet\\\",FRONTIER_CONNECTOR_NAME:\\\"Frontier\\\",XVERSE_CONNECTOR_NAME:\\\"Xverse Wallet\\\",LEATHER_CONNECTOR_NAME:\\\"Leather\\\",EIP155:\\\"eip155\\\",ADD_CHAIN_METHOD:\\\"wallet_addEthereumChain\\\",EIP6963_ANNOUNCE_EVENT:\\\"eip6963:announceProvider\\\",EIP6963_REQUEST_EVENT:\\\"eip6963:requestProvider\\\",CONNECTOR_RDNS_MAP:{coinbaseWallet:\\\"com.coinbase.wallet\\\",coinbaseWalletSDK:\\\"com.coinbase.wallet\\\"},CONNECTOR_TYPE_EXTERNAL:\\\"EXTERNAL\\\",CONNECTOR_TYPE_WALLET_CONNECT:\\\"WALLET_CONNECT\\\",CONNECTOR_TYPE_INJECTED:\\\"INJECTED\\\",CONNECTOR_TYPE_ANNOUNCED:\\\"ANNOUNCED\\\",CONNECTOR_TYPE_AUTH:\\\"AUTH\\\",CONNECTOR_TYPE_MULTI_CHAIN:\\\"MULTI_CHAIN\\\",CONNECTOR_TYPE_W3M_AUTH:\\\"ID_AUTH\\\"}});var K1,hpe=x(()=>{u();Ri();B$();K1={ConnectorExplorerIds:{[_e.CONNECTOR_ID.COINBASE]:\\\"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa\\\",[_e.CONNECTOR_ID.COINBASE_SDK]:\\\"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa\\\",[_e.CONNECTOR_ID.SAFE]:\\\"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f\\\",[_e.CONNECTOR_ID.LEDGER]:\\\"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927\\\",[_e.CONNECTOR_ID.OKX]:\\\"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709\\\",[qi.METMASK_CONNECTOR_NAME]:\\\"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96\\\",[qi.TRUST_CONNECTOR_NAME]:\\\"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0\\\",[qi.SOLFLARE_CONNECTOR_NAME]:\\\"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79\\\",[qi.PHANTOM_CONNECTOR_NAME]:\\\"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393\\\",[qi.COIN98_CONNECTOR_NAME]:\\\"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01\\\",[qi.MAGIC_EDEN_CONNECTOR_NAME]:\\\"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6\\\",[qi.BACKPACK_CONNECTOR_NAME]:\\\"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0\\\",[qi.BITGET_CONNECTOR_NAME]:\\\"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662\\\",[qi.FRONTIER_CONNECTOR_NAME]:\\\"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041\\\",[qi.XVERSE_CONNECTOR_NAME]:\\\"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b\\\",[qi.LEATHER_CONNECTOR_NAME]:\\\"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13\\\"},NetworkImageIds:{1:\\\"ba0ba0cd-17c6-4806-ad93-f9d174f17900\\\",42161:\\\"3bff954d-5cb0-47a0-9a23-d20192e74600\\\",43114:\\\"30c46e53-e989-45fb-4549-be3bd4eb3b00\\\",56:\\\"93564157-2e8e-4ce7-81df-b264dbee9b00\\\",250:\\\"06b26297-fe0c-4733-5d6b-ffa5498aac00\\\",10:\\\"ab9c186a-c52f-464b-2906-ca59d760a400\\\",137:\\\"41d04d42-da3b-4453-8506-668cc0727900\\\",5e3:\\\"e86fae9b-b770-4eea-e520-150e12c81100\\\",295:\\\"6a97d510-cac8-4e58-c7ce-e8681b044c00\\\",11155111:\\\"e909ea0a-f92a-4512-c8fc-748044ea6800\\\",84532:\\\"a18a7ecd-e307-4360-4746-283182228e00\\\",1301:\\\"4eeea7ef-0014-4649-5d1d-07271a80f600\\\",130:\\\"2257980a-3463-48c6-cbac-a42d2a956e00\\\",10143:\\\"0a728e83-bacb-46db-7844-948f05434900\\\",100:\\\"02b53f6a-e3d4-479e-1cb4-21178987d100\\\",9001:\\\"f926ff41-260d-4028-635e-91913fc28e00\\\",324:\\\"b310f07f-4ef7-49f3-7073-2a0a39685800\\\",314:\\\"5a73b3dd-af74-424e-cae0-0de859ee9400\\\",4689:\\\"34e68754-e536-40da-c153-6ef2e7188a00\\\",1088:\\\"3897a66d-40b9-4833-162f-a2c90531c900\\\",1284:\\\"161038da-44ae-4ec7-1208-0ea569454b00\\\",1285:\\\"f1d73bb6-5450-4e18-38f7-fb6484264a00\\\",7777777:\\\"845c60df-d429-4991-e687-91ae45791600\\\",42220:\\\"ab781bbc-ccc6-418d-d32d-789b15da1f00\\\",8453:\\\"7289c336-3981-4081-c5f4-efc26ac64a00\\\",1313161554:\\\"3ff73439-a619-4894-9262-4470c773a100\\\",2020:\\\"b8101fc0-9c19-4b6f-ec65-f6dfff106e00\\\",2021:\\\"b8101fc0-9c19-4b6f-ec65-f6dfff106e00\\\",80094:\\\"e329c2c9-59b0-4a02-83e4-212ff3779900\\\",2741:\\\"fc2427d1-5af9-4a9c-8da5-6f94627cd900\\\",\\\"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\\\":\\\"a1b58899-f671-4276-6a5e-56ca5bd59700\\\",\\\"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\\\":\\\"a1b58899-f671-4276-6a5e-56ca5bd59700\\\",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:\\\"a1b58899-f671-4276-6a5e-56ca5bd59700\\\",\\\"000000000019d6689c085ae165831e93\\\":\\\"0b4838db-0161-4ffe-022d-532bf03dba00\\\",\\\"000000000933ea01ad0ee984209779ba\\\":\\\"39354064-d79b-420b-065d-f980c4b78200\\\"},ConnectorImageIds:{[_e.CONNECTOR_ID.COINBASE]:\\\"0c2840c3-5b04-4c44-9661-fbd4b49e1800\\\",[_e.CONNECTOR_ID.COINBASE_SDK]:\\\"0c2840c3-5b04-4c44-9661-fbd4b49e1800\\\",[_e.CONNECTOR_ID.SAFE]:\\\"461db637-8616-43ce-035a-d89b8a1d5800\\\",[_e.CONNECTOR_ID.LEDGER]:\\\"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300\\\",[_e.CONNECTOR_ID.WALLET_CONNECT]:\\\"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400\\\",[_e.CONNECTOR_ID.INJECTED]:\\\"07ba87ed-43aa-4adf-4540-9e6a2b9cae00\\\"},ConnectorNamesMap:{[_e.CONNECTOR_ID.INJECTED]:\\\"Browser Wallet\\\",[_e.CONNECTOR_ID.WALLET_CONNECT]:\\\"WalletConnect\\\",[_e.CONNECTOR_ID.COINBASE]:\\\"Coinbase\\\",[_e.CONNECTOR_ID.COINBASE_SDK]:\\\"Coinbase\\\",[_e.CONNECTOR_ID.LEDGER]:\\\"Ledger\\\",[_e.CONNECTOR_ID.SAFE]:\\\"Safe\\\"},ConnectorTypesMap:{[_e.CONNECTOR_ID.INJECTED]:\\\"INJECTED\\\",[_e.CONNECTOR_ID.WALLET_CONNECT]:\\\"WALLET_CONNECT\\\",[_e.CONNECTOR_ID.EIP6963]:\\\"ANNOUNCED\\\",[_e.CONNECTOR_ID.AUTH]:\\\"AUTH\\\"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]}});var ox,EJe=x(()=>{u();B$();ox={getCaipTokens(t){if(!t)return;let e={};return Object.entries(t).forEach(([r,n])=>{e[`${qi.EIP155}:${r}`]=n}),e},isLowerCaseMatch(t,e){return t?.toLowerCase()===e?.toLowerCase()}}});function fWt(){return typeof window<\\\"u\\\"}var dWt,Z1,_Je=x(()=>{u();dWt=new AbortController,Z1={EmbeddedWalletAbortController:dWt,UniversalProviderErrors:{UNAUTHORIZED_DOMAIN_NOT_ALLOWED:{message:\\\"Unauthorized: origin not allowed\\\",alertErrorKey:\\\"INVALID_APP_CONFIGURATION\\\"},JWT_VALIDATION_ERROR:{message:\\\"JWT validation error: JWT Token is not yet valid\\\",alertErrorKey:\\\"JWT_TOKEN_NOT_VALID\\\"},INVALID_KEY:{message:\\\"Unauthorized: invalid key\\\",alertErrorKey:\\\"INVALID_PROJECT_ID\\\"}},ALERT_ERRORS:{SWITCH_NETWORK_NOT_FOUND:{shortMessage:\\\"Network Not Found\\\",longMessage:\\\"Network not found - please make sure it is included in 'networks' array in createAppKit function\\\"},INVALID_APP_CONFIGURATION:{shortMessage:\\\"Invalid App Configuration\\\",longMessage:()=>`Origin ${fWt()?window.origin:\\\"unknown\\\"} not found on Allowlist - update configuration on cloud.reown.com`},IFRAME_LOAD_FAILED:{shortMessage:\\\"Network Error - Could not load embedded wallet\\\",longMessage:()=>\\\"There was an issue loading the embedded wallet. Please try again later.\\\"},IFRAME_REQUEST_TIMEOUT:{shortMessage:\\\"Embedded Wallet Request Timed Out\\\",longMessage:()=>\\\"There was an issue doing the request to the embedded wallet. Please try again later.\\\"},UNVERIFIED_DOMAIN:{shortMessage:\\\"Invalid App Configuration\\\",longMessage:()=>\\\"There was an issue loading the embedded wallet. Please verify that your domain is allowed at cloud.reown.com\\\"},JWT_TOKEN_NOT_VALID:{shortMessage:\\\"Session Expired\\\",longMessage:\\\"Invalid session found on UniversalProvider - please check your time settings and connect again\\\"},INVALID_PROJECT_ID:{shortMessage:\\\"Invalid App Configuration\\\",longMessage:\\\"Invalid Project ID - update configuration\\\"},PROJECT_ID_NOT_CONFIGURED:{shortMessage:\\\"Project ID Not Configured\\\",longMessage:\\\"Project ID Not Configured - update configuration on cloud.reown.com\\\"}}}});var mpe,CJe=x(()=>{u();C1();mpe={createLogger(t,e=\\\"error\\\"){let r=Ll({level:e}),{logger:n}=P2({opts:r});return n.error=(...i)=>{for(let s of i)if(s instanceof Error){t(s,...i);return}t(void 0,...i)},n}}});function ype(t,e){let r=new URL(\\\"https://rpc.walletconnect.org/v1/\\\");return r.searchParams.set(\\\"chainId\\\",t),r.searchParams.set(\\\"projectId\\\",e),r.toString()}var pWt,gpe,Q1,SJe=x(()=>{u();un();Ri();xt();hpe();pWt=\\\"rpc.walletconnect.org\\\";gpe=[\\\"near:mainnet\\\",\\\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\\\",\\\"eip155:1101\\\",\\\"eip155:56\\\",\\\"eip155:42161\\\",\\\"eip155:7777777\\\",\\\"eip155:59144\\\",\\\"eip155:324\\\",\\\"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\\\",\\\"eip155:5000\\\",\\\"solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz\\\",\\\"eip155:80084\\\",\\\"eip155:5003\\\",\\\"eip155:100\\\",\\\"eip155:8453\\\",\\\"eip155:42220\\\",\\\"eip155:1313161555\\\",\\\"eip155:17000\\\",\\\"eip155:1\\\",\\\"eip155:300\\\",\\\"eip155:1313161554\\\",\\\"eip155:1329\\\",\\\"eip155:84532\\\",\\\"eip155:421614\\\",\\\"eip155:11155111\\\",\\\"eip155:8217\\\",\\\"eip155:43114\\\",\\\"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\\\",\\\"eip155:999999999\\\",\\\"eip155:11155420\\\",\\\"eip155:80002\\\",\\\"eip155:97\\\",\\\"eip155:43113\\\",\\\"eip155:137\\\",\\\"eip155:10\\\",\\\"eip155:1301\\\",\\\"bip122:000000000019d6689c085ae165831e93\\\",\\\"bip122:000000000933ea01ad0ee984209779ba\\\"],Q1={extendRpcUrlWithProjectId(t,e){let r=!1;try{r=new URL(t).host===pWt}catch{r=!1}if(r){let n=new URL(t);return n.searchParams.has(\\\"projectId\\\")||n.searchParams.set(\\\"projectId\\\",e),n.toString()}return t},isCaipNetwork(t){return\\\"chainNamespace\\\"in t&&\\\"caipNetworkId\\\"in t},getChainNamespace(t){return this.isCaipNetwork(t)?t.chainNamespace:_e.CHAIN.EVM},getCaipNetworkId(t){return this.isCaipNetwork(t)?t.caipNetworkId:`${_e.CHAIN.EVM}:${t.id}`},getDefaultRpcUrl(t,e,r){let n=t.rpcUrls?.default?.http?.[0];return gpe.includes(e)?ype(e,r):n||\\\"\\\"},extendCaipNetwork(t,{customNetworkImageUrls:e,projectId:r,customRpcUrls:n}){let i=this.getChainNamespace(t),s=this.getCaipNetworkId(t),o=t.rpcUrls.default.http?.[0],a=this.getDefaultRpcUrl(t,s,r),c=t?.rpcUrls?.chainDefault?.http?.[0]||o,l=n?.[s]?.map(p=>p.url)||[],d=[...l,a],f=[...l];return c&&!f.includes(c)&&f.push(c),{...t,chainNamespace:i,caipNetworkId:s,assets:{imageId:K1.NetworkImageIds[t.id],imageUrl:e?.[t.id]},rpcUrls:{...t.rpcUrls,default:{http:d},chainDefault:{http:f}}}},extendCaipNetworks(t,{customNetworkImageUrls:e,projectId:r,customRpcUrls:n}){return t.map(i=>Q1.extendCaipNetwork(i,{customNetworkImageUrls:e,customRpcUrls:n,projectId:r}))},getViemTransport(t,e,r){let n=[];return r?.forEach(i=>{n.push(za(i.url,i.config))}),gpe.includes(t.caipNetworkId)&&n.push(za(ype(t.caipNetworkId,e),{fetchOptions:{headers:{\\\"Content-Type\\\":\\\"text/plain\\\"}}})),t?.rpcUrls?.default?.http?.forEach(i=>{n.push(za(i))}),ZB(n)},extendWagmiTransports(t,e,r){if(gpe.includes(t.caipNetworkId)){let n=this.getDefaultRpcUrl(t,t.caipNetworkId,e);return ZB([r,za(n)])}return r},getUnsupportedNetwork(t){return{id:t.split(\\\":\\\")[1],caipNetworkId:t,name:_e.UNSUPPORTED_NETWORK_NAME,chainNamespace:t.split(\\\":\\\")[0],nativeCurrency:{name:\\\"\\\",decimals:0,symbol:\\\"\\\"},rpcUrls:{default:{http:[]}}}},getCaipNetworkFromStorage(t){let e=Te.getActiveCaipNetworkId(),r=z.getAllRequestedCaipNetworks(),n=Array.from(z.state.chains?.keys()||[]),i=e?.split(\\\":\\\")[0],s=i?n.includes(i):!1,o=r?.find(c=>c.caipNetworkId===e);return s&&!o&&e?this.getUnsupportedNetwork(e):o||t||r?.[0]}}});var M$,tl,Qn,AJe=x(()=>{u();Kn();xo();M$={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0},tl=ot({providers:{...M$},providerIds:{...M$}}),Qn={state:tl,subscribeKey(t,e){return lr(tl,t,e)},subscribe(t){return Lr(tl,()=>{t(tl)})},subscribeProviders(t){return Lr(tl.providers,()=>t(tl.providers))},setProvider(t,e){e&&(tl.providers[t]=$l(e))},getProvider(t){return tl.providers[t]},setProviderId(t,e){e&&(tl.providerIds[t]=e)},getProviderId(t){if(t)return tl.providerIds[t]},reset(){tl.providers={...M$},tl.providerIds={...M$}},resetChain(t){tl.providers[t]=void 0,tl.providerIds[t]=void 0}}});var ax=x(()=>{u();B$();hpe();EJe();_Je();CJe();SJe();AJe()});var Bf,eR=x(()=>{u();Bf={ACCOUNT_TABS:[{label:\\\"Tokens\\\"},{label:\\\"NFTs\\\"},{label:\\\"Activity\\\"}],SECURE_SITE_ORIGIN:(typeof process<\\\"u\\\"&&typeof process.env<\\\"u\\\"?process.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||\\\"https://secure.walletconnect.org\\\",VIEW_DIRECTION:{Next:\\\"next\\\",Prev:\\\"prev\\\"},DEFAULT_CONNECT_METHOD_ORDER:[\\\"email\\\",\\\"social\\\",\\\"wallet\\\"],ANIMATION_DURATIONS:{HeaderText:120,ModalHeight:150,ViewTransition:150}}});var Xl,cx=x(()=>{u();xt();ax();lx();eR();Xl={filterOutDuplicatesByRDNS(t){let e=ee.state.enableEIP6963?ie.state.connectors:[],r=Te.getRecentWallets(),n=e.map(a=>a.info?.rdns).filter(Boolean),i=r.map(a=>a.rdns).filter(Boolean),s=n.concat(i);if(s.includes(\\\"io.metamask.mobile\\\")&&oe.isMobile()){let a=s.indexOf(\\\"io.metamask.mobile\\\");s[a]=\\\"io.metamask\\\"}return t.filter(a=>!s.includes(String(a?.rdns)))},filterOutDuplicatesByIds(t){let e=ie.state.connectors.filter(a=>a.type===\\\"ANNOUNCED\\\"||a.type===\\\"INJECTED\\\"),r=Te.getRecentWallets(),n=e.map(a=>a.explorerId),i=r.map(a=>a.id),s=n.concat(i);return t.filter(a=>!s.includes(a?.id))},filterOutDuplicateWallets(t){let e=this.filterOutDuplicatesByRDNS(t);return this.filterOutDuplicatesByIds(e)},markWalletsAsInstalled(t){let{connectors:e}=ie.state,{featuredWalletIds:r}=ee.state,n=e.filter(o=>o.type===\\\"ANNOUNCED\\\").reduce((o,a)=>(a.info?.rdns&&(o[a.info.rdns]=!0),o),{});return t.map(o=>({...o,installed:!!o.rdns&&!!n[o.rdns??\\\"\\\"]})).sort((o,a)=>{let c=Number(a.installed)-Number(o.installed);if(c!==0)return c;if(r?.length){let l=r.indexOf(o.id),d=r.indexOf(a.id);if(l!==-1&&d!==-1)return l-d;if(l!==-1)return-1;if(d!==-1)return 1}return 0})},getConnectOrderMethod(t,e){let r=t?.connectMethodsOrder||ee.state.features?.connectMethodsOrder,n=e||ie.state.connectors;if(r)return r;let{injected:i,announced:s}=rl.getConnectorsByType(n,ye.state.recommended,ye.state.featured),o=i.filter(rl.showConnector),a=s.filter(rl.showConnector);return o.length||a.length?[\\\"wallet\\\",\\\"email\\\",\\\"social\\\"]:Bf.DEFAULT_CONNECT_METHOD_ORDER},isExcluded(t){let e=!!t.rdns&&ye.state.excludedWallets.some(n=>n.rdns===t.rdns),r=!!t.name&&ye.state.excludedWallets.some(n=>ox.isLowerCaseMatch(n.name,t.name));return e||r}}});var rl,lx=x(()=>{u();Ri();xt();ax();cx();rl={getConnectorsByType(t,e,r){let{customWallets:n}=ee.state,i=Te.getRecentWallets(),s=Xl.filterOutDuplicateWallets(e),o=Xl.filterOutDuplicateWallets(r),a=t.filter(f=>f.type===\\\"MULTI_CHAIN\\\"),c=t.filter(f=>f.type===\\\"ANNOUNCED\\\"),l=t.filter(f=>f.type===\\\"INJECTED\\\"),d=t.filter(f=>f.type===\\\"EXTERNAL\\\");return{custom:n,recent:i,external:d,multiChain:a,announced:c,injected:l,recommended:s,featured:o}},showConnector(t){let e=t.info?.rdns,r=!!e&&ye.state.excludedWallets.some(i=>!!i.rdns&&i.rdns===e),n=!!t.name&&ye.state.excludedWallets.some(i=>ox.isLowerCaseMatch(i.name,t.name));return!(t.type===\\\"INJECTED\\\"&&(t.name===\\\"Browser Wallet\\\"&&(!oe.isMobile()||oe.isMobile()&&!e&&!me.checkInstalled())||r||n)||(t.type===\\\"ANNOUNCED\\\"||t.type===\\\"EXTERNAL\\\")&&(r||n))},getIsConnectedWithWC(){return Array.from(z.state.chains.values()).some(r=>ie.getConnectorId(r.namespace)===_e.CONNECTOR_ID.WALLET_CONNECT)},getConnectorTypeOrder({recommended:t,featured:e,custom:r,recent:n,announced:i,injected:s,multiChain:o,external:a,overriddenConnectors:c=ee.state.features?.connectorTypeOrder??[]}){let l=rl.getIsConnectedWithWC(),p=[{type:\\\"walletConnect\\\",isEnabled:ee.state.enableWalletConnect&&!l},{type:\\\"recent\\\",isEnabled:n.length>0},{type:\\\"injected\\\",isEnabled:[...s,...i,...o].length>0},{type:\\\"featured\\\",isEnabled:e.length>0},{type:\\\"custom\\\",isEnabled:r&&r.length>0},{type:\\\"external\\\",isEnabled:a.length>0},{type:\\\"recommended\\\",isEnabled:t.length>0}].filter(w=>w.isEnabled),h=new Set(p.map(w=>w.type)),m=c.filter(w=>h.has(w)).map(w=>({type:w,isEnabled:!0})),g=p.filter(({type:w})=>!m.some(({type:b})=>b===w));return Array.from(new Set([...m,...g].map(({type:w})=>w)))}}});var TJe=x(()=>{u();lx();eR();cx()});var IJe=x(()=>{u()});var D$,L$,bpe,RJe,tR,nl,we,PJe,wpe,vpe=x(()=>{u();D$=globalThis,L$=D$.ShadowRoot&&(D$.ShadyCSS===void 0||D$.ShadyCSS.nativeShadow)&&\\\"adoptedStyleSheets\\\"in Document.prototype&&\\\"replace\\\"in CSSStyleSheet.prototype,bpe=Symbol(),RJe=new WeakMap,tR=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==bpe)throw Error(\\\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\\\");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(L$&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=RJe.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&RJe.set(r,e))}return e}toString(){return this.cssText}},nl=t=>new tR(typeof t==\\\"string\\\"?t:t+\\\"\\\",void 0,bpe),we=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o==\\\"number\\\")return o;throw Error(\\\"Value passed to 'css' function must be a 'css' function result: \\\"+o+\\\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\\\")})(i)+t[s+1]),t[0]);return new tR(r,t,bpe)},PJe=(t,e)=>{if(L$)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement(\\\"style\\\"),i=D$.litNonce;i!==void 0&&n.setAttribute(\\\"nonce\\\",i),n.textContent=r.cssText,t.appendChild(n)}},wpe=L$?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r=\\\"\\\";for(let n of e.cssRules)r+=n.cssText;return nl(r)})(t):t});var hWt,mWt,gWt,yWt,bWt,wWt,J1,OJe,vWt,xWt,rR,nR,U$,NJe,L0,iR=x(()=>{u();vpe();vpe();({is:hWt,defineProperty:mWt,getOwnPropertyDescriptor:gWt,getOwnPropertyNames:yWt,getOwnPropertySymbols:bWt,getPrototypeOf:wWt}=Object),J1=globalThis,OJe=J1.trustedTypes,vWt=OJe?OJe.emptyScript:\\\"\\\",xWt=J1.reactiveElementPolyfillSupport,rR=(t,e)=>t,nR={toAttribute(t,e){switch(e){case Boolean:t=t?vWt:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},U$=(t,e)=>!hWt(t,e),NJe={attribute:!0,type:String,converter:nR,reflect:!1,useDefault:!1,hasChanged:U$};Symbol.metadata??(Symbol.metadata=Symbol(\\\"metadata\\\")),J1.litPropertyMetadata??(J1.litPropertyMetadata=new WeakMap);L0=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=NJe){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&mWt(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=gWt(this.prototype,e)??{get(){return this[r]},set(o){this[r]=o}};return{get:i,set(o){let a=i?.call(this);s?.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??NJe}static _$Ei(){if(this.hasOwnProperty(rR(\\\"elementProperties\\\")))return;let e=wWt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(rR(\\\"finalized\\\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(rR(\\\"properties\\\"))){let r=this.properties,n=[...yWt(r),...bWt(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(wpe(i))}else e!==void 0&&r.push(wpe(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n==\\\"string\\\"?n:typeof e==\\\"string\\\"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return PJe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:nR).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter==\\\"function\\\"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:nR;this._$Em=i;let a=o.fromAttribute(r,s.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??(n=i.getPropertyOptions(e)),!((n.hasChanged??U$)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},o){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??r??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:o}=s,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,s,a)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};L0.elementStyles=[],L0.shadowRootOptions={mode:\\\"open\\\"},L0[rR(\\\"elementProperties\\\")]=new Map,L0[rR(\\\"finalized\\\")]=new Map,xWt?.({ReactiveElement:L0}),(J1.reactiveElementVersions??(J1.reactiveElementVersions=[])).push(\\\"2.1.1\\\")});function HJe(t,e){if(!Cpe(t)||!t.hasOwnProperty(\\\"raw\\\"))throw Error(\\\"invalid template strings array\\\");return kJe!==void 0?kJe.createHTML(e):e}function px(t,e,r=t,n){if(e===xd)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=cR(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(e=px(t,i._$AS(t,e.values),i,n)),e}var oR,F$,kJe,Epe,U0,_pe,EWt,fx,aR,cR,Cpe,FJe,xpe,sR,BJe,MJe,ux,DJe,LJe,jJe,Spe,$,Y,Qyn,xd,zi,UJe,dx,qJe,lR,j$,e8,hx,H$,q$,z$,$$,zJe,_Wt,$Je,F0=x(()=>{u();oR=globalThis,F$=oR.trustedTypes,kJe=F$?F$.createPolicy(\\\"lit-html\\\",{createHTML:t=>t}):void 0,Epe=\\\"$lit$\\\",U0=`lit$${Math.random().toFixed(9).slice(2)}$`,_pe=\\\"?\\\"+U0,EWt=`<${_pe}>`,fx=document,aR=()=>fx.createComment(\\\"\\\"),cR=t=>t===null||typeof t!=\\\"object\\\"&&typeof t!=\\\"function\\\",Cpe=Array.isArray,FJe=t=>Cpe(t)||typeof t?.[Symbol.iterator]==\\\"function\\\",xpe=`[ \\t\\n\\\\f\\\\r]`,sR=/<(?:(!--|\\\\/[^a-zA-Z])|(\\\\/?[a-zA-Z][^>\\\\s]*)|(\\\\/?$))/g,BJe=/-->/g,MJe=/>/g,ux=RegExp(`>|${xpe}(?:([^\\\\\\\\s\\\"'>=/]+)(${xpe}*=${xpe}*(?:[^ \\t\\n\\\\f\\\\r\\\"'\\\\`<>=]|(\\\"|')|))|$)`,\\\"g\\\"),DJe=/'/g,LJe=/\\\"/g,jJe=/^(?:script|style|textarea|title)$/i,Spe=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),$=Spe(1),Y=Spe(2),Qyn=Spe(3),xd=Symbol.for(\\\"lit-noChange\\\"),zi=Symbol.for(\\\"lit-nothing\\\"),UJe=new WeakMap,dx=fx.createTreeWalker(fx,129);qJe=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?\\\"<svg>\\\":e===3?\\\"<math>\\\":\\\"\\\",o=sR;for(let a=0;a<r;a++){let c=t[a],l,d,f=-1,p=0;for(;p<c.length&&(o.lastIndex=p,d=o.exec(c),d!==null);)p=o.lastIndex,o===sR?d[1]===\\\"!--\\\"?o=BJe:d[1]!==void 0?o=MJe:d[2]!==void 0?(jJe.test(d[2])&&(i=RegExp(\\\"</\\\"+d[2],\\\"g\\\")),o=ux):d[3]!==void 0&&(o=ux):o===ux?d[0]===\\\">\\\"?(o=i??sR,f=-1):d[1]===void 0?f=-2:(f=o.lastIndex-d[2].length,l=d[1],o=d[3]===void 0?ux:d[3]==='\\\"'?LJe:DJe):o===LJe||o===DJe?o=ux:o===BJe||o===MJe?o=sR:(o=ux,i=void 0);let h=o===ux&&t[a+1].startsWith(\\\"/>\\\")?\\\" \\\":\\\"\\\";s+=o===sR?c+EWt:f>=0?(n.push(l),c.slice(0,f)+Epe+c.slice(f)+U0+h):c+U0+(f===-2?a:h)}return[HJe(t,s+(t[r]||\\\"<?>\\\")+(e===2?\\\"</svg>\\\":e===3?\\\"</math>\\\":\\\"\\\")),n]},lR=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,o=0,a=e.length-1,c=this.parts,[l,d]=qJe(e,r);if(this.el=t.createElement(l,n),dx.currentNode=this.el.content,r===2||r===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=dx.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let f of i.getAttributeNames())if(f.endsWith(Epe)){let p=d[o++],h=i.getAttribute(f).split(U0),m=/([.?@])?(.*)/.exec(p);c.push({type:1,index:s,name:m[2],strings:h,ctor:m[1]===\\\".\\\"?H$:m[1]===\\\"?\\\"?q$:m[1]===\\\"@\\\"?z$:hx}),i.removeAttribute(f)}else f.startsWith(U0)&&(c.push({type:6,index:s}),i.removeAttribute(f));if(jJe.test(i.tagName)){let f=i.textContent.split(U0),p=f.length-1;if(p>0){i.textContent=F$?F$.emptyScript:\\\"\\\";for(let h=0;h<p;h++)i.append(f[h],aR()),dx.nextNode(),c.push({type:2,index:++s});i.append(f[p],aR())}}}else if(i.nodeType===8)if(i.data===_pe)c.push({type:2,index:s});else{let f=-1;for(;(f=i.data.indexOf(U0,f+1))!==-1;)c.push({type:7,index:s}),f+=U0.length-1}s++}}static createElement(e,r){let n=fx.createElement(\\\"template\\\");return n.innerHTML=e,n}};j$=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??fx).importNode(r,!0);dx.currentNode=i;let s=dx.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new e8(s,s.nextSibling,this,e):c.type===1?l=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(l=new $$(s,this,e)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(s=dx.nextNode(),o++)}return dx.currentNode=fx,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},e8=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=zi,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=px(this,e,r),cR(e)?e===zi||e==null||e===\\\"\\\"?(this._$AH!==zi&&this._$AR(),this._$AH=zi):e!==this._$AH&&e!==xd&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):FJe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==zi&&cR(this._$AH)?this._$AA.nextSibling.data=e:this.T(fx.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n==\\\"number\\\"?this._$AC(e):(n.el===void 0&&(n.el=lR.createElement(HJe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new j$(i,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=UJe.get(e.strings);return r===void 0&&UJe.set(e.strings,r=new lR(e)),r}k(e){Cpe(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(aR()),this.O(aR()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},hx=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=zi,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==\\\"\\\"||n[1]!==\\\"\\\"?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=zi}_$AI(e,r=this,n,i){let s=this.strings,o=!1;if(s===void 0)e=px(this,e,r,0),o=!cR(e)||e!==this._$AH&&e!==xd,o&&(this._$AH=e);else{let a=e,c,l;for(e=s[0],c=0;c<s.length-1;c++)l=px(this,a[n+c],r,c),l===xd&&(l=this._$AH[c]),o||(o=!cR(l)||l!==this._$AH[c]),l===zi?e=zi:e!==zi&&(e+=(l??\\\"\\\")+s[c+1]),this._$AH[c]=l}o&&!i&&this.j(e)}j(e){e===zi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??\\\"\\\")}},H$=class extends hx{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===zi?void 0:e}},q$=class extends hx{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==zi)}},z$=class extends hx{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=px(this,e,r,0)??zi)===xd)return;let n=this._$AH,i=e===zi&&n!==zi||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==zi&&(n===zi||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==\\\"function\\\"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},$$=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){px(this,e)}},zJe={M:Epe,P:U0,A:_pe,C:1,L:qJe,R:j$,D:FJe,V:px,I:e8,H:hx,N:q$,U:z$,B:H$,F:$$},_Wt=oR.litHtmlPolyfillSupport;_Wt?.(lR,e8),(oR.litHtmlVersions??(oR.litHtmlVersions=[])).push(\\\"3.3.1\\\");$Je=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new e8(e.insertBefore(aR(),s),s,void 0,r??{})}return i._$AI(t),i}});var uR,se,CWt,VJe=x(()=>{u();iR();iR();F0();F0();uR=globalThis,se=class extends L0{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=$Je(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xd}};se._$litElement$=!0,se.finalized=!0,uR.litElementHydrateSupport?.({LitElement:se});CWt=uR.litElementPolyfillSupport;CWt?.({LitElement:se});(uR.litElementVersions??(uR.litElementVersions=[])).push(\\\"4.2.1\\\")});var WJe=x(()=>{u();});var Q=x(()=>{u();iR();F0();VJe();WJe()});function Ape(t,e){dR=document.createElement(\\\"style\\\"),Y1=document.createElement(\\\"style\\\"),X1=document.createElement(\\\"style\\\"),dR.textContent=t8(t).core.cssText,Y1.textContent=t8(t).dark.cssText,X1.textContent=t8(t).light.cssText,document.head.appendChild(dR),document.head.appendChild(Y1),document.head.appendChild(X1),V$(e)}function V$(t){Y1&&X1&&(t===\\\"light\\\"?(Y1.removeAttribute(\\\"media\\\"),X1.media=\\\"enabled\\\"):(X1.removeAttribute(\\\"media\\\"),Y1.media=\\\"enabled\\\"))}function Tpe(t){dR&&Y1&&X1&&(dR.textContent=t8(t).core.cssText,Y1.textContent=t8(t).dark.cssText,X1.textContent=t8(t).light.cssText)}function t8(t){return{core:we`\\n      @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');\\n      @keyframes w3m-shake {\\n        0% {\\n          transform: scale(1) rotate(0deg);\\n        }\\n        20% {\\n          transform: scale(1) rotate(-1deg);\\n        }\\n        40% {\\n          transform: scale(1) rotate(1.5deg);\\n        }\\n        60% {\\n          transform: scale(1) rotate(-1.5deg);\\n        }\\n        80% {\\n          transform: scale(1) rotate(1deg);\\n        }\\n        100% {\\n          transform: scale(1) rotate(0deg);\\n        }\\n      }\\n      @keyframes w3m-iframe-fade-out {\\n        0% {\\n          opacity: 1;\\n        }\\n        100% {\\n          opacity: 0;\\n        }\\n      }\\n      @keyframes w3m-iframe-zoom-in {\\n        0% {\\n          transform: translateY(50px);\\n          opacity: 0;\\n        }\\n        100% {\\n          transform: translateY(0px);\\n          opacity: 1;\\n        }\\n      }\\n      @keyframes w3m-iframe-zoom-in-mobile {\\n        0% {\\n          transform: scale(0.95);\\n          opacity: 0;\\n        }\\n        100% {\\n          transform: scale(1);\\n          opacity: 1;\\n        }\\n      }\\n      :root {\\n        --w3m-modal-width: 360px;\\n        --w3m-color-mix-strength: ${nl(t?.[\\\"--w3m-color-mix-strength\\\"]?`${t[\\\"--w3m-color-mix-strength\\\"]}%`:\\\"0%\\\")};\\n        --w3m-font-family: ${nl(t?.[\\\"--w3m-font-family\\\"]||\\\"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\\\")};\\n        --w3m-font-size-master: ${nl(t?.[\\\"--w3m-font-size-master\\\"]||\\\"10px\\\")};\\n        --w3m-border-radius-master: ${nl(t?.[\\\"--w3m-border-radius-master\\\"]||\\\"4px\\\")};\\n        --w3m-z-index: ${nl(t?.[\\\"--w3m-z-index\\\"]||999)};\\n\\n        --wui-font-family: var(--w3m-font-family);\\n\\n        --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);\\n        --wui-font-size-micro: var(--w3m-font-size-master);\\n        --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);\\n        --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);\\n        --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);\\n        --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);\\n        --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);\\n        --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2);\\n        --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);\\n        --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);\\n\\n        --wui-border-radius-5xs: var(--w3m-border-radius-master);\\n        --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);\\n        --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);\\n        --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);\\n        --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);\\n        --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);\\n        --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);\\n        --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);\\n        --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);\\n\\n        --wui-font-weight-light: 400;\\n        --wui-font-weight-regular: 500;\\n        --wui-font-weight-medium: 600;\\n        --wui-font-weight-bold: 700;\\n\\n        --wui-letter-spacing-2xl: -1.6px;\\n        --wui-letter-spacing-medium-title: -0.96px;\\n        --wui-letter-spacing-title-6: -0.88px;\\n        --wui-letter-spacing-large: -0.8px;\\n        --wui-letter-spacing-medium: -0.72px;\\n        --wui-letter-spacing-paragraph: -0.64px;\\n        --wui-letter-spacing-small: -0.56px;\\n        --wui-letter-spacing-tiny: -0.48px;\\n        --wui-letter-spacing-micro: -0.2px;\\n        --wui-letter-spacing-mini: -0.16px;\\n\\n        --wui-spacing-0: 0px;\\n        --wui-spacing-4xs: 2px;\\n        --wui-spacing-3xs: 4px;\\n        --wui-spacing-xxs: 6px;\\n        --wui-spacing-2xs: 7px;\\n        --wui-spacing-xs: 8px;\\n        --wui-spacing-1xs: 10px;\\n        --wui-spacing-s: 12px;\\n        --wui-spacing-m: 14px;\\n        --wui-spacing-l: 16px;\\n        --wui-spacing-2l: 18px;\\n        --wui-spacing-xl: 20px;\\n        --wui-spacing-xxl: 24px;\\n        --wui-spacing-2xl: 32px;\\n        --wui-spacing-3xl: 40px;\\n        --wui-spacing-4xl: 90px;\\n        --wui-spacing-5xl: 95px;\\n\\n        --wui-icon-box-size-xxs: 14px;\\n        --wui-icon-box-size-xs: 20px;\\n        --wui-icon-box-size-sm: 24px;\\n        --wui-icon-box-size-md: 32px;\\n        --wui-icon-box-size-mdl: 36px;\\n        --wui-icon-box-size-lg: 40px;\\n        --wui-icon-box-size-2lg: 48px;\\n        --wui-icon-box-size-xl: 64px;\\n\\n        --wui-icon-size-inherit: inherit;\\n        --wui-icon-size-xxs: 10px;\\n        --wui-icon-size-xs: 12px;\\n        --wui-icon-size-sm: 14px;\\n        --wui-icon-size-md: 16px;\\n        --wui-icon-size-mdl: 18px;\\n        --wui-icon-size-lg: 20px;\\n        --wui-icon-size-xl: 24px;\\n        --wui-icon-size-xxl: 28px;\\n\\n        --wui-wallet-image-size-inherit: inherit;\\n        --wui-wallet-image-size-sm: 40px;\\n        --wui-wallet-image-size-md: 56px;\\n        --wui-wallet-image-size-lg: 80px;\\n\\n        --wui-visual-size-size-inherit: inherit;\\n        --wui-visual-size-sm: 40px;\\n        --wui-visual-size-md: 55px;\\n        --wui-visual-size-lg: 80px;\\n\\n        --wui-box-size-md: 100px;\\n        --wui-box-size-lg: 120px;\\n\\n        --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);\\n        --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);\\n\\n        --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);\\n        --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);\\n        --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);\\n\\n        --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);\\n\\n        --wui-duration-lg: 200ms;\\n        --wui-duration-md: 125ms;\\n        --wui-duration-sm: 75ms;\\n\\n        --wui-path-network-sm: path(\\n          'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'\\n        );\\n\\n        --wui-path-network-md: path(\\n          'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'\\n        );\\n\\n        --wui-path-network-lg: path(\\n          'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'\\n        );\\n\\n        --wui-width-network-sm: 36px;\\n        --wui-width-network-md: 48px;\\n        --wui-width-network-lg: 86px;\\n\\n        --wui-height-network-sm: 40px;\\n        --wui-height-network-md: 54px;\\n        --wui-height-network-lg: 96px;\\n\\n        --wui-icon-size-network-xs: 12px;\\n        --wui-icon-size-network-sm: 16px;\\n        --wui-icon-size-network-md: 24px;\\n        --wui-icon-size-network-lg: 42px;\\n\\n        --wui-color-inherit: inherit;\\n\\n        --wui-color-inverse-100: #fff;\\n        --wui-color-inverse-000: #000;\\n\\n        --wui-cover: rgba(20, 20, 20, 0.8);\\n\\n        --wui-color-modal-bg: var(--wui-color-modal-bg-base);\\n\\n        --wui-color-accent-100: var(--wui-color-accent-base-100);\\n        --wui-color-accent-090: var(--wui-color-accent-base-090);\\n        --wui-color-accent-080: var(--wui-color-accent-base-080);\\n\\n        --wui-color-success-100: var(--wui-color-success-base-100);\\n        --wui-color-success-125: var(--wui-color-success-base-125);\\n\\n        --wui-color-warning-100: var(--wui-color-warning-base-100);\\n\\n        --wui-color-error-100: var(--wui-color-error-base-100);\\n        --wui-color-error-125: var(--wui-color-error-base-125);\\n\\n        --wui-color-blue-100: var(--wui-color-blue-base-100);\\n        --wui-color-blue-90: var(--wui-color-blue-base-90);\\n\\n        --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);\\n        --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);\\n        --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);\\n        --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);\\n\\n        --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100);\\n\\n        --wui-avatar-border: var(--wui-avatar-border-base);\\n\\n        --wui-thumbnail-border: var(--wui-thumbnail-border-base);\\n\\n        --wui-wallet-button-bg: var(--wui-wallet-button-bg-base);\\n\\n        --wui-box-shadow-blue: var(--wui-color-accent-glass-020);\\n      }\\n\\n      @supports (background: color-mix(in srgb, white 50%, black)) {\\n        :root {\\n          --wui-color-modal-bg: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-modal-bg-base)\\n          );\\n\\n          --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent);\\n\\n          --wui-color-accent-100: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 100%,\\n            transparent\\n          );\\n          --wui-color-accent-090: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 90%,\\n            transparent\\n          );\\n          --wui-color-accent-080: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 80%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-090: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 90%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-080: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 80%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-020: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 20%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-015: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 15%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-010: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 10%,\\n            transparent\\n          );\\n          --wui-color-accent-glass-005: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 5%,\\n            transparent\\n          );\\n          --wui-color-accent-002: color-mix(\\n            in srgb,\\n            var(--wui-color-accent-base-100) 2%,\\n            transparent\\n          );\\n\\n          --wui-color-fg-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-100)\\n          );\\n          --wui-color-fg-125: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-125)\\n          );\\n          --wui-color-fg-150: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-150)\\n          );\\n          --wui-color-fg-175: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-175)\\n          );\\n          --wui-color-fg-200: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-200)\\n          );\\n          --wui-color-fg-225: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-225)\\n          );\\n          --wui-color-fg-250: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-250)\\n          );\\n          --wui-color-fg-275: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-275)\\n          );\\n          --wui-color-fg-300: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-300)\\n          );\\n          --wui-color-fg-325: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-325)\\n          );\\n          --wui-color-fg-350: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-fg-350)\\n          );\\n\\n          --wui-color-bg-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-100)\\n          );\\n          --wui-color-bg-125: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-125)\\n          );\\n          --wui-color-bg-150: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-150)\\n          );\\n          --wui-color-bg-175: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-175)\\n          );\\n          --wui-color-bg-200: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-200)\\n          );\\n          --wui-color-bg-225: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-225)\\n          );\\n          --wui-color-bg-250: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-250)\\n          );\\n          --wui-color-bg-275: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-275)\\n          );\\n          --wui-color-bg-300: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-300)\\n          );\\n          --wui-color-bg-325: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-325)\\n          );\\n          --wui-color-bg-350: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-bg-350)\\n          );\\n\\n          --wui-color-success-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-success-base-100)\\n          );\\n          --wui-color-success-125: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-success-base-125)\\n          );\\n\\n          --wui-color-warning-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-warning-base-100)\\n          );\\n\\n          --wui-color-error-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-error-base-100)\\n          );\\n          --wui-color-blue-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-blue-base-100)\\n          );\\n          --wui-color-blue-90: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-blue-base-90)\\n          );\\n          --wui-color-error-125: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-color-error-base-125)\\n          );\\n\\n          --wui-icon-box-bg-error-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-icon-box-bg-error-base-100)\\n          );\\n          --wui-icon-box-bg-accent-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-icon-box-bg-blue-base-100)\\n          );\\n          --wui-icon-box-bg-success-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-icon-box-bg-success-base-100)\\n          );\\n          --wui-icon-box-bg-inverse-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-icon-box-bg-inverse-base-100)\\n          );\\n\\n          --wui-all-wallets-bg-100: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-all-wallets-bg-100)\\n          );\\n\\n          --wui-avatar-border: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-avatar-border-base)\\n          );\\n\\n          --wui-thumbnail-border: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-thumbnail-border-base)\\n          );\\n\\n          --wui-wallet-button-bg: color-mix(\\n            in srgb,\\n            var(--w3m-color-mix) var(--w3m-color-mix-strength),\\n            var(--wui-wallet-button-bg-base)\\n          );\\n        }\\n      }\\n    `,light:we`\\n      :root {\\n        --w3m-color-mix: ${nl(t?.[\\\"--w3m-color-mix\\\"]||\\\"#fff\\\")};\\n        --w3m-accent: ${nl(cd(t,\\\"dark\\\")[\\\"--w3m-accent\\\"])};\\n        --w3m-default: #fff;\\n\\n        --wui-color-modal-bg-base: ${nl(cd(t,\\\"dark\\\")[\\\"--w3m-background\\\"])};\\n        --wui-color-accent-base-100: var(--w3m-accent);\\n\\n        --wui-color-blueberry-100: hsla(230, 100%, 67%, 1);\\n        --wui-color-blueberry-090: hsla(231, 76%, 61%, 1);\\n        --wui-color-blueberry-080: hsla(230, 59%, 55%, 1);\\n        --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1);\\n\\n        --wui-color-fg-100: #e4e7e7;\\n        --wui-color-fg-125: #d0d5d5;\\n        --wui-color-fg-150: #a8b1b1;\\n        --wui-color-fg-175: #a8b0b0;\\n        --wui-color-fg-200: #949e9e;\\n        --wui-color-fg-225: #868f8f;\\n        --wui-color-fg-250: #788080;\\n        --wui-color-fg-275: #788181;\\n        --wui-color-fg-300: #6e7777;\\n        --wui-color-fg-325: #9a9a9a;\\n        --wui-color-fg-350: #363636;\\n\\n        --wui-color-bg-100: #141414;\\n        --wui-color-bg-125: #191a1a;\\n        --wui-color-bg-150: #1e1f1f;\\n        --wui-color-bg-175: #222525;\\n        --wui-color-bg-200: #272a2a;\\n        --wui-color-bg-225: #2c3030;\\n        --wui-color-bg-250: #313535;\\n        --wui-color-bg-275: #363b3b;\\n        --wui-color-bg-300: #3b4040;\\n        --wui-color-bg-325: #252525;\\n        --wui-color-bg-350: #ffffff;\\n\\n        --wui-color-success-base-100: #26d962;\\n        --wui-color-success-base-125: #30a46b;\\n\\n        --wui-color-warning-base-100: #f3a13f;\\n\\n        --wui-color-error-base-100: #f25a67;\\n        --wui-color-error-base-125: #df4a34;\\n\\n        --wui-color-blue-base-100: rgba(102, 125, 255, 1);\\n        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);\\n\\n        --wui-color-success-glass-001: rgba(38, 217, 98, 0.01);\\n        --wui-color-success-glass-002: rgba(38, 217, 98, 0.02);\\n        --wui-color-success-glass-005: rgba(38, 217, 98, 0.05);\\n        --wui-color-success-glass-010: rgba(38, 217, 98, 0.1);\\n        --wui-color-success-glass-015: rgba(38, 217, 98, 0.15);\\n        --wui-color-success-glass-020: rgba(38, 217, 98, 0.2);\\n        --wui-color-success-glass-025: rgba(38, 217, 98, 0.25);\\n        --wui-color-success-glass-030: rgba(38, 217, 98, 0.3);\\n        --wui-color-success-glass-060: rgba(38, 217, 98, 0.6);\\n        --wui-color-success-glass-080: rgba(38, 217, 98, 0.8);\\n\\n        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);\\n\\n        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);\\n\\n        --wui-color-error-glass-001: rgba(242, 90, 103, 0.01);\\n        --wui-color-error-glass-002: rgba(242, 90, 103, 0.02);\\n        --wui-color-error-glass-005: rgba(242, 90, 103, 0.05);\\n        --wui-color-error-glass-010: rgba(242, 90, 103, 0.1);\\n        --wui-color-error-glass-015: rgba(242, 90, 103, 0.15);\\n        --wui-color-error-glass-020: rgba(242, 90, 103, 0.2);\\n        --wui-color-error-glass-025: rgba(242, 90, 103, 0.25);\\n        --wui-color-error-glass-030: rgba(242, 90, 103, 0.3);\\n        --wui-color-error-glass-060: rgba(242, 90, 103, 0.6);\\n        --wui-color-error-glass-080: rgba(242, 90, 103, 0.8);\\n\\n        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);\\n\\n        --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01);\\n        --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02);\\n        --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05);\\n        --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1);\\n        --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15);\\n        --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2);\\n        --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25);\\n        --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3);\\n        --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6);\\n        --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8);\\n        --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9);\\n\\n        --wui-color-dark-glass-100: rgba(42, 42, 42, 1);\\n\\n        --wui-icon-box-bg-error-base-100: #3c2426;\\n        --wui-icon-box-bg-blue-base-100: #20303f;\\n        --wui-icon-box-bg-success-base-100: #1f3a28;\\n        --wui-icon-box-bg-inverse-base-100: #243240;\\n\\n        --wui-all-wallets-bg-100: #222b35;\\n\\n        --wui-avatar-border-base: #252525;\\n\\n        --wui-thumbnail-border-base: #252525;\\n\\n        --wui-wallet-button-bg-base: var(--wui-color-bg-125);\\n\\n        --w3m-card-embedded-shadow-color: rgb(17 17 18 / 25%);\\n      }\\n    `,dark:we`\\n      :root {\\n        --w3m-color-mix: ${nl(t?.[\\\"--w3m-color-mix\\\"]||\\\"#000\\\")};\\n        --w3m-accent: ${nl(cd(t,\\\"light\\\")[\\\"--w3m-accent\\\"])};\\n        --w3m-default: #000;\\n\\n        --wui-color-modal-bg-base: ${nl(cd(t,\\\"light\\\")[\\\"--w3m-background\\\"])};\\n        --wui-color-accent-base-100: var(--w3m-accent);\\n\\n        --wui-color-blueberry-100: hsla(231, 100%, 70%, 1);\\n        --wui-color-blueberry-090: hsla(231, 97%, 72%, 1);\\n        --wui-color-blueberry-080: hsla(231, 92%, 74%, 1);\\n\\n        --wui-color-fg-100: #141414;\\n        --wui-color-fg-125: #2d3131;\\n        --wui-color-fg-150: #474d4d;\\n        --wui-color-fg-175: #636d6d;\\n        --wui-color-fg-200: #798686;\\n        --wui-color-fg-225: #828f8f;\\n        --wui-color-fg-250: #8b9797;\\n        --wui-color-fg-275: #95a0a0;\\n        --wui-color-fg-300: #9ea9a9;\\n        --wui-color-fg-325: #9a9a9a;\\n        --wui-color-fg-350: #d0d0d0;\\n\\n        --wui-color-bg-100: #ffffff;\\n        --wui-color-bg-125: #f5fafa;\\n        --wui-color-bg-150: #f3f8f8;\\n        --wui-color-bg-175: #eef4f4;\\n        --wui-color-bg-200: #eaf1f1;\\n        --wui-color-bg-225: #e5eded;\\n        --wui-color-bg-250: #e1e9e9;\\n        --wui-color-bg-275: #dce7e7;\\n        --wui-color-bg-300: #d8e3e3;\\n        --wui-color-bg-325: #f3f3f3;\\n        --wui-color-bg-350: #202020;\\n\\n        --wui-color-success-base-100: #26b562;\\n        --wui-color-success-base-125: #30a46b;\\n\\n        --wui-color-warning-base-100: #f3a13f;\\n\\n        --wui-color-error-base-100: #f05142;\\n        --wui-color-error-base-125: #df4a34;\\n\\n        --wui-color-blue-base-100: rgba(102, 125, 255, 1);\\n        --wui-color-blue-base-90: rgba(102, 125, 255, 0.9);\\n\\n        --wui-color-success-glass-001: rgba(38, 181, 98, 0.01);\\n        --wui-color-success-glass-002: rgba(38, 181, 98, 0.02);\\n        --wui-color-success-glass-005: rgba(38, 181, 98, 0.05);\\n        --wui-color-success-glass-010: rgba(38, 181, 98, 0.1);\\n        --wui-color-success-glass-015: rgba(38, 181, 98, 0.15);\\n        --wui-color-success-glass-020: rgba(38, 181, 98, 0.2);\\n        --wui-color-success-glass-025: rgba(38, 181, 98, 0.25);\\n        --wui-color-success-glass-030: rgba(38, 181, 98, 0.3);\\n        --wui-color-success-glass-060: rgba(38, 181, 98, 0.6);\\n        --wui-color-success-glass-080: rgba(38, 181, 98, 0.8);\\n\\n        --wui-color-success-glass-reown-020: rgba(48, 164, 107, 0.2);\\n\\n        --wui-color-warning-glass-reown-020: rgba(243, 161, 63, 0.2);\\n\\n        --wui-color-error-glass-001: rgba(240, 81, 66, 0.01);\\n        --wui-color-error-glass-002: rgba(240, 81, 66, 0.02);\\n        --wui-color-error-glass-005: rgba(240, 81, 66, 0.05);\\n        --wui-color-error-glass-010: rgba(240, 81, 66, 0.1);\\n        --wui-color-error-glass-015: rgba(240, 81, 66, 0.15);\\n        --wui-color-error-glass-020: rgba(240, 81, 66, 0.2);\\n        --wui-color-error-glass-025: rgba(240, 81, 66, 0.25);\\n        --wui-color-error-glass-030: rgba(240, 81, 66, 0.3);\\n        --wui-color-error-glass-060: rgba(240, 81, 66, 0.6);\\n        --wui-color-error-glass-080: rgba(240, 81, 66, 0.8);\\n\\n        --wui-color-error-glass-reown-020: rgba(223, 74, 52, 0.2);\\n\\n        --wui-icon-box-bg-error-base-100: #f4dfdd;\\n        --wui-icon-box-bg-blue-base-100: #d9ecfb;\\n        --wui-icon-box-bg-success-base-100: #daf0e4;\\n        --wui-icon-box-bg-inverse-base-100: #dcecfc;\\n\\n        --wui-all-wallets-bg-100: #e8f1fa;\\n\\n        --wui-avatar-border-base: #f3f4f4;\\n\\n        --wui-thumbnail-border-base: #eaefef;\\n\\n        --wui-wallet-button-bg-base: var(--wui-color-bg-125);\\n\\n        --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01);\\n        --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02);\\n        --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05);\\n        --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1);\\n        --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15);\\n        --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2);\\n        --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25);\\n        --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3);\\n        --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6);\\n        --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8);\\n        --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9);\\n\\n        --wui-color-dark-glass-100: rgba(233, 233, 233, 1);\\n\\n        --w3m-card-embedded-shadow-color: rgb(224 225 233 / 25%);\\n      }\\n    `}}var dR,Y1,X1,ze,dr,Th,Er=x(()=>{u();Q();Ri();ze=we`\\n  *,\\n  *::after,\\n  *::before,\\n  :host {\\n    margin: 0;\\n    padding: 0;\\n    box-sizing: border-box;\\n    font-style: normal;\\n    text-rendering: optimizeSpeed;\\n    -webkit-font-smoothing: antialiased;\\n    -moz-osx-font-smoothing: grayscale;\\n    -webkit-tap-highlight-color: transparent;\\n    font-family: var(--wui-font-family);\\n    backface-visibility: hidden;\\n  }\\n`,dr=we`\\n  button,\\n  a {\\n    cursor: pointer;\\n    display: flex;\\n    justify-content: center;\\n    align-items: center;\\n    position: relative;\\n    transition:\\n      color var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      border var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1);\\n    will-change: background-color, color, border, box-shadow, border-radius;\\n    outline: none;\\n    border: none;\\n    column-gap: var(--wui-spacing-3xs);\\n    background-color: transparent;\\n    text-decoration: none;\\n  }\\n\\n  wui-flex {\\n    transition: border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);\\n    will-change: border-radius;\\n  }\\n\\n  button:disabled > wui-wallet-image,\\n  button:disabled > wui-all-wallets-image,\\n  button:disabled > wui-network-image,\\n  button:disabled > wui-image,\\n  button:disabled > wui-transaction-visual,\\n  button:disabled > wui-logo {\\n    filter: grayscale(1);\\n  }\\n\\n  @media (hover: hover) and (pointer: fine) {\\n    button:hover:enabled {\\n      background-color: var(--wui-color-gray-glass-005);\\n    }\\n\\n    button:active:enabled {\\n      background-color: var(--wui-color-gray-glass-010);\\n    }\\n  }\\n\\n  button:disabled > wui-icon-box {\\n    opacity: 0.5;\\n  }\\n\\n  input {\\n    border: none;\\n    outline: none;\\n    appearance: none;\\n  }\\n`,Th=we`\\n  .wui-color-inherit {\\n    color: var(--wui-color-inherit);\\n  }\\n\\n  .wui-color-accent-100 {\\n    color: var(--wui-color-accent-100);\\n  }\\n\\n  .wui-color-error-100 {\\n    color: var(--wui-color-error-100);\\n  }\\n\\n  .wui-color-blue-100 {\\n    color: var(--wui-color-blue-100);\\n  }\\n\\n  .wui-color-blue-90 {\\n    color: var(--wui-color-blue-90);\\n  }\\n\\n  .wui-color-error-125 {\\n    color: var(--wui-color-error-125);\\n  }\\n\\n  .wui-color-success-100 {\\n    color: var(--wui-color-success-100);\\n  }\\n\\n  .wui-color-success-125 {\\n    color: var(--wui-color-success-125);\\n  }\\n\\n  .wui-color-inverse-100 {\\n    color: var(--wui-color-inverse-100);\\n  }\\n\\n  .wui-color-inverse-000 {\\n    color: var(--wui-color-inverse-000);\\n  }\\n\\n  .wui-color-fg-100 {\\n    color: var(--wui-color-fg-100);\\n  }\\n\\n  .wui-color-fg-200 {\\n    color: var(--wui-color-fg-200);\\n  }\\n\\n  .wui-color-fg-300 {\\n    color: var(--wui-color-fg-300);\\n  }\\n\\n  .wui-color-fg-325 {\\n    color: var(--wui-color-fg-325);\\n  }\\n\\n  .wui-color-fg-350 {\\n    color: var(--wui-color-fg-350);\\n  }\\n\\n  .wui-bg-color-inherit {\\n    background-color: var(--wui-color-inherit);\\n  }\\n\\n  .wui-bg-color-blue-100 {\\n    background-color: var(--wui-color-accent-100);\\n  }\\n\\n  .wui-bg-color-error-100 {\\n    background-color: var(--wui-color-error-100);\\n  }\\n\\n  .wui-bg-color-error-125 {\\n    background-color: var(--wui-color-error-125);\\n  }\\n\\n  .wui-bg-color-success-100 {\\n    background-color: var(--wui-color-success-100);\\n  }\\n\\n  .wui-bg-color-success-125 {\\n    background-color: var(--wui-color-success-100);\\n  }\\n\\n  .wui-bg-color-inverse-100 {\\n    background-color: var(--wui-color-inverse-100);\\n  }\\n\\n  .wui-bg-color-inverse-000 {\\n    background-color: var(--wui-color-inverse-000);\\n  }\\n\\n  .wui-bg-color-fg-100 {\\n    background-color: var(--wui-color-fg-100);\\n  }\\n\\n  .wui-bg-color-fg-200 {\\n    background-color: var(--wui-color-fg-200);\\n  }\\n\\n  .wui-bg-color-fg-300 {\\n    background-color: var(--wui-color-fg-300);\\n  }\\n\\n  .wui-color-fg-325 {\\n    background-color: var(--wui-color-fg-325);\\n  }\\n\\n  .wui-color-fg-350 {\\n    background-color: var(--wui-color-fg-350);\\n  }\\n`});var Pi,fR=x(()=>{u();Pi={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t==\\\"string\\\")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat(\\\"en-US\\\",{month:\\\"short\\\",day:\\\"numeric\\\"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return\\\"\\\"}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:n}){return t.length<=e+r?t:n===\\\"end\\\"?`${t.substring(0,e)}...`:n===\\\"start\\\"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){let r=t.toLowerCase().replace(/^0x/iu,\\\"\\\").replace(/[^a-f0-9]/gu,\\\"\\\").substring(0,6).padEnd(6,\\\"0\\\"),n=this.hexToRgb(r),i=getComputedStyle(document.documentElement).getPropertyValue(\\\"--w3m-border-radius-master\\\"),o=100-3*Number(i?.replace(\\\"px\\\",\\\"\\\")),a=`${o}% ${o}% at 65% 40%`,c=[];for(let l=0;l<5;l+=1){let d=this.tintColor(n,.15*l);c.push(`rgb(${d[0]}, ${d[1]}, ${d[2]})`)}return`\\n    --local-color-1: ${c[0]};\\n    --local-color-2: ${c[1]};\\n    --local-color-3: ${c[2]};\\n    --local-color-4: ${c[3]};\\n    --local-color-5: ${c[4]};\\n    --local-radial-circle: ${a}\\n   `},hexToRgb(t){let e=parseInt(t,16),r=e>>16&255,n=e>>8&255,i=e&255;return[r,n,i]},tintColor(t,e){let[r,n,i]=t,s=Math.round(r+(255-r)*e),o=Math.round(n+(255-n)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(t){return{number:/^[0-9]+$/u}.number.test(t)},getColorTheme(t){return t||(typeof window<\\\"u\\\"&&window.matchMedia?window.matchMedia(\\\"(prefers-color-scheme: dark)\\\")?.matches?\\\"dark\\\":\\\"light\\\":\\\"dark\\\")},splitBalance(t){let e=t.split(\\\".\\\");return e.length===2?[e[0],e[1]]:[\\\"0\\\",\\\"00\\\"]},roundNumber(t,e,r){return t.toString().length>=e?Number(t).toFixed(r):t},formatNumberToLocalString(t,e=2){return t===void 0?\\\"0.00\\\":typeof t==\\\"number\\\"?t.toLocaleString(\\\"en-US\\\",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString(\\\"en-US\\\",{maximumFractionDigits:e,minimumFractionDigits:e})}}});var GJe=x(()=>{u();fR()});function SWt(t,e){let{kind:r,elements:n}=e;return{kind:r,elements:n,finisher(i){customElements.get(t)||customElements.define(t,i)}}}function AWt(t,e){return customElements.get(t)||customElements.define(t,e),e}function te(t){return function(r){return typeof r==\\\"function\\\"?AWt(t,r):SWt(t,r)}}var fr=x(()=>{u()});var pr=x(()=>{u();IJe();Er();fR();GJe();fr()});var mx,Ipe=x(()=>{u();mx={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603,DEFAULT_ALLOWED_ANCESTORS:[\\\"http://localhost:*\\\",\\\"https://*.pages.dev\\\",\\\"https://*.vercel.app\\\",\\\"https://*.ngrok-free.app\\\",\\\"https://secure-mobile.walletconnect.com\\\",\\\"https://secure-mobile.walletconnect.org\\\"]}});function j0(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}var r8=x(()=>{u()});var Rpe,KJe=x(()=>{u();r8();Rpe=j0({id:\\\"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\\\",name:\\\"Solana\\\",network:\\\"solana-mainnet\\\",nativeCurrency:{name:\\\"Solana\\\",symbol:\\\"SOL\\\",decimals:9},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}},blockExplorers:{default:{name:\\\"Solscan\\\",url:\\\"https://solscan.io\\\"}},testnet:!1,chainNamespace:\\\"solana\\\",caipNetworkId:\\\"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\\\",deprecatedCaipNetworkId:\\\"solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ\\\"})});var Ppe,ZJe=x(()=>{u();r8();Ppe=j0({id:\\\"EtWTRABZaYq6iMfeYKouRu166VU2xqa1\\\",name:\\\"Solana Devnet\\\",network:\\\"solana-devnet\\\",nativeCurrency:{name:\\\"Solana\\\",symbol:\\\"SOL\\\",decimals:9},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}},blockExplorers:{default:{name:\\\"Solscan\\\",url:\\\"https://solscan.io\\\"}},testnet:!0,chainNamespace:\\\"solana\\\",caipNetworkId:\\\"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1\\\",deprecatedCaipNetworkId:\\\"solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K\\\"})});var $1n,QJe=x(()=>{u();r8();$1n=j0({id:\\\"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\\\",name:\\\"Solana Testnet\\\",network:\\\"solana-testnet\\\",nativeCurrency:{name:\\\"Solana\\\",symbol:\\\"SOL\\\",decimals:9},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}},blockExplorers:{default:{name:\\\"Solscan\\\",url:\\\"https://solscan.io\\\"}},testnet:!0,chainNamespace:\\\"solana\\\",caipNetworkId:\\\"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z\\\"})});var JJe=x(()=>{u();KJe();ZJe();QJe()});var X1n,ebn,YJe=x(()=>{u();r8();X1n=j0({id:\\\"000000000019d6689c085ae165831e93\\\",caipNetworkId:\\\"bip122:000000000019d6689c085ae165831e93\\\",chainNamespace:\\\"bip122\\\",name:\\\"Bitcoin\\\",nativeCurrency:{name:\\\"Bitcoin\\\",symbol:\\\"BTC\\\",decimals:8},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}}}),ebn=j0({id:\\\"000000000933ea01ad0ee984209779ba\\\",caipNetworkId:\\\"bip122:000000000933ea01ad0ee984209779ba\\\",chainNamespace:\\\"bip122\\\",name:\\\"Bitcoin Testnet\\\",nativeCurrency:{name:\\\"Bitcoin\\\",symbol:\\\"BTC\\\",decimals:8},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}},testnet:!0})});var XJe=x(()=>{u();iX();JJe();YJe();r8()});var TWt,n8,eYe=x(()=>{u();xt();XJe();TWt={solana:[\\\"solana_signMessage\\\",\\\"solana_signTransaction\\\",\\\"solana_requestAccounts\\\",\\\"solana_getAccounts\\\",\\\"solana_signAllTransactions\\\",\\\"solana_signAndSendTransaction\\\"],eip155:[\\\"eth_accounts\\\",\\\"eth_requestAccounts\\\",\\\"eth_sendRawTransaction\\\",\\\"eth_sign\\\",\\\"eth_signTransaction\\\",\\\"eth_signTypedData\\\",\\\"eth_signTypedData_v3\\\",\\\"eth_signTypedData_v4\\\",\\\"eth_sendTransaction\\\",\\\"personal_sign\\\",\\\"wallet_switchEthereumChain\\\",\\\"wallet_addEthereumChain\\\",\\\"wallet_getPermissions\\\",\\\"wallet_requestPermissions\\\",\\\"wallet_registerOnboarding\\\",\\\"wallet_watchAsset\\\",\\\"wallet_scanQRCode\\\",\\\"wallet_getCallsStatus\\\",\\\"wallet_showCallsStatus\\\",\\\"wallet_sendCalls\\\",\\\"wallet_getCapabilities\\\",\\\"wallet_grantPermissions\\\",\\\"wallet_revokePermissions\\\",\\\"wallet_getAssets\\\"],bip122:[\\\"sendTransfer\\\",\\\"signMessage\\\",\\\"signPsbt\\\",\\\"getAccountAddresses\\\"]},n8={getMethodsByChainNamespace(t){return TWt[t]||[]},createDefaultNamespace(t){return{methods:this.getMethodsByChainNamespace(t),events:[\\\"accountsChanged\\\",\\\"chainChanged\\\"],chains:[],rpcMap:{}}},applyNamespaceOverrides(t,e){if(!e)return{...t};let r={...t},n=new Set;if(e.methods&&Object.keys(e.methods).forEach(i=>n.add(i)),e.chains&&Object.keys(e.chains).forEach(i=>n.add(i)),e.events&&Object.keys(e.events).forEach(i=>n.add(i)),e.rpcMap&&Object.keys(e.rpcMap).forEach(i=>{let[s]=i.split(\\\":\\\");s&&n.add(s)}),n.forEach(i=>{r[i]||(r[i]=this.createDefaultNamespace(i))}),e.methods&&Object.entries(e.methods).forEach(([i,s])=>{r[i]&&(r[i].methods=s)}),e.chains&&Object.entries(e.chains).forEach(([i,s])=>{r[i]&&(r[i].chains=s)}),e.events&&Object.entries(e.events).forEach(([i,s])=>{r[i]&&(r[i].events=s)}),e.rpcMap){let i=new Set;Object.entries(e.rpcMap).forEach(([s,o])=>{let[a,c]=s.split(\\\":\\\");!a||!c||!r[a]||(r[a].rpcMap||(r[a].rpcMap={}),i.has(a)||(r[a].rpcMap={},i.add(a)),r[a].rpcMap[c]=o)})}return r},createNamespaces(t,e){let r=t.reduce((n,i)=>{let{id:s,chainNamespace:o,rpcUrls:a}=i,c=a.default.http[0];n[o]||(n[o]=this.createDefaultNamespace(o));let l=`${o}:${s}`,d=n[o];switch(d.chains.push(l),l){case Rpe.caipNetworkId:d.chains.push(Rpe.deprecatedCaipNetworkId);break;case Ppe.caipNetworkId:d.chains.push(Ppe.deprecatedCaipNetworkId);break;default:}return d?.rpcMap&&c&&(d.rpcMap[s]=c),n},{});return this.applyNamespaceOverrides(r,e)},resolveReownName:async t=>{let e=await L1.resolveName(t);return(Object.values(e?.addresses)||[])[0]?.address||!1},getChainsFromNamespaces(t={}){return Object.values(t).flatMap(e=>{let r=e.chains||[],n=e.accounts.map(i=>{let[s,o]=i.split(\\\":\\\");return`${s}:${o}`});return Array.from(new Set([...r,...n]))})},isSessionEventData(t){return typeof t==\\\"object\\\"&&t!==null&&\\\"id\\\"in t&&\\\"topic\\\"in t&&\\\"params\\\"in t&&typeof t.params==\\\"object\\\"&&t.params!==null&&\\\"chainId\\\"in t.params&&\\\"event\\\"in t.params&&typeof t.params.event==\\\"object\\\"&&t.params.event!==null},isOriginAllowed(t,e,r){for(let n of[...e,...r])if(n.includes(\\\"*\\\")){let s=`^${n.replace(/[.*+?^${}()|[\\\\]\\\\\\\\]/gu,\\\"\\\\\\\\$&\\\").replace(/\\\\\\\\\\\\*/gu,\\\".*\\\")}$`;if(new RegExp(s,\\\"u\\\").test(t))return!0}else try{if(new URL(n).origin===t)return!0}catch{if(n===t)return!0}return!1}}});var tYe=x(()=>{u()});var Ope=x(()=>{u();Ipe();eYe();tYe()});var wbn,i8,IWt,Npe=x(()=>{u();wbn=Me(J7(),1);Ri();xt();ax();Ope();i8=class{constructor({provider:e,namespace:r}){this.id=_e.CONNECTOR_ID.WALLET_CONNECT,this.name=K1.ConnectorNamesMap[_e.CONNECTOR_ID.WALLET_CONNECT],this.type=\\\"WALLET_CONNECT\\\",this.imageId=K1.ConnectorImageIds[_e.CONNECTOR_ID.WALLET_CONNECT],this.getCaipNetworks=z.getCaipNetworks.bind(z),this.caipNetworks=this.getCaipNetworks(),this.provider=e,this.chain=r}get chains(){return this.getCaipNetworks()}async connectWalletConnect(){if(!await this.authenticate()){let r=this.getCaipNetworks(),n=ee.state.universalProviderConfigOverride,i=n8.createNamespaces(r,n);await this.provider.connect({optionalNamespaces:i})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){let e=this.chains.map(r=>r.caipNetworkId);return vd.universalProviderAuthenticate({universalProvider:this.provider,chains:e,methods:IWt})}},IWt=[\\\"eth_accounts\\\",\\\"eth_requestAccounts\\\",\\\"eth_sendRawTransaction\\\",\\\"eth_sign\\\",\\\"eth_signTransaction\\\",\\\"eth_signTypedData\\\",\\\"eth_signTypedData_v3\\\",\\\"eth_signTypedData_v4\\\",\\\"eth_sendTransaction\\\",\\\"personal_sign\\\",\\\"wallet_switchEthereumChain\\\",\\\"wallet_addEthereumChain\\\",\\\"wallet_getPermissions\\\",\\\"wallet_requestPermissions\\\",\\\"wallet_registerOnboarding\\\",\\\"wallet_watchAsset\\\",\\\"wallet_scanQRCode\\\",\\\"wallet_getCallsStatus\\\",\\\"wallet_sendCalls\\\",\\\"wallet_getCapabilities\\\",\\\"wallet_grantPermissions\\\",\\\"wallet_revokePermissions\\\",\\\"wallet_getAssets\\\"]});var Tbn,W$,rYe=x(()=>{u();Tbn=Me(J7(),1);Ri();xt();ax();Npe();W$=class{constructor(e){this.availableConnectors=[],this.eventListeners=new Map,this.getCaipNetworks=r=>z.getCaipNetworks(r),e&&this.construct(e)}construct(e){this.projectId=e.projectId,this.namespace=e.namespace,this.adapterType=e.adapterType}get connectors(){return this.availableConnectors}get networks(){return this.getCaipNetworks(this.namespace)}setAuthProvider(e){this.addConnector({id:_e.CONNECTOR_ID.AUTH,type:\\\"AUTH\\\",name:_e.CONNECTOR_NAMES.AUTH,provider:e,imageId:K1.ConnectorImageIds[_e.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}addConnector(...e){let r=new Set;this.availableConnectors=[...e,...this.availableConnectors].filter(n=>r.has(n.id)?!1:(r.add(n.id),!0)),this.emit(\\\"connectors\\\",this.availableConnectors)}setStatus(e,r){Ie.setStatus(e,r)}on(e,r){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e)?.add(r)}off(e,r){let n=this.eventListeners.get(e);n&&n.delete(r)}removeAllEventListeners(){this.eventListeners.forEach(e=>{e.clear()})}emit(e,r){let n=this.eventListeners.get(e);n&&n.forEach(i=>i(r))}async connectWalletConnect(e){return{clientId:(await this.getWalletConnectConnector().connectWalletConnect()).clientId}}async switchNetwork(e){let{caipNetwork:r,providerType:n}=e;if(!e.provider)return;let i=\\\"provider\\\"in e.provider?e.provider.provider:e.provider;if(n===\\\"WALLET_CONNECT\\\"){i.setDefaultChain(r.caipNetworkId);return}if(i&&n===\\\"AUTH\\\"){let s=i,o=Ie.state.preferredAccountTypes?.[r.chainNamespace];await s.switchNetwork(r.caipNetworkId);let a=await s.getUser({chainId:r.caipNetworkId,preferredAccountType:o});this.emit(\\\"switchNetwork\\\",a)}}getWalletConnectConnector(){let e=this.connectors.find(r=>r instanceof i8);if(!e)throw new Error(\\\"WalletConnectConnector not found\\\");return e}}});var G$,nYe=x(()=>{u();xH();un();Ri();xt();rYe();Npe();Ipe();G$=class extends W${setUniversalProvider(e){this.addConnector(new i8({provider:e,caipNetworks:this.getCaipNetworks(),namespace:this.namespace}))}async connect(e){return Promise.resolve({id:\\\"WALLET_CONNECT\\\",type:\\\"WALLET_CONNECT\\\",chainId:Number(e.chainId),provider:this.provider,address:\\\"\\\"})}async disconnect(){try{await this.getWalletConnectConnector().disconnect()}catch(e){console.warn(\\\"UniversalAdapter:disconnect - error\\\",e)}}async getAccounts({namespace:e}){let n=this.provider?.session?.namespaces?.[e]?.accounts?.map(i=>{let[,,s]=i.split(\\\":\\\");return s}).filter((i,s,o)=>o.indexOf(i)===s)||[];return Promise.resolve({accounts:n.map(i=>oe.createAccount(e,i,e===\\\"bip122\\\"?\\\"payment\\\":\\\"eoa\\\"))})}async syncConnectors(){return Promise.resolve()}async getBalance(e){if(!(e.caipNetwork&&Rt.BALANCE_SUPPORTED_CHAINS.includes(e.caipNetwork?.chainNamespace))||e.caipNetwork?.testnet)return{balance:\\\"0.00\\\",symbol:e.caipNetwork?.nativeCurrency.symbol||\\\"\\\"};if(Ie.state.balanceLoading&&e.chainId===z.state.activeCaipNetwork?.id)return{balance:Ie.state.balance||\\\"0.00\\\",symbol:Ie.state.balanceSymbol||\\\"\\\"};let i=(await Ie.fetchTokenBalance()).find(s=>s.chainId===`${e.caipNetwork?.chainNamespace}:${e.chainId}`&&s.symbol===e.caipNetwork?.nativeCurrency.symbol);return{balance:i?.quantity.numeric||\\\"0.00\\\",symbol:i?.symbol||e.caipNetwork?.nativeCurrency.symbol||\\\"\\\"}}async signMessage(e){let{provider:r,message:n,address:i}=e;if(!r)throw new Error(\\\"UniversalAdapter:signMessage - provider is undefined\\\");let s=\\\"\\\";return z.state.activeCaipNetwork?.chainNamespace===_e.CHAIN.SOLANA?s=(await r.request({method:\\\"solana_signMessage\\\",params:{message:yC.encode(new TextEncoder().encode(n)),pubkey:i}},z.state.activeCaipNetwork?.caipNetworkId)).signature:s=await r.request({method:\\\"personal_sign\\\",params:[n,i]},z.state.activeCaipNetwork?.caipNetworkId),{signature:s}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async sendTransaction(){return Promise.resolve({hash:\\\"\\\"})}walletGetAssets(e){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:\\\"\\\"})}parseUnits(){return 0n}formatUnits(){return\\\"0\\\"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve(\\\"0x\\\")}async syncConnection(){return Promise.resolve({id:\\\"WALLET_CONNECT\\\",type:\\\"WALLET_CONNECT\\\",chainId:1,provider:this.provider,address:\\\"\\\"})}async switchNetwork(e){let{caipNetwork:r}=e,n=this.getWalletConnectConnector();if(r.chainNamespace===_e.CHAIN.EVM)try{await n.provider?.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:He(r.id)}]})}catch(i){if(i.code===mx.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||i.code===mx.ERROR_INVALID_CHAIN_ID||i.code===mx.ERROR_CODE_DEFAULT||i?.data?.originalError?.code===mx.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await n.provider?.request({method:\\\"wallet_addEthereumChain\\\",params:[{chainId:He(r.id),rpcUrls:[r?.rpcUrls.chainDefault?.http],chainName:r.name,nativeCurrency:r.nativeCurrency,blockExplorerUrls:[r.blockExplorers?.default.url]}]})}catch{throw new Error(\\\"Chain is not supported\\\")}}n.provider.setDefaultChain(r.caipNetworkId)}getWalletConnectProvider(){return this.connectors.find(n=>n.type===\\\"WALLET_CONNECT\\\")?.provider}}});var RWt,K$,iYe,sYe=x(()=>{u();xt();RWt=[\\\"email\\\",\\\"socials\\\",\\\"swaps\\\",\\\"onramp\\\",\\\"activity\\\",\\\"reownBranding\\\"],K$={email:{apiFeatureName:\\\"social_login\\\",localFeatureName:\\\"email\\\",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!t?.config)return!1;let e=t.config;return!!t.isEnabled&&e.includes(\\\"email\\\")},processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.email:!!t},socials:{apiFeatureName:\\\"social_login\\\",localFeatureName:\\\"socials\\\",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!t?.config)return!1;let e=t.config;return t.isEnabled&&e.length>0?e.filter(r=>r!==\\\"email\\\"):!1},processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.socials:typeof t==\\\"boolean\\\"?t?Rt.DEFAULT_REMOTE_FEATURES.socials:!1:t},swaps:{apiFeatureName:\\\"swap\\\",localFeatureName:\\\"swaps\\\",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!t?.config)return!1;let e=t.config;return t.isEnabled&&e.length>0?e:!1},processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.swaps:typeof t==\\\"boolean\\\"?t?Rt.DEFAULT_REMOTE_FEATURES.swaps:!1:t},onramp:{apiFeatureName:\\\"onramp\\\",localFeatureName:\\\"onramp\\\",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>{if(!t?.config)return!1;let e=t.config;return t.isEnabled&&e.length>0?e:!1},processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.onramp:typeof t==\\\"boolean\\\"?t?Rt.DEFAULT_REMOTE_FEATURES.onramp:!1:t},activity:{apiFeatureName:\\\"activity\\\",localFeatureName:\\\"history\\\",returnType:!1,isLegacy:!0,isAvailableOnBasic:!1,processApi:t=>!!t.isEnabled,processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.activity:!!t},reownBranding:{apiFeatureName:\\\"reown_branding\\\",localFeatureName:\\\"reownBranding\\\",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:t=>!!t.isEnabled,processFallback:t=>t===void 0?Rt.DEFAULT_REMOTE_FEATURES.reownBranding:!!t}},iYe={localSettingsOverridden:new Set,getApiConfig(t,e){return e?.find(r=>r.id===t)},addWarning(t,e){if(t!==void 0){let r=K$[e],n=r.isLegacy?`\\\"features.${r.localFeatureName}\\\" (now \\\"${e}\\\")`:`\\\"features.${e}\\\"`;this.localSettingsOverridden.add(n)}},processFeature(t,e,r,n,i){let s=K$[t],o=e[s.localFeatureName];if(i&&!s.isAvailableOnBasic)return!1;if(n){let a=this.getApiConfig(s.apiFeatureName,r);return a?.config===null?this.processFallbackFeature(t,o):a?.config?(o!==void 0&&this.addWarning(o,t),this.processApiFeature(t,a)):!1}return this.processFallbackFeature(t,o)},processApiFeature(t,e){return K$[t].processApi(e)},processFallbackFeature(t,e){return K$[t].processFallback(e)},async fetchRemoteFeatures(t){let e=t.basic??!1,r=t.features||{};this.localSettingsOverridden.clear();let n=null,i=!1;try{n=await ye.fetchProjectConfig(),i=n!=null}catch(o){console.warn(\\\"[Reown Config] Failed to fetch remote project configuration. Using local/default values.\\\",o)}let s=i&&!e?Rt.DEFAULT_REMOTE_FEATURES:Rt.DEFAULT_REMOTE_FEATURES_DISABLED;try{for(let o of RWt){let a=this.processFeature(o,r,n,i,e);Object.assign(s,{[o]:a})}}catch(o){return console.warn(\\\"[Reown Config] Failed to process the configuration from Cloud. Using default values.\\\",o),Rt.DEFAULT_REMOTE_FEATURES}if(i&&this.localSettingsOverridden.size>0){let o=`Your local configuration for ${Array.from(this.localSettingsOverridden).join(\\\", \\\")} was ignored because a remote configuration was successfully fetched. Please manage these features via your project dashboard on dashboard.reown.com.`;Xo.open({shortMessage:\\\"Local configuration ignored\\\",longMessage:`[Reown Config Notice] ${o}`},\\\"warning\\\")}return s}}});var oYe,Z$,aYe=x(()=>{u();oYe=Me(J7(),1);Ri();xt();xJe();TJe();pr();ax();ax();nYe();sYe();Ope();Z$=class{constructor(e){this.chainNamespaces=[],this.remoteFeatures={},this.reportedAlertErrors={},this.getCaipNetwork=(r,n)=>{if(r){let i=z.getNetworkData(r)?.requestedCaipNetworks?.find(a=>a.id===n);if(i)return i;let s=z.getNetworkData(r)?.caipNetwork;return s||z.getRequestedCaipNetworks(r).filter(a=>a.chainNamespace===r)?.[0]}return z.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{let r=this.getCaipNetwork();if(r)return r.id},this.getCaipNetworks=r=>z.getCaipNetworks(r),this.getActiveChainNamespace=()=>z.state.activeChain,this.setRequestedCaipNetworks=(r,n)=>{z.setRequestedCaipNetworks(r,n)},this.getApprovedCaipNetworkIds=()=>z.getAllApprovedCaipNetworkIds(),this.getCaipAddress=r=>z.state.activeChain===r||!r?z.state.activeCaipAddress:z.getAccountProp(\\\"caipAddress\\\",r),this.setClientId=r=>{Qe.setClientId(r)},this.getProvider=r=>Qn.getProvider(r),this.getProviderType=r=>Qn.getProviderId(r),this.getPreferredAccountType=r=>Ie.state.preferredAccountTypes?.[r],this.setCaipAddress=(r,n)=>{Ie.setCaipAddress(r,n),r&&ee.state.enableEmbedded&&this.close()},this.setBalance=(r,n,i)=>{Ie.setBalance(r,n,i)},this.setProfileName=(r,n)=>{Ie.setProfileName(r,n)},this.setProfileImage=(r,n)=>{Ie.setProfileImage(r,n)},this.setUser=(r,n)=>{Ie.setUser(r,n)},this.resetAccount=r=>{Ie.resetAccount(r)},this.setCaipNetwork=r=>{z.setActiveCaipNetwork(r)},this.setCaipNetworkOfNamespace=(r,n)=>{z.setChainNetworkData(n,{caipNetwork:r})},this.setAllAccounts=(r,n)=>{Ie.setAllAccounts(r,n),ee.setHasMultipleAddresses(r?.length>1)},this.setStatus=(r,n)=>{Ie.setStatus(r,n),ie.isConnected()?Te.setConnectionStatus(\\\"connected\\\"):Te.setConnectionStatus(\\\"disconnected\\\")},this.getAddressByChainNamespace=r=>z.getAccountProp(\\\"address\\\",r),this.setConnectors=r=>{let n=[...ie.state.allConnectors,...r];ie.setConnectors(n)},this.setConnections=(r,n)=>{me.setConnections(r,n)},this.fetchIdentity=r=>Qe.fetchIdentity(r),this.getReownName=r=>L1.getNamesForAddress(r),this.getConnectors=()=>ie.getConnectors(),this.getConnectorImage=r=>sr.getConnectorImage(r),this.setConnectedWalletInfo=(r,n)=>{let i=Qn.getProviderId(n),s=r?{...r,type:i}:void 0;Ie.setConnectedWalletInfo(s,n)},this.getIsConnectedState=()=>!!z.state.activeCaipAddress,this.addAddressLabel=(r,n,i)=>{Ie.addAddressLabel(r,n,i)},this.removeAddressLabel=(r,n)=>{Ie.removeAddressLabel(r,n)},this.getAddress=r=>z.state.activeChain===r||!r?Ie.state.address:z.getAccountProp(\\\"address\\\",r),this.setApprovedCaipNetworksData=r=>z.setApprovedCaipNetworksData(r),this.resetNetwork=r=>{z.resetNetwork(r)},this.addConnector=r=>{ie.addConnector(r)},this.resetWcConnection=()=>{me.resetWcConnection()},this.setAddressExplorerUrl=(r,n)=>{Ie.setAddressExplorerUrl(r,n)},this.setSmartAccountDeployed=(r,n)=>{Ie.setSmartAccountDeployed(r,n)},this.setSmartAccountEnabledNetworks=(r,n)=>{z.setSmartAccountEnabledNetworks(r,n)},this.setPreferredAccountType=(r,n)=>{Ie.setPreferredAccountType(r,n)},this.setEIP6963Enabled=r=>{ee.setEIP6963Enabled(r)},this.handleUnsafeRPCRequest=()=>{if(this.isOpen()){if(this.isTransactionStackEmpty())return;this.redirect(\\\"ApproveTransaction\\\")}else this.open({view:\\\"ApproveTransaction\\\"})},this.options=e,this.version=e.sdkVersion,this.caipNetworks=this.extendCaipNetworks(e),this.chainNamespaces=this.getChainNamespacesSet(e.adapters,this.caipNetworks),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.chainAdapters=this.createAdapters(e.adapters),this.readyPromise=this.initialize(e)}getChainNamespacesSet(e,r){let n=e?.map(s=>s.namespace).filter(s=>!!s);if(n?.length)return[...new Set(n)];let i=r?.map(s=>s.chainNamespace);return[...new Set(i)]}async initialize(e){this.initializeProjectSettings(e),this.initControllers(e),await this.initChainAdapters(),this.sendInitializeEvent(e),await this.syncExistingConnection(),this.remoteFeatures=await iYe.fetchRemoteFeatures(e),ee.setRemoteFeatures(this.remoteFeatures),this.remoteFeatures.onramp&&S7.setOnrampProviders(this.remoteFeatures.onramp),(ee.state.remoteFeatures?.email||Array.isArray(ee.state.remoteFeatures?.socials)&&ee.state.remoteFeatures?.socials.length>0)&&await this.checkAllowedOrigins()}async checkAllowedOrigins(){let e=await ye.fetchAllowedOrigins();if(e&&oe.isClient()){let r=window.location.origin;n8.isOriginAllowed(r,e,mx.DEFAULT_ALLOWED_ANCESTORS)||Xo.open(Z1.ALERT_ERRORS.INVALID_APP_CONFIGURATION,\\\"error\\\")}else Xo.open(Z1.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,\\\"error\\\")}sendInitializeEvent(e){let{...r}=e;delete r.adapters,delete r.universalProvider,Xe.sendEvent({type:\\\"track\\\",event:\\\"INITIALIZE\\\",properties:{...r,networks:e.networks.map(n=>n.id),siweConfig:{options:e.siweConfig?.options||{}}}})}initControllers(e){this.initializeOptionsController(e),this.initializeChainController(e),this.initializeThemeController(e),this.initializeConnectionController(e),this.initializeConnectorController()}initializeThemeController(e){e.themeMode&&ji.setThemeMode(e.themeMode),e.themeVariables&&ji.setThemeVariables(e.themeVariables)}initializeChainController(e){if(!this.connectionControllerClient||!this.networkControllerClient)throw new Error(\\\"ConnectionControllerClient and NetworkControllerClient must be set\\\");z.initialize(e.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient,networkControllerClient:this.networkControllerClient});let r=this.getDefaultNetwork();r&&z.setActiveCaipNetwork(r)}initializeConnectionController(e){me.setWcBasic(e.basic??!1)}initializeConnectorController(){ie.initialize(this.chainNamespaces)}initializeProjectSettings(e){ee.setProjectId(e.projectId),ee.setSdkVersion(e.sdkVersion)}initializeOptionsController(e){ee.setDebug(e.debug!==!1),ee.setEnableWalletConnect(e.enableWalletConnect!==!1),ee.setEnableWalletGuide(e.enableWalletGuide!==!1),ee.setEnableWallets(e.enableWallets!==!1),ee.setEIP6963Enabled(e.enableEIP6963!==!1),ee.setEnableNetworkSwitch(e.enableNetworkSwitch!==!1),ee.setEnableAuthLogger(e.enableAuthLogger!==!1),ee.setCustomRpcUrls(e.customRpcUrls),ee.setEnableEmbedded(e.enableEmbedded),ee.setAllWallets(e.allWallets),ee.setIncludeWalletIds(e.includeWalletIds),ee.setExcludeWalletIds(e.excludeWalletIds),ee.setFeaturedWalletIds(e.featuredWalletIds),ee.setTokens(e.tokens),ee.setTermsConditionsUrl(e.termsConditionsUrl),ee.setPrivacyPolicyUrl(e.privacyPolicyUrl),ee.setCustomWallets(e.customWallets),ee.setFeatures(e.features),ee.setAllowUnsupportedChain(e.allowUnsupportedChain),ee.setUniversalProviderConfigOverride(e.universalProviderConfigOverride),ee.setPreferUniversalLinks(e.experimental_preferUniversalLinks),ee.setDefaultAccountTypes(e.defaultAccountTypes);let r=Te.getPreferredAccountTypes()||{},n={...ee.state.defaultAccountTypes,...r};Ie.setPreferredAccountTypes(n);let i=this.getDefaultMetaData();if(!e.metadata&&i&&(e.metadata=i),ee.setMetadata(e.metadata),ee.setDisableAppend(e.disableAppend),ee.setEnableEmbedded(e.enableEmbedded),ee.setSIWX(e.siwx),!e.projectId){Xo.open(Z1.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,\\\"error\\\");return}if(e.adapters?.find(o=>o.namespace===_e.CHAIN.EVM)&&e.siweConfig){if(e.siwx)throw new Error(\\\"Cannot set both `siweConfig` and `siwx` options\\\");ee.setSIWX(e.siweConfig.mapToSIWX())}}getDefaultMetaData(){return oe.isClient()?{name:document.getElementsByTagName(\\\"title\\\")?.[0]?.textContent||\\\"\\\",description:document.querySelector('meta[property=\\\"og:description\\\"]')?.content||\\\"\\\",url:window.location.origin,icons:[document.querySelector('link[rel~=\\\"icon\\\"]')?.href||\\\"\\\"]}:null}setUnsupportedNetwork(e){let r=this.getActiveChainNamespace();if(r){let n=Q1.getUnsupportedNetwork(`${r}:${e}`);z.setActiveCaipNetwork(n)}}getDefaultNetwork(){return Q1.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(e,r){return Q1.extendCaipNetwork(e,{customNetworkImageUrls:r.chainImages,projectId:r.projectId})}extendCaipNetworks(e){return Q1.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId})}extendDefaultCaipNetwork(e){let r=e.networks.find(i=>i.id===e.defaultNetwork?.id);return r?Q1.extendCaipNetwork(r,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId}):void 0}async disconnectNamespace(e){try{let r=this.getAdapter(e),n=Qn.getProvider(e),i=Qn.getProviderId(e),{caipAddress:s}=z.getAccountData(e)||{};this.setLoading(!0,e),s&&r?.disconnect&&await r.disconnect({provider:n,providerType:i}),Te.removeConnectedNamespace(e),Qn.resetChain(e),this.setUser(void 0,e),this.setStatus(\\\"disconnected\\\",e),this.setConnectedWalletInfo(void 0,e),ie.removeConnectorId(e),z.resetAccount(e),z.resetNetwork(e),this.setLoading(!1,e)}catch(r){throw this.setLoading(!1,e),new Error(`Failed to disconnect chain ${e}: ${r.message}`)}}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{let e=z.state.activeChain,r=this.getAdapter(e),n=this.getCaipNetwork(e)?.id;if(!r)throw new Error(\\\"Adapter not found\\\");let i=await r.connectWalletConnect(n);this.close(),this.setClientId(i?.clientId||null),Te.setConnectedNamespaces([...z.state.chains.keys()]),this.chainNamespaces.forEach(s=>{ie.setConnectorId(qi.CONNECTOR_TYPE_WALLET_CONNECT,s)}),await this.syncWalletConnectAccount()},connectExternal:async({id:e,info:r,type:n,provider:i,chain:s,caipNetwork:o,socialUri:a})=>{let c=z.state.activeChain,l=s||c,d=this.getAdapter(l);if(s&&s!==c&&!o){let g=this.getCaipNetworks().find(w=>w.chainNamespace===s);g&&this.setCaipNetwork(g)}if(!d)throw new Error(\\\"Adapter not found\\\");let f=this.getCaipNetwork(l),p=await d.connect({id:e,info:r,type:n,provider:i,socialUri:a,chainId:o?.id||f?.id,rpcUrl:o?.rpcUrls?.default?.http?.[0]||f?.rpcUrls?.default?.http?.[0]});if(!p)return;Te.addConnectedNamespace(l),this.syncProvider({...p,chainNamespace:l});let h=Ie.state.allAccounts,{accounts:m}=h?.length>0?{accounts:[...h]}:await d.getAccounts({namespace:l,id:e});this.setAllAccounts(m,l),this.setStatus(\\\"connected\\\",l),this.syncConnectedWalletInfo(l)},reconnectExternal:async({id:e,info:r,type:n,provider:i})=>{let s=z.state.activeChain,o=this.getAdapter(s);o?.reconnect&&(await o?.reconnect({id:e,info:r,type:n,provider:i,chainId:this.getCaipNetwork()?.id}),Te.addConnectedNamespace(s),this.syncConnectedWalletInfo(s))},disconnect:async e=>{let r=ppe(e);try{let n=await Promise.allSettled(r.map(async([s])=>this.disconnectNamespace(s)));ur.resetSend(),me.resetWcConnection(),await vd.clearSessions(),ie.setFilterByNamespace(void 0);let i=n.filter(s=>s.status===\\\"rejected\\\");if(i.length>0)throw new Error(i.map(s=>s.reason.message).join(\\\", \\\"));Te.deleteConnectedSocialProvider(),Xe.sendEvent({type:\\\"track\\\",event:\\\"DISCONNECT_SUCCESS\\\",properties:{namespace:e||\\\"all\\\"}})}catch(n){throw new Error(`Failed to disconnect chains: ${n.message}`)}},checkInstalled:e=>e?e.some(r=>!!window.ethereum?.[String(r)]):!!window.ethereum,signMessage:async e=>(await this.getAdapter(z.state.activeChain)?.signMessage({message:e,address:Ie.state.address,provider:Qn.getProvider(z.state.activeChain)}))?.signature||\\\"\\\",sendTransaction:async e=>{let r=e.chainNamespace;if(Rt.SEND_SUPPORTED_NAMESPACES.includes(r)){let n=this.getAdapter(z.state.activeChain),i=Qn.getProvider(r);return(await n?.sendTransaction({...e,caipNetwork:this.getCaipNetwork(),provider:i}))?.hash||\\\"\\\"}return\\\"\\\"},estimateGas:async e=>{if(e.chainNamespace===_e.CHAIN.EVM){let r=this.getAdapter(z.state.activeChain),n=Qn.getProvider(z.state.activeChain),i=this.getCaipNetwork();if(!i)throw new Error(\\\"CaipNetwork is undefined\\\");return(await r?.estimateGas({...e,provider:n,caipNetwork:i}))?.gas||0n}return 0n},getEnsAvatar:async()=>(await this.syncIdentity({address:Ie.state.address,chainId:Number(this.getCaipNetwork()?.id),chainNamespace:z.state.activeChain}),Ie.state.profileImage||!1),getEnsAddress:async e=>await n8.resolveReownName(e),writeContract:async e=>{let r=this.getAdapter(z.state.activeChain),n=this.getCaipNetwork(),i=this.getCaipAddress(),s=Qn.getProvider(z.state.activeChain);if(!n||!i)throw new Error(\\\"CaipNetwork or CaipAddress is undefined\\\");return(await r?.writeContract({...e,caipNetwork:n,provider:s,caipAddress:i}))?.hash},parseUnits:(e,r)=>this.getAdapter(z.state.activeChain)?.parseUnits({value:e,decimals:r})??0n,formatUnits:(e,r)=>this.getAdapter(z.state.activeChain)?.formatUnits({value:e,decimals:r})??\\\"0\\\",getCapabilities:async e=>await this.getAdapter(z.state.activeChain)?.getCapabilities(e),grantPermissions:async e=>await this.getAdapter(z.state.activeChain)?.grantPermissions(e),revokePermissions:async e=>{let r=this.getAdapter(z.state.activeChain);return r?.revokePermissions?await r.revokePermissions(e):\\\"0x\\\"},walletGetAssets:async e=>await this.getAdapter(z.state.activeChain)?.walletGetAssets(e)??{},updateBalance:e=>{let r=this.getCaipNetwork(e);!r||!Ie.state.address||this.updateNativeBalance(Ie.state.address,r?.id,e)}},this.networkControllerClient={switchCaipNetwork:async e=>await this.switchCaipNetwork(e),getApprovedCaipNetworksData:async()=>this.getApprovedCaipNetworksData()},me.setClient(this.connectionControllerClient)}getApprovedCaipNetworksData(){if(Qn.getProviderId(z.state.activeChain)===qi.CONNECTOR_TYPE_WALLET_CONNECT){let r=this.universalProvider?.session?.namespaces;return{supportsAllNetworks:this.universalProvider?.session?.peer?.metadata.name===\\\"MetaMask Wallet\\\",approvedCaipNetworkIds:this.getChainsFromNamespaces(r)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(e){if(!e)return;let r=e.chainNamespace;if(this.getAddressByChainNamespace(e.chainNamespace)){let i=Qn.getProvider(r),s=Qn.getProviderId(r);if(e.chainNamespace===z.state.activeChain)await this.getAdapter(r)?.switchNetwork({caipNetwork:e,provider:i,providerType:s});else if(this.setCaipNetwork(e),s===qi.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{let o=this.getAddressByChainNamespace(r);o&&this.syncAccount({address:o,chainId:e.id,chainNamespace:r})}}else this.setCaipNetwork(e)}getChainsFromNamespaces(e={}){return Object.values(e).flatMap(r=>{let n=r.chains||[],i=r.accounts.map(s=>{let{chainId:o,chainNamespace:a}=ph.parseCaipAddress(s);return`${a}:${o}`});return Array.from(new Set([...n,...i]))})}createAdapters(e){return this.createClients(),this.chainNamespaces.reduce((r,n)=>{let i=e?.find(s=>s.namespace===n);return i?(i.construct({namespace:n,projectId:this.options?.projectId,networks:this.getCaipNetworks()}),r[n]=i):r[n]=new G$({namespace:n,networks:this.getCaipNetworks()}),r},{})}async initChainAdapter(e){this.onConnectors(e),this.listenAdapter(e),await this.chainAdapters?.[e].syncConnectors(this.options,this),await this.createUniversalProviderForAdapter(e)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async e=>{await this.initChainAdapter(e)}))}onConnectors(e){this.getAdapter(e)?.on(\\\"connectors\\\",this.setConnectors.bind(this))}listenAdapter(e){let r=this.getAdapter(e);if(!r)return;let n=Te.getConnectionStatus();n===\\\"connected\\\"?this.setStatus(\\\"connecting\\\",e):n===\\\"disconnected\\\"?(Te.clearAddressCache(),this.setStatus(n,e)):this.setStatus(n,e),r.on(\\\"switchNetwork\\\",({address:i,chainId:s})=>{let o=this.getCaipNetworks().find(l=>l.id===s||l.caipNetworkId===s),a=z.state.activeChain===e,c=z.getAccountProp(\\\"address\\\",e);if(o){let l=a&&i?i:c;l&&this.syncAccount({address:l,chainId:o.id,chainNamespace:e})}else this.setUnsupportedNetwork(s)}),r.on(\\\"disconnect\\\",this.disconnect.bind(this,e)),r.on(\\\"connections\\\",i=>{this.setConnections(i,e)}),r.on(\\\"pendingTransactions\\\",()=>{let i=Ie.state.address,s=z.state.activeCaipNetwork;!i||!s?.id||this.updateNativeBalance(i,s.id,s.chainNamespace)}),r.on(\\\"accountChanged\\\",({address:i,chainId:s})=>{let o=z.state.activeChain===e;o&&s?this.syncAccount({address:i,chainId:s,chainNamespace:e}):o&&z.state.activeCaipNetwork?.id?this.syncAccount({address:i,chainId:z.state.activeCaipNetwork?.id,chainNamespace:e}):this.syncAccountInfo(i,s,e),this.syncAllAccounts(e)})}async createUniversalProviderForAdapter(e){await this.getUniversalProvider(),this.universalProvider&&this.chainAdapters?.[e]?.setUniversalProvider?.(this.universalProvider)}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(e=>this.syncNamespaceConnection(e)))}async syncNamespaceConnection(e){try{e===_e.CHAIN.EVM&&oe.isSafeApp()&&ie.setConnectorId(_e.CONNECTOR_ID.SAFE,e);let r=ie.getConnectorId(e);switch(this.setStatus(\\\"connecting\\\",e),r){case _e.CONNECTOR_ID.WALLET_CONNECT:await this.syncWalletConnectAccount();break;case _e.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(e)}}catch(r){console.warn(\\\"AppKit couldn't sync existing connection\\\",r),this.setStatus(\\\"disconnected\\\",e)}}async syncAdapterConnection(e){let r=this.getAdapter(e),n=ie.getConnectorId(e),i=this.getCaipNetwork(e),o=ie.getConnectors(e).find(a=>a.id===n);try{if(!r||!o)throw new Error(`Adapter or connector not found for namespace ${e}`);if(!i?.id)throw new Error(\\\"CaipNetwork not found\\\");let a=await r?.syncConnection({namespace:e,id:o.id,chainId:i.id,rpcUrl:i?.rpcUrls?.default?.http?.[0]});if(a){let c=await r?.getAccounts({namespace:e,id:o.id});c&&c.accounts.length>0?this.setAllAccounts(c.accounts,e):this.setAllAccounts([oe.createAccount(e,a.address,\\\"eoa\\\")],e),this.syncProvider({...a,chainNamespace:e}),await this.syncAccount({...a,chainNamespace:e}),this.setStatus(\\\"connected\\\",e)}else this.setStatus(\\\"disconnected\\\",e)}catch{this.setStatus(\\\"disconnected\\\",e)}}async syncWalletConnectAccount(){let e=this.chainNamespaces.map(async r=>{let n=this.getAdapter(r),i=this.universalProvider?.session?.namespaces?.[r]?.accounts||[],s=z.state.activeCaipNetwork?.id,o=i.find(a=>{let{chainId:c}=ph.parseCaipAddress(a);return c===s?.toString()})||i[0];if(o){let a=ph.validateCaipAddress(o),{chainId:c,address:l}=ph.parseCaipAddress(a);if(Qn.setProviderId(r,qi.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&z.state.activeCaipNetwork&&n?.namespace!==_e.CHAIN.EVM){let d=n?.getWalletConnectProvider({caipNetworks:this.getCaipNetworks(),provider:this.universalProvider,activeCaipNetwork:z.state.activeCaipNetwork});Qn.setProvider(r,d)}else Qn.setProvider(r,this.universalProvider);ie.setConnectorId(_e.CONNECTOR_ID.WALLET_CONNECT,r),Te.addConnectedNamespace(r),this.syncWalletConnectAccounts(r),await this.syncAccount({address:l,chainId:c,chainNamespace:r})}else this.setStatus(\\\"disconnected\\\",r);this.syncConnectedWalletInfo(r),await z.setApprovedCaipNetworksData(r)});await Promise.all(e)}syncWalletConnectAccounts(e){let r=this.universalProvider?.session?.namespaces?.[e]?.accounts?.map(n=>{let{address:i}=ph.parseCaipAddress(n);return i}).filter((n,i,s)=>s.indexOf(n)===i);r&&this.setAllAccounts(r.map(n=>oe.createAccount(e,n,e===\\\"bip122\\\"?\\\"payment\\\":\\\"eoa\\\")),e)}syncProvider({type:e,provider:r,id:n,chainNamespace:i}){Qn.setProviderId(i,e),Qn.setProvider(i,r),ie.setConnectorId(n,i)}async syncAllAccounts(e){let r=ie.getConnectorId(e);if(!r)return;let i=await this.getAdapter(e)?.getAccounts({namespace:e,id:r});i&&i.accounts.length>0&&this.setAllAccounts(i.accounts,e)}async syncAccount(e){let r=e.chainNamespace===z.state.activeChain,n=z.getCaipNetworkByNamespace(e.chainNamespace,e.chainId),{address:i,chainId:s,chainNamespace:o}=e,{chainId:a}=Te.getActiveNetworkProps(),c=s||a,l=z.state.activeCaipNetwork?.name===_e.UNSUPPORTED_NETWORK_NAME,d=z.getNetworkProp(\\\"supportsAllNetworks\\\",o);if(this.setStatus(\\\"connected\\\",o),!(l&&!d)&&c){let f=this.getCaipNetworks().find(m=>m.id.toString()===c.toString()),p=this.getCaipNetworks().find(m=>m.chainNamespace===o);if(!d&&!f&&!p){let m=this.getApprovedCaipNetworkIds()||[],g=m.find(v=>ph.parseCaipNetworkId(v)?.chainId===c.toString()),w=m.find(v=>ph.parseCaipNetworkId(v)?.chainNamespace===o);f=this.getCaipNetworks().find(v=>v.caipNetworkId===g),p=this.getCaipNetworks().find(v=>v.caipNetworkId===w||\\\"deprecatedCaipNetworkId\\\"in v&&v.deprecatedCaipNetworkId===w)}let h=f||p;h?.chainNamespace===z.state.activeChain?ee.state.enableNetworkSwitch&&!ee.state.allowUnsupportedChain&&z.state.activeCaipNetwork?.name===_e.UNSUPPORTED_NETWORK_NAME?z.showUnsupportedChainUI():this.setCaipNetwork(h):r||n&&this.setCaipNetworkOfNamespace(n,o),this.syncConnectedWalletInfo(o),ox.isLowerCaseMatch(i,Ie.state.address)||this.syncAccountInfo(i,h?.id,o),r?await this.syncBalance({address:i,chainId:h?.id,chainNamespace:o}):await this.syncBalance({address:i,chainId:n?.id,chainNamespace:o})}}async syncAccountInfo(e,r,n){let i=this.getCaipAddress(n),s=r||i?.split(\\\":\\\")[1];if(!s)return;let o=`${n}:${s}:${e}`;this.setCaipAddress(o,n),await this.syncIdentity({address:e,chainId:s,chainNamespace:n})}async syncReownName(e,r){try{let n=await this.getReownName(e);if(n[0]){let i=n[0];this.setProfileName(i.name,r)}else this.setProfileName(null,r)}catch{this.setProfileName(null,r)}}syncConnectedWalletInfo(e){let r=ie.getConnectorId(e),n=Qn.getProviderId(e);if(n===qi.CONNECTOR_TYPE_ANNOUNCED||n===qi.CONNECTOR_TYPE_INJECTED){if(r){let i=this.getConnectors().find(s=>s.id===r);if(i){let{info:s,name:o,imageUrl:a}=i,c=a||this.getConnectorImage(i);this.setConnectedWalletInfo({name:o,icon:c,...s},e)}}}else if(n===qi.CONNECTOR_TYPE_WALLET_CONNECT){let i=Qn.getProvider(e);i?.session&&this.setConnectedWalletInfo({...i.session.peer.metadata,name:i.session.peer.metadata.name,icon:i.session.peer.metadata.icons?.[0]},e)}else if(r&&r===_e.CONNECTOR_ID.COINBASE){let i=this.getConnectors().find(s=>s.id===_e.CONNECTOR_ID.COINBASE);this.setConnectedWalletInfo({name:\\\"Coinbase Wallet\\\",icon:this.getConnectorImage(i)},e)}}async syncBalance(e){!b7.getNetworksByNamespace(this.getCaipNetworks(),e.chainNamespace).find(n=>n.id.toString()===e.chainId?.toString())||!e.chainId||await this.updateNativeBalance(e.address,e.chainId,e.chainNamespace)}async ready(){await this.readyPromise}async updateNativeBalance(e,r,n){let i=this.getAdapter(n),s=z.getCaipNetworkByNamespace(n,r);if(i){let o=await i.getBalance({address:e,chainId:r,caipNetwork:s,tokens:this.options.tokens});return this.setBalance(o.balance,o.symbol,n),o}}async initializeUniversalAdapter(){let e=mpe.createLogger((n,...i)=>{n&&this.handleAlertError(n),console.error(...i)}),r={projectId:this.options?.projectId,metadata:{name:this.options?.metadata?this.options?.metadata.name:\\\"\\\",description:this.options?.metadata?this.options?.metadata.description:\\\"\\\",url:this.options?.metadata?this.options?.metadata.url:\\\"\\\",icons:this.options?.metadata?this.options?.metadata.icons:[\\\"\\\"]},logger:e};ee.setManualWCControl(!!this.options?.manualWCControl),this.universalProvider=this.options.universalProvider??await oYe.default.init(r),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&(this.universalProvider.on(\\\"display_uri\\\",e=>{me.setUri(e)}),this.universalProvider.on(\\\"connect\\\",me.finalizeWcConnection),this.universalProvider.on(\\\"disconnect\\\",()=>{this.chainNamespaces.forEach(e=>{this.resetAccount(e)}),me.resetWcConnection()}),this.universalProvider.on(\\\"chainChanged\\\",e=>{let r=this.getCaipNetworks().find(i=>i.id==e),n=this.getCaipNetwork();if(!r){this.setUnsupportedNetwork(e);return}n?.id!==r?.id&&this.setCaipNetwork(r)}),this.universalProvider.on(\\\"session_event\\\",e=>{if(n8.isSessionEventData(e)){let{name:r,data:n}=e.params.event;r===\\\"accountsChanged\\\"&&Array.isArray(n)&&oe.isCaipAddress(n[0])&&this.syncAccount(ph.parseCaipAddress(n[0]))}}))}createUniversalProvider(){return!this.universalProviderInitPromise&&oe.isClient()&&this.options?.projectId&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(e){Xe.sendEvent({type:\\\"error\\\",event:\\\"INTERNAL_SDK_ERROR\\\",properties:{errorType:\\\"UniversalProviderInitError\\\",errorMessage:e instanceof Error?e.message:\\\"Unknown\\\",uncaught:!1}}),console.error(\\\"AppKit:getUniversalProvider - Cannot create provider\\\",e)}return this.universalProvider}handleAlertError(e){let r=Object.entries(Z1.UniversalProviderErrors).find(([,{message:a}])=>e.message.includes(a)),[n,i]=r??[],{message:s,alertErrorKey:o}=i??{};if(n&&s&&!this.reportedAlertErrors[n]){let a=Z1.ALERT_ERRORS[o];a&&(Xo.open(a,\\\"error\\\"),this.reportedAlertErrors[n]=!0)}}getAdapter(e){if(e)return this.chainAdapters?.[e]}createAdapter(e){if(!e)return;let r=e.namespace;if(!r)return;this.createClients();let n=e;n.namespace=r,n.construct({namespace:r,projectId:this.options?.projectId,networks:this.getCaipNetworks()}),this.chainNamespaces.includes(r)||this.chainNamespaces.push(r),this.chainAdapters&&(this.chainAdapters[r]=n)}async open(e){return await this.injectModalUi(),e?.uri&&me.setUri(e.uri),e?.arguments&&e?.view===\\\"Swap\\\"?Dt.open({...e,data:{swap:e.arguments}}):Dt.open(e)}async close(){await this.injectModalUi(),Dt.close()}setLoading(e,r){Dt.setLoading(e,r)}async disconnect(e){await me.disconnect(e)}getSIWX(){return ee.state.siwx}getError(){return\\\"\\\"}getChainId(){return z.state.activeCaipNetwork?.id}async switchNetwork(e){let r=this.getCaipNetworks().find(n=>n.id===e.id);if(!r){Xo.open(Z1.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,\\\"error\\\");return}await z.switchActiveNetwork(r)}getWalletProvider(){return z.state.activeChain?Qn.state.providers[z.state.activeChain]:null}getWalletProviderType(){return Qn.getProviderId(z.state.activeChain)}subscribeProviders(e){return Qn.subscribeProviders(e)}getThemeMode(){return ji.state.themeMode}getThemeVariables(){return ji.state.themeVariables}setThemeMode(e){ji.setThemeMode(e),V$(ji.state.themeMode)}setTermsConditionsUrl(e){ee.setTermsConditionsUrl(e)}setPrivacyPolicyUrl(e){ee.setPrivacyPolicyUrl(e)}setThemeVariables(e){ji.setThemeVariables(e),Tpe(ji.state.themeVariables)}subscribeTheme(e){return ji.subscribe(e)}getWalletInfo(){return Ie.state.connectedWalletInfo}getAccount(e){let r=ie.getAuthConnector(e),n=z.getAccountData(e),i=z.state.activeChain,s=Te.getConnectedConnectorId(e||i);if(n)return{allAccounts:n.allAccounts,caipAddress:n.caipAddress,address:oe.getPlainAddress(n.caipAddress),isConnected:!!n.caipAddress,status:n.status,embeddedWalletInfo:r&&s===_e.CONNECTOR_ID.AUTH?{user:n.user?{...n.user,username:Te.getConnectedSocialUsername()}:void 0,authProvider:n.socialProvider||\\\"email\\\",accountType:n.preferredAccountTypes?.[e||i],isSmartAccountDeployed:!!n.smartAccountDeployed}:void 0}}subscribeAccount(e,r){let n=()=>{let i=this.getAccount(r);i&&e(i)};r?z.subscribeChainProp(\\\"accountState\\\",n,r):z.subscribe(n),ie.subscribe(n)}subscribeNetwork(e){return z.subscribe(({activeCaipNetwork:r})=>{e({caipNetwork:r,chainId:r?.id,caipNetworkId:r?.caipNetworkId})})}subscribeWalletInfo(e){return Ie.subscribeKey(\\\"connectedWalletInfo\\\",e)}subscribeShouldUpdateToAddress(e){Ie.subscribeKey(\\\"shouldUpdateToAddress\\\",e)}subscribeCaipNetworkChange(e){z.subscribeKey(\\\"activeCaipNetwork\\\",e)}getState(){return ud.state}subscribeState(e){return ud.subscribe(e)}showErrorMessage(e){wr.showError(e)}showSuccessMessage(e){wr.showSuccess(e)}getEvent(){return{...Xe.state}}subscribeEvents(e){return Xe.subscribe(e)}replace(e){de.replace(e)}redirect(e){de.push(e)}popTransactionStack(e){de.popTransactionStack(e)}isOpen(){return Dt.state.open}isTransactionStackEmpty(){return de.state.transactionStack.length===0}static getInstance(){return this.instance}updateFeatures(e){ee.setFeatures(e)}updateRemoteFeatures(e){ee.setRemoteFeatures(e)}updateOptions(e){let n={...ee.state||{},...e};ee.setOptions(n)}setConnectMethodsOrder(e){ee.setConnectMethodsOrder(e)}setWalletFeaturesOrder(e){ee.setWalletFeaturesOrder(e)}setCollapseWallets(e){ee.setCollapseWallets(e)}setSocialsOrder(e){ee.setSocialsOrder(e)}getConnectMethodsOrder(){return Xl.getConnectOrderMethod(ee.state.features,ie.getConnectors())}addNetwork(e,r){if(this.chainAdapters&&!this.chainAdapters[e])throw new Error(`Adapter for namespace ${e} doesn't exist`);let n=this.extendCaipNetwork(r,this.options);this.getCaipNetworks().find(i=>i.id===n.id)||z.addNetwork(n)}removeNetwork(e,r){if(this.chainAdapters&&!this.chainAdapters[e])throw new Error(`Adapter for namespace ${e} doesn't exist`);this.getCaipNetworks().find(i=>i.id===r)&&z.removeNetwork(e,r)}}});var cYe=x(()=>{u();});function G(t){return(e,r)=>typeof r==\\\"object\\\"?OWt(t,e,r):((n,i,s)=>{let o=i.hasOwnProperty(s);return i.constructor.createProperty(s,n),o?Object.getOwnPropertyDescriptor(i,s):void 0})(t,e,r)}var PWt,OWt,kpe=x(()=>{u();iR();PWt={attribute:!0,type:String,converter:nR,reflect:!1,hasChanged:U$},OWt=(t=PWt,e,r)=>{let{kind:n,metadata:i}=r,s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),n===\\\"setter\\\"&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),n===\\\"accessor\\\"){let{name:o}=r;return{set(a){let c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,t)},init(a){return a!==void 0&&this.C(o,void 0,t,a),a}}}if(n===\\\"setter\\\"){let{name:o}=r;return function(a){let c=this[o];e.call(this,a),this.requestUpdate(o,c,t)}}throw Error(\\\"Unsupported decorator location: \\\"+n)}});function xe(t){return G({...t,state:!0,attribute:!1})}var lYe=x(()=>{u();kpe();});var uYe=x(()=>{u();});var s8=x(()=>{u();});var dYe=x(()=>{u();s8();});var fYe=x(()=>{u();s8();});var pYe=x(()=>{u();s8();});var hYe=x(()=>{u();s8();});var mYe=x(()=>{u();s8();});var Ke=x(()=>{u();cYe();kpe();lYe();uYe();dYe();fYe();pYe();hYe();mYe()});var gYe,yYe=x(()=>{u();Q();gYe=we`\\n  :host {\\n    display: flex;\\n    width: inherit;\\n    height: inherit;\\n  }\\n`});var eu,fc,eb=x(()=>{u();Q();Ke();Er();fR();fr();yYe();eu=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},fc=class extends se{render(){return this.style.cssText=`\\n      flex-direction: ${this.flexDirection};\\n      flex-wrap: ${this.flexWrap};\\n      flex-basis: ${this.flexBasis};\\n      flex-grow: ${this.flexGrow};\\n      flex-shrink: ${this.flexShrink};\\n      align-items: ${this.alignItems};\\n      justify-content: ${this.justifyContent};\\n      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\\n      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\\n      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\\n      padding-top: ${this.padding&&Pi.getSpacingStyles(this.padding,0)};\\n      padding-right: ${this.padding&&Pi.getSpacingStyles(this.padding,1)};\\n      padding-bottom: ${this.padding&&Pi.getSpacingStyles(this.padding,2)};\\n      padding-left: ${this.padding&&Pi.getSpacingStyles(this.padding,3)};\\n      margin-top: ${this.margin&&Pi.getSpacingStyles(this.margin,0)};\\n      margin-right: ${this.margin&&Pi.getSpacingStyles(this.margin,1)};\\n      margin-bottom: ${this.margin&&Pi.getSpacingStyles(this.margin,2)};\\n      margin-left: ${this.margin&&Pi.getSpacingStyles(this.margin,3)};\\n    `,$`<slot></slot>`}};fc.styles=[ze,gYe];eu([G()],fc.prototype,\\\"flexDirection\\\",void 0);eu([G()],fc.prototype,\\\"flexWrap\\\",void 0);eu([G()],fc.prototype,\\\"flexBasis\\\",void 0);eu([G()],fc.prototype,\\\"flexGrow\\\",void 0);eu([G()],fc.prototype,\\\"flexShrink\\\",void 0);eu([G()],fc.prototype,\\\"alignItems\\\",void 0);eu([G()],fc.prototype,\\\"justifyContent\\\",void 0);eu([G()],fc.prototype,\\\"columnGap\\\",void 0);eu([G()],fc.prototype,\\\"rowGap\\\",void 0);eu([G()],fc.prototype,\\\"gap\\\",void 0);eu([G()],fc.prototype,\\\"padding\\\",void 0);eu([G()],fc.prototype,\\\"margin\\\",void 0);fc=eu([te(\\\"wui-flex\\\")],fc)});var is=x(()=>{u();eb()});var Re,bYe=x(()=>{u();F0();Re=t=>t??zi});var bn=x(()=>{u();bYe()});var dvn,wYe,vYe,Bpe=x(()=>{u();F0();({I:dvn}=zJe),wYe=t=>t===null||typeof t!=\\\"object\\\"&&typeof t!=\\\"function\\\",vYe=t=>t.strings===void 0});var J$,gx,o8,a8=x(()=>{u();J$={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},gx=t=>(...e)=>({_$litDirective$:t,values:e}),o8=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}}});function NWt(t){this._$AN!==void 0?(Y$(this),this._$AM=t,xYe(this)):this._$AM=t}function kWt(t,e=!1,r=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=r;s<n.length;s++)pR(n[s],!1),Y$(n[s]);else n!=null&&(pR(n,!1),Y$(n));else pR(this,t)}var pR,Y$,xYe,BWt,c8,Mpe=x(()=>{u();Bpe();a8();a8();pR=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),pR(n,e);return!0},Y$=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},xYe=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),BWt(e)}};BWt=t=>{t.type==J$.CHILD&&(t._$AP??(t._$AP=kWt),t._$AQ??(t._$AQ=NWt))},c8=class extends o8{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),xYe(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(pR(this,e),Y$(this))}setValue(e){if(vYe(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}});var X$,eV,EYe=x(()=>{u();X$=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},eV=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise((e=>this.Z=e)))}resume(){this.Z?.(),this.Y=this.Z=void 0}}});var _Ye,CYe,Dpe,SYe,AYe=x(()=>{u();F0();Bpe();Mpe();EYe();a8();_Ye=t=>!wYe(t)&&typeof t.then==\\\"function\\\",CYe=1073741823,Dpe=class extends c8{constructor(){super(...arguments),this._$Cwt=CYe,this._$Cbt=[],this._$CK=new X$(this),this._$CX=new eV}render(...e){return e.find((r=>!_Ye(r)))??xd}update(e,r){let n=this._$Cbt,i=n.length;this._$Cbt=r;let s=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<r.length&&!(a>this._$Cwt);a++){let c=r[a];if(!_Ye(c))return this._$Cwt=a,c;a<i&&c===n[a]||(this._$Cwt=CYe,i=0,Promise.resolve(c).then((async l=>{for(;o.get();)await o.get();let d=s.deref();if(d!==void 0){let f=d._$Cbt.indexOf(c);f>-1&&f<d._$Cwt&&(d._$Cwt=f,d.setValue(l))}})))}return xd}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},SYe=gx(Dpe)});var TYe=x(()=>{u();AYe()});var Lpe,tV,IYe=x(()=>{u();Lpe=class{constructor(){this.cache=new Map}set(e,r){this.cache.set(e,r)}get(e){return this.cache.get(e)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}},tV=new Lpe});var RYe,PYe=x(()=>{u();Q();RYe=we`\\n  :host {\\n    display: flex;\\n    aspect-ratio: var(--local-aspect-ratio);\\n    color: var(--local-color);\\n    width: var(--local-width);\\n  }\\n\\n  svg {\\n    width: inherit;\\n    height: inherit;\\n    object-fit: contain;\\n    object-position: center;\\n  }\\n\\n  .fallback {\\n    width: var(--local-width);\\n    height: var(--local-height);\\n  }\\n`});var OYe={};ue(OYe,{addSvg:()=>MWt});var MWt,NYe=x(()=>{u();Q();MWt=Y`<svg\\n  width=\\\"14\\\"\\n  height=\\\"14\\\"\\n  viewBox=\\\"0 0 14 14\\\"\\n  fill=\\\"none\\\"\\n  xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n>\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z\\\"\\n    fill=\\\"#667dff\\\"\\n  /></svg\\n>`});var kYe={};ue(kYe,{allWalletsSvg:()=>DWt});var DWt,BYe=x(()=>{u();Q();DWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 24 24\\\">\\n  <path\\n    style=\\\"fill: var(--wui-color-accent-100);\\\"\\n    d=\\\"M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z\\\"\\n  />\\n</svg>`});var MYe={};ue(MYe,{arrowBottomCircleSvg:()=>LWt});var LWt,DYe=x(()=>{u();Q();LWt=Y`<svg\\n  fill=\\\"none\\\"\\n  viewBox=\\\"0 0 21 20\\\"\\n>\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  /></svg\\n>`});var LYe={};ue(LYe,{appStoreSvg:()=>UWt});var UWt,UYe=x(()=>{u();Q();UWt=Y`\\n<svg width=\\\"36\\\" height=\\\"36\\\">\\n  <path\\n    d=\\\"M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z\\\"\\n    fill=\\\"url(#a)\\\"\\n  />\\n  <path\\n    d=\\\"m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z\\\"\\n    fill=\\\"#fff\\\"\\n  />\\n  <defs>\\n    <linearGradient id=\\\"a\\\" x1=\\\"18\\\" y1=\\\"0\\\" x2=\\\"18\\\" y2=\\\"36\\\" gradientUnits=\\\"userSpaceOnUse\\\">\\n      <stop stop-color=\\\"#18BFFB\\\" />\\n      <stop offset=\\\"1\\\" stop-color=\\\"#2072F3\\\" />\\n    </linearGradient>\\n  </defs>\\n</svg>`});var FYe={};ue(FYe,{appleSvg:()=>FWt});var FWt,jYe=x(()=>{u();Q();FWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <g clip-path=\\\"url(#b)\\\">\\n      <circle cx=\\\"20\\\" cy=\\\"19.89\\\" r=\\\"20\\\" fill=\\\"#000\\\" />\\n      <g clip-path=\\\"url(#c)\\\">\\n        <path\\n          fill=\\\"#fff\\\"\\n          d=\\\"M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z\\\"\\n        />\\n      </g>\\n    </g>\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><rect width=\\\"40\\\" height=\\\"40\\\" fill=\\\"#fff\\\" rx=\\\"20\\\" /></clipPath>\\n    <clipPath id=\\\"b\\\"><path fill=\\\"#fff\\\" d=\\\"M0 0h40v40H0z\\\" /></clipPath>\\n    <clipPath id=\\\"c\\\"><path fill=\\\"#fff\\\" d=\\\"M8 7.89h24v24H8z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var HYe={};ue(HYe,{arrowBottomSvg:()=>jWt});var jWt,qYe=x(()=>{u();Q();jWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var zYe={};ue(zYe,{arrowLeftSvg:()=>HWt});var HWt,$Ye=x(()=>{u();Q();HWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var VYe={};ue(VYe,{arrowRightSvg:()=>qWt});var qWt,WYe=x(()=>{u();Q();qWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var GYe={};ue(GYe,{arrowTopSvg:()=>zWt});var zWt,KYe=x(()=>{u();Q();zWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var ZYe={};ue(ZYe,{bankSvg:()=>$Wt});var $Wt,QYe=x(()=>{u();Q();$Wt=Y`<svg\\n  xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n  width=\\\"12\\\"\\n  height=\\\"13\\\"\\n  viewBox=\\\"0 0 12 13\\\"\\n  fill=\\\"none\\\"\\n>\\n  <path\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z\\\"\\n    fill=\\\"currentColor\\\"\\n  /></svg\\n>`});var JYe={};ue(JYe,{browserSvg:()=>VWt});var VWt,YYe=x(()=>{u();Q();VWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var XYe={};ue(XYe,{cardSvg:()=>WWt});var WWt,eXe=x(()=>{u();Q();WWt=Y`<svg\\n  xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n  width=\\\"12\\\"\\n  height=\\\"13\\\"\\n  viewBox=\\\"0 0 12 13\\\"\\n  fill=\\\"none\\\"\\n>\\n  <path\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.80916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z\\\"\\n    fill=\\\"currentColor\\\"\\n  /></svg\\n>`});var tXe={};ue(tXe,{checkmarkSvg:()=>GWt});var GWt,rXe=x(()=>{u();Q();GWt=Y`<svg\\n  width=\\\"28\\\"\\n  height=\\\"28\\\"\\n  viewBox=\\\"0 0 28 28\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n  <path\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z\\\"\\n    fill=\\\"currentColor\\\"/>\\n</svg>\\n`});var nXe={};ue(nXe,{checkmarkBoldSvg:()=>KWt});var KWt,iXe=x(()=>{u();Q();KWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 14\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var sXe={};ue(sXe,{chevronBottomSvg:()=>ZWt});var ZWt,oXe=x(()=>{u();Q();ZWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var aXe={};ue(aXe,{chevronLeftSvg:()=>QWt});var QWt,cXe=x(()=>{u();Q();QWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var lXe={};ue(lXe,{chevronRightSvg:()=>JWt});var JWt,uXe=x(()=>{u();Q();JWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var dXe={};ue(dXe,{chevronTopSvg:()=>YWt});var YWt,fXe=x(()=>{u();Q();YWt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var pXe={};ue(pXe,{chromeStoreSvg:()=>XWt});var XWt,hXe=x(()=>{u();Q();XWt=Y`<svg width=\\\"36\\\" height=\\\"36\\\" fill=\\\"none\\\">\\n  <path\\n    fill=\\\"#fff\\\"\\n    fill-opacity=\\\".05\\\"\\n    d=\\\"M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z\\\"\\n  />\\n  <path\\n    stroke=\\\"#fff\\\"\\n    stroke-opacity=\\\".05\\\"\\n    d=\\\"M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z\\\"\\n  />\\n  <path\\n    fill=\\\"url(#a)\\\"\\n    d=\\\"M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z\\\"\\n  />\\n  <path\\n    fill=\\\"url(#b)\\\"\\n    d=\\\"m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z\\\"\\n  />\\n  <path\\n    fill=\\\"url(#c)\\\"\\n    d=\\\"M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z\\\"\\n  />\\n  <path fill=\\\"#fff\\\" d=\\\"M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z\\\" />\\n  <path fill=\\\"#1A73E8\\\" d=\\\"M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z\\\" />\\n  <defs>\\n    <linearGradient\\n      id=\\\"a\\\"\\n      x1=\\\"6.294\\\"\\n      x2=\\\"41.1\\\"\\n      y1=\\\"5.995\\\"\\n      y2=\\\"5.995\\\"\\n      gradientUnits=\\\"userSpaceOnUse\\\"\\n    >\\n      <stop stop-color=\\\"#D93025\\\" />\\n      <stop offset=\\\"1\\\" stop-color=\\\"#EA4335\\\" />\\n    </linearGradient>\\n    <linearGradient\\n      id=\\\"b\\\"\\n      x1=\\\"20.953\\\"\\n      x2=\\\"37.194\\\"\\n      y1=\\\"32.143\\\"\\n      y2=\\\"2.701\\\"\\n      gradientUnits=\\\"userSpaceOnUse\\\"\\n    >\\n      <stop stop-color=\\\"#FCC934\\\" />\\n      <stop offset=\\\"1\\\" stop-color=\\\"#FBBC04\\\" />\\n    </linearGradient>\\n    <linearGradient\\n      id=\\\"c\\\"\\n      x1=\\\"25.873\\\"\\n      x2=\\\"9.632\\\"\\n      y1=\\\"31.2\\\"\\n      y2=\\\"1.759\\\"\\n      gradientUnits=\\\"userSpaceOnUse\\\"\\n    >\\n      <stop stop-color=\\\"#1E8E3E\\\" />\\n      <stop offset=\\\"1\\\" stop-color=\\\"#34A853\\\" />\\n    </linearGradient>\\n  </defs>\\n</svg>`});var mXe={};ue(mXe,{clockSvg:()=>eGt});var eGt,gXe=x(()=>{u();Q();eGt=Y`<svg width=\\\"14\\\" height=\\\"14\\\" viewBox=\\\"0 0 14 14\\\" fill=\\\"none\\\">\\n  <path \\n    fill-rule=\\\"evenodd\\\" \\n    clip-rule=\\\"evenodd\\\" \\n    d=\\\"M7.00235 2C4.24 2 2.00067 4.23858 2.00067 7C2.00067 9.76142 4.24 12 7.00235 12C9.7647 12 12.004 9.76142 12.004 7C12.004 4.23858 9.7647 2 7.00235 2ZM0 7C0 3.13401 3.13506 0 7.00235 0C10.8696 0 14.0047 3.13401 14.0047 7C14.0047 10.866 10.8696 14 7.00235 14C3.13506 14 0 10.866 0 7ZM7.00235 3C7.55482 3 8.00269 3.44771 8.00269 4V6.58579L9.85327 8.43575C10.2439 8.82627 10.2439 9.45944 9.85327 9.84996C9.46262 10.2405 8.82924 10.2405 8.43858 9.84996L6.29501 7.70711C6.10741 7.51957 6.00201 7.26522 6.00201 7V4C6.00201 3.44771 6.44988 3 7.00235 3Z\\\" \\n    fill=\\\"currentColor\\\"\\n  />\\n</svg>`});var yXe={};ue(yXe,{closeSvg:()=>tGt});var tGt,bXe=x(()=>{u();Q();tGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var wXe={};ue(wXe,{compassSvg:()=>rGt});var rGt,vXe=x(()=>{u();Q();rGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var xXe={};ue(xXe,{coinPlaceholderSvg:()=>nGt});var nGt,EXe=x(()=>{u();Q();nGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var _Xe={};ue(_Xe,{copySvg:()=>iGt});var iGt,CXe=x(()=>{u();Q();iGt=Y`<svg\\n  xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n  width=\\\"16\\\"\\n  height=\\\"16\\\"\\n  viewBox=\\\"0 0 16 16\\\"\\n  fill=\\\"none\\\"\\n>\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.28565ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z\\\"\\n    fill=\\\"#788181\\\"\\n  /></svg\\n>`});var SXe={};ue(SXe,{cursorSvg:()=>sGt});var sGt,AXe=x(()=>{u();Q();sGt=Y` <svg fill=\\\"none\\\" viewBox=\\\"0 0 13 4\\\">\\n  <path fill=\\\"currentColor\\\" d=\\\"M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z\\\" />\\n</svg>`});var TXe={};ue(TXe,{cursorTransparentSvg:()=>oGt});var oGt,IXe=x(()=>{u();Q();oGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 6\\\">\\n  <path style=\\\"fill: var(--wui-color-bg-150);\\\" d=\\\"M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z\\\" />\\n  <path\\n    style=\\\"stroke: var(--wui-color-inverse-100);\\\"\\n    stroke-opacity=\\\".05\\\"\\n    d=\\\"M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z\\\"\\n  />\\n  <path\\n    style=\\\"fill: var(--wui-color-bg-150);\\\"\\n    d=\\\"M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z\\\"\\n  />\\n</svg> `});var RXe={};ue(RXe,{desktopSvg:()=>aGt});var aGt,PXe=x(()=>{u();Q();aGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n  <path fill=\\\"currentColor\\\" d=\\\"M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z\\\" />\\n</svg>`});var OXe={};ue(OXe,{disconnectSvg:()=>cGt});var cGt,NXe=x(()=>{u();Q();cGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var kXe={};ue(kXe,{discordSvg:()=>lGt});var lGt,BXe=x(()=>{u();Q();lGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <g clip-path=\\\"url(#b)\\\">\\n      <circle cx=\\\"20\\\" cy=\\\"19.89\\\" r=\\\"20\\\" fill=\\\"#5865F2\\\" />\\n      <path\\n        fill=\\\"#fff\\\"\\n        fill-rule=\\\"evenodd\\\"\\n        d=\\\"M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z\\\"\\n        clip-rule=\\\"evenodd\\\"\\n      />\\n    </g>\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><rect width=\\\"40\\\" height=\\\"40\\\" fill=\\\"#fff\\\" rx=\\\"20\\\" /></clipPath>\\n    <clipPath id=\\\"b\\\"><path fill=\\\"#fff\\\" d=\\\"M0 0h40v40H0z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var MXe={};ue(MXe,{etherscanSvg:()=>uGt});var uGt,DXe=x(()=>{u();Q();uGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z\\\"\\n  />\\n</svg>`});var LXe={};ue(LXe,{extensionSvg:()=>dGt});var dGt,UXe=x(()=>{u();Q();dGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var FXe={};ue(FXe,{externalLinkSvg:()=>fGt});var fGt,jXe=x(()=>{u();Q();fGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var HXe={};ue(HXe,{facebookSvg:()=>pGt});var pGt,qXe=x(()=>{u();Q();pGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <g clip-path=\\\"url(#b)\\\">\\n      <circle cx=\\\"20\\\" cy=\\\"19.89\\\" r=\\\"20\\\" fill=\\\"#1877F2\\\" />\\n      <g clip-path=\\\"url(#c)\\\">\\n        <path\\n          fill=\\\"#fff\\\"\\n          d=\\\"M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H21.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z\\\"\\n        />\\n      </g>\\n    </g>\\n    <path\\n      fill=\\\"#1877F2\\\"\\n      d=\\\"M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z\\\"\\n    />\\n    <path\\n      fill=\\\"#fff\\\"\\n      d=\\\"m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z\\\"\\n    />\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><rect width=\\\"40\\\" height=\\\"40\\\" fill=\\\"#fff\\\" rx=\\\"20\\\" /></clipPath>\\n    <clipPath id=\\\"b\\\"><path fill=\\\"#fff\\\" d=\\\"M0 0h40v40H0z\\\" /></clipPath>\\n    <clipPath id=\\\"c\\\"><path fill=\\\"#fff\\\" d=\\\"M8 7.89h24v24H8z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var zXe={};ue(zXe,{farcasterSvg:()=>hGt});var hGt,$Xe=x(()=>{u();Q();hGt=Y`<svg style=\\\"border-radius: 9999px; overflow: hidden;\\\"  fill=\\\"none\\\" viewBox=\\\"0 0 1000 1000\\\">\\n  <rect width=\\\"1000\\\" height=\\\"1000\\\" rx=\\\"9999\\\" ry=\\\"9999\\\" fill=\\\"#855DCD\\\"/>\\n  <path fill=\\\"#855DCD\\\" d=\\\"M0 0h1000v1000H0V0Z\\\" />\\n  <path\\n    fill=\\\"#fff\\\"\\n    d=\\\"M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z\\\"\\n  />\\n  <path\\n    fill=\\\"#fff\\\"\\n    d=\\\"m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z\\\"\\n  />\\n</svg>`});var VXe={};ue(VXe,{filtersSvg:()=>mGt});var mGt,WXe=x(()=>{u();Q();mGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var GXe={};ue(GXe,{githubSvg:()=>gGt});var gGt,KXe=x(()=>{u();Q();gGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <g clip-path=\\\"url(#b)\\\">\\n      <circle cx=\\\"20\\\" cy=\\\"19.89\\\" r=\\\"20\\\" fill=\\\"#1B1F23\\\" />\\n      <g clip-path=\\\"url(#c)\\\">\\n        <path\\n          fill=\\\"#fff\\\"\\n          d=\\\"M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z\\\"\\n        />\\n      </g>\\n    </g>\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><rect width=\\\"40\\\" height=\\\"40\\\" fill=\\\"#fff\\\" rx=\\\"20\\\" /></clipPath>\\n    <clipPath id=\\\"b\\\"><path fill=\\\"#fff\\\" d=\\\"M0 0h40v40H0z\\\" /></clipPath>\\n    <clipPath id=\\\"c\\\"><path fill=\\\"#fff\\\" d=\\\"M8 7.89h24v24H8z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var ZXe={};ue(ZXe,{googleSvg:()=>yGt});var yGt,QXe=x(()=>{u();Q();yGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <path\\n    fill=\\\"#4285F4\\\"\\n    d=\\\"M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z\\\"\\n  />\\n  <path\\n    fill=\\\"#34A853\\\"\\n    d=\\\"M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z\\\"\\n  />\\n  <path\\n    fill=\\\"#FBBC05\\\"\\n    d=\\\"M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z\\\"\\n  />\\n  <path\\n    fill=\\\"#EA4335\\\"\\n    d=\\\"M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z\\\"\\n  />\\n</svg>`});var JXe={};ue(JXe,{helpCircleSvg:()=>bGt});var bGt,YXe=x(()=>{u();Q();bGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z\\\"\\n  />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var XXe={};ue(XXe,{imageSvg:()=>wGt});var wGt,eet=x(()=>{u();Q();wGt=Y`<svg width=\\\"14\\\" height=\\\"14\\\" viewBox=\\\"0 0 14 14\\\" fill=\\\"none\\\">\\n  <path d=\\\"M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z\\\" fill=\\\"currentColor\\\"/>\\n  <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z\\\" fill=\\\"currentColor\\\"/>\\n</svg>`});var tet={};ue(tet,{idSvg:()=>vGt});var vGt,ret=x(()=>{u();Q();vGt=Y`<svg\\n xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n width=\\\"28\\\"\\n height=\\\"28\\\"\\n viewBox=\\\"0 0 28 28\\\"\\n fill=\\\"none\\\">\\n  <path\\n    fill=\\\"#949E9E\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z\\\"\\n    clip-rule=\\\"evenodd\\\"/>\\n</svg>`});var net={};ue(net,{infoCircleSvg:()=>xGt});var xGt,iet=x(()=>{u();Q();xGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 15\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z\\\"\\n  />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var set={};ue(set,{lightbulbSvg:()=>EGt});var EGt,oet=x(()=>{u();Q();EGt=Y`<svg width=\\\"10\\\" height=\\\"10\\\" viewBox=\\\"0 0 10 10\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z\\\" fill=\\\"#949E9E\\\"/>\\n</svg>`});var aet={};ue(aet,{mailSvg:()=>_Gt});var _Gt,cet=x(()=>{u();Q();_Gt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var uet={};ue(uet,{mobileSvg:()=>CGt});var CGt,det=x(()=>{u();Q();CGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path fill=\\\"currentColor\\\" d=\\\"M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\\\" />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var fet={};ue(fet,{moreSvg:()=>SGt});var SGt,pet=x(()=>{u();Q();SGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 41 40\\\">\\n  <path\\n    style=\\\"fill: var(--wui-color-fg-100);\\\"\\n    fill-opacity=\\\".05\\\"\\n    d=\\\"M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z\\\"\\n  />\\n  <path\\n    fill=\\\"#949E9E\\\"\\n    d=\\\"M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z\\\"\\n  />\\n</svg>`});var het={};ue(het,{networkPlaceholderSvg:()=>AGt});var AGt,met=x(()=>{u();Q();AGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 22 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var get={};ue(get,{nftPlaceholderSvg:()=>TGt});var TGt,yet=x(()=>{u();Q();TGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var bet={};ue(bet,{offSvg:()=>IGt});var IGt,wet=x(()=>{u();Q();IGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M8 0a1 1 0 0 1 1 1v5.38a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1ZM5.26 2.6a1 1 0 0 1-.28 1.39 5.46 5.46 0 1 0 6.04 0 1 1 0 1 1 1.1-1.67 7.46 7.46 0 1 1-8.25 0 1 1 0 0 1 1.4.28Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var vet={};ue(vet,{playStoreSvg:()=>RGt});var RGt,xet=x(()=>{u();Q();RGt=Y` <svg\\n  width=\\\"36\\\"\\n  height=\\\"36\\\"\\n  fill=\\\"none\\\"\\n>\\n  <path\\n    d=\\\"M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z\\\"\\n    fill=\\\"#fff\\\"\\n    fill-opacity=\\\".05\\\"\\n  />\\n  <path\\n    d=\\\"m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z\\\"\\n    fill=\\\"#EA4335\\\"\\n  />\\n  <path\\n    d=\\\"m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z\\\"\\n    fill=\\\"#FBBC04\\\"\\n  />\\n  <path\\n    d=\\\"M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z\\\"\\n    fill=\\\"#4285F4\\\"\\n  />\\n  <path\\n    d=\\\"m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z\\\"\\n    fill=\\\"#34A853\\\"\\n  />\\n  <path\\n    d=\\\"M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z\\\"\\n    stroke=\\\"#fff\\\"\\n    stroke-opacity=\\\".05\\\"\\n  />\\n</svg>`});var Eet={};ue(Eet,{plusSvg:()=>PGt});var PGt,_et=x(()=>{u();Q();PGt=Y`<svg\\n  width=\\\"13\\\"\\n  height=\\\"12\\\"\\n  viewBox=\\\"0 0 13 12\\\"\\n  fill=\\\"none\\\"\\n>\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z\\\"\\n  /></svg\\n>`});var Cet={};ue(Cet,{qrCodeIcon:()=>OGt});var OGt,Aet=x(()=>{u();Q();OGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z\\\"\\n  />\\n</svg>`});var Tet={};ue(Tet,{recycleHorizontalSvg:()=>NGt});var NGt,Iet=x(()=>{u();Q();NGt=Y`<svg\\n  fill=\\\"none\\\"\\n  viewBox=\\\"0 0 21 20\\\"\\n>\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z\\\"\\n  /></svg\\n>`});var Ret={};ue(Ret,{refreshSvg:()=>kGt});var kGt,Pet=x(()=>{u();Q();kGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var Oet={};ue(Oet,{searchSvg:()=>BGt});var BGt,Net=x(()=>{u();Q();BGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var ket={};ue(ket,{sendSvg:()=>MGt});var MGt,Bet=x(()=>{u();Q();MGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 21 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n  <svg\\n    xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n    width=\\\"21\\\"\\n    height=\\\"20\\\"\\n    viewBox=\\\"0 0 21 20\\\"\\n    fill=\\\"none\\\"\\n  ></svg></svg\\n>`});var Met={};ue(Met,{swapHorizontalSvg:()=>DGt});var DGt,Det=x(()=>{u();Q();DGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var Let={};ue(Let,{swapHorizontalMediumSvg:()=>LGt});var LGt,Uet=x(()=>{u();Q();LGt=Y`<svg\\n  width=\\\"14\\\"\\n  height=\\\"14\\\"\\n  viewBox=\\\"0 0 14 14\\\"\\n  fill=\\\"none\\\"\\n  xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n>\\n  <path\\n    fill-rule=\\\"evenodd\\\"\\n    clip-rule=\\\"evenodd\\\"\\n    d=\\\"M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z\\\"\\n    fill=\\\"currentColor\\\"\\n  />\\n</svg>\\n\\n`});var Fet={};ue(Fet,{swapHorizontalBoldSvg:()=>UGt});var UGt,jet=x(()=>{u();Q();UGt=Y`<svg width=\\\"10\\\" height=\\\"10\\\" viewBox=\\\"0 0 10 10\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var Het={};ue(Het,{swapHorizontalRoundedBoldSvg:()=>FGt});var FGt,qet=x(()=>{u();Q();FGt=Y`<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" fill=\\\"none\\\">\\n  <path \\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\" \\n    clip-rule=\\\"evenodd\\\" \\n    d=\\\"M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z\\\" \\n  />\\n</svg>`});var zet={};ue(zet,{swapVerticalSvg:()=>jGt});var jGt,$et=x(()=>{u();Q();jGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 14\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var Vet={};ue(Vet,{telegramSvg:()=>HGt});var HGt,Wet=x(()=>{u();Q();HGt=Y`<svg width=\\\"32\\\" height=\\\"32\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 32 32\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <path fill=\\\"url(#b)\\\" d=\\\"M0 0h32v32H0z\\\"/>\\n    <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z\\\" fill=\\\"#fff\\\"/>\\n  </g>\\n  <path d=\\\"M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z\\\" stroke=\\\"#141414\\\" stroke-opacity=\\\".05\\\"/>\\n  <defs>\\n    <linearGradient id=\\\"b\\\" x1=\\\"1600\\\" y1=\\\"0\\\" x2=\\\"1600\\\" y2=\\\"3176.27\\\" gradientUnits=\\\"userSpaceOnUse\\\">\\n      <stop stop-color=\\\"#2AABEE\\\"/>\\n      <stop offset=\\\"1\\\" stop-color=\\\"#229ED9\\\"/>\\n    </linearGradient>\\n    <clipPath id=\\\"a\\\">\\n      <path d=\\\"M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z\\\" fill=\\\"#fff\\\"/>\\n    </clipPath>\\n  </defs>\\n</svg>`});var Get={};ue(Get,{threeDotsSvg:()=>qGt});var qGt,Ket=x(()=>{u();Q();qGt=Y`<svg width=\\\"14\\\" height=\\\"15\\\" viewBox=\\\"0 0 14 15\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n  <path d=\\\"M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z\\\" fill=\\\"#949E9E\\\"/>\\n  <path d=\\\"M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z\\\" fill=\\\"#949E9E\\\"/>\\n  <path d=\\\"M5.25 12.4688C5.25 13.4352 6.0335 14.2187 7 14.2187C7.9665 14.2187 8.75 13.4352 8.75 12.4688C8.75 11.5023 7.9665 10.7188 7 10.7188C6.0335 10.7188 5.25 11.5023 5.25 12.4688Z\\\" fill=\\\"#949E9E\\\"/>\\n</svg>`});var Zet={};ue(Zet,{twitchSvg:()=>zGt});var zGt,Qet=x(()=>{u();Q();zGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 40 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <g clip-path=\\\"url(#b)\\\">\\n      <circle cx=\\\"20\\\" cy=\\\"19.89\\\" r=\\\"20\\\" fill=\\\"#5A3E85\\\" />\\n      <g clip-path=\\\"url(#c)\\\">\\n        <path\\n          fill=\\\"#fff\\\"\\n          d=\\\"M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z\\\"\\n        />\\n      </g>\\n    </g>\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><rect width=\\\"40\\\" height=\\\"40\\\" fill=\\\"#fff\\\" rx=\\\"20\\\" /></clipPath>\\n    <clipPath id=\\\"b\\\"><path fill=\\\"#fff\\\" d=\\\"M0 0h40v40H0z\\\" /></clipPath>\\n    <clipPath id=\\\"c\\\"><path fill=\\\"#fff\\\" d=\\\"M8 7.89h24v24H8z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var Upe={};ue(Upe,{xSvg:()=>$Gt});var $Gt,Fpe=x(()=>{u();Q();$Gt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 41 40\\\">\\n  <g clip-path=\\\"url(#a)\\\">\\n    <path fill=\\\"#000\\\" d=\\\"M.8 0h40v40H.8z\\\" />\\n    <path\\n      fill=\\\"#fff\\\"\\n      d=\\\"m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z\\\"\\n    />\\n  </g>\\n  <defs>\\n    <clipPath id=\\\"a\\\"><path fill=\\\"#fff\\\" d=\\\"M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z\\\" /></clipPath>\\n  </defs>\\n</svg>`});var Jet={};ue(Jet,{twitterIconSvg:()=>VGt});var VGt,Yet=x(()=>{u();Q();VGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z\\\"\\n  />\\n</svg>`});var Xet={};ue(Xet,{verifySvg:()=>WGt});var WGt,ett=x(()=>{u();Q();WGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 28 28\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var ttt={};ue(ttt,{verifyFilledSvg:()=>GGt});var GGt,rtt=x(()=>{u();Q();GGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 14 14\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var ntt={};ue(ntt,{walletSvg:()=>KGt});var KGt,itt=x(()=>{u();Q();KGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var rV={};ue(rV,{walletConnectBrownSvg:()=>JGt,walletConnectLightBrownSvg:()=>QGt,walletConnectSvg:()=>ZGt});var ZGt,QGt,JGt,nV=x(()=>{u();Q();ZGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 96 67\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z\\\"\\n  />\\n  <path\\n    stroke=\\\"#000\\\"\\n    stroke-opacity=\\\".1\\\"\\n    d=\\\"M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z\\\"\\n  />\\n</svg>`,QGt=Y`\\n<svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<g clip-path=\\\"url(#clip0_22274_4692)\\\">\\n<path d=\\\"M0 6.64C0 4.17295 0 2.93942 0.525474 2.01817C0.880399 1.39592 1.39592 0.880399 2.01817 0.525474C2.93942 0 4.17295 0 6.64 0H9.36C11.8271 0 13.0606 0 13.9818 0.525474C14.6041 0.880399 15.1196 1.39592 15.4745 2.01817C16 2.93942 16 4.17295 16 6.64V9.36C16 11.8271 16 13.0606 15.4745 13.9818C15.1196 14.6041 14.6041 15.1196 13.9818 15.4745C13.0606 16 11.8271 16 9.36 16H6.64C4.17295 16 2.93942 16 2.01817 15.4745C1.39592 15.1196 0.880399 14.6041 0.525474 13.9818C0 13.0606 0 11.8271 0 9.36V6.64Z\\\" fill=\\\"#C7B994\\\"/>\\n<path d=\\\"M4.49038 5.76609C6.42869 3.86833 9.5713 3.86833 11.5096 5.76609L11.7429 5.99449C11.8398 6.08938 11.8398 6.24323 11.7429 6.33811L10.9449 7.11942C10.8964 7.16686 10.8179 7.16686 10.7694 7.11942L10.4484 6.80512C9.09617 5.48119 6.90381 5.48119 5.5516 6.80512L5.20782 7.14171C5.15936 7.18915 5.08079 7.18915 5.03234 7.14171L4.23434 6.3604C4.13742 6.26552 4.13742 6.11167 4.23434 6.01678L4.49038 5.76609ZM13.1599 7.38192L13.8702 8.07729C13.9671 8.17217 13.9671 8.32602 13.8702 8.4209L10.6677 11.5564C10.5708 11.6513 10.4137 11.6513 10.3168 11.5564L8.04388 9.33105C8.01965 9.30733 7.98037 9.30733 7.95614 9.33105L5.6833 11.5564C5.58638 11.6513 5.42925 11.6513 5.33234 11.5564L2.12982 8.42087C2.0329 8.32598 2.0329 8.17213 2.12982 8.07724L2.84004 7.38188C2.93695 7.28699 3.09408 7.28699 3.191 7.38188L5.46392 9.60726C5.48815 9.63098 5.52743 9.63098 5.55166 9.60726L7.82447 7.38188C7.92138 7.28699 8.07851 7.28699 8.17543 7.38187L10.4484 9.60726C10.4726 9.63098 10.5119 9.63098 10.5361 9.60726L12.809 7.38192C12.9059 7.28703 13.063 7.28703 13.1599 7.38192Z\\\" fill=\\\"#202020\\\"/>\\n</g>\\n<defs>\\n<clipPath id=\\\"clip0_22274_4692\\\">\\n<path d=\\\"M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z\\\" fill=\\\"white\\\"/>\\n</clipPath>\\n</defs>\\n</svg>\\n`,JGt=Y`\\n<svg width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<circle cx=\\\"11\\\" cy=\\\"11\\\" r=\\\"11\\\" transform=\\\"matrix(-1 0 0 1 23 1)\\\" fill=\\\"#202020\\\"/>\\n<circle cx=\\\"11\\\" cy=\\\"11\\\" r=\\\"11.5\\\" transform=\\\"matrix(-1 0 0 1 23 1)\\\" stroke=\\\"#C7B994\\\" stroke-opacity=\\\"0.7\\\"/>\\n<path d=\\\"M15.4523 11.0686L16.7472 9.78167C13.8205 6.87297 10.1838 6.87297 7.25708 9.78167L8.55201 11.0686C10.7779 8.85645 13.2279 8.85645 15.4538 11.0686H15.4523Z\\\" fill=\\\"#C7B994\\\"/>\\n<path d=\\\"M15.0199 14.067L12 11.0656L8.98 14.067L5.96004 11.0656L4.66663 12.3511L8.98 16.6393L12 13.638L15.0199 16.6393L19.3333 12.3511L18.0399 11.0656L15.0199 14.067Z\\\" fill=\\\"#C7B994\\\"/>\\n</svg>\\n`});var stt={};ue(stt,{walletPlaceholderSvg:()=>YGt});var YGt,ott=x(()=>{u();Q();YGt=Y`\\n  <svg fill=\\\"none\\\" viewBox=\\\"0 0 48 44\\\">\\n    <path\\n      style=\\\"fill: var(--wui-color-bg-300);\\\"\\n      d=\\\"M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.05 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z\\\"\\n    />\\n    <path\\n      style=\\\"fill: var(--wui-color-fg-200);\\\"\\n      fill-rule=\\\"evenodd\\\"\\n      d=\\\"M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z\\\"\\n      clip-rule=\\\"evenodd\\\"\\n    />\\n  </svg>\\n`});var att={};ue(att,{warningCircleSvg:()=>XGt});var XGt,ctt=x(()=>{u();Q();XGt=Y`<svg fill=\\\"none\\\" viewBox=\\\"0 0 20 20\\\">\\n  <path\\n    fill=\\\"currentColor\\\"\\n    d=\\\"M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z\\\"\\n  />\\n  <path\\n    fill=\\\"currentColor\\\"\\n    fill-rule=\\\"evenodd\\\"\\n    d=\\\"M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z\\\"\\n    clip-rule=\\\"evenodd\\\"\\n  />\\n</svg>`});var ltt={};ue(ltt,{infoSvg:()=>eKt});var eKt,utt=x(()=>{u();Q();eKt=Y`<svg width=\\\"22\\\" height=\\\"22\\\" viewBox=\\\"0 0 22 22\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path d=\\\"M9.125 6.875C9.125 6.57833 9.21298 6.28832 9.3778 6.04165C9.54262 5.79497 9.77689 5.60271 10.051 5.48918C10.3251 5.37565 10.6267 5.34594 10.9176 5.40382C11.2086 5.4617 11.4759 5.60456 11.6857 5.81434C11.8954 6.02412 12.0383 6.29139 12.0962 6.58236C12.1541 6.87334 12.1244 7.17494 12.0108 7.44903C11.8973 7.72311 11.705 7.95738 11.4584 8.1222C11.2117 8.28703 10.9217 8.375 10.625 8.375C10.2272 8.375 9.84565 8.21696 9.56434 7.93566C9.28304 7.65436 9.125 7.27282 9.125 6.875ZM21.125 11C21.125 13.0025 20.5312 14.9601 19.4186 16.6251C18.3061 18.2902 16.7248 19.5879 14.8747 20.3543C13.0246 21.1206 10.9888 21.3211 9.02471 20.9305C7.06066 20.5398 5.25656 19.5755 3.84055 18.1595C2.42454 16.7435 1.46023 14.9393 1.06955 12.9753C0.678878 11.0112 0.879387 8.97543 1.64572 7.12533C2.41206 5.27523 3.70981 3.69392 5.37486 2.58137C7.0399 1.46882 8.99747 0.875 11 0.875C13.6844 0.877978 16.258 1.94567 18.1562 3.84383C20.0543 5.74199 21.122 8.3156 21.125 11ZM18.875 11C18.875 9.44247 18.4131 7.91992 17.5478 6.62488C16.6825 5.32985 15.4526 4.32049 14.0136 3.72445C12.5747 3.12841 10.9913 2.97246 9.46367 3.27632C7.93607 3.58017 6.53288 4.3302 5.43154 5.43153C4.3302 6.53287 3.58018 7.93606 3.27632 9.46366C2.97246 10.9913 3.12841 12.5747 3.72445 14.0136C4.32049 15.4526 5.32985 16.6825 6.62489 17.5478C7.91993 18.4131 9.44248 18.875 11 18.875C13.0879 18.8728 15.0896 18.0424 16.566 16.566C18.0424 15.0896 18.8728 13.0879 18.875 11ZM12.125 14.4387V11.375C12.125 10.8777 11.9275 10.4008 11.5758 10.0492C11.2242 9.69754 10.7473 9.5 10.25 9.5C9.98433 9.4996 9.72708 9.59325 9.52383 9.76435C9.32058 9.93544 9.18444 10.173 9.13952 10.4348C9.09461 10.6967 9.14381 10.966 9.27843 11.195C9.41304 11.4241 9.62438 11.5981 9.875 11.6863V14.75C9.875 15.2473 10.0725 15.7242 10.4242 16.0758C10.7758 16.4275 11.2527 16.625 11.75 16.625C12.0157 16.6254 12.2729 16.5318 12.4762 16.3607C12.6794 16.1896 12.8156 15.952 12.8605 15.6902C12.9054 15.4283 12.8562 15.159 12.7216 14.93C12.587 14.7009 12.3756 14.5269 12.125 14.4387Z\\\" fill=\\\"currentColor\\\"/>\\n</svg>`});var dtt={};ue(dtt,{exclamationTriangleSvg:()=>tKt});var tKt,ftt=x(()=>{u();Q();tKt=Y`<svg width=\\\"16\\\" height=\\\"16\\\" viewBox=\\\"0 0 16 16\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n<path d=\\\"M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z\\\" fill=\\\"currentColor\\\"/>\\n</svg>\\n`});var ptt={};ue(ptt,{reownSvg:()=>rKt});var rKt,htt=x(()=>{u();Q();rKt=Y`<svg width=\\\"60\\\" height=\\\"16\\\" viewBox=\\\"0 0 60 16\\\" fill=\\\"none\\\"\\\">\\n  <path d=\\\"M9.3335 4.66667C9.3335 2.08934 11.4229 0 14.0002 0H20.6669C23.2442 0 25.3335 2.08934 25.3335 4.66667V11.3333C25.3335 13.9106 23.2442 16 20.6669 16H14.0002C11.4229 16 9.3335 13.9106 9.3335 11.3333V4.66667Z\\\" fill=\\\"#363636\\\"/>\\n  <path d=\\\"M15.6055 11.0003L17.9448 4.66699H18.6316L16.2923 11.0003H15.6055Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M0 4.33333C0 1.9401 1.9401 0 4.33333 0C6.72657 0 8.66669 1.9401 8.66669 4.33333V11.6667C8.66669 14.0599 6.72657 16 4.33333 16C1.9401 16 0 14.0599 0 11.6667V4.33333Z\\\" fill=\\\"#363636\\\"/>\\n  <path d=\\\"M3.9165 9.99934V9.16602H4.74983V9.99934H3.9165Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M26 8C26 3.58172 29.3517 0 33.4863 0H52.5137C56.6483 0 60 3.58172 60 8C60 12.4183 56.6483 16 52.5137 16H33.4863C29.3517 16 26 12.4183 26 8Z\\\" fill=\\\"#363636\\\"/>\\n  <path d=\\\"M49.3687 9.95834V6.26232H50.0213V6.81966C50.256 6.40899 50.7326 6.16699 51.2606 6.16699C52.0599 6.16699 52.6173 6.67299 52.6173 7.65566V9.95834H51.972V7.69234C51.972 7.04696 51.6053 6.70966 51.07 6.70966C50.4906 6.70966 50.0213 7.17168 50.0213 7.82433V9.95834H49.3687Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M45.2538 9.95773L44.5718 6.26172H45.1877L45.6717 9.31242L46.3098 7.30306H46.9184L47.5491 9.29041L48.0404 6.26172H48.6564L47.9744 9.95773H47.2411L46.6178 8.03641L45.9871 9.95773H45.2538Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M42.3709 10.0536C41.2489 10.0536 40.5889 9.21765 40.5889 8.1103C40.5889 7.01035 41.2489 6.16699 42.3709 6.16699C43.4929 6.16699 44.1529 7.01035 44.1529 8.1103C44.1529 9.21765 43.4929 10.0536 42.3709 10.0536ZM42.3709 9.51096C43.1775 9.51096 43.4856 8.82164 43.4856 8.10296C43.4856 7.39163 43.1775 6.70966 42.3709 6.70966C41.5642 6.70966 41.2562 7.39163 41.2562 8.10296C41.2562 8.82164 41.5642 9.51096 42.3709 9.51096Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M38.2805 10.0536C37.1952 10.0536 36.5132 9.22499 36.5132 8.1103C36.5132 7.00302 37.1952 6.16699 38.2805 6.16699C39.1972 6.16699 40.0038 6.68766 39.9159 8.27896H37.1805C37.2319 8.96103 37.5472 9.5183 38.2805 9.5183C38.7718 9.5183 39.0945 9.21765 39.2045 8.87299H39.8499C39.7472 9.48903 39.1679 10.0536 38.2805 10.0536ZM37.1952 7.78765H39.2852C39.2338 7.04696 38.8892 6.70232 38.2805 6.70232C37.6132 6.70232 37.2832 7.18635 37.1952 7.78765Z\\\" fill=\\\"#F6F6F6\\\"/>\\n  <path d=\\\"M33.3828 9.95773V6.26172H34.0501V6.88506C34.2848 6.47439 34.6882 6.26172 35.1061 6.26172H35.9935V6.88506H35.0548C34.4682 6.88506 34.0501 7.26638 34.0501 8.00706V9.95773H33.3828Z\\\" fill=\\\"#F6F6F6\\\"/>\\n</svg>`});async function nKt(t){if(tV.has(t))return tV.get(t);let r=(mtt[t]??mtt.copy)();return tV.set(t,r),r}var hR,mtt,yx,aa=x(()=>{u();Q();Ke();TYe();IYe();Er();fr();PYe();hR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},mtt={add:async()=>(await Promise.resolve().then(()=>(NYe(),OYe))).addSvg,allWallets:async()=>(await Promise.resolve().then(()=>(BYe(),kYe))).allWalletsSvg,arrowBottomCircle:async()=>(await Promise.resolve().then(()=>(DYe(),MYe))).arrowBottomCircleSvg,appStore:async()=>(await Promise.resolve().then(()=>(UYe(),LYe))).appStoreSvg,apple:async()=>(await Promise.resolve().then(()=>(jYe(),FYe))).appleSvg,arrowBottom:async()=>(await Promise.resolve().then(()=>(qYe(),HYe))).arrowBottomSvg,arrowLeft:async()=>(await Promise.resolve().then(()=>($Ye(),zYe))).arrowLeftSvg,arrowRight:async()=>(await Promise.resolve().then(()=>(WYe(),VYe))).arrowRightSvg,arrowTop:async()=>(await Promise.resolve().then(()=>(KYe(),GYe))).arrowTopSvg,bank:async()=>(await Promise.resolve().then(()=>(QYe(),ZYe))).bankSvg,browser:async()=>(await Promise.resolve().then(()=>(YYe(),JYe))).browserSvg,card:async()=>(await Promise.resolve().then(()=>(eXe(),XYe))).cardSvg,checkmark:async()=>(await Promise.resolve().then(()=>(rXe(),tXe))).checkmarkSvg,checkmarkBold:async()=>(await Promise.resolve().then(()=>(iXe(),nXe))).checkmarkBoldSvg,chevronBottom:async()=>(await Promise.resolve().then(()=>(oXe(),sXe))).chevronBottomSvg,chevronLeft:async()=>(await Promise.resolve().then(()=>(cXe(),aXe))).chevronLeftSvg,chevronRight:async()=>(await Promise.resolve().then(()=>(uXe(),lXe))).chevronRightSvg,chevronTop:async()=>(await Promise.resolve().then(()=>(fXe(),dXe))).chevronTopSvg,chromeStore:async()=>(await Promise.resolve().then(()=>(hXe(),pXe))).chromeStoreSvg,clock:async()=>(await Promise.resolve().then(()=>(gXe(),mXe))).clockSvg,close:async()=>(await Promise.resolve().then(()=>(bXe(),yXe))).closeSvg,compass:async()=>(await Promise.resolve().then(()=>(vXe(),wXe))).compassSvg,coinPlaceholder:async()=>(await Promise.resolve().then(()=>(EXe(),xXe))).coinPlaceholderSvg,copy:async()=>(await Promise.resolve().then(()=>(CXe(),_Xe))).copySvg,cursor:async()=>(await Promise.resolve().then(()=>(AXe(),SXe))).cursorSvg,cursorTransparent:async()=>(await Promise.resolve().then(()=>(IXe(),TXe))).cursorTransparentSvg,desktop:async()=>(await Promise.resolve().then(()=>(PXe(),RXe))).desktopSvg,disconnect:async()=>(await Promise.resolve().then(()=>(NXe(),OXe))).disconnectSvg,discord:async()=>(await Promise.resolve().then(()=>(BXe(),kXe))).discordSvg,etherscan:async()=>(await Promise.resolve().then(()=>(DXe(),MXe))).etherscanSvg,extension:async()=>(await Promise.resolve().then(()=>(UXe(),LXe))).extensionSvg,externalLink:async()=>(await Promise.resolve().then(()=>(jXe(),FXe))).externalLinkSvg,facebook:async()=>(await Promise.resolve().then(()=>(qXe(),HXe))).facebookSvg,farcaster:async()=>(await Promise.resolve().then(()=>($Xe(),zXe))).farcasterSvg,filters:async()=>(await Promise.resolve().then(()=>(WXe(),VXe))).filtersSvg,github:async()=>(await Promise.resolve().then(()=>(KXe(),GXe))).githubSvg,google:async()=>(await Promise.resolve().then(()=>(QXe(),ZXe))).googleSvg,helpCircle:async()=>(await Promise.resolve().then(()=>(YXe(),JXe))).helpCircleSvg,image:async()=>(await Promise.resolve().then(()=>(eet(),XXe))).imageSvg,id:async()=>(await Promise.resolve().then(()=>(ret(),tet))).idSvg,infoCircle:async()=>(await Promise.resolve().then(()=>(iet(),net))).infoCircleSvg,lightbulb:async()=>(await Promise.resolve().then(()=>(oet(),set))).lightbulbSvg,mail:async()=>(await Promise.resolve().then(()=>(cet(),aet))).mailSvg,mobile:async()=>(await Promise.resolve().then(()=>(det(),uet))).mobileSvg,more:async()=>(await Promise.resolve().then(()=>(pet(),fet))).moreSvg,networkPlaceholder:async()=>(await Promise.resolve().then(()=>(met(),het))).networkPlaceholderSvg,nftPlaceholder:async()=>(await Promise.resolve().then(()=>(yet(),get))).nftPlaceholderSvg,off:async()=>(await Promise.resolve().then(()=>(wet(),bet))).offSvg,playStore:async()=>(await Promise.resolve().then(()=>(xet(),vet))).playStoreSvg,plus:async()=>(await Promise.resolve().then(()=>(_et(),Eet))).plusSvg,qrCode:async()=>(await Promise.resolve().then(()=>(Aet(),Cet))).qrCodeIcon,recycleHorizontal:async()=>(await Promise.resolve().then(()=>(Iet(),Tet))).recycleHorizontalSvg,refresh:async()=>(await Promise.resolve().then(()=>(Pet(),Ret))).refreshSvg,search:async()=>(await Promise.resolve().then(()=>(Net(),Oet))).searchSvg,send:async()=>(await Promise.resolve().then(()=>(Bet(),ket))).sendSvg,swapHorizontal:async()=>(await Promise.resolve().then(()=>(Det(),Met))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await Promise.resolve().then(()=>(Uet(),Let))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await Promise.resolve().then(()=>(jet(),Fet))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await Promise.resolve().then(()=>(qet(),Het))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await Promise.resolve().then(()=>($et(),zet))).swapVerticalSvg,telegram:async()=>(await Promise.resolve().then(()=>(Wet(),Vet))).telegramSvg,threeDots:async()=>(await Promise.resolve().then(()=>(Ket(),Get))).threeDotsSvg,twitch:async()=>(await Promise.resolve().then(()=>(Qet(),Zet))).twitchSvg,twitter:async()=>(await Promise.resolve().then(()=>(Fpe(),Upe))).xSvg,twitterIcon:async()=>(await Promise.resolve().then(()=>(Yet(),Jet))).twitterIconSvg,verify:async()=>(await Promise.resolve().then(()=>(ett(),Xet))).verifySvg,verifyFilled:async()=>(await Promise.resolve().then(()=>(rtt(),ttt))).verifyFilledSvg,wallet:async()=>(await Promise.resolve().then(()=>(itt(),ntt))).walletSvg,walletConnect:async()=>(await Promise.resolve().then(()=>(nV(),rV))).walletConnectSvg,walletConnectLightBrown:async()=>(await Promise.resolve().then(()=>(nV(),rV))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await Promise.resolve().then(()=>(nV(),rV))).walletConnectBrownSvg,walletPlaceholder:async()=>(await Promise.resolve().then(()=>(ott(),stt))).walletPlaceholderSvg,warningCircle:async()=>(await Promise.resolve().then(()=>(ctt(),att))).warningCircleSvg,x:async()=>(await Promise.resolve().then(()=>(Fpe(),Upe))).xSvg,info:async()=>(await Promise.resolve().then(()=>(utt(),ltt))).infoSvg,exclamationTriangle:async()=>(await Promise.resolve().then(()=>(ftt(),dtt))).exclamationTriangleSvg,reown:async()=>(await Promise.resolve().then(()=>(htt(),ptt))).reownSvg};yx=class extends se{constructor(){super(...arguments),this.size=\\\"md\\\",this.name=\\\"copy\\\",this.color=\\\"fg-300\\\",this.aspectRatio=\\\"1 / 1\\\"}render(){return this.style.cssText=`\\n      --local-color: ${`var(--wui-color-${this.color});`}\\n      --local-width: ${`var(--wui-icon-size-${this.size});`}\\n      --local-aspect-ratio: ${this.aspectRatio}\\n    `,$`${SYe(nKt(this.name),$`<div class=\\\"fallback\\\"></div>`)}`}};yx.styles=[ze,Th,RYe];hR([G()],yx.prototype,\\\"size\\\",void 0);hR([G()],yx.prototype,\\\"name\\\",void 0);hR([G()],yx.prototype,\\\"color\\\",void 0);hR([G()],yx.prototype,\\\"aspectRatio\\\",void 0);yx=hR([te(\\\"wui-icon\\\")],yx)});var iV,gtt=x(()=>{u();F0();a8();iV=gx(class extends o8{constructor(t){if(super(t),t.type!==J$.ATTRIBUTE||t.name!==\\\"class\\\"||t.strings?.length>2)throw Error(\\\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\\\")}render(t){return\\\" \\\"+Object.keys(t).filter((e=>t[e])).join(\\\" \\\")+\\\" \\\"}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(\\\" \\\").split(/\\\\s/).filter((n=>n!==\\\"\\\"))));for(let n in e)e[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(e)}let r=t.element.classList;for(let n of this.st)n in e||(r.remove(n),this.st.delete(n));for(let n in e){let i=!!e[n];i===this.st.has(n)||this.nt?.has(n)||(i?(r.add(n),this.st.add(n)):(r.remove(n),this.st.delete(n)))}return xd}})});var jpe=x(()=>{u();gtt()});var ytt,btt=x(()=>{u();Q();ytt=we`\\n  :host {\\n    display: inline-flex !important;\\n  }\\n\\n  slot {\\n    width: 100%;\\n    display: inline-block;\\n    font-style: normal;\\n    font-family: var(--wui-font-family);\\n    font-feature-settings:\\n      'tnum' on,\\n      'lnum' on,\\n      'case' on;\\n    line-height: 130%;\\n    font-weight: var(--wui-font-weight-regular);\\n    overflow: inherit;\\n    text-overflow: inherit;\\n    text-align: var(--local-align);\\n    color: var(--local-color);\\n  }\\n\\n  .wui-line-clamp-1 {\\n    overflow: hidden;\\n    display: -webkit-box;\\n    -webkit-box-orient: vertical;\\n    -webkit-line-clamp: 1;\\n  }\\n\\n  .wui-line-clamp-2 {\\n    overflow: hidden;\\n    display: -webkit-box;\\n    -webkit-box-orient: vertical;\\n    -webkit-line-clamp: 2;\\n  }\\n\\n  .wui-font-medium-400 {\\n    font-size: var(--wui-font-size-medium);\\n    font-weight: var(--wui-font-weight-light);\\n    letter-spacing: var(--wui-letter-spacing-medium);\\n  }\\n\\n  .wui-font-medium-600 {\\n    font-size: var(--wui-font-size-medium);\\n    letter-spacing: var(--wui-letter-spacing-medium);\\n  }\\n\\n  .wui-font-title-600 {\\n    font-size: var(--wui-font-size-title);\\n    letter-spacing: var(--wui-letter-spacing-title);\\n  }\\n\\n  .wui-font-title-6-600 {\\n    font-size: var(--wui-font-size-title-6);\\n    letter-spacing: var(--wui-letter-spacing-title-6);\\n  }\\n\\n  .wui-font-mini-700 {\\n    font-size: var(--wui-font-size-mini);\\n    letter-spacing: var(--wui-letter-spacing-mini);\\n    text-transform: uppercase;\\n  }\\n\\n  .wui-font-large-500,\\n  .wui-font-large-600,\\n  .wui-font-large-700 {\\n    font-size: var(--wui-font-size-large);\\n    letter-spacing: var(--wui-letter-spacing-large);\\n  }\\n\\n  .wui-font-2xl-500,\\n  .wui-font-2xl-600,\\n  .wui-font-2xl-700 {\\n    font-size: var(--wui-font-size-2xl);\\n    letter-spacing: var(--wui-letter-spacing-2xl);\\n  }\\n\\n  .wui-font-paragraph-400,\\n  .wui-font-paragraph-500,\\n  .wui-font-paragraph-600,\\n  .wui-font-paragraph-700 {\\n    font-size: var(--wui-font-size-paragraph);\\n    letter-spacing: var(--wui-letter-spacing-paragraph);\\n  }\\n\\n  .wui-font-small-400,\\n  .wui-font-small-500,\\n  .wui-font-small-600 {\\n    font-size: var(--wui-font-size-small);\\n    letter-spacing: var(--wui-letter-spacing-small);\\n  }\\n\\n  .wui-font-tiny-400,\\n  .wui-font-tiny-500,\\n  .wui-font-tiny-600 {\\n    font-size: var(--wui-font-size-tiny);\\n    letter-spacing: var(--wui-letter-spacing-tiny);\\n  }\\n\\n  .wui-font-micro-700,\\n  .wui-font-micro-600 {\\n    font-size: var(--wui-font-size-micro);\\n    letter-spacing: var(--wui-letter-spacing-micro);\\n    text-transform: uppercase;\\n  }\\n\\n  .wui-font-tiny-400,\\n  .wui-font-small-400,\\n  .wui-font-medium-400,\\n  .wui-font-paragraph-400 {\\n    font-weight: var(--wui-font-weight-light);\\n  }\\n\\n  .wui-font-large-700,\\n  .wui-font-paragraph-700,\\n  .wui-font-micro-700,\\n  .wui-font-mini-700 {\\n    font-weight: var(--wui-font-weight-bold);\\n  }\\n\\n  .wui-font-medium-600,\\n  .wui-font-medium-title-600,\\n  .wui-font-title-6-600,\\n  .wui-font-large-600,\\n  .wui-font-paragraph-600,\\n  .wui-font-small-600,\\n  .wui-font-tiny-600,\\n  .wui-font-micro-600 {\\n    font-weight: var(--wui-font-weight-medium);\\n  }\\n\\n  :host([disabled]) {\\n    opacity: 0.4;\\n  }\\n`});var mR,bx,tu=x(()=>{u();Q();Ke();jpe();Er();fr();btt();mR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},bx=class extends se{constructor(){super(...arguments),this.variant=\\\"paragraph-500\\\",this.color=\\\"fg-300\\\",this.align=\\\"left\\\",this.lineClamp=void 0}render(){let e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=`\\n      --local-align: ${this.align};\\n      --local-color: var(--wui-color-${this.color});\\n    `,$`<slot class=${iV(e)}></slot>`}};bx.styles=[ze,ytt];mR([G()],bx.prototype,\\\"variant\\\",void 0);mR([G()],bx.prototype,\\\"color\\\",void 0);mR([G()],bx.prototype,\\\"align\\\",void 0);mR([G()],bx.prototype,\\\"lineClamp\\\",void 0);bx=mR([te(\\\"wui-text\\\")],bx)});var wtt,vtt=x(()=>{u();Q();wtt=we`\\n  :host {\\n    display: inline-flex;\\n    justify-content: center;\\n    align-items: center;\\n    position: relative;\\n    overflow: hidden;\\n    background-color: var(--wui-color-gray-glass-020);\\n    border-radius: var(--local-border-radius);\\n    border: var(--local-border);\\n    box-sizing: content-box;\\n    width: var(--local-size);\\n    height: var(--local-size);\\n    min-height: var(--local-size);\\n    min-width: var(--local-size);\\n  }\\n\\n  @supports (background: color-mix(in srgb, white 50%, black)) {\\n    :host {\\n      background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);\\n    }\\n  }\\n`});var H0,Mf,tb=x(()=>{u();Q();Ke();aa();Er();fr();vtt();H0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Mf=class extends se{constructor(){super(...arguments),this.size=\\\"md\\\",this.backgroundColor=\\\"accent-100\\\",this.iconColor=\\\"accent-100\\\",this.background=\\\"transparent\\\",this.border=!1,this.borderColor=\\\"wui-color-bg-125\\\",this.icon=\\\"copy\\\"}render(){let e=this.iconSize||this.size,r=this.size===\\\"lg\\\",n=this.size===\\\"xl\\\",i=r?\\\"12%\\\":\\\"16%\\\",s=r?\\\"xxs\\\":n?\\\"s\\\":\\\"3xl\\\",o=this.background===\\\"gray\\\",a=this.background===\\\"opaque\\\",c=this.backgroundColor===\\\"accent-100\\\"&&a||this.backgroundColor===\\\"success-100\\\"&&a||this.backgroundColor===\\\"error-100\\\"&&a||this.backgroundColor===\\\"inverse-100\\\"&&a,l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=`\\n       --local-bg-value: ${l};\\n       --local-bg-mix: ${c||o?\\\"100%\\\":i};\\n       --local-border-radius: var(--wui-border-radius-${s});\\n       --local-size: var(--wui-icon-box-size-${this.size});\\n       --local-border: ${this.borderColor===\\\"wui-color-bg-125\\\"?\\\"2px\\\":\\\"1px\\\"} solid ${this.border?`var(--${this.borderColor})`:\\\"transparent\\\"}\\n   `,$` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};Mf.styles=[ze,dr,wtt];H0([G()],Mf.prototype,\\\"size\\\",void 0);H0([G()],Mf.prototype,\\\"backgroundColor\\\",void 0);H0([G()],Mf.prototype,\\\"iconColor\\\",void 0);H0([G()],Mf.prototype,\\\"iconSize\\\",void 0);H0([G()],Mf.prototype,\\\"background\\\",void 0);H0([G({type:Boolean})],Mf.prototype,\\\"border\\\",void 0);H0([G()],Mf.prototype,\\\"borderColor\\\",void 0);H0([G()],Mf.prototype,\\\"icon\\\",void 0);Mf=H0([te(\\\"wui-icon-box\\\")],Mf)});var xtt,Ett=x(()=>{u();Q();xtt=we`\\n  :host {\\n    display: block;\\n    width: var(--local-width);\\n    height: var(--local-height);\\n  }\\n\\n  img {\\n    display: block;\\n    width: 100%;\\n    height: 100%;\\n    object-fit: cover;\\n    object-position: center center;\\n    border-radius: inherit;\\n  }\\n`});var sV,l8,u8=x(()=>{u();Q();Ke();Er();fr();Ett();sV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},l8=class extends se{constructor(){super(...arguments),this.src=\\\"./path/to/image.jpg\\\",this.alt=\\\"Image\\\",this.size=void 0}render(){return this.style.cssText=`\\n      --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:\\\"100%\\\"};\\n      --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:\\\"100%\\\"};\\n      `,$`<img src=${this.src} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent(\\\"onLoadError\\\",{bubbles:!0,composed:!0}))}};l8.styles=[ze,Th,xtt];sV([G()],l8.prototype,\\\"src\\\",void 0);sV([G()],l8.prototype,\\\"alt\\\",void 0);sV([G()],l8.prototype,\\\"size\\\",void 0);l8=sV([te(\\\"wui-image\\\")],l8)});var _tt,Ctt=x(()=>{u();Q();_tt=we`\\n  :host {\\n    position: relative;\\n    background-color: var(--wui-color-gray-glass-002);\\n    display: flex;\\n    justify-content: center;\\n    align-items: center;\\n    width: var(--local-size);\\n    height: var(--local-size);\\n    border-radius: inherit;\\n    border-radius: var(--local-border-radius);\\n  }\\n\\n  :host > wui-flex {\\n    overflow: hidden;\\n    border-radius: inherit;\\n    border-radius: var(--local-border-radius);\\n  }\\n\\n  :host::after {\\n    content: '';\\n    position: absolute;\\n    top: 0;\\n    bottom: 0;\\n    left: 0;\\n    right: 0;\\n    border-radius: inherit;\\n    border: 1px solid var(--wui-color-gray-glass-010);\\n    pointer-events: none;\\n  }\\n\\n  :host([name='Extension'])::after {\\n    border: 1px solid var(--wui-color-accent-glass-010);\\n  }\\n\\n  :host([data-wallet-icon='allWallets']) {\\n    background-color: var(--wui-all-wallets-bg-100);\\n  }\\n\\n  :host([data-wallet-icon='allWallets'])::after {\\n    border: 1px solid var(--wui-color-accent-glass-010);\\n  }\\n\\n  wui-icon[data-parent-size='inherit'] {\\n    width: 75%;\\n    height: 75%;\\n    align-items: center;\\n  }\\n\\n  wui-icon[data-parent-size='sm'] {\\n    width: 18px;\\n    height: 18px;\\n  }\\n\\n  wui-icon[data-parent-size='md'] {\\n    width: 24px;\\n    height: 24px;\\n  }\\n\\n  wui-icon[data-parent-size='lg'] {\\n    width: 42px;\\n    height: 42px;\\n  }\\n\\n  wui-icon[data-parent-size='full'] {\\n    width: 100%;\\n    height: 100%;\\n  }\\n\\n  :host > wui-icon-box {\\n    position: absolute;\\n    overflow: hidden;\\n    right: -1px;\\n    bottom: -2px;\\n    z-index: 1;\\n    border: 2px solid var(--wui-color-bg-150, #1e1f1f);\\n    padding: 1px;\\n  }\\n`});var wx,q0,oV=x(()=>{u();Q();Ke();aa();u8();eb();Er();fr();tb();Ctt();wx=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},q0=class extends se{constructor(){super(...arguments),this.size=\\\"md\\\",this.name=\\\"\\\",this.installed=!1,this.badgeSize=\\\"xs\\\"}render(){let e=\\\"xxs\\\";return this.size===\\\"lg\\\"?e=\\\"m\\\":this.size===\\\"md\\\"?e=\\\"xs\\\":e=\\\"xxs\\\",this.style.cssText=`\\n       --local-border-radius: var(--wui-border-radius-${e});\\n       --local-size: var(--wui-wallet-image-size-${this.size});\\n   `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),$`\\n      <wui-flex justifyContent=\\\"center\\\" alignItems=\\\"center\\\"> ${this.templateVisual()} </wui-flex>\\n    `}templateVisual(){return this.imageSrc?$`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?$`<wui-icon\\n        data-parent-size=\\\"md\\\"\\n        size=\\\"md\\\"\\n        color=\\\"inherit\\\"\\n        name=${this.walletIcon}\\n      ></wui-icon>`:$`<wui-icon\\n      data-parent-size=${this.size}\\n      size=\\\"inherit\\\"\\n      color=\\\"inherit\\\"\\n      name=\\\"walletPlaceholder\\\"\\n    ></wui-icon>`}};q0.styles=[dr,ze,_tt];wx([G()],q0.prototype,\\\"size\\\",void 0);wx([G()],q0.prototype,\\\"name\\\",void 0);wx([G()],q0.prototype,\\\"imageSrc\\\",void 0);wx([G()],q0.prototype,\\\"walletIcon\\\",void 0);wx([G({type:Boolean})],q0.prototype,\\\"installed\\\",void 0);wx([G()],q0.prototype,\\\"badgeSize\\\",void 0);q0=wx([te(\\\"wui-wallet-image\\\")],q0)});var Stt,Att=x(()=>{u();Q();Stt=we`\\n  :host {\\n    position: relative;\\n    border-radius: var(--wui-border-radius-xxs);\\n    width: 40px;\\n    height: 40px;\\n    overflow: hidden;\\n    background: var(--wui-color-gray-glass-002);\\n    display: flex;\\n    justify-content: center;\\n    align-items: center;\\n    flex-wrap: wrap;\\n    gap: var(--wui-spacing-4xs);\\n    padding: 3.75px !important;\\n  }\\n\\n  :host::after {\\n    content: '';\\n    position: absolute;\\n    top: 0;\\n    bottom: 0;\\n    left: 0;\\n    right: 0;\\n    border-radius: inherit;\\n    border: 1px solid var(--wui-color-gray-glass-010);\\n    pointer-events: none;\\n  }\\n\\n  :host > wui-wallet-image {\\n    width: 14px;\\n    height: 14px;\\n    border-radius: var(--wui-border-radius-5xs);\\n  }\\n\\n  :host > wui-flex {\\n    padding: 2px;\\n    position: fixed;\\n    overflow: hidden;\\n    left: 34px;\\n    bottom: 8px;\\n    background: var(--dark-background-150, #1e1f1f);\\n    border-radius: 50%;\\n    z-index: 2;\\n    display: flex;\\n  }\\n`});var Ttt,Hpe,aV,Itt=x(()=>{u();Q();Ke();bn();eb();Er();fr();tb();oV();Att();Ttt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Hpe=4,aV=class extends se{constructor(){super(...arguments),this.walletImages=[]}render(){let e=this.walletImages.length<Hpe;return $`${this.walletImages.slice(0,Hpe).map(({src:r,walletName:n})=>$`\\n            <wui-wallet-image\\n              size=\\\"inherit\\\"\\n              imageSrc=${r}\\n              name=${Re(n)}\\n            ></wui-wallet-image>\\n          `)}\\n      ${e?[...Array(Hpe-this.walletImages.length)].map(()=>$` <wui-wallet-image size=\\\"inherit\\\" name=\\\"\\\"></wui-wallet-image>`):null}\\n      <wui-flex>\\n        <wui-icon-box\\n          size=\\\"xxs\\\"\\n          iconSize=\\\"xxs\\\"\\n          iconcolor=\\\"success-100\\\"\\n          backgroundcolor=\\\"success-100\\\"\\n          icon=\\\"checkmark\\\"\\n          background=\\\"opaque\\\"\\n        ></wui-icon-box>\\n      </wui-flex>`}};aV.styles=[ze,Stt];Ttt([G({type:Array})],aV.prototype,\\\"walletImages\\\",void 0);aV=Ttt([te(\\\"wui-all-wallets-image\\\")],aV)});var Rtt,Ptt=x(()=>{u();Q();Rtt=we`\\n  :host {\\n    display: flex;\\n    justify-content: center;\\n    align-items: center;\\n    height: var(--wui-spacing-m);\\n    padding: 0 var(--wui-spacing-3xs) !important;\\n    border-radius: var(--wui-border-radius-5xs);\\n    transition:\\n      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);\\n    will-change: border-radius, background-color;\\n  }\\n\\n  :host > wui-text {\\n    transform: translateY(5%);\\n  }\\n\\n  :host([data-variant='main']) {\\n    background-color: var(--wui-color-accent-glass-015);\\n    color: var(--wui-color-accent-100);\\n  }\\n\\n  :host([data-variant='shade']) {\\n    background-color: var(--wui-color-gray-glass-010);\\n    color: var(--wui-color-fg-200);\\n  }\\n\\n  :host([data-variant='success']) {\\n    background-color: var(--wui-icon-box-bg-success-100);\\n    color: var(--wui-color-success-100);\\n  }\\n\\n  :host([data-variant='error']) {\\n    background-color: var(--wui-icon-box-bg-error-100);\\n    color: var(--wui-color-error-100);\\n  }\\n\\n  :host([data-size='lg']) {\\n    padding: 11px 5px !important;\\n  }\\n\\n  :host([data-size='lg']) > wui-text {\\n    transform: translateY(2%);\\n  }\\n`});var qpe,gR,zpe=x(()=>{u();Q();Ke();tu();Er();fr();Ptt();qpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},gR=class extends se{constructor(){super(...arguments),this.variant=\\\"main\\\",this.size=\\\"lg\\\"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;let e=this.size===\\\"md\\\"?\\\"mini-700\\\":\\\"micro-700\\\";return $`\\n      <wui-text data-variant=${this.variant} variant=${e} color=\\\"inherit\\\">\\n        <slot></slot>\\n      </wui-text>\\n    `}};gR.styles=[ze,Rtt];qpe([G()],gR.prototype,\\\"variant\\\",void 0);qpe([G()],gR.prototype,\\\"size\\\",void 0);gR=qpe([te(\\\"wui-tag\\\")],gR)});var Ott,Ntt=x(()=>{u();Q();Ott=we`\\n  button {\\n    column-gap: var(--wui-spacing-s);\\n    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);\\n    width: 100%;\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: var(--wui-border-radius-xs);\\n    color: var(--wui-color-fg-100);\\n  }\\n\\n  button > wui-text:nth-child(2) {\\n    display: flex;\\n    flex: 1;\\n  }\\n\\n  button:disabled {\\n    background-color: var(--wui-color-gray-glass-015);\\n    color: var(--wui-color-gray-glass-015);\\n  }\\n\\n  button:disabled > wui-tag {\\n    background-color: var(--wui-color-gray-glass-010);\\n    color: var(--wui-color-fg-300);\\n  }\\n\\n  wui-icon {\\n    color: var(--wui-color-fg-200) !important;\\n  }\\n`});var il,Na,ktt=x(()=>{u();Q();Ke();bn();aa();tu();tb();Er();fr();Itt();zpe();oV();Ntt();il=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Na=class extends se{constructor(){super(...arguments),this.walletImages=[],this.imageSrc=\\\"\\\",this.name=\\\"\\\",this.tabIdx=void 0,this.installed=!1,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor=\\\"accent-100\\\"}render(){return $`\\n      <button ?disabled=${this.disabled} tabindex=${Re(this.tabIdx)}>\\n        ${this.templateAllWallets()} ${this.templateWalletImage()}\\n        <wui-text variant=\\\"paragraph-500\\\" color=\\\"inherit\\\">${this.name}</wui-text>\\n        ${this.templateStatus()}\\n      </button>\\n    `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?$` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?$` <wui-wallet-image .walletIcon=${this.walletIcon} size=\\\"sm\\\"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?$`<wui-wallet-image\\n        size=\\\"sm\\\"\\n        imageSrc=${this.imageSrc}\\n        name=${this.name}\\n        .installed=${this.installed}\\n      ></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?$`<wui-wallet-image size=\\\"sm\\\" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.loading?$`<wui-loading-spinner\\n        size=\\\"lg\\\"\\n        color=${this.loadingSpinnerColor}\\n      ></wui-loading-spinner>`:this.tagLabel&&this.tagVariant?$`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?$`<wui-icon color=\\\"inherit\\\" size=\\\"sm\\\" name=${this.icon}></wui-icon>`:null}};Na.styles=[ze,dr,Ott];il([G({type:Array})],Na.prototype,\\\"walletImages\\\",void 0);il([G()],Na.prototype,\\\"imageSrc\\\",void 0);il([G()],Na.prototype,\\\"name\\\",void 0);il([G()],Na.prototype,\\\"tagLabel\\\",void 0);il([G()],Na.prototype,\\\"tagVariant\\\",void 0);il([G()],Na.prototype,\\\"icon\\\",void 0);il([G()],Na.prototype,\\\"walletIcon\\\",void 0);il([G()],Na.prototype,\\\"tabIdx\\\",void 0);il([G({type:Boolean})],Na.prototype,\\\"installed\\\",void 0);il([G({type:Boolean})],Na.prototype,\\\"disabled\\\",void 0);il([G({type:Boolean})],Na.prototype,\\\"showAllWallets\\\",void 0);il([G({type:Boolean})],Na.prototype,\\\"loading\\\",void 0);il([G({type:String})],Na.prototype,\\\"loadingSpinnerColor\\\",void 0);Na=il([te(\\\"wui-list-wallet\\\")],Na)});var Df=x(()=>{u();ktt()});var d8,vx,Btt=x(()=>{u();Q();Ke();bn();xt();pr();Df();d8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},vx=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.count=ye.state.count,this.filteredCount=ye.state.filteredWallets.length,this.isFetchingRecommendedWallets=ye.state.isFetchingRecommendedWallets,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e),ye.subscribeKey(\\\"count\\\",e=>this.count=e),ye.subscribeKey(\\\"filteredWallets\\\",e=>this.filteredCount=e.length),ye.subscribeKey(\\\"isFetchingRecommendedWallets\\\",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(c=>c.id===\\\"walletConnect\\\"),{allWallets:r}=ee.state;if(!e||r===\\\"HIDE\\\"||r===\\\"ONLY_MOBILE\\\"&&!oe.isMobile())return null;let n=ye.state.featured.length,i=this.count+n,s=i<10?i:Math.floor(i/10)*10,o=this.filteredCount>0?this.filteredCount:s,a=`${o}`;return this.filteredCount>0?a=`${this.filteredCount}`:o<i&&(a=`${o}+`),$`\\n      <wui-list-wallet\\n        name=\\\"All Wallets\\\"\\n        walletIcon=\\\"allWallets\\\"\\n        showAllWallets\\n        @click=${this.onAllWallets.bind(this)}\\n        tagLabel=${a}\\n        tagVariant=\\\"shade\\\"\\n        data-testid=\\\"all-wallets\\\"\\n        tabIdx=${Re(this.tabIdx)}\\n        .loading=${this.isFetchingRecommendedWallets}\\n        loadingSpinnerColor=${this.isFetchingRecommendedWallets?\\\"fg-300\\\":\\\"accent-100\\\"}\\n      ></wui-list-wallet>\\n    `}onAllWallets(){Xe.sendEvent({type:\\\"track\\\",event:\\\"CLICK_ALL_WALLETS\\\"}),de.push(\\\"AllWallets\\\")}};d8([G()],vx.prototype,\\\"tabIdx\\\",void 0);d8([xe()],vx.prototype,\\\"connectors\\\",void 0);d8([xe()],vx.prototype,\\\"count\\\",void 0);d8([xe()],vx.prototype,\\\"filteredCount\\\",void 0);d8([xe()],vx.prototype,\\\"isFetchingRecommendedWallets\\\",void 0);vx=d8([te(\\\"w3m-all-wallets-widget\\\")],vx)});var $pe,cV,Mtt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();lx();$pe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},cV=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.filter(r=>r.type===\\\"ANNOUNCED\\\");return e?.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${e.filter(rl.showConnector).map(r=>$`\\n              <wui-list-wallet\\n                imageSrc=${Re(sr.getConnectorImage(r))}\\n                name=${r.name??\\\"Unknown\\\"}\\n                @click=${()=>this.onConnector(r)}\\n                tagVariant=\\\"success\\\"\\n                tagLabel=\\\"installed\\\"\\n                data-testid=${`wallet-selector-${r.id}`}\\n                .installed=${!0}\\n                tabIdx=${Re(this.tabIdx)}\\n              >\\n              </wui-list-wallet>\\n            `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnector(e){e.id===\\\"walletConnect\\\"?oe.isMobile()?de.push(\\\"AllWallets\\\"):de.push(\\\"ConnectingWalletConnect\\\"):de.push(\\\"ConnectingExternal\\\",{connector:e})}};$pe([G()],cV.prototype,\\\"tabIdx\\\",void 0);$pe([xe()],cV.prototype,\\\"connectors\\\",void 0);cV=$pe([te(\\\"w3m-connect-announced-widget\\\")],cV)});var lV,yR,Dtt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();lV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},yR=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.loading=!1,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e)),oe.isTelegram()&&oe.isIos()&&(this.loading=!me.state.wcUri,this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",e=>this.loading=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{customWallets:e}=ee.state;if(!e?.length)return this.style.cssText=\\\"display: none\\\",null;let r=this.filterOutDuplicateWallets(e);return $`<wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n      ${r.map(n=>$`\\n          <wui-list-wallet\\n            imageSrc=${Re(sr.getWalletImage(n))}\\n            name=${n.name??\\\"Unknown\\\"}\\n            @click=${()=>this.onConnectWallet(n)}\\n            data-testid=${`wallet-selector-${n.id}`}\\n            tabIdx=${Re(this.tabIdx)}\\n            ?loading=${this.loading}\\n          >\\n          </wui-list-wallet>\\n        `)}\\n    </wui-flex>`}filterOutDuplicateWallets(e){let r=Te.getRecentWallets(),n=this.connectors.map(a=>a.info?.rdns).filter(Boolean),i=r.map(a=>a.rdns).filter(Boolean),s=n.concat(i);if(s.includes(\\\"io.metamask.mobile\\\")&&oe.isMobile()){let a=s.indexOf(\\\"io.metamask.mobile\\\");s[a]=\\\"io.metamask\\\"}return e.filter(a=>!s.includes(String(a?.rdns)))}onConnectWallet(e){this.loading||de.push(\\\"ConnectingWalletConnect\\\",{wallet:e})}};lV([G()],yR.prototype,\\\"tabIdx\\\",void 0);lV([xe()],yR.prototype,\\\"connectors\\\",void 0);lV([xe()],yR.prototype,\\\"loading\\\",void 0);yR=lV([te(\\\"w3m-connect-custom-widget\\\")],yR)});var Vpe,uV,Ltt=x(()=>{u();Q();Ke();bn();Ri();xt();pr();is();Df();lx();Vpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},uV=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let n=this.connectors.filter(i=>i.type===\\\"EXTERNAL\\\").filter(rl.showConnector).filter(i=>i.id!==_e.CONNECTOR_ID.COINBASE_SDK);return n?.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${n.map(i=>$`\\n            <wui-list-wallet\\n              imageSrc=${Re(sr.getConnectorImage(i))}\\n              .installed=${!0}\\n              name=${i.name??\\\"Unknown\\\"}\\n              data-testid=${`wallet-selector-external-${i.id}`}\\n              @click=${()=>this.onConnector(i)}\\n              tabIdx=${Re(this.tabIdx)}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnector(e){de.push(\\\"ConnectingExternal\\\",{connector:e})}};Vpe([G()],uV.prototype,\\\"tabIdx\\\",void 0);Vpe([xe()],uV.prototype,\\\"connectors\\\",void 0);uV=Vpe([te(\\\"w3m-connect-external-widget\\\")],uV)});var Wpe,dV,Utt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();Wpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},dV=class extends se{constructor(){super(...arguments),this.tabIdx=void 0,this.wallets=[]}render(){return this.wallets.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${this.wallets.map(e=>$`\\n            <wui-list-wallet\\n              data-testid=${`wallet-selector-featured-${e.id}`}\\n              imageSrc=${Re(sr.getWalletImage(e))}\\n              name=${e.name??\\\"Unknown\\\"}\\n              @click=${()=>this.onConnectWallet(e)}\\n              tabIdx=${Re(this.tabIdx)}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnectWallet(e){ie.selectWalletConnector(e)}};Wpe([G()],dV.prototype,\\\"tabIdx\\\",void 0);Wpe([G()],dV.prototype,\\\"wallets\\\",void 0);dV=Wpe([te(\\\"w3m-connect-featured-widget\\\")],dV)});var Gpe,fV,Ftt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();lx();Gpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},fV=class extends se{constructor(){super(...arguments),this.tabIdx=void 0,this.connectors=[]}render(){let e=this.connectors.filter(rl.showConnector);return e.length===0?(this.style.cssText=\\\"display: none\\\",null):$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${e.map(r=>$`\\n            <wui-list-wallet\\n              imageSrc=${Re(sr.getConnectorImage(r))}\\n              .installed=${!0}\\n              name=${r.name??\\\"Unknown\\\"}\\n              tagVariant=\\\"success\\\"\\n              tagLabel=\\\"installed\\\"\\n              data-testid=${`wallet-selector-${r.id}`}\\n              @click=${()=>this.onConnector(r)}\\n              tabIdx=${Re(this.tabIdx)}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `}onConnector(e){ie.setActiveConnector(e),de.push(\\\"ConnectingExternal\\\",{connector:e})}};Gpe([G()],fV.prototype,\\\"tabIdx\\\",void 0);Gpe([G()],fV.prototype,\\\"connectors\\\",void 0);fV=Gpe([te(\\\"w3m-connect-injected-widget\\\")],fV)});var Kpe,pV,jtt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();Kpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},pV=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.filter(r=>r.type===\\\"MULTI_CHAIN\\\"&&r.name!==\\\"WalletConnect\\\");return e?.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${e.map(r=>$`\\n            <wui-list-wallet\\n              imageSrc=${Re(sr.getConnectorImage(r))}\\n              .installed=${!0}\\n              name=${r.name??\\\"Unknown\\\"}\\n              tagVariant=\\\"shade\\\"\\n              tagLabel=\\\"multichain\\\"\\n              data-testid=${`wallet-selector-${r.id}`}\\n              @click=${()=>this.onConnector(r)}\\n              tabIdx=${Re(this.tabIdx)}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnector(e){ie.setActiveConnector(e),de.push(\\\"ConnectingMultiChain\\\")}};Kpe([G()],pV.prototype,\\\"tabIdx\\\",void 0);Kpe([xe()],pV.prototype,\\\"connectors\\\",void 0);pV=Kpe([te(\\\"w3m-connect-multi-chain-widget\\\")],pV)});var hV,bR,Htt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();cx();hV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},bR=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.loading=!1,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e)),oe.isTelegram()&&oe.isIos()&&(this.loading=!me.state.wcUri,this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",e=>this.loading=!e)))}render(){let r=Te.getRecentWallets().filter(n=>!Xl.isExcluded(n)).filter(n=>!this.hasWalletConnector(n)).filter(n=>this.isWalletCompatibleWithCurrentChain(n));return r.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${r.map(n=>$`\\n            <wui-list-wallet\\n              imageSrc=${Re(sr.getWalletImage(n))}\\n              name=${n.name??\\\"Unknown\\\"}\\n              @click=${()=>this.onConnectWallet(n)}\\n              tagLabel=\\\"recent\\\"\\n              tagVariant=\\\"shade\\\"\\n              tabIdx=${Re(this.tabIdx)}\\n              ?loading=${this.loading}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnectWallet(e){this.loading||ie.selectWalletConnector(e)}hasWalletConnector(e){return this.connectors.some(r=>r.id===e.id||r.name===e.name)}isWalletCompatibleWithCurrentChain(e){let r=z.state.activeChain;return r&&e.chains?e.chains.some(n=>{let i=n.split(\\\":\\\")[0];return r===i}):!0}};hV([G()],bR.prototype,\\\"tabIdx\\\",void 0);hV([xe()],bR.prototype,\\\"connectors\\\",void 0);hV([xe()],bR.prototype,\\\"loading\\\",void 0);bR=hV([te(\\\"w3m-connect-recent-widget\\\")],bR)});var mV,wR,qtt=x(()=>{u();Q();Ke();bn();xt();pr();is();Df();cx();mV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},wR=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.wallets=[],this.loading=!1,oe.isTelegram()&&oe.isIos()&&(this.loading=!me.state.wcUri,this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",e=>this.loading=!e)))}render(){let{connectors:e}=ie.state,{customWallets:r,featuredWalletIds:n}=ee.state,i=Te.getRecentWallets(),s=e.find(f=>f.id===\\\"walletConnect\\\"),a=e.filter(f=>f.type===\\\"INJECTED\\\"||f.type===\\\"ANNOUNCED\\\"||f.type===\\\"MULTI_CHAIN\\\").filter(f=>f.name!==\\\"Browser Wallet\\\");if(!s)return null;if(n||r||!this.wallets.length)return this.style.cssText=\\\"display: none\\\",null;let c=a.length+i.length,l=Math.max(0,2-c),d=Xl.filterOutDuplicateWallets(this.wallets).slice(0,l);return d.length?$`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\">\\n        ${d.map(f=>$`\\n            <wui-list-wallet\\n              imageSrc=${Re(sr.getWalletImage(f))}\\n              name=${f?.name??\\\"Unknown\\\"}\\n              @click=${()=>this.onConnectWallet(f)}\\n              tabIdx=${Re(this.tabIdx)}\\n              ?loading=${this.loading}\\n            >\\n            </wui-list-wallet>\\n          `)}\\n      </wui-flex>\\n    `:(this.style.cssText=\\\"display: none\\\",null)}onConnectWallet(e){if(this.loading)return;let r=ie.getConnector(e.id,e.rdns);r?de.push(\\\"ConnectingExternal\\\",{connector:r}):de.push(\\\"ConnectingWalletConnect\\\",{wallet:e})}};mV([G()],wR.prototype,\\\"tabIdx\\\",void 0);mV([G()],wR.prototype,\\\"wallets\\\",void 0);mV([xe()],wR.prototype,\\\"loading\\\",void 0);wR=mV([te(\\\"w3m-connect-recommended-widget\\\")],wR)});var gV,vR,ztt=x(()=>{u();Q();Ke();bn();xt();pr();Df();gV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},vR=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.connectorImages=Zs.state.connectorImages,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e),Zs.subscribeKey(\\\"connectorImages\\\",e=>this.connectorImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(oe.isMobile())return this.style.cssText=\\\"display: none\\\",null;let e=this.connectors.find(n=>n.id===\\\"walletConnect\\\");if(!e)return this.style.cssText=\\\"display: none\\\",null;let r=e.imageUrl||this.connectorImages[e?.imageId??\\\"\\\"];return $`\\n      <wui-list-wallet\\n        imageSrc=${Re(r)}\\n        name=${e.name??\\\"Unknown\\\"}\\n        @click=${()=>this.onConnector(e)}\\n        tagLabel=\\\"qr code\\\"\\n        tagVariant=\\\"main\\\"\\n        tabIdx=${Re(this.tabIdx)}\\n        data-testid=\\\"wallet-selector-walletconnect\\\"\\n      >\\n      </wui-list-wallet>\\n    `}onConnector(e){ie.setActiveConnector(e),de.push(\\\"ConnectingWalletConnect\\\")}};gV([G()],vR.prototype,\\\"tabIdx\\\",void 0);gV([xe()],vR.prototype,\\\"connectors\\\",void 0);gV([xe()],vR.prototype,\\\"connectorImages\\\",void 0);vR=gV([te(\\\"w3m-connect-walletconnect-widget\\\")],vR)});var $tt,Vtt=x(()=>{u();Q();$tt=we`\\n  :host {\\n    margin-top: var(--wui-spacing-3xs);\\n  }\\n  wui-separator {\\n    margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)\\n      calc(var(--wui-spacing-m) * -1);\\n    width: calc(100% + var(--wui-spacing-s) * 2);\\n  }\\n`});var xR,xx,Wtt=x(()=>{u();Q();Ke();bn();xt();pr();is();Mtt();Dtt();Ltt();Utt();Ftt();jtt();Htt();qtt();ztt();lx();Vtt();xR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},xx=class extends se{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=ie.state.connectors,this.recommended=ye.state.recommended,this.featured=ye.state.featured,this.unsubscribe.push(ie.subscribeKey(\\\"connectors\\\",e=>this.connectors=e),ye.subscribeKey(\\\"recommended\\\",e=>this.recommended=e),ye.subscribeKey(\\\"featured\\\",e=>this.featured=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return $`\\n      <wui-flex flexDirection=\\\"column\\\" gap=\\\"xs\\\"> ${this.connectorListTemplate()} </wui-flex>\\n    `}connectorListTemplate(){let{custom:e,recent:r,announced:n,injected:i,multiChain:s,recommended:o,featured:a,external:c}=rl.getConnectorsByType(this.connectors,this.recommended,this.featured);return rl.getConnectorTypeOrder({custom:e,recent:r,announced:n,injected:i,multiChain:s,recommended:o,featured:a,external:c}).map(d=>{switch(d){case\\\"injected\\\":return $`\\n            ${s.length?$`<w3m-connect-multi-chain-widget\\n                  tabIdx=${Re(this.tabIdx)}\\n                ></w3m-connect-multi-chain-widget>`:null}\\n            ${n.length?$`<w3m-connect-announced-widget\\n                  tabIdx=${Re(this.tabIdx)}\\n                ></w3m-connect-announced-widget>`:null}\\n            ${i.length?$`<w3m-connect-injected-widget\\n                  .connectors=${i}\\n                  tabIdx=${Re(this.tabIdx)}\\n                ></w3m-connect-injected-widget>`:null}\\n          `;case\\\"walletConnect\\\":return $`<w3m-connect-walletconnect-widget\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-walletconnect-widget>`;case\\\"recent\\\":return $`<w3m-connect-recent-widget\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-recent-widget>`;case\\\"featured\\\":return $`<w3m-connect-featured-widget\\n            .wallets=${a}\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-featured-widget>`;case\\\"custom\\\":return $`<w3m-connect-custom-widget\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-custom-widget>`;case\\\"external\\\":return $`<w3m-connect-external-widget\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-external-widget>`;case\\\"recommended\\\":return $`<w3m-connect-recommended-widget\\n            .wallets=${o}\\n            tabIdx=${Re(this.tabIdx)}\\n          ></w3m-connect-recommended-widget>`;default:return console.warn(`Unknown connector type: ${d}`),null}})}};xx.styles=$tt;xR([G()],xx.prototype,\\\"tabIdx\\\",void 0);xR([xe()],xx.prototype,\\\"connectors\\\",void 0);xR([xe()],xx.prototype,\\\"recommended\\\",void 0);xR([xe()],xx.prototype,\\\"featured\\\",void 0);xx=xR([te(\\\"w3m-connector-list\\\")],xx)});var Gtt,Ktt=x(()=>{u();Q();Gtt=we`\\n  :host {\\n    display: inline-flex;\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: var(--wui-border-radius-3xl);\\n    padding: var(--wui-spacing-3xs);\\n    position: relative;\\n    height: 36px;\\n    min-height: 36px;\\n    overflow: hidden;\\n  }\\n\\n  :host::before {\\n    content: '';\\n    position: absolute;\\n    pointer-events: none;\\n    top: 4px;\\n    left: 4px;\\n    display: block;\\n    width: var(--local-tab-width);\\n    height: 28px;\\n    border-radius: var(--wui-border-radius-3xl);\\n    background-color: var(--wui-color-gray-glass-002);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);\\n    transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));\\n    transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: background-color, opacity;\\n  }\\n\\n  :host([data-type='flex'])::before {\\n    left: 3px;\\n    transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));\\n  }\\n\\n  :host([data-type='flex']) {\\n    display: flex;\\n    padding: 0px 0px 0px 12px;\\n    gap: 4px;\\n  }\\n\\n  :host([data-type='flex']) > button > wui-text {\\n    position: absolute;\\n    left: 18px;\\n    opacity: 0;\\n  }\\n\\n  button[data-active='true'] > wui-icon,\\n  button[data-active='true'] > wui-text {\\n    color: var(--wui-color-fg-100);\\n  }\\n\\n  button[data-active='false'] > wui-icon,\\n  button[data-active='false'] > wui-text {\\n    color: var(--wui-color-fg-200);\\n  }\\n\\n  button[data-active='true']:disabled,\\n  button[data-active='false']:disabled {\\n    background-color: transparent;\\n    opacity: 0.5;\\n    cursor: not-allowed;\\n  }\\n\\n  button[data-active='true']:disabled > wui-text {\\n    color: var(--wui-color-fg-200);\\n  }\\n\\n  button[data-active='false']:disabled > wui-text {\\n    color: var(--wui-color-fg-300);\\n  }\\n\\n  button > wui-icon,\\n  button > wui-text {\\n    pointer-events: none;\\n    transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);\\n    will-change: color;\\n  }\\n\\n  button {\\n    width: var(--local-tab-width);\\n    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: background-color;\\n  }\\n\\n  :host([data-type='flex']) > button {\\n    width: 34px;\\n    position: relative;\\n    display: flex;\\n    justify-content: flex-start;\\n  }\\n\\n  button:hover:enabled,\\n  button:active:enabled {\\n    background-color: transparent !important;\\n  }\\n\\n  button:hover:enabled > wui-icon,\\n  button:active:enabled > wui-icon {\\n    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);\\n    color: var(--wui-color-fg-125);\\n  }\\n\\n  button:hover:enabled > wui-text,\\n  button:active:enabled > wui-text {\\n    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);\\n    color: var(--wui-color-fg-125);\\n  }\\n\\n  button {\\n    border-radius: var(--wui-border-radius-3xl);\\n  }\\n`});var rb,Ih,Ztt=x(()=>{u();Q();Ke();aa();tu();Er();fr();Ktt();rb=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ih=class extends se{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth=\\\"100px\\\",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`\\n      --local-tab: ${this.activeTab};\\n      --local-tab-width: ${this.localTabWidth};\\n    `,this.dataset.type=this.isDense?\\\"flex\\\":\\\"block\\\",this.tabs.map((e,r)=>{let n=r===this.activeTab;return $`\\n        <button\\n          ?disabled=${this.disabled}\\n          @click=${()=>this.onTabClick(r)}\\n          data-active=${n}\\n          data-testid=\\\"tab-${e.label?.toLowerCase()}\\\"\\n        >\\n          ${this.iconTemplate(e)}\\n          <wui-text variant=\\\"small-600\\\" color=\\\"inherit\\\"> ${e.label} </wui-text>\\n        </button>\\n      `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll(\\\"button\\\")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?$`<wui-icon size=\\\"xs\\\" color=\\\"inherit\\\" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,r){let n=this.buttons[this.activeTab],i=this.buttons[e],s=n?.querySelector(\\\"wui-text\\\"),o=i?.querySelector(\\\"wui-text\\\"),a=i?.getBoundingClientRect(),c=o?.getBoundingClientRect();n&&s&&!r&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:\\\"ease\\\",fill:\\\"forwards\\\"}),n.animate([{width:\\\"34px\\\"}],{duration:500,easing:\\\"ease\\\",fill:\\\"forwards\\\"})),i&&a&&c&&o&&(e!==this.activeTab||r)&&(this.localTabWidth=`${Math.round(a.width+c.width)+6}px`,i.animate([{width:`${a.width+c.width}px`}],{duration:r?0:500,fill:\\\"forwards\\\",easing:\\\"ease\\\"}),o.animate([{opacity:1}],{duration:r?0:125,delay:r?0:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}))}};Ih.styles=[ze,dr,Gtt];rb([G({type:Array})],Ih.prototype,\\\"tabs\\\",void 0);rb([G()],Ih.prototype,\\\"onTabChange\\\",void 0);rb([G({type:Array})],Ih.prototype,\\\"buttons\\\",void 0);rb([G({type:Boolean})],Ih.prototype,\\\"disabled\\\",void 0);rb([G()],Ih.prototype,\\\"localTabWidth\\\",void 0);rb([xe()],Ih.prototype,\\\"activeTab\\\",void 0);rb([xe()],Ih.prototype,\\\"isDense\\\",void 0);Ih=rb([te(\\\"wui-tabs\\\")],Ih)});var Qtt=x(()=>{u();Ztt()});var Zpe,yV,Jtt=x(()=>{u();Q();Ke();pr();is();Qtt();Zpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},yV=class extends se{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return $`\\n      <wui-flex justifyContent=\\\"center\\\" .padding=${[\\\"0\\\",\\\"0\\\",\\\"l\\\",\\\"0\\\"]}>\\n        <wui-tabs .tabs=${e} .onTabChange=${this.onTabChange.bind(this)}></wui-tabs>\\n      </wui-flex>\\n    `}generateTabs(){let e=this.platforms.map(r=>r===\\\"browser\\\"?{label:\\\"Browser\\\",icon:\\\"extension\\\",platform:\\\"browser\\\"}:r===\\\"mobile\\\"?{label:\\\"Mobile\\\",icon:\\\"mobile\\\",platform:\\\"mobile\\\"}:r===\\\"qrcode\\\"?{label:\\\"Mobile\\\",icon:\\\"mobile\\\",platform:\\\"qrcode\\\"}:r===\\\"web\\\"?{label:\\\"Webapp\\\",icon:\\\"browser\\\",platform:\\\"web\\\"}:r===\\\"desktop\\\"?{label:\\\"Desktop\\\",icon:\\\"desktop\\\",platform:\\\"desktop\\\"}:{label:\\\"Browser\\\",icon:\\\"extension\\\",platform:\\\"unsupported\\\"});return this.platformTabs=e.map(({platform:r})=>r),e}onTabChange(e){let r=this.platformTabs[e];r&&this.onSelectPlatfrom?.(r)}};Zpe([G({type:Array})],yV.prototype,\\\"platforms\\\",void 0);Zpe([G()],yV.prototype,\\\"onSelectPlatfrom\\\",void 0);yV=Zpe([te(\\\"w3m-connecting-header\\\")],yV)});var Ytt,Xtt=x(()=>{u();Q();Ytt=we`\\n  :host {\\n    display: flex;\\n  }\\n\\n  :host([data-size='sm']) > svg {\\n    width: 12px;\\n    height: 12px;\\n  }\\n\\n  :host([data-size='md']) > svg {\\n    width: 16px;\\n    height: 16px;\\n  }\\n\\n  :host([data-size='lg']) > svg {\\n    width: 24px;\\n    height: 24px;\\n  }\\n\\n  :host([data-size='xl']) > svg {\\n    width: 32px;\\n    height: 32px;\\n  }\\n\\n  svg {\\n    animation: rotate 2s linear infinite;\\n  }\\n\\n  circle {\\n    fill: none;\\n    stroke: var(--local-color);\\n    stroke-width: 4px;\\n    stroke-dasharray: 1, 124;\\n    stroke-dashoffset: 0;\\n    stroke-linecap: round;\\n    animation: dash 1.5s ease-in-out infinite;\\n  }\\n\\n  :host([data-size='md']) > svg > circle {\\n    stroke-width: 6px;\\n  }\\n\\n  :host([data-size='sm']) > svg > circle {\\n    stroke-width: 8px;\\n  }\\n\\n  @keyframes rotate {\\n    100% {\\n      transform: rotate(360deg);\\n    }\\n  }\\n\\n  @keyframes dash {\\n    0% {\\n      stroke-dasharray: 1, 124;\\n      stroke-dashoffset: 0;\\n    }\\n\\n    50% {\\n      stroke-dasharray: 90, 124;\\n      stroke-dashoffset: -35;\\n    }\\n\\n    100% {\\n      stroke-dashoffset: -125;\\n    }\\n  }\\n`});var Qpe,ER,_R=x(()=>{u();Q();Ke();Er();fr();Xtt();Qpe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},ER=class extends se{constructor(){super(...arguments),this.color=\\\"accent-100\\\",this.size=\\\"lg\\\"}render(){return this.style.cssText=`--local-color: ${this.color===\\\"inherit\\\"?\\\"inherit\\\":`var(--wui-color-${this.color})`}`,this.dataset.size=this.size,$`<svg viewBox=\\\"25 25 50 50\\\">\\n      <circle r=\\\"20\\\" cy=\\\"50\\\" cx=\\\"50\\\"></circle>\\n    </svg>`}};ER.styles=[ze,Ytt];Qpe([G()],ER.prototype,\\\"color\\\",void 0);Qpe([G()],ER.prototype,\\\"size\\\",void 0);ER=Qpe([te(\\\"wui-loading-spinner\\\")],ER)});var ert,trt=x(()=>{u();Q();ert=we`\\n  :host {\\n    width: var(--local-width);\\n    position: relative;\\n  }\\n\\n  button {\\n    border: none;\\n    border-radius: var(--local-border-radius);\\n    width: var(--local-width);\\n    white-space: nowrap;\\n  }\\n\\n  /* -- Sizes --------------------------------------------------- */\\n  button[data-size='md'] {\\n    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);\\n    height: 36px;\\n  }\\n\\n  button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {\\n    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);\\n  }\\n\\n  button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {\\n    padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);\\n  }\\n\\n  button[data-size='lg'] {\\n    padding: var(--wui-spacing-m) var(--wui-spacing-2l);\\n    height: 48px;\\n  }\\n\\n  /* -- Variants --------------------------------------------------------- */\\n  button[data-variant='main'] {\\n    background-color: var(--wui-color-accent-100);\\n    color: var(--wui-color-inverse-100);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  button[data-variant='inverse'] {\\n    background-color: var(--wui-color-inverse-100);\\n    color: var(--wui-color-inverse-000);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  button[data-variant='accent'] {\\n    background-color: var(--wui-color-accent-glass-010);\\n    color: var(--wui-color-accent-100);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);\\n  }\\n\\n  button[data-variant='accent-error'] {\\n    background: var(--wui-color-error-glass-015);\\n    color: var(--wui-color-error-100);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);\\n  }\\n\\n  button[data-variant='accent-success'] {\\n    background: var(--wui-color-success-glass-015);\\n    color: var(--wui-color-success-100);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);\\n  }\\n\\n  button[data-variant='neutral'] {\\n    background: transparent;\\n    color: var(--wui-color-fg-100);\\n    border: none;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);\\n  }\\n\\n  /* -- Focus states --------------------------------------------------- */\\n  button[data-variant='main']:focus-visible:enabled {\\n    background-color: var(--wui-color-accent-090);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-accent-100),\\n      0 0 0 4px var(--wui-color-accent-glass-020);\\n  }\\n  button[data-variant='inverse']:focus-visible:enabled {\\n    background-color: var(--wui-color-inverse-100);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-gray-glass-010),\\n      0 0 0 4px var(--wui-color-accent-glass-020);\\n  }\\n  button[data-variant='accent']:focus-visible:enabled {\\n    background-color: var(--wui-color-accent-glass-010);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-accent-100),\\n      0 0 0 4px var(--wui-color-accent-glass-020);\\n  }\\n  button[data-variant='accent-error']:focus-visible:enabled {\\n    background: var(--wui-color-error-glass-015);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-error-100),\\n      0 0 0 4px var(--wui-color-error-glass-020);\\n  }\\n  button[data-variant='accent-success']:focus-visible:enabled {\\n    background: var(--wui-color-success-glass-015);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-success-100),\\n      0 0 0 4px var(--wui-color-success-glass-020);\\n  }\\n  button[data-variant='neutral']:focus-visible:enabled {\\n    background: var(--wui-color-gray-glass-005);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-gray-glass-010),\\n      0 0 0 4px var(--wui-color-gray-glass-002);\\n  }\\n\\n  /* -- Hover & Active states ----------------------------------------------------------- */\\n  @media (hover: hover) and (pointer: fine) {\\n    button[data-variant='main']:hover:enabled {\\n      background-color: var(--wui-color-accent-090);\\n    }\\n\\n    button[data-variant='main']:active:enabled {\\n      background-color: var(--wui-color-accent-080);\\n    }\\n\\n    button[data-variant='accent']:hover:enabled {\\n      background-color: var(--wui-color-accent-glass-015);\\n    }\\n\\n    button[data-variant='accent']:active:enabled {\\n      background-color: var(--wui-color-accent-glass-020);\\n    }\\n\\n    button[data-variant='accent-error']:hover:enabled {\\n      background: var(--wui-color-error-glass-020);\\n      color: var(--wui-color-error-100);\\n    }\\n\\n    button[data-variant='accent-error']:active:enabled {\\n      background: var(--wui-color-error-glass-030);\\n      color: var(--wui-color-error-100);\\n    }\\n\\n    button[data-variant='accent-success']:hover:enabled {\\n      background: var(--wui-color-success-glass-020);\\n      color: var(--wui-color-success-100);\\n    }\\n\\n    button[data-variant='accent-success']:active:enabled {\\n      background: var(--wui-color-success-glass-030);\\n      color: var(--wui-color-success-100);\\n    }\\n\\n    button[data-variant='neutral']:hover:enabled {\\n      background: var(--wui-color-gray-glass-002);\\n    }\\n\\n    button[data-variant='neutral']:active:enabled {\\n      background: var(--wui-color-gray-glass-005);\\n    }\\n\\n    button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {\\n      padding-left: var(--wui-spacing-m);\\n    }\\n\\n    button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {\\n      padding-right: var(--wui-spacing-m);\\n    }\\n  }\\n\\n  /* -- Disabled state --------------------------------------------------- */\\n  button:disabled {\\n    background-color: var(--wui-color-gray-glass-002);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);\\n    color: var(--wui-color-gray-glass-020);\\n    cursor: not-allowed;\\n  }\\n\\n  button > wui-text {\\n    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: opacity;\\n    opacity: var(--local-opacity-100);\\n  }\\n\\n  ::slotted(*) {\\n    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: opacity;\\n    opacity: var(--local-opacity-100);\\n  }\\n\\n  wui-loading-spinner {\\n    position: absolute;\\n    left: 50%;\\n    top: 50%;\\n    transform: translate(-50%, -50%);\\n    opacity: var(--local-opacity-000);\\n  }\\n`});var Rh,rrt,iKt,sKt,Ed,nrt=x(()=>{u();Q();Ke();_R();tu();Er();fr();trt();Rh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},rrt={main:\\\"inverse-100\\\",inverse:\\\"inverse-000\\\",accent:\\\"accent-100\\\",\\\"accent-error\\\":\\\"error-100\\\",\\\"accent-success\\\":\\\"success-100\\\",neutral:\\\"fg-100\\\",disabled:\\\"gray-glass-020\\\"},iKt={lg:\\\"paragraph-600\\\",md:\\\"small-600\\\"},sKt={lg:\\\"md\\\",md:\\\"md\\\"},Ed=class extends se{constructor(){super(...arguments),this.size=\\\"lg\\\",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant=\\\"main\\\",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius=\\\"m\\\"}render(){this.style.cssText=`\\n    --local-width: ${this.fullWidth?\\\"100%\\\":\\\"auto\\\"};\\n    --local-opacity-100: ${this.loading?0:1};\\n    --local-opacity-000: ${this.loading?1:0};\\n    --local-border-radius: var(--wui-border-radius-${this.borderRadius});\\n    `;let e=this.textVariant??iKt[this.size];return $`\\n      <button\\n        data-variant=${this.variant}\\n        data-icon-left=${this.hasIconLeft}\\n        data-icon-right=${this.hasIconRight}\\n        data-size=${this.size}\\n        ?disabled=${this.disabled}\\n      >\\n        ${this.loadingTemplate()}\\n        <slot name=\\\"iconLeft\\\" @slotchange=${()=>this.handleSlotLeftChange()}></slot>\\n        <wui-text variant=${e} color=\\\"inherit\\\">\\n          <slot></slot>\\n        </wui-text>\\n        <slot name=\\\"iconRight\\\" @slotchange=${()=>this.handleSlotRightChange()}></slot>\\n      </button>\\n    `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){let e=sKt[this.size],r=this.disabled?rrt.disabled:rrt[this.variant];return $`<wui-loading-spinner color=${r} size=${e}></wui-loading-spinner>`}return $``}};Ed.styles=[ze,dr,ert];Rh([G()],Ed.prototype,\\\"size\\\",void 0);Rh([G({type:Boolean})],Ed.prototype,\\\"disabled\\\",void 0);Rh([G({type:Boolean})],Ed.prototype,\\\"fullWidth\\\",void 0);Rh([G({type:Boolean})],Ed.prototype,\\\"loading\\\",void 0);Rh([G()],Ed.prototype,\\\"variant\\\",void 0);Rh([G({type:Boolean})],Ed.prototype,\\\"hasIconLeft\\\",void 0);Rh([G({type:Boolean})],Ed.prototype,\\\"hasIconRight\\\",void 0);Rh([G()],Ed.prototype,\\\"borderRadius\\\",void 0);Rh([G()],Ed.prototype,\\\"textVariant\\\",void 0);Ed=Rh([te(\\\"wui-button\\\")],Ed)});var irt=x(()=>{u();nrt()});var CR=x(()=>{u();aa()});var bV=x(()=>{u();tb()});var srt,ort=x(()=>{u();Q();srt=we`\\n  button {\\n    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);\\n    border-radius: var(--wui-border-radius-3xs);\\n    background-color: transparent;\\n    color: var(--wui-color-accent-100);\\n  }\\n\\n  button:disabled {\\n    background-color: transparent;\\n    color: var(--wui-color-gray-glass-015);\\n  }\\n\\n  button:hover {\\n    background-color: var(--wui-color-gray-glass-005);\\n  }\\n`});var wV,f8,art=x(()=>{u();Q();Ke();bn();tu();Er();fr();ort();wV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},f8=class extends se{constructor(){super(...arguments),this.tabIdx=void 0,this.disabled=!1,this.color=\\\"inherit\\\"}render(){return $`\\n      <button ?disabled=${this.disabled} tabindex=${Re(this.tabIdx)}>\\n        <slot name=\\\"iconLeft\\\"></slot>\\n        <wui-text variant=\\\"small-600\\\" color=${this.color}>\\n          <slot></slot>\\n        </wui-text>\\n        <slot name=\\\"iconRight\\\"></slot>\\n      </button>\\n    `}};f8.styles=[ze,dr,srt];wV([G()],f8.prototype,\\\"tabIdx\\\",void 0);wV([G({type:Boolean})],f8.prototype,\\\"disabled\\\",void 0);wV([G()],f8.prototype,\\\"color\\\",void 0);f8=wV([te(\\\"wui-link\\\")],f8)});var Jpe=x(()=>{u();art()});var crt,lrt=x(()=>{u();Q();crt=we`\\n  :host {\\n    display: block;\\n    width: var(--wui-box-size-md);\\n    height: var(--wui-box-size-md);\\n  }\\n\\n  svg {\\n    width: var(--wui-box-size-md);\\n    height: var(--wui-box-size-md);\\n  }\\n\\n  rect {\\n    fill: none;\\n    stroke: var(--wui-color-accent-100);\\n    stroke-width: 4px;\\n    stroke-linecap: round;\\n    animation: dash 1s linear infinite;\\n  }\\n\\n  @keyframes dash {\\n    to {\\n      stroke-dashoffset: 0px;\\n    }\\n  }\\n`});var urt,vV,drt=x(()=>{u();Q();Ke();Er();fr();lrt();urt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},vV=class extends se{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,n=36-e,i=116+n,s=245+n,o=360+n*1.75;return $`\\n      <svg viewBox=\\\"0 0 110 110\\\" width=\\\"110\\\" height=\\\"110\\\">\\n        <rect\\n          x=\\\"2\\\"\\n          y=\\\"2\\\"\\n          width=\\\"106\\\"\\n          height=\\\"106\\\"\\n          rx=${e}\\n          stroke-dasharray=\\\"${i} ${s}\\\"\\n          stroke-dashoffset=${o}\\n        />\\n      </svg>\\n    `}};vV.styles=[ze,crt];urt([G({type:Number})],vV.prototype,\\\"radius\\\",void 0);vV=urt([te(\\\"wui-loading-thumbnail\\\")],vV)});var frt=x(()=>{u();drt()});var z0=x(()=>{u();tu()});var xV=x(()=>{u();oV()});var prt,hrt=x(()=>{u();Q();prt=we`\\n  button {\\n    border: none;\\n    border-radius: var(--wui-border-radius-3xl);\\n  }\\n\\n  button[data-variant='main'] {\\n    background-color: var(--wui-color-accent-100);\\n    color: var(--wui-color-inverse-100);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  button[data-variant='accent'] {\\n    background-color: var(--wui-color-accent-glass-010);\\n    color: var(--wui-color-accent-100);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);\\n  }\\n\\n  button[data-variant='gray'] {\\n    background-color: transparent;\\n    color: var(--wui-color-fg-200);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  button[data-variant='shade'] {\\n    background-color: transparent;\\n    color: var(--wui-color-accent-100);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  button[data-size='sm'] {\\n    height: 32px;\\n    padding: 0 var(--wui-spacing-s);\\n  }\\n\\n  button[data-size='md'] {\\n    height: 40px;\\n    padding: 0 var(--wui-spacing-l);\\n  }\\n\\n  button[data-size='sm'] > wui-image {\\n    width: 16px;\\n    height: 16px;\\n  }\\n\\n  button[data-size='md'] > wui-image {\\n    width: 24px;\\n    height: 24px;\\n  }\\n\\n  button[data-size='sm'] > wui-icon {\\n    width: 12px;\\n    height: 12px;\\n  }\\n\\n  button[data-size='md'] > wui-icon {\\n    width: 14px;\\n    height: 14px;\\n  }\\n\\n  wui-image {\\n    border-radius: var(--wui-border-radius-3xl);\\n    overflow: hidden;\\n  }\\n\\n  button.disabled > wui-icon,\\n  button.disabled > wui-image {\\n    filter: grayscale(1);\\n  }\\n\\n  button[data-variant='main'] > wui-image {\\n    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);\\n  }\\n\\n  button[data-variant='shade'] > wui-image,\\n  button[data-variant='gray'] > wui-image {\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);\\n  }\\n\\n  @media (hover: hover) and (pointer: fine) {\\n    button[data-variant='main']:focus-visible {\\n      background-color: var(--wui-color-accent-090);\\n    }\\n\\n    button[data-variant='main']:hover:enabled {\\n      background-color: var(--wui-color-accent-090);\\n    }\\n\\n    button[data-variant='main']:active:enabled {\\n      background-color: var(--wui-color-accent-080);\\n    }\\n\\n    button[data-variant='accent']:hover:enabled {\\n      background-color: var(--wui-color-accent-glass-015);\\n    }\\n\\n    button[data-variant='accent']:active:enabled {\\n      background-color: var(--wui-color-accent-glass-020);\\n    }\\n\\n    button[data-variant='shade']:focus-visible,\\n    button[data-variant='gray']:focus-visible,\\n    button[data-variant='shade']:hover,\\n    button[data-variant='gray']:hover {\\n      background-color: var(--wui-color-gray-glass-002);\\n    }\\n\\n    button[data-variant='gray']:active,\\n    button[data-variant='shade']:active {\\n      background-color: var(--wui-color-gray-glass-005);\\n    }\\n  }\\n\\n  button.disabled {\\n    color: var(--wui-color-gray-glass-020);\\n    background-color: var(--wui-color-gray-glass-002);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);\\n    pointer-events: none;\\n  }\\n`});var Ex,$0,mrt=x(()=>{u();Q();Ke();aa();u8();tu();Er();fr();hrt();Ex=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},$0=class extends se{constructor(){super(...arguments),this.variant=\\\"accent\\\",this.imageSrc=\\\"\\\",this.disabled=!1,this.icon=\\\"externalLink\\\",this.size=\\\"md\\\",this.text=\\\"\\\"}render(){let e=this.size===\\\"sm\\\"?\\\"small-600\\\":\\\"paragraph-600\\\";return $`\\n      <button\\n        class=${this.disabled?\\\"disabled\\\":\\\"\\\"}\\n        data-variant=${this.variant}\\n        data-size=${this.size}\\n      >\\n        ${this.imageSrc?$`<wui-image src=${this.imageSrc}></wui-image>`:null}\\n        <wui-text variant=${e} color=\\\"inherit\\\"> ${this.text} </wui-text>\\n        <wui-icon name=${this.icon} color=\\\"inherit\\\" size=\\\"inherit\\\"></wui-icon>\\n      </button>\\n    `}};$0.styles=[ze,dr,prt];Ex([G()],$0.prototype,\\\"variant\\\",void 0);Ex([G()],$0.prototype,\\\"imageSrc\\\",void 0);Ex([G({type:Boolean})],$0.prototype,\\\"disabled\\\",void 0);Ex([G()],$0.prototype,\\\"icon\\\",void 0);Ex([G()],$0.prototype,\\\"size\\\",void 0);Ex([G()],$0.prototype,\\\"text\\\",void 0);$0=Ex([te(\\\"wui-chip-button\\\")],$0)});var grt,yrt=x(()=>{u();Q();grt=we`\\n  wui-flex {\\n    width: 100%;\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: var(--wui-border-radius-xs);\\n  }\\n`});var EV,p8,brt=x(()=>{u();Q();Ke();tu();mrt();eb();Er();fr();yrt();EV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},p8=class extends se{constructor(){super(...arguments),this.disabled=!1,this.label=\\\"\\\",this.buttonLabel=\\\"\\\"}render(){return $`\\n      <wui-flex\\n        justifyContent=\\\"space-between\\\"\\n        alignItems=\\\"center\\\"\\n        .padding=${[\\\"1xs\\\",\\\"2l\\\",\\\"1xs\\\",\\\"2l\\\"]}\\n      >\\n        <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-200\\\">${this.label}</wui-text>\\n        <wui-chip-button size=\\\"sm\\\" variant=\\\"shade\\\" text=${this.buttonLabel} icon=\\\"chevronRight\\\">\\n        </wui-chip-button>\\n      </wui-flex>\\n    `}};p8.styles=[ze,dr,grt];EV([G({type:Boolean})],p8.prototype,\\\"disabled\\\",void 0);EV([G()],p8.prototype,\\\"label\\\",void 0);EV([G()],p8.prototype,\\\"buttonLabel\\\",void 0);p8=EV([te(\\\"wui-cta-button\\\")],p8)});var wrt=x(()=>{u();brt()});var vrt,xrt=x(()=>{u();Q();vrt=we`\\n  :host {\\n    display: block;\\n    padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);\\n  }\\n`});var Ert,_V,CV=x(()=>{u();Q();Ke();xt();pr();wrt();xrt();Ert=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},_V=class extends se{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display=\\\"none\\\",null;let{name:e,app_store:r,play_store:n,chrome_store:i,homepage:s}=this.wallet,o=oe.isMobile(),a=oe.isIos(),c=oe.isAndroid(),l=[r,n,s,i].filter(Boolean).length>1,d=Pi.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:\\\"end\\\"});return l&&!o?$`\\n        <wui-cta-button\\n          label=${`Don't have ${d}?`}\\n          buttonLabel=\\\"Get\\\"\\n          @click=${()=>de.push(\\\"Downloads\\\",{wallet:this.wallet})}\\n        ></wui-cta-button>\\n      `:!l&&s?$`\\n        <wui-cta-button\\n          label=${`Don't have ${d}?`}\\n          buttonLabel=\\\"Get\\\"\\n          @click=${this.onHomePage.bind(this)}\\n        ></wui-cta-button>\\n      `:r&&a?$`\\n        <wui-cta-button\\n          label=${`Don't have ${d}?`}\\n          buttonLabel=\\\"Get\\\"\\n          @click=${this.onAppStore.bind(this)}\\n        ></wui-cta-button>\\n      `:n&&c?$`\\n        <wui-cta-button\\n          label=${`Don't have ${d}?`}\\n          buttonLabel=\\\"Get\\\"\\n          @click=${this.onPlayStore.bind(this)}\\n        ></wui-cta-button>\\n      `:(this.style.display=\\\"none\\\",null)}onAppStore(){this.wallet?.app_store&&oe.openHref(this.wallet.app_store,\\\"_blank\\\")}onPlayStore(){this.wallet?.play_store&&oe.openHref(this.wallet.play_store,\\\"_blank\\\")}onHomePage(){this.wallet?.homepage&&oe.openHref(this.wallet.homepage,\\\"_blank\\\")}};_V.styles=[vrt];Ert([G({type:Object})],_V.prototype,\\\"wallet\\\",void 0);_V=Ert([te(\\\"w3m-mobile-download-links\\\")],_V)});var _rt,Crt=x(()=>{u();Q();_rt=we`\\n  @keyframes shake {\\n    0% {\\n      transform: translateX(0);\\n    }\\n    25% {\\n      transform: translateX(3px);\\n    }\\n    50% {\\n      transform: translateX(-3px);\\n    }\\n    75% {\\n      transform: translateX(3px);\\n    }\\n    100% {\\n      transform: translateX(0);\\n    }\\n  }\\n\\n  wui-flex:first-child:not(:only-child) {\\n    position: relative;\\n  }\\n\\n  wui-loading-thumbnail {\\n    position: absolute;\\n  }\\n\\n  wui-icon-box {\\n    position: absolute;\\n    right: calc(var(--wui-spacing-3xs) * -1);\\n    bottom: calc(var(--wui-spacing-3xs) * -1);\\n    opacity: 0;\\n    transform: scale(0.5);\\n    transition-property: opacity, transform;\\n    transition-duration: var(--wui-duration-lg);\\n    transition-timing-function: var(--wui-ease-out-power-2);\\n    will-change: opacity, transform;\\n  }\\n\\n  wui-text[align='center'] {\\n    width: 100%;\\n    padding: 0px var(--wui-spacing-l);\\n  }\\n\\n  [data-error='true'] wui-icon-box {\\n    opacity: 1;\\n    transform: scale(1);\\n  }\\n\\n  [data-error='true'] > wui-flex:first-child {\\n    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;\\n  }\\n\\n  [data-retry='false'] wui-link {\\n    display: none;\\n  }\\n\\n  [data-retry='true'] wui-link {\\n    display: block;\\n    opacity: 1;\\n  }\\n`});var Ph,$i,h8=x(()=>{u();Q();Ke();bn();xt();irt();is();CR();bV();Jpe();frt();z0();xV();CV();Crt();Ph=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},$i=class extends se{constructor(){super(),this.wallet=de.state.data?.wallet,this.connector=de.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon=\\\"refresh\\\",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=sr.getWalletImage(this.wallet)??sr.getConnectorImage(this.connector),this.name=this.wallet?.name??this.connector?.name??\\\"Wallet\\\",this.isRetrying=!1,this.uri=me.state.wcUri,this.error=me.state.wcError,this.ready=!1,this.showRetry=!1,this.secondaryBtnLabel=\\\"Try again\\\",this.secondaryLabel=\\\"Accept connection request in the wallet\\\",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),me.subscribeKey(\\\"wcError\\\",e=>this.error=e)),(oe.isTelegram()||oe.isSafari())&&oe.isIos()&&me.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),me.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?\\\"Connection can be declined if a previous request is still active\\\":this.secondaryLabel,r=`Continue in ${this.name}`;return this.error&&(r=\\\"Connection declined\\\"),$`\\n      <wui-flex\\n        data-error=${Re(this.error)}\\n        data-retry=${this.showRetry}\\n        flexDirection=\\\"column\\\"\\n        alignItems=\\\"center\\\"\\n        .padding=${[\\\"3xl\\\",\\\"xl\\\",\\\"xl\\\",\\\"xl\\\"]}\\n        gap=\\\"xl\\\"\\n      >\\n        <wui-flex justifyContent=\\\"center\\\" alignItems=\\\"center\\\">\\n          <wui-wallet-image size=\\\"lg\\\" imageSrc=${Re(this.imageSrc)}></wui-wallet-image>\\n\\n          ${this.error?null:this.loaderTemplate()}\\n\\n          <wui-icon-box\\n            backgroundColor=\\\"error-100\\\"\\n            background=\\\"opaque\\\"\\n            iconColor=\\\"error-100\\\"\\n            icon=\\\"close\\\"\\n            size=\\\"sm\\\"\\n            border\\n            borderColor=\\\"wui-color-bg-125\\\"\\n          ></wui-icon-box>\\n        </wui-flex>\\n\\n        <wui-flex flexDirection=\\\"column\\\" alignItems=\\\"center\\\" gap=\\\"xs\\\">\\n          <wui-text variant=\\\"paragraph-500\\\" color=${this.error?\\\"error-100\\\":\\\"fg-100\\\"}>\\n            ${r}\\n          </wui-text>\\n          <wui-text align=\\\"center\\\" variant=\\\"small-500\\\" color=\\\"fg-200\\\">${e}</wui-text>\\n        </wui-flex>\\n\\n        ${this.secondaryBtnLabel?$`\\n              <wui-button\\n                variant=\\\"accent\\\"\\n                size=\\\"md\\\"\\n                ?disabled=${this.isRetrying||this.isLoading}\\n                @click=${this.onTryAgain.bind(this)}\\n                data-testid=\\\"w3m-connecting-widget-secondary-button\\\"\\n              >\\n                <wui-icon color=\\\"inherit\\\" slot=\\\"iconLeft\\\" name=${this.secondaryBtnIcon}></wui-icon>\\n                ${this.secondaryBtnLabel}\\n              </wui-button>\\n            `:null}\\n      </wui-flex>\\n\\n      ${this.isWalletConnect?$`\\n            <wui-flex .padding=${[\\\"0\\\",\\\"xl\\\",\\\"xl\\\",\\\"xl\\\"]} justifyContent=\\\"center\\\">\\n              <wui-link @click=${this.onCopyUri} color=\\\"fg-200\\\" data-testid=\\\"wui-link-copy\\\">\\n                <wui-icon size=\\\"xs\\\" color=\\\"fg-200\\\" slot=\\\"iconLeft\\\" name=\\\"copy\\\"></wui-icon>\\n                Copy link\\n              </wui-link>\\n            </wui-flex>\\n          `:null}\\n\\n      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>\\n    `}onShowRetry(){this.error&&!this.showRetry&&(this.showRetry=!0,this.shadowRoot?.querySelector(\\\"wui-button\\\")?.animate([{opacity:0},{opacity:1}],{fill:\\\"forwards\\\",easing:\\\"ease\\\"}))}onTryAgain(){me.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=ji.state.themeVariables[\\\"--w3m-border-radius-master\\\"],r=e?parseInt(e.replace(\\\"px\\\",\\\"\\\"),10):4;return $`<wui-loading-thumbnail radius=${r*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(oe.copyToClopboard(this.uri),wr.showSuccess(\\\"Link copied\\\"))}catch{wr.showError(\\\"Failed to copy\\\")}}};$i.styles=_rt;Ph([xe()],$i.prototype,\\\"isRetrying\\\",void 0);Ph([xe()],$i.prototype,\\\"uri\\\",void 0);Ph([xe()],$i.prototype,\\\"error\\\",void 0);Ph([xe()],$i.prototype,\\\"ready\\\",void 0);Ph([xe()],$i.prototype,\\\"showRetry\\\",void 0);Ph([xe()],$i.prototype,\\\"secondaryBtnLabel\\\",void 0);Ph([xe()],$i.prototype,\\\"secondaryLabel\\\",void 0);Ph([xe()],$i.prototype,\\\"isLoading\\\",void 0);Ph([G({type:Boolean})],$i.prototype,\\\"isMobile\\\",void 0);Ph([G()],$i.prototype,\\\"onRetry\\\",void 0)});var oKt,Srt,Art=x(()=>{u();xt();pr();h8();oKt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Srt=class extends $i{constructor(){if(super(),!this.wallet)throw new Error(\\\"w3m-connecting-wc-browser: No wallet provided\\\");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet.name,platform:\\\"browser\\\"}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=ie.state,r=e.find(n=>n.type===\\\"ANNOUNCED\\\"&&n.info?.rdns===this.wallet?.rdns||n.type===\\\"INJECTED\\\"||n.name===this.wallet?.name);if(r)await me.connectExternal(r,r.chain);else throw new Error(\\\"w3m-connecting-wc-browser: No connector found\\\");Dt.close(),Xe.sendEvent({type:\\\"track\\\",event:\\\"CONNECT_SUCCESS\\\",properties:{method:\\\"browser\\\",name:this.wallet?.name||\\\"Unknown\\\"}})}catch(e){Xe.sendEvent({type:\\\"track\\\",event:\\\"CONNECT_ERROR\\\",properties:{message:e?.message??\\\"Unknown\\\"}}),this.error=!0}}};Srt=oKt([te(\\\"w3m-connecting-wc-browser\\\")],Srt)});var aKt,Trt,Irt=x(()=>{u();xt();pr();h8();aKt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Trt=class extends $i{constructor(){if(super(),!this.wallet)throw new Error(\\\"w3m-connecting-wc-desktop: No wallet provided\\\");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet.name,platform:\\\"desktop\\\"}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:r}=this.wallet,{redirect:n,href:i}=oe.formatNativeUrl(e,this.uri);me.setWcLinking({name:r,href:i}),me.setRecentWallet(this.wallet),oe.openHref(n,\\\"_blank\\\")}catch{this.error=!0}}};Trt=aKt([te(\\\"w3m-connecting-wc-desktop\\\")],Trt)});var m8,_x,Rrt=x(()=>{u();Ke();xt();pr();h8();m8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},_x=class extends $i{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=ee.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{if(this.wallet?.mobile_link&&this.uri)try{this.error=!1;let{mobile_link:e,link_mode:r,name:n}=this.wallet,{redirect:i,redirectUniversalLink:s,href:o}=oe.formatNativeUrl(e,this.uri,r);this.redirectDeeplink=i,this.redirectUniversalLink=s,this.target=oe.isIframe()?\\\"_top\\\":\\\"_self\\\",me.setWcLinking({name:n,href:o}),me.setRecentWallet(this.wallet),this.preferUniversalLinks&&this.redirectUniversalLink?oe.openHref(this.redirectUniversalLink,this.target):oe.openHref(this.redirectDeeplink,this.target)}catch(e){Xe.sendEvent({type:\\\"track\\\",event:\\\"CONNECT_PROXY_ERROR\\\",properties:{message:e instanceof Error?e.message:\\\"Error parsing the deeplink\\\",uri:this.uri,mobile_link:this.wallet.mobile_link,name:this.wallet.name}}),this.error=!0}},!this.wallet)throw new Error(\\\"w3m-connecting-wc-mobile: No wallet provided\\\");this.secondaryBtnLabel=\\\"Open\\\",this.secondaryLabel=Rt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon=\\\"externalLink\\\",this.onHandleURI(),this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",()=>{this.onHandleURI()})),Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet.name,platform:\\\"mobile\\\"}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){me.setWcError(!1),this.onConnect?.()}};m8([xe()],_x.prototype,\\\"redirectDeeplink\\\",void 0);m8([xe()],_x.prototype,\\\"redirectUniversalLink\\\",void 0);m8([xe()],_x.prototype,\\\"target\\\",void 0);m8([xe()],_x.prototype,\\\"preferUniversalLinks\\\",void 0);m8([xe()],_x.prototype,\\\"isLoading\\\",void 0);_x=m8([te(\\\"w3m-connecting-wc-mobile\\\")],_x)});var Ort=q((lSn,Prt)=>{u();Prt.exports=function(){return typeof Promise==\\\"function\\\"&&Promise.prototype&&Promise.prototype.then}});var nb=q(Cx=>{u();var Ype,cKt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Cx.getSymbolSize=function(e){if(!e)throw new Error('\\\"version\\\" cannot be null or undefined');if(e<1||e>40)throw new Error('\\\"version\\\" should be in range from 1 to 40');return e*4+17};Cx.getSymbolTotalCodewords=function(e){return cKt[e]};Cx.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Cx.setToSJISFunction=function(e){if(typeof e!=\\\"function\\\")throw new Error('\\\"toSJISFunc\\\" is not a valid function.');Ype=e};Cx.isKanjiModeEnabled=function(){return typeof Ype<\\\"u\\\"};Cx.toSJIS=function(e){return Ype(e)}});var SV=q(_d=>{u();_d.L={bit:1};_d.M={bit:0};_d.Q={bit:3};_d.H={bit:2};function lKt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"Param is not a string\\\");switch(t.toLowerCase()){case\\\"l\\\":case\\\"low\\\":return _d.L;case\\\"m\\\":case\\\"medium\\\":return _d.M;case\\\"q\\\":case\\\"quartile\\\":return _d.Q;case\\\"h\\\":case\\\"high\\\":return _d.H;default:throw new Error(\\\"Unknown EC Level: \\\"+t)}}_d.isValid=function(e){return e&&typeof e.bit<\\\"u\\\"&&e.bit>=0&&e.bit<4};_d.from=function(e,r){if(_d.isValid(e))return e;try{return lKt(e)}catch{return r}}});var Brt=q((mSn,krt)=>{u();function Nrt(){this.buffer=[],this.length=0}Nrt.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};krt.exports=Nrt});var Drt=q((ySn,Mrt)=>{u();function SR(t){if(!t||t<1)throw new Error(\\\"BitMatrix size must be defined and greater than 0\\\");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}SR.prototype.set=function(t,e,r,n){let i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)};SR.prototype.get=function(t,e){return this.data[t*this.size+e]};SR.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};SR.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};Mrt.exports=SR});var Lrt=q(AV=>{u();var uKt=nb().getSymbolSize;AV.getRowColCoords=function(e){if(e===1)return[];let r=Math.floor(e/7)+2,n=uKt(e),i=n===145?26:Math.ceil((n-13)/(2*r-2))*2,s=[n-7];for(let o=1;o<r-1;o++)s[o]=s[o-1]-i;return s.push(6),s.reverse()};AV.getPositions=function(e){let r=[],n=AV.getRowColCoords(e),i=n.length;for(let s=0;s<i;s++)for(let o=0;o<i;o++)s===0&&o===0||s===0&&o===i-1||s===i-1&&o===0||r.push([n[s],n[o]]);return r}});var jrt=q(Frt=>{u();var dKt=nb().getSymbolSize,Urt=7;Frt.getPositions=function(e){let r=dKt(e);return[[0,0],[r-Urt,0],[0,r-Urt]]}});var Hrt=q(Ln=>{u();Ln.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Sx={N1:3,N2:3,N3:40,N4:10};Ln.isValid=function(e){return e!=null&&e!==\\\"\\\"&&!isNaN(e)&&e>=0&&e<=7};Ln.from=function(e){return Ln.isValid(e)?parseInt(e,10):void 0};Ln.getPenaltyN1=function(e){let r=e.size,n=0,i=0,s=0,o=null,a=null;for(let c=0;c<r;c++){i=s=0,o=a=null;for(let l=0;l<r;l++){let d=e.get(c,l);d===o?i++:(i>=5&&(n+=Sx.N1+(i-5)),o=d,i=1),d=e.get(l,c),d===a?s++:(s>=5&&(n+=Sx.N1+(s-5)),a=d,s=1)}i>=5&&(n+=Sx.N1+(i-5)),s>=5&&(n+=Sx.N1+(s-5))}return n};Ln.getPenaltyN2=function(e){let r=e.size,n=0;for(let i=0;i<r-1;i++)for(let s=0;s<r-1;s++){let o=e.get(i,s)+e.get(i,s+1)+e.get(i+1,s)+e.get(i+1,s+1);(o===4||o===0)&&n++}return n*Sx.N2};Ln.getPenaltyN3=function(e){let r=e.size,n=0,i=0,s=0;for(let o=0;o<r;o++){i=s=0;for(let a=0;a<r;a++)i=i<<1&2047|e.get(o,a),a>=10&&(i===1488||i===93)&&n++,s=s<<1&2047|e.get(a,o),a>=10&&(s===1488||s===93)&&n++}return n*Sx.N3};Ln.getPenaltyN4=function(e){let r=0,n=e.data.length;for(let s=0;s<n;s++)r+=e.data[s];return Math.abs(Math.ceil(r*100/n/5)-10)*Sx.N4};function fKt(t,e,r){switch(t){case Ln.Patterns.PATTERN000:return(e+r)%2===0;case Ln.Patterns.PATTERN001:return e%2===0;case Ln.Patterns.PATTERN010:return r%3===0;case Ln.Patterns.PATTERN011:return(e+r)%3===0;case Ln.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2===0;case Ln.Patterns.PATTERN101:return e*r%2+e*r%3===0;case Ln.Patterns.PATTERN110:return(e*r%2+e*r%3)%2===0;case Ln.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2===0;default:throw new Error(\\\"bad maskPattern:\\\"+t)}}Ln.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let s=0;s<n;s++)r.isReserved(s,i)||r.xor(s,i,fKt(e,s,i))};Ln.getBestMask=function(e,r){let n=Object.keys(Ln.Patterns).length,i=0,s=1/0;for(let o=0;o<n;o++){r(o),Ln.applyMask(o,e);let a=Ln.getPenaltyN1(e)+Ln.getPenaltyN2(e)+Ln.getPenaltyN3(e)+Ln.getPenaltyN4(e);Ln.applyMask(o,e),a<s&&(s=a,i=o)}return i}});var ehe=q(Xpe=>{u();var ib=SV(),TV=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],IV=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Xpe.getBlocksCount=function(e,r){switch(r){case ib.L:return TV[(e-1)*4+0];case ib.M:return TV[(e-1)*4+1];case ib.Q:return TV[(e-1)*4+2];case ib.H:return TV[(e-1)*4+3];default:return}};Xpe.getTotalCodewordsCount=function(e,r){switch(r){case ib.L:return IV[(e-1)*4+0];case ib.M:return IV[(e-1)*4+1];case ib.Q:return IV[(e-1)*4+2];case ib.H:return IV[(e-1)*4+3];default:return}}});var qrt=q(PV=>{u();var AR=new Uint8Array(512),RV=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)AR[r]=e,RV[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)AR[r]=AR[r-255]})();PV.log=function(e){if(e<1)throw new Error(\\\"log(\\\"+e+\\\")\\\");return RV[e]};PV.exp=function(e){return AR[e]};PV.mul=function(e,r){return e===0||r===0?0:AR[RV[e]+RV[r]]}});var zrt=q(TR=>{u();var the=qrt();TR.mul=function(e,r){let n=new Uint8Array(e.length+r.length-1);for(let i=0;i<e.length;i++)for(let s=0;s<r.length;s++)n[i+s]^=the.mul(e[i],r[s]);return n};TR.mod=function(e,r){let n=new Uint8Array(e);for(;n.length-r.length>=0;){let i=n[0];for(let o=0;o<r.length;o++)n[o]^=the.mul(r[o],i);let s=0;for(;s<n.length&&n[s]===0;)s++;n=n.slice(s)}return n};TR.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=TR.mul(r,new Uint8Array([1,the.exp(n)]));return r}});var Wrt=q((OSn,Vrt)=>{u();var $rt=zrt();function rhe(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}rhe.prototype.initialize=function(e){this.degree=e,this.genPoly=$rt.generateECPolynomial(this.degree)};rhe.prototype.encode=function(e){if(!this.genPoly)throw new Error(\\\"Encoder not initialized\\\");let r=new Uint8Array(e.length+this.degree);r.set(e);let n=$rt.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){let s=new Uint8Array(this.degree);return s.set(n,i),s}return n};Vrt.exports=rhe});var nhe=q(Grt=>{u();Grt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var ihe=q(V0=>{u();var Krt=\\\"[0-9]+\\\",pKt=\\\"[A-Z $%*+\\\\\\\\-./:]+\\\",IR=\\\"(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+\\\";IR=IR.replace(/u/g,\\\"\\\\\\\\u\\\");var hKt=\\\"(?:(?![A-Z0-9 $%*+\\\\\\\\-./:]|\\\"+IR+`)(?:.|[\\\\r\\n]))+`;V0.KANJI=new RegExp(IR,\\\"g\\\");V0.BYTE_KANJI=new RegExp(\\\"[^A-Z0-9 $%*+\\\\\\\\-./:]+\\\",\\\"g\\\");V0.BYTE=new RegExp(hKt,\\\"g\\\");V0.NUMERIC=new RegExp(Krt,\\\"g\\\");V0.ALPHANUMERIC=new RegExp(pKt,\\\"g\\\");var mKt=new RegExp(\\\"^\\\"+IR+\\\"$\\\"),gKt=new RegExp(\\\"^\\\"+Krt+\\\"$\\\"),yKt=new RegExp(\\\"^[A-Z0-9 $%*+\\\\\\\\-./:]+$\\\");V0.testKanji=function(e){return mKt.test(e)};V0.testNumeric=function(e){return gKt.test(e)};V0.testAlphanumeric=function(e){return yKt.test(e)}});var sb=q(Ls=>{u();var bKt=nhe(),she=ihe();Ls.NUMERIC={id:\\\"Numeric\\\",bit:1,ccBits:[10,12,14]};Ls.ALPHANUMERIC={id:\\\"Alphanumeric\\\",bit:2,ccBits:[9,11,13]};Ls.BYTE={id:\\\"Byte\\\",bit:4,ccBits:[8,16,16]};Ls.KANJI={id:\\\"Kanji\\\",bit:8,ccBits:[8,10,12]};Ls.MIXED={bit:-1};Ls.getCharCountIndicator=function(e,r){if(!e.ccBits)throw new Error(\\\"Invalid mode: \\\"+e);if(!bKt.isValid(r))throw new Error(\\\"Invalid version: \\\"+r);return r>=1&&r<10?e.ccBits[0]:r<27?e.ccBits[1]:e.ccBits[2]};Ls.getBestModeForData=function(e){return she.testNumeric(e)?Ls.NUMERIC:she.testAlphanumeric(e)?Ls.ALPHANUMERIC:she.testKanji(e)?Ls.KANJI:Ls.BYTE};Ls.toString=function(e){if(e&&e.id)return e.id;throw new Error(\\\"Invalid mode\\\")};Ls.isValid=function(e){return e&&e.bit&&e.ccBits};function wKt(t){if(typeof t!=\\\"string\\\")throw new Error(\\\"Param is not a string\\\");switch(t.toLowerCase()){case\\\"numeric\\\":return Ls.NUMERIC;case\\\"alphanumeric\\\":return Ls.ALPHANUMERIC;case\\\"kanji\\\":return Ls.KANJI;case\\\"byte\\\":return Ls.BYTE;default:throw new Error(\\\"Unknown mode: \\\"+t)}}Ls.from=function(e,r){if(Ls.isValid(e))return e;try{return wKt(e)}catch{return r}}});var Xrt=q(Ax=>{u();var OV=nb(),vKt=ehe(),Zrt=SV(),ob=sb(),ohe=nhe(),Jrt=7973,Qrt=OV.getBCHDigit(Jrt);function xKt(t,e,r){for(let n=1;n<=40;n++)if(e<=Ax.getCapacity(n,r,t))return n}function Yrt(t,e){return ob.getCharCountIndicator(t,e)+4}function EKt(t,e){let r=0;return t.forEach(function(n){let i=Yrt(n.mode,e);r+=i+n.getBitsLength()}),r}function _Kt(t,e){for(let r=1;r<=40;r++)if(EKt(t,r)<=Ax.getCapacity(r,e,ob.MIXED))return r}Ax.from=function(e,r){return ohe.isValid(e)?parseInt(e,10):r};Ax.getCapacity=function(e,r,n){if(!ohe.isValid(e))throw new Error(\\\"Invalid QR Code version\\\");typeof n>\\\"u\\\"&&(n=ob.BYTE);let i=OV.getSymbolTotalCodewords(e),s=vKt.getTotalCodewordsCount(e,r),o=(i-s)*8;if(n===ob.MIXED)return o;let a=o-Yrt(n,e);switch(n){case ob.NUMERIC:return Math.floor(a/10*3);case ob.ALPHANUMERIC:return Math.floor(a/11*2);case ob.KANJI:return Math.floor(a/13);case ob.BYTE:default:return Math.floor(a/8)}};Ax.getBestVersionForData=function(e,r){let n,i=Zrt.from(r,Zrt.M);if(Array.isArray(e)){if(e.length>1)return _Kt(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return xKt(n.mode,n.getLength(),i)};Ax.getEncodedBits=function(e){if(!ohe.isValid(e)||e<7)throw new Error(\\\"Invalid QR Code version\\\");let r=e<<12;for(;OV.getBCHDigit(r)-Qrt>=0;)r^=Jrt<<OV.getBCHDigit(r)-Qrt;return e<<12|r}});var nnt=q(rnt=>{u();var ahe=nb(),tnt=1335,CKt=21522,ent=ahe.getBCHDigit(tnt);rnt.getEncodedBits=function(e,r){let n=e.bit<<3|r,i=n<<10;for(;ahe.getBCHDigit(i)-ent>=0;)i^=tnt<<ahe.getBCHDigit(i)-ent;return(n<<10|i)^CKt}});var snt=q((zSn,int)=>{u();var SKt=sb();function g8(t){this.mode=SKt.NUMERIC,this.data=t.toString()}g8.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};g8.prototype.getLength=function(){return this.data.length};g8.prototype.getBitsLength=function(){return g8.getBitsLength(this.data.length)};g8.prototype.write=function(e){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),e.put(i,10);let s=this.data.length-r;s>0&&(n=this.data.substr(r),i=parseInt(n,10),e.put(i,s*3+1))};int.exports=g8});var ant=q((VSn,ont)=>{u();var AKt=sb(),che=[\\\"0\\\",\\\"1\\\",\\\"2\\\",\\\"3\\\",\\\"4\\\",\\\"5\\\",\\\"6\\\",\\\"7\\\",\\\"8\\\",\\\"9\\\",\\\"A\\\",\\\"B\\\",\\\"C\\\",\\\"D\\\",\\\"E\\\",\\\"F\\\",\\\"G\\\",\\\"H\\\",\\\"I\\\",\\\"J\\\",\\\"K\\\",\\\"L\\\",\\\"M\\\",\\\"N\\\",\\\"O\\\",\\\"P\\\",\\\"Q\\\",\\\"R\\\",\\\"S\\\",\\\"T\\\",\\\"U\\\",\\\"V\\\",\\\"W\\\",\\\"X\\\",\\\"Y\\\",\\\"Z\\\",\\\" \\\",\\\"$\\\",\\\"%\\\",\\\"*\\\",\\\"+\\\",\\\"-\\\",\\\".\\\",\\\"/\\\",\\\":\\\"];function y8(t){this.mode=AKt.ALPHANUMERIC,this.data=t}y8.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};y8.prototype.getLength=function(){return this.data.length};y8.prototype.getBitsLength=function(){return y8.getBitsLength(this.data.length)};y8.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=che.indexOf(this.data[r])*45;n+=che.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(che.indexOf(this.data[r]),6)};ont.exports=y8});var lnt=q((GSn,cnt)=>{\\\"use strict\\\";u();cnt.exports=function(e){for(var r=[],n=e.length,i=0;i<n;i++){var s=e.charCodeAt(i);if(s>=55296&&s<=56319&&n>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){r.push(s);continue}if(s<2048){r.push(s>>6|192),r.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);continue}if(s>=65536&&s<=1114111){r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer}});var dnt=q((ZSn,unt)=>{u();var TKt=lnt(),IKt=sb();function b8(t){this.mode=IKt.BYTE,typeof t==\\\"string\\\"&&(t=TKt(t)),this.data=new Uint8Array(t)}b8.getBitsLength=function(e){return e*8};b8.prototype.getLength=function(){return this.data.length};b8.prototype.getBitsLength=function(){return b8.getBitsLength(this.data.length)};b8.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};unt.exports=b8});var pnt=q((JSn,fnt)=>{u();var RKt=sb(),PKt=nb();function w8(t){this.mode=RKt.KANJI,this.data=t}w8.getBitsLength=function(e){return e*13};w8.prototype.getLength=function(){return this.data.length};w8.prototype.getBitsLength=function(){return w8.getBitsLength(this.data.length)};w8.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=PKt.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error(\\\"Invalid SJIS character: \\\"+this.data[e]+`\\nMake sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};fnt.exports=w8});var hnt=q((XSn,lhe)=>{\\\"use strict\\\";u();var RR={single_source_shortest_paths:function(t,e,r){var n={},i={};i[e]=0;var s=RR.PriorityQueue.make();s.push(e,0);for(var o,a,c,l,d,f,p,h,m;!s.empty();){o=s.pop(),a=o.value,l=o.cost,d=t[a]||{};for(c in d)d.hasOwnProperty(c)&&(f=d[c],p=l+f,h=i[c],m=typeof i[c]>\\\"u\\\",(m||h>p)&&(i[c]=p,s.push(c,p),n[c]=a))}if(typeof r<\\\"u\\\"&&typeof i[r]>\\\"u\\\"){var g=[\\\"Could not find a path from \\\",e,\\\" to \\\",r,\\\".\\\"].join(\\\"\\\");throw new Error(g)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e,i;n;)r.push(n),i=t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var n=RR.single_source_shortest_paths(t,e,r);return RR.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(t){var e=RR.PriorityQueue,r={},n;t=t||{};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r.queue=[],r.sorter=t.sorter||e.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof lhe<\\\"u\\\"&&(lhe.exports=RR)});var Ent=q(v8=>{u();var $r=sb(),ynt=snt(),bnt=ant(),wnt=dnt(),vnt=pnt(),PR=ihe(),NV=nb(),OKt=hnt();function mnt(t){return unescape(encodeURIComponent(t)).length}function OR(t,e,r){let n=[],i;for(;(i=t.exec(r))!==null;)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function xnt(t){let e=OR(PR.NUMERIC,$r.NUMERIC,t),r=OR(PR.ALPHANUMERIC,$r.ALPHANUMERIC,t),n,i;return NV.isKanjiModeEnabled()?(n=OR(PR.BYTE,$r.BYTE,t),i=OR(PR.KANJI,$r.KANJI,t)):(n=OR(PR.BYTE_KANJI,$r.BYTE,t),i=[]),e.concat(r,n,i).sort(function(o,a){return o.index-a.index}).map(function(o){return{data:o.data,mode:o.mode,length:o.length}})}function uhe(t,e){switch(e){case $r.NUMERIC:return ynt.getBitsLength(t);case $r.ALPHANUMERIC:return bnt.getBitsLength(t);case $r.KANJI:return vnt.getBitsLength(t);case $r.BYTE:return wnt.getBitsLength(t)}}function NKt(t){return t.reduce(function(e,r){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===r.mode?(e[e.length-1].data+=r.data,e):(e.push(r),e)},[])}function kKt(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];switch(n.mode){case $r.NUMERIC:e.push([n,{data:n.data,mode:$r.ALPHANUMERIC,length:n.length},{data:n.data,mode:$r.BYTE,length:n.length}]);break;case $r.ALPHANUMERIC:e.push([n,{data:n.data,mode:$r.BYTE,length:n.length}]);break;case $r.KANJI:e.push([n,{data:n.data,mode:$r.BYTE,length:mnt(n.data)}]);break;case $r.BYTE:e.push([{data:n.data,mode:$r.BYTE,length:mnt(n.data)}])}}return e}function BKt(t,e){let r={},n={start:{}},i=[\\\"start\\\"];for(let s=0;s<t.length;s++){let o=t[s],a=[];for(let c=0;c<o.length;c++){let l=o[c],d=\\\"\\\"+s+c;a.push(d),r[d]={node:l,lastCount:0},n[d]={};for(let f=0;f<i.length;f++){let p=i[f];r[p]&&r[p].node.mode===l.mode?(n[p][d]=uhe(r[p].lastCount+l.length,l.mode)-uhe(r[p].lastCount,l.mode),r[p].lastCount+=l.length):(r[p]&&(r[p].lastCount=l.length),n[p][d]=uhe(l.length,l.mode)+4+$r.getCharCountIndicator(l.mode,e))}}i=a}for(let s=0;s<i.length;s++)n[i[s]].end=0;return{map:n,table:r}}function gnt(t,e){let r,n=$r.getBestModeForData(t);if(r=$r.from(e,n),r!==$r.BYTE&&r.bit<n.bit)throw new Error('\\\"'+t+'\\\" cannot be encoded with mode '+$r.toString(r)+`.\\n Suggested mode is: `+$r.toString(n));switch(r===$r.KANJI&&!NV.isKanjiModeEnabled()&&(r=$r.BYTE),r){case $r.NUMERIC:return new ynt(t);case $r.ALPHANUMERIC:return new bnt(t);case $r.KANJI:return new vnt(t);case $r.BYTE:return new wnt(t)}}v8.fromArray=function(e){return e.reduce(function(r,n){return typeof n==\\\"string\\\"?r.push(gnt(n,null)):n.data&&r.push(gnt(n.data,n.mode)),r},[])};v8.fromString=function(e,r){let n=xnt(e,NV.isKanjiModeEnabled()),i=kKt(n),s=BKt(i,r),o=OKt.find_path(s.map,\\\"start\\\",\\\"end\\\"),a=[];for(let c=1;c<o.length-1;c++)a.push(s.table[o[c]].node);return v8.fromArray(NKt(a))};v8.rawSplit=function(e){return v8.fromArray(xnt(e,NV.isKanjiModeEnabled()))}});var Cnt=q(_nt=>{u();var BV=nb(),dhe=SV(),MKt=Brt(),DKt=Drt(),LKt=Lrt(),UKt=jrt(),hhe=Hrt(),mhe=ehe(),FKt=Wrt(),kV=Xrt(),jKt=nnt(),HKt=sb(),fhe=Ent();function qKt(t,e){let r=t.size,n=UKt.getPositions(e);for(let i=0;i<n.length;i++){let s=n[i][0],o=n[i][1];for(let a=-1;a<=7;a++)if(!(s+a<=-1||r<=s+a))for(let c=-1;c<=7;c++)o+c<=-1||r<=o+c||(a>=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?t.set(s+a,o+c,!0,!0):t.set(s+a,o+c,!1,!0))}}function zKt(t){let e=t.size;for(let r=8;r<e-8;r++){let n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function $Kt(t,e){let r=LKt.getPositions(e);for(let n=0;n<r.length;n++){let i=r[n][0],s=r[n][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?t.set(i+o,s+a,!0,!0):t.set(i+o,s+a,!1,!0)}}function VKt(t,e){let r=t.size,n=kV.getEncodedBits(e),i,s,o;for(let a=0;a<18;a++)i=Math.floor(a/3),s=a%3+r-8-3,o=(n>>a&1)===1,t.set(i,s,o,!0),t.set(s,i,o,!0)}function phe(t,e,r){let n=t.size,i=jKt.getEncodedBits(e,r),s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?t.set(s,8,o,!0):s<8?t.set(s+1,8,o,!0):t.set(n-15+s,8,o,!0),s<8?t.set(8,n-s-1,o,!0):s<9?t.set(8,15-s-1+1,o,!0):t.set(8,15-s-1,o,!0);t.set(n-8,8,1,!0)}function WKt(t,e){let r=t.size,n=-1,i=r-1,s=7,o=0;for(let a=r-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!t.isReserved(i,a-c)){let l=!1;o<e.length&&(l=(e[o]>>>s&1)===1),t.set(i,a-c,l),s--,s===-1&&(o++,s=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function GKt(t,e,r){let n=new MKt;r.forEach(function(c){n.put(c.mode.bit,4),n.put(c.getLength(),HKt.getCharCountIndicator(c.mode,t)),c.write(n)});let i=BV.getSymbolTotalCodewords(t),s=mhe.getTotalCodewordsCount(t,e),o=(i-s)*8;for(n.getLengthInBits()+4<=o&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let a=(o-n.getLengthInBits())/8;for(let c=0;c<a;c++)n.put(c%2?17:236,8);return KKt(n,t,e)}function KKt(t,e,r){let n=BV.getSymbolTotalCodewords(e),i=mhe.getTotalCodewordsCount(e,r),s=n-i,o=mhe.getBlocksCount(e,r),a=n%o,c=o-a,l=Math.floor(n/o),d=Math.floor(s/o),f=d+1,p=l-d,h=new FKt(p),m=0,g=new Array(o),w=new Array(o),v=0,b=new Uint8Array(t.buffer);for(let O=0;O<o;O++){let L=O<c?d:f;g[O]=b.slice(m,m+L),w[O]=h.encode(g[O]),m+=L,v=Math.max(v,L)}let _=new Uint8Array(n),S=0,T,N;for(T=0;T<v;T++)for(N=0;N<o;N++)T<g[N].length&&(_[S++]=g[N][T]);for(T=0;T<p;T++)for(N=0;N<o;N++)_[S++]=w[N][T];return _}function ZKt(t,e,r,n){let i;if(Array.isArray(t))i=fhe.fromArray(t);else if(typeof t==\\\"string\\\"){let l=e;if(!l){let d=fhe.rawSplit(t);l=kV.getBestVersionForData(d,r)}i=fhe.fromString(t,l||40)}else throw new Error(\\\"Invalid data\\\");let s=kV.getBestVersionForData(i,r);if(!s)throw new Error(\\\"The amount of data is too big to be stored in a QR Code\\\");if(!e)e=s;else if(e<s)throw new Error(`\\nThe chosen QR Code version cannot contain this amount of data.\\nMinimum version required to store current data is: `+s+`.\\n`);let o=GKt(e,r,i),a=BV.getSymbolSize(e),c=new DKt(a);return qKt(c,e),zKt(c),$Kt(c,e),phe(c,r,0),e>=7&&VKt(c,e),WKt(c,o),isNaN(n)&&(n=hhe.getBestMask(c,phe.bind(null,c,r))),hhe.applyMask(n,c),phe(c,r,n),{modules:c,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}_nt.create=function(e,r){if(typeof e>\\\"u\\\"||e===\\\"\\\")throw new Error(\\\"No input text\\\");let n=dhe.M,i,s;return typeof r<\\\"u\\\"&&(n=dhe.from(r.errorCorrectionLevel,dhe.M),i=kV.from(r.version),s=hhe.from(r.maskPattern),r.toSJISFunc&&BV.setToSJISFunction(r.toSJISFunc)),ZKt(e,i,n,s)}});var ghe=q(Tx=>{u();function Snt(t){if(typeof t==\\\"number\\\"&&(t=t.toString()),typeof t!=\\\"string\\\")throw new Error(\\\"Color should be defined as hex string\\\");let e=t.slice().replace(\\\"#\\\",\\\"\\\").split(\\\"\\\");if(e.length<3||e.length===5||e.length>8)throw new Error(\\\"Invalid hex color: \\\"+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push(\\\"F\\\",\\\"F\\\");let r=parseInt(e.join(\\\"\\\"),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:\\\"#\\\"+e.slice(0,6).join(\\\"\\\")}}Tx.getOptions=function(e){e||(e={}),e.color||(e.color={});let r=typeof e.margin>\\\"u\\\"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:r,color:{dark:Snt(e.color.dark||\\\"#000000ff\\\"),light:Snt(e.color.light||\\\"#ffffffff\\\")},type:e.type,rendererOpts:e.rendererOpts||{}}};Tx.getScale=function(e,r){return r.width&&r.width>=e+r.margin*2?r.width/(e+r.margin*2):r.scale};Tx.getImageWidth=function(e,r){let n=Tx.getScale(e,r);return Math.floor((e+r.margin*2)*n)};Tx.qrToImageData=function(e,r,n){let i=r.modules.size,s=r.modules.data,o=Tx.getScale(i,n),a=Math.floor((i+n.margin*2)*o),c=n.margin*o,l=[n.color.light,n.color.dark];for(let d=0;d<a;d++)for(let f=0;f<a;f++){let p=(d*a+f)*4,h=n.color.light;if(d>=c&&f>=c&&d<a-c&&f<a-c){let m=Math.floor((d-c)/o),g=Math.floor((f-c)/o);h=l[s[m*i+g]?1:0]}e[p++]=h.r,e[p++]=h.g,e[p++]=h.b,e[p]=h.a}}});var Ant=q(MV=>{u();var yhe=ghe();function QKt(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+\\\"px\\\",e.style.width=r+\\\"px\\\"}function JKt(){try{return document.createElement(\\\"canvas\\\")}catch{throw new Error(\\\"You need to specify a canvas element\\\")}}MV.render=function(e,r,n){let i=n,s=r;typeof i>\\\"u\\\"&&(!r||!r.getContext)&&(i=r,r=void 0),r||(s=JKt()),i=yhe.getOptions(i);let o=yhe.getImageWidth(e.modules.size,i),a=s.getContext(\\\"2d\\\"),c=a.createImageData(o,o);return yhe.qrToImageData(c.data,e,i),QKt(a,s,o),a.putImageData(c,0,0),s};MV.renderToDataURL=function(e,r,n){let i=n;typeof i>\\\"u\\\"&&(!r||!r.getContext)&&(i=r,r=void 0),i||(i={});let s=MV.render(e,r,i),o=i.type||\\\"image/png\\\",a=i.rendererOpts||{};return s.toDataURL(o,a.quality)}});var Rnt=q(Int=>{u();var YKt=ghe();function Tnt(t,e){let r=t.a/255,n=e+'=\\\"'+t.hex+'\\\"';return r<1?n+\\\" \\\"+e+'-opacity=\\\"'+r.toFixed(2).slice(1)+'\\\"':n}function bhe(t,e,r){let n=t+e;return typeof r<\\\"u\\\"&&(n+=\\\" \\\"+r),n}function XKt(t,e,r){let n=\\\"\\\",i=0,s=!1,o=0;for(let a=0;a<t.length;a++){let c=Math.floor(a%e),l=Math.floor(a/e);!c&&!s&&(s=!0),t[a]?(o++,a>0&&c>0&&t[a-1]||(n+=s?bhe(\\\"M\\\",c+r,.5+l+r):bhe(\\\"m\\\",i,0),i=0,s=!1),c+1<e&&t[a+1]||(n+=bhe(\\\"h\\\",o),o=0)):i++}return n}Int.render=function(e,r,n){let i=YKt.getOptions(r),s=e.modules.size,o=e.modules.data,a=s+i.margin*2,c=i.color.light.a?\\\"<path \\\"+Tnt(i.color.light,\\\"fill\\\")+' d=\\\"M0 0h'+a+\\\"v\\\"+a+'H0z\\\"/>':\\\"\\\",l=\\\"<path \\\"+Tnt(i.color.dark,\\\"stroke\\\")+' d=\\\"'+XKt(o,s,i.margin)+'\\\"/>',d='viewBox=\\\"0 0 '+a+\\\" \\\"+a+'\\\"',p='<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" '+(i.width?'width=\\\"'+i.width+'\\\" height=\\\"'+i.width+'\\\" ':\\\"\\\")+d+' shape-rendering=\\\"crispEdges\\\">'+c+l+`</svg>\\n`;return typeof n==\\\"function\\\"&&n(null,p),p}});var Ont=q(NR=>{u();var eZt=Ort(),whe=Cnt(),Pnt=Ant(),tZt=Rnt();function vhe(t,e,r,n,i){let s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]==\\\"function\\\";if(!a&&!eZt())throw new Error(\\\"Callback required as last argument\\\");if(a){if(o<2)throw new Error(\\\"Too few arguments provided\\\");o===2?(i=r,r=e,e=n=void 0):o===3&&(e.getContext&&typeof i>\\\"u\\\"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(o<1)throw new Error(\\\"Too few arguments provided\\\");return o===1?(r=e,e=n=void 0):o===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(c,l){try{let d=whe.create(r,n);c(t(d,e,n))}catch(d){l(d)}})}try{let c=whe.create(r,n);i(null,t(c,e,n))}catch(c){i(c)}}NR.create=whe.create;NR.toCanvas=vhe.bind(null,Pnt.render);NR.toDataURL=vhe.bind(null,Pnt.renderToDataURL);NR.toString=vhe.bind(null,function(t,e,r){return tZt.render(t,r)})});function xhe(t,e,r){return t===e?!1:(t-e<0?e-t:t-e)<=r+rZt}function nZt(t,e){let r=Array.prototype.slice.call(knt.default.create(t,{errorCorrectionLevel:e}).modules.data,0),n=Math.sqrt(r.length);return r.reduce((i,s,o)=>(o%n===0?i.push([s]):i[i.length-1].push(s))&&i,[])}var knt,rZt,Nnt,W0,Bnt,Mnt=x(()=>{u();knt=Me(Ont(),1);Q();rZt=.1,Nnt=2.5,W0=7;Bnt={generate({uri:t,size:e,logoSize:r,dotColor:n=\\\"#141414\\\"}){let i=\\\"transparent\\\",o=[],a=nZt(t,\\\"Q\\\"),c=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:g,y:w})=>{let v=(a.length-W0)*c*g,b=(a.length-W0)*c*w,_=.45;for(let S=0;S<l.length;S+=1){let T=c*(W0-S*2);o.push(Y`\\n            <rect\\n              fill=${S===2?n:i}\\n              width=${S===0?T-5:T}\\n              rx= ${S===0?(T-5)*_:T*_}\\n              ry= ${S===0?(T-5)*_:T*_}\\n              stroke=${n}\\n              stroke-width=${S===0?5:0}\\n              height=${S===0?T-5:T}\\n              x= ${S===0?b+c*S+5/2:b+c*S}\\n              y= ${S===0?v+c*S+5/2:v+c*S}\\n            />\\n          `)}});let d=Math.floor((r+25)/c),f=a.length/2-d/2,p=a.length/2+d/2-1,h=[];a.forEach((g,w)=>{g.forEach((v,b)=>{if(a[w][b]&&!(w<W0&&b<W0||w>a.length-(W0+1)&&b<W0||w<W0&&b>a.length-(W0+1))&&!(w>f&&w<p&&b>f&&b<p)){let _=w*c+c/2,S=b*c+c/2;h.push([_,S])}})});let m={};return h.forEach(([g,w])=>{m[g]?m[g]?.push(w):m[g]=[w]}),Object.entries(m).map(([g,w])=>{let v=w.filter(b=>w.every(_=>!xhe(b,_,c)));return[Number(g),v]}).forEach(([g,w])=>{w.forEach(v=>{o.push(Y`<circle cx=${g} cy=${v} fill=${n} r=${c/Nnt} />`)})}),Object.entries(m).filter(([g,w])=>w.length>1).map(([g,w])=>{let v=w.filter(b=>w.some(_=>xhe(b,_,c)));return[Number(g),v]}).map(([g,w])=>{w.sort((b,_)=>b<_?-1:1);let v=[];for(let b of w){let _=v.find(S=>S.some(T=>xhe(b,T,c)));_?_.push(b):v.push([b])}return[g,v.map(b=>[b[0],b[b.length-1]])]}).forEach(([g,w])=>{w.forEach(([v,b])=>{o.push(Y`\\n              <line\\n                x1=${g}\\n                x2=${g}\\n                y1=${v}\\n                y2=${b}\\n                stroke=${n}\\n                stroke-width=${c/(Nnt/2)}\\n                stroke-linecap=\\\"round\\\"\\n              />\\n            `)})}),o}}});var Dnt,Lnt=x(()=>{u();Q();Dnt=we`\\n  :host {\\n    position: relative;\\n    user-select: none;\\n    display: block;\\n    overflow: hidden;\\n    aspect-ratio: 1 / 1;\\n    width: var(--local-size);\\n  }\\n\\n  :host([data-theme='dark']) {\\n    border-radius: clamp(0px, var(--wui-border-radius-l), 40px);\\n    background-color: var(--wui-color-inverse-100);\\n    padding: var(--wui-spacing-l);\\n  }\\n\\n  :host([data-theme='light']) {\\n    box-shadow: 0 0 0 1px var(--wui-color-bg-125);\\n    background-color: var(--wui-color-bg-125);\\n  }\\n\\n  :host([data-clear='true']) > wui-icon {\\n    display: none;\\n  }\\n\\n  svg:first-child,\\n  wui-image,\\n  wui-icon {\\n    position: absolute;\\n    top: 50%;\\n    left: 50%;\\n    transform: translateY(-50%) translateX(-50%);\\n  }\\n\\n  wui-image {\\n    width: 25%;\\n    height: 25%;\\n    border-radius: var(--wui-border-radius-xs);\\n  }\\n\\n  wui-icon {\\n    width: 100%;\\n    height: 100%;\\n    color: var(--local-icon-color) !important;\\n    transform: translateY(-50%) translateX(-50%) scale(0.25);\\n  }\\n`});var G0,iZt,Lf,Unt=x(()=>{u();Q();Ke();aa();u8();Mnt();Er();fr();Lnt();G0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},iZt=\\\"#3396ff\\\",Lf=class extends se{constructor(){super(...arguments),this.uri=\\\"\\\",this.size=0,this.theme=\\\"dark\\\",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`\\n     --local-size: ${this.size}px;\\n     --local-icon-color: ${this.color??iZt}\\n    `,$`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){let e=this.theme===\\\"light\\\"?this.size:this.size-32;return Y`\\n      <svg height=${e} width=${e}>\\n        ${Bnt.generate({uri:this.uri,size:e,logoSize:this.arenaClear?0:e/4,dotColor:this.color})}\\n      </svg>\\n    `}templateVisual(){return this.imageSrc?$`<wui-image src=${this.imageSrc} alt=${this.alt??\\\"logo\\\"}></wui-image>`:this.farcaster?$`<wui-icon\\n        class=\\\"farcaster\\\"\\n        size=\\\"inherit\\\"\\n        color=\\\"inherit\\\"\\n        name=\\\"farcaster\\\"\\n      ></wui-icon>`:$`<wui-icon size=\\\"inherit\\\" color=\\\"inherit\\\" name=\\\"walletConnect\\\"></wui-icon>`}};Lf.styles=[ze,Dnt];G0([G()],Lf.prototype,\\\"uri\\\",void 0);G0([G({type:Number})],Lf.prototype,\\\"size\\\",void 0);G0([G()],Lf.prototype,\\\"theme\\\",void 0);G0([G()],Lf.prototype,\\\"imageSrc\\\",void 0);G0([G()],Lf.prototype,\\\"alt\\\",void 0);G0([G()],Lf.prototype,\\\"color\\\",void 0);G0([G({type:Boolean})],Lf.prototype,\\\"arenaClear\\\",void 0);G0([G({type:Boolean})],Lf.prototype,\\\"farcaster\\\",void 0);Lf=G0([te(\\\"wui-qr-code\\\")],Lf)});var Fnt=x(()=>{u();Unt()});var jnt,Hnt=x(()=>{u();Q();jnt=we`\\n  :host {\\n    display: block;\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);\\n    background: linear-gradient(\\n      120deg,\\n      var(--wui-color-bg-200) 5%,\\n      var(--wui-color-bg-200) 48%,\\n      var(--wui-color-bg-300) 55%,\\n      var(--wui-color-bg-300) 60%,\\n      var(--wui-color-bg-300) calc(60% + 10px),\\n      var(--wui-color-bg-200) calc(60% + 12px),\\n      var(--wui-color-bg-200) 100%\\n    );\\n    background-size: 250%;\\n    animation: shimmer 3s linear infinite reverse;\\n  }\\n\\n  :host([variant='light']) {\\n    background: linear-gradient(\\n      120deg,\\n      var(--wui-color-bg-150) 5%,\\n      var(--wui-color-bg-150) 48%,\\n      var(--wui-color-bg-200) 55%,\\n      var(--wui-color-bg-200) 60%,\\n      var(--wui-color-bg-200) calc(60% + 10px),\\n      var(--wui-color-bg-150) calc(60% + 12px),\\n      var(--wui-color-bg-150) 100%\\n    );\\n    background-size: 250%;\\n  }\\n\\n  @keyframes shimmer {\\n    from {\\n      background-position: -250% 0;\\n    }\\n    to {\\n      background-position: 250% 0;\\n    }\\n  }\\n`});var kR,Ix,Ehe=x(()=>{u();Q();Ke();fr();Hnt();kR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ix=class extends se{constructor(){super(...arguments),this.width=\\\"\\\",this.height=\\\"\\\",this.borderRadius=\\\"m\\\",this.variant=\\\"default\\\"}render(){return this.style.cssText=`\\n      width: ${this.width};\\n      height: ${this.height};\\n      border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};\\n    `,$`<slot></slot>`}};Ix.styles=[jnt];kR([G()],Ix.prototype,\\\"width\\\",void 0);kR([G()],Ix.prototype,\\\"height\\\",void 0);kR([G()],Ix.prototype,\\\"borderRadius\\\",void 0);kR([G()],Ix.prototype,\\\"variant\\\",void 0);Ix=kR([te(\\\"wui-shimmer\\\")],Ix)});var _he=x(()=>{u();Ehe()});var qnt,znt=x(()=>{u();qnt=\\\"https://reown.com\\\"});var $nt,Vnt=x(()=>{u();Q();$nt=we`\\n  .reown-logo {\\n    height: var(--wui-spacing-xxl);\\n  }\\n\\n  a {\\n    text-decoration: none;\\n    cursor: pointer;\\n  }\\n\\n  a:hover {\\n    opacity: 0.9;\\n  }\\n`});var sZt,Che,Wnt=x(()=>{u();Q();aa();tu();eb();znt();Er();fr();Vnt();sZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Che=class extends se{render(){return $`\\n      <a\\n        data-testid=\\\"ux-branding-reown\\\"\\n        href=${qnt}\\n        rel=\\\"noreferrer\\\"\\n        target=\\\"_blank\\\"\\n        style=\\\"text-decoration: none;\\\"\\n      >\\n        <wui-flex\\n          justifyContent=\\\"center\\\"\\n          alignItems=\\\"center\\\"\\n          gap=\\\"xs\\\"\\n          .padding=${[\\\"0\\\",\\\"0\\\",\\\"l\\\",\\\"0\\\"]}\\n        >\\n          <wui-text variant=\\\"small-500\\\" color=\\\"fg-100\\\"> UX by </wui-text>\\n          <wui-icon name=\\\"reown\\\" size=\\\"xxxl\\\" class=\\\"reown-logo\\\"></wui-icon>\\n        </wui-flex>\\n      </a>\\n    `}};Che.styles=[ze,dr,$nt];Che=sZt([te(\\\"wui-ux-by-reown\\\")],Che)});var Gnt=x(()=>{u();Wnt()});var Knt,Znt=x(()=>{u();Q();Knt=we`\\n  @keyframes fadein {\\n    from {\\n      opacity: 0;\\n    }\\n    to {\\n      opacity: 1;\\n    }\\n  }\\n\\n  wui-shimmer {\\n    width: 100%;\\n    aspect-ratio: 1 / 1;\\n    border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;\\n  }\\n\\n  wui-qr-code {\\n    opacity: 0;\\n    animation-duration: 200ms;\\n    animation-timing-function: ease;\\n    animation-name: fadein;\\n    animation-fill-mode: forwards;\\n  }\\n`});var oZt,She,Qnt=x(()=>{u();Q();bn();xt();pr();is();CR();Jpe();Fnt();_he();z0();Gnt();h8();CV();Znt();oZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},She=class extends $i{constructor(){super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener(\\\"resize\\\",this.forceUpdate),Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet?.name??\\\"WalletConnect\\\",platform:\\\"qrcode\\\"}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e()),window.removeEventListener(\\\"resize\\\",this.forceUpdate)}render(){return this.onRenderProxy(),$`\\n      <wui-flex\\n        flexDirection=\\\"column\\\"\\n        alignItems=\\\"center\\\"\\n        .padding=${[\\\"0\\\",\\\"xl\\\",\\\"xl\\\",\\\"xl\\\"]}\\n        gap=\\\"xl\\\"\\n      >\\n        <wui-shimmer borderRadius=\\\"l\\\" width=\\\"100%\\\"> ${this.qrCodeTemplate()} </wui-shimmer>\\n\\n        <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">\\n          Scan this QR Code with your phone\\n        </wui-text>\\n        ${this.copyTemplate()}\\n      </wui-flex>\\n      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>\\n    `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,r=this.wallet?this.wallet.name:void 0;return me.setWcLinking(void 0),me.setRecentWallet(this.wallet),$` <wui-qr-code\\n      size=${e}\\n      theme=${ji.state.themeMode}\\n      uri=${this.uri}\\n      imageSrc=${Re(sr.getWalletImage(this.wallet))}\\n      color=${Re(ji.state.themeVariables[\\\"--w3m-qr-color\\\"])}\\n      alt=${Re(r)}\\n      data-testid=\\\"wui-qr-code\\\"\\n    ></wui-qr-code>`}copyTemplate(){let e=!this.uri||!this.ready;return $`<wui-link\\n      .disabled=${e}\\n      @click=${this.onCopyUri}\\n      color=\\\"fg-200\\\"\\n      data-testid=\\\"copy-wc2-uri\\\"\\n    >\\n      <wui-icon size=\\\"xs\\\" color=\\\"fg-200\\\" slot=\\\"iconLeft\\\" name=\\\"copy\\\"></wui-icon>\\n      Copy link\\n    </wui-link>`}};She.styles=Knt;She=oZt([te(\\\"w3m-connecting-wc-qrcode\\\")],She)});var aZt,Jnt,Ynt=x(()=>{u();Q();bn();xt();pr();is();z0();xV();CV();aZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Jnt=class extends se{constructor(){if(super(),this.wallet=de.state.data?.wallet,!this.wallet)throw new Error(\\\"w3m-connecting-wc-unsupported: No wallet provided\\\");Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet.name,platform:\\\"browser\\\"}})}render(){return $`\\n      <wui-flex\\n        flexDirection=\\\"column\\\"\\n        alignItems=\\\"center\\\"\\n        .padding=${[\\\"3xl\\\",\\\"xl\\\",\\\"xl\\\",\\\"xl\\\"]}\\n        gap=\\\"xl\\\"\\n      >\\n        <wui-wallet-image\\n          size=\\\"lg\\\"\\n          imageSrc=${Re(sr.getWalletImage(this.wallet))}\\n        ></wui-wallet-image>\\n\\n        <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">Not Detected</wui-text>\\n      </wui-flex>\\n\\n      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>\\n    `}};Jnt=aZt([te(\\\"w3m-connecting-wc-unsupported\\\")],Jnt)});var Xnt,Ahe,eit=x(()=>{u();Ke();xt();pr();h8();Xnt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ahe=class extends $i{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw new Error(\\\"w3m-connecting-wc-web: No wallet provided\\\");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel=\\\"Open\\\",this.secondaryLabel=Rt.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon=\\\"externalLink\\\",this.updateLoadingState(),this.unsubscribe.push(me.subscribeKey(\\\"wcUri\\\",()=>{this.updateLoadingState()})),Xe.sendEvent({type:\\\"track\\\",event:\\\"SELECT_WALLET\\\",properties:{name:this.wallet.name,platform:\\\"web\\\"}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:r}=this.wallet,{redirect:n,href:i}=oe.formatUniversalUrl(e,this.uri);me.setWcLinking({name:r,href:i}),me.setRecentWallet(this.wallet),oe.openHref(n,\\\"_blank\\\")}catch{this.error=!0}}};Xnt([xe()],Ahe.prototype,\\\"isLoading\\\",void 0);Ahe=Xnt([te(\\\"w3m-connecting-wc-web\\\")],Ahe)});var BR,x8,tit=x(()=>{u();Q();Ke();xt();pr();Jtt();Art();Irt();Rrt();Qnt();Ynt();eit();BR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},x8=class extends se{constructor(){super(),this.wallet=de.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!ee.state.siwx,this.remoteFeatures=ee.state.remoteFeatures,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(ee.subscribeKey(\\\"remoteFeatures\\\",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return $`\\n      ${this.headerTemplate()}\\n      <div>${this.platformTemplate()}</div>\\n      ${this.reownBrandingTemplate()}\\n    `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?$`<wui-ux-by-reown></wui-ux-by-reown>`:null}async initializeConnection(e=!1){if(!(this.platform===\\\"browser\\\"||ee.state.manualWCControl&&!e))try{let{wcPairingExpiry:r,status:n}=me.state;(e||ee.state.enableEmbedded||oe.isPairingExpired(r)||n===\\\"connecting\\\")&&(await me.connectWalletConnect(),this.isSiwxEnabled||Dt.close())}catch(r){Xe.sendEvent({type:\\\"track\\\",event:\\\"CONNECT_ERROR\\\",properties:{message:r?.message??\\\"Unknown\\\"}}),me.setWcError(!0),wr.showError(r.message??\\\"Connection error\\\"),me.resetWcConnection(),de.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push(\\\"qrcode\\\"),this.platform=\\\"qrcode\\\";return}if(this.platform)return;let{mobile_link:e,desktop_link:r,webapp_link:n,injected:i,rdns:s}=this.wallet,o=i?.map(({injected_id:m})=>m).filter(Boolean),a=[...s?[s]:o??[]],c=ee.state.isUniversalProvider?!1:a.length,l=e,d=n,f=me.checkInstalled(a),p=c&&f,h=r&&!oe.isMobile();p&&!z.state.noAdapters&&this.platforms.push(\\\"browser\\\"),l&&this.platforms.push(oe.isMobile()?\\\"mobile\\\":\\\"qrcode\\\"),d&&this.platforms.push(\\\"web\\\"),h&&this.platforms.push(\\\"desktop\\\"),!p&&c&&!z.state.noAdapters&&this.platforms.push(\\\"unsupported\\\"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case\\\"browser\\\":return $`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case\\\"web\\\":return $`<w3m-connecting-wc-web></w3m-connecting-wc-web>`;case\\\"desktop\\\":return $`\\n          <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>\\n          </w3m-connecting-wc-desktop>\\n        `;case\\\"mobile\\\":return $`\\n          <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>\\n          </w3m-connecting-wc-mobile>\\n        `;case\\\"qrcode\\\":return $`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return $`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?$`\\n      <w3m-connecting-header\\n        .platforms=${this.platforms}\\n        .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}\\n      >\\n      </w3m-connecting-header>\\n    `:null}async onSelectPlatform(e){let r=this.shadowRoot?.querySelector(\\\"div\\\");r&&(await r.animate([{opacity:1},{opacity:0}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}).finished,this.platform=e,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}))}};BR([xe()],x8.prototype,\\\"platform\\\",void 0);BR([xe()],x8.prototype,\\\"platforms\\\",void 0);BR([xe()],x8.prototype,\\\"isSiwxEnabled\\\",void 0);BR([xe()],x8.prototype,\\\"remoteFeatures\\\",void 0);x8=BR([te(\\\"w3m-connecting-wc-view\\\")],x8)});var rit,DV,nit=x(()=>{u();Q();Ke();xt();pr();is();Btt();Wtt();tit();rit=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},DV=class extends se{constructor(){super(...arguments),this.isMobile=oe.isMobile()}render(){if(this.isMobile){let{featured:e,recommended:r}=ye.state,{customWallets:n}=ee.state,i=Te.getRecentWallets(),s=e.length||r.length||n?.length||i.length;return $`<wui-flex\\n        flexDirection=\\\"column\\\"\\n        gap=\\\"xs\\\"\\n        .margin=${[\\\"3xs\\\",\\\"s\\\",\\\"s\\\",\\\"s\\\"]}\\n      >\\n        ${s?$`<w3m-connector-list></w3m-connector-list>`:null}\\n        <w3m-all-wallets-widget></w3m-all-wallets-widget>\\n      </wui-flex>`}return $`<wui-flex flexDirection=\\\"column\\\" .padding=${[\\\"0\\\",\\\"0\\\",\\\"l\\\",\\\"0\\\"]}>\\n      <w3m-connecting-wc-view></w3m-connecting-wc-view>\\n      <wui-flex flexDirection=\\\"column\\\" .padding=${[\\\"0\\\",\\\"m\\\",\\\"0\\\",\\\"m\\\"]}>\\n        <w3m-all-wallets-widget></w3m-all-wallets-widget> </wui-flex\\n    ></wui-flex>`}};rit([xe()],DV.prototype,\\\"isMobile\\\",void 0);DV=rit([te(\\\"w3m-connecting-wc-basic-view\\\")],DV)});var E8,Ihe,The,_8,iit=x(()=>{u();F0();Mpe();a8();E8=()=>new Ihe,Ihe=class{},The=new WeakMap,_8=gx(class extends c8{render(t){return zi}update(t,[e]){let r=e!==this.G;return r&&this.G!==void 0&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),zi}rt(t){if(this.isConnected||(t=void 0),typeof this.G==\\\"function\\\"){let e=this.ht??globalThis,r=The.get(e);r===void 0&&(r=new WeakMap,The.set(e,r)),r.get(this.G)!==void 0&&this.G.call(this.ht,void 0),r.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return typeof this.G==\\\"function\\\"?The.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})});var LV=x(()=>{u();iit()});var sit,oit=x(()=>{u();Q();sit=we`\\n  :host {\\n    display: flex;\\n    align-items: center;\\n    justify-content: center;\\n  }\\n\\n  label {\\n    position: relative;\\n    display: inline-block;\\n    width: 32px;\\n    height: 22px;\\n  }\\n\\n  input {\\n    width: 0;\\n    height: 0;\\n    opacity: 0;\\n  }\\n\\n  span {\\n    position: absolute;\\n    cursor: pointer;\\n    top: 0;\\n    left: 0;\\n    right: 0;\\n    bottom: 0;\\n    background-color: var(--wui-color-blue-100);\\n    border-width: 1px;\\n    border-style: solid;\\n    border-color: var(--wui-color-gray-glass-002);\\n    border-radius: 999px;\\n    transition:\\n      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\\n      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md);\\n    will-change: background-color, border-color;\\n  }\\n\\n  span:before {\\n    position: absolute;\\n    content: '';\\n    height: 16px;\\n    width: 16px;\\n    left: 3px;\\n    top: 2px;\\n    background-color: var(--wui-color-inverse-100);\\n    transition: transform var(--wui-ease-inout-power-1) var(--wui-duration-lg);\\n    will-change: transform;\\n    border-radius: 50%;\\n  }\\n\\n  input:checked + span {\\n    border-color: var(--wui-color-gray-glass-005);\\n    background-color: var(--wui-color-blue-100);\\n  }\\n\\n  input:not(:checked) + span {\\n    background-color: var(--wui-color-gray-glass-010);\\n  }\\n\\n  input:checked + span:before {\\n    transform: translateX(calc(100% - 7px));\\n  }\\n`});var ait,UV,cit=x(()=>{u();Q();Ke();bn();LV();Er();fr();oit();ait=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},UV=class extends se{constructor(){super(...arguments),this.inputElementRef=E8(),this.checked=void 0}render(){return $`\\n      <label>\\n        <input\\n          ${_8(this.inputElementRef)}\\n          type=\\\"checkbox\\\"\\n          ?checked=${Re(this.checked)}\\n          @change=${this.dispatchChangeEvent.bind(this)}\\n        />\\n        <span></span>\\n      </label>\\n    `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent(\\\"switchChange\\\",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};UV.styles=[ze,dr,Th,sit];ait([G({type:Boolean})],UV.prototype,\\\"checked\\\",void 0);UV=ait([te(\\\"wui-switch\\\")],UV)});var lit,uit=x(()=>{u();Q();lit=we`\\n  :host {\\n    height: 100%;\\n  }\\n\\n  button {\\n    display: flex;\\n    align-items: center;\\n    justify-content: center;\\n    column-gap: var(--wui-spacing-1xs);\\n    padding: var(--wui-spacing-xs) var(--wui-spacing-s);\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: var(--wui-border-radius-xs);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);\\n    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: background-color;\\n    cursor: pointer;\\n  }\\n\\n  wui-switch {\\n    pointer-events: none;\\n  }\\n`});var dit,FV,fit=x(()=>{u();Q();Ke();bn();aa();Er();fr();cit();uit();dit=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},FV=class extends se{constructor(){super(...arguments),this.checked=void 0}render(){return $`\\n      <button>\\n        <wui-icon size=\\\"xl\\\" name=\\\"walletConnectBrown\\\"></wui-icon>\\n        <wui-switch ?checked=${Re(this.checked)}></wui-switch>\\n      </button>\\n    `}};FV.styles=[ze,dr,lit];dit([G({type:Boolean})],FV.prototype,\\\"checked\\\",void 0);FV=dit([te(\\\"wui-certified-switch\\\")],FV)});var pit=x(()=>{u();fit()});var hit,mit=x(()=>{u();Q();hit=we`\\n  button {\\n    background-color: var(--wui-color-fg-300);\\n    border-radius: var(--wui-border-radius-4xs);\\n    width: 16px;\\n    height: 16px;\\n  }\\n\\n  button:disabled {\\n    background-color: var(--wui-color-bg-300);\\n  }\\n\\n  wui-icon {\\n    color: var(--wui-color-bg-200) !important;\\n  }\\n\\n  button:focus-visible {\\n    background-color: var(--wui-color-fg-250);\\n    border: 1px solid var(--wui-color-accent-100);\\n  }\\n\\n  @media (hover: hover) and (pointer: fine) {\\n    button:hover:enabled {\\n      background-color: var(--wui-color-fg-250);\\n    }\\n\\n    button:active:enabled {\\n      background-color: var(--wui-color-fg-225);\\n    }\\n  }\\n`});var git,jV,yit=x(()=>{u();Q();Ke();aa();Er();fr();mit();git=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jV=class extends se{constructor(){super(...arguments),this.icon=\\\"copy\\\"}render(){return $`\\n      <button>\\n        <wui-icon color=\\\"inherit\\\" size=\\\"xxs\\\" name=${this.icon}></wui-icon>\\n      </button>\\n    `}};jV.styles=[ze,dr,hit];git([G()],jV.prototype,\\\"icon\\\",void 0);jV=git([te(\\\"wui-input-element\\\")],jV)});var bit,wit=x(()=>{u();Q();bit=we`\\n  :host {\\n    position: relative;\\n    width: 100%;\\n    display: inline-block;\\n    color: var(--wui-color-fg-275);\\n  }\\n\\n  input {\\n    width: 100%;\\n    border-radius: var(--wui-border-radius-xs);\\n    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);\\n    background: var(--wui-color-gray-glass-002);\\n    font-size: var(--wui-font-size-paragraph);\\n    letter-spacing: var(--wui-letter-spacing-paragraph);\\n    color: var(--wui-color-fg-100);\\n    transition:\\n      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\\n      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),\\n      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);\\n    will-change: background-color, border-color, box-shadow;\\n    caret-color: var(--wui-color-accent-100);\\n  }\\n\\n  input:disabled {\\n    cursor: not-allowed;\\n    border: 1px solid var(--wui-color-gray-glass-010);\\n  }\\n\\n  input:disabled::placeholder,\\n  input:disabled + wui-icon {\\n    color: var(--wui-color-fg-300);\\n  }\\n\\n  input::placeholder {\\n    color: var(--wui-color-fg-275);\\n  }\\n\\n  input:focus:enabled {\\n    background-color: var(--wui-color-gray-glass-005);\\n    -webkit-box-shadow:\\n      inset 0 0 0 1px var(--wui-color-accent-100),\\n      0px 0px 0px 4px var(--wui-box-shadow-blue);\\n    -moz-box-shadow:\\n      inset 0 0 0 1px var(--wui-color-accent-100),\\n      0px 0px 0px 4px var(--wui-box-shadow-blue);\\n    box-shadow:\\n      inset 0 0 0 1px var(--wui-color-accent-100),\\n      0px 0px 0px 4px var(--wui-box-shadow-blue);\\n  }\\n\\n  input:hover:enabled {\\n    background-color: var(--wui-color-gray-glass-005);\\n  }\\n\\n  wui-icon {\\n    position: absolute;\\n    top: 50%;\\n    transform: translateY(-50%);\\n    pointer-events: none;\\n  }\\n\\n  .wui-size-sm {\\n    padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);\\n  }\\n\\n  wui-icon + .wui-size-sm {\\n    padding: 9px var(--wui-spacing-m) 10px 36px;\\n  }\\n\\n  wui-icon[data-input='sm'] {\\n    left: var(--wui-spacing-s);\\n  }\\n\\n  .wui-size-md {\\n    padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);\\n  }\\n\\n  wui-icon + .wui-size-md,\\n  wui-loading-spinner + .wui-size-md {\\n    padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);\\n  }\\n\\n  wui-icon[data-input='md'] {\\n    left: var(--wui-spacing-l);\\n  }\\n\\n  .wui-size-lg {\\n    padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);\\n    letter-spacing: var(--wui-letter-spacing-medium-title);\\n    font-size: var(--wui-font-size-medium-title);\\n    font-weight: var(--wui-font-weight-light);\\n    line-height: 130%;\\n    color: var(--wui-color-fg-100);\\n    height: 64px;\\n  }\\n\\n  .wui-padding-right-xs {\\n    padding-right: var(--wui-spacing-xs);\\n  }\\n\\n  .wui-padding-right-s {\\n    padding-right: var(--wui-spacing-s);\\n  }\\n\\n  .wui-padding-right-m {\\n    padding-right: var(--wui-spacing-m);\\n  }\\n\\n  .wui-padding-right-l {\\n    padding-right: var(--wui-spacing-l);\\n  }\\n\\n  .wui-padding-right-xl {\\n    padding-right: var(--wui-spacing-xl);\\n  }\\n\\n  .wui-padding-right-2xl {\\n    padding-right: var(--wui-spacing-2xl);\\n  }\\n\\n  .wui-padding-right-3xl {\\n    padding-right: var(--wui-spacing-3xl);\\n  }\\n\\n  .wui-padding-right-4xl {\\n    padding-right: var(--wui-spacing-4xl);\\n  }\\n\\n  .wui-padding-right-5xl {\\n    padding-right: var(--wui-spacing-5xl);\\n  }\\n\\n  wui-icon + .wui-size-lg,\\n  wui-loading-spinner + .wui-size-lg {\\n    padding-left: 50px;\\n  }\\n\\n  wui-icon[data-input='lg'] {\\n    left: var(--wui-spacing-l);\\n  }\\n\\n  .wui-size-mdl {\\n    padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);\\n  }\\n  wui-icon + .wui-size-mdl,\\n  wui-loading-spinner + .wui-size-mdl {\\n    padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;\\n  }\\n  wui-icon[data-input='mdl'] {\\n    left: var(--wui-spacing-m);\\n  }\\n\\n  input:placeholder-shown ~ ::slotted(wui-input-element),\\n  input:placeholder-shown ~ ::slotted(wui-icon) {\\n    opacity: 0;\\n    pointer-events: none;\\n  }\\n\\n  input::-webkit-outer-spin-button,\\n  input::-webkit-inner-spin-button {\\n    -webkit-appearance: none;\\n    margin: 0;\\n  }\\n\\n  input[type='number'] {\\n    -moz-appearance: textfield;\\n  }\\n\\n  ::slotted(wui-input-element),\\n  ::slotted(wui-icon) {\\n    position: absolute;\\n    top: 50%;\\n    transform: translateY(-50%);\\n  }\\n\\n  ::slotted(wui-input-element) {\\n    right: var(--wui-spacing-m);\\n  }\\n\\n  ::slotted(wui-icon) {\\n    right: 0px;\\n  }\\n`});var Oh,Cd,vit=x(()=>{u();Q();Ke();jpe();bn();LV();aa();Er();fr();wit();Oh=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Cd=class extends se{constructor(){super(...arguments),this.inputElementRef=E8(),this.size=\\\"md\\\",this.disabled=!1,this.placeholder=\\\"\\\",this.type=\\\"text\\\",this.value=\\\"\\\"}render(){let e=`wui-padding-right-${this.inputRightPadding}`,n={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return $`${this.templateIcon()}\\n      <input\\n        data-testid=\\\"wui-input-text\\\"\\n        ${_8(this.inputElementRef)}\\n        class=${iV(n)}\\n        type=${this.type}\\n        enterkeyhint=${Re(this.enterKeyHint)}\\n        ?disabled=${this.disabled}\\n        placeholder=${this.placeholder}\\n        @input=${this.dispatchInputChangeEvent.bind(this)}\\n        .value=${this.value||\\\"\\\"}\\n        tabindex=${Re(this.tabIdx)}\\n      />\\n      <slot></slot>`}templateIcon(){return this.icon?$`<wui-icon\\n        data-input=${this.size}\\n        size=${this.size}\\n        color=\\\"inherit\\\"\\n        name=${this.icon}\\n      ></wui-icon>`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent(\\\"inputChange\\\",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};Cd.styles=[ze,dr,bit];Oh([G()],Cd.prototype,\\\"size\\\",void 0);Oh([G()],Cd.prototype,\\\"icon\\\",void 0);Oh([G({type:Boolean})],Cd.prototype,\\\"disabled\\\",void 0);Oh([G()],Cd.prototype,\\\"placeholder\\\",void 0);Oh([G()],Cd.prototype,\\\"type\\\",void 0);Oh([G()],Cd.prototype,\\\"keyHint\\\",void 0);Oh([G()],Cd.prototype,\\\"value\\\",void 0);Oh([G()],Cd.prototype,\\\"inputRightPadding\\\",void 0);Oh([G()],Cd.prototype,\\\"tabIdx\\\",void 0);Cd=Oh([te(\\\"wui-input-text\\\")],Cd)});var xit,Eit=x(()=>{u();Q();xit=we`\\n  :host {\\n    position: relative;\\n    display: inline-block;\\n    width: 100%;\\n  }\\n`});var cZt,Rhe,_it=x(()=>{u();Q();LV();yit();Er();fr();vit();Eit();cZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Rhe=class extends se{constructor(){super(...arguments),this.inputComponentRef=E8()}render(){return $`\\n      <wui-input-text\\n        ${_8(this.inputComponentRef)}\\n        placeholder=\\\"Search wallet\\\"\\n        icon=\\\"search\\\"\\n        type=\\\"search\\\"\\n        enterKeyHint=\\\"search\\\"\\n        size=\\\"sm\\\"\\n      >\\n        <wui-input-element @click=${this.clearValue} icon=\\\"close\\\"></wui-input-element>\\n      </wui-input-text>\\n    `}clearValue(){let r=this.inputComponentRef.value?.inputElementRef.value;r&&(r.value=\\\"\\\",r.focus(),r.dispatchEvent(new Event(\\\"input\\\")))}};Rhe.styles=[ze,xit];Rhe=cZt([te(\\\"wui-search-bar\\\")],Rhe)});var Cit=x(()=>{u();_it()});var Sit,Ait=x(()=>{u();Q();Sit=Y`<svg  viewBox=\\\"0 0 48 54\\\" fill=\\\"none\\\">\\n  <path\\n    d=\\\"M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z\\\"\\n  />\\n</svg>`});var Tit,Iit=x(()=>{u();Q();Tit=we`\\n  :host {\\n    display: flex;\\n    flex-direction: column;\\n    align-items: center;\\n    width: 104px;\\n    row-gap: var(--wui-spacing-xs);\\n    padding: var(--wui-spacing-xs) 10px;\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\\n    position: relative;\\n  }\\n\\n  wui-shimmer[data-type='network'] {\\n    border: none;\\n    -webkit-clip-path: var(--wui-path-network);\\n    clip-path: var(--wui-path-network);\\n  }\\n\\n  svg {\\n    position: absolute;\\n    width: 48px;\\n    height: 54px;\\n    z-index: 1;\\n  }\\n\\n  svg > path {\\n    stroke: var(--wui-color-gray-glass-010);\\n    stroke-width: 1px;\\n  }\\n\\n  @media (max-width: 350px) {\\n    :host {\\n      width: 100%;\\n    }\\n  }\\n`});var Rit,HV,Pit=x(()=>{u();Q();Ke();Ait();Ehe();Er();fr();Iit();Rit=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},HV=class extends se{constructor(){super(...arguments),this.type=\\\"wallet\\\"}render(){return $`\\n      ${this.shimmerTemplate()}\\n      <wui-shimmer width=\\\"56px\\\" height=\\\"20px\\\" borderRadius=\\\"xs\\\"></wui-shimmer>\\n    `}shimmerTemplate(){return this.type===\\\"network\\\"?$` <wui-shimmer\\n          data-type=${this.type}\\n          width=\\\"48px\\\"\\n          height=\\\"54px\\\"\\n          borderRadius=\\\"xs\\\"\\n        ></wui-shimmer>\\n        ${Sit}`:$`<wui-shimmer width=\\\"56px\\\" height=\\\"56px\\\" borderRadius=\\\"xs\\\"></wui-shimmer>`}};HV.styles=[ze,dr,Tit];Rit([G()],HV.prototype,\\\"type\\\",void 0);HV=Rit([te(\\\"wui-card-select-loader\\\")],HV)});var Oit=x(()=>{u();Pit()});var Nit,kit=x(()=>{u();Q();Nit=we`\\n  :host {\\n    display: grid;\\n    width: inherit;\\n    height: inherit;\\n  }\\n`});var Sd,sl,Bit=x(()=>{u();Q();Ke();Er();fR();fr();kit();Sd=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},sl=class extends se{render(){return this.style.cssText=`\\n      grid-template-rows: ${this.gridTemplateRows};\\n      grid-template-columns: ${this.gridTemplateColumns};\\n      justify-items: ${this.justifyItems};\\n      align-items: ${this.alignItems};\\n      justify-content: ${this.justifyContent};\\n      align-content: ${this.alignContent};\\n      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};\\n      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};\\n      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};\\n      padding-top: ${this.padding&&Pi.getSpacingStyles(this.padding,0)};\\n      padding-right: ${this.padding&&Pi.getSpacingStyles(this.padding,1)};\\n      padding-bottom: ${this.padding&&Pi.getSpacingStyles(this.padding,2)};\\n      padding-left: ${this.padding&&Pi.getSpacingStyles(this.padding,3)};\\n      margin-top: ${this.margin&&Pi.getSpacingStyles(this.margin,0)};\\n      margin-right: ${this.margin&&Pi.getSpacingStyles(this.margin,1)};\\n      margin-bottom: ${this.margin&&Pi.getSpacingStyles(this.margin,2)};\\n      margin-left: ${this.margin&&Pi.getSpacingStyles(this.margin,3)};\\n    `,$`<slot></slot>`}};sl.styles=[ze,Nit];Sd([G()],sl.prototype,\\\"gridTemplateRows\\\",void 0);Sd([G()],sl.prototype,\\\"gridTemplateColumns\\\",void 0);Sd([G()],sl.prototype,\\\"justifyItems\\\",void 0);Sd([G()],sl.prototype,\\\"alignItems\\\",void 0);Sd([G()],sl.prototype,\\\"justifyContent\\\",void 0);Sd([G()],sl.prototype,\\\"alignContent\\\",void 0);Sd([G()],sl.prototype,\\\"columnGap\\\",void 0);Sd([G()],sl.prototype,\\\"rowGap\\\",void 0);Sd([G()],sl.prototype,\\\"gap\\\",void 0);Sd([G()],sl.prototype,\\\"padding\\\",void 0);Sd([G()],sl.prototype,\\\"margin\\\",void 0);sl=Sd([te(\\\"wui-grid\\\")],sl)});var Phe=x(()=>{u();Bit()});var Mit,Dit=x(()=>{u();Q();Mit=we`\\n  button {\\n    display: flex;\\n    flex-direction: column;\\n    justify-content: center;\\n    align-items: center;\\n    cursor: pointer;\\n    width: 104px;\\n    row-gap: var(--wui-spacing-xs);\\n    padding: var(--wui-spacing-s) var(--wui-spacing-0);\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);\\n    transition:\\n      color var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1);\\n    will-change: background-color, color, border-radius;\\n    outline: none;\\n    border: none;\\n  }\\n\\n  button > wui-flex > wui-text {\\n    color: var(--wui-color-fg-100);\\n    max-width: 86px;\\n    white-space: nowrap;\\n    overflow: hidden;\\n    text-overflow: ellipsis;\\n    justify-content: center;\\n  }\\n\\n  button > wui-flex > wui-text.certified {\\n    max-width: 66px;\\n  }\\n\\n  button:hover:enabled {\\n    background-color: var(--wui-color-gray-glass-005);\\n  }\\n\\n  button:disabled > wui-flex > wui-text {\\n    color: var(--wui-color-gray-glass-015);\\n  }\\n\\n  [data-selected='true'] {\\n    background-color: var(--wui-color-accent-glass-020);\\n  }\\n\\n  @media (hover: hover) and (pointer: fine) {\\n    [data-selected='true']:hover:enabled {\\n      background-color: var(--wui-color-accent-glass-015);\\n    }\\n  }\\n\\n  [data-selected='true']:active:enabled {\\n    background-color: var(--wui-color-accent-glass-010);\\n  }\\n\\n  @media (max-width: 350px) {\\n    button {\\n      width: 100%;\\n    }\\n  }\\n`});var MR,Rx,Ohe=x(()=>{u();Q();Ke();bn();xt();pr();is();CR();_he();z0();xV();Dit();MR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Rx=class extends se{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(r=>{r.isIntersecting?(this.visible=!0,this.fetchImageSrc()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type===\\\"certified\\\";return $`\\n      <button>\\n        ${this.imageTemplate()}\\n        <wui-flex flexDirection=\\\"row\\\" alignItems=\\\"center\\\" justifyContent=\\\"center\\\" gap=\\\"3xs\\\">\\n          <wui-text\\n            variant=\\\"tiny-500\\\"\\n            color=\\\"inherit\\\"\\n            class=${Re(e?\\\"certified\\\":void 0)}\\n            >${this.wallet?.name}</wui-text\\n          >\\n          ${e?$`<wui-icon size=\\\"sm\\\" name=\\\"walletConnectBrown\\\"></wui-icon>`:null}\\n        </wui-flex>\\n      </button>\\n    `}imageTemplate(){return!this.visible&&!this.imageSrc||this.imageLoading?this.shimmerTemplate():$`\\n      <wui-wallet-image\\n        size=\\\"md\\\"\\n        imageSrc=${Re(this.imageSrc)}\\n        name=${this.wallet?.name}\\n        .installed=${this.wallet?.installed}\\n        badgeSize=\\\"sm\\\"\\n      >\\n      </wui-wallet-image>\\n    `}shimmerTemplate(){return $`<wui-shimmer width=\\\"56px\\\" height=\\\"56px\\\" borderRadius=\\\"xs\\\"></wui-shimmer>`}async fetchImageSrc(){this.wallet&&(this.imageSrc=sr.getWalletImage(this.wallet),!this.imageSrc&&(this.imageLoading=!0,this.imageSrc=await sr.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}};Rx.styles=Mit;MR([xe()],Rx.prototype,\\\"visible\\\",void 0);MR([xe()],Rx.prototype,\\\"imageSrc\\\",void 0);MR([xe()],Rx.prototype,\\\"imageLoading\\\",void 0);MR([G()],Rx.prototype,\\\"wallet\\\",void 0);Rx=MR([te(\\\"w3m-all-wallets-list-item\\\")],Rx)});var Lit,Uit=x(()=>{u();Q();Lit=we`\\n  wui-grid {\\n    max-height: clamp(360px, 400px, 80vh);\\n    overflow: scroll;\\n    scrollbar-width: none;\\n    grid-auto-rows: min-content;\\n    grid-template-columns: repeat(auto-fill, 104px);\\n  }\\n\\n  @media (max-width: 350px) {\\n    wui-grid {\\n      grid-template-columns: repeat(2, 1fr);\\n    }\\n  }\\n\\n  wui-grid[data-scroll='false'] {\\n    overflow: hidden;\\n  }\\n\\n  wui-grid::-webkit-scrollbar {\\n    display: none;\\n  }\\n\\n  wui-loading-spinner {\\n    padding-top: var(--wui-spacing-l);\\n    padding-bottom: var(--wui-spacing-l);\\n    justify-content: center;\\n    grid-column: 1 / span 4;\\n  }\\n`});var C8,Fit,ab,jit=x(()=>{u();Q();Ke();bn();xt();pr();Oit();Phe();cx();Ohe();Uit();C8=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Fit=\\\"local-paginator\\\",ab=class extends se{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!ye.state.wallets.length,this.wallets=ye.state.wallets,this.recommended=ye.state.recommended,this.featured=ye.state.featured,this.filteredWallets=ye.state.filteredWallets,this.unsubscribe.push(ye.subscribeKey(\\\"wallets\\\",e=>this.wallets=e),ye.subscribeKey(\\\"recommended\\\",e=>this.recommended=e),ye.subscribeKey(\\\"featured\\\",e=>this.featured=e),ye.subscribeKey(\\\"filteredWallets\\\",e=>this.filteredWallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return $`\\n      <wui-grid\\n        data-scroll=${!this.loading}\\n        .padding=${[\\\"0\\\",\\\"s\\\",\\\"s\\\",\\\"s\\\"]}\\n        columnGap=\\\"xxs\\\"\\n        rowGap=\\\"l\\\"\\n        justifyContent=\\\"space-between\\\"\\n      >\\n        ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()}\\n        ${this.paginationLoaderTemplate()}\\n      </wui-grid>\\n    `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector(\\\"wui-grid\\\");e&&(await ye.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}))}shimmerTemplate(e,r){return[...Array(e)].map(()=>$`\\n        <wui-card-select-loader type=\\\"wallet\\\" id=${Re(r)}></wui-card-select-loader>\\n      `)}walletsTemplate(){let e=this.filteredWallets?.length>0?oe.uniqueBy([...this.featured,...this.recommended,...this.filteredWallets],\\\"id\\\"):oe.uniqueBy([...this.featured,...this.recommended,...this.wallets],\\\"id\\\");return Xl.markWalletsAsInstalled(e).map(n=>$`\\n        <w3m-all-wallets-list-item\\n          @click=${()=>this.onConnectWallet(n)}\\n          .wallet=${n}\\n        ></w3m-all-wallets-list-item>\\n      `)}paginationLoaderTemplate(){let{wallets:e,recommended:r,featured:n,count:i}=ye.state,s=window.innerWidth<352?3:4,o=e.length+r.length,c=Math.ceil(o/s)*s-o+s;return c-=e.length?n.length%s:0,i===0&&n.length>0?null:i===0||[...n,...e,...r].length<i?this.shimmerTemplate(c,Fit):null}createPaginationObserver(){let e=this.shadowRoot?.querySelector(`#${Fit}`);e&&(this.paginationObserver=new IntersectionObserver(([r])=>{if(r?.isIntersecting&&!this.loading){let{page:n,count:i,wallets:s}=ye.state;s.length<i&&ye.fetchWalletsByPage({page:n+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){ie.selectWalletConnector(e)}};ab.styles=Lit;C8([xe()],ab.prototype,\\\"loading\\\",void 0);C8([xe()],ab.prototype,\\\"wallets\\\",void 0);C8([xe()],ab.prototype,\\\"recommended\\\",void 0);C8([xe()],ab.prototype,\\\"featured\\\",void 0);C8([xe()],ab.prototype,\\\"filteredWallets\\\",void 0);ab=C8([te(\\\"w3m-all-wallets-list\\\")],ab)});var Hit=x(()=>{u();_R()});var qit,zit=x(()=>{u();Q();qit=we`\\n  wui-grid,\\n  wui-loading-spinner,\\n  wui-flex {\\n    height: 360px;\\n  }\\n\\n  wui-grid {\\n    overflow: scroll;\\n    scrollbar-width: none;\\n    grid-auto-rows: min-content;\\n    grid-template-columns: repeat(auto-fill, 104px);\\n  }\\n\\n  wui-grid[data-scroll='false'] {\\n    overflow: hidden;\\n  }\\n\\n  wui-grid::-webkit-scrollbar {\\n    display: none;\\n  }\\n\\n  wui-loading-spinner {\\n    justify-content: center;\\n    align-items: center;\\n  }\\n\\n  @media (max-width: 350px) {\\n    wui-grid {\\n      grid-template-columns: repeat(2, 1fr);\\n    }\\n  }\\n`});var qV,S8,$it=x(()=>{u();Q();Ke();xt();pr();is();Phe();bV();Hit();z0();cx();Ohe();zit();qV=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},S8=class extends se{constructor(){super(...arguments),this.prevQuery=\\\"\\\",this.prevBadge=void 0,this.loading=!0,this.query=\\\"\\\"}render(){return this.onSearch(),this.loading?$`<wui-loading-spinner color=\\\"accent-100\\\"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await ye.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=ye.state,r=Xl.markWalletsAsInstalled(e);return e.length?$`\\n      <wui-grid\\n        data-testid=\\\"wallet-list\\\"\\n        .padding=${[\\\"0\\\",\\\"s\\\",\\\"s\\\",\\\"s\\\"]}\\n        rowGap=\\\"l\\\"\\n        columnGap=\\\"xs\\\"\\n        justifyContent=\\\"space-between\\\"\\n      >\\n        ${r.map(n=>$`\\n            <w3m-all-wallets-list-item\\n              @click=${()=>this.onConnectWallet(n)}\\n              .wallet=${n}\\n              data-testid=\\\"wallet-search-item-${n.id}\\\"\\n            ></w3m-all-wallets-list-item>\\n          `)}\\n      </wui-grid>\\n    `:$`\\n        <wui-flex\\n          data-testid=\\\"no-wallet-found\\\"\\n          justifyContent=\\\"center\\\"\\n          alignItems=\\\"center\\\"\\n          gap=\\\"s\\\"\\n          flexDirection=\\\"column\\\"\\n        >\\n          <wui-icon-box\\n            size=\\\"lg\\\"\\n            iconColor=\\\"fg-200\\\"\\n            backgroundColor=\\\"fg-300\\\"\\n            icon=\\\"wallet\\\"\\n            background=\\\"transparent\\\"\\n          ></wui-icon-box>\\n          <wui-text data-testid=\\\"no-wallet-found-text\\\" color=\\\"fg-200\\\" variant=\\\"paragraph-500\\\">\\n            No Wallet found\\n          </wui-text>\\n        </wui-flex>\\n      `}onConnectWallet(e){ie.selectWalletConnector(e)}};S8.styles=qit;qV([xe()],S8.prototype,\\\"loading\\\",void 0);qV([G()],S8.prototype,\\\"query\\\",void 0);qV([G()],S8.prototype,\\\"badge\\\",void 0);S8=qV([te(\\\"w3m-all-wallets-search\\\")],S8)});var Nhe,DR,Vit=x(()=>{u();Q();Ke();bn();xt();pr();pit();is();bV();Cit();jit();$it();Nhe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},DR=class extends se{constructor(){super(...arguments),this.search=\\\"\\\",this.onDebouncedSearch=oe.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return $`\\n      <wui-flex .padding=${[\\\"0\\\",\\\"s\\\",\\\"s\\\",\\\"s\\\"]} gap=\\\"xs\\\">\\n        <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>\\n        <wui-certified-switch\\n          ?checked=${this.badge}\\n          @click=${this.onClick.bind(this)}\\n          data-testid=\\\"wui-certified-switch\\\"\\n        ></wui-certified-switch>\\n        ${this.qrButtonTemplate()}\\n      </wui-flex>\\n      ${e||this.badge?$`<w3m-all-wallets-search\\n            query=${this.search}\\n            badge=${Re(this.badge)}\\n          ></w3m-all-wallets-search>`:$`<w3m-all-wallets-list badge=${Re(this.badge)}></w3m-all-wallets-list>`}\\n    `}onInputChange(e){this.onDebouncedSearch(e.detail)}onClick(){if(this.badge===\\\"certified\\\"){this.badge=void 0;return}this.badge=\\\"certified\\\",wr.showSvg(\\\"Only WalletConnect certified\\\",{icon:\\\"walletConnectBrown\\\",iconColor:\\\"accent-100\\\"})}qrButtonTemplate(){return oe.isMobile()?$`\\n        <wui-icon-box\\n          size=\\\"lg\\\"\\n          iconSize=\\\"xl\\\"\\n          iconColor=\\\"accent-100\\\"\\n          backgroundColor=\\\"accent-100\\\"\\n          icon=\\\"qrCode\\\"\\n          background=\\\"transparent\\\"\\n          border\\n          borderColor=\\\"wui-accent-glass-010\\\"\\n          @click=${this.onWalletConnectQr.bind(this)}\\n        ></wui-icon-box>\\n      `:null}onWalletConnectQr(){de.push(\\\"ConnectingWalletConnect\\\")}};Nhe([xe()],DR.prototype,\\\"search\\\",void 0);Nhe([xe()],DR.prototype,\\\"badge\\\",void 0);DR=Nhe([te(\\\"w3m-all-wallets-view\\\")],DR)});var Wit,Git=x(()=>{u();Q();Wit=we`\\n  button {\\n    column-gap: var(--wui-spacing-s);\\n    padding: 11px 18px 11px var(--wui-spacing-s);\\n    width: 100%;\\n    background-color: var(--wui-color-gray-glass-002);\\n    border-radius: var(--wui-border-radius-xs);\\n    color: var(--wui-color-fg-250);\\n    transition:\\n      color var(--wui-ease-out-power-1) var(--wui-duration-md),\\n      background-color var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: color, background-color;\\n  }\\n\\n  button[data-iconvariant='square'],\\n  button[data-iconvariant='square-blue'] {\\n    padding: 6px 18px 6px 9px;\\n  }\\n\\n  button > wui-flex {\\n    flex: 1;\\n  }\\n\\n  button > wui-image {\\n    width: 32px;\\n    height: 32px;\\n    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);\\n    border-radius: var(--wui-border-radius-3xl);\\n  }\\n\\n  button > wui-icon {\\n    width: 36px;\\n    height: 36px;\\n    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    will-change: opacity;\\n  }\\n\\n  button > wui-icon-box[data-variant='blue'] {\\n    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);\\n  }\\n\\n  button > wui-icon-box[data-variant='overlay'] {\\n    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);\\n  }\\n\\n  button > wui-icon-box[data-variant='square-blue'] {\\n    border-radius: var(--wui-border-radius-3xs);\\n    position: relative;\\n    border: none;\\n    width: 36px;\\n    height: 36px;\\n  }\\n\\n  button > wui-icon-box[data-variant='square-blue']::after {\\n    content: '';\\n    position: absolute;\\n    top: 0;\\n    bottom: 0;\\n    left: 0;\\n    right: 0;\\n    border-radius: inherit;\\n    border: 1px solid var(--wui-color-accent-glass-010);\\n    pointer-events: none;\\n  }\\n\\n  button > wui-icon:last-child {\\n    width: 14px;\\n    height: 14px;\\n  }\\n\\n  button:disabled {\\n    color: var(--wui-color-gray-glass-020);\\n  }\\n\\n  button[data-loading='true'] > wui-icon {\\n    opacity: 0;\\n  }\\n\\n  wui-loading-spinner {\\n    position: absolute;\\n    right: 18px;\\n    top: 50%;\\n    transform: translateY(-50%);\\n  }\\n`});var Uf,ru,Kit=x(()=>{u();Q();Ke();bn();aa();u8();_R();tu();eb();Er();fr();tb();Git();Uf=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},ru=class extends se{constructor(){super(...arguments),this.tabIdx=void 0,this.variant=\\\"icon\\\",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return $`\\n      <button\\n        ?disabled=${this.loading?!0:!!this.disabled}\\n        data-loading=${this.loading}\\n        data-iconvariant=${Re(this.iconVariant)}\\n        tabindex=${Re(this.tabIdx)}\\n      >\\n        ${this.loadingTemplate()} ${this.visualTemplate()}\\n        <wui-flex gap=\\\"3xs\\\">\\n          <slot></slot>\\n        </wui-flex>\\n        ${this.chevronTemplate()}\\n      </button>\\n    `}visualTemplate(){if(this.variant===\\\"image\\\"&&this.imageSrc)return $`<wui-image src=${this.imageSrc} alt=${this.alt??\\\"list item\\\"}></wui-image>`;if(this.iconVariant===\\\"square\\\"&&this.icon&&this.variant===\\\"icon\\\")return $`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant===\\\"icon\\\"&&this.icon&&this.iconVariant){let e=[\\\"blue\\\",\\\"square-blue\\\"].includes(this.iconVariant)?\\\"accent-100\\\":\\\"fg-200\\\",r=this.iconVariant===\\\"square-blue\\\"?\\\"mdl\\\":\\\"md\\\",n=this.iconSize?this.iconSize:r;return $`\\n        <wui-icon-box\\n          data-variant=${this.iconVariant}\\n          icon=${this.icon}\\n          iconSize=${n}\\n          background=\\\"transparent\\\"\\n          iconColor=${e}\\n          backgroundColor=${e}\\n          size=${r}\\n        ></wui-icon-box>\\n      `}return null}loadingTemplate(){return this.loading?$`<wui-loading-spinner\\n        data-testid=\\\"wui-list-item-loading-spinner\\\"\\n        color=\\\"fg-300\\\"\\n      ></wui-loading-spinner>`:$``}chevronTemplate(){return this.chevron?$`<wui-icon size=\\\"inherit\\\" color=\\\"fg-200\\\" name=\\\"chevronRight\\\"></wui-icon>`:null}};ru.styles=[ze,dr,Wit];Uf([G()],ru.prototype,\\\"icon\\\",void 0);Uf([G()],ru.prototype,\\\"iconSize\\\",void 0);Uf([G()],ru.prototype,\\\"tabIdx\\\",void 0);Uf([G()],ru.prototype,\\\"variant\\\",void 0);Uf([G()],ru.prototype,\\\"iconVariant\\\",void 0);Uf([G({type:Boolean})],ru.prototype,\\\"disabled\\\",void 0);Uf([G()],ru.prototype,\\\"imageSrc\\\",void 0);Uf([G()],ru.prototype,\\\"alt\\\",void 0);Uf([G({type:Boolean})],ru.prototype,\\\"chevron\\\",void 0);Uf([G({type:Boolean})],ru.prototype,\\\"loading\\\",void 0);ru=Uf([te(\\\"wui-list-item\\\")],ru)});var Zit=x(()=>{u();Kit()});var lZt,khe,Qit=x(()=>{u();Q();xt();pr();is();Zit();z0();lZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},khe=class extends se{constructor(){super(...arguments),this.wallet=de.state.data?.wallet}render(){if(!this.wallet)throw new Error(\\\"w3m-downloads-view\\\");return $`\\n      <wui-flex gap=\\\"xs\\\" flexDirection=\\\"column\\\" .padding=${[\\\"s\\\",\\\"s\\\",\\\"l\\\",\\\"s\\\"]}>\\n        ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}\\n        ${this.homepageTemplate()}\\n      </wui-flex>\\n    `}chromeTemplate(){return this.wallet?.chrome_store?$`<wui-list-item\\n      variant=\\\"icon\\\"\\n      icon=\\\"chromeStore\\\"\\n      iconVariant=\\\"square\\\"\\n      @click=${this.onChromeStore.bind(this)}\\n      chevron\\n    >\\n      <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">Chrome Extension</wui-text>\\n    </wui-list-item>`:null}iosTemplate(){return this.wallet?.app_store?$`<wui-list-item\\n      variant=\\\"icon\\\"\\n      icon=\\\"appStore\\\"\\n      iconVariant=\\\"square\\\"\\n      @click=${this.onAppStore.bind(this)}\\n      chevron\\n    >\\n      <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">iOS App</wui-text>\\n    </wui-list-item>`:null}androidTemplate(){return this.wallet?.play_store?$`<wui-list-item\\n      variant=\\\"icon\\\"\\n      icon=\\\"playStore\\\"\\n      iconVariant=\\\"square\\\"\\n      @click=${this.onPlayStore.bind(this)}\\n      chevron\\n    >\\n      <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">Android App</wui-text>\\n    </wui-list-item>`:null}homepageTemplate(){return this.wallet?.homepage?$`\\n      <wui-list-item\\n        variant=\\\"icon\\\"\\n        icon=\\\"browser\\\"\\n        iconVariant=\\\"square-blue\\\"\\n        @click=${this.onHomePage.bind(this)}\\n        chevron\\n      >\\n        <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\">Website</wui-text>\\n      </wui-list-item>\\n    `:null}onChromeStore(){this.wallet?.chrome_store&&oe.openHref(this.wallet.chrome_store,\\\"_blank\\\")}onAppStore(){this.wallet?.app_store&&oe.openHref(this.wallet.app_store,\\\"_blank\\\")}onPlayStore(){this.wallet?.play_store&&oe.openHref(this.wallet.play_store,\\\"_blank\\\")}onHomePage(){this.wallet?.homepage&&oe.openHref(this.wallet.homepage,\\\"_blank\\\")}};khe=lZt([te(\\\"w3m-downloads-view\\\")],khe)});var Jit={};ue(Jit,{W3mAllWalletsView:()=>DR,W3mConnectingWcBasicView:()=>DV,W3mDownloadsView:()=>khe});var Yit=x(()=>{u();nit();Vit();Qit()});var Xit,est=x(()=>{u();Q();Xit=we`\\n  :host {\\n    display: block;\\n    border-radius: clamp(0px, var(--wui-border-radius-l), 44px);\\n    box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);\\n    background-color: var(--wui-color-modal-bg);\\n    overflow: hidden;\\n  }\\n\\n  :host([data-embedded='true']) {\\n    box-shadow:\\n      0 0 0 1px var(--wui-color-gray-glass-005),\\n      0px 4px 12px 4px var(--w3m-card-embedded-shadow-color);\\n  }\\n`});var uZt,Bhe,tst=x(()=>{u();Q();Er();fr();est();uZt=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Bhe=class extends se{render(){return $`<slot></slot>`}};Bhe.styles=[ze,Xit];Bhe=uZt([te(\\\"wui-card\\\")],Bhe)});var rst=x(()=>{u();tst()});var nst,ist=x(()=>{u();Q();nst=we`\\n  :host {\\n    display: flex;\\n    align-items: center;\\n    justify-content: center;\\n    padding: var(--wui-spacing-s);\\n    border-radius: var(--wui-border-radius-s);\\n    border: 1px solid var(--wui-color-dark-glass-100);\\n    box-sizing: border-box;\\n    background-color: var(--wui-color-bg-325);\\n    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25);\\n  }\\n\\n  wui-flex {\\n    width: 100%;\\n  }\\n\\n  wui-text {\\n    word-break: break-word;\\n    flex: 1;\\n  }\\n\\n  .close {\\n    cursor: pointer;\\n  }\\n\\n  .icon-box {\\n    height: 40px;\\n    width: 40px;\\n    border-radius: var(--wui-border-radius-3xs);\\n    background-color: var(--local-icon-bg-value);\\n  }\\n`});var LR,Px,sst=x(()=>{u();Q();Ke();xt();aa();tu();eb();Er();fr();ist();LR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Px=class extends se{constructor(){super(...arguments),this.message=\\\"\\\",this.backgroundColor=\\\"accent-100\\\",this.iconColor=\\\"accent-100\\\",this.icon=\\\"info\\\"}render(){return this.style.cssText=`\\n      --local-icon-bg-value: var(--wui-color-${this.backgroundColor});\\n   `,$`\\n      <wui-flex flexDirection=\\\"row\\\" justifyContent=\\\"space-between\\\" alignItems=\\\"center\\\">\\n        <wui-flex columnGap=\\\"xs\\\" flexDirection=\\\"row\\\" alignItems=\\\"center\\\">\\n          <wui-flex\\n            flexDirection=\\\"row\\\"\\n            alignItems=\\\"center\\\"\\n            justifyContent=\\\"center\\\"\\n            class=\\\"icon-box\\\"\\n          >\\n            <wui-icon color=${this.iconColor} size=\\\"md\\\" name=${this.icon}></wui-icon>\\n          </wui-flex>\\n          <wui-text variant=\\\"small-500\\\" color=\\\"bg-350\\\" data-testid=\\\"wui-alertbar-text\\\"\\n            >${this.message}</wui-text\\n          >\\n        </wui-flex>\\n        <wui-icon\\n          class=\\\"close\\\"\\n          color=\\\"bg-350\\\"\\n          size=\\\"sm\\\"\\n          name=\\\"close\\\"\\n          @click=${this.onClose}\\n        ></wui-icon>\\n      </wui-flex>\\n    `}onClose(){Xo.close()}};Px.styles=[ze,nst];LR([G()],Px.prototype,\\\"message\\\",void 0);LR([G()],Px.prototype,\\\"backgroundColor\\\",void 0);LR([G()],Px.prototype,\\\"iconColor\\\",void 0);LR([G()],Px.prototype,\\\"icon\\\",void 0);Px=LR([te(\\\"wui-alertbar\\\")],Px)});var ost=x(()=>{u();sst()});var ast,cst=x(()=>{u();Q();ast=we`\\n  :host {\\n    display: block;\\n    position: absolute;\\n    top: var(--wui-spacing-s);\\n    left: var(--wui-spacing-l);\\n    right: var(--wui-spacing-l);\\n    opacity: 0;\\n    pointer-events: none;\\n  }\\n`});var lst,dZt,zV,ust=x(()=>{u();Q();Ke();xt();pr();ost();cst();lst=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},dZt={info:{backgroundColor:\\\"fg-350\\\",iconColor:\\\"fg-325\\\",icon:\\\"info\\\"},success:{backgroundColor:\\\"success-glass-reown-020\\\",iconColor:\\\"success-125\\\",icon:\\\"checkmark\\\"},warning:{backgroundColor:\\\"warning-glass-reown-020\\\",iconColor:\\\"warning-100\\\",icon:\\\"warningCircle\\\"},error:{backgroundColor:\\\"error-glass-reown-020\\\",iconColor:\\\"error-125\\\",icon:\\\"exclamationTriangle\\\"}},zV=class extends se{constructor(){super(),this.unsubscribe=[],this.open=Xo.state.open,this.onOpen(!0),this.unsubscribe.push(Xo.subscribeKey(\\\"open\\\",e=>{this.open=e,this.onOpen(!1)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:r}=Xo.state,n=dZt[r];return $`\\n      <wui-alertbar\\n        message=${e}\\n        backgroundColor=${n?.backgroundColor}\\n        iconColor=${n?.iconColor}\\n        icon=${n?.icon}\\n      ></wui-alertbar>\\n    `}onOpen(e){this.open?(this.animate([{opacity:0,transform:\\\"scale(0.85)\\\"},{opacity:1,transform:\\\"scale(1)\\\"}],{duration:150,fill:\\\"forwards\\\",easing:\\\"ease\\\"}),this.style.cssText=\\\"pointer-events: auto\\\"):e||(this.animate([{opacity:1,transform:\\\"scale(1)\\\"},{opacity:0,transform:\\\"scale(0.85)\\\"}],{duration:150,fill:\\\"forwards\\\",easing:\\\"ease\\\"}),this.style.cssText=\\\"pointer-events: none\\\")}};zV.styles=ast;lst([xe()],zV.prototype,\\\"open\\\",void 0);zV=lst([te(\\\"w3m-alertbar\\\")],zV)});var dst,fst=x(()=>{u();Q();dst=we`\\n  button {\\n    border-radius: var(--local-border-radius);\\n    color: var(--wui-color-fg-100);\\n    padding: var(--local-padding);\\n  }\\n\\n  @media (max-width: 700px) {\\n    button {\\n      padding: var(--wui-spacing-s);\\n    }\\n  }\\n\\n  button > wui-icon {\\n    pointer-events: none;\\n  }\\n\\n  button:disabled > wui-icon {\\n    color: var(--wui-color-bg-300) !important;\\n  }\\n\\n  button:disabled {\\n    background-color: transparent;\\n  }\\n`});var UR,Ox,pst=x(()=>{u();Q();Ke();aa();Er();fr();fst();UR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Ox=class extends se{constructor(){super(...arguments),this.size=\\\"md\\\",this.disabled=!1,this.icon=\\\"copy\\\",this.iconColor=\\\"inherit\\\"}render(){let e=this.size===\\\"lg\\\"?\\\"--wui-border-radius-xs\\\":\\\"--wui-border-radius-xxs\\\",r=this.size===\\\"lg\\\"?\\\"--wui-spacing-1xs\\\":\\\"--wui-spacing-2xs\\\";return this.style.cssText=`\\n    --local-border-radius: var(${e});\\n    --local-padding: var(${r});\\n`,$`\\n      <button ?disabled=${this.disabled}>\\n        <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>\\n      </button>\\n    `}};Ox.styles=[ze,dr,Th,dst];UR([G()],Ox.prototype,\\\"size\\\",void 0);UR([G({type:Boolean})],Ox.prototype,\\\"disabled\\\",void 0);UR([G()],Ox.prototype,\\\"icon\\\",void 0);UR([G()],Ox.prototype,\\\"iconColor\\\",void 0);Ox=UR([te(\\\"wui-icon-link\\\")],Ox)});var hst=x(()=>{u();pst()});var mst,gst=x(()=>{u();Q();mst=we`\\n  button {\\n    display: block;\\n    display: flex;\\n    align-items: center;\\n    padding: var(--wui-spacing-xxs);\\n    gap: var(--wui-spacing-xxs);\\n    transition: all var(--wui-ease-out-power-1) var(--wui-duration-md);\\n    border-radius: var(--wui-border-radius-xxs);\\n  }\\n\\n  wui-image {\\n    border-radius: 100%;\\n    width: var(--wui-spacing-xl);\\n    height: var(--wui-spacing-xl);\\n  }\\n\\n  wui-icon-box {\\n    width: var(--wui-spacing-xl);\\n    height: var(--wui-spacing-xl);\\n  }\\n\\n  button:hover {\\n    background-color: var(--wui-color-gray-glass-002);\\n  }\\n\\n  button:active {\\n    background-color: var(--wui-color-gray-glass-005);\\n  }\\n`});var yst,$V,bst=x(()=>{u();Q();Ke();aa();u8();tb();Er();fr();gst();yst=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},$V=class extends se{constructor(){super(...arguments),this.imageSrc=\\\"\\\"}render(){return $`<button>\\n      ${this.imageTemplate()}\\n      <wui-icon size=\\\"xs\\\" color=\\\"fg-200\\\" name=\\\"chevronBottom\\\"></wui-icon>\\n    </button>`}imageTemplate(){return this.imageSrc?$`<wui-image src=${this.imageSrc} alt=\\\"select visual\\\"></wui-image>`:$`<wui-icon-box\\n      size=\\\"xxs\\\"\\n      iconColor=\\\"fg-200\\\"\\n      backgroundColor=\\\"fg-100\\\"\\n      background=\\\"opaque\\\"\\n      icon=\\\"networkPlaceholder\\\"\\n    ></wui-icon-box>`}};$V.styles=[ze,dr,Th,mst];yst([G()],$V.prototype,\\\"imageSrc\\\",void 0);$V=yst([te(\\\"wui-select\\\")],$V)});var wst=x(()=>{u();bst()});var vst=x(()=>{u();zpe()});var xst,Est=x(()=>{u();Q();xst=we`\\n  :host {\\n    height: 64px;\\n  }\\n\\n  wui-text {\\n    text-transform: capitalize;\\n  }\\n\\n  wui-flex.w3m-header-title {\\n    transform: translateY(0);\\n    opacity: 1;\\n  }\\n\\n  wui-flex.w3m-header-title[view-direction='prev'] {\\n    animation:\\n      slide-down-out 120ms forwards var(--wui-ease-out-power-2),\\n      slide-down-in 120ms forwards var(--wui-ease-out-power-2);\\n    animation-delay: 0ms, 200ms;\\n  }\\n\\n  wui-flex.w3m-header-title[view-direction='next'] {\\n    animation:\\n      slide-up-out 120ms forwards var(--wui-ease-out-power-2),\\n      slide-up-in 120ms forwards var(--wui-ease-out-power-2);\\n    animation-delay: 0ms, 200ms;\\n  }\\n\\n  wui-icon-link[data-hidden='true'] {\\n    opacity: 0 !important;\\n    pointer-events: none;\\n  }\\n\\n  @keyframes slide-up-out {\\n    from {\\n      transform: translateY(0px);\\n      opacity: 1;\\n    }\\n    to {\\n      transform: translateY(3px);\\n      opacity: 0;\\n    }\\n  }\\n\\n  @keyframes slide-up-in {\\n    from {\\n      transform: translateY(-3px);\\n      opacity: 0;\\n    }\\n    to {\\n      transform: translateY(0);\\n      opacity: 1;\\n    }\\n  }\\n\\n  @keyframes slide-down-out {\\n    from {\\n      transform: translateY(0px);\\n      opacity: 1;\\n    }\\n    to {\\n      transform: translateY(-3px);\\n      opacity: 0;\\n    }\\n  }\\n\\n  @keyframes slide-down-in {\\n    from {\\n      transform: translateY(3px);\\n      opacity: 0;\\n    }\\n    to {\\n      transform: translateY(0);\\n      opacity: 1;\\n    }\\n  }\\n`});function Mhe(){let t=de.state.data?.connector?.name,e=de.state.data?.wallet?.name,r=de.state.data?.network?.name,n=e??t,i=ie.getConnectors();return{Connect:`Connect ${i.length===1&&i[0]?.id===\\\"w3m-email\\\"?\\\"Email\\\":\\\"\\\"} Wallet`,Create:\\\"Create Wallet\\\",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:\\\"All Wallets\\\",ApproveTransaction:\\\"Approve Transaction\\\",BuyInProgress:\\\"Buy\\\",ConnectingExternal:n??\\\"Connect Wallet\\\",ConnectingWalletConnect:n??\\\"WalletConnect\\\",ConnectingWalletConnectBasic:\\\"WalletConnect\\\",ConnectingSiwe:\\\"Sign In\\\",Convert:\\\"Convert\\\",ConvertSelectToken:\\\"Select token\\\",ConvertPreview:\\\"Preview convert\\\",Downloads:n?`Get ${n}`:\\\"Downloads\\\",EmailLogin:\\\"Email Login\\\",EmailVerifyOtp:\\\"Confirm Email\\\",EmailVerifyDevice:\\\"Register Device\\\",GetWallet:\\\"Get a wallet\\\",Networks:\\\"Choose Network\\\",OnRampProviders:\\\"Choose Provider\\\",OnRampActivity:\\\"Activity\\\",OnRampTokenSelect:\\\"Select Token\\\",OnRampFiatSelect:\\\"Select Currency\\\",Pay:\\\"How you pay\\\",Profile:void 0,SwitchNetwork:r??\\\"Switch Network\\\",SwitchAddress:\\\"Switch Address\\\",Transactions:\\\"Activity\\\",UnsupportedChain:\\\"Switch Network\\\",UpgradeEmailWallet:\\\"Upgrade your Wallet\\\",UpdateEmailWallet:\\\"Edit Email\\\",UpdateEmailPrimaryOtp:\\\"Confirm Current Email\\\",UpdateEmailSecondaryOtp:\\\"Confirm New Email\\\",WhatIsABuy:\\\"What is Buy?\\\",RegisterAccountName:\\\"Choose name\\\",RegisterAccountNameSuccess:\\\"\\\",WalletReceive:\\\"Receive\\\",WalletCompatibleNetworks:\\\"Compatible Networks\\\",Swap:\\\"Swap\\\",SwapSelectToken:\\\"Select token\\\",SwapPreview:\\\"Preview swap\\\",WalletSend:\\\"Send\\\",WalletSendPreview:\\\"Review send\\\",WalletSendSelectToken:\\\"Select Token\\\",WhatIsANetwork:\\\"What is a network?\\\",WhatIsAWallet:\\\"What is a wallet?\\\",ConnectWallets:\\\"Connect wallet\\\",ConnectSocials:\\\"All socials\\\",ConnectingSocial:Ie.state.socialProvider?Ie.state.socialProvider:\\\"Connect Social\\\",ConnectingMultiChain:\\\"Select chain\\\",ConnectingFarcaster:\\\"Farcaster\\\",SwitchActiveChain:\\\"Switch chain\\\",SmartSessionCreated:void 0,SmartSessionList:\\\"Smart Sessions\\\",SIWXSignMessage:\\\"Sign In\\\",PayLoading:\\\"Payment in progress\\\"}}var K0,fZt,Ff,_st=x(()=>{u();Q();Ke();bn();xt();pr();is();hst();wst();vst();z0();eR();Est();K0=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},fZt=[\\\"SmartSessionList\\\"];Ff=class extends se{constructor(){super(),this.unsubscribe=[],this.heading=Mhe()[de.state.view],this.network=z.state.activeCaipNetwork,this.networkImage=sr.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=de.state.view,this.viewDirection=\\\"\\\",this.headerText=Mhe()[de.state.view],this.unsubscribe.push(Zs.subscribeNetworkImages(()=>{this.networkImage=sr.getNetworkImage(this.network)}),de.subscribeKey(\\\"view\\\",e=>{setTimeout(()=>{this.view=e,this.headerText=Mhe()[e]},Bf.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),z.subscribeKey(\\\"activeCaipNetwork\\\",e=>{this.network=e,this.networkImage=sr.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return $`\\n      <wui-flex .padding=${this.getPadding()} justifyContent=\\\"space-between\\\" alignItems=\\\"center\\\">\\n        ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()}\\n      </wui-flex>\\n    `}onWalletHelp(){Xe.sendEvent({type:\\\"track\\\",event:\\\"CLICK_WALLET_HELP\\\"}),de.push(\\\"WhatIsAWallet\\\")}async onClose(){await Y7.safeClose()}rightHeaderTemplate(){let e=ee?.state?.features?.smartSessions;return de.state.view!==\\\"Account\\\"||!e?this.closeButtonTemplate():$`<wui-flex>\\n      <wui-icon-link\\n        icon=\\\"clock\\\"\\n        @click=${()=>de.push(\\\"SmartSessionList\\\")}\\n        data-testid=\\\"w3m-header-smart-sessions\\\"\\n      ></wui-icon-link>\\n      ${this.closeButtonTemplate()}\\n    </wui-flex> `}closeButtonTemplate(){return $`\\n      <wui-icon-link\\n        icon=\\\"close\\\"\\n        @click=${this.onClose.bind(this)}\\n        data-testid=\\\"w3m-header-close\\\"\\n      ></wui-icon-link>\\n    `}titleTemplate(){let e=fZt.includes(this.view);return $`\\n      <wui-flex\\n        view-direction=\\\"${this.viewDirection}\\\"\\n        class=\\\"w3m-header-title\\\"\\n        alignItems=\\\"center\\\"\\n        gap=\\\"xs\\\"\\n      >\\n        <wui-text variant=\\\"paragraph-700\\\" color=\\\"fg-100\\\" data-testid=\\\"w3m-header-text\\\"\\n          >${this.headerText}</wui-text\\n        >\\n        ${e?$`<wui-tag variant=\\\"main\\\">Beta</wui-tag>`:null}\\n      </wui-flex>\\n    `}leftHeaderTemplate(){let{view:e}=de.state,r=e===\\\"Connect\\\",n=ee.state.enableEmbedded,i=e===\\\"ApproveTransaction\\\",s=e===\\\"ConnectingSiwe\\\",o=e===\\\"Account\\\",a=ee.state.enableNetworkSwitch,c=i||s||r&&n;return o&&a?$`<wui-select\\n        id=\\\"dynamic\\\"\\n        data-testid=\\\"w3m-account-select-network\\\"\\n        active-network=${Re(this.network?.name)}\\n        @click=${this.onNetworks.bind(this)}\\n        imageSrc=${Re(this.networkImage)}\\n      ></wui-select>`:this.showBack&&!c?$`<wui-icon-link\\n        data-testid=\\\"header-back\\\"\\n        id=\\\"dynamic\\\"\\n        icon=\\\"chevronLeft\\\"\\n        @click=${this.onGoBack.bind(this)}\\n      ></wui-icon-link>`:$`<wui-icon-link\\n      data-hidden=${!r}\\n      id=\\\"dynamic\\\"\\n      icon=\\\"helpCircle\\\"\\n      @click=${this.onWalletHelp.bind(this)}\\n    ></wui-icon-link>`}onNetworks(){this.isAllowedNetworkSwitch()&&(Xe.sendEvent({type:\\\"track\\\",event:\\\"CLICK_NETWORKS\\\"}),de.push(\\\"Networks\\\"))}isAllowedNetworkSwitch(){let e=z.getAllRequestedCaipNetworks(),r=e?e.length>1:!1,n=e?.find(({id:i})=>i===this.network?.id);return r||!n}getPadding(){return this.heading?[\\\"l\\\",\\\"2l\\\",\\\"l\\\",\\\"2l\\\"]:[\\\"0\\\",\\\"2l\\\",\\\"0\\\",\\\"2l\\\"]}onViewChange(){let{history:e}=de.state,r=Bf.VIEW_DIRECTION.Next;e.length<this.prevHistoryLength&&(r=Bf.VIEW_DIRECTION.Prev),this.prevHistoryLength=e.length,this.viewDirection=r}async onHistoryChange(){let{history:e}=de.state,r=this.shadowRoot?.querySelector(\\\"#dynamic\\\");e.length>1&&!this.showBack&&r?(await r.animate([{opacity:1},{opacity:0}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}).finished,this.showBack=!0,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"})):e.length<=1&&this.showBack&&r&&(await r.animate([{opacity:1},{opacity:0}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}).finished,this.showBack=!1,r.animate([{opacity:0},{opacity:1}],{duration:200,fill:\\\"forwards\\\",easing:\\\"ease\\\"}))}onGoBack(){de.goBack()}};Ff.styles=xst;K0([xe()],Ff.prototype,\\\"heading\\\",void 0);K0([xe()],Ff.prototype,\\\"network\\\",void 0);K0([xe()],Ff.prototype,\\\"networkImage\\\",void 0);K0([xe()],Ff.prototype,\\\"showBack\\\",void 0);K0([xe()],Ff.prototype,\\\"prevHistoryLength\\\",void 0);K0([xe()],Ff.prototype,\\\"view\\\",void 0);K0([xe()],Ff.prototype,\\\"viewDirection\\\",void 0);K0([xe()],Ff.prototype,\\\"headerText\\\",void 0);Ff=K0([te(\\\"w3m-header\\\")],Ff)});var Cst,Sst=x(()=>{u();Q();Cst=we`\\n  :host {\\n    display: flex;\\n    column-gap: var(--wui-spacing-s);\\n    align-items: center;\\n    padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);\\n    border-radius: var(--wui-border-radius-s);\\n    border: 1px solid var(--wui-color-gray-glass-005);\\n    box-sizing: border-box;\\n    background-color: var(--wui-color-bg-175);\\n    box-shadow:\\n      0px 14px 64px -4px rgba(0, 0, 0, 0.15),\\n      0px 8px 22px -6px rgba(0, 0, 0, 0.15);\\n\\n    max-width: 300px;\\n  }\\n\\n  :host wui-loading-spinner {\\n    margin-left: var(--wui-spacing-3xs);\\n  }\\n`});var Nx,Z0,Ast=x(()=>{u();Q();Ke();aa();_R();tu();Er();fr();tb();Sst();Nx=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},Z0=class extends se{constructor(){super(...arguments),this.backgroundColor=\\\"accent-100\\\",this.iconColor=\\\"accent-100\\\",this.icon=\\\"checkmark\\\",this.message=\\\"\\\",this.loading=!1,this.iconType=\\\"default\\\"}render(){return $`\\n      ${this.templateIcon()}\\n      <wui-text variant=\\\"paragraph-500\\\" color=\\\"fg-100\\\" data-testid=\\\"wui-snackbar-message\\\"\\n        >${this.message}</wui-text\\n      >\\n    `}templateIcon(){return this.loading?$`<wui-loading-spinner size=\\\"md\\\" color=\\\"accent-100\\\"></wui-loading-spinner>`:this.iconType===\\\"default\\\"?$`<wui-icon size=\\\"xl\\\" color=${this.iconColor} name=${this.icon}></wui-icon>`:$`<wui-icon-box\\n      size=\\\"sm\\\"\\n      iconSize=\\\"xs\\\"\\n      iconColor=${this.iconColor}\\n      backgroundColor=${this.backgroundColor}\\n      icon=${this.icon}\\n      background=\\\"opaque\\\"\\n    ></wui-icon-box>`}};Z0.styles=[ze,Cst];Nx([G()],Z0.prototype,\\\"backgroundColor\\\",void 0);Nx([G()],Z0.prototype,\\\"iconColor\\\",void 0);Nx([G()],Z0.prototype,\\\"icon\\\",void 0);Nx([G()],Z0.prototype,\\\"message\\\",void 0);Nx([G()],Z0.prototype,\\\"loading\\\",void 0);Nx([G()],Z0.prototype,\\\"iconType\\\",void 0);Z0=Nx([te(\\\"wui-snackbar\\\")],Z0)});var Tst=x(()=>{u();Ast()});var Ist,Rst=x(()=>{u();Q();Ist=we`\\n  :host {\\n    display: block;\\n    position: absolute;\\n    opacity: 0;\\n    pointer-events: none;\\n    top: 11px;\\n    left: 50%;\\n    width: max-content;\\n  }\\n`});var Pst,pZt,VV,Ost=x(()=>{u();Q();Ke();xt();pr();Tst();Rst();Pst=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},pZt={loading:void 0,success:{backgroundColor:\\\"success-100\\\",iconColor:\\\"success-100\\\",icon:\\\"checkmark\\\"},error:{backgroundColor:\\\"error-100\\\",iconColor:\\\"error-100\\\",icon:\\\"close\\\"}},VV=class extends se{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=wr.state.open,this.unsubscribe.push(wr.subscribeKey(\\\"open\\\",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:r,svg:n}=wr.state,i=pZt[r],{icon:s,iconColor:o}=n??i??{};return $`\\n      <wui-snackbar\\n        message=${e}\\n        backgroundColor=${i?.backgroundColor}\\n        iconColor=${o}\\n        icon=${s}\\n        .loading=${r===\\\"loading\\\"}\\n      ></wui-snackbar>\\n    `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:\\\"translateX(-50%) scale(0.85)\\\"},{opacity:1,transform:\\\"translateX(-50%) scale(1)\\\"}],{duration:150,fill:\\\"forwards\\\",easing:\\\"ease\\\"}),this.timeout&&clearTimeout(this.timeout),wr.state.autoClose&&(this.timeout=setTimeout(()=>wr.hide(),2500))):this.animate([{opacity:1,transform:\\\"translateX(-50%) scale(1)\\\"},{opacity:0,transform:\\\"translateX(-50%) scale(0.85)\\\"}],{duration:150,fill:\\\"forwards\\\",easing:\\\"ease\\\"})}};VV.styles=Ist;Pst([xe()],VV.prototype,\\\"open\\\",void 0);VV=Pst([te(\\\"w3m-snackbar\\\")],VV)});var Nst,kst=x(()=>{u();Q();Nst=we`\\n  :host {\\n    pointer-events: none;\\n  }\\n\\n  :host > wui-flex {\\n    display: var(--w3m-tooltip-display);\\n    opacity: var(--w3m-tooltip-opacity);\\n    padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);\\n    border-radius: var(--wui-border-radius-xxs);\\n    color: var(--wui-color-bg-100);\\n    position: fixed;\\n    top: var(--w3m-tooltip-top);\\n    left: var(--w3m-tooltip-left);\\n    transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));\\n    max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl));\\n    transition: opacity 0.2s var(--wui-ease-out-power-2);\\n    will-change: opacity;\\n  }\\n\\n  :host([data-variant='shade']) > wui-flex {\\n    background-color: var(--wui-color-bg-150);\\n    border: 1px solid var(--wui-color-gray-glass-005);\\n  }\\n\\n  :host([data-variant='shade']) > wui-flex > wui-text {\\n    color: var(--wui-color-fg-150);\\n  }\\n\\n  :host([data-variant='fill']) > wui-flex {\\n    background-color: var(--wui-color-fg-100);\\n    border: none;\\n  }\\n\\n  wui-icon {\\n    position: absolute;\\n    width: 12px !important;\\n    height: 4px !important;\\n    color: var(--wui-color-bg-150);\\n  }\\n\\n  wui-icon[data-placement='top'] {\\n    bottom: 0px;\\n    left: 50%;\\n    transform: translate(-50%, 95%);\\n  }\\n\\n  wui-icon[data-placement='bottom'] {\\n    top: 0;\\n    left: 50%;\\n    transform: translate(-50%, -95%) rotate(180deg);\\n  }\\n\\n  wui-icon[data-placement='right'] {\\n    top: 50%;\\n    left: 0;\\n    transform: translate(-65%, -50%) rotate(90deg);\\n  }\\n\\n  wui-icon[data-placement='left'] {\\n    top: 50%;\\n    right: 0%;\\n    transform: translate(65%, -50%) rotate(270deg);\\n  }\\n`});var FR,kx,Bst=x(()=>{u();Q();Ke();xt();pr();is();CR();z0();kst();FR=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},kx=class extends se{constructor(){super(),this.unsubscribe=[],this.open=I0.state.open,this.message=I0.state.message,this.triggerRect=I0.state.triggerRect,this.variant=I0.state.variant,this.unsubscribe.push(I0.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,r=this.triggerRect.left;return this.style.cssText=`\\n    --w3m-tooltip-top: ${e}px;\\n    --w3m-tooltip-left: ${r}px;\\n    --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;\\n    --w3m-tooltip-display: ${this.open?\\\"flex\\\":\\\"none\\\"};\\n    --w3m-tooltip-opacity: ${this.open?1:0};\\n    `,$`<wui-flex>\\n      <wui-icon data-placement=\\\"top\\\" color=\\\"fg-100\\\" size=\\\"inherit\\\" name=\\\"cursor\\\"></wui-icon>\\n      <wui-text color=\\\"inherit\\\" variant=\\\"small-500\\\">${this.message}</wui-text>\\n    </wui-flex>`}};kx.styles=[Nst];FR([xe()],kx.prototype,\\\"open\\\",void 0);FR([xe()],kx.prototype,\\\"message\\\",void 0);FR([xe()],kx.prototype,\\\"triggerRect\\\",void 0);FR([xe()],kx.prototype,\\\"variant\\\",void 0);kx=FR([te(\\\"w3m-tooltip\\\"),te(\\\"w3m-tooltip\\\")],kx)});var Mst,Dst=x(()=>{u();Q();Mst=we`\\n  :host {\\n    --prev-height: 0px;\\n    --new-height: 0px;\\n    display: block;\\n  }\\n\\n  div.w3m-router-container {\\n    transform: translateY(0);\\n    opacity: 1;\\n  }\\n\\n  div.w3m-router-container[view-direction='prev'] {\\n    animation:\\n      slide-left-out 150ms forwards ease,\\n      slide-left-in 150ms forwards ease;\\n    animation-delay: 0ms, 200ms;\\n  }\\n\\n  div.w3m-router-container[view-direction='next'] {\\n    animation:\\n      slide-right-out 150ms forwards ease,\\n      slide-right-in 150ms forwards ease;\\n    animation-delay: 0ms, 200ms;\\n  }\\n\\n  @keyframes slide-left-out {\\n    from {\\n      transform: translateX(0px);\\n      opacity: 1;\\n    }\\n    to {\\n      transform: translateX(10px);\\n      opacity: 0;\\n    }\\n  }\\n\\n  @keyframes slide-left-in {\\n    from {\\n      transform: translateX(-10px);\\n      opacity: 0;\\n    }\\n    to {\\n      transform: translateX(0);\\n      opacity: 1;\\n    }\\n  }\\n\\n  @keyframes slide-right-out {\\n    from {\\n      transform: translateX(0px);\\n      opacity: 1;\\n    }\\n    to {\\n      transform: translateX(-10px);\\n      opacity: 0;\\n    }\\n  }\\n\\n  @keyframes slide-right-in {\\n    from {\\n      transform: translateX(10px);\\n      opacity: 0;\\n    }\\n    to {\\n      transform: translateX(0);\\n      opacity: 1;\\n    }\\n  }\\n`});var Dhe,jR,Lst=x(()=>{u();Q();Ke();xt();pr();eR();Dst();Dhe=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jR=class extends se{constructor(){super(),this.resizeObserver=void 0,this.prevHeight=\\\"0px\\\",this.prevHistoryLength=1,this.unsubscribe=[],this.view=de.state.view,this.viewDirection=\\\"\\\",this.unsubscribe.push(de.subscribeKey(\\\"view\\\",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{let r=`${e?.contentRect.height}px`;this.prevHeight!==\\\"0px\\\"&&(this.style.setProperty(\\\"--prev-height\\\",this.prevHeight),this.style.setProperty(\\\"--new-height\\\",r),this.style.animation=\\\"w3m-view-height 150ms forwards ease\\\",this.style.height=\\\"auto\\\"),setTimeout(()=>{this.prevHeight=r,this.style.animation=\\\"unset\\\"},Bf.ANIMATION_DURATIONS.ModalHeight)}),this.resizeObserver?.observe(this.getWrapper())}disconnectedCallback(){this.resizeObserver?.unobserve(this.getWrapper()),this.unsubscribe.forEach(e=>e())}render(){return $`<div class=\\\"w3m-router-container\\\" view-direction=\\\"${this.viewDirection}\\\">\\n      ${this.viewTemplate()}\\n    </div>`}viewTemplate(){switch(this.view){case\\\"AccountSettings\\\":return $`<w3m-account-settings-view></w3m-account-settings-view>`;case\\\"Account\\\":return $`<w3m-account-view></w3m-account-view>`;case\\\"AllWallets\\\":return $`<w3m-all-wallets-view></w3m-all-wallets-view>`;case\\\"ApproveTransaction\\\":return $`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case\\\"BuyInProgress\\\":return $`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case\\\"ChooseAccountName\\\":return $`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case\\\"Connect\\\":return $`<w3m-connect-view></w3m-connect-view>`;case\\\"Create\\\":return $`<w3m-connect-view walletGuide=\\\"explore\\\"></w3m-connect-view>`;case\\\"ConnectingWalletConnect\\\":return $`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case\\\"ConnectingWalletConnectBasic\\\":return $`<w3m-connecting-wc-basic-view></w3m-connecting-wc-basic-view>`;case\\\"ConnectingExternal\\\":return $`<w3m-connecting-external-view></w3m-connecting-external-view>`;case\\\"ConnectingSiwe\\\":return $`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case\\\"ConnectWallets\\\":return $`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case\\\"ConnectSocials\\\":return $`<w3m-connect-socials-view></w3m-connect-socials-view>`;case\\\"ConnectingSocial\\\":return $`<w3m-connecting-social-view></w3m-connecting-social-view>`;case\\\"Downloads\\\":return $`<w3m-downloads-view></w3m-downloads-view>`;case\\\"EmailLogin\\\":return $`<w3m-email-login-view></w3m-email-login-view>`;case\\\"EmailVerifyOtp\\\":return $`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case\\\"EmailVerifyDevice\\\":return $`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case\\\"GetWallet\\\":return $`<w3m-get-wallet-view></w3m-get-wallet-view>`;case\\\"Networks\\\":return $`<w3m-networks-view></w3m-networks-view>`;case\\\"SwitchNetwork\\\":return $`<w3m-network-switch-view></w3m-network-switch-view>`;case\\\"Profile\\\":return $`<w3m-profile-view></w3m-profile-view>`;case\\\"SwitchAddress\\\":return $`<w3m-switch-address-view></w3m-switch-address-view>`;case\\\"Transactions\\\":return $`<w3m-transactions-view></w3m-transactions-view>`;case\\\"OnRampProviders\\\":return $`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case\\\"OnRampActivity\\\":return $`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case\\\"OnRampTokenSelect\\\":return $`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case\\\"OnRampFiatSelect\\\":return $`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case\\\"UpgradeEmailWallet\\\":return $`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case\\\"UpdateEmailWallet\\\":return $`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case\\\"UpdateEmailPrimaryOtp\\\":return $`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case\\\"UpdateEmailSecondaryOtp\\\":return $`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case\\\"UnsupportedChain\\\":return $`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case\\\"Swap\\\":return $`<w3m-swap-view></w3m-swap-view>`;case\\\"SwapSelectToken\\\":return $`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case\\\"SwapPreview\\\":return $`<w3m-swap-preview-view></w3m-swap-preview-view>`;case\\\"WalletSend\\\":return $`<w3m-wallet-send-view></w3m-wallet-send-view>`;case\\\"WalletSendSelectToken\\\":return $`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case\\\"WalletSendPreview\\\":return $`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case\\\"WhatIsABuy\\\":return $`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case\\\"WalletReceive\\\":return $`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case\\\"WalletCompatibleNetworks\\\":return $`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case\\\"WhatIsAWallet\\\":return $`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case\\\"ConnectingMultiChain\\\":return $`<w3m-connecting-multi-chain-view></w3m-connecting-multi-chain-view>`;case\\\"WhatIsANetwork\\\":return $`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case\\\"ConnectingFarcaster\\\":return $`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;case\\\"SwitchActiveChain\\\":return $`<w3m-switch-active-chain-view></w3m-switch-active-chain-view>`;case\\\"RegisterAccountName\\\":return $`<w3m-register-account-name-view></w3m-register-account-name-view>`;case\\\"RegisterAccountNameSuccess\\\":return $`<w3m-register-account-name-success-view></w3m-register-account-name-success-view>`;case\\\"SmartSessionCreated\\\":return $`<w3m-smart-session-created-view></w3m-smart-session-created-view>`;case\\\"SmartSessionList\\\":return $`<w3m-smart-session-list-view></w3m-smart-session-list-view>`;case\\\"SIWXSignMessage\\\":return $`<w3m-siwx-sign-message-view></w3m-siwx-sign-message-view>`;case\\\"Pay\\\":return $`<w3m-pay-view></w3m-pay-view>`;case\\\"PayLoading\\\":return $`<w3m-pay-loading-view></w3m-pay-loading-view>`;default:return $`<w3m-connect-view></w3m-connect-view>`}}onViewChange(e){I0.hide();let r=Bf.VIEW_DIRECTION.Next,{history:n}=de.state;n.length<this.prevHistoryLength&&(r=Bf.VIEW_DIRECTION.Prev),this.prevHistoryLength=n.length,this.viewDirection=r,setTimeout(()=>{this.view=e},Bf.ANIMATION_DURATIONS.ViewTransition)}getWrapper(){return this.shadowRoot?.querySelector(\\\"div\\\")}};jR.styles=Mst;Dhe([xe()],jR.prototype,\\\"view\\\",void 0);Dhe([xe()],jR.prototype,\\\"viewDirection\\\",void 0);jR=Dhe([te(\\\"w3m-router\\\")],jR)});var Ust,Fst=x(()=>{u();Q();Ust=we`\\n  :host {\\n    z-index: var(--w3m-z-index);\\n    display: block;\\n    backface-visibility: hidden;\\n    will-change: opacity;\\n    position: fixed;\\n    top: 0;\\n    left: 0;\\n    right: 0;\\n    bottom: 0;\\n    pointer-events: none;\\n    opacity: 0;\\n    background-color: var(--wui-cover);\\n    transition: opacity 0.2s var(--wui-ease-out-power-2);\\n    will-change: opacity;\\n  }\\n\\n  :host(.open) {\\n    opacity: 1;\\n  }\\n\\n  :host(.appkit-modal) {\\n    position: relative;\\n    pointer-events: unset;\\n    background: none;\\n    width: 100%;\\n    opacity: 1;\\n  }\\n\\n  wui-card {\\n    max-width: var(--w3m-modal-width);\\n    width: 100%;\\n    position: relative;\\n    animation: zoom-in 0.2s var(--wui-ease-out-power-2);\\n    animation-fill-mode: backwards;\\n    outline: none;\\n    transition:\\n      border-radius var(--wui-duration-lg) var(--wui-ease-out-power-1),\\n      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1);\\n    will-change: border-radius, background-color;\\n  }\\n\\n  :host(.appkit-modal) wui-card {\\n    max-width: 400px;\\n  }\\n\\n  wui-card[shake='true'] {\\n    animation:\\n      zoom-in 0.2s var(--wui-ease-out-power-2),\\n      w3m-shake 0.5s var(--wui-ease-out-power-2);\\n  }\\n\\n  wui-flex {\\n    overflow-x: hidden;\\n    overflow-y: auto;\\n    display: flex;\\n    align-items: center;\\n    justify-content: center;\\n    width: 100%;\\n    height: 100%;\\n  }\\n\\n  @media (max-height: 700px) and (min-width: 431px) {\\n    wui-flex {\\n      align-items: flex-start;\\n    }\\n\\n    wui-card {\\n      margin: var(--wui-spacing-xxl) 0px;\\n    }\\n  }\\n\\n  @media (max-width: 430px) {\\n    wui-flex {\\n      align-items: flex-end;\\n    }\\n\\n    wui-card {\\n      max-width: 100%;\\n      border-bottom-left-radius: var(--local-border-bottom-mobile-radius);\\n      border-bottom-right-radius: var(--local-border-bottom-mobile-radius);\\n      border-bottom: none;\\n      animation: slide-in 0.2s var(--wui-ease-out-power-2);\\n    }\\n\\n    wui-card[shake='true'] {\\n      animation:\\n        slide-in 0.2s var(--wui-ease-out-power-2),\\n        w3m-shake 0.5s var(--wui-ease-out-power-2);\\n    }\\n  }\\n\\n  @keyframes zoom-in {\\n    0% {\\n      transform: scale(0.95) translateY(0);\\n    }\\n    100% {\\n      transform: scale(1) translateY(0);\\n    }\\n  }\\n\\n  @keyframes slide-in {\\n    0% {\\n      transform: scale(1) translateY(50px);\\n    }\\n    100% {\\n      transform: scale(1) translateY(0);\\n    }\\n  }\\n\\n  @keyframes w3m-shake {\\n    0% {\\n      transform: scale(1) rotate(0deg);\\n    }\\n    20% {\\n      transform: scale(1) rotate(-1deg);\\n    }\\n    40% {\\n      transform: scale(1) rotate(1.5deg);\\n    }\\n    60% {\\n      transform: scale(1) rotate(-1.5deg);\\n    }\\n    80% {\\n      transform: scale(1) rotate(1deg);\\n    }\\n    100% {\\n      transform: scale(1) rotate(0deg);\\n    }\\n  }\\n\\n  @keyframes w3m-view-height {\\n    from {\\n      height: var(--prev-height);\\n    }\\n    to {\\n      height: var(--new-height);\\n    }\\n  }\\n`});var cb,jst,Ad,Lhe,Uhe,Hst=x(()=>{u();Q();Ke();bn();Ri();xt();pr();rst();is();ust();_st();Ost();Bst();Lst();Fst();cb=function(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect==\\\"object\\\"&&typeof Reflect.decorate==\\\"function\\\")s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},jst=\\\"scroll-lock\\\",Ad=class extends se{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=ee.state.enableEmbedded,this.open=Dt.state.open,this.caipAddress=z.state.activeCaipAddress,this.caipNetwork=z.state.activeCaipNetwork,this.shake=Dt.state.shake,this.filterByNamespace=ie.state.filterByNamespace,this.initializeTheming(),ye.prefetchAnalyticsConfig(),this.unsubscribe.push(Dt.subscribeKey(\\\"open\\\",e=>e?this.onOpen():this.onClose()),Dt.subscribeKey(\\\"shake\\\",e=>this.shake=e),z.subscribeKey(\\\"activeCaipNetwork\\\",e=>this.onNewNetwork(e)),z.subscribeKey(\\\"activeCaipAddress\\\",e=>this.onNewAddress(e)),ee.subscribeKey(\\\"enableEmbedded\\\",e=>this.enableEmbedded=e),ie.subscribeKey(\\\"filterByNamespace\\\",e=>{this.filterByNamespace!==e&&!z.getAccountData(e)?.caipAddress&&(ye.fetchRecommendedWallets(),this.filterByNamespace=e)}))}firstUpdated(){if(this.caipAddress){if(this.enableEmbedded){Dt.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return this.style.cssText=`\\n      --local-border-bottom-mobile-radius: ${this.enableEmbedded?\\\"clamp(0px, var(--wui-border-radius-l), 44px)\\\":\\\"0px\\\"};\\n    `,this.enableEmbedded?$`${this.contentTemplate()}\\n        <w3m-tooltip></w3m-tooltip> `:this.open?$`\\n          <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid=\\\"w3m-modal-overlay\\\">\\n            ${this.contentTemplate()}\\n          </wui-flex>\\n          <w3m-tooltip></w3m-tooltip>\\n        `:null}contentTemplate(){return $` <wui-card\\n      shake=\\\"${this.shake}\\\"\\n      data-embedded=\\\"${Re(this.enableEmbedded)}\\\"\\n      role=\\\"alertdialog\\\"\\n      aria-modal=\\\"true\\\"\\n      tabindex=\\\"0\\\"\\n      data-testid=\\\"w3m-modal-card\\\"\\n    >\\n      <w3m-header></w3m-header>\\n      <w3m-router></w3m-router>\\n      <w3m-snackbar></w3m-snackbar>\\n      <w3m-alertbar></w3m-alertbar>\\n    </wui-card>`}async onOverlayClick(e){e.target===e.currentTarget&&await this.handleClose()}async handleClose(){await Y7.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:r}=ji.state,n=Pi.getColorTheme(r);Ape(e,n)}onClose(){this.open=!1,this.classList.remove(\\\"open\\\"),this.onScrollUnlock(),wr.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add(\\\"open\\\"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement(\\\"style\\\");e.dataset.w3m=jst,e.textContent=`\\n      body {\\n        touch-action: none;\\n        overflow: hidden;\\n        overscroll-behavior: contain;\\n      }\\n      w3m-modal {\\n        pointer-events: auto;\\n      }\\n    `,document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m=\\\"${jst}\\\"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector(\\\"wui-card\\\");e?.focus(),window.addEventListener(\\\"keydown\\\",r=>{if(r.key===\\\"Escape\\\")this.handleClose();else if(r.key===\\\"Tab\\\"){let{tagName:n}=r.target;n&&!n.includes(\\\"W3M-\\\")&&!n.includes(\\\"WUI-\\\")&&e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){let r=z.state.isSwitchingNamespace,n=oe.getPlainAddress(e);!n&&!r?Dt.close():r&&n&&de.goBack(),await vd.initializeIfEnabled(),this.caipAddress=e,z.setIsSwitchingNamespace(!1)}onNewNetwork(e){let r=this.caipNetwork,n=r?.caipNetworkId?.toString(),i=r?.chainNamespace,s=e?.caipNetworkId?.toString(),o=e?.chainNamespace,a=n!==s,l=a&&!(i!==o),d=r?.name===_e.UNSUPPORTED_NETWORK_NAME,f=de.state.view===\\\"ConnectingExternal\\\",p=!z.getAccountData(e?.chainNamespace)?.caipAddress,h=de.state.view===\\\"UnsupportedChain\\\",m=Dt.state.open,g=!1;m&&!f&&(p?a&&(g=!0):(h||l&&!d)&&(g=!0)),g&&de.state.view!==\\\"SIWXSignMessage\\\"&&de.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(ye.prefetch(),ye.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}};Ad.styles=Ust;cb([G({type:Boolean})],Ad.prototype,\\\"enableEmbedded\\\",void 0);cb([xe()],Ad.prototype,\\\"open\\\",void 0);cb([xe()],Ad.prototype,\\\"caipAddress\\\",void 0);cb([xe()],Ad.prototype,\\\"caipNetwork\\\",void 0);cb([xe()],Ad.prototype,\\\"shake\\\",void 0);cb([xe()],Ad.prototype,\\\"filterByNamespace\\\",void 0);Lhe=class extends Ad{};Lhe=cb([te(\\\"w3m-modal\\\")],Lhe);Uhe=class extends Ad{};Uhe=cb([te(\\\"appkit-modal\\\")],Uhe)});var qst={};ue(qst,{AppKitModal:()=>Uhe,W3mModal:()=>Lhe,W3mModalBase:()=>Ad});var zst=x(()=>{u();Hst()});var $st,HR,Vst=x(()=>{u();xt();aYe();$st=!1,HR=class extends Z${async open(e){ie.isConnected()||await super.open(e)}async close(){await super.close(),this.options.manualWCControl&&me.finalizeWcConnection()}async syncIdentity(e){return Promise.resolve()}async syncBalance(e){return Promise.resolve()}async injectModalUi(){if(!$st&&oe.isClient()){if(await Promise.resolve().then(()=>(Yit(),Jit)),await Promise.resolve().then(()=>(zst(),qst)),!document.querySelector(\\\"w3m-modal\\\")){let r=document.createElement(\\\"w3m-modal\\\");!ee.state.disableAppend&&!ee.state.enableEmbedded&&document.body.insertAdjacentElement(\\\"beforeend\\\",r)}$st=!0}}}});var Wst,Gst=x(()=>{u();Wst=\\\"1.7.8\\\"});var Kst={};ue(Kst,{AppKit:()=>HR,createAppKit:()=>hZt});function hZt(t){return new HR({...t,basic:!0,sdkVersion:`html-core-${Wst}`})}var Zst=x(()=>{u();Vst();Gst()});var not=q(lb=>{\\\"use strict\\\";u();Object.defineProperty(lb,\\\"__esModule\\\",{value:!0});var mZt=ho(),A8=(Y9(),mt(dce)),gZt=eGe();function yZt(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if(r!==\\\"default\\\"){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,Object.freeze(e)}var bZt=\\\"wc\\\",wZt=\\\"ethereum_provider\\\",vZt=`${bZt}@2:${wZt}:`,xZt=\\\"https://rpc.walletconnect.org/v1/\\\",GV=[\\\"eth_sendTransaction\\\",\\\"personal_sign\\\"],Xst=[\\\"eth_accounts\\\",\\\"eth_requestAccounts\\\",\\\"eth_sendRawTransaction\\\",\\\"eth_sign\\\",\\\"eth_signTransaction\\\",\\\"eth_signTypedData\\\",\\\"eth_signTypedData_v3\\\",\\\"eth_signTypedData_v4\\\",\\\"eth_sendTransaction\\\",\\\"personal_sign\\\",\\\"wallet_switchEthereumChain\\\",\\\"wallet_addEthereumChain\\\",\\\"wallet_getPermissions\\\",\\\"wallet_requestPermissions\\\",\\\"wallet_registerOnboarding\\\",\\\"wallet_watchAsset\\\",\\\"wallet_scanQRCode\\\",\\\"wallet_sendCalls\\\",\\\"wallet_getCapabilities\\\",\\\"wallet_getCallsStatus\\\",\\\"wallet_showCallsStatus\\\"],KV=[\\\"chainChanged\\\",\\\"accountsChanged\\\"],eot=[\\\"chainChanged\\\",\\\"accountsChanged\\\",\\\"message\\\",\\\"disconnect\\\",\\\"connect\\\"],EZt=async()=>{let{createAppKit:t}=await Promise.resolve().then(function(){return yZt((Zst(),mt(Kst)))});return t},_Zt=Object.defineProperty,CZt=Object.defineProperties,SZt=Object.getOwnPropertyDescriptors,Qst=Object.getOwnPropertySymbols,AZt=Object.prototype.hasOwnProperty,TZt=Object.prototype.propertyIsEnumerable,Fhe=(t,e,r)=>e in t?_Zt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bx=(t,e)=>{for(var r in e||(e={}))AZt.call(e,r)&&Fhe(t,r,e[r]);if(Qst)for(var r of Qst(e))TZt.call(e,r)&&Fhe(t,r,e[r]);return t},qR=(t,e)=>CZt(t,SZt(e)),nu=(t,e,r)=>Fhe(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r);function ZV(t){return Number(t[0].split(\\\":\\\")[1])}function WV(t){return`0x${t.toString(16)}`}function IZt(t){let{chains:e,optionalChains:r,methods:n,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=t;if(!A8.isValidArray(e))throw new Error(\\\"Invalid chains\\\");let c={chains:e,methods:n||GV,events:s||KV,rpcMap:Bx({},e.length?{[ZV(e)]:a[ZV(e)]}:{})},l=s?.filter(h=>!KV.includes(h)),d=n?.filter(h=>!GV.includes(h));if(!r&&!o&&!i&&!(l!=null&&l.length)&&!(d!=null&&d.length))return{required:e.length?c:void 0};let f=l?.length&&d?.length||!r,p={chains:[...new Set(f?c.chains.concat(r||[]):r)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:Xst))],events:[...new Set(c.events.concat(o!=null&&o.length?o:eot))],rpcMap:a};return{required:e.length?c:void 0,optional:r.length?p:void 0}}var QV=class t{constructor(){nu(this,\\\"events\\\",new mZt.EventEmitter),nu(this,\\\"namespace\\\",\\\"eip155\\\"),nu(this,\\\"accounts\\\",[]),nu(this,\\\"signer\\\"),nu(this,\\\"chainId\\\",1),nu(this,\\\"modal\\\"),nu(this,\\\"rpc\\\"),nu(this,\\\"STORAGE_KEY\\\",vZt),nu(this,\\\"on\\\",(e,r)=>(this.events.on(e,r),this)),nu(this,\\\"once\\\",(e,r)=>(this.events.once(e,r),this)),nu(this,\\\"removeListener\\\",(e,r)=>(this.events.removeListener(e,r),this)),nu(this,\\\"off\\\",(e,r)=>(this.events.off(e,r),this)),nu(this,\\\"parseAccount\\\",e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e),this.signer={},this.rpc={}}static async init(e){let r=new t;return await r.initialize(e),r}async request(e,r){return await this.signer.request(e,this.formatChainId(this.chainId),r)}sendAsync(e,r,n){this.signer.sendAsync(e,r,this.formatChainId(this.chainId),n)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:\\\"eth_requestAccounts\\\"})}async connect(e){var r;if(!this.signer.client)throw new Error(\\\"Provider not initialized. Call init() first\\\");this.loadConnectOpts(e);let{required:n,optional:i}=IZt(this.rpc);try{let s=await new Promise(async(a,c)=>{var l,d;this.rpc.showQrModal&&((l=this.modal)==null||l.open(),(d=this.modal)==null||d.subscribeState(p=>{!p.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error(\\\"Connection request reset. Please try again.\\\")))}));let f=e!=null&&e.scopedProperties?{[this.namespace]:e.scopedProperties}:void 0;await this.signer.connect(qR(Bx({namespaces:Bx({},n&&{[this.namespace]:n})},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:e?.pairingTopic,scopedProperties:f})).then(p=>{a(p)}).catch(p=>{var h;(h=this.modal)==null||h.showErrorMessage(\\\"Unable to connect\\\"),c(new Error(p.message))})});if(!s)return;let o=A8.getAccountsFromNamespaces(s.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:o),this.setAccounts(o),this.events.emit(\\\"connect\\\",{chainId:WV(this.chainId)})}catch(s){throw this.signer.logger.error(s),s}finally{(r=this.modal)==null||r.close()}}async authenticate(e,r){var n;if(!this.signer.client)throw new Error(\\\"Provider not initialized. Call init() first\\\");this.loadConnectOpts({chains:e?.chains});try{let i=await new Promise(async(o,a)=>{var c,l;this.rpc.showQrModal&&((c=this.modal)==null||c.open(),(l=this.modal)==null||l.subscribeState(d=>{!d.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error(\\\"Connection request reset. Please try again.\\\")))})),await this.signer.authenticate(qR(Bx({},e),{chains:this.rpc.chains}),r).then(d=>{o(d)}).catch(d=>{var f;(f=this.modal)==null||f.showErrorMessage(\\\"Unable to connect\\\"),a(new Error(d.message))})}),s=i.session;if(s){let o=A8.getAccountsFromNamespaces(s.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:o),this.setAccounts(o),this.events.emit(\\\"connect\\\",{chainId:WV(this.chainId)})}return i}catch(i){throw this.signer.logger.error(i),i}finally{(n=this.modal)==null||n.close()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on(\\\"session_event\\\",e=>{let{params:r}=e,{event:n}=r;n.name===\\\"accountsChanged\\\"?(this.accounts=this.parseAccounts(n.data),this.events.emit(\\\"accountsChanged\\\",this.accounts)):n.name===\\\"chainChanged\\\"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit(\\\"session_event\\\",e)}),this.signer.on(\\\"accountsChanged\\\",e=>{this.accounts=this.parseAccounts(e),this.events.emit(\\\"accountsChanged\\\",this.accounts)}),this.signer.on(\\\"chainChanged\\\",e=>{let r=parseInt(e);this.chainId=r,this.events.emit(\\\"chainChanged\\\",WV(this.chainId)),this.persist()}),this.signer.on(\\\"session_update\\\",e=>{this.events.emit(\\\"session_update\\\",e)}),this.signer.on(\\\"session_delete\\\",e=>{this.reset(),this.events.emit(\\\"session_delete\\\",e),this.events.emit(\\\"disconnect\\\",qR(Bx({},A8.getSdkError(\\\"USER_DISCONNECTED\\\")),{data:e.topic,name:\\\"USER_DISCONNECTED\\\"}))}),this.signer.on(\\\"display_uri\\\",e=>{this.events.emit(\\\"display_uri\\\",e)})}switchEthereumChain(e){this.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e==\\\"string\\\"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(\\\":\\\")[1])}setChainIds(e){let r=e.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));r.length&&(this.chainId=r[0],this.events.emit(\\\"chainChanged\\\",WV(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){let r=this.parseChainId(e);this.chainId=r,this.switchEthereumChain(r)}}parseAccountId(e){let[r,n,i]=e.split(\\\":\\\");return{chainId:`${r}:${n}`,address:i}}setAccounts(e){this.accounts=e.filter(r=>this.parseChainId(this.parseAccountId(r).chainId)===this.chainId).map(r=>this.parseAccountId(r).address),this.events.emit(\\\"accountsChanged\\\",this.accounts)}getRpcConfig(e){var r,n;let i=(r=e?.chains)!=null?r:[],s=(n=e?.optionalChains)!=null?n:[],o=i.concat(s);if(!o.length)throw new Error(\\\"No chains specified in either `chains` or `optionalChains`\\\");let a=i.length?e?.methods||GV:[],c=i.length?e?.events||KV:[],l=e?.optionalMethods||[],d=e?.optionalEvents||[],f=e?.rpcMap||this.buildRpcMap(o,e.projectId),p=e?.qrModalOptions||void 0;return{chains:i?.map(h=>this.formatChainId(h)),optionalChains:s.map(h=>this.formatChainId(h)),methods:a,events:c,optionalMethods:l,optionalEvents:d,rpcMap:f,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:p,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,r){let n={};return e.forEach(i=>{n[i]=this.getRpcUrl(i,r)}),n}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?ZV(this.rpc.chains):ZV(this.rpc.optionalChains),this.signer=await gZt.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storage:e.storage,storageOptions:e.storageOptions,customStoragePrefix:e.customStoragePrefix,telemetryEnabled:e.telemetryEnabled,logger:e.logger}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let r;try{let n=await EZt(),{convertWCMToAppKitOptions:i}=await Promise.resolve().then(function(){return FZt}),s=i(qR(Bx({},this.rpc.qrModalOptions),{chains:[...new Set([...this.rpc.chains,...this.rpc.optionalChains])],metadata:this.rpc.metadata,projectId:this.rpc.projectId}));if(!s.networks.length)throw new Error(\\\"No networks found for WalletConnect\\\\xB7\\\");r=n(qR(Bx({},s),{universalProvider:this.signer,manualWCControl:!0}))}catch(n){throw console.warn(n),new Error(\\\"To use QR modal, please install @reown/appkit package\\\")}if(r)try{this.modal=r}catch(n){throw this.signer.logger.error(n),new Error(\\\"Could not generate WalletConnectModal Instance\\\")}}}loadConnectOpts(e){if(!e)return;let{chains:r,optionalChains:n,rpcMap:i}=e;r&&A8.isValidArray(r)&&(this.rpc.chains=r.map(s=>this.formatChainId(s)),r.forEach(s=>{this.rpc.rpcMap[s]=i?.[s]||this.getRpcUrl(s)})),n&&A8.isValidArray(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n?.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=i?.[s]||this.getRpcUrl(s)}))}getRpcUrl(e,r){var n;return((n=this.rpc.rpcMap)==null?void 0:n[e])||`${xZt}?chainId=eip155:${e}&projectId=${r||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{let e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),r=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:r?.accounts),this.setAccounts(r?.accounts)}catch(e){this.signer.logger.error(\\\"Failed to load persisted session, clearing state...\\\"),this.signer.logger.error(e),await this.disconnect().catch(r=>this.signer.logger.warn(r))}}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e==\\\"string\\\"||e instanceof String?[this.parseAccount(e)]:e.map(r=>this.parseAccount(r))}},RZt=QV,PZt=Object.defineProperty,OZt=Object.defineProperties,NZt=Object.getOwnPropertyDescriptors,Jst=Object.getOwnPropertySymbols,kZt=Object.prototype.hasOwnProperty,BZt=Object.prototype.propertyIsEnumerable,Yst=(t,e,r)=>e in t?PZt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tot=(t,e)=>{for(var r in e||(e={}))kZt.call(e,r)&&Yst(t,r,e[r]);if(Jst)for(var r of Jst(e))BZt.call(e,r)&&Yst(t,r,e[r]);return t},MZt=(t,e)=>OZt(t,NZt(e));function DZt(t){if(t)return{\\\"--w3m-font-family\\\":t[\\\"--wcm-font-family\\\"],\\\"--w3m-accent\\\":t[\\\"--wcm-accent-color\\\"],\\\"--w3m-color-mix\\\":t[\\\"--wcm-background-color\\\"],\\\"--w3m-z-index\\\":t[\\\"--wcm-z-index\\\"]?Number(t[\\\"--wcm-z-index\\\"]):void 0,\\\"--w3m-qr-color\\\":t[\\\"--wcm-accent-color\\\"],\\\"--w3m-font-size-master\\\":t[\\\"--wcm-text-medium-regular-size\\\"],\\\"--w3m-border-radius-master\\\":t[\\\"--wcm-container-border-radius\\\"],\\\"--w3m-color-mix-strength\\\":0}}var LZt=t=>{let[e,r]=t.split(\\\":\\\");return rot({id:r,caipNetworkId:t,chainNamespace:e,name:\\\"\\\",nativeCurrency:{name:\\\"\\\",symbol:\\\"\\\",decimals:8},rpcUrls:{default:{http:[\\\"https://rpc.walletconnect.org/v1\\\"]}}})};function UZt(t){var e,r,n,i,s,o,a;let c=(e=t.chains)==null?void 0:e.map(LZt).filter(Boolean);if(c.length===0)throw new Error(\\\"At least one chain must be specified\\\");let l=c.find(f=>{var p;return f.id===((p=t.defaultChain)==null?void 0:p.id)}),d={projectId:t.projectId,networks:c,themeMode:t.themeMode,themeVariables:DZt(t.themeVariables),chainImages:t.chainImages,connectorImages:t.walletImages,defaultNetwork:l,metadata:MZt(tot({},t.metadata),{name:((r=t.metadata)==null?void 0:r.name)||\\\"WalletConnect\\\",description:((n=t.metadata)==null?void 0:n.description)||\\\"Connect to WalletConnect-compatible wallets\\\",url:((i=t.metadata)==null?void 0:i.url)||\\\"https://walletconnect.org\\\",icons:((s=t.metadata)==null?void 0:s.icons)||[\\\"https://walletconnect.org/walletconnect-logo.png\\\"]}),showWallets:!0,featuredWalletIds:t.explorerRecommendedWalletIds===\\\"NONE\\\"?[]:Array.isArray(t.explorerRecommendedWalletIds)?t.explorerRecommendedWalletIds:[],excludeWalletIds:t.explorerExcludedWalletIds===\\\"ALL\\\"?[]:Array.isArray(t.explorerExcludedWalletIds)?t.explorerExcludedWalletIds:[],enableEIP6963:!1,enableInjected:!1,enableCoinbase:!0,enableWalletConnect:!0,features:{email:!1,socials:!1}};if((o=t.mobileWallets)!=null&&o.length||(a=t.desktopWallets)!=null&&a.length){let f=[...(t.mobileWallets||[]).map(m=>({id:m.id,name:m.name,links:m.links})),...(t.desktopWallets||[]).map(m=>({id:m.id,name:m.name,links:{native:m.links.native,universal:m.links.universal}}))],p=[...d.featuredWalletIds||[],...d.excludeWalletIds||[]],h=f.filter(m=>!p.includes(m.id));h.length&&(d.customWallets=h)}return d}function rot(t){return tot({formatters:void 0,fees:void 0,serializers:void 0},t)}var FZt=Object.freeze({__proto__:null,convertWCMToAppKitOptions:UZt,defineChain:rot});lb.EthereumProvider=RZt,lb.OPTIONAL_EVENTS=eot,lb.OPTIONAL_METHODS=Xst,lb.REQUIRED_EVENTS=KV,lb.REQUIRED_METHODS=GV,lb.default=QV});u();var oot=Me(X1e(),1);u();var _s=Me(Vi(),1);un();u();u();var eT=Me(Vi(),1);u();u();u();u();u();u();u();var g6=\\\"2.22.1\\\";var s6e=()=>`@wagmi/core@${g6}`;var o6e=function(t,e,r,n){if(r===\\\"a\\\"&&!n)throw new TypeError(\\\"Private accessor was defined without a getter\\\");if(typeof e==\\\"function\\\"?t!==e||!n:!e.has(t))throw new TypeError(\\\"Cannot read private member from an object whose class did not declare it\\\");return r===\\\"m\\\"?n:r===\\\"a\\\"?n.call(t):n?n.value:e.get(t)},YB,a6e,$a=class t extends Error{get docsBaseUrl(){return\\\"https://wagmi.sh/core\\\"}get version(){return s6e()}constructor(e,r={}){super(),YB.add(this),Object.defineProperty(this,\\\"details\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"docsPath\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"metaMessages\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"shortMessage\\\",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"WagmiCoreError\\\"});let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath;this.message=[e||\\\"An error occurred.\\\",\\\"\\\",...r.metaMessages?[...r.metaMessages,\\\"\\\"]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${r.docsSlug?`#${r.docsSlug}`:\\\"\\\"}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`\\n`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return o6e(this,YB,\\\"m\\\",a6e).call(this,this,e)}};YB=new WeakSet,a6e=function t(e,r){return r?.(e)?e:e.cause?o6e(this,YB,\\\"m\\\",t).call(this,e.cause,r):e};var ga=class extends $a{constructor(){super(\\\"Chain not configured.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ChainNotConfiguredError\\\"})}},y6=class extends $a{constructor(){super(\\\"Connector already connected.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ConnectorAlreadyConnectedError\\\"})}},JA=class extends $a{constructor(){super(\\\"Connector not connected.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ConnectorNotConnectedError\\\"})}};var b6=class extends $a{constructor({address:e,connector:r}){super(`Account \\\"${e}\\\" not found for connector \\\"${r.name}\\\".`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ConnectorAccountNotFoundError\\\"})}},w6=class extends $a{constructor({connectionChainId:e,connectorChainId:r}){super(`The current chain of the connector (id: ${r}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID:  ${r}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ConnectorChainMismatchError\\\"})}},v6=class extends $a{constructor({connector:e}){super(`Connector \\\"${e.name}\\\" unavailable while reconnecting.`,{details:[\\\"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.\\\",\\\"All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.\\\",\\\"This error commonly occurs for connectors that asynchronously inject after reconnection has already started.\\\"].join(\\\" \\\")}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ConnectorUnavailableReconnectingError\\\"})}};async function c6e(t,e){let r;if(typeof e.connector==\\\"function\\\"?r=t._internal.connectors.setup(e.connector):r=e.connector,r.uid===t.state.current)throw new y6;try{t.setState(o=>({...o,status:\\\"connecting\\\"})),r.emitter.emit(\\\"message\\\",{type:\\\"connecting\\\"});let{connector:n,...i}=e,s=await r.connect(i);return r.emitter.off(\\\"connect\\\",t._internal.events.connect),r.emitter.on(\\\"change\\\",t._internal.events.change),r.emitter.on(\\\"disconnect\\\",t._internal.events.disconnect),await t.storage?.setItem(\\\"recentConnectorId\\\",r.id),t.setState(o=>({...o,connections:new Map(o.connections).set(r.uid,{accounts:i.withCapabilities?s.accounts.map(a=>typeof a==\\\"object\\\"?a.address:a):s.accounts,chainId:s.chainId,connector:r}),current:r.uid,status:\\\"connected\\\"})),{accounts:i.withCapabilities?s.accounts.map(o=>typeof o==\\\"object\\\"?o:{address:o,capabilities:{}}):s.accounts,chainId:s.chainId}}catch(n){throw t.setState(i=>({...i,status:i.current?\\\"connected\\\":\\\"disconnected\\\"})),n}}u();un();Dw();async function l6e(t,e={}){let{assertChainId:r=!0}=e,n;if(e.connector){let{connector:d}=e;if(t.state.status===\\\"reconnecting\\\"&&!d.getAccounts&&!d.getChainId)throw new v6({connector:d});let[f,p]=await Promise.all([d.getAccounts().catch(h=>{if(e.account===null)return[];throw h}),d.getChainId()]);n={accounts:f,chainId:p,connector:d}}else n=t.state.connections.get(t.state.current);if(!n)throw new JA;let i=e.chainId??n.chainId,s=await n.connector.getChainId();if(r&&s!==i)throw new w6({connectionChainId:i,connectorChainId:s});let o=n.connector;if(o.getClient)return o.getClient({chainId:i});let a=Ze(e.account??n.accounts[0]);if(a&&(a.address=_r(a.address)),e.account&&!n.accounts.some(d=>d.toLowerCase()===a.address.toLowerCase()))throw new b6({address:a.address,connector:o});let c=t.chains.find(d=>d.id===i),l=await n.connector.getProvider({chainId:i});return Im({account:a,chain:c,name:\\\"Connector Client\\\",transport:d=>QA(l)({...d,retryCount:0})})}u();async function u6e(t,e={}){let r;if(e.connector)r=e.connector;else{let{connections:i,current:s}=t.state;r=i.get(s)?.connector}let n=t.state.connections;r&&(await r.disconnect(),r.emitter.off(\\\"change\\\",t._internal.events.change),r.emitter.off(\\\"disconnect\\\",t._internal.events.disconnect),r.emitter.on(\\\"connect\\\",t._internal.events.connect),n.delete(r.uid)),t.setState(i=>{if(n.size===0)return{...i,connections:new Map,current:null,status:\\\"disconnected\\\"};let s=n.values().next().value;return{...i,connections:new Map(n),current:s.connector.uid}});{let i=t.state.current;if(!i)return;let s=t.state.connections.get(i)?.connector;if(!s)return;await t.storage?.setItem(\\\"recentConnectorId\\\",s.id)}}u();function YA(t){let e=t.state.current,r=t.state.connections.get(e),n=r?.accounts,i=n?.[0],s=t.chains.find(a=>a.id===r?.chainId),o=t.state.status;switch(o){case\\\"connected\\\":return{address:i,addresses:n,chain:s,chainId:r?.chainId,connector:r?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case\\\"reconnecting\\\":return{address:i,addresses:n,chain:s,chainId:r?.chainId,connector:r?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case\\\"connecting\\\":return{address:i,addresses:n,chain:s,chainId:r?.chainId,connector:r?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case\\\"disconnected\\\":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}u();function XB(t){return t.state.chainId}u();u();function Pc(t,e){if(t===e)return!0;if(t&&e&&typeof t==\\\"object\\\"&&typeof e==\\\"object\\\"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Pc(t[n],e[n]))return!1;return!0}if(typeof t.valueOf==\\\"function\\\"&&t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(typeof t.toString==\\\"function\\\"&&t.toString!==Object.prototype.toString)return t.toString()===e.toString();let i=Object.keys(t);if(r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.hasOwn(e,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(s&&!Pc(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}var KJ=[];function eM(t){let e=t.chains;return Pc(KJ,e)?KJ:(KJ=e,e)}u();var tM=[];function x6(t){let e=[...t.state.connections.values()];return t.state.status===\\\"reconnecting\\\"||Pc(tM,e)?tM:(tM=e,e)}u();var rM=[];function nM(t){let e=t.connectors;return rM.length===e.length&&rM.every((r,n)=>r===e[n])?rM:(rM=e,e)}u();un();async function d6e(t,e={}){return(await l6e(t,e)).extend(WJ)}u();var ZJ=!1;async function f6e(t,e={}){if(ZJ)return[];ZJ=!0,t.setState(l=>({...l,status:l.current?\\\"reconnecting\\\":\\\"connecting\\\"}));let r=[];if(e.connectors?.length)for(let l of e.connectors){let d;typeof l==\\\"function\\\"?d=t._internal.connectors.setup(l):d=l,r.push(d)}else r.push(...t.connectors);let n;try{n=await t.storage?.getItem(\\\"recentConnectorId\\\")}catch{}let i={};for(let[,l]of t.state.connections)i[l.connector.id]=1;n&&(i[n]=0);let s=Object.keys(i).length>0?[...r].sort((l,d)=>(i[l.id]??10)-(i[d.id]??10)):r,o=!1,a=[],c=[];for(let l of s){let d=await l.getProvider().catch(()=>{});if(!d||c.some(h=>h===d)||!await l.isAuthorized())continue;let p=await l.connect({isReconnecting:!0}).catch(()=>null);p&&(l.emitter.off(\\\"connect\\\",t._internal.events.connect),l.emitter.on(\\\"change\\\",t._internal.events.change),l.emitter.on(\\\"disconnect\\\",t._internal.events.disconnect),t.setState(h=>{let m=new Map(o?h.connections:new Map).set(l.uid,{accounts:p.accounts,chainId:p.chainId,connector:l});return{...h,current:o?h.current:l.uid,connections:m}}),a.push({accounts:p.accounts,chainId:p.chainId,connector:l}),c.push(d),o=!0)}return(t.state.status===\\\"reconnecting\\\"||t.state.status===\\\"connecting\\\")&&(o?t.setState(l=>({...l,status:\\\"connected\\\"})):t.setState(l=>({...l,connections:new Map,current:null,status:\\\"disconnected\\\"}))),ZJ=!1,a}u();u();var Oc=class extends $a{constructor(){super(\\\"Provider not found.\\\"),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"ProviderNotFoundError\\\"})}},E6=class extends $a{constructor({connector:e}){super(`\\\"${e.name}\\\" does not support programmatic chain switching.`),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"SwitchChainNotSupportedError\\\"})}};async function p6e(t,e){let{addEthereumChainParameter:r,chainId:n}=e,i=t.state.connections.get(e.connector?.uid??t.state.current);if(i){let o=i.connector;if(!o.switchChain)throw new E6({connector:o});return await o.switchChain({addEthereumChainParameter:r,chainId:n})}let s=t.chains.find(o=>o.id===n);if(!s)throw new ga;return t.setState(o=>({...o,chainId:n})),s}u();function QJ(t,e){let{onChange:r}=e;return t.subscribe(()=>YA(t),r,{equalityFn(n,i){let{connector:s,...o}=n,{connector:a,...c}=i;return Pc(o,c)&&s?.id===a?.id&&s?.uid===a?.uid}})}u();function JJ(t,e){let{onChange:r}=e;return t.subscribe(n=>n.chainId,r)}u();function YJ(t,e){let{onChange:r}=e;return t.subscribe(()=>x6(t),r,{equalityFn:Pc})}u();function XJ(t,e){let{onChange:r}=e;return t._internal.connectors.subscribe((n,i)=>{r(Object.values(n),i)})}u();un();Om.type=\\\"injected\\\";function Om(t={}){let{shimDisconnect:e=!0,unstable_shimAsyncInject:r}=t;function n(){let c=t.target;if(typeof c==\\\"function\\\"){let l=c();if(l)return l}return typeof c==\\\"object\\\"?c:typeof c==\\\"string\\\"?{...fpt[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:\\\"injected\\\",name:\\\"Injected\\\",provider(l){return l?.ethereum}}}let i,s,o,a;return c=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},get supportsSimulation(){return!0},type:Om.type,async setup(){let l=await this.getProvider();l?.on&&t.target&&(o||(o=this.onConnect.bind(this),l.on(\\\"connect\\\",o)),i||(i=this.onAccountsChanged.bind(this),l.on(\\\"accountsChanged\\\",i)))},async connect({chainId:l,isReconnecting:d,withCapabilities:f}={}){let p=await this.getProvider();if(!p)throw new Oc;let h=[];if(d)h=await this.getAccounts().catch(()=>[]);else if(e)try{h=(await p.request({method:\\\"wallet_requestPermissions\\\",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(g=>_r(g)),h.length>0&&(h=await this.getAccounts())}catch(m){let g=m;if(g.code===Cr.code)throw new Cr(g);if(g.code===Ld.code)throw g}try{!h?.length&&!d&&(h=(await p.request({method:\\\"eth_requestAccounts\\\"})).map(w=>_r(w))),o&&(p.removeListener(\\\"connect\\\",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),p.on(\\\"accountsChanged\\\",i)),s||(s=this.onChainChanged.bind(this),p.on(\\\"chainChanged\\\",s)),a||(a=this.onDisconnect.bind(this),p.on(\\\"disconnect\\\",a));let m=await this.getChainId();return l&&m!==l&&(m=(await this.switchChain({chainId:l}).catch(w=>{if(w.code===Cr.code)throw w;return{id:m}}))?.id??m),e&&await c.storage?.removeItem(`${this.id}.disconnected`),t.target||await c.storage?.setItem(\\\"injected.connected\\\",!0),{accounts:f?h.map(g=>({address:g,capabilities:{}})):h,chainId:m}}catch(m){let g=m;throw g.code===Cr.code?new Cr(g):g.code===Ld.code?new Ld(g):g}},async disconnect(){let l=await this.getProvider();if(!l)throw new Oc;s&&(l.removeListener(\\\"chainChanged\\\",s),s=void 0),a&&(l.removeListener(\\\"disconnect\\\",a),a=void 0),o||(o=this.onConnect.bind(this),l.on(\\\"connect\\\",o));try{await DA(()=>l.request({method:\\\"wallet_revokePermissions\\\",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await c.storage?.setItem(`${this.id}.disconnected`,!0),t.target||await c.storage?.removeItem(\\\"injected.connected\\\")},async getAccounts(){let l=await this.getProvider();if(!l)throw new Oc;return(await l.request({method:\\\"eth_accounts\\\"})).map(f=>_r(f))},async getChainId(){let l=await this.getProvider();if(!l)throw new Oc;let d=await l.request({method:\\\"eth_chainId\\\"});return Number(d)},async getProvider(){if(typeof window>\\\"u\\\")return;let l,d=n();return typeof d.provider==\\\"function\\\"?l=d.provider(window):typeof d.provider==\\\"string\\\"?l=iM(window,d.provider):l=d.provider,l&&!l.removeListener&&(\\\"off\\\"in l&&typeof l.off==\\\"function\\\"?l.removeListener=l.off:l.removeListener=()=>{}),l},async isAuthorized(){try{if(e&&await c.storage?.getItem(`${this.id}.disconnected`)||!t.target&&!await c.storage?.getItem(\\\"injected.connected\\\"))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){let p=async()=>(typeof window<\\\"u\\\"&&window.removeEventListener(\\\"ethereum#initialized\\\",p),!!await this.getProvider()),h=typeof r==\\\"number\\\"?r:1e3;if(await Promise.race([...typeof window<\\\"u\\\"?[new Promise(g=>window.addEventListener(\\\"ethereum#initialized\\\",()=>g(p()),{once:!0}))]:[],new Promise(g=>setTimeout(()=>g(p()),h))]))return!0}throw new Oc}return!!(await hp(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:d}){let f=await this.getProvider();if(!f)throw new Oc;let p=c.chains.find(m=>m.id===d);if(!p)throw new Do(new ga);let h=new Promise(m=>{let g=(w=>{\\\"chainId\\\"in w&&w.chainId===d&&(c.emitter.off(\\\"change\\\",g),m())});c.emitter.on(\\\"change\\\",g)});try{return await Promise.all([f.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:Z(d)}]}).then(async()=>{await this.getChainId()===d&&c.emitter.emit(\\\"change\\\",{chainId:d})}),h]),p}catch(m){let g=m;if(g.code===4902||g?.data?.originalError?.code===4902)try{let{default:w,...v}=p.blockExplorers??{},b;l?.blockExplorerUrls?b=l.blockExplorerUrls:w&&(b=[w.url,...Object.values(v).map(T=>T.url)]);let _;l?.rpcUrls?.length?_=l.rpcUrls:_=[p.rpcUrls.default?.http[0]??\\\"\\\"];let S={blockExplorerUrls:b,chainId:Z(d),chainName:l?.chainName??p.name,iconUrls:l?.iconUrls,nativeCurrency:l?.nativeCurrency??p.nativeCurrency,rpcUrls:_};return await Promise.all([f.request({method:\\\"wallet_addEthereumChain\\\",params:[S]}).then(async()=>{if(await this.getChainId()===d)c.emitter.emit(\\\"change\\\",{chainId:d});else throw new Cr(new Error(\\\"User rejected switch after adding network.\\\"))}),h]),p}catch(w){throw new Cr(w)}throw g.code===Cr.code?new Cr(g):new Do(g)}},async onAccountsChanged(l){if(l.length===0)this.onDisconnect();else if(c.emitter.listenerCount(\\\"connect\\\")){let d=(await this.getChainId()).toString();this.onConnect({chainId:d}),e&&await c.storage?.removeItem(`${this.id}.disconnected`)}else c.emitter.emit(\\\"change\\\",{accounts:l.map(d=>_r(d))})},onChainChanged(l){let d=Number(l);c.emitter.emit(\\\"change\\\",{chainId:d})},async onConnect(l){let d=await this.getAccounts();if(d.length===0)return;let f=Number(l.chainId);c.emitter.emit(\\\"connect\\\",{accounts:d,chainId:f});let p=await this.getProvider();p&&(o&&(p.removeListener(\\\"connect\\\",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),p.on(\\\"accountsChanged\\\",i)),s||(s=this.onChainChanged.bind(this),p.on(\\\"chainChanged\\\",s)),a||(a=this.onDisconnect.bind(this),p.on(\\\"disconnect\\\",a)))},async onDisconnect(l){let d=await this.getProvider();l&&l.code===1013&&d&&(await this.getAccounts()).length||(c.emitter.emit(\\\"disconnect\\\"),d&&(s&&(d.removeListener(\\\"chainChanged\\\",s),s=void 0),a&&(d.removeListener(\\\"disconnect\\\",a),a=void 0),o||(o=this.onConnect.bind(this),d.on(\\\"connect\\\",o))))}})}var fpt={coinbaseWallet:{id:\\\"coinbaseWallet\\\",name:\\\"Coinbase Wallet\\\",provider(t){return t?.coinbaseWalletExtension?t.coinbaseWalletExtension:iM(t,\\\"isCoinbaseWallet\\\")}},metaMask:{id:\\\"metaMask\\\",name:\\\"MetaMask\\\",provider(t){return iM(t,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;let r=[\\\"isApexWallet\\\",\\\"isAvalanche\\\",\\\"isBitKeep\\\",\\\"isBlockWallet\\\",\\\"isKuCoinWallet\\\",\\\"isMathWallet\\\",\\\"isOkxWallet\\\",\\\"isOKExWallet\\\",\\\"isOneInchIOSWallet\\\",\\\"isOneInchAndroidWallet\\\",\\\"isOpera\\\",\\\"isPhantom\\\",\\\"isPortal\\\",\\\"isRabby\\\",\\\"isTokenPocket\\\",\\\"isTokenary\\\",\\\"isUniswapWallet\\\",\\\"isZerion\\\"];for(let n of r)if(e[n])return!1;return!0})}},phantom:{id:\\\"phantom\\\",name:\\\"Phantom\\\",provider(t){return t?.phantom?.ethereum?t.phantom?.ethereum:iM(t,\\\"isPhantom\\\")}}};function iM(t,e){function r(i){return typeof e==\\\"function\\\"?e(i):typeof e==\\\"string\\\"?i[e]:!0}let n=t.ethereum;if(n?.providers)return n.providers.find(i=>r(i));if(n&&r(n))return n}u();y6e();un();u();var ppt=t=>(e,r,n)=>{let i=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){let d=c?.equalityFn||Object.is,f=o(n.getState());l=p=>{let h=o(p);if(!d(f,h)){let m=f;a(f=h,m)}},c?.fireImmediately&&a(f,f)}return i(l)},t(e,r,n)},b6e=ppt;function hpt(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var s;let o=c=>c===null?null:JSON.parse(c,e?.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,e?.replacer)),removeItem:i=>r.removeItem(i)}}var tY=t=>e=>{try{let r=t(e);return r instanceof Promise?r:{then(n){return tY(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return tY(n)(r)}}}},mpt=(t,e)=>(r,n,i)=>{let s={storage:hpt(()=>localStorage),partialize:g=>g,version:0,merge:(g,w)=>({...w,...g}),...e},o=!1,a=new Set,c=new Set,l=s.storage;if(!l)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...g)},n,i);let d=()=>{let g=s.partialize({...n()});return l.setItem(s.name,{state:g,version:s.version})},f=i.setState;i.setState=(g,w)=>{f(g,w),d()};let p=t((...g)=>{r(...g),d()},n,i);i.getInitialState=()=>p;let h,m=()=>{var g,w;if(!l)return;o=!1,a.forEach(b=>{var _;return b((_=n())!=null?_:p)});let v=((w=s.onRehydrateStorage)==null?void 0:w.call(s,(g=n())!=null?g:p))||void 0;return tY(l.getItem.bind(l))(s.name).then(b=>{if(b)if(typeof b.version==\\\"number\\\"&&b.version!==s.version){if(s.migrate)return[!0,s.migrate(b.state,b.version)];console.error(\\\"State loaded from storage couldn't be migrated since no migrate function was provided\\\")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var _;let[S,T]=b;if(h=s.merge(T,(_=n())!=null?_:p),r(h,!0),S)return d()}).then(()=>{v?.(h,void 0),h=n(),o=!0,c.forEach(b=>b(h))}).catch(b=>{v?.(void 0,b)})};return i.persist={setOptions:g=>{s={...s,...g},g.storage&&(l=g.storage)},clearStorage:()=>{l?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(c.add(g),()=>{c.delete(g)})},s.skipHydration||m(),h||p},w6e=mpt;u();var v6e=t=>{let e,r=new Set,n=(l,d)=>{let f=typeof l==\\\"function\\\"?l(e):l;if(!Object.is(f,e)){let p=e;e=d??(typeof f!=\\\"object\\\"||f===null)?f:Object.assign({},e,f),r.forEach(h=>h(e,p))}},i=()=>e,a={setState:n,getState:i,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=e=t(n,i,a);return a},sM=t=>t?v6e(t):v6e;u();aM();var nY=class{constructor(e){Object.defineProperty(this,\\\"uid\\\",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,\\\"_emitter\\\",{enumerable:!0,configurable:!0,writable:!0,value:new _6.default})}on(e,r){this._emitter.on(e,r)}once(e,r){this._emitter.once(e,r)}off(e,r){this._emitter.off(e,r)}emit(e,...r){let n=r[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}};function _6e(t){return new nY(t)}u();u();function iY(t,e){return JSON.parse(t,(r,n)=>{let i=n;return i?.__type===\\\"bigint\\\"&&(i=BigInt(i.value)),i?.__type===\\\"Map\\\"&&(i=new Map(i.value)),e?.(r,i)??i})}u();function C6e(t,e){return t.slice(0,e).join(\\\".\\\")||\\\".\\\"}function S6e(t,e){let{length:r}=t;for(let n=0;n<r;++n)if(t[n]===e)return n+1;return 0}function bpt(t,e){let r=typeof t==\\\"function\\\",n=typeof e==\\\"function\\\",i=[],s=[];return function(a,c){if(typeof c==\\\"object\\\")if(i.length){let l=S6e(i,this);l===0?i[i.length]=this:(i.splice(l),s.splice(l)),s[s.length]=a;let d=S6e(i,c);if(d!==0)return n?e.call(this,a,c,C6e(s,d)):`[ref=${C6e(s,d)}]`}else i[0]=c,s[0]=a;return r?t.call(this,a,c):c}}function sY(t,e,r,n){return JSON.stringify(t,bpt((i,s)=>{let o=s;return typeof o==\\\"bigint\\\"&&(o={__type:\\\"bigint\\\",value:s.toString()}),o instanceof Map&&(o={__type:\\\"Map\\\",value:Array.from(s.entries())}),e?.(i,o)??o},n),r??void 0)}function oY(t){let{deserialize:e=iY,key:r=\\\"wagmi\\\",serialize:n=sY,storage:i=aY}=t;function s(o){return o instanceof Promise?o.then(a=>a).catch(()=>null):o}return{...i,key:r,async getItem(o,a){let c=i.getItem(`${r}.${o}`),l=await s(c);return l?e(l)??null:a??null},async setItem(o,a){let c=`${r}.${o}`;a===null?await s(i.removeItem(c)):await s(i.setItem(c,n(a)))},async removeItem(o){await s(i.removeItem(`${r}.${o}`))}}}var aY={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function A6e(){let t=typeof window<\\\"u\\\"&&window.localStorage?window.localStorage:aY;return{getItem(e){return t.getItem(e)},removeItem(e){t.removeItem(e)},setItem(e,r){try{t.setItem(e,r)}catch{}}}}u();var cM=256,lM;function T6e(t=11){if(!lM||cM+t>256*2){lM=\\\"\\\",cM=0;for(let e=0;e<256;e++)lM+=(256+Math.random()*256|0).toString(16).substring(1)}return lM.substring(cM,cM+++t)}function uM(t){let{multiInjectedProviderDiscovery:e=!0,storage:r=oY({storage:A6e()}),syncConnectedChain:n=!0,ssr:i=!1,...s}=t,o=typeof window<\\\"u\\\"&&e?eY():void 0,a=sM(()=>s.chains),c=sM(()=>{let T=[],N=new Set;for(let O of s.connectors??[]){let L=l(O);if(T.push(L),!i&&L.rdns){let B=typeof L.rdns==\\\"string\\\"?[L.rdns]:L.rdns;for(let H of B)N.add(H)}}if(!i&&o){let O=o.getProviders();for(let L of O)N.has(L.info.rdns)||T.push(l(d(L)))}return T});function l(T){let N=_6e(T6e()),O={...T({emitter:N,chains:a.getState(),storage:r,transports:s.transports}),emitter:N,uid:N.uid};return N.on(\\\"connect\\\",_),O.setup?.(),O}function d(T){let{info:N}=T,O=T.provider;return Om({target:{...N,id:N.rdns,provider:O}})}let f=new Map;function p(T={}){let N=T.chainId??w.getState().chainId,O=a.getState().find(B=>B.id===N);if(T.chainId&&!O)throw new ga;{let B=f.get(w.getState().chainId);if(B&&!O)return B;if(!O)throw new ga}{let B=f.get(N);if(B)return B}let L;if(s.client)L=s.client({chain:O});else{let B=O.id,H=a.getState().map(R=>R.id),M={},F=Object.entries(s);for(let[R,y]of F)if(!(R===\\\"chains\\\"||R===\\\"client\\\"||R===\\\"connectors\\\"||R===\\\"transports\\\"))if(typeof y==\\\"object\\\")if(B in y)M[R]=y[B];else{if(H.some(C=>C in y))continue;M[R]=y}else M[R]=y;L=Im({...M,chain:O,batch:M.batch??{multicall:!0},transport:R=>s.transports[B]({...R,connectors:c})})}return f.set(N,L),L}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:\\\"disconnected\\\"}}let m,g=\\\"0.0.0-canary-\\\";g6.startsWith(g)?m=Number.parseInt(g6.replace(g,\\\"\\\"),10):m=Number.parseInt(g6.split(\\\".\\\")[0]??\\\"0\\\",10);let w=sM(b6e(r?w6e(h,{migrate(T,N){if(N===m)return T;let O=h(),L=v(T,O.chainId);return{...O,chainId:L}},name:\\\"store\\\",partialize(T){return{connections:{__type:\\\"Map\\\",value:Array.from(T.connections.entries()).map(([N,O])=>{let{id:L,name:B,type:H,uid:M}=O.connector;return[N,{...O,connector:{id:L,name:B,type:H,uid:M}}]})},chainId:T.chainId,current:T.current}},merge(T,N){typeof T==\\\"object\\\"&&T&&\\\"status\\\"in T&&delete T.status;let O=v(T,N.chainId);return{...N,...T,chainId:O}},skipHydration:i,storage:r,version:m}):h));w.setState(h());function v(T,N){return T&&typeof T==\\\"object\\\"&&\\\"chainId\\\"in T&&typeof T.chainId==\\\"number\\\"&&a.getState().some(O=>O.id===T.chainId)?T.chainId:N}n&&w.subscribe(({connections:T,current:N})=>N?T.get(N)?.chainId:void 0,T=>{if(a.getState().some(O=>O.id===T))return w.setState(O=>({...O,chainId:T??O.chainId}))}),o?.subscribe(T=>{let N=new Set,O=new Set;for(let B of c.getState())if(N.add(B.id),B.rdns){let H=typeof B.rdns==\\\"string\\\"?[B.rdns]:B.rdns;for(let M of H)O.add(M)}let L=[];for(let B of T){if(O.has(B.info.rdns))continue;let H=l(d(B));N.has(H.id)||L.push(H)}r&&!w.persist.hasHydrated()||c.setState(B=>[...B,...L],!0)});function b(T){w.setState(N=>{let O=N.connections.get(T.uid);return O?{...N,connections:new Map(N.connections).set(T.uid,{accounts:T.accounts??O.accounts,chainId:T.chainId??O.chainId,connector:O.connector})}:N})}function _(T){w.getState().status===\\\"connecting\\\"||w.getState().status===\\\"reconnecting\\\"||w.setState(N=>{let O=c.getState().find(L=>L.uid===T.uid);return O?(O.emitter.listenerCount(\\\"connect\\\")&&O.emitter.off(\\\"connect\\\",b),O.emitter.listenerCount(\\\"change\\\")||O.emitter.on(\\\"change\\\",b),O.emitter.listenerCount(\\\"disconnect\\\")||O.emitter.on(\\\"disconnect\\\",S),{...N,connections:new Map(N.connections).set(T.uid,{accounts:T.accounts,chainId:T.chainId,connector:O}),current:T.uid,status:\\\"connected\\\"}):N})}function S(T){w.setState(N=>{let O=N.connections.get(T.uid);if(O){let B=O.connector;B.emitter.listenerCount(\\\"change\\\")&&O.connector.emitter.off(\\\"change\\\",b),B.emitter.listenerCount(\\\"disconnect\\\")&&O.connector.emitter.off(\\\"disconnect\\\",S),B.emitter.listenerCount(\\\"connect\\\")||O.connector.emitter.on(\\\"connect\\\",_)}if(N.connections.delete(T.uid),N.connections.size===0)return{...N,connections:new Map,current:null,status:\\\"disconnected\\\"};let L=N.connections.values().next().value;return{...N,connections:new Map(N.connections),current:L.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:r,getClient:p,get state(){return w.getState()},setState(T){let N;typeof T==\\\"function\\\"?N=T(w.getState()):N=T;let O=h();typeof N!=\\\"object\\\"&&(N=O),Object.keys(O).some(B=>!(B in N))&&(N=O),w.setState(N,!0)},subscribe(T,N,O){return w.subscribe(T,N,O?{...O,fireImmediately:O.emitImmediately}:void 0)},_internal:{mipd:o,async revalidate(){let T=w.getState(),N=T.connections,O=T.current;for(let[,L]of N){let B=L.connector;B.isAuthorized&&await B.isAuthorized()||(N.delete(B.uid),O===B.uid&&(O=null))}w.setState(L=>({...L,connections:N,current:O}))},store:w,ssr:!!i,syncConnectedChain:n,transports:s.transports,chains:{setState(T){let N=typeof T==\\\"function\\\"?T(a.getState()):T;if(N.length!==0)return a.setState(N,!0)},subscribe(T){return a.subscribe(T)}},connectors:{providerDetailToConnector:d,setup:l,setState(T){return c.setState(typeof T==\\\"function\\\"?T(c.getState()):T,!0)},subscribe(T){return c.subscribe(T)}},events:{change:b,connect:_,disconnect:S}}}}u();function cY(t,e){let{initialState:r,reconnectOnMount:n}=e;return r&&!t._internal.store.persist.hasHydrated()&&t.setState({...r,chainId:t.chains.some(i=>i.id===r.chainId)?r.chainId:t.chains[0].id,connections:n?r.connections:new Map,status:n?\\\"reconnecting\\\":\\\"disconnected\\\"}),{async onMount(){t._internal.ssr&&(await t._internal.store.persist.rehydrate(),t._internal.mipd&&t._internal.connectors.setState(i=>{let s=new Set;for(let c of i??[])if(c.rdns){let l=Array.isArray(c.rdns)?c.rdns:[c.rdns];for(let d of l)s.add(d)}let o=[],a=t._internal.mipd?.getProviders()??[];for(let c of a){if(s.has(c.info.rdns))continue;let l=t._internal.connectors.providerDetailToConnector(c),d=t._internal.connectors.setup(l);o.push(d)}return[...i,...o]})),n?f6e(t):t.storage&&t.setState(i=>({...i,connections:new Map}))}}}un();u();function lY(t){let{chain:e}=t,r=e.rpcUrls.default.http[0];if(!t.transports)return[r];let n=t.transports?.[e.id]?.({chain:e});return(n?.value?.transports||[n]).map(({value:s})=>s?.url||r)}var dM=Me(Vi(),1);function I6e(t){let{children:e,config:r,initialState:n,reconnectOnMount:i=!0}=t,{onMount:s}=cY(r,{initialState:n,reconnectOnMount:i});r._internal.ssr||s();let o=(0,dM.useRef)(!0);return(0,dM.useEffect)(()=>{if(o.current&&r._internal.ssr)return s(),()=>{o.current=!1}},[]),e}var tT=(0,eT.createContext)(void 0);function fM(t){let{children:e,config:r}=t,n={value:r};return(0,eT.createElement)(I6e,t,(0,eT.createElement)(tT.Provider,n,e))}u();u();u();var R6e=\\\"2.19.5\\\";var P6e=()=>`wagmi@${R6e}`;var pM=class extends $a{constructor(){super(...arguments),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"WagmiError\\\"})}get docsBaseUrl(){return\\\"https://wagmi.sh/react\\\"}get version(){return P6e()}};u();var hM=class extends pM{constructor(){super(\\\"`useConfig` must be used within `WagmiProvider`.\\\",{docsPath:\\\"/api/WagmiProvider\\\"}),Object.defineProperty(this,\\\"name\\\",{enumerable:!0,configurable:!0,writable:!0,value:\\\"WagmiProviderNotFoundError\\\"})}};u();u();var O6e=Me(Vi(),1);function oo(t={}){let e=t.config??(0,O6e.useContext)(tT);if(!e)throw new hM;return e}u();u();u();function uY(t,e){let{onChange:r}=e;return t._internal.chains.subscribe((n,i)=>{r(n,i)})}var gM=Me(Vi(),1),j6e=Me(F6e(),1),fY=t=>typeof t==\\\"object\\\"&&!Array.isArray(t);function H6e(t,e,r=e,n=Pc){let i=(0,gM.useRef)([]),s=(0,j6e.useSyncExternalStoreWithSelector)(t,e,r,o=>o,(o,a)=>{if(fY(o)&&fY(a)&&i.current.length){for(let c of i.current)if(!n(o[c],a[c]))return!1;return!0}return n(o,a)});return(0,gM.useMemo)(()=>{if(fY(s)){let o={...s},a={};for(let[c,l]of Object.entries(o))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),l)}};return Object.defineProperties(o,a),o}return s},[s])}function rT(t={}){let e=oo(t);return H6e(r=>QJ(e,{onChange:r}),()=>YA(e))}u();u();u();u();u();var Pu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Fw,vy,S6,q6e,Upt=(q6e=class extends Pu{constructor(){super();Fe(this,Fw);Fe(this,vy);Fe(this,S6);Ae(this,S6,e=>{if(typeof window<\\\"u\\\"&&window.addEventListener){let r=()=>e();return window.addEventListener(\\\"visibilitychange\\\",r,!1),()=>{window.removeEventListener(\\\"visibilitychange\\\",r)}}})}onSubscribe(){V(this,vy)||this.setEventListener(V(this,S6))}onUnsubscribe(){var e;this.hasListeners()||((e=V(this,vy))==null||e.call(this),Ae(this,vy,void 0))}setEventListener(e){var r;Ae(this,S6,e),(r=V(this,vy))==null||r.call(this),Ae(this,vy,e(n=>{typeof n==\\\"boolean\\\"?this.setFocused(n):this.onFocus()}))}setFocused(e){V(this,Fw)!==e&&(Ae(this,Fw,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof V(this,Fw)==\\\"boolean\\\"?V(this,Fw):globalThis.document?.visibilityState!==\\\"hidden\\\"}},Fw=new WeakMap,vy=new WeakMap,S6=new WeakMap,q6e),A6=new Upt;u();u();u();var Fpt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},xy,pY,z6e,jpt=(z6e=class{constructor(){Fe(this,xy,Fpt);Fe(this,pY,!1)}setTimeoutProvider(t){Ae(this,xy,t)}setTimeout(t,e){return V(this,xy).setTimeout(t,e)}clearTimeout(t){V(this,xy).clearTimeout(t)}setInterval(t,e){return V(this,xy).setInterval(t,e)}clearInterval(t){V(this,xy).clearInterval(t)}},xy=new WeakMap,pY=new WeakMap,z6e),gp=new jpt;function $6e(t){setTimeout(t,0)}var mY=typeof window>\\\"u\\\"||\\\"Deno\\\"in globalThis;function Ji(){}function G6e(t,e){return typeof t==\\\"function\\\"?t(e):t}function nT(t){return typeof t==\\\"number\\\"&&t>=0&&t!==1/0}function yM(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Kd(t,e){return typeof t==\\\"function\\\"?t(e):t}function Nc(t,e){return typeof t==\\\"function\\\"?t(e):t}function bM(t,e){let{type:r=\\\"all\\\",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==iT(o,e.options))return!1}else if(!jw(e.queryKey,o))return!1}if(r!==\\\"all\\\"){let c=e.isActive();if(r===\\\"active\\\"&&!c||r===\\\"inactive\\\"&&c)return!1}return!(typeof a==\\\"boolean\\\"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function wM(t,e){let{exact:r,status:n,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(r){if(yp(e.options.mutationKey)!==yp(s))return!1}else if(!jw(e.options.mutationKey,s))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function iT(t,e){return(e?.queryKeyHashFn||yp)(t)}function yp(t){return JSON.stringify(t,(e,r)=>hY(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function jw(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t==\\\"object\\\"&&typeof e==\\\"object\\\"?Object.keys(e).every(r=>jw(t[r],e[r])):!1}var Hpt=Object.prototype.hasOwnProperty;function gY(t,e,r=0){if(t===e)return t;if(r>500)return e;let n=V6e(t)&&V6e(e);if(!n&&!(hY(t)&&hY(e)))return e;let s=(n?t:Object.keys(t)).length,o=n?e:Object.keys(e),a=o.length,c=n?new Array(a):{},l=0;for(let d=0;d<a;d++){let f=n?d:o[d],p=t[f],h=e[f];if(p===h){c[f]=p,(n?d<s:Hpt.call(t,f))&&l++;continue}if(p===null||h===null||typeof p!=\\\"object\\\"||typeof h!=\\\"object\\\"){c[f]=h;continue}let m=gY(p,h,r+1);c[f]=m,m===p&&l++}return s===a&&l===s?t:c}function T6(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function V6e(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hY(t){if(!W6e(t))return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(!W6e(r)||!r.hasOwnProperty(\\\"isPrototypeOf\\\")||Object.getPrototypeOf(t)!==Object.prototype)}function W6e(t){return Object.prototype.toString.call(t)===\\\"[object Object]\\\"}function K6e(t){return new Promise(e=>{gp.setTimeout(e,t)})}function sT(t,e,r){return typeof r.structuralSharing==\\\"function\\\"?r.structuralSharing(t,e):r.structuralSharing!==!1?gY(t,e):e}function Z6e(t,e,r=0){let n=[...t,e];return r&&n.length>r?n.slice(1):n}function Q6e(t,e,r=0){let n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var I6=Symbol();function vM(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===I6?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function R6(t,e){return typeof t==\\\"function\\\"?t(...e):!!t}function J6e(t,e,r){let n=!1,i;return Object.defineProperty(t,\\\"signal\\\",{enumerable:!0,get:()=>(i??(i=e()),n||(n=!0,i.aborted?r():i.addEventListener(\\\"abort\\\",r,{once:!0})),i)}),t}var bp=(()=>{let t=()=>mY;return{isServer(){return t()},setIsServer(e){t=e}}})();u();function oT(){let t,e,r=new Promise((i,s)=>{t=i,e=s});r.status=\\\"pending\\\",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:\\\"fulfilled\\\",value:i}),t(i)},r.reject=i=>{n({status:\\\"rejected\\\",reason:i}),e(i)},r}u();u();var Y6e=$6e;function qpt(){let t=[],e=0,r=a=>{a()},n=a=>{a()},i=Y6e,s=a=>{e?t.push(a):i(()=>{r(a)})},o=()=>{let a=t;t=[],a.length&&i(()=>{n(()=>{a.forEach(c=>{r(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{i=a}}}var Gr=qpt();u();u();u();var P6,Ey,O6,X6e,zpt=(X6e=class extends Pu{constructor(){super();Fe(this,P6,!0);Fe(this,Ey);Fe(this,O6);Ae(this,O6,e=>{if(typeof window<\\\"u\\\"&&window.addEventListener){let r=()=>e(!0),n=()=>e(!1);return window.addEventListener(\\\"online\\\",r,!1),window.addEventListener(\\\"offline\\\",n,!1),()=>{window.removeEventListener(\\\"online\\\",r),window.removeEventListener(\\\"offline\\\",n)}}})}onSubscribe(){V(this,Ey)||this.setEventListener(V(this,O6))}onUnsubscribe(){var e;this.hasListeners()||((e=V(this,Ey))==null||e.call(this),Ae(this,Ey,void 0))}setEventListener(e){var r;Ae(this,O6,e),(r=V(this,Ey))==null||r.call(this),Ae(this,Ey,e(this.setOnline.bind(this)))}setOnline(e){V(this,P6)!==e&&(Ae(this,P6,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return V(this,P6)}},P6=new WeakMap,Ey=new WeakMap,O6=new WeakMap,X6e),N6=new zpt;function $pt(t){return Math.min(1e3*2**t,3e4)}function yY(t){return(t??\\\"online\\\")===\\\"online\\\"?N6.isOnline():!0}var xM=class extends Error{constructor(t){super(\\\"CancelledError\\\"),this.revert=t?.revert,this.silent=t?.silent}};function EM(t){let e=!1,r=0,n,i=oT(),s=()=>i.status!==\\\"pending\\\",o=g=>{if(!s()){let w=new xM(g);p(w),t.onCancel?.(w)}},a=()=>{e=!0},c=()=>{e=!1},l=()=>A6.isFocused()&&(t.networkMode===\\\"always\\\"||N6.isOnline())&&t.canRun(),d=()=>yY(t.networkMode)&&t.canRun(),f=g=>{s()||(n?.(),i.resolve(g))},p=g=>{s()||(n?.(),i.reject(g))},h=()=>new Promise(g=>{n=w=>{(s()||l())&&g(w)},t.onPause?.()}).then(()=>{n=void 0,s()||t.onContinue?.()}),m=()=>{if(s())return;let g,w=r===0?t.initialPromise:void 0;try{g=w??t.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(f).catch(v=>{if(s())return;let b=t.retry??(bp.isServer()?0:3),_=t.retryDelay??$pt,S=typeof _==\\\"function\\\"?_(r,v):_,T=b===!0||typeof b==\\\"number\\\"&&r<b||typeof b==\\\"function\\\"&&b(r,v);if(e||!T){p(v);return}r++,t.onFail?.(r,v),K6e(S).then(()=>l()?void 0:h()).then(()=>{e?p(v):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?m():h().then(m),i)}}u();var Hw,e3e,_M=(e3e=class{constructor(){Fe(this,Hw)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nT(this.gcTime)&&Ae(this,Hw,gp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(bp.isServer()?1/0:300*1e3))}clearGcTimeout(){V(this,Hw)&&(gp.clearTimeout(V(this,Hw)),Ae(this,Hw,void 0))}},Hw=new WeakMap,e3e);var qw,k6,Ou,zw,ao,aT,$w,Al,s3e,Nm,n3e,i3e=(n3e=class extends _M{constructor(e){super();Fe(this,Al);Fe(this,qw);Fe(this,k6);Fe(this,Ou);Fe(this,zw);Fe(this,ao);Fe(this,aT);Fe(this,$w);Ae(this,$w,!1),Ae(this,aT,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ae(this,zw,e.client),Ae(this,Ou,V(this,zw).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ae(this,qw,r3e(this.options)),this.state=e.state??V(this,qw),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return V(this,ao)?.promise}setOptions(e){if(this.options={...V(this,aT),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=r3e(this.options);r.data!==void 0&&(this.setState(t3e(r.data,r.dataUpdatedAt)),Ae(this,qw,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===\\\"idle\\\"&&V(this,Ou).remove(this)}setData(e,r){let n=sT(this.state.data,e,this.options);return gt(this,Al,Nm).call(this,{data:n,type:\\\"success\\\",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e,r){gt(this,Al,Nm).call(this,{type:\\\"setState\\\",state:e,setStateOptions:r})}cancel(e){let r=V(this,ao)?.promise;return V(this,ao)?.cancel(e),r?r.then(Ji).catch(Ji):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return V(this,qw)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Nc(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===I6||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Kd(e.options.staleTime,this)===\\\"static\\\"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===\\\"static\\\"?!1:this.state.isInvalidated?!0:!yM(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),V(this,ao)?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),V(this,ao)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),V(this,Ou).notify({type:\\\"observerAdded\\\",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(V(this,ao)&&(V(this,$w)||gt(this,Al,s3e).call(this)?V(this,ao).cancel({revert:!0}):V(this,ao).cancelRetry()),this.scheduleGc()),V(this,Ou).notify({type:\\\"observerRemoved\\\",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||gt(this,Al,Nm).call(this,{type:\\\"invalidate\\\"})}async fetch(e,r){if(this.state.fetchStatus!==\\\"idle\\\"&&V(this,ao)?.status()!==\\\"rejected\\\"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(V(this,ao))return V(this,ao).continueRetry(),V(this,ao).promise}if(e&&this.setOptions(e),!this.options.queryFn){let c=this.observers.find(l=>l.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,i=c=>{Object.defineProperty(c,\\\"signal\\\",{enumerable:!0,get:()=>(Ae(this,$w,!0),n.signal)})},s=()=>{let c=vM(this.options,r),d=(()=>{let f={client:V(this,zw),queryKey:this.queryKey,meta:this.meta};return i(f),f})();return Ae(this,$w,!1),this.options.persister?this.options.persister(c,d,this):c(d)},a=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:V(this,zw),state:this.state,fetchFn:s};return i(c),c})();this.options.behavior?.onFetch(a,this),Ae(this,k6,this.state),(this.state.fetchStatus===\\\"idle\\\"||this.state.fetchMeta!==a.fetchOptions?.meta)&&gt(this,Al,Nm).call(this,{type:\\\"fetch\\\",meta:a.fetchOptions?.meta}),Ae(this,ao,EM({initialPromise:r?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof xM&&c.revert&&this.setState({...V(this,k6),fetchStatus:\\\"idle\\\"}),n.abort()},onFail:(c,l)=>{gt(this,Al,Nm).call(this,{type:\\\"failed\\\",failureCount:c,error:l})},onPause:()=>{gt(this,Al,Nm).call(this,{type:\\\"pause\\\"})},onContinue:()=>{gt(this,Al,Nm).call(this,{type:\\\"continue\\\"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{let c=await V(this,ao).start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),V(this,Ou).config.onSuccess?.(c,this),V(this,Ou).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof xM){if(c.silent)return V(this,ao).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw gt(this,Al,Nm).call(this,{type:\\\"error\\\",error:c}),V(this,Ou).config.onError?.(c,this),V(this,Ou).config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}},qw=new WeakMap,k6=new WeakMap,Ou=new WeakMap,zw=new WeakMap,ao=new WeakMap,aT=new WeakMap,$w=new WeakMap,Al=new WeakSet,s3e=function(){return this.state.fetchStatus===\\\"paused\\\"&&this.state.status===\\\"pending\\\"},Nm=function(e){let r=n=>{switch(e.type){case\\\"failed\\\":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case\\\"pause\\\":return{...n,fetchStatus:\\\"paused\\\"};case\\\"continue\\\":return{...n,fetchStatus:\\\"fetching\\\"};case\\\"fetch\\\":return{...n,...bY(n.data,this.options),fetchMeta:e.meta??null};case\\\"success\\\":let i={...n,...t3e(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:\\\"idle\\\",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,k6,e.manual?i:void 0),i;case\\\"error\\\":let s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:\\\"idle\\\",status:\\\"error\\\",isInvalidated:!0};case\\\"invalidate\\\":return{...n,isInvalidated:!0};case\\\"setState\\\":return{...n,...e.state}}};this.state=r(this.state),Gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),V(this,Ou).notify({query:this,type:\\\"updated\\\",action:e})})},n3e);function bY(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yY(e.networkMode)?\\\"fetching\\\":\\\"paused\\\",...t===void 0&&{error:null,status:\\\"pending\\\"}}}function t3e(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:\\\"success\\\"}}function r3e(t){let e=typeof t.initialData==\\\"function\\\"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt==\\\"function\\\"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?\\\"success\\\":\\\"pending\\\",fetchStatus:\\\"idle\\\"}}var kc,tr,lT,Wa,Vw,B6,km,_y,uT,M6,D6,Ww,Gw,Cy,L6,qr,cT,wY,vY,xY,EY,_Y,CY,SY,l3e,c3e,TY=(c3e=class extends Pu{constructor(e,r){super();Fe(this,qr);Fe(this,kc);Fe(this,tr);Fe(this,lT);Fe(this,Wa);Fe(this,Vw);Fe(this,B6);Fe(this,km);Fe(this,_y);Fe(this,uT);Fe(this,M6);Fe(this,D6);Fe(this,Ww);Fe(this,Gw);Fe(this,Cy);Fe(this,L6,new Set);this.options=r,Ae(this,kc,e),Ae(this,_y,null),Ae(this,km,oT()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,tr).addObserver(this),o3e(V(this,tr),this.options)?gt(this,qr,cT).call(this):this.updateResult(),gt(this,qr,EY).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return AY(V(this,tr),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return AY(V(this,tr),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,gt(this,qr,_Y).call(this),gt(this,qr,CY).call(this),V(this,tr).removeObserver(this)}setOptions(e){let r=this.options,n=V(this,tr);if(this.options=V(this,kc).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=\\\"boolean\\\"&&typeof this.options.enabled!=\\\"function\\\"&&typeof Nc(this.options.enabled,V(this,tr))!=\\\"boolean\\\")throw new Error(\\\"Expected enabled to be a boolean or a callback that returns a boolean\\\");gt(this,qr,SY).call(this),V(this,tr).setOptions(this.options),r._defaulted&&!T6(this.options,r)&&V(this,kc).getQueryCache().notify({type:\\\"observerOptionsUpdated\\\",query:V(this,tr),observer:this});let i=this.hasListeners();i&&a3e(V(this,tr),n,this.options,r)&&gt(this,qr,cT).call(this),this.updateResult(),i&&(V(this,tr)!==n||Nc(this.options.enabled,V(this,tr))!==Nc(r.enabled,V(this,tr))||Kd(this.options.staleTime,V(this,tr))!==Kd(r.staleTime,V(this,tr)))&&gt(this,qr,wY).call(this);let s=gt(this,qr,vY).call(this);i&&(V(this,tr)!==n||Nc(this.options.enabled,V(this,tr))!==Nc(r.enabled,V(this,tr))||s!==V(this,Cy))&&gt(this,qr,xY).call(this,s)}getOptimisticResult(e){let r=V(this,kc).getQueryCache().build(V(this,kc),e),n=this.createResult(r,e);return Wpt(this,n)&&(Ae(this,Wa,n),Ae(this,B6,this.options),Ae(this,Vw,V(this,tr).state)),n}getCurrentResult(){return V(this,Wa)}trackResult(e,r){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),r?.(i),i===\\\"promise\\\"&&(this.trackProp(\\\"data\\\"),!this.options.experimental_prefetchInRender&&V(this,km).status===\\\"pending\\\"&&V(this,km).reject(new Error(\\\"experimental_prefetchInRender feature flag is not enabled\\\"))),Reflect.get(n,i))})}trackProp(e){V(this,L6).add(e)}getCurrentQuery(){return V(this,tr)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let r=V(this,kc).defaultQueryOptions(e),n=V(this,kc).getQueryCache().build(V(this,kc),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return gt(this,qr,cT).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),V(this,Wa)))}createResult(e,r){let n=V(this,tr),i=this.options,s=V(this,Wa),o=V(this,Vw),a=V(this,B6),l=e!==n?e.state:V(this,lT),{state:d}=e,f={...d},p=!1,h;if(r._optimisticResults){let B=this.hasListeners(),H=!B&&o3e(e,r),M=B&&a3e(e,n,r,i);(H||M)&&(f={...f,...bY(d.data,e.options)}),r._optimisticResults===\\\"isRestoring\\\"&&(f.fetchStatus=\\\"idle\\\")}let{error:m,errorUpdatedAt:g,status:w}=f;h=f.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&w===\\\"pending\\\"){let B;s?.isPlaceholderData&&r.placeholderData===a?.placeholderData?(B=s.data,v=!0):B=typeof r.placeholderData==\\\"function\\\"?r.placeholderData(V(this,D6)?.state.data,V(this,D6)):r.placeholderData,B!==void 0&&(w=\\\"success\\\",h=sT(s?.data,B,r),p=!0)}if(r.select&&h!==void 0&&!v)if(s&&h===o?.data&&r.select===V(this,uT))h=V(this,M6);else try{Ae(this,uT,r.select),h=r.select(h),h=sT(s?.data,h,r),Ae(this,M6,h),Ae(this,_y,null)}catch(B){Ae(this,_y,B)}V(this,_y)&&(m=V(this,_y),h=V(this,M6),g=Date.now(),w=\\\"error\\\");let b=f.fetchStatus===\\\"fetching\\\",_=w===\\\"pending\\\",S=w===\\\"error\\\",T=_&&b,N=h!==void 0,L={status:w,fetchStatus:f.fetchStatus,isPending:_,isSuccess:w===\\\"success\\\",isError:S,isInitialLoading:T,isLoading:T,data:h,dataUpdatedAt:f.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:S&&!N,isPaused:f.fetchStatus===\\\"paused\\\",isPlaceholderData:p,isRefetchError:S&&N,isStale:IY(e,r),refetch:this.refetch,promise:V(this,km),isEnabled:Nc(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let B=L.data!==void 0,H=L.status===\\\"error\\\"&&!B,M=y=>{H?y.reject(L.error):B&&y.resolve(L.data)},F=()=>{let y=Ae(this,km,L.promise=oT());M(y)},R=V(this,km);switch(R.status){case\\\"pending\\\":e.queryHash===n.queryHash&&M(R);break;case\\\"fulfilled\\\":(H||L.data!==R.value)&&F();break;case\\\"rejected\\\":(!H||L.error!==R.reason)&&F();break}}return L}updateResult(){let e=V(this,Wa),r=this.createResult(V(this,tr),this.options);if(Ae(this,Vw,V(this,tr).state),Ae(this,B6,this.options),V(this,Vw).data!==void 0&&Ae(this,D6,V(this,tr)),T6(r,e))return;Ae(this,Wa,r);let n=()=>{if(!e)return!0;let{notifyOnChangeProps:i}=this.options,s=typeof i==\\\"function\\\"?i():i;if(s===\\\"all\\\"||!s&&!V(this,L6).size)return!0;let o=new Set(s??V(this,L6));return this.options.throwOnError&&o.add(\\\"error\\\"),Object.keys(V(this,Wa)).some(a=>{let c=a;return V(this,Wa)[c]!==e[c]&&o.has(c)})};gt(this,qr,l3e).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&gt(this,qr,EY).call(this)}},kc=new WeakMap,tr=new WeakMap,lT=new WeakMap,Wa=new WeakMap,Vw=new WeakMap,B6=new WeakMap,km=new WeakMap,_y=new WeakMap,uT=new WeakMap,M6=new WeakMap,D6=new WeakMap,Ww=new WeakMap,Gw=new WeakMap,Cy=new WeakMap,L6=new WeakMap,qr=new WeakSet,cT=function(e){gt(this,qr,SY).call(this);let r=V(this,tr).fetch(this.options,e);return e?.throwOnError||(r=r.catch(Ji)),r},wY=function(){gt(this,qr,_Y).call(this);let e=Kd(this.options.staleTime,V(this,tr));if(bp.isServer()||V(this,Wa).isStale||!nT(e))return;let n=yM(V(this,Wa).dataUpdatedAt,e)+1;Ae(this,Ww,gp.setTimeout(()=>{V(this,Wa).isStale||this.updateResult()},n))},vY=function(){return(typeof this.options.refetchInterval==\\\"function\\\"?this.options.refetchInterval(V(this,tr)):this.options.refetchInterval)??!1},xY=function(e){gt(this,qr,CY).call(this),Ae(this,Cy,e),!(bp.isServer()||Nc(this.options.enabled,V(this,tr))===!1||!nT(V(this,Cy))||V(this,Cy)===0)&&Ae(this,Gw,gp.setInterval(()=>{(this.options.refetchIntervalInBackground||A6.isFocused())&&gt(this,qr,cT).call(this)},V(this,Cy)))},EY=function(){gt(this,qr,wY).call(this),gt(this,qr,xY).call(this,gt(this,qr,vY).call(this))},_Y=function(){V(this,Ww)&&(gp.clearTimeout(V(this,Ww)),Ae(this,Ww,void 0))},CY=function(){V(this,Gw)&&(gp.clearInterval(V(this,Gw)),Ae(this,Gw,void 0))},SY=function(){let e=V(this,kc).getQueryCache().build(V(this,kc),this.options);if(e===V(this,tr))return;let r=V(this,tr);Ae(this,tr,e),Ae(this,lT,e.state),this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))},l3e=function(e){Gr.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(V(this,Wa))}),V(this,kc).getQueryCache().notify({query:V(this,tr),type:\\\"observerResultsUpdated\\\"})})},c3e);function Vpt(t,e){return Nc(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status===\\\"error\\\"&&e.retryOnMount===!1)}function o3e(t,e){return Vpt(t,e)||t.state.data!==void 0&&AY(t,e,e.refetchOnMount)}function AY(t,e,r){if(Nc(e.enabled,t)!==!1&&Kd(e.staleTime,t)!==\\\"static\\\"){let n=typeof r==\\\"function\\\"?r(t):r;return n===\\\"always\\\"||n!==!1&&IY(t,e)}return!1}function a3e(t,e,r,n){return(t!==e||Nc(n.enabled,t)===!1)&&(!r.suspense||t.state.status!==\\\"error\\\")&&IY(t,r)}function IY(t,e){return Nc(e.enabled,t)!==!1&&t.isStaleByTime(Kd(e.staleTime,t))}function Wpt(t,e){return!T6(t.getCurrentResult(),e)}u();function RY(t){return{onFetch:(e,r)=>{let n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],o=e.state.data?.pageParams||[],a={pages:[],pageParams:[]},c=0,l=async()=>{let d=!1,f=m=>{J6e(m,()=>e.signal,()=>d=!0)},p=vM(e.options,e.fetchOptions),h=async(m,g,w)=>{if(d)return Promise.reject();if(g==null&&m.pages.length)return Promise.resolve(m);let b=(()=>{let N={client:e.client,queryKey:e.queryKey,pageParam:g,direction:w?\\\"backward\\\":\\\"forward\\\",meta:e.options.meta};return f(N),N})(),_=await p(b),{maxPages:S}=e.options,T=w?Q6e:Z6e;return{pages:T(m.pages,_,S),pageParams:T(m.pageParams,g,S)}};if(i&&s.length){let m=i===\\\"backward\\\",g=m?Gpt:u3e,w={pages:s,pageParams:o},v=g(n,w);a=await h(w,v,m)}else{let m=t??s.length;do{let g=c===0?o[0]??n.initialPageParam:u3e(n,a);if(c>0&&g==null)break;a=await h(a,g),c++}while(c<m)}return a};e.options.persister?e.fetchFn=()=>e.options.persister?.(l,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=l}}}function u3e(t,{pages:e,pageParams:r}){let n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function Gpt(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}u();u();var dT,wp,ba,Kw,vp,Sy,d3e,f3e=(d3e=class extends _M{constructor(e){super();Fe(this,vp);Fe(this,dT);Fe(this,wp);Fe(this,ba);Fe(this,Kw);Ae(this,dT,e.client),this.mutationId=e.mutationId,Ae(this,ba,e.mutationCache),Ae(this,wp,[]),this.state=e.state||PY(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){V(this,wp).includes(e)||(V(this,wp).push(e),this.clearGcTimeout(),V(this,ba).notify({type:\\\"observerAdded\\\",mutation:this,observer:e}))}removeObserver(e){Ae(this,wp,V(this,wp).filter(r=>r!==e)),this.scheduleGc(),V(this,ba).notify({type:\\\"observerRemoved\\\",mutation:this,observer:e})}optionalRemove(){V(this,wp).length||(this.state.status===\\\"pending\\\"?this.scheduleGc():V(this,ba).remove(this))}continue(){return V(this,Kw)?.continue()??this.execute(this.state.variables)}async execute(e){let r=()=>{gt(this,vp,Sy).call(this,{type:\\\"continue\\\"})},n={client:V(this,dT),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,Kw,EM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error(\\\"No mutationFn found\\\")),onFail:(o,a)=>{gt(this,vp,Sy).call(this,{type:\\\"failed\\\",failureCount:o,error:a})},onPause:()=>{gt(this,vp,Sy).call(this,{type:\\\"pause\\\"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,ba).canRun(this)}));let i=this.state.status===\\\"pending\\\",s=!V(this,Kw).canStart();try{if(i)r();else{gt(this,vp,Sy).call(this,{type:\\\"pending\\\",variables:e,isPaused:s}),V(this,ba).config.onMutate&&await V(this,ba).config.onMutate(e,this,n);let a=await this.options.onMutate?.(e,n);a!==this.state.context&&gt(this,vp,Sy).call(this,{type:\\\"pending\\\",context:a,variables:e,isPaused:s})}let o=await V(this,Kw).start();return await V(this,ba).config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await V(this,ba).config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),gt(this,vp,Sy).call(this,{type:\\\"success\\\",data:o}),o}catch(o){try{await V(this,ba).config.onError?.(o,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await V(this,ba).config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,n)}catch(a){Promise.reject(a)}throw gt(this,vp,Sy).call(this,{type:\\\"error\\\",error:o}),o}finally{V(this,ba).runNext(this)}}},dT=new WeakMap,wp=new WeakMap,ba=new WeakMap,Kw=new WeakMap,vp=new WeakSet,Sy=function(e){let r=n=>{switch(e.type){case\\\"failed\\\":return{...n,failureCount:e.failureCount,failureReason:e.error};case\\\"pause\\\":return{...n,isPaused:!0};case\\\"continue\\\":return{...n,isPaused:!1};case\\\"pending\\\":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:\\\"pending\\\",variables:e.variables,submittedAt:Date.now()};case\\\"success\\\":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:\\\"success\\\",isPaused:!1};case\\\"error\\\":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:\\\"error\\\"}}};this.state=r(this.state),Gr.batch(()=>{V(this,wp).forEach(n=>{n.onMutationUpdate(e)}),V(this,ba).notify({mutation:this,type:\\\"updated\\\",action:e})})},d3e);function PY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:\\\"idle\\\",variables:void 0,submittedAt:0}}var Bm,Zd,fT,p3e,h3e=(p3e=class extends Pu{constructor(e={}){super();Fe(this,Bm);Fe(this,Zd);Fe(this,fT);this.config=e,Ae(this,Bm,new Set),Ae(this,Zd,new Map),Ae(this,fT,0)}build(e,r,n){let i=new f3e({client:e,mutationCache:this,mutationId:++T8(this,fT)._,options:e.defaultMutationOptions(r),state:n});return this.add(i),i}add(e){V(this,Bm).add(e);let r=CM(e);if(typeof r==\\\"string\\\"){let n=V(this,Zd).get(r);n?n.push(e):V(this,Zd).set(r,[e])}this.notify({type:\\\"added\\\",mutation:e})}remove(e){if(V(this,Bm).delete(e)){let r=CM(e);if(typeof r==\\\"string\\\"){let n=V(this,Zd).get(r);if(n)if(n.length>1){let i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&V(this,Zd).delete(r)}}this.notify({type:\\\"removed\\\",mutation:e})}canRun(e){let r=CM(e);if(typeof r==\\\"string\\\"){let i=V(this,Zd).get(r)?.find(s=>s.state.status===\\\"pending\\\");return!i||i===e}else return!0}runNext(e){let r=CM(e);return typeof r==\\\"string\\\"?V(this,Zd).get(r)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gr.batch(()=>{V(this,Bm).forEach(e=>{this.notify({type:\\\"removed\\\",mutation:e})}),V(this,Bm).clear(),V(this,Zd).clear()})}getAll(){return Array.from(V(this,Bm))}find(e){let r={exact:!0,...e};return this.getAll().find(n=>wM(r,n))}findAll(e={}){return this.getAll().filter(r=>wM(e,r))}notify(e){Gr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){let e=this.getAll().filter(r=>r.state.isPaused);return Gr.batch(()=>Promise.all(e.map(r=>r.continue().catch(Ji))))}},Bm=new WeakMap,Zd=new WeakMap,fT=new WeakMap,p3e);function CM(t){return t.options.scope?.id}u();var Mm,Ay,Bc,Dm,Lm,SM,OY,m3e,NY=(m3e=class extends Pu{constructor(e,r){super();Fe(this,Lm);Fe(this,Mm);Fe(this,Ay);Fe(this,Bc);Fe(this,Dm);Ae(this,Mm,e),this.setOptions(r),this.bindMethods(),gt(this,Lm,SM).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let r=this.options;this.options=V(this,Mm).defaultMutationOptions(e),T6(this.options,r)||V(this,Mm).getMutationCache().notify({type:\\\"observerOptionsUpdated\\\",mutation:V(this,Bc),observer:this}),r?.mutationKey&&this.options.mutationKey&&yp(r.mutationKey)!==yp(this.options.mutationKey)?this.reset():V(this,Bc)?.state.status===\\\"pending\\\"&&V(this,Bc).setOptions(this.options)}onUnsubscribe(){this.hasListeners()||V(this,Bc)?.removeObserver(this)}onMutationUpdate(e){gt(this,Lm,SM).call(this),gt(this,Lm,OY).call(this,e)}getCurrentResult(){return V(this,Ay)}reset(){V(this,Bc)?.removeObserver(this),Ae(this,Bc,void 0),gt(this,Lm,SM).call(this),gt(this,Lm,OY).call(this)}mutate(e,r){return Ae(this,Dm,r),V(this,Bc)?.removeObserver(this),Ae(this,Bc,V(this,Mm).getMutationCache().build(V(this,Mm),this.options)),V(this,Bc).addObserver(this),V(this,Bc).execute(e)}},Mm=new WeakMap,Ay=new WeakMap,Bc=new WeakMap,Dm=new WeakMap,Lm=new WeakSet,SM=function(){let e=V(this,Bc)?.state??PY();Ae(this,Ay,{...e,isPending:e.status===\\\"pending\\\",isSuccess:e.status===\\\"success\\\",isError:e.status===\\\"error\\\",isIdle:e.status===\\\"idle\\\",mutate:this.mutate,reset:this.reset})},OY=function(e){Gr.batch(()=>{if(V(this,Dm)&&this.hasListeners()){let r=V(this,Ay).variables,n=V(this,Ay).context,i={client:V(this,Mm),meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===\\\"success\\\"){try{V(this,Dm).onSuccess?.(e.data,r,n,i)}catch(s){Promise.reject(s)}try{V(this,Dm).onSettled?.(e.data,null,r,n,i)}catch(s){Promise.reject(s)}}else if(e?.type===\\\"error\\\"){try{V(this,Dm).onError?.(e.error,r,n,i)}catch(s){Promise.reject(s)}try{V(this,Dm).onSettled?.(void 0,e.error,r,n,i)}catch(s){Promise.reject(s)}}}this.listeners.forEach(r=>{r(V(this,Ay))})})},m3e);u();var xp,g3e,y3e=(g3e=class extends Pu{constructor(e={}){super();Fe(this,xp);this.config=e,Ae(this,xp,new Map)}build(e,r,n){let i=r.queryKey,s=r.queryHash??iT(i,r),o=this.get(s);return o||(o=new i3e({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){V(this,xp).has(e.queryHash)||(V(this,xp).set(e.queryHash,e),this.notify({type:\\\"added\\\",query:e}))}remove(e){let r=V(this,xp).get(e.queryHash);r&&(e.destroy(),r===e&&V(this,xp).delete(e.queryHash),this.notify({type:\\\"removed\\\",query:e}))}clear(){Gr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return V(this,xp).get(e)}getAll(){return[...V(this,xp).values()]}find(e){let r={exact:!0,...e};return this.getAll().find(n=>bM(r,n))}findAll(e={}){let r=this.getAll();return Object.keys(e).length>0?r.filter(n=>bM(e,n)):r}notify(e){Gr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},xp=new WeakMap,g3e);u();var Yi,Ty,Iy,U6,F6,Ry,j6,H6,b3e,kY=(b3e=class{constructor(t={}){Fe(this,Yi);Fe(this,Ty);Fe(this,Iy);Fe(this,U6);Fe(this,F6);Fe(this,Ry);Fe(this,j6);Fe(this,H6);Ae(this,Yi,t.queryCache||new y3e),Ae(this,Ty,t.mutationCache||new h3e),Ae(this,Iy,t.defaultOptions||{}),Ae(this,U6,new Map),Ae(this,F6,new Map),Ae(this,Ry,0)}mount(){T8(this,Ry)._++,V(this,Ry)===1&&(Ae(this,j6,A6.subscribe(async t=>{t&&(await this.resumePausedMutations(),V(this,Yi).onFocus())})),Ae(this,H6,N6.subscribe(async t=>{t&&(await this.resumePausedMutations(),V(this,Yi).onOnline())})))}unmount(){var t,e;T8(this,Ry)._--,V(this,Ry)===0&&((t=V(this,j6))==null||t.call(this),Ae(this,j6,void 0),(e=V(this,H6))==null||e.call(this),Ae(this,H6,void 0))}isFetching(t){return V(this,Yi).findAll({...t,fetchStatus:\\\"fetching\\\"}).length}isMutating(t){return V(this,Ty).findAll({...t,status:\\\"pending\\\"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return V(this,Yi).get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),r=V(this,Yi).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Kd(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return V(this,Yi).findAll(t).map(({queryKey:e,state:r})=>{let n=r.data;return[e,n]})}setQueryData(t,e,r){let n=this.defaultQueryOptions({queryKey:t}),s=V(this,Yi).get(n.queryHash)?.state.data,o=G6e(e,s);if(o!==void 0)return V(this,Yi).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return Gr.batch(()=>V(this,Yi).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return V(this,Yi).get(e.queryHash)?.state}removeQueries(t){let e=V(this,Yi);Gr.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){let r=V(this,Yi);return Gr.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:\\\"active\\\",...t},e)))}cancelQueries(t,e={}){let r={revert:!0,...e},n=Gr.batch(()=>V(this,Yi).findAll(t).map(i=>i.cancel(r)));return Promise.all(n).then(Ji).catch(Ji)}invalidateQueries(t,e={}){return Gr.batch(()=>(V(this,Yi).findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType===\\\"none\\\"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??\\\"active\\\"},e)))}refetchQueries(t,e={}){let r={...e,cancelRefetch:e.cancelRefetch??!0},n=Gr.batch(()=>V(this,Yi).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(Ji)),i.state.fetchStatus===\\\"paused\\\"?Promise.resolve():s}));return Promise.all(n).then(Ji)}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let r=V(this,Yi).build(this,e);return r.isStaleByTime(Kd(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ji).catch(Ji)}fetchInfiniteQuery(t){return t.behavior=RY(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ji).catch(Ji)}ensureInfiniteQueryData(t){return t.behavior=RY(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return N6.isOnline()?V(this,Ty).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Yi)}getMutationCache(){return V(this,Ty)}getDefaultOptions(){return V(this,Iy)}setDefaultOptions(t){Ae(this,Iy,t)}setQueryDefaults(t,e){V(this,U6).set(yp(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...V(this,U6).values()],r={};return e.forEach(n=>{jw(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){V(this,F6).set(yp(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...V(this,F6).values()],r={};return e.forEach(n=>{jw(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;let e={...V(this,Iy).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=iT(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!==\\\"always\\\"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode=\\\"offlineFirst\\\"),e.queryFn===I6&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...V(this,Iy).mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){V(this,Yi).clear(),V(this,Ty).clear()}},Yi=new WeakMap,Ty=new WeakMap,Iy=new WeakMap,U6=new WeakMap,F6=new WeakMap,Ry=new WeakMap,j6=new WeakMap,H6=new WeakMap,b3e);function BY(t){return JSON.stringify(t,(e,r)=>Kpt(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):typeof r==\\\"bigint\\\"?r.toString():r)}function Kpt(t){if(!w3e(t))return!1;let e=t.constructor;if(typeof e>\\\"u\\\")return!0;let r=e.prototype;return!(!w3e(r)||!r.hasOwnProperty(\\\"isPrototypeOf\\\"))}function w3e(t){return Object.prototype.toString.call(t)===\\\"[object Object]\\\"}function v3e(t){let{_defaulted:e,behavior:r,gcTime:n,initialData:i,initialDataUpdatedAt:s,maxPages:o,meta:a,networkMode:c,queryFn:l,queryHash:d,queryKey:f,queryKeyHashFn:p,retry:h,retryDelay:m,structuralSharing:g,getPreviousPageParam:w,getNextPageParam:v,initialPageParam:b,_optimisticResults:_,enabled:S,notifyOnChangeProps:T,placeholderData:N,refetchInterval:O,refetchIntervalInBackground:L,refetchOnMount:B,refetchOnReconnect:H,refetchOnWindowFocus:M,retryOnMount:F,select:R,staleTime:y,suspense:E,throwOnError:C,config:I,connector:P,query:k,...U}=t;return U}u();function MY(t){return{mutationFn(e){return c6e(t,e)},mutationKey:[\\\"connect\\\"]}}u();function DY(t){return{mutationFn(e){return u6e(t,e)},mutationKey:[\\\"disconnect\\\"]}}u();function LY(t,e={}){return{gcTime:0,async queryFn({queryKey:r}){let{connector:n}=e,{connectorUid:i,scopeKey:s,...o}=r[1];return d6e(t,{...o,connector:n})},queryKey:x3e(e)}}function x3e(t={}){let{connector:e,...r}=t;return[\\\"walletClient\\\",{...v3e(r),connectorUid:e?.uid}]}u();function UY(t){return{mutationFn(e){return p6e(t,e)},mutationKey:[\\\"switchChain\\\"]}}u();u();u();var q6=Me(Vi(),1),S3e=Me(Tl(),1),FY=q6.createContext(void 0),Zw=t=>{let e=q6.useContext(FY);if(t)return t;if(!e)throw new Error(\\\"No QueryClient set, use QueryClientProvider to set one\\\");return e},jY=({client:t,children:e})=>(q6.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,S3e.jsx)(FY.Provider,{value:t,children:e}));u();var TM=Me(Vi(),1),A3e=TM.createContext(!1),T3e=()=>TM.useContext(A3e),ETr=A3e.Provider;u();var pT=Me(Vi(),1),Jpt=Me(Tl(),1);function Ypt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Xpt=pT.createContext(Ypt()),I3e=()=>pT.useContext(Xpt);u();var R3e=Me(Vi(),1);var P3e=(t,e,r)=>{let n=r?.state.error&&typeof t.throwOnError==\\\"function\\\"?R6(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||n)&&(e.isReset()||(t.retryOnMount=!1))},O3e=t=>{R3e.useEffect(()=>{t.clearReset()},[t])},N3e=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||R6(r,[t.error,n]));u();var k3e=t=>{if(t.suspense){let r=i=>i===\\\"static\\\"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n==\\\"function\\\"?(...i)=>r(n(...i)):r(n),typeof t.gcTime==\\\"number\\\"&&(t.gcTime=Math.max(t.gcTime,1e3))}},B3e=(t,e)=>t.isLoading&&t.isFetching&&!e,M3e=(t,e)=>t?.suspense&&e.isPending,HY=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});u();u();var Py=Me(Vi(),1);function D3e(t,e,r){let n=T3e(),i=I3e(),s=Zw(r),o=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let a=s.getQueryCache().get(o.queryHash);o._optimisticResults=n?\\\"isRestoring\\\":\\\"optimistic\\\",k3e(o),P3e(o,i,a),O3e(i);let c=!s.getQueryCache().get(o.queryHash),[l]=Py.useState(()=>new e(s,o)),d=l.getOptimisticResult(o),f=!n&&t.subscribed!==!1;if(Py.useSyncExternalStore(Py.useCallback(p=>{let h=f?l.subscribe(Gr.batchCalls(p)):Ji;return l.updateResult(),h},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Py.useEffect(()=>{l.setOptions(o)},[o,l]),M3e(o,d))throw HY(o,l,i);if(N3e({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw d.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!bp.isServer()&&B3e(d,n)&&(c?HY(o,l,i):a?.promise)?.catch(Ji).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?d:l.trackResult(d)}function qY(t,e){return D3e(t,TY,e)}u();var Um=Me(Vi(),1);function Oy(t,e){let r=Zw(e),[n]=Um.useState(()=>new NY(r,t));Um.useEffect(()=>{n.setOptions(t)},[n,t]);let i=Um.useSyncExternalStore(Um.useCallback(o=>n.subscribe(Gr.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=Um.useCallback((o,a)=>{n.mutate(o,a).catch(Ji)},[n]);if(i.error&&R6(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function L3e(t){let e=qY({...t,queryKeyHashFn:BY});return e.queryKey=t.queryKey,e}u();var U3e=Me(Vi(),1);function F3e(t={}){let e=oo(t);return(0,U3e.useSyncExternalStore)(r=>JJ(e,{onChange:r}),()=>XB(e),()=>XB(e))}u();var j3e=Me(Vi(),1);function H3e(t={}){let e=oo(t);return(0,j3e.useSyncExternalStore)(r=>uY(e,{onChange:r}),()=>eM(e),()=>eM(e))}u();var $3e=Me(Vi(),1);u();var q3e=Me(Vi(),1);function z3e(t={}){let e=oo(t);return(0,q3e.useSyncExternalStore)(r=>XJ(e,{onChange:r}),()=>nM(e),()=>nM(e))}function zY(t={}){let{mutation:e}=t,r=oo(t),n=MY(r),{mutate:i,mutateAsync:s,...o}=Oy({...e,...n});return(0,$3e.useEffect)(()=>r.subscribe(({status:a})=>a,(a,c)=>{c===\\\"connected\\\"&&a===\\\"disconnected\\\"&&o.reset()}),[r,o.reset]),{...o,connect:i,connectAsync:s,connectors:z3e({config:r})}}u();var V3e=Me(Vi(),1);function W3e(t={}){let e=oo(t);return(0,V3e.useSyncExternalStore)(r=>YJ(e,{onChange:r}),()=>x6(e),()=>x6(e))}u();function $Y(t={}){let{mutation:e}=t,r=oo(t),n=DY(r),{mutate:i,mutateAsync:s,...o}=Oy({...e,...n});return{...o,connectors:W3e({config:r}).map(a=>a.connector),disconnect:i,disconnectAsync:s}}u();function VY(t={}){let{mutation:e}=t,r=oo(t),n=UY(r),{mutate:i,mutateAsync:s,...o}=Oy({...e,...n});return{...o,chains:H3e({config:r}),switchChain:i,switchChainAsync:s}}u();var IM=Me(Vi(),1);function WY(t={}){let{query:e={},...r}=t,n=oo(r),i=Zw(),{address:s,connector:o,status:a}=rT({config:n}),c=F3e({config:n}),l=t.connector??o,{queryKey:d,...f}=LY(n,{...t,chainId:t.chainId??c,connector:t.connector??o}),p=!!((a===\\\"connected\\\"||a===\\\"reconnecting\\\"&&l?.getProvider)&&(e.enabled??!0)),h=(0,IM.useRef)(s);return(0,IM.useEffect)(()=>{let m=h.current;!s&&m?(i.removeQueries({queryKey:d}),h.current=void 0):s!==m&&(i.invalidateQueries({queryKey:d}),h.current=s)},[s,i]),L3e({...e,...f,queryKey:d,enabled:p,staleTime:Number.POSITIVE_INFINITY})}u();iX();var J_e={id:57073,name:\\\"Ink\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc-gel.inkonchain.com\\\"]}},blockExplorers:{default:{name:\\\"Ink Explorer\\\",url:\\\"https://explorer.inkonchain.com\\\"}}},Y_e={id:80094,name:\\\"Berachain\\\",nativeCurrency:{name:\\\"BERA\\\",symbol:\\\"BERA\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.berachain.com\\\"]}},blockExplorers:{default:{name:\\\"Berascan\\\",url:\\\"https://berascan.com\\\"}}},X_e={id:130,name:\\\"Unichain\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://mainnet.unichain.org\\\"]}},blockExplorers:{default:{name:\\\"Unichain Explorer\\\",url:\\\"https://explorer.unichain.org\\\"}}},eCe={id:9745,name:\\\"Plasma\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.plasma.io\\\"]}},blockExplorers:{default:{name:\\\"Plasma Explorer\\\",url:\\\"https://explorer.plasma.io\\\"}}},tCe={id:143,name:\\\"Monad\\\",nativeCurrency:{name:\\\"MON\\\",symbol:\\\"MON\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.monad.xyz\\\"]}},blockExplorers:{default:{name:\\\"Monad Explorer\\\",url:\\\"https://explorer.monad.xyz\\\"}}},rCe={id:196,name:\\\"XLayer\\\",nativeCurrency:{name:\\\"OKB\\\",symbol:\\\"OKB\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.xlayer.tech\\\"]}},blockExplorers:{default:{name:\\\"XLayer Explorer\\\",url:\\\"https://www.okx.com/explorer/xlayer\\\"}}},nCe={id:988,name:\\\"Stable\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.stable.io\\\"]}},blockExplorers:{default:{name:\\\"Stable Explorer\\\",url:\\\"https://explorer.stable.io\\\"}}},iCe={id:999,name:\\\"HyperEVM\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.hyperevm.xyz\\\"]}},blockExplorers:{default:{name:\\\"HyperEVM Explorer\\\",url:\\\"https://explorer.hyperevm.xyz\\\"}}},sCe={id:4326,name:\\\"MegaETH\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.megaeth.com\\\"]}},blockExplorers:{default:{name:\\\"MegaETH Explorer\\\",url:\\\"https://explorer.megaeth.com\\\"}}},oCe={id:21e6,name:\\\"Corn\\\",nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://rpc.corn.xyz\\\"]}},blockExplorers:{default:{name:\\\"Corn Explorer\\\",url:\\\"https://explorer.corn.xyz\\\"}}},aCe={id:8217,name:\\\"Kaia\\\",nativeCurrency:{name:\\\"KAIA\\\",symbol:\\\"KAIA\\\",decimals:18},rpcUrls:{default:{http:[\\\"https://public-en.node.kaia.io\\\"]}},blockExplorers:{default:{name:\\\"Kaiascan\\\",url:\\\"https://kaiascan.io\\\"}}},cCe={[tD.id]:tD,[Qw.id]:Qw,[LM.id]:LM,[sD.id]:sD,[aD.id]:aD,[$M.id]:$M,[FM.id]:FM,[JM.id]:JM,[GM.id]:GM,[ZM.id]:ZM,[XM.id]:XM,[uD.id]:uD,[xT.id]:xT,[rD.id]:rD,[qM.id]:qM,[iD.id]:iD,[hD.id]:hD,[QM.id]:QM,[lD.id]:lD,[fD.id]:fD,[KM.id]:KM,[J_e.id]:J_e,[Y_e.id]:Y_e,[X_e.id]:X_e,[eCe.id]:eCe,[tCe.id]:tCe,[rCe.id]:rCe,[nCe.id]:nCe,[iCe.id]:iCe,[sCe.id]:sCe,[oCe.id]:oCe,[aCe.id]:aCe,[pD.id]:pD,[yT.id]:yT,[UM.id]:UM,[oD.id]:oD,[cD.id]:cD,[VM.id]:VM,[jM.id]:jM,[eD.id]:eD,[dD.id]:dD,[ET.id]:ET,[nD.id]:nD,[zM.id]:zM,[gD.id]:gD};function lCe(t){return cCe[t]}function yht(t){return{id:t,name:`Chain ${t}`,nativeCurrency:{name:\\\"Ether\\\",symbol:\\\"ETH\\\",decimals:18},rpcUrls:{default:{http:[]}}}}function uCe(t){return cCe[t]??yht(t)}u();u();u();var CT={TransferWithAuthorization:[{name:\\\"from\\\",type:\\\"address\\\"},{name:\\\"to\\\",type:\\\"address\\\"},{name:\\\"value\\\",type:\\\"uint256\\\"},{name:\\\"validAfter\\\",type:\\\"uint256\\\"},{name:\\\"validBefore\\\",type:\\\"uint256\\\"},{name:\\\"nonce\\\",type:\\\"bytes32\\\"}]};u();u();gX();vD();function bX(t){return{base:8453,\\\"base-sepolia\\\":84532,ethereum:1,sepolia:11155111,polygon:137,\\\"polygon-amoy\\\":80002}[t]||1}function _D(){let t=(typeof globalThis.crypto<\\\"u\\\",globalThis.crypto);if(!t)throw new Error(\\\"Crypto API not available\\\");return IT(t.getRandomValues(new Uint8Array(32)))}u();var Aht=Object.defineProperty,Tht=(t,e,r)=>e in t?Aht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,RT=(t,e,r)=>Tht(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r);var wX=class{constructor(t){this.signer=t,RT(this,\\\"scheme\\\",\\\"exact\\\")}async createPaymentPayload(t,e){let r=_D(),n=Math.floor(Date.now()/1e3),i={from:this.signer.address,to:Jd(e.payTo),value:e.amount,validAfter:(n-600).toString(),validBefore:(n+e.maxTimeoutSeconds).toString(),nonce:r},s=await this.signAuthorization(i,e);return{t402Version:t,payload:{authorization:i,signature:s}}}async signAuthorization(t,e){let r=parseInt(e.network.split(\\\":\\\")[1]);if(!e.extra?.name||!e.extra?.version)throw new Error(`EIP-712 domain parameters (name, version) are required in payment requirements for asset ${e.asset}`);let{name:n,version:i}=e.extra,s={name:n,version:i,chainId:r,verifyingContract:Jd(e.asset)},o={from:Jd(t.from),to:Jd(t.to),value:BigInt(t.value),validAfter:BigInt(t.validAfter),validBefore:BigInt(t.validBefore),nonce:t.nonce};return await this.signer.signTypedData({domain:s,types:CT,primaryType:\\\"TransferWithAuthorization\\\",message:o})}};u();var SCe=[\\\"abstract\\\",\\\"abstract-testnet\\\",\\\"base-sepolia\\\",\\\"base\\\",\\\"avalanche-fuji\\\",\\\"avalanche\\\",\\\"iotex\\\",\\\"sei\\\",\\\"sei-testnet\\\",\\\"polygon\\\",\\\"polygon-amoy\\\",\\\"peaq\\\",\\\"story\\\",\\\"educhain\\\",\\\"skale-base-sepolia\\\"];u();var ACe=class{constructor(t){this.signer=t,RT(this,\\\"scheme\\\",\\\"exact\\\")}async createPaymentPayload(t,e){let r=e,n=_D(),i=Math.floor(Date.now()/1e3),s={from:this.signer.address,to:Jd(r.payTo),value:r.maxAmountRequired,validAfter:(i-600).toString(),validBefore:(i+r.maxTimeoutSeconds).toString(),nonce:n},o=await this.signAuthorization(s,r),a={authorization:s,signature:o};return{t402Version:t,scheme:r.scheme,network:r.network,payload:a}}async signAuthorization(t,e){let r=bX(e.network);if(!e.extra?.name||!e.extra?.version)throw new Error(`EIP-712 domain parameters (name, version) are required in payment requirements for asset ${e.asset}`);let{name:n,version:i}=e.extra,s={name:n,version:i,chainId:r,verifyingContract:Jd(e.asset)},o={from:Jd(t.from),to:Jd(t.to),value:BigInt(t.value),validAfter:BigInt(t.validAfter),validBefore:BigInt(t.validBefore),nonce:t.nonce};return await this.signer.signTypedData({domain:s,types:CT,primaryType:\\\"TransferWithAuthorization\\\",message:o})}};u();function TCe(t,e){return e.networks&&e.networks.length>0?e.networks.forEach(r=>{t.register(r,new wX(e.signer))}):t.register(\\\"eip155:*\\\",new wX(e.signer)),SCe.forEach(r=>{t.registerV1(r,new ACe(e.signer))}),e.policies&&e.policies.forEach(r=>{t.registerPolicy(r)}),t}u();u();u();u();var Iht=Object.defineProperty,Rht=(t,e,r)=>e in t?Iht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Hm=(t,e,r)=>Rht(t,typeof e!=\\\"symbol\\\"?e+\\\"\\\":e,r);var vX=2;u();u();var it={};ue(it,{BRAND:()=>tmt,DIRTY:()=>Yw,EMPTY_PATH:()=>kht,INVALID:()=>nt,NEVER:()=>Fmt,OK:()=>wa,ParseStatus:()=>jo,Schema:()=>kt,ZodAny:()=>My,ZodArray:()=>Vm,ZodBigInt:()=>ev,ZodBoolean:()=>tv,ZodBranded:()=>OT,ZodCatch:()=>fv,ZodDate:()=>rv,ZodDefault:()=>dv,ZodDiscriminatedUnion:()=>AD,ZodEffects:()=>Bu,ZodEnum:()=>lv,ZodError:()=>Mc,ZodFirstPartyTypeKind:()=>at,ZodFunction:()=>ID,ZodIntersection:()=>ov,ZodIssueCode:()=>ve,ZodLazy:()=>av,ZodLiteral:()=>cv,ZodMap:()=>Y6,ZodNaN:()=>e3,ZodNativeEnum:()=>uv,ZodNever:()=>Yd,ZodNull:()=>iv,ZodNullable:()=>Cp,ZodNumber:()=>Xw,ZodObject:()=>Dc,ZodOptional:()=>Nu,ZodParsedType:()=>Be,ZodPipeline:()=>NT,ZodPromise:()=>Dy,ZodReadonly:()=>pv,ZodRecord:()=>TD,ZodSchema:()=>kt,ZodSet:()=>X6,ZodString:()=>By,ZodSymbol:()=>Q6,ZodTransformer:()=>Bu,ZodTuple:()=>_p,ZodType:()=>kt,ZodUndefined:()=>nv,ZodUnion:()=>sv,ZodUnknown:()=>$m,ZodVoid:()=>J6,addIssueToContext:()=>Pe,any:()=>umt,array:()=>hmt,bigint:()=>smt,boolean:()=>UCe,coerce:()=>Umt,custom:()=>MCe,date:()=>omt,datetimeRegex:()=>kCe,defaultErrorMap:()=>qm,discriminatedUnion:()=>bmt,effect:()=>Pmt,enum:()=>Tmt,function:()=>Cmt,getErrorMap:()=>G6,getParsedType:()=>Ep,instanceof:()=>nmt,intersection:()=>wmt,isAborted:()=>CD,isAsync:()=>K6,isDirty:()=>SD,isValid:()=>ky,late:()=>rmt,lazy:()=>Smt,literal:()=>Amt,makeIssue:()=>PT,map:()=>Emt,nan:()=>imt,nativeEnum:()=>Imt,never:()=>fmt,null:()=>lmt,nullable:()=>Nmt,number:()=>LCe,object:()=>mmt,objectUtil:()=>xX,oboolean:()=>Lmt,onumber:()=>Dmt,optional:()=>Omt,ostring:()=>Mmt,pipeline:()=>Bmt,preprocess:()=>kmt,promise:()=>Rmt,quotelessJson:()=>Pht,record:()=>xmt,set:()=>_mt,setErrorMap:()=>Nht,strictObject:()=>gmt,string:()=>DCe,symbol:()=>amt,transformer:()=>Pmt,tuple:()=>vmt,undefined:()=>cmt,union:()=>ymt,unknown:()=>dmt,util:()=>Kt,void:()=>pmt});u();u();u();u();u();var Kt;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(a=>typeof i[i[a]]!=\\\"number\\\"),o={};for(let a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys==\\\"function\\\"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(let o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger==\\\"function\\\"?i=>Number.isInteger(i):i=>typeof i==\\\"number\\\"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=\\\" | \\\"){return i.map(o=>typeof o==\\\"string\\\"?`'${o}'`:o).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s==\\\"bigint\\\"?s.toString():s})(Kt||(Kt={}));var xX;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(xX||(xX={}));var Be=Kt.arrayToEnum([\\\"string\\\",\\\"nan\\\",\\\"number\\\",\\\"integer\\\",\\\"float\\\",\\\"boolean\\\",\\\"date\\\",\\\"bigint\\\",\\\"symbol\\\",\\\"function\\\",\\\"undefined\\\",\\\"null\\\",\\\"array\\\",\\\"object\\\",\\\"unknown\\\",\\\"promise\\\",\\\"void\\\",\\\"never\\\",\\\"map\\\",\\\"set\\\"]),Ep=t=>{switch(typeof t){case\\\"undefined\\\":return Be.undefined;case\\\"string\\\":return Be.string;case\\\"number\\\":return Number.isNaN(t)?Be.nan:Be.number;case\\\"boolean\\\":return Be.boolean;case\\\"function\\\":return Be.function;case\\\"bigint\\\":return Be.bigint;case\\\"symbol\\\":return Be.symbol;case\\\"object\\\":return Array.isArray(t)?Be.array:t===null?Be.null:t.then&&typeof t.then==\\\"function\\\"&&t.catch&&typeof t.catch==\\\"function\\\"?Be.promise:typeof Map<\\\"u\\\"&&t instanceof Map?Be.map:typeof Set<\\\"u\\\"&&t instanceof Set?Be.set:typeof Date<\\\"u\\\"&&t instanceof Date?Be.date:Be.object;default:return Be.unknown}};var ve=Kt.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\\\"]),Pht=t=>JSON.stringify(t,null,2).replace(/\\\"([^\\\"]+)\\\":/g,\\\"$1:\\\"),Mc=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name=\\\"ZodError\\\",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let o of s.issues)if(o.code===\\\"invalid_union\\\")o.unionErrors.map(i);else if(o.code===\\\"invalid_return_type\\\")i(o.returnTypeError);else if(o.code===\\\"invalid_arguments\\\")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Kt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let s=i.path[0];r[s]=r[s]||[],r[s].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Mc.create=t=>new Mc(t);var Oht=(t,e)=>{let r;switch(t.code){case ve.invalid_type:t.received===Be.undefined?r=\\\"Required\\\":r=`Expected ${t.expected}, received ${t.received}`;break;case ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Kt.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${Kt.joinValues(t.keys,\\\", \\\")}`;break;case ve.invalid_union:r=\\\"Invalid input\\\";break;case ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Kt.joinValues(t.options)}`;break;case ve.invalid_enum_value:r=`Invalid enum value. Expected ${Kt.joinValues(t.options)}, received '${t.received}'`;break;case ve.invalid_arguments:r=\\\"Invalid function arguments\\\";break;case ve.invalid_return_type:r=\\\"Invalid function return type\\\";break;case ve.invalid_date:r=\\\"Invalid date\\\";break;case ve.invalid_string:typeof t.validation==\\\"object\\\"?\\\"includes\\\"in t.validation?(r=`Invalid input: must include \\\"${t.validation.includes}\\\"`,typeof t.validation.position==\\\"number\\\"&&(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}\\\"`:Kt.assertNever(t.validation):t.validation!==\\\"regex\\\"?r=`Invalid ${t.validation}`:r=\\\"Invalid\\\";break;case ve.too_small:t.type===\\\"array\\\"?r=`Array must contain ${t.exact?\\\"exactly\\\":t.inclusive?\\\"at least\\\":\\\"more than\\\"} ${t.minimum} element(s)`:t.type===\\\"string\\\"?r=`String must contain ${t.exact?\\\"exactly\\\":t.inclusive?\\\"at least\\\":\\\"over\\\"} ${t.minimum} character(s)`:t.type===\\\"number\\\"?r=`Number must be ${t.exact?\\\"exactly equal to \\\":t.inclusive?\\\"greater than or equal to \\\":\\\"greater than \\\"}${t.minimum}`:t.type===\\\"bigint\\\"?r=`Number must be ${t.exact?\\\"exactly equal to \\\":t.inclusive?\\\"greater than or equal to \\\":\\\"greater than \\\"}${t.minimum}`:t.type===\\\"date\\\"?r=`Date must be ${t.exact?\\\"exactly equal to \\\":t.inclusive?\\\"greater than or equal to \\\":\\\"greater than \\\"}${new Date(Number(t.minimum))}`:r=\\\"Invalid input\\\";break;case ve.too_big:t.type===\\\"array\\\"?r=`Array must contain ${t.exact?\\\"exactly\\\":t.inclusive?\\\"at most\\\":\\\"less than\\\"} ${t.maximum} element(s)`:t.type===\\\"string\\\"?r=`String must contain ${t.exact?\\\"exactly\\\":t.inclusive?\\\"at most\\\":\\\"under\\\"} ${t.maximum} character(s)`:t.type===\\\"number\\\"?r=`Number must be ${t.exact?\\\"exactly\\\":t.inclusive?\\\"less than or equal to\\\":\\\"less than\\\"} ${t.maximum}`:t.type===\\\"bigint\\\"?r=`BigInt must be ${t.exact?\\\"exactly\\\":t.inclusive?\\\"less than or equal to\\\":\\\"less than\\\"} ${t.maximum}`:t.type===\\\"date\\\"?r=`Date must be ${t.exact?\\\"exactly\\\":t.inclusive?\\\"smaller than or equal to\\\":\\\"smaller than\\\"} ${new Date(Number(t.maximum))}`:r=\\\"Invalid input\\\";break;case ve.custom:r=\\\"Invalid input\\\";break;case ve.invalid_intersection_types:r=\\\"Intersection results could not be merged\\\";break;case ve.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ve.not_finite:r=\\\"Number must be finite\\\";break;default:r=e.defaultError,Kt.assertNever(t)}return{message:r}},qm=Oht;var ICe=qm;function Nht(t){ICe=t}function G6(){return ICe}u();var PT=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a=\\\"\\\",c=n.filter(l=>!!l).slice().reverse();for(let l of c)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},kht=[];function Pe(t,e){let r=G6(),n=PT({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===qm?void 0:qm].filter(i=>!!i)});t.common.issues.push(n)}var jo=class t{constructor(){this.value=\\\"valid\\\"}dirty(){this.value===\\\"valid\\\"&&(this.value=\\\"dirty\\\")}abort(){this.value!==\\\"aborted\\\"&&(this.value=\\\"aborted\\\")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status===\\\"aborted\\\")return nt;i.status===\\\"dirty\\\"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,o=await i.value;n.push({key:s,value:o})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:o}=i;if(s.status===\\\"aborted\\\"||o.status===\\\"aborted\\\")return nt;s.status===\\\"dirty\\\"&&e.dirty(),o.status===\\\"dirty\\\"&&e.dirty(),s.value!==\\\"__proto__\\\"&&(typeof o.value<\\\"u\\\"||i.alwaysSet)&&(n[s.value]=o.value)}return{status:e.value,value:n}}},nt=Object.freeze({status:\\\"aborted\\\"}),Yw=t=>({status:\\\"dirty\\\",value:t}),wa=t=>({status:\\\"valid\\\",value:t}),CD=t=>t.status===\\\"aborted\\\",SD=t=>t.status===\\\"dirty\\\",ky=t=>t.status===\\\"valid\\\",K6=t=>typeof Promise<\\\"u\\\"&&t instanceof Promise;u();u();var Ve;(function(t){t.errToObj=e=>typeof e==\\\"string\\\"?{message:e}:e||{},t.toString=e=>typeof e==\\\"string\\\"?e:e?.message})(Ve||(Ve={}));var ku=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},RCe=(t,e)=>{if(ky(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error(\\\"Validation failed but no issues detected.\\\");return{success:!1,get error(){if(this._error)return this._error;let r=new Mc(t.common.issues);return this._error=r,this._error}}};function Tt(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use \\\"invalid_type_error\\\" or \\\"required_error\\\" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{let{message:c}=t;return o.code===\\\"invalid_enum_value\\\"?{message:c??a.defaultError}:typeof a.data>\\\"u\\\"?{message:c??n??a.defaultError}:o.code!==\\\"invalid_type\\\"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:i}}var kt=class{get description(){return this._def.description}_getType(e){return Ep(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Ep(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new jo,ctx:{common:e.parent.common,data:e.data,parsedType:Ep(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(K6(r))throw new Error(\\\"Synchronous parse encountered promise.\\\");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ep(e)},i=this._parseSync({data:e,path:n.path,parent:n});return RCe(n,i)}\\\"~validate\\\"(e){let r={common:{issues:[],async:!!this[\\\"~standard\\\"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ep(e)};if(!this[\\\"~standard\\\"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return ky(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes(\\\"encountered\\\")&&(this[\\\"~standard\\\"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>ky(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ep(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(K6(i)?i:Promise.resolve(i));return RCe(n,s)}refine(e,r){let n=i=>typeof r==\\\"string\\\"||typeof r>\\\"u\\\"?{message:r}:typeof r==\\\"function\\\"?r(i):r;return this._refinement((i,s)=>{let o=e(i),a=()=>s.addIssue({code:ve.custom,...n(i)});return typeof Promise<\\\"u\\\"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r==\\\"function\\\"?r(n,i):r),!1))}_refinement(e){return new Bu({schema:this,typeName:at.ZodEffects,effect:{type:\\\"refinement\\\",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this[\\\"~standard\\\"]={version:1,vendor:\\\"zod\\\",validate:r=>this[\\\"~validate\\\"](r)}}optional(){return Nu.create(this,this._def)}nullable(){return Cp.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Vm.create(this)}promise(){return Dy.create(this,this._def)}or(e){return sv.create([this,e],this._def)}and(e){return ov.create(this,e,this._def)}transform(e){return new Bu({...Tt(this._def),schema:this,typeName:at.ZodEffects,effect:{type:\\\"transform\\\",transform:e}})}default(e){let r=typeof e==\\\"function\\\"?e:()=>e;return new dv({...Tt(this._def),innerType:this,defaultValue:r,typeName:at.ZodDefault})}brand(){return new OT({typeName:at.ZodBranded,type:this,...Tt(this._def)})}catch(e){let r=typeof e==\\\"function\\\"?e:()=>e;return new fv({...Tt(this._def),innerType:this,catchValue:r,typeName:at.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return NT.create(this,e)}readonly(){return pv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Bht=/^c[^\\\\s-]{8,}$/i,Mht=/^[0-9a-z]+$/,Dht=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Lht=/^[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,Uht=/^[a-z0-9_-]{21}$/i,Fht=/^[A-Za-z0-9-_]+\\\\.[A-Za-z0-9-_]+\\\\.[A-Za-z0-9-_]*$/,jht=/^[-+]?P(?!$)(?:(?:[-+]?\\\\d+Y)|(?:[-+]?\\\\d+[.,]\\\\d+Y$))?(?:(?:[-+]?\\\\d+M)|(?:[-+]?\\\\d+[.,]\\\\d+M$))?(?:(?:[-+]?\\\\d+W)|(?:[-+]?\\\\d+[.,]\\\\d+W$))?(?:(?:[-+]?\\\\d+D)|(?:[-+]?\\\\d+[.,]\\\\d+D$))?(?:T(?=[\\\\d+-])(?:(?:[-+]?\\\\d+H)|(?:[-+]?\\\\d+[.,]\\\\d+H$))?(?:(?:[-+]?\\\\d+M)|(?:[-+]?\\\\d+[.,]\\\\d+M$))?(?:[-+]?\\\\d+(?:[.,]\\\\d+)?S)?)??$/,Hht=/^(?!\\\\.)(?!.*\\\\.\\\\.)([A-Z0-9_'+\\\\-\\\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\\\-]*\\\\.)+[A-Z]{2,}$/i,qht=\\\"^(\\\\\\\\p{Extended_Pictographic}|\\\\\\\\p{Emoji_Component})+$\\\",EX,zht=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$ht=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\\\/(3[0-2]|[12]?[0-9])$/,Vht=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Wht=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ght=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Kht=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,OCe=\\\"((\\\\\\\\d\\\\\\\\d[2468][048]|\\\\\\\\d\\\\\\\\d[13579][26]|\\\\\\\\d\\\\\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\\\\\d|30)|(02)-(0[1-9]|1\\\\\\\\d|2[0-8])))\\\",Zht=new RegExp(`^${OCe}$`);function NCe(t){let e=\\\"[0-5]\\\\\\\\d\\\";t.precision?e=`${e}\\\\\\\\.\\\\\\\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\\\\\\\.\\\\\\\\d+)?`);let r=t.precision?\\\"+\\\":\\\"?\\\";return`([01]\\\\\\\\d|2[0-3]):[0-5]\\\\\\\\d(:${e})${r}`}function Qht(t){return new RegExp(`^${NCe(t)}$`)}function kCe(t){let e=`${OCe}T${NCe(t)}`,r=[];return r.push(t.local?\\\"Z?\\\":\\\"Z\\\"),t.offset&&r.push(\\\"([+-]\\\\\\\\d{2}:?\\\\\\\\d{2})\\\"),e=`${e}(${r.join(\\\"|\\\")})`,new RegExp(`^${e}$`)}function Jht(t,e){return!!((e===\\\"v4\\\"||!e)&&zht.test(t)||(e===\\\"v6\\\"||!e)&&Vht.test(t))}function Yht(t,e){if(!Fht.test(t))return!1;try{let[r]=t.split(\\\".\\\");if(!r)return!1;let n=r.replace(/-/g,\\\"+\\\").replace(/_/g,\\\"/\\\").padEnd(r.length+(4-r.length%4)%4,\\\"=\\\"),i=JSON.parse(atob(n));return!(typeof i!=\\\"object\\\"||i===null||\\\"typ\\\"in i&&i?.typ!==\\\"JWT\\\"||!i.alg||e&&i.alg!==e)}catch{return!1}}function Xht(t,e){return!!((e===\\\"v4\\\"||!e)&&$ht.test(t)||(e===\\\"v6\\\"||!e)&&Wht.test(t))}var By=class t extends kt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Be.string){let s=this._getOrReturnCtx(e);return Pe(s,{code:ve.invalid_type,expected:Be.string,received:s.parsedType}),nt}let n=new jo,i;for(let s of this._def.checks)if(s.kind===\\\"min\\\")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.too_small,minimum:s.value,type:\\\"string\\\",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind===\\\"max\\\")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.too_big,maximum:s.value,type:\\\"string\\\",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind===\\\"length\\\"){let o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?Pe(i,{code:ve.too_big,maximum:s.value,type:\\\"string\\\",inclusive:!0,exact:!0,message:s.message}):a&&Pe(i,{code:ve.too_small,minimum:s.value,type:\\\"string\\\",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind===\\\"email\\\")Hht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"email\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"emoji\\\")EX||(EX=new RegExp(qht,\\\"u\\\")),EX.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"emoji\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"uuid\\\")Lht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"uuid\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"nanoid\\\")Uht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"nanoid\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"cuid\\\")Bht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"cuid\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"cuid2\\\")Mht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"cuid2\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"ulid\\\")Dht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"ulid\\\",code:ve.invalid_string,message:s.message}),n.dirty());else if(s.kind===\\\"url\\\")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"url\\\",code:ve.invalid_string,message:s.message}),n.dirty()}else s.kind===\\\"regex\\\"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"regex\\\",code:ve.invalid_string,message:s.message}),n.dirty())):s.kind===\\\"trim\\\"?e.data=e.data.trim():s.kind===\\\"includes\\\"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind===\\\"toLowerCase\\\"?e.data=e.data.toLowerCase():s.kind===\\\"toUpperCase\\\"?e.data=e.data.toUpperCase():s.kind===\\\"startsWith\\\"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind===\\\"endsWith\\\"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind===\\\"datetime\\\"?kCe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:\\\"datetime\\\",message:s.message}),n.dirty()):s.kind===\\\"date\\\"?Zht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:\\\"date\\\",message:s.message}),n.dirty()):s.kind===\\\"time\\\"?Qht(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.invalid_string,validation:\\\"time\\\",message:s.message}),n.dirty()):s.kind===\\\"duration\\\"?jht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"duration\\\",code:ve.invalid_string,message:s.message}),n.dirty()):s.kind===\\\"ip\\\"?Jht(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"ip\\\",code:ve.invalid_string,message:s.message}),n.dirty()):s.kind===\\\"jwt\\\"?Yht(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"jwt\\\",code:ve.invalid_string,message:s.message}),n.dirty()):s.kind===\\\"cidr\\\"?Xht(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"cidr\\\",code:ve.invalid_string,message:s.message}),n.dirty()):s.kind===\\\"base64\\\"?Ght.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"base64\\\",code:ve.invalid_string,message:s.message}),n.dirty()):s.kind===\\\"base64url\\\"?Kht.test(e.data)||(i=this._getOrReturnCtx(e,i),Pe(i,{validation:\\\"base64url\\\",code:ve.invalid_string,message:s.message}),n.dirty()):Kt.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:ve.invalid_string,...Ve.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:\\\"email\\\",...Ve.errToObj(e)})}url(e){return this._addCheck({kind:\\\"url\\\",...Ve.errToObj(e)})}emoji(e){return this._addCheck({kind:\\\"emoji\\\",...Ve.errToObj(e)})}uuid(e){return this._addCheck({kind:\\\"uuid\\\",...Ve.errToObj(e)})}nanoid(e){return this._addCheck({kind:\\\"nanoid\\\",...Ve.errToObj(e)})}cuid(e){return this._addCheck({kind:\\\"cuid\\\",...Ve.errToObj(e)})}cuid2(e){return this._addCheck({kind:\\\"cuid2\\\",...Ve.errToObj(e)})}ulid(e){return this._addCheck({kind:\\\"ulid\\\",...Ve.errToObj(e)})}base64(e){return this._addCheck({kind:\\\"base64\\\",...Ve.errToObj(e)})}base64url(e){return this._addCheck({kind:\\\"base64url\\\",...Ve.errToObj(e)})}jwt(e){return this._addCheck({kind:\\\"jwt\\\",...Ve.errToObj(e)})}ip(e){return this._addCheck({kind:\\\"ip\\\",...Ve.errToObj(e)})}cidr(e){return this._addCheck({kind:\\\"cidr\\\",...Ve.errToObj(e)})}datetime(e){return typeof e==\\\"string\\\"?this._addCheck({kind:\\\"datetime\\\",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:\\\"datetime\\\",precision:typeof e?.precision>\\\"u\\\"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Ve.errToObj(e?.message)})}date(e){return this._addCheck({kind:\\\"date\\\",message:e})}time(e){return typeof e==\\\"string\\\"?this._addCheck({kind:\\\"time\\\",precision:null,message:e}):this._addCheck({kind:\\\"time\\\",precision:typeof e?.precision>\\\"u\\\"?null:e?.precision,...Ve.errToObj(e?.message)})}duration(e){return this._addCheck({kind:\\\"duration\\\",...Ve.errToObj(e)})}regex(e,r){return this._addCheck({kind:\\\"regex\\\",regex:e,...Ve.errToObj(r)})}includes(e,r){return this._addCheck({kind:\\\"includes\\\",value:e,position:r?.position,...Ve.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:\\\"startsWith\\\",value:e,...Ve.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:\\\"endsWith\\\",value:e,...Ve.errToObj(r)})}min(e,r){return this._addCheck({kind:\\\"min\\\",value:e,...Ve.errToObj(r)})}max(e,r){return this._addCheck({kind:\\\"max\\\",value:e,...Ve.errToObj(r)})}length(e,r){return this._addCheck({kind:\\\"length\\\",value:e,...Ve.errToObj(r)})}nonempty(e){return this.min(1,Ve.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:\\\"trim\\\"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:\\\"toLowerCase\\\"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:\\\"toUpperCase\\\"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===\\\"datetime\\\")}get isDate(){return!!this._def.checks.find(e=>e.kind===\\\"date\\\")}get isTime(){return!!this._def.checks.find(e=>e.kind===\\\"time\\\")}get isDuration(){return!!this._def.checks.find(e=>e.kind===\\\"duration\\\")}get isEmail(){return!!this._def.checks.find(e=>e.kind===\\\"email\\\")}get isURL(){return!!this._def.checks.find(e=>e.kind===\\\"url\\\")}get isEmoji(){return!!this._def.checks.find(e=>e.kind===\\\"emoji\\\")}get isUUID(){return!!this._def.checks.find(e=>e.kind===\\\"uuid\\\")}get isNANOID(){return!!this._def.checks.find(e=>e.kind===\\\"nanoid\\\")}get isCUID(){return!!this._def.checks.find(e=>e.kind===\\\"cuid\\\")}get isCUID2(){return!!this._def.checks.find(e=>e.kind===\\\"cuid2\\\")}get isULID(){return!!this._def.checks.find(e=>e.kind===\\\"ulid\\\")}get isIP(){return!!this._def.checks.find(e=>e.kind===\\\"ip\\\")}get isCIDR(){return!!this._def.checks.find(e=>e.kind===\\\"cidr\\\")}get isBase64(){return!!this._def.checks.find(e=>e.kind===\\\"base64\\\")}get isBase64url(){return!!this._def.checks.find(e=>e.kind===\\\"base64url\\\")}get minLength(){let e=null;for(let r of this._def.checks)r.kind===\\\"min\\\"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind===\\\"max\\\"&&(e===null||r.value<e)&&(e=r.value);return e}};By.create=t=>new By({checks:[],typeName:at.ZodString,coerce:t?.coerce??!1,...Tt(t)});function emt(t,e){let r=(t.toString().split(\\\".\\\")[1]||\\\"\\\").length,n=(e.toString().split(\\\".\\\")[1]||\\\"\\\").length,i=r>n?r:n,s=Number.parseInt(t.toFixed(i).replace(\\\".\\\",\\\"\\\")),o=Number.parseInt(e.toFixed(i).replace(\\\".\\\",\\\"\\\"));return s%o/10**i}var Xw=class t extends kt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Be.number){let s=this._getOrReturnCtx(e);return Pe(s,{code:ve.invalid_type,expected:Be.number,received:s.parsedType}),nt}let n,i=new jo;for(let s of this._def.checks)s.kind===\\\"int\\\"?Kt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.invalid_type,expected:\\\"integer\\\",received:\\\"float\\\",message:s.message}),i.dirty()):s.kind===\\\"min\\\"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.too_small,minimum:s.value,type:\\\"number\\\",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind===\\\"max\\\"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.too_big,maximum:s.value,type:\\\"number\\\",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind===\\\"multipleOf\\\"?emt(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind===\\\"finite\\\"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.not_finite,message:s.message}),i.dirty()):Kt.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit(\\\"min\\\",e,!0,Ve.toString(r))}gt(e,r){return this.setLimit(\\\"min\\\",e,!1,Ve.toString(r))}lte(e,r){return this.setLimit(\\\"max\\\",e,!0,Ve.toString(r))}lt(e,r){return this.setLimit(\\\"max\\\",e,!1,Ve.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ve.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:\\\"int\\\",message:Ve.toString(e)})}positive(e){return this._addCheck({kind:\\\"min\\\",value:0,inclusive:!1,message:Ve.toString(e)})}negative(e){return this._addCheck({kind:\\\"max\\\",value:0,inclusive:!1,message:Ve.toString(e)})}nonpositive(e){return this._addCheck({kind:\\\"max\\\",value:0,inclusive:!0,message:Ve.toString(e)})}nonnegative(e){return this._addCheck({kind:\\\"min\\\",value:0,inclusive:!0,message:Ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:\\\"multipleOf\\\",value:e,message:Ve.toString(r)})}finite(e){return this._addCheck({kind:\\\"finite\\\",message:Ve.toString(e)})}safe(e){return this._addCheck({kind:\\\"min\\\",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ve.toString(e)})._addCheck({kind:\\\"max\\\",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ve.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind===\\\"min\\\"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind===\\\"max\\\"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===\\\"int\\\"||e.kind===\\\"multipleOf\\\"&&Kt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind===\\\"finite\\\"||n.kind===\\\"int\\\"||n.kind===\\\"multipleOf\\\")return!0;n.kind===\\\"min\\\"?(r===null||n.value>r)&&(r=n.value):n.kind===\\\"max\\\"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Xw.create=t=>new Xw({checks:[],typeName:at.ZodNumber,coerce:t?.coerce||!1,...Tt(t)});var ev=class t extends kt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Be.bigint)return this._getInvalidInput(e);let n,i=new jo;for(let s of this._def.checks)s.kind===\\\"min\\\"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.too_small,type:\\\"bigint\\\",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind===\\\"max\\\"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.too_big,type:\\\"bigint\\\",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind===\\\"multipleOf\\\"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),Pe(n,{code:ve.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Kt.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return Pe(r,{code:ve.invalid_type,expected:Be.bigint,received:r.parsedType}),nt}gte(e,r){return this.setLimit(\\\"min\\\",e,!0,Ve.toString(r))}gt(e,r){return this.setLimit(\\\"min\\\",e,!1,Ve.toString(r))}lte(e,r){return this.setLimit(\\\"max\\\",e,!0,Ve.toString(r))}lt(e,r){return this.setLimit(\\\"max\\\",e,!1,Ve.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ve.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:\\\"min\\\",value:BigInt(0),inclusive:!1,message:Ve.toString(e)})}negative(e){return this._addCheck({kind:\\\"max\\\",value:BigInt(0),inclusive:!1,message:Ve.toString(e)})}nonpositive(e){return this._addCheck({kind:\\\"max\\\",value:BigInt(0),inclusive:!0,message:Ve.toString(e)})}nonnegative(e){return this._addCheck({kind:\\\"min\\\",value:BigInt(0),inclusive:!0,message:Ve.toString(e)})}multipleOf(e,r){return this._addCheck({kind:\\\"multipleOf\\\",value:e,message:Ve.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind===\\\"min\\\"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind===\\\"max\\\"&&(e===null||r.value<e)&&(e=r.value);return e}};ev.create=t=>new ev({checks:[],typeName:at.ZodBigInt,coerce:t?.coerce??!1,...Tt(t)});var tv=class extends kt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Be.boolean){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.boolean,received:n.parsedType}),nt}return wa(e.data)}};tv.create=t=>new tv({typeName:at.ZodBoolean,coerce:t?.coerce||!1,...Tt(t)});var rv=class t extends kt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Be.date){let s=this._getOrReturnCtx(e);return Pe(s,{code:ve.invalid_type,expected:Be.date,received:s.parsedType}),nt}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return Pe(s,{code:ve.invalid_date}),nt}let n=new jo,i;for(let s of this._def.checks)s.kind===\\\"min\\\"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:\\\"date\\\"}),n.dirty()):s.kind===\\\"max\\\"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),Pe(i,{code:ve.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:\\\"date\\\"}),n.dirty()):Kt.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:\\\"min\\\",value:e.getTime(),message:Ve.toString(r)})}max(e,r){return this._addCheck({kind:\\\"max\\\",value:e.getTime(),message:Ve.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind===\\\"min\\\"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind===\\\"max\\\"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};rv.create=t=>new rv({checks:[],coerce:t?.coerce||!1,typeName:at.ZodDate,...Tt(t)});var Q6=class extends kt{_parse(e){if(this._getType(e)!==Be.symbol){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.symbol,received:n.parsedType}),nt}return wa(e.data)}};Q6.create=t=>new Q6({typeName:at.ZodSymbol,...Tt(t)});var nv=class extends kt{_parse(e){if(this._getType(e)!==Be.undefined){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.undefined,received:n.parsedType}),nt}return wa(e.data)}};nv.create=t=>new nv({typeName:at.ZodUndefined,...Tt(t)});var iv=class extends kt{_parse(e){if(this._getType(e)!==Be.null){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.null,received:n.parsedType}),nt}return wa(e.data)}};iv.create=t=>new iv({typeName:at.ZodNull,...Tt(t)});var My=class extends kt{constructor(){super(...arguments),this._any=!0}_parse(e){return wa(e.data)}};My.create=t=>new My({typeName:at.ZodAny,...Tt(t)});var $m=class extends kt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wa(e.data)}};$m.create=t=>new $m({typeName:at.ZodUnknown,...Tt(t)});var Yd=class extends kt{_parse(e){let r=this._getOrReturnCtx(e);return Pe(r,{code:ve.invalid_type,expected:Be.never,received:r.parsedType}),nt}};Yd.create=t=>new Yd({typeName:at.ZodNever,...Tt(t)});var J6=class extends kt{_parse(e){if(this._getType(e)!==Be.undefined){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.void,received:n.parsedType}),nt}return wa(e.data)}};J6.create=t=>new J6({typeName:at.ZodVoid,...Tt(t)});var Vm=class t extends kt{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==Be.array)return Pe(r,{code:ve.invalid_type,expected:Be.array,received:r.parsedType}),nt;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,a=r.data.length<i.exactLength.value;(o||a)&&(Pe(r,{code:o?ve.too_big:ve.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:\\\"array\\\",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(Pe(r,{code:ve.too_small,minimum:i.minLength.value,type:\\\"array\\\",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(Pe(r,{code:ve.too_big,maximum:i.maxLength.value,type:\\\"array\\\",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>i.type._parseAsync(new ku(r,o,r.path,a)))).then(o=>jo.mergeArray(n,o));let s=[...r.data].map((o,a)=>i.type._parseSync(new ku(r,o,r.path,a)));return jo.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Ve.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Ve.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Ve.toString(r)}})}nonempty(e){return this.min(1,e)}};Vm.create=(t,e)=>new Vm({type:t,minLength:null,maxLength:null,exactLength:null,typeName:at.ZodArray,...Tt(e)});function Z6(t){if(t instanceof Dc){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Nu.create(Z6(n))}return new Dc({...t._def,shape:()=>e})}else return t instanceof Vm?new Vm({...t._def,type:Z6(t.element)}):t instanceof Nu?Nu.create(Z6(t.unwrap())):t instanceof Cp?Cp.create(Z6(t.unwrap())):t instanceof _p?_p.create(t.items.map(e=>Z6(e))):t}var Dc=class t extends kt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Kt.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Be.object){let l=this._getOrReturnCtx(e);return Pe(l,{code:ve.invalid_type,expected:Be.object,received:l.parsedType}),nt}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Yd&&this._def.unknownKeys===\\\"strip\\\"))for(let l in i.data)o.includes(l)||a.push(l);let c=[];for(let l of o){let d=s[l],f=i.data[l];c.push({key:{status:\\\"valid\\\",value:l},value:d._parse(new ku(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Yd){let l=this._def.unknownKeys;if(l===\\\"passthrough\\\")for(let d of a)c.push({key:{status:\\\"valid\\\",value:d},value:{status:\\\"valid\\\",value:i.data[d]}});else if(l===\\\"strict\\\")a.length>0&&(Pe(i,{code:ve.unrecognized_keys,keys:a}),n.dirty());else if(l!==\\\"strip\\\")throw new Error(\\\"Internal ZodObject error: invalid unknownKeys value.\\\")}else{let l=this._def.catchall;for(let d of a){let f=i.data[d];c.push({key:{status:\\\"valid\\\",value:d},value:l._parse(new ku(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let l=[];for(let d of c){let f=await d.key,p=await d.value;l.push({key:f,value:p,alwaysSet:d.alwaysSet})}return l}).then(l=>jo.mergeObjectSync(n,l)):jo.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return Ve.errToObj,new t({...this._def,unknownKeys:\\\"strict\\\",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code===\\\"unrecognized_keys\\\"?{message:Ve.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:\\\"strip\\\"})}passthrough(){return new t({...this._def,unknownKeys:\\\"passthrough\\\"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:at.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Kt.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Kt.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Z6(this)}partial(e){let r={};for(let n of Kt.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Kt.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Nu;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return BCe(Kt.objectKeys(this.shape))}};Dc.create=(t,e)=>new Dc({shape:()=>t,unknownKeys:\\\"strip\\\",catchall:Yd.create(),typeName:at.ZodObject,...Tt(e)});Dc.strictCreate=(t,e)=>new Dc({shape:()=>t,unknownKeys:\\\"strict\\\",catchall:Yd.create(),typeName:at.ZodObject,...Tt(e)});Dc.lazycreate=(t,e)=>new Dc({shape:t,unknownKeys:\\\"strip\\\",catchall:Yd.create(),typeName:at.ZodObject,...Tt(e)});var sv=class extends kt{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let a of s)if(a.result.status===\\\"valid\\\")return a.result;for(let a of s)if(a.result.status===\\\"dirty\\\")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new Mc(a.ctx.common.issues));return Pe(r,{code:ve.invalid_union,unionErrors:o}),nt}if(r.common.async)return Promise.all(n.map(async s=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let s,o=[];for(let c of n){let l={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:l});if(d.status===\\\"valid\\\")return d;d.status===\\\"dirty\\\"&&!s&&(s={result:d,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(c=>new Mc(c));return Pe(r,{code:ve.invalid_union,unionErrors:a}),nt}}get options(){return this._def.options}};sv.create=(t,e)=>new sv({options:t,typeName:at.ZodUnion,...Tt(e)});var zm=t=>t instanceof av?zm(t.schema):t instanceof Bu?zm(t.innerType()):t instanceof cv?[t.value]:t instanceof lv?t.options:t instanceof uv?Kt.objectValues(t.enum):t instanceof dv?zm(t._def.innerType):t instanceof nv?[void 0]:t instanceof iv?[null]:t instanceof Nu?[void 0,...zm(t.unwrap())]:t instanceof Cp?[null,...zm(t.unwrap())]:t instanceof OT||t instanceof pv?zm(t.unwrap()):t instanceof fv?zm(t._def.innerType):[],AD=class t extends kt{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Be.object)return Pe(r,{code:ve.invalid_type,expected:Be.object,received:r.parsedType}),nt;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Pe(r,{code:ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),nt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let o=zm(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \\\\`${e}\\\\` could not be extracted from all schema options`);for(let a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new t({typeName:at.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Tt(n)})}};function _X(t,e){let r=Ep(t),n=Ep(e);if(t===e)return{valid:!0,data:t};if(r===Be.object&&n===Be.object){let i=Kt.objectKeys(e),s=Kt.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(let a of s){let c=_X(t[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===Be.array&&n===Be.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let o=t[s],a=e[s],c=_X(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===Be.date&&n===Be.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ov=class extends kt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,o)=>{if(CD(s)||CD(o))return nt;let a=_X(s.value,o.value);return a.valid?((SD(s)||SD(o))&&r.dirty(),{status:r.value,value:a.data}):(Pe(n,{code:ve.invalid_intersection_types}),nt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ov.create=(t,e,r)=>new ov({left:t,right:e,typeName:at.ZodIntersection,...Tt(r)});var _p=class t extends kt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Be.array)return Pe(n,{code:ve.invalid_type,expected:Be.array,received:n.parsedType}),nt;if(n.data.length<this._def.items.length)return Pe(n,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:\\\"array\\\"}),nt;!this._def.rest&&n.data.length>this._def.items.length&&(Pe(n,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:\\\"array\\\"}),r.dirty());let s=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new ku(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(s).then(o=>jo.mergeArray(r,o)):jo.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};_p.create=(t,e)=>{if(!Array.isArray(t))throw new Error(\\\"You must pass an array of schemas to z.tuple([ ... ])\\\");return new _p({items:t,typeName:at.ZodTuple,rest:null,...Tt(e)})};var TD=class t extends kt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Be.object)return Pe(n,{code:ve.invalid_type,expected:Be.object,received:n.parsedType}),nt;let i=[],s=this._def.keyType,o=this._def.valueType;for(let a in n.data)i.push({key:s._parse(new ku(n,a,n.path,a)),value:o._parse(new ku(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?jo.mergeObjectAsync(r,i):jo.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof kt?new t({keyType:e,valueType:r,typeName:at.ZodRecord,...Tt(n)}):new t({keyType:By.create(),valueType:e,typeName:at.ZodRecord,...Tt(r)})}},Y6=class extends kt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Be.map)return Pe(n,{code:ve.invalid_type,expected:Be.map,received:n.parsedType}),nt;let i=this._def.keyType,s=this._def.valueType,o=[...n.data.entries()].map(([a,c],l)=>({key:i._parse(new ku(n,a,n.path,[l,\\\"key\\\"])),value:s._parse(new ku(n,c,n.path,[l,\\\"value\\\"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,d=await c.value;if(l.status===\\\"aborted\\\"||d.status===\\\"aborted\\\")return nt;(l.status===\\\"dirty\\\"||d.status===\\\"dirty\\\")&&r.dirty(),a.set(l.value,d.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of o){let l=c.key,d=c.value;if(l.status===\\\"aborted\\\"||d.status===\\\"aborted\\\")return nt;(l.status===\\\"dirty\\\"||d.status===\\\"dirty\\\")&&r.dirty(),a.set(l.value,d.value)}return{status:r.value,value:a}}}};Y6.create=(t,e,r)=>new Y6({valueType:e,keyType:t,typeName:at.ZodMap,...Tt(r)});var X6=class t extends kt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Be.set)return Pe(n,{code:ve.invalid_type,expected:Be.set,received:n.parsedType}),nt;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(Pe(n,{code:ve.too_small,minimum:i.minSize.value,type:\\\"set\\\",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(Pe(n,{code:ve.too_big,maximum:i.maxSize.value,type:\\\"set\\\",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function o(c){let l=new Set;for(let d of c){if(d.status===\\\"aborted\\\")return nt;d.status===\\\"dirty\\\"&&r.dirty(),l.add(d.value)}return{status:r.value,value:l}}let a=[...n.data.values()].map((c,l)=>s._parse(new ku(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Ve.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Ve.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};X6.create=(t,e)=>new X6({valueType:t,minSize:null,maxSize:null,typeName:at.ZodSet,...Tt(e)});var ID=class t extends kt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Be.function)return Pe(r,{code:ve.invalid_type,expected:Be.function,received:r.parsedType}),nt;function n(a,c){return PT({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,G6(),qm].filter(l=>!!l),issueData:{code:ve.invalid_arguments,argumentsError:c}})}function i(a,c){return PT({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,G6(),qm].filter(l=>!!l),issueData:{code:ve.invalid_return_type,returnTypeError:c}})}let s={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Dy){let a=this;return wa(async function(...c){let l=new Mc([]),d=await a._def.args.parseAsync(c,s).catch(h=>{throw l.addIssue(n(c,h)),l}),f=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(f,s).catch(h=>{throw l.addIssue(i(f,h)),l})})}else{let a=this;return wa(function(...c){let l=a._def.args.safeParse(c,s);if(!l.success)throw new Mc([n(c,l.error)]);let d=Reflect.apply(o,this,l.data),f=a._def.returns.safeParse(d,s);if(!f.success)throw new Mc([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:_p.create(e).rest($m.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||_p.create([]).rest($m.create()),returns:r||$m.create(),typeName:at.ZodFunction,...Tt(n)})}},av=class extends kt{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};av.create=(t,e)=>new av({getter:t,typeName:at.ZodLazy,...Tt(e)});var cv=class extends kt{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Pe(r,{received:r.data,code:ve.invalid_literal,expected:this._def.value}),nt}return{status:\\\"valid\\\",value:e.data}}get value(){return this._def.value}};cv.create=(t,e)=>new cv({value:t,typeName:at.ZodLiteral,...Tt(e)});function BCe(t,e){return new lv({values:t,typeName:at.ZodEnum,...Tt(e)})}var lv=class t extends kt{_parse(e){if(typeof e.data!=\\\"string\\\"){let r=this._getOrReturnCtx(e),n=this._def.values;return Pe(r,{expected:Kt.joinValues(n),received:r.parsedType,code:ve.invalid_type}),nt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return Pe(r,{received:r.data,code:ve.invalid_enum_value,options:n}),nt}return wa(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};lv.create=BCe;var uv=class extends kt{_parse(e){let r=Kt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Be.string&&n.parsedType!==Be.number){let i=Kt.objectValues(r);return Pe(n,{expected:Kt.joinValues(i),received:n.parsedType,code:ve.invalid_type}),nt}if(this._cache||(this._cache=new Set(Kt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=Kt.objectValues(r);return Pe(n,{received:n.data,code:ve.invalid_enum_value,options:i}),nt}return wa(e.data)}get enum(){return this._def.values}};uv.create=(t,e)=>new uv({values:t,typeName:at.ZodNativeEnum,...Tt(e)});var Dy=class extends kt{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Be.promise&&r.common.async===!1)return Pe(r,{code:ve.invalid_type,expected:Be.promise,received:r.parsedType}),nt;let n=r.parsedType===Be.promise?r.data:Promise.resolve(r.data);return wa(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Dy.create=(t,e)=>new Dy({type:t,typeName:at.ZodPromise,...Tt(e)});var Bu=class extends kt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===at.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{Pe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type===\\\"preprocess\\\"){let o=i.transform(n.data,s);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value===\\\"aborted\\\")return nt;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status===\\\"aborted\\\"?nt:c.status===\\\"dirty\\\"?Yw(c.value):r.value===\\\"dirty\\\"?Yw(c.value):c});{if(r.value===\\\"aborted\\\")return nt;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status===\\\"aborted\\\"?nt:a.status===\\\"dirty\\\"?Yw(a.value):r.value===\\\"dirty\\\"?Yw(a.value):a}}if(i.type===\\\"refinement\\\"){let o=a=>{let c=i.refinement(a,s);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error(\\\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\\\");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status===\\\"aborted\\\"?nt:(a.status===\\\"dirty\\\"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status===\\\"aborted\\\"?nt:(a.status===\\\"dirty\\\"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(i.type===\\\"transform\\\")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ky(o))return nt;let a=i.transform(o.value,s);if(a instanceof Promise)throw new Error(\\\"Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.\\\");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>ky(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:r.value,value:a})):nt);Kt.assertNever(i)}};Bu.create=(t,e,r)=>new Bu({schema:t,typeName:at.ZodEffects,effect:e,...Tt(r)});Bu.createWithPreprocess=(t,e,r)=>new Bu({schema:e,effect:{type:\\\"preprocess\\\",transform:t},typeName:at.ZodEffects,...Tt(r)});var Nu=class extends kt{_parse(e){return this._getType(e)===Be.undefined?wa(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Nu.create=(t,e)=>new Nu({innerType:t,typeName:at.ZodOptional,...Tt(e)});var Cp=class extends kt{_parse(e){return this._getType(e)===Be.null?wa(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Cp.create=(t,e)=>new Cp({innerType:t,typeName:at.ZodNullable,...Tt(e)});var dv=class extends kt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===Be.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};dv.create=(t,e)=>new dv({innerType:t,typeName:at.ZodDefault,defaultValue:typeof e.default==\\\"function\\\"?e.default:()=>e.default,...Tt(e)});var fv=class extends kt{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return K6(i)?i.then(s=>({status:\\\"valid\\\",value:s.status===\\\"valid\\\"?s.value:this._def.catchValue({get error(){return new Mc(n.common.issues)},input:n.data})})):{status:\\\"valid\\\",value:i.status===\\\"valid\\\"?i.value:this._def.catchValue({get error(){return new Mc(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};fv.create=(t,e)=>new fv({innerType:t,typeName:at.ZodCatch,catchValue:typeof e.catch==\\\"function\\\"?e.catch:()=>e.catch,...Tt(e)});var e3=class extends kt{_parse(e){if(this._getType(e)!==Be.nan){let n=this._getOrReturnCtx(e);return Pe(n,{code:ve.invalid_type,expected:Be.nan,received:n.parsedType}),nt}return{status:\\\"valid\\\",value:e.data}}};e3.create=t=>new e3({typeName:at.ZodNaN,...Tt(t)});var tmt=Symbol(\\\"zod_brand\\\"),OT=class extends kt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},NT=class t extends kt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status===\\\"aborted\\\"?nt:s.status===\\\"dirty\\\"?(r.dirty(),Yw(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status===\\\"aborted\\\"?nt:i.status===\\\"dirty\\\"?(r.dirty(),{status:\\\"dirty\\\",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:at.ZodPipeline})}},pv=class extends kt{_parse(e){let r=this._def.innerType._parse(e),n=i=>(ky(i)&&(i.value=Object.freeze(i.value)),i);return K6(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};pv.create=(t,e)=>new pv({innerType:t,typeName:at.ZodReadonly,...Tt(e)});function PCe(t,e){let r=typeof t==\\\"function\\\"?t(e):typeof t==\\\"string\\\"?{message:t}:t;return typeof r==\\\"string\\\"?{message:r}:r}function MCe(t,e={},r){return t?My.create().superRefine((n,i)=>{let s=t(n);if(s instanceof Promise)return s.then(o=>{if(!o){let a=PCe(e,n),c=a.fatal??r??!0;i.addIssue({code:\\\"custom\\\",...a,fatal:c})}});if(!s){let o=PCe(e,n),a=o.fatal??r??!0;i.addIssue({code:\\\"custom\\\",...o,fatal:a})}}):My.create()}var rmt={object:Dc.lazycreate},at;(function(t){t.ZodString=\\\"ZodString\\\",t.ZodNumber=\\\"ZodNumber\\\",t.ZodNaN=\\\"ZodNaN\\\",t.ZodBigInt=\\\"ZodBigInt\\\",t.ZodBoolean=\\\"ZodBoolean\\\",t.ZodDate=\\\"ZodDate\\\",t.ZodSymbol=\\\"ZodSymbol\\\",t.ZodUndefined=\\\"ZodUndefined\\\",t.ZodNull=\\\"ZodNull\\\",t.ZodAny=\\\"ZodAny\\\",t.ZodUnknown=\\\"ZodUnknown\\\",t.ZodNever=\\\"ZodNever\\\",t.ZodVoid=\\\"ZodVoid\\\",t.ZodArray=\\\"ZodArray\\\",t.ZodObject=\\\"ZodObject\\\",t.ZodUnion=\\\"ZodUnion\\\",t.ZodDiscriminatedUnion=\\\"ZodDiscriminatedUnion\\\",t.ZodIntersection=\\\"ZodIntersection\\\",t.ZodTuple=\\\"ZodTuple\\\",t.ZodRecord=\\\"ZodRecord\\\",t.ZodMap=\\\"ZodMap\\\",t.ZodSet=\\\"ZodSet\\\",t.ZodFunction=\\\"ZodFunction\\\",t.ZodLazy=\\\"ZodLazy\\\",t.ZodLiteral=\\\"ZodLiteral\\\",t.ZodEnum=\\\"ZodEnum\\\",t.ZodEffects=\\\"ZodEffects\\\",t.ZodNativeEnum=\\\"ZodNativeEnum\\\",t.ZodOptional=\\\"ZodOptional\\\",t.ZodNullable=\\\"ZodNullable\\\",t.ZodDefault=\\\"ZodDefault\\\",t.ZodCatch=\\\"ZodCatch\\\",t.ZodPromise=\\\"ZodPromise\\\",t.ZodBranded=\\\"ZodBranded\\\",t.ZodPipeline=\\\"ZodPipeline\\\",t.ZodReadonly=\\\"ZodReadonly\\\"})(at||(at={}));var nmt=(t,e={message:`Input not instance of ${t.name}`})=>MCe(r=>r instanceof t,e),DCe=By.create,LCe=Xw.create,imt=e3.create,smt=ev.create,UCe=tv.create,omt=rv.create,amt=Q6.create,cmt=nv.create,lmt=iv.create,umt=My.create,dmt=$m.create,fmt=Yd.create,pmt=J6.create,hmt=Vm.create,mmt=Dc.create,gmt=Dc.strictCreate,ymt=sv.create,bmt=AD.create,wmt=ov.create,vmt=_p.create,xmt=TD.create,Emt=Y6.create,_mt=X6.create,Cmt=ID.create,Smt=av.create,Amt=cv.create,Tmt=lv.create,Imt=uv.create,Rmt=Dy.create,Pmt=Bu.create,Omt=Nu.create,Nmt=Cp.create,kmt=Bu.createWithPreprocess,Bmt=NT.create,Mmt=()=>DCe().optional(),Dmt=()=>LCe().optional(),Lmt=()=>UCe().optional(),Umt={string:(t=>By.create({...t,coerce:!0})),number:(t=>Xw.create({...t,coerce:!0})),boolean:(t=>tv.create({...t,coerce:!0})),bigint:(t=>ev.create({...t,coerce:!0})),date:(t=>rv.create({...t,coerce:!0}))};var Fmt=nt;var FCe=it.string().regex(/^[a-z0-9-]+:[a-zA-Z0-9-]+$/,{message:\\\"Network must be in CAIP-2 format (e.g., 'eip155:1', 'solana:mainnet')\\\"}),jCe=it.object({url:it.string().url({message:\\\"Resource URL must be a valid URL\\\"}),description:it.string().optional(),mimeType:it.string().optional()}),HCe=it.object({scheme:it.string().min(1,{message:\\\"Scheme is required\\\"}),network:FCe,asset:it.string().min(1,{message:\\\"Asset address is required\\\"}),amount:it.string().regex(/^\\\\d+$/,{message:\\\"Amount must be a non-negative integer string\\\"}),payTo:it.string().min(1,{message:\\\"PayTo address is required\\\"}),maxTimeoutSeconds:it.number().int().positive({message:\\\"maxTimeoutSeconds must be a positive integer\\\"}),extra:it.record(it.unknown())}),jmt=it.object({t402Version:it.literal(2,{errorMap:()=>({message:\\\"t402Version must be 2 for V2 protocol\\\"})}),error:it.string().optional(),resource:jCe,accepts:it.array(HCe).min(1,{message:\\\"At least one payment option is required\\\"}),extensions:it.record(it.unknown()).optional()}),Hmt=it.object({t402Version:it.literal(2,{errorMap:()=>({message:\\\"t402Version must be 2 for V2 protocol\\\"})}),resource:jCe.optional(),accepted:HCe,payload:it.record(it.unknown()),extensions:it.record(it.unknown()).optional()}),YBr=it.object({isValid:it.boolean(),invalidReason:it.string().optional(),payer:it.string().optional()}),qmt=it.object({success:it.boolean(),transaction:it.string(),network:FCe,errorReason:it.string().optional(),payer:it.string().optional(),confirmations:it.string().optional()}),zmt=it.object({scheme:it.string().min(1),network:it.string().min(1),asset:it.string().min(1),amount:it.string().regex(/^\\\\d+$/),payTo:it.string().min(1),maxTimeoutSeconds:it.number().int().positive(),extra:it.record(it.unknown()).optional()}),XBr=it.object({t402Version:it.literal(1).optional(),accepted:zmt,payload:it.record(it.unknown())});u();var CX=(t,e)=>{let r=t.get(e);if(!r)for(let[n,i]of t.entries()){let s=n.replace(/[.*+?^${}()|[\\\\]\\\\\\\\]/g,\\\"\\\\\\\\$&\\\").replace(/\\\\\\\\\\\\*/g,\\\".*\\\");if(new RegExp(`^${s}$`).test(e)){r=i;break}}return r},qCe=(t,e,r)=>CX(t,r)?.get(e);var zCe=class $Ce{constructor(e){Hm(this,\\\"paymentRequirementsSelector\\\"),Hm(this,\\\"registeredClientSchemes\\\",new Map),Hm(this,\\\"policies\\\",[]),Hm(this,\\\"beforePaymentCreationHooks\\\",[]),Hm(this,\\\"afterPaymentCreationHooks\\\",[]),Hm(this,\\\"onPaymentCreationFailureHooks\\\",[]),this.paymentRequirementsSelector=e||((r,n)=>n[0])}static fromConfig(e){let r=new $Ce(e.paymentRequirementsSelector);return e.schemes.forEach(n=>{n.t402Version===1?r.registerV1(n.network,n.client):r.register(n.network,n.client)}),e.policies?.forEach(n=>{r.registerPolicy(n)}),r}register(e,r){return this._registerScheme(vX,e,r)}registerV1(e,r){return this._registerScheme(1,e,r)}registerPolicy(e){return this.policies.push(e),this}onBeforePaymentCreation(e){return this.beforePaymentCreationHooks.push(e),this}onAfterPaymentCreation(e){return this.afterPaymentCreationHooks.push(e),this}onPaymentCreationFailure(e){return this.onPaymentCreationFailureHooks.push(e),this}async createPaymentPayload(e){let r=this.registeredClientSchemes.get(e.t402Version);if(!r)throw new Error(`No client registered for t402 version: ${e.t402Version}`);let n=this.selectPaymentRequirements(e.t402Version,e.accepts),i={paymentRequired:e,selectedRequirements:n};for(let s of this.beforePaymentCreationHooks){let o=await s(i);if(o&&\\\"abort\\\"in o&&o.abort)throw new Error(`Payment creation aborted: ${o.reason}`)}try{let s=qCe(r,n.scheme,n.network);if(!s)throw new Error(`No client registered for scheme: ${n.scheme} and network: ${n.network}`);let o=await s.createPaymentPayload(e.t402Version,n),a;o.t402Version===1?a=o:a={...o,extensions:e.extensions,resource:e.resource,accepted:n};let c={...i,paymentPayload:a};for(let l of this.afterPaymentCreationHooks)await l(c);return a}catch(s){let o={...i,error:s};for(let a of this.onPaymentCreationFailureHooks){let c=await a(o);if(c&&\\\"recovered\\\"in c&&c.recovered)return c.payload}throw s}}selectPaymentRequirements(e,r){let n=this.registeredClientSchemes.get(e);if(!n)throw new Error(`No client registered for t402 version: ${e}`);let i=r.filter(o=>{let a=CX(n,o.network);return a?a.has(o.scheme):!1});if(i.length===0)throw new Error(`No network/scheme registered for t402 version: ${e} which comply with the payment requirements. ${JSON.stringify({t402Version:e,paymentRequirements:r,t402Versions:Array.from(this.registeredClientSchemes.keys()),networks:Array.from(n.keys()),schemes:Array.from(n.values()).map(o=>Array.from(o.keys())).flat()})}`);let s=i;for(let o of this.policies)if(s=o(e,s),s.length===0)throw new Error(`All payment requirements were filtered out by policies for t402 version: ${e}`);return this.paymentRequirementsSelector(e,s)}_registerScheme(e,r,n){this.registeredClientSchemes.has(e)||this.registeredClientSchemes.set(e,new Map);let i=this.registeredClientSchemes.get(e);i.has(r)||i.set(r,new Map);let s=i.get(r);return s.has(n.scheme)||s.set(n.scheme,n),this}};u();var $mt={1:\\\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\\\",8453:\\\"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\\\",84532:\\\"0x036CbD53842c5426634e7929541eC2318f3dCF7e\\\"},Vmt=[{name:\\\"balanceOf\\\",type:\\\"function\\\",stateMutability:\\\"view\\\",inputs:[{name:\\\"account\\\",type:\\\"address\\\"}],outputs:[{name:\\\"balance\\\",type:\\\"uint256\\\"}]}];async function SX(t,e){let r=t.chain?.id;if(!r)return 0n;let n=$mt[r];if(!n)return 0n;try{return await t.readContract({address:n,abi:Vmt,functionName:\\\"balanceOf\\\",args:[e]})}catch(i){return console.error(\\\"Failed to fetch USDC balance:\\\",i),0n}}u();var AX=Me(Tl(),1);function VCe({className:t=\\\"\\\"}){return(0,AX.jsx)(\\\"div\\\",{className:`spinner ${t}`,children:(0,AX.jsx)(\\\"div\\\",{})})}u();var Wmt={1:\\\"Ethereum\\\",10:\\\"Optimism\\\",56:\\\"BNB Smart Chain\\\",100:\\\"Gnosis\\\",137:\\\"Polygon\\\",250:\\\"Fantom\\\",324:\\\"zkSync Era\\\",5e3:\\\"Mantle\\\",8453:\\\"Base\\\",42161:\\\"Arbitrum One\\\",42170:\\\"Arbitrum Nova\\\",43114:\\\"Avalanche\\\",42220:\\\"Celo\\\",59144:\\\"Linea\\\",534352:\\\"Scroll\\\",81457:\\\"Blast\\\",34443:\\\"Mode\\\",7777777:\\\"Zora\\\",11155111:\\\"Sepolia\\\",84532:\\\"Base Sepolia\\\",421614:\\\"Arbitrum Sepolia\\\",11155420:\\\"OP Sepolia\\\",80002:\\\"Polygon Amoy\\\",97:\\\"BNB Testnet\\\",43113:\\\"Avalanche Fuji\\\",59141:\\\"Linea Sepolia\\\",534351:\\\"Scroll Sepolia\\\",300:\\\"zkSync Sepolia\\\",5003:\\\"Mantle Sepolia\\\",168587773:\\\"Blast Sepolia\\\",999999999:\\\"Zora Sepolia\\\"},Gmt=new Set([11155111,84532,421614,11155420,80002,97,43113,59141,534351,300,5003,168587773,999999999]);var WCe={MAINNET:\\\"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\\\",DEVNET:\\\"EtWTRABZaYq6iMfeYKouRu166VU2xqa1\\\"},GCe={MAINNET:\\\"mainnet\\\",TESTNET:\\\"testnet\\\"},RD={MAINNET:\\\"mainnet\\\",NILE:\\\"nile\\\",SHASTA:\\\"shasta\\\"},KCe={MAINNET:\\\"1\\\",TESTNET:\\\"2147483648\\\"},TX={NOBLE_MAINNET:\\\"noble-1\\\",NOBLE_TESTNET:\\\"grand-1\\\"},ZCe={MAINNET:\\\"mainnet\\\",TESTNET:\\\"testnet\\\"};function QCe(t){return t.startsWith(\\\"eip155:\\\")}function JCe(t){if(t.startsWith(\\\"eip155:\\\")){let e=parseInt(t.split(\\\":\\\")[1]);return Wmt[e]??`Chain ${e}`}if(t.startsWith(\\\"solana:\\\"))return t.split(\\\":\\\")[1]===WCe.DEVNET?\\\"Solana Devnet\\\":\\\"Solana Mainnet\\\";if(t.startsWith(\\\"ton:\\\"))return t.split(\\\":\\\")[1]===GCe.TESTNET?\\\"TON Testnet\\\":\\\"TON Mainnet\\\";if(t.startsWith(\\\"tron:\\\")){let e=t.split(\\\":\\\")[1];return e===RD.NILE?\\\"TRON Nile Testnet\\\":e===RD.SHASTA?\\\"TRON Shasta Testnet\\\":\\\"TRON Mainnet\\\"}if(t.startsWith(\\\"stacks:\\\"))return t.split(\\\":\\\")[1]===KCe.TESTNET?\\\"Stacks Testnet\\\":\\\"Stacks Mainnet\\\";if(t.startsWith(\\\"cosmos:\\\")){let e=t.split(\\\":\\\")[1];return e===TX.NOBLE_MAINNET?\\\"Noble\\\":e===TX.NOBLE_TESTNET?\\\"Noble Testnet\\\":`Cosmos ${e}`}return t.startsWith(\\\"near:\\\")?t.split(\\\":\\\")[1]===ZCe.TESTNET?\\\"NEAR Testnet\\\":\\\"NEAR Mainnet\\\":t}function YCe(t){if(t.startsWith(\\\"eip155:\\\")){let e=parseInt(t.split(\\\":\\\")[1]);return Gmt.has(e)}if(t.startsWith(\\\"solana:\\\"))return t.split(\\\":\\\")[1]===WCe.DEVNET;if(t.startsWith(\\\"ton:\\\"))return t.split(\\\":\\\")[1]===GCe.TESTNET;if(t.startsWith(\\\"tron:\\\")){let e=t.split(\\\":\\\")[1];return e===RD.NILE||e===RD.SHASTA}return t.startsWith(\\\"stacks:\\\")?t.split(\\\":\\\")[1]===KCe.TESTNET:t.startsWith(\\\"cosmos:\\\")?t.split(\\\":\\\")[1]===TX.NOBLE_TESTNET:t.startsWith(\\\"near:\\\")?t.split(\\\":\\\")[1]===ZCe.TESTNET:!1}u();function XCe(t){if(!t.account)throw new Error(\\\"Wallet client must have an account\\\");return{address:t.account.address,signTypedData:async e=>await t.signTypedData({account:t.account,domain:e.domain,types:e.types,primaryType:e.primaryType,message:e.message})}}u();var Lc=Me(Tl(),1),kT=[{key:\\\"connect\\\",label:\\\"Connect\\\"},{key:\\\"sign\\\",label:\\\"Sign\\\"},{key:\\\"submit\\\",label:\\\"Submit\\\"},{key:\\\"confirm\\\",label:\\\"Confirm\\\"}];function Kmt(t){return kT.findIndex(e=>e.key===t)}function Zmt(){return(0,Lc.jsx)(\\\"svg\\\",{width:\\\"14\\\",height:\\\"14\\\",viewBox:\\\"0 0 14 14\\\",fill:\\\"none\\\",\\\"aria-hidden\\\":\\\"true\\\",children:(0,Lc.jsx)(\\\"path\\\",{d:\\\"M11.5 4L5.5 10L2.5 7\\\",stroke:\\\"currentColor\\\",strokeWidth:\\\"2\\\",strokeLinecap:\\\"round\\\",strokeLinejoin:\\\"round\\\"})})}function Qmt(){return(0,Lc.jsx)(\\\"svg\\\",{width:\\\"14\\\",height:\\\"14\\\",viewBox:\\\"0 0 14 14\\\",fill:\\\"none\\\",className:\\\"progress-spinner\\\",\\\"aria-hidden\\\":\\\"true\\\",children:(0,Lc.jsx)(\\\"circle\\\",{cx:\\\"7\\\",cy:\\\"7\\\",r:\\\"5\\\",stroke:\\\"currentColor\\\",strokeWidth:\\\"2\\\",strokeLinecap:\\\"round\\\",strokeDasharray:\\\"20\\\",strokeDashoffset:\\\"10\\\"})})}function e4e({currentStep:t,isProcessing:e=!1,hasError:r=!1}){let n=Kmt(t);return(0,Lc.jsx)(\\\"div\\\",{className:\\\"payment-progress\\\",role:\\\"progressbar\\\",\\\"aria-valuenow\\\":n+1,\\\"aria-valuemin\\\":1,\\\"aria-valuemax\\\":kT.length,\\\"aria-label\\\":`Payment progress: ${kT[n].label}`,children:kT.map((i,s)=>{let o=s<n,a=s===n,c=s>n,l=\\\"progress-step\\\";return o&&(l+=\\\" completed\\\"),a&&(l+=\\\" current\\\"),a&&e&&(l+=\\\" processing\\\"),a&&r&&(l+=\\\" error\\\"),c&&(l+=\\\" pending\\\"),(0,Lc.jsxs)(\\\"div\\\",{className:l,children:[(0,Lc.jsx)(\\\"div\\\",{className:\\\"progress-step-indicator\\\",children:o?(0,Lc.jsx)(Zmt,{}):a&&e?(0,Lc.jsx)(Qmt,{}):(0,Lc.jsx)(\\\"span\\\",{className:\\\"progress-step-number\\\",children:s+1})}),(0,Lc.jsx)(\\\"span\\\",{className:\\\"progress-step-label\\\",children:i.label}),s<kT.length-1&&(0,Lc.jsx)(\\\"div\\\",{className:`progress-connector ${o?\\\"completed\\\":\\\"\\\"}`,\\\"aria-hidden\\\":\\\"true\\\"})]},i.key)})})}var zt=Me(Tl(),1);function t4e({paymentRequired:t,onSuccessfulResponse:e}){let{address:r,isConnected:n,chainId:i}=rT(),{switchChainAsync:s}=VY(),{data:o}=WY(),{connectors:a,connect:c}=zY(),{disconnect:l}=$Y(),[d,f]=(0,_s.useState)(\\\"\\\"),[p,h]=(0,_s.useState)(null),[m,g]=(0,_s.useState)(!1),[w,v]=(0,_s.useState)(\\\"\\\"),[b,_]=(0,_s.useState)(!0),[S,T]=(0,_s.useState)(\\\"\\\"),[N,O]=(0,_s.useState)(\\\"connect\\\"),[L,B]=(0,_s.useState)(!1),H=window.t402,M=H.amount,F=t.accepts[0];if(!F)throw new Error(\\\"No payment requirements in paymentRequired.accepts\\\");let R=F.network,y=JCe(R),E=YCe(R),C=parseInt(R.split(\\\":\\\")[1]),I=lCe(C);if(!I)throw new Error(`Unsupported chain ID: ${C}. Add it to evmChains.ts if needed.`);let P=(0,_s.useMemo)(()=>ZA({chain:I,transport:za()}).extend(h6),[I]),k=(0,_s.useCallback)(async()=>{if(!r)return;let A=await SX(P,r),j=cm(A,6);v(j)},[r,P]),U=(0,_s.useCallback)(async()=>{if(!p)try{f(\\\"\\\"),await s({chainId:C}),await new Promise(A=>setTimeout(A,100))}catch(A){f(A instanceof Error?A.message:\\\"Failed to switch network\\\")}},[s,C,p]);(0,_s.useEffect)(()=>{r&&(U(),k())},[r,U,k]),(0,_s.useEffect)(()=>{n&&C===i?(h(!0),f(\\\"\\\")):n&&C!==i?(h(!1),f(`On the wrong network. Please switch to ${y}.`)):(h(null),f(\\\"\\\"))},[C,i,n,y]),(0,_s.useEffect)(()=>{!S&&a.length===1&&T(a[0].id)},[a,S]),(0,_s.useEffect)(()=>{n?N===\\\"connect\\\"&&O(\\\"sign\\\"):O(\\\"connect\\\")},[n,N]);let D=(0,_s.useCallback)(async()=>{if(!r||!H)return;if(await U(),!o){f(\\\"Wallet client not available. Please reconnect your wallet.\\\");return}let A=o.extend(h6);g(!0),B(!0);try{if(f(\\\"Checking USDC balance...\\\"),await SX(P,r)===0n)throw new Error(`Insufficient balance. Make sure you have USDC on ${y}`);O(\\\"sign\\\"),f(\\\"Creating payment signature...\\\");let K=XCe(A),J=new zCe;TCe(J,{signer:K});let X=await J.createPaymentPayload(t),re=btoa(JSON.stringify(X));O(\\\"submit\\\"),f(\\\"Requesting content with payment...\\\");let fe=await fetch(H.currentUrl,{headers:{\\\"PAYMENT-SIGNATURE\\\":re,\\\"Access-Control-Expose-Headers\\\":\\\"PAYMENT-RESPONSE\\\"}});if(fe.ok)O(\\\"confirm\\\"),B(!1),await e(fe);else throw new Error(`Request failed: ${fe.status} ${fe.statusText}`)}catch(j){f(j instanceof Error?j.message:\\\"Payment failed\\\"),B(!1)}finally{g(!1)}},[r,H,t,U,o,P,y,e]);return H?(0,zt.jsxs)(\\\"div\\\",{className:\\\"container gap-8\\\",children:[(0,zt.jsxs)(\\\"div\\\",{className:\\\"header\\\",children:[(0,zt.jsx)(\\\"h1\\\",{className:\\\"title\\\",children:\\\"Payment Required\\\"}),(0,zt.jsxs)(\\\"p\\\",{children:[t.resource?.description&&`${t.resource.description}.`,\\\" To access this content, please pay $\\\",M,\\\" \\\",y,\\\" USDC.\\\"]}),E&&(0,zt.jsxs)(\\\"p\\\",{className:\\\"instructions\\\",children:[\\\"Need \\\",y,\\\" USDC?\\\",\\\" \\\",(0,zt.jsxs)(\\\"a\\\",{href:\\\"https://faucet.circle.com/\\\",target:\\\"_blank\\\",rel:\\\"noopener noreferrer\\\",children:[\\\"Get some \\\",(0,zt.jsx)(\\\"u\\\",{children:\\\"here\\\"}),\\\".\\\"]})]})]}),(0,zt.jsxs)(\\\"div\\\",{className:\\\"content w-full\\\",children:[n?(0,zt.jsx)(\\\"div\\\",{className:\\\"cta-container\\\",children:(0,zt.jsx)(\\\"button\\\",{className:\\\"button button-secondary\\\",onClick:()=>l(),children:\\\"Disconnect\\\"})}):(0,zt.jsxs)(\\\"div\\\",{className:\\\"cta-container\\\",children:[(0,zt.jsxs)(\\\"select\\\",{className:\\\"input\\\",value:S,onChange:A=>T(A.target.value),children:[(0,zt.jsx)(\\\"option\\\",{value:\\\"\\\",disabled:!0,children:\\\"Select a wallet\\\"}),a.map(A=>(0,zt.jsx)(\\\"option\\\",{value:A.id,children:A.name},A.id))]}),(0,zt.jsx)(\\\"button\\\",{className:\\\"button button-primary\\\",onClick:()=>{let A=a.find(j=>j.id===S);A&&c({connector:A})},disabled:!S,children:\\\"Connect wallet\\\"})]}),n&&(0,zt.jsxs)(\\\"div\\\",{id:\\\"payment-section\\\",children:[(0,zt.jsx)(e4e,{currentStep:N,isProcessing:L,hasError:!!d&&!m}),(0,zt.jsxs)(\\\"div\\\",{className:\\\"payment-details\\\",children:[(0,zt.jsxs)(\\\"div\\\",{className:\\\"payment-row\\\",children:[(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-label\\\",children:\\\"Wallet:\\\"}),(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-value\\\",children:r?`${r.slice(0,6)}...${r.slice(-4)}`:\\\"Loading...\\\"})]}),(0,zt.jsxs)(\\\"div\\\",{className:\\\"payment-row\\\",children:[(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-label\\\",children:\\\"Available balance:\\\"}),(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-value\\\",children:(0,zt.jsx)(\\\"button\\\",{className:\\\"balance-button\\\",onClick:()=>_(A=>!A),children:w&&!b?`$${w} USDC`:\\\"\\\\u2022\\\\u2022\\\\u2022\\\\u2022\\\\u2022 USDC\\\"})})]}),(0,zt.jsxs)(\\\"div\\\",{className:\\\"payment-row\\\",children:[(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-label\\\",children:\\\"Amount:\\\"}),(0,zt.jsxs)(\\\"span\\\",{className:\\\"payment-value\\\",children:[\\\"$\\\",M,\\\" USDC\\\"]})]}),(0,zt.jsxs)(\\\"div\\\",{className:\\\"payment-row\\\",children:[(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-label\\\",children:\\\"Network:\\\"}),(0,zt.jsx)(\\\"span\\\",{className:\\\"payment-value\\\",children:y})]})]}),(0,zt.jsx)(\\\"div\\\",{className:\\\"cta-container\\\",children:p?(0,zt.jsx)(\\\"button\\\",{className:\\\"button button-primary\\\",onClick:D,disabled:m,children:m?(0,zt.jsx)(VCe,{}):\\\"Pay now\\\"}):(0,zt.jsxs)(\\\"button\\\",{className:\\\"button button-primary w-full\\\",onClick:U,children:[\\\"Switch to \\\",y]})})]}),d&&(0,zt.jsx)(\\\"div\\\",{className:\\\"status\\\",children:d})]})]}):null}u();u();u();un();lC.type=\\\"coinbaseWallet\\\";function lC(t={}){return t.version===\\\"3\\\"||t.headlessMode?jAt(t):FAt(t)}function FAt(t){let e,r,n,i;return s=>({id:\\\"coinbaseWalletSDK\\\",name:\\\"Coinbase Wallet\\\",rdns:\\\"com.coinbase.wallet\\\",type:lC.type,async connect({chainId:o,withCapabilities:a,...c}={}){try{let l=await this.getProvider(),d=(await l.request({method:\\\"eth_requestAccounts\\\",params:\\\"instantOnboarding\\\"in c&&c.instantOnboarding?[{onboarding:\\\"instant\\\"}]:[]})).map(p=>_r(p));r||(r=this.onAccountsChanged.bind(this),l.on(\\\"accountsChanged\\\",r)),n||(n=this.onChainChanged.bind(this),l.on(\\\"chainChanged\\\",n)),i||(i=this.onDisconnect.bind(this),l.on(\\\"disconnect\\\",i));let f=await this.getChainId();return o&&f!==o&&(f=(await this.switchChain({chainId:o}).catch(h=>{if(h.code===Cr.code)throw h;return{id:f}}))?.id??f),{accounts:a?d.map(p=>({address:p,capabilities:{}})):d,chainId:f}}catch(l){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(l.message)?new Cr(l):l}},async disconnect(){let o=await this.getProvider();r&&(o.removeListener(\\\"accountsChanged\\\",r),r=void 0),n&&(o.removeListener(\\\"chainChanged\\\",n),n=void 0),i&&(o.removeListener(\\\"disconnect\\\",i),i=void 0),o.disconnect(),o.close?.()},async getAccounts(){return(await(await this.getProvider()).request({method:\\\"eth_accounts\\\"})).map(a=>_r(a))},async getChainId(){let a=await(await this.getProvider()).request({method:\\\"eth_chainId\\\"});return Number(a)},async getProvider(){if(!e){let o=typeof t.preference==\\\"string\\\"?{options:t.preference}:{...t.preference,options:t.preference?.options??\\\"all\\\"},{createCoinbaseWalletSDK:a}=await Promise.resolve().then(()=>(N7e(),O7e));e=a({...t,appChainIds:s.chains.map(l=>l.id),preference:o}).getProvider()}return e},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:o,chainId:a}){let c=s.chains.find(d=>d.id===a);if(!c)throw new Do(new ga);let l=await this.getProvider();try{return await l.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:Z(c.id)}]}),c}catch(d){if(d.code===4902)try{let f;o?.blockExplorerUrls?f=o.blockExplorerUrls:f=c.blockExplorers?.default.url?[c.blockExplorers?.default.url]:[];let p;o?.rpcUrls?.length?p=o.rpcUrls:p=[c.rpcUrls.default?.http[0]??\\\"\\\"];let h={blockExplorerUrls:f,chainId:Z(a),chainName:o?.chainName??c.name,iconUrls:o?.iconUrls,nativeCurrency:o?.nativeCurrency??c.nativeCurrency,rpcUrls:p};return await l.request({method:\\\"wallet_addEthereumChain\\\",params:[h]}),c}catch(f){throw new Cr(f)}throw new Do(d)}},onAccountsChanged(o){o.length===0?this.onDisconnect():s.emitter.emit(\\\"change\\\",{accounts:o.map(a=>_r(a))})},onChainChanged(o){let a=Number(o);s.emitter.emit(\\\"change\\\",{chainId:a})},async onDisconnect(o){s.emitter.emit(\\\"disconnect\\\");let a=await this.getProvider();r&&(a.removeListener(\\\"accountsChanged\\\",r),r=void 0),n&&(a.removeListener(\\\"chainChanged\\\",n),n=void 0),i&&(a.removeListener(\\\"disconnect\\\",i),i=void 0)}})}function jAt(t){let r,n,i,s,o;return a=>({id:\\\"coinbaseWalletSDK\\\",name:\\\"Coinbase Wallet\\\",rdns:\\\"com.coinbase.wallet\\\",type:lC.type,async connect({chainId:c,withCapabilities:l}={}){try{let d=await this.getProvider(),f=(await d.request({method:\\\"eth_requestAccounts\\\"})).map(h=>_r(h));i||(i=this.onAccountsChanged.bind(this),d.on(\\\"accountsChanged\\\",i)),s||(s=this.onChainChanged.bind(this),d.on(\\\"chainChanged\\\",s)),o||(o=this.onDisconnect.bind(this),d.on(\\\"disconnect\\\",o));let p=await this.getChainId();return c&&p!==c&&(p=(await this.switchChain({chainId:c}).catch(m=>{if(m.code===Cr.code)throw m;return{id:p}}))?.id??p),{accounts:l?f.map(h=>({address:h,capabilities:{}})):f,chainId:p}}catch(d){throw/(user closed modal|accounts received is empty|user denied account)/i.test(d.message)?new Cr(d):d}},async disconnect(){let c=await this.getProvider();i&&(c.removeListener(\\\"accountsChanged\\\",i),i=void 0),s&&(c.removeListener(\\\"chainChanged\\\",s),s=void 0),o&&(c.removeListener(\\\"disconnect\\\",o),o=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:\\\"eth_accounts\\\"})).map(l=>_r(l))},async getChainId(){let l=await(await this.getProvider()).request({method:\\\"eth_chainId\\\"});return Number(l)},async getProvider(){if(!n){let c=await(async()=>{let{default:h}=await Promise.resolve().then(()=>Me(jFe(),1));return typeof h!=\\\"function\\\"&&typeof h.default==\\\"function\\\"?h.default:h})();r=new c({...t,reloadOnDisconnect:!1});let l=r.walletExtension?.getChainId(),d=a.chains.find(h=>t.chainId?h.id===t.chainId:h.id===l)||a.chains[0],f=t.chainId||d?.id,p=t.jsonRpcUrl||d?.rpcUrls.default.http[0];n=r.makeWeb3Provider(p,f)}return n},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:l}){let d=a.chains.find(p=>p.id===l);if(!d)throw new Do(new ga);let f=await this.getProvider();try{return await f.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:Z(d.id)}]}),d}catch(p){if(p.code===4902)try{let h;c?.blockExplorerUrls?h=c.blockExplorerUrls:h=d.blockExplorers?.default.url?[d.blockExplorers?.default.url]:[];let m;c?.rpcUrls?.length?m=c.rpcUrls:m=[d.rpcUrls.default?.http[0]??\\\"\\\"];let g={blockExplorerUrls:h,chainId:Z(l),chainName:c?.chainName??d.name,iconUrls:c?.iconUrls,nativeCurrency:c?.nativeCurrency??d.nativeCurrency,rpcUrls:m};return await f.request({method:\\\"wallet_addEthereumChain\\\",params:[g]}),d}catch(h){throw new Cr(h)}throw new Do(p)}},onAccountsChanged(c){c.length===0?this.onDisconnect():a.emitter.emit(\\\"change\\\",{accounts:c.map(l=>_r(l))})},onChainChanged(c){let l=Number(c);a.emitter.emit(\\\"change\\\",{chainId:l})},async onDisconnect(c){a.emitter.emit(\\\"disconnect\\\");let l=await this.getProvider();i&&(l.removeListener(\\\"accountsChanged\\\",i),i=void 0),s&&(l.removeListener(\\\"chainChanged\\\",s),s=void 0),o&&(l.removeListener(\\\"disconnect\\\",o),o=void 0)}})}u();un();zR.type=\\\"walletConnect\\\";function zR(t){let e=t.isNewChainsStale??!0,r,n,i=\\\"eip155\\\",s,o,a,c,l,d;return f=>({id:\\\"walletConnect\\\",name:\\\"WalletConnect\\\",type:zR.type,async setup(){let p=await this.getProvider().catch(()=>null);p&&(a||(a=this.onConnect.bind(this),p.on(\\\"connect\\\",a)),l||(l=this.onSessionDelete.bind(this),p.on(\\\"session_delete\\\",l)))},async connect({chainId:p,withCapabilities:h,...m}={}){try{let g=await this.getProvider();if(!g)throw new Oc;c||(c=this.onDisplayUri,g.on(\\\"display_uri\\\",c));let w=p;if(!w){let S=await f.storage?.getItem(\\\"state\\\")??{};f.chains.some(N=>N.id===S.chainId)?w=S.chainId:w=f.chains[0]?.id}if(!w)throw new Error(\\\"No chains found on connector.\\\");let v=await this.isChainsStale();if(g.session&&v&&await g.disconnect(),!g.session||v){let S=f.chains.filter(T=>T.id!==w).map(T=>T.id);await g.connect({optionalChains:[w,...S],...\\\"pairingTopic\\\"in m?{pairingTopic:m.pairingTopic}:{}}),this.setRequestedChainsIds(f.chains.map(T=>T.id))}let b=(await g.enable()).map(S=>_r(S)),_=await this.getChainId();return p&&_!==p&&(_=(await this.switchChain({chainId:p}).catch(T=>{if(T.code===Cr.code&&T.cause?.message!==\\\"Missing or invalid. request() method: wallet_addEthereumChain\\\")throw T;return{id:_}}))?.id??_),c&&(g.removeListener(\\\"display_uri\\\",c),c=void 0),a&&(g.removeListener(\\\"connect\\\",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),g.on(\\\"accountsChanged\\\",s)),o||(o=this.onChainChanged.bind(this),g.on(\\\"chainChanged\\\",o)),d||(d=this.onDisconnect.bind(this),g.on(\\\"disconnect\\\",d)),l||(l=this.onSessionDelete.bind(this),g.on(\\\"session_delete\\\",l)),{accounts:h?b.map(S=>({address:S,capabilities:{}})):b,chainId:_}}catch(g){throw/(user rejected|connection request reset)/i.test(g?.message)?new Cr(g):g}},async disconnect(){let p=await this.getProvider();try{await p?.disconnect()}catch(h){if(!/No matching key/i.test(h.message))throw h}finally{o&&(p?.removeListener(\\\"chainChanged\\\",o),o=void 0),d&&(p?.removeListener(\\\"disconnect\\\",d),d=void 0),a||(a=this.onConnect.bind(this),p?.on(\\\"connect\\\",a)),s&&(p?.removeListener(\\\"accountsChanged\\\",s),s=void 0),l&&(p?.removeListener(\\\"session_delete\\\",l),l=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(h=>_r(h))},async getProvider({chainId:p}={}){async function h(){let m=f.chains.map(w=>w.id);if(!m.length)return;let{EthereumProvider:g}=await Promise.resolve().then(()=>Me(not(),1));return await g.init({...t,disableProviderPing:!0,optionalChains:m,projectId:t.projectId,rpcMap:Object.fromEntries(f.chains.map(w=>{let[v]=lY({chain:w,transports:f.transports});return[w.id,v]})),showQrModal:t.showQrModal??!0})}return r||(n||(n=h()),r=await n,r?.events.setMaxListeners(Number.POSITIVE_INFINITY)),p&&await this.switchChain?.({chainId:p}),r},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{let[p,h]=await Promise.all([this.getAccounts(),this.getProvider()]);return p.length?await this.isChainsStale()&&h.session?(await h.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:p,chainId:h}){let m=await this.getProvider();if(!m)throw new Oc;let g=f.chains.find(w=>w.id===h);if(!g)throw new Do(new ga);try{await Promise.all([new Promise(v=>{let b=({chainId:_})=>{_===h&&(f.emitter.off(\\\"change\\\",b),v())};f.emitter.on(\\\"change\\\",b)}),m.request({method:\\\"wallet_switchEthereumChain\\\",params:[{chainId:Z(h)}]})]);let w=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...w,h]),g}catch(w){let v=w;if(/(user rejected)/i.test(v.message))throw new Cr(v);try{let b;p?.blockExplorerUrls?b=p.blockExplorerUrls:b=g.blockExplorers?.default.url?[g.blockExplorers?.default.url]:[];let _;p?.rpcUrls?.length?_=p.rpcUrls:_=[...g.rpcUrls.default.http];let S={blockExplorerUrls:b,chainId:Z(h),chainName:p?.chainName??g.name,iconUrls:p?.iconUrls,nativeCurrency:p?.nativeCurrency??g.nativeCurrency,rpcUrls:_};await m.request({method:\\\"wallet_addEthereumChain\\\",params:[S]});let T=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...T,h]),g}catch(b){throw new Cr(b)}}},onAccountsChanged(p){p.length===0?this.onDisconnect():f.emitter.emit(\\\"change\\\",{accounts:p.map(h=>_r(h))})},onChainChanged(p){let h=Number(p);f.emitter.emit(\\\"change\\\",{chainId:h})},async onConnect(p){let h=Number(p.chainId),m=await this.getAccounts();f.emitter.emit(\\\"connect\\\",{accounts:m,chainId:h})},async onDisconnect(p){this.setRequestedChainsIds([]),f.emitter.emit(\\\"disconnect\\\");let h=await this.getProvider();s&&(h.removeListener(\\\"accountsChanged\\\",s),s=void 0),o&&(h.removeListener(\\\"chainChanged\\\",o),o=void 0),d&&(h.removeListener(\\\"disconnect\\\",d),d=void 0),l&&(h.removeListener(\\\"session_delete\\\",l),l=void 0),a||(a=this.onConnect.bind(this),h.on(\\\"connect\\\",a))},onDisplayUri(p){f.emitter.emit(\\\"message\\\",{type:\\\"display_uri\\\",data:p})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return r?r.session?.namespaces[i]?.accounts?.map(h=>Number.parseInt(h.split(\\\":\\\")[1]||\\\"\\\",10))??[]:[]},async getRequestedChainsIds(){return await f.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!e)return!1;let p=f.chains.map(g=>g.id),h=this.getNamespaceChainsIds();if(h.length&&!h.some(g=>p.includes(g)))return!1;let m=await this.getRequestedChainsIds();return!p.every(g=>m.includes(g))},async setRequestedChainsIds(p){await f.storage?.setItem(this.requestedChainsStorageKey,p)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}u();function iot(){return typeof window>\\\"u\\\"||typeof navigator>\\\"u\\\"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(navigator.userAgent)}var jhe=Me(Tl(),1),jZt=new kY;function sot({children:t}){let{paymentRequired:e}=window.t402,r=Qw;if(e?.accepts?.[0]){let c=e.accepts[0].network;if(QCe(c)){let l=parseInt(c.split(\\\":\\\")[1]);r=uCe(l)}}let n=window.t402.appName||\\\"t402 Paywall\\\",i=window.t402.walletConnectProjectId,s=[];s.push(Om()),s.push(lC({appName:n})),i&&s.push(zR({projectId:i,showQrModal:!iot(),metadata:{name:n,description:\\\"Pay with crypto\\\",url:window.location.origin,icons:window.t402.appLogo?[window.t402.appLogo]:[]}}));let o=uM({chains:[r],connectors:s,transports:{[r.id]:za()}});return(0,jhe.jsx)(fM,{config:o,children:(0,jhe.jsx)(jY,{client:jZt,children:t})})}var Hhe=Me(Tl(),1);window.addEventListener(\\\"load\\\",()=>{let t=document.getElementById(\\\"root\\\");if(!t){console.error(\\\"Root element not found\\\");return}let r=window.t402.paymentRequired;if(!r?.accepts?.[0]){console.error(\\\"No payment requirements found\\\");return}(0,oot.createRoot)(t).render((0,Hhe.jsx)(sot,{children:(0,Hhe.jsx)(t4e,{paymentRequired:r,onSuccessfulResponse:async i=>{let s=i.headers.get(\\\"content-type\\\");if(s&&s.includes(\\\"text/html\\\"))document.documentElement.innerHTML=await i.text();else{let o=await i.blob(),a=window.URL.createObjectURL(o);window.location.href=a}}})}))});})();\\n/*! Bundled license information:\\n\\nieee754/index.js:\\n  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)\\n\\nbuffer/index.js:\\n  (*!\\n   * The buffer module from node.js, for the browser.\\n   *\\n   * @author   Feross Aboukhadijeh <https://feross.org>\\n   * @license  MIT\\n   *)\\n\\nscheduler/cjs/scheduler.production.js:\\n  (**\\n   * @license React\\n   * scheduler.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\nreact/cjs/react.production.js:\\n  (**\\n   * @license React\\n   * react.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\nreact-dom/cjs/react-dom.production.js:\\n  (**\\n   * @license React\\n   * react-dom.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\nreact-dom/cjs/react-dom-client.production.js:\\n  (**\\n   * @license React\\n   * react-dom-client.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\n@noble/hashes/esm/utils.js:\\n@noble/hashes/utils.js:\\n@noble/hashes/esm/utils.js:\\n  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\\n\\n@noble/curves/esm/abstract/utils.js:\\n@noble/curves/esm/abstract/modular.js:\\n@noble/curves/esm/abstract/curve.js:\\n@noble/curves/esm/abstract/weierstrass.js:\\n@noble/curves/esm/_shortw_utils.js:\\n@noble/curves/esm/secp256k1.js:\\n@noble/curves/esm/utils.js:\\n@noble/curves/esm/abstract/modular.js:\\n@noble/curves/esm/abstract/curve.js:\\n@noble/curves/esm/abstract/weierstrass.js:\\n@noble/curves/esm/_shortw_utils.js:\\n@noble/curves/esm/secp256k1.js:\\n@noble/curves/esm/nist.js:\\n@noble/curves/esm/p256.js:\\n@walletconnect/utils/dist/index.es.js:\\n@walletconnect/utils/dist/index.es.js:\\n  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\\n\\nuse-sync-external-store/cjs/use-sync-external-store-shim.production.js:\\n  (**\\n   * @license React\\n   * use-sync-external-store-shim.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\nuse-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:\\n  (**\\n   * @license React\\n   * use-sync-external-store-shim/with-selector.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\nreact/cjs/react-jsx-runtime.production.js:\\n  (**\\n   * @license React\\n   * react-jsx-runtime.production.js\\n   *\\n   * Copyright (c) Meta Platforms, Inc. and affiliates.\\n   *\\n   * This source code is licensed under the MIT license found in the\\n   * LICENSE file in the root directory of this source tree.\\n   *)\\n\\n@scure/bip39/esm/index.js:\\n  (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\\n\\nsafe-buffer/index.js:\\n  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)\\n\\ntslib/tslib.js:\\n  (*! *****************************************************************************\\n  Copyright (c) Microsoft Corporation.\\n  \\n  Permission to use, copy, modify, and/or distribute this software for any\\n  purpose with or without fee is hereby granted.\\n  \\n  THE SOFTWARE IS PROVIDED \\\"AS IS\\\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\\n  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\\n  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\\n  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\\n  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\\n  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\\n  PERFORMANCE OF THIS SOFTWARE.\\n  ***************************************************************************** *)\\n\\n@walletconnect/relay-auth/dist/index.es.js:\\n  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\\n  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\\n\\n@lit/reactive-element/css-tag.js:\\n  (**\\n   * @license\\n   * Copyright 2019 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n\\n@lit/reactive-element/reactive-element.js:\\nlit-html/lit-html.js:\\nlit-element/lit-element.js:\\n@lit/reactive-element/decorators/custom-element.js:\\n@lit/reactive-element/decorators/property.js:\\n@lit/reactive-element/decorators/state.js:\\n@lit/reactive-element/decorators/event-options.js:\\n@lit/reactive-element/decorators/base.js:\\n@lit/reactive-element/decorators/query.js:\\n@lit/reactive-element/decorators/query-all.js:\\n@lit/reactive-element/decorators/query-async.js:\\n@lit/reactive-element/decorators/query-assigned-nodes.js:\\nlit-html/directive.js:\\nlit-html/async-directive.js:\\nlit-html/directives/until.js:\\n  (**\\n   * @license\\n   * Copyright 2017 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n\\nlit-html/is-server.js:\\n  (**\\n   * @license\\n   * Copyright 2022 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n\\n@lit/reactive-element/decorators/query-assigned-elements.js:\\nlit-html/directives/private-async-helpers.js:\\n  (**\\n   * @license\\n   * Copyright 2021 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n\\nlit-html/directives/if-defined.js:\\nlit-html/directives/class-map.js:\\n  (**\\n   * @license\\n   * Copyright 2018 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n\\nlit-html/directive-helpers.js:\\nlit-html/directives/ref.js:\\n  (**\\n   * @license\\n   * Copyright 2020 Google LLC\\n   * SPDX-License-Identifier: BSD-3-Clause\\n   *)\\n*/\\n</script></body></html>\";\n","// THIS FILE IS AUTO-GENERATED - DO NOT EDIT\n/**\n * Lightweight CDN shell template for EVM paywall.\n * JS/CSS loaded from jsDelivr CDN at runtime.\n */\nexport const EVM_PAYWALL_TEMPLATE = \"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n    <meta charset=\\\"UTF-8\\\">\\n    <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\">\\n    <title>Payment Required</title>\\n    <link rel=\\\"stylesheet\\\" href=\\\"https://cdn.jsdelivr.net/npm/@t402/paywall@2.8.1/dist/browser/evm.min.css\\\">\\n</head>\\n<body>\\n    <div id=\\\"root\\\"></div>\\n    <script src=\\\"https://cdn.jsdelivr.net/npm/@t402/paywall@2.8.1/dist/browser/evm.min.js\\\"></script>\\n</body>\\n</html>\";\n","let cachedCdnTemplate: string | null = null;\nlet cachedInlineTemplate: string | null = null;\n\n/**\n * Loads the EVM paywall template.\n *\n * @param mode - \"cdn\" for lightweight CDN shell (default), \"inline\" for full embedded HTML\n * @returns The template HTML string, or null if not found\n */\nexport function getEvmTemplate(mode: \"cdn\" | \"inline\" = \"cdn\"): string | null {\n  if (mode === \"inline\") {\n    if (cachedInlineTemplate !== null) {\n      return cachedInlineTemplate;\n    }\n    try {\n      // eslint-disable-next-line @typescript-eslint/no-require-imports\n      const template = require(\"./gen/template-inline\");\n      cachedInlineTemplate = template.EVM_PAYWALL_TEMPLATE_INLINE;\n      return cachedInlineTemplate;\n    } catch {\n      return null;\n    }\n  }\n\n  if (cachedCdnTemplate !== null) {\n    return cachedCdnTemplate;\n  }\n  try {\n    // eslint-disable-next-line @typescript-eslint/no-require-imports\n    const template = require(\"./gen/template\");\n    cachedCdnTemplate = template.EVM_PAYWALL_TEMPLATE;\n    return cachedCdnTemplate;\n  } catch {\n    return null;\n  }\n}\n","import type { PaywallTheme } from \"./types\";\n\n/**\n * Generates the theme injection script for the paywall HTML.\n * This script applies dark mode and custom CSS variables at runtime.\n *\n * @param theme - Theme configuration\n * @returns Script string to inject into HTML\n */\nexport function generateThemeScript(theme?: PaywallTheme): string {\n  if (!theme) {\n    return \"\";\n  }\n\n  const themeConfig = JSON.stringify(theme);\n\n  return `\n  <script>\n    (function() {\n      var theme = ${themeConfig};\n      var root = document.documentElement;\n\n      // Apply dark mode\n      if (theme.mode === 'dark' ||\n          (theme.mode === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches)) {\n        root.classList.add('dark');\n      }\n\n      // Listen for system theme changes when mode is 'auto'\n      if (theme.mode === 'auto') {\n        window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function(e) {\n          if (e.matches) {\n            root.classList.add('dark');\n          } else {\n            root.classList.remove('dark');\n          }\n        });\n      }\n\n      // Apply custom colors\n      if (theme.colors) {\n        if (theme.colors.primary) {\n          root.style.setProperty('--button-primary-color', theme.colors.primary);\n        }\n        if (theme.colors.background) {\n          root.style.setProperty('--background-color', theme.colors.background);\n        }\n        if (theme.colors.containerBackground) {\n          root.style.setProperty('--container-background-color', theme.colors.containerBackground);\n        }\n        if (theme.colors.text) {\n          root.style.setProperty('--text-color', theme.colors.text);\n        }\n        if (theme.colors.secondaryText) {\n          root.style.setProperty('--secondary-text-color', theme.colors.secondaryText);\n        }\n        if (theme.colors.border) {\n          root.style.setProperty('--border-color', theme.colors.border);\n        }\n      }\n\n      // Apply border radius\n      if (theme.borderRadius) {\n        root.style.setProperty('--container-border-radius', theme.borderRadius);\n      }\n\n      // Apply font family\n      if (theme.fontFamily) {\n        root.style.setProperty('--font-family', theme.fontFamily);\n        document.body.style.fontFamily = theme.fontFamily;\n      }\n    })();\n  </script>`;\n}\n","import type { PaymentRequired, PaywallTheme } from \"../types\";\nimport { getEvmTemplate } from \"./template-loader\";\nimport { generateThemeScript } from \"../themeUtils\";\n\n/**\n * Escapes a string for safe injection into JavaScript string literals\n *\n * @param str - The string to escape\n * @returns The escaped string\n */\nfunction escapeString(str: string): string {\n  return str\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\"/g, '\\\\\"')\n    .replace(/'/g, \"\\\\'\")\n    .replace(/\\n/g, \"\\\\n\")\n    .replace(/\\r/g, \"\\\\r\")\n    .replace(/\\t/g, \"\\\\t\");\n}\n\n/**\n * Gets the EVM chain config\n *\n * @returns The EVM chain config\n */\nfunction getChainConfig() {\n  return {\n    base: {\n      usdcAddress: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n      usdcName: \"USDC\",\n    },\n    \"base-sepolia\": {\n      usdcAddress: \"0x036CbD53842c5426634e7929541eC2318f3dCF7e\",\n      usdcName: \"USDC\",\n    },\n  };\n}\n\ninterface EvmPaywallOptions {\n  amount: number;\n  paymentRequired: PaymentRequired;\n  currentUrl: string;\n  testnet: boolean;\n  appName?: string;\n  appLogo?: string;\n  theme?: PaywallTheme;\n  walletConnectProjectId?: string;\n  deliveryMode?: \"cdn\" | \"inline\";\n  cdnBaseUrl?: string;\n}\n\n/**\n * Generates EVM-specific paywall HTML\n *\n * @param options - The options for generating the paywall\n * @param options.amount - The amount to be paid in USD\n * @param options.paymentRequired - The payment required response with accepts array\n * @param options.currentUrl - The URL of the content being accessed\n * @param options.testnet - Whether to use testnet or mainnet\n * @param options.appName - The name of the application to display in the wallet connection modal\n * @param options.appLogo - The logo of the application to display in the wallet connection modal\n * @returns HTML string for the paywall page\n */\nexport function getEvmPaywallHtml(options: EvmPaywallOptions): string {\n  const mode = options.deliveryMode ?? \"cdn\";\n  const EVM_PAYWALL_TEMPLATE = getEvmTemplate(mode);\n\n  if (!EVM_PAYWALL_TEMPLATE) {\n    return `<!DOCTYPE html><html><body><h1>EVM Paywall (run pnpm build:paywall to generate full template)</h1></body></html>`;\n  }\n\n  const {\n    amount,\n    testnet,\n    paymentRequired,\n    currentUrl,\n    appName,\n    appLogo,\n    theme,\n    walletConnectProjectId,\n  } = options;\n\n  const logOnTestnet = testnet\n    ? \"console.log('EVM Payment required initialized:', window.t402);\"\n    : \"\";\n\n  const config = getChainConfig();\n  const themeScript = generateThemeScript(theme);\n\n  // Only include walletConnectProjectId if provided\n  const walletConnectLine = walletConnectProjectId\n    ? `walletConnectProjectId: \"${escapeString(walletConnectProjectId)}\",`\n    : \"\";\n\n  const configScript = `\n  <script>\n    window.t402 = {\n      amount: ${amount},\n      paymentRequired: ${JSON.stringify(paymentRequired)},\n      testnet: ${testnet},\n      currentUrl: \"${escapeString(currentUrl)}\",\n      config: {\n        chainConfig: ${JSON.stringify(config)},\n      },\n      appName: \"${escapeString(appName || \"\")}\",\n      appLogo: \"${escapeString(appLogo || \"\")}\",\n      ${walletConnectLine}\n    };\n    ${logOnTestnet}\n  </script>`;\n\n  return EVM_PAYWALL_TEMPLATE.replace(\"</head>\", `${themeScript}${configScript}\\n</head>`);\n}\n","import type {\n  PaywallNetworkHandler,\n  PaymentRequirements,\n  PaymentRequired,\n  PaywallConfig,\n} from \"../types\";\nimport { getEvmPaywallHtml } from \"./paywall\";\n\n/**\n * EVM paywall handler that supports EVM-based networks (CAIP-2 format only)\n */\nexport const evmPaywall: PaywallNetworkHandler = {\n  /**\n   * Check if this handler supports the given payment requirement\n   *\n   * @param requirement - Payment requirement to check\n   * @returns True if this handler can process this requirement\n   */\n  supports(requirement: PaymentRequirements): boolean {\n    return requirement.network.startsWith(\"eip155:\");\n  },\n\n  /**\n   * Generate EVM-specific paywall HTML\n   *\n   * @param requirement - The selected payment requirement\n   * @param paymentRequired - Full payment required response\n   * @param config - Paywall configuration\n   * @returns HTML string for the paywall page\n   */\n  generateHtml(\n    requirement: PaymentRequirements,\n    paymentRequired: PaymentRequired,\n    config: PaywallConfig,\n  ): string {\n    const amount = requirement.amount\n      ? parseFloat(requirement.amount) / 1000000\n      : requirement.maxAmountRequired\n        ? parseFloat(requirement.maxAmountRequired) / 1000000\n        : 0;\n\n    return getEvmPaywallHtml({\n      amount,\n      paymentRequired,\n      currentUrl: paymentRequired.resource?.url || config.currentUrl || \"\",\n      testnet: config.testnet ?? true,\n      appName: config.appName,\n      appLogo: config.appLogo,\n      theme: config.theme,\n      walletConnectProjectId: config.walletConnectProjectId,\n    });\n  },\n};\n"]}