@credenza3/passport-evm 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Dv3dbG0N.js → App-BRkz5n_k.js} +18 -18
- package/dist/{App-Dv3dbG0N.js.map → App-BRkz5n_k.js.map} +1 -1
- package/dist/{Button-Yya7IK6S.js → Button-CRXa4JlR.js} +4 -4
- package/dist/{Button-Yya7IK6S.js.map → Button-CRXa4JlR.js.map} +1 -1
- package/dist/{ButtonBack-x-yurDMM.js → ButtonBack-Bh0-don6.js} +4 -4
- package/dist/{ButtonBack-x-yurDMM.js.map → ButtonBack-Bh0-don6.js.map} +1 -1
- package/dist/{ButtonLink-DRzJOEAS.js → ButtonLink-L1oTgF2Z.js} +3 -3
- package/dist/{ButtonLink-DRzJOEAS.js.map → ButtonLink-L1oTgF2Z.js.map} +1 -1
- package/dist/{ConfirmAccount-2qFFonvA.js → ConfirmAccount-D7M-8d9F.js} +9 -9
- package/dist/{ConfirmAccount-2qFFonvA.js.map → ConfirmAccount-D7M-8d9F.js.map} +1 -1
- package/dist/{ContentHeader-W_SY1rRj.js → ContentHeader-B-VPZhmc.js} +3 -3
- package/dist/{ContentHeader-W_SY1rRj.js.map → ContentHeader-B-VPZhmc.js.map} +1 -1
- package/dist/{Error-BIjsjuYC.js → Error-BFChqtv8.js} +5 -5
- package/dist/{Error-BIjsjuYC.js.map → Error-BFChqtv8.js.map} +1 -1
- package/dist/{Input-oNFL5LRo.js → Input-BBv5uRtr.js} +4 -4
- package/dist/{Input-oNFL5LRo.js.map → Input-BBv5uRtr.js.map} +1 -1
- package/dist/{Label-CayhFfIY.js → Label-CfeF-XLp.js} +3 -3
- package/dist/{Label-CayhFfIY.js.map → Label-CfeF-XLp.js.map} +1 -1
- package/dist/{Loader-D6SECqqA.js → Loader-BGH5RvtY.js} +3 -3
- package/dist/{Loader-D6SECqqA.js.map → Loader-BGH5RvtY.js.map} +1 -1
- package/dist/{Login-Eiay-N5l.js → Login-B36WhB-k.js} +9 -9
- package/dist/{Login-Eiay-N5l.js.map → Login-B36WhB-k.js.map} +1 -1
- package/dist/{Logout-cWpAl3jC.js → Logout-Ciu350iZ.js} +6 -6
- package/dist/{Logout-cWpAl3jC.js.map → Logout-Ciu350iZ.js.map} +1 -1
- package/dist/{Nav-CQZnfk2h.js → Nav-CSPdwmqX.js} +5 -5
- package/dist/{Nav-CQZnfk2h.js.map → Nav-CSPdwmqX.js.map} +1 -1
- package/dist/{PassportId-DMjewov3.js → PassportId-CKgshhWk.js} +6 -6
- package/dist/{PassportId-DMjewov3.js.map → PassportId-CKgshhWk.js.map} +1 -1
- package/dist/{Payment-CDW8kzM9.js → Payment-DfVmWqSN.js} +10 -10
- package/dist/{Payment-CDW8kzM9.js.map → Payment-DfVmWqSN.js.map} +1 -1
- package/dist/{PaymentResult-vS2suqDY.js → PaymentResult-CFh42cab.js} +4 -4
- package/dist/{PaymentResult-vS2suqDY.js.map → PaymentResult-CFh42cab.js.map} +1 -1
- package/dist/{Profile-D0QtM0C2.js → Profile--OxHnpMm.js} +7 -7
- package/dist/{Profile-D0QtM0C2.js.map → Profile--OxHnpMm.js.map} +1 -1
- package/dist/{ProgressVideo-DGKIM-OI.js → ProgressVideo-BQEjkuPY.js} +5 -5
- package/dist/{ProgressVideo-DGKIM-OI.js.map → ProgressVideo-BQEjkuPY.js.map} +1 -1
- package/dist/{RichAlert-DoIpnk7K.js → RichAlert-DZrU-kpH.js} +6 -6
- package/dist/{RichAlert-DoIpnk7K.js.map → RichAlert-DZrU-kpH.js.map} +1 -1
- package/dist/{Scanner-D4ScVoLG.js → Scanner-BhYQzhWJ.js} +6 -6
- package/dist/{Scanner-D4ScVoLG.js.map → Scanner-BhYQzhWJ.js.map} +1 -1
- package/dist/{SendTokens-8QbeDFLv.js → SendTokens-BTtpqLNx.js} +7 -7
- package/dist/{SendTokens-8QbeDFLv.js.map → SendTokens-BTtpqLNx.js.map} +1 -1
- package/dist/{Sign-6BqSdvyk.js → Sign-Cq3PFgce.js} +6 -6
- package/dist/{Sign-6BqSdvyk.js.map → Sign-Cq3PFgce.js.map} +1 -1
- package/dist/{Stripe.service-CC9v7mRB.js → Stripe.service-CDTwSxEl.js} +3 -3
- package/dist/{Stripe.service-CC9v7mRB.js.map → Stripe.service-CDTwSxEl.js.map} +1 -1
- package/dist/{UpdateProfile-Czd1wjf1.js → UpdateProfile-BQj5ArLZ.js} +10 -10
- package/dist/{UpdateProfile-Czd1wjf1.js.map → UpdateProfile-BQj5ArLZ.js.map} +1 -1
- package/dist/{UserInfo-BE6u0Fzg.js → UserInfo-Dc1aISLT.js} +4 -4
- package/dist/{UserInfo-BE6u0Fzg.js.map → UserInfo-Dc1aISLT.js.map} +1 -1
- package/dist/{Wallet-Bpi-ck7x.js → Wallet-HvYoseFd.js} +7 -7
- package/dist/{Wallet-Bpi-ck7x.js.map → Wallet-HvYoseFd.js.map} +1 -1
- package/dist/{each-B7xFSrKZ.js → each-C618GcTH.js} +2 -2
- package/dist/{each-B7xFSrKZ.js.map → each-C618GcTH.js.map} +1 -1
- package/dist/{html-Dj1g3Ruk.js → html-D3-frDan.js} +3 -3
- package/dist/{html-Dj1g3Ruk.js.map → html-D3-frDan.js.map} +1 -1
- package/dist/{index-client-CYtOXDB_.js → index-client-CnPynulL.js} +2 -2
- package/dist/{index-client-CYtOXDB_.js.map → index-client-CnPynulL.js.map} +1 -1
- package/dist/{index-DSnen-yx.js → index-ttYgNsPa.js} +28 -31
- package/dist/{index-DSnen-yx.js.map → index-ttYgNsPa.js.map} +1 -1
- package/dist/{input-DvC9cidA.js → input-BJxmLqmQ.js} +3 -3
- package/dist/{input-DvC9cidA.js.map → input-BJxmLqmQ.js.map} +1 -1
- package/dist/{legacy-C8qV24oG.js → legacy-rO5ldx3E.js} +2 -2
- package/dist/{legacy-C8qV24oG.js.map → legacy-rO5ldx3E.js.map} +1 -1
- package/dist/passport.es.js +1 -1
- package/dist/passport.umd.js +3 -3
- package/dist/passport.umd.js.map +1 -1
- package/dist/types/Passport.d.ts +0 -1
- package/package.json +1 -1
package/dist/passport.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap";.crdz-ui *,.crdz-ui :before,.crdz-ui :after{font-family:Poppins,serif;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.crdz-ui :before,.crdz-ui :after{--tw-content: ""}.crdz-ui hr{height:0;color:inherit;border-top-width:1px}.crdz-ui abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6{font-size:inherit;font-weight:inherit}.crdz-ui a{color:inherit;text-decoration:inherit}.crdz-ui b,.crdz-ui strong{font-weight:bolder}.crdz-ui code,.crdz-ui kbd,.crdz-ui samp,.crdz-ui pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.crdz-ui small{font-size:80%}.crdz-ui sub,.crdz-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.crdz-ui sub{bottom:-.25em}.crdz-ui sup{top:-.5em}.crdz-ui table{text-indent:0;border-color:inherit;border-collapse:collapse}.crdz-ui button,.crdz-ui select{text-transform:none}.crdz-ui button,.crdz-ui [type=button],.crdz-ui [type=reset],.crdz-ui [type=submit]{font-size:100%;-webkit-appearance:button;background-image:none}.crdz-ui :-moz-focusring{outline:auto}.crdz-ui :-moz-ui-invalid{box-shadow:none}.crdz-ui progress{vertical-align:baseline}.crdz-ui ::-webkit-inner-spin-button,.crdz-ui ::-webkit-outer-spin-button{height:auto}.crdz-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.crdz-ui ::-webkit-search-decoration{-webkit-appearance:none}.crdz-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.crdz-ui summary{display:list-item}.crdz-ui blockquote,.crdz-ui dl,.crdz-ui dd,.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6,.crdz-ui hr,.crdz-ui figure,.crdz-ui p,.crdz-ui span,.crdz-ui label,.crdz-ui pre{margin:0;letter-spacing:normal!important}.crdz-ui label{text-transform:initial!important}.crdz-ui fieldset{margin:0;padding:0}.crdz-ui legend{padding:0}.crdz-ui ol,.crdz-ui ul,.crdz-ui menu{list-style:none;margin:0;padding:0}.crdz-ui dialog{padding:0}.crdz-ui textarea{resize:vertical}.crdz-ui input::-moz-placeholder,.crdz-ui textarea::-moz-placeholder{opacity:1;color:#9ca3af}.crdz-ui input::placeholder,.crdz-ui textarea::placeholder{opacity:1;color:#9ca3af}.crdz-ui button,.crdz-ui [role=button]{cursor:pointer}.crdz-ui :disabled{cursor:default}.crdz-ui img,.crdz-ui svg,.crdz-ui video,.crdz-ui canvas,.crdz-ui audio,.crdz-ui iframe,.crdz-ui embed,.crdz-ui object{display:block;vertical-align:middle;opacity:1}.crdz-ui [hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.crtw-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.crtw-pointer-events-none{pointer-events:none!important}.crtw-invisible{visibility:hidden!important}.crtw-fixed{position:fixed!important}.crtw-absolute{position:absolute!important}.crtw-relative{position:relative!important}.crtw-bottom-0{bottom:0!important}.crtw-left-0{left:0!important}.crtw-right-0{right:0!important}.crtw-top-0{top:0!important}.crtw-top-\\[8px\\]{top:8px!important}.crtw-z-10{z-index:10!important}.crtw-z-50{z-index:50!important}.crtw-z-\\[-1\\]{z-index:-1!important}.crtw-z-\\[1050\\]{z-index:1050!important}.crtw-float-right{float:right!important}.crtw-m-2{margin:.5rem!important}.crtw-m-3\\.5{margin:.875rem!important}.crtw-m-5{margin:1.25rem!important}.crtw-mx-1\\.5{margin-left:.375rem!important;margin-right:.375rem!important}.crtw-mx-auto{margin-left:auto!important;margin-right:auto!important}.crtw-my-0{margin-top:0!important;margin-bottom:0!important}.crtw-my-0\\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.crtw-my-4{margin-top:1rem!important;margin-bottom:1rem!important}.crtw-my-5{margin-top:1.25rem!important;margin-bottom:1.25rem!important}.crtw-mb-1{margin-bottom:.25rem!important}.crtw-mb-1\\.5{margin-bottom:.375rem!important}.crtw-mb-2{margin-bottom:.5rem!important}.crtw-mb-2\\.5{margin-bottom:.625rem!important}.crtw-mb-3{margin-bottom:.75rem!important}.crtw-mb-3\\.5{margin-bottom:.875rem!important}.crtw-mb-4{margin-bottom:1rem!important}.crtw-mb-5{margin-bottom:1.25rem!important}.crtw-mb-6{margin-bottom:1.5rem!important}.crtw-mb-9{margin-bottom:2.25rem!important}.crtw-mb-\\[30px\\]{margin-bottom:30px!important}.crtw-ml-1{margin-left:.25rem!important}.crtw-ml-1\\.5{margin-left:.375rem!important}.crtw-ml-2\\.5{margin-left:.625rem!important}.crtw-mr-0\\.5{margin-right:.125rem!important}.crtw-mr-1\\.5{margin-right:.375rem!important}.crtw-mr-14{margin-right:3.5rem!important}.crtw-mr-2{margin-right:.5rem!important}.crtw-mt-0\\.5{margin-top:.125rem!important}.crtw-mt-1{margin-top:.25rem!important}.crtw-mt-1\\.5{margin-top:.375rem!important}.crtw-mt-2\\.5{margin-top:.625rem!important}.crtw-mt-3\\.5{margin-top:.875rem!important}.crtw-mt-4{margin-top:1rem!important}.crtw-mt-6{margin-top:1.5rem!important}.crtw-mt-9{margin-top:2.25rem!important}.crtw-mt-\\[-10px\\]{margin-top:-10px!important}.crtw-mt-\\[5px\\]{margin-top:5px!important}.crtw-box-border{box-sizing:border-box!important}.crtw-block{display:block!important}.crtw-flex{display:flex!important}.crtw-inline-flex{display:inline-flex!important}.crtw-hidden{display:none!important}.crtw-h-1\\.5{height:.375rem!important}.crtw-h-11{height:2.75rem!important}.crtw-h-3{height:.75rem!important}.crtw-h-4{height:1rem!important}.crtw-h-64{height:16rem!important}.crtw-h-7{height:1.75rem!important}.crtw-h-8{height:2rem!important}.crtw-h-9{height:2.25rem!important}.crtw-h-\\[30px\\]{height:30px!important}.crtw-h-\\[50px\\]{height:50px!important}.crtw-h-\\[53px\\]{height:53px!important}.crtw-h-full{height:100%!important}.crtw-max-h-full{max-height:100%!important}.crtw-min-h-\\[155px\\]{min-height:155px!important}.crtw-min-h-screen{min-height:100vh!important}.crtw-w-1\\.5{width:.375rem!important}.crtw-w-1\\/2{width:50%!important}.crtw-w-11{width:2.75rem!important}.crtw-w-16{width:4rem!important}.crtw-w-4{width:1rem!important}.crtw-w-40{width:10rem!important}.crtw-w-56{width:14rem!important}.crtw-w-8{width:2rem!important}.crtw-w-\\[110px\\]{width:110px!important}.crtw-w-\\[70px\\]{width:70px!important}.crtw-w-\\[90px\\]{width:90px!important}.crtw-w-full{width:100%!important}.crtw-min-w-16{min-width:4rem!important}.crtw-max-w-\\[30px\\]{max-width:30px!important}.crtw-max-w-\\[380px\\]{max-width:380px!important}.crtw-max-w-xs{max-width:20rem!important}.crtw-flex-1{flex:1 1 0%!important}@keyframes crtw-spin{to{transform:rotate(360deg)}}.crtw-animate-spin{animation:crtw-spin 1s linear infinite!important}.crtw-cursor-pointer{cursor:pointer!important}.crtw-appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.crtw-flex-row{flex-direction:row!important}.crtw-flex-col{flex-direction:column!important}.crtw-items-start{align-items:flex-start!important}.crtw-items-center{align-items:center!important}.crtw-justify-start{justify-content:flex-start!important}.crtw-justify-center{justify-content:center!important}.crtw-justify-between{justify-content:space-between!important}.crtw-justify-items-center{justify-items:center!important}.crtw-gap-10{gap:2.5rem!important}.crtw-gap-14{gap:3.5rem!important}.crtw-gap-2\\.5{gap:.625rem!important}.crtw-gap-3{gap:.75rem!important}.crtw-gap-4{gap:1rem!important}.crtw-gap-6{gap:1.5rem!important}.crtw-gap-9{gap:2.25rem!important}.crtw-gap-\\[22px\\]{gap:22px!important}.crtw-overflow-hidden{overflow:hidden!important}.crtw-overflow-y-scroll{overflow-y:scroll!important}.crtw-whitespace-normal{white-space:normal!important}.crtw-break-words{overflow-wrap:break-word!important}.crtw-break-all{word-break:break-all!important}.crtw-rounded{border-radius:.25rem!important}.crtw-rounded-\\[10px\\]{border-radius:10px!important}.crtw-rounded-\\[3px\\]{border-radius:3px!important}.crtw-rounded-full{border-radius:9999px!important}.crtw-rounded-lg{border-radius:.5rem!important}.crtw-rounded-md{border-radius:.375rem!important}.crtw-rounded-sm{border-radius:.125rem!important}.crtw-border{border-width:1px!important}.crtw-border-0{border-width:0px!important}.crtw-border-2{border-width:2px!important}.crtw-border-b-2{border-bottom-width:2px!important}.crtw-border-t-2{border-top-width:2px!important}.crtw-border-\\[\\#990008\\]{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.crtw-border-\\[\\#d9d9d9\\]{--tw-border-opacity: 1 !important;border-color:rgb(217 217 217 / var(--tw-border-opacity, 1))!important}.crtw-border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.crtw-border-blue-800{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-400{--tw-border-opacity: 1 !important;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-700{--tw-border-opacity: 1 !important;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))!important}.crtw-bg-black{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.crtw-bg-black\\/70{background-color:#000000b3!important}.crtw-bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))!important}.crtw-bg-gray-300{--tw-bg-opacity: 1 !important;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))!important}.crtw-bg-green-500{--tw-bg-opacity: 1 !important;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))!important}.crtw-bg-red-500{--tw-bg-opacity: 1 !important;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))!important}.crtw-bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))!important}.crtw-fill-black{fill:#000!important}.crtw-fill-red-500{fill:#ef4444!important}.crtw-p-0{padding:0!important}.crtw-p-2\\.5{padding:.625rem!important}.crtw-p-px{padding:1px!important}.crtw-px-0{padding-left:0!important;padding-right:0!important}.crtw-px-0\\.5{padding-left:.125rem!important;padding-right:.125rem!important}.crtw-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.crtw-px-2\\.5{padding-left:.625rem!important;padding-right:.625rem!important}.crtw-px-4{padding-left:1rem!important;padding-right:1rem!important}.crtw-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.crtw-px-\\[22px\\]{padding-left:22px!important;padding-right:22px!important}.crtw-py-0{padding-top:0!important;padding-bottom:0!important}.crtw-py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.crtw-py-2\\.5{padding-top:.625rem!important;padding-bottom:.625rem!important}.crtw-py-4{padding-top:1rem!important;padding-bottom:1rem!important}.crtw-pb-2{padding-bottom:.5rem!important}.crtw-pb-9{padding-bottom:2.25rem!important}.crtw-pl-5{padding-left:1.25rem!important}.crtw-pr-1\\.5{padding-right:.375rem!important}.crtw-pr-5{padding-right:1.25rem!important}.crtw-pt-11{padding-top:2.75rem!important}.crtw-pt-4{padding-top:1rem!important}.crtw-pt-5{padding-top:1.25rem!important}.crtw-pt-\\[3px\\]{padding-top:3px!important}.crtw-text-left{text-align:left!important}.crtw-text-center{text-align:center!important}.crtw-text-right{text-align:right!important}.crtw-text-justify{text-align:justify!important}.crtw-font-\\[\\'Poppins\\'\\]{font-family:Poppins!important}.crtw-font-\\[\\'poppins\\'\\],.crtw-font-\\[poppins\\]{font-family:poppins!important}.crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.crtw-text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.crtw-text-\\[10px\\]{font-size:10px!important}.crtw-text-\\[13px\\]{font-size:13px!important}.crtw-text-\\[21px\\]{font-size:21px!important}.crtw-text-\\[9px\\]{font-size:9px!important}.crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.crtw-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.crtw-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.crtw-text-xs{font-size:.75rem!important;line-height:1rem!important}.crtw-font-bold{font-weight:700!important}.crtw-font-medium{font-weight:500!important}.crtw-font-semibold{font-weight:600!important}.crtw-uppercase{text-transform:uppercase!important}.crtw-text-\\[\\#121e2b\\]{--tw-text-opacity: 1 !important;color:rgb(18 30 43 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#990008\\]{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-black{--tw-text-opacity: 1 !important;color:rgb(0 0 0 / var(--tw-text-opacity, 1))!important}.crtw-text-blue-600{--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity, 1))!important}.crtw-text-hightlightColor{--tw-text-opacity: 1 !important;color:rgb(11 114 224 / var(--tw-text-opacity, 1))!important}.crtw-text-red-500{--tw-text-opacity: 1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1))!important}.crtw-text-red-600{--tw-text-opacity: 1 !important;color:rgb(220 38 38 / var(--tw-text-opacity, 1))!important}.crtw-text-textMain{--tw-text-opacity: 1 !important;color:rgb(31 31 31 / var(--tw-text-opacity, 1))!important}.crtw-text-warningTextColor{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.crtw-underline{text-decoration-line:underline!important}.crtw-no-underline{text-decoration-line:none!important}.crtw-placeholder-\\[\\#d9d9d9\\]::-moz-placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-placeholder-\\[\\#d9d9d9\\]::placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.crtw-backdrop-blur-lg{--tw-backdrop-blur: blur(16px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.crtw-backdrop-blur-md{--tw-backdrop-blur: blur(12px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.first\\:crtw-rounded-l:first-child{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.last\\:crtw-rounded-r:last-child{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.hover\\:crtw-bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-bg-gray-800:hover{--tw-bg-opacity: 1 !important;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-text-blue-800:hover{--tw-text-opacity: 1 !important;color:rgb(30 64 175 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-border-\\[\\#121e2b\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(18 30 43 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-\\[\\#990008\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-800:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-900:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-text-blue-900:focus{--tw-text-opacity: 1 !important;color:rgb(30 58 138 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:crtw-outline-0:focus{outline-width:0px!important}.disabled\\:crtw-bg-\\[\\#d9d9d9\\]:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(217 217 217 / var(--tw-bg-opacity, 1))!important}.crtw-group:hover .group-hover\\:crtw-visible{visibility:visible!important}@media (min-width: 640px){.sm\\:crtw-m-4{margin:1rem!important}.sm\\:crtw-mb-px{margin-bottom:1px!important}.sm\\:crtw-max-w-\\[360px\\]{max-width:360px!important}.sm\\:crtw-max-w-md{max-width:28rem!important}.sm\\:crtw-px-1\\.5{padding-left:.375rem!important;padding-right:.375rem!important}.sm\\:crtw-pt-2{padding-top:.5rem!important}.sm\\:crtw-pt-\\[50px\\]{padding-top:50px!important}.sm\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.sm\\:crtw-text-\\[11px\\]{font-size:11px!important}.sm\\:crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.sm\\:crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}}@media (min-width: 768px){.md\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}}@media (min-height: 650px){.sm-tall\\:crtw-max-h-\\[650px\\]{max-height:650px!important}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
(function(Ar,en){typeof exports=="object"&&typeof module<"u"?en(exports):typeof define=="function"&&define.amd?define(["exports"],en):(Ar=typeof globalThis<"u"?globalThis:Ar||self,en(Ar.CredenzaPassport={}))})(this,function(Ar){"use strict";var qT=Ar=>{throw TypeError(Ar)};var eN=(Ar,en,ii)=>en.has(Ar)||qT("Cannot "+ii);var Wn=(Ar,en,ii)=>(eN(Ar,en,"read from private field"),ii?ii.call(Ar):en.get(Ar)),e5=(Ar,en,ii)=>en.has(Ar)?qT("Cannot add the same private member more than once"):en instanceof WeakSet?en.add(Ar):en.set(Ar,ii),t5=(Ar,en,ii,Ld)=>(eN(Ar,en,"write to private field"),Ld?Ld.call(Ar,ii):en.set(Ar,ii),ii);var To,Ri,ZT;const ii={version:"0.2.7"},Ld=!1;var G0=Array.isArray,lN=Array.prototype.indexOf,og=Array.from,ag=Object.defineProperty,al=Object.getOwnPropertyDescriptor,s5=Object.getOwnPropertyDescriptors,uN=Object.prototype,dN=Array.prototype,cg=Object.getPrototypeOf,o5=Object.isExtensible;const Bo=()=>{};function a5(t){return typeof(t==null?void 0:t.then)=="function"}function hN(t){return t()}function Dd(t){for(var e=0;e<t.length;e++)t[e]()}function fN(t,e,r=!1){return t===void 0?r?e():e:t}const Ti=2,c5=4,H0=8,lg=16,Is=32,cl=64,ug=128,Zn=256,j0=512,zn=1024,Os=2048,Io=4096,Us=8192,dg=16384,l5=32768,Q0=65536,pN=1<<17,mN=1<<19,u5=1<<20,hg=1<<21,Oo=Symbol("$state"),d5=Symbol("legacy props"),gN=Symbol(""),vN=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Wd=[],Zd=[];function h5(){var t=Wd;Wd=[],Dd(t)}function f5(){var t=Zd;Zd=[],Dd(t)}function zd(t){Wd.length===0&&queueMicrotask(h5),Wd.push(t)}function yN(t){Zd.length===0&&vN(f5),Zd.push(t)}function wN(){Wd.length>0&&h5(),Zd.length>0&&f5()}function p5(t){return t===this.v}function m5(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function fg(t){return!m5(t,this.v)}function bN(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kN(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _N(t){throw new Error("https://svelte.dev/e/effect_orphan")}function EN(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function CN(){throw new Error("https://svelte.dev/e/hydration_failed")}function SN(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function AN(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function RN(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function TN(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ll=!1,NN=!1;function xN(){ll=!0}const pg=1,mg=2,g5=4,BN=8,IN=16,ON=1,UN=2,v5=4,MN=8,PN=16,VN=1,FN=2,gg="[",J0="[!",vg="]",La={},dn=Symbol(),LN="http://www.w3.org/1999/xhtml",DN="@attach";function y5(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let or=null;function Y0(t){or=t}function Le(t,e=!1,r){var n=or={p:or,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ll&&!e&&(or.l={s:null,u:null,r1:[],r2:Uo(!1)}),Eg(()=>{n.d=!0})}function De(t){const e=or;if(e!==null){t!==void 0&&(e.x=t);const o=e.e;if(o!==null){var r=Ht,n=Gt;e.e=null;try{for(var i=0;i<o.length;i++){var s=o[i];ns(s.effect),si(s.reaction),ep(s.fn)}}finally{ns(r),si(n)}}or=e.p,e.m=!0}return t||{}}function ul(){return!ll||or!==null&&or.l===null}function dl(t){if(typeof t!="object"||t===null||Oo in t)return t;const e=cg(t);if(e!==uN&&e!==dN)return t;var r=new Map,n=G0(t),i=Mo(0),s=Gt,o=a=>{var c=Gt;si(s);var l=a();return si(c),l};return n&&r.set("length",Mo(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&AN();var u=r.get(c);return u===void 0?u=o(()=>{var d=Mo(l.value);return r.set(c,d),d}):K(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const h=o(()=>Mo(dn));r.set(c,h),yg(i)}}else{if(n&&typeof c=="string"){var u=r.get("length"),d=Number(c);Number.isInteger(d)&&d<u.v&&K(u,d)}K(l,dn),yg(i)}return!0},get(a,c,l){var f;if(c===Oo)return t;var u=r.get(c),d=c in a;if(u===void 0&&(!d||(f=al(a,c))!=null&&f.writable)&&(u=o(()=>{var p=dl(d?a[c]:dn),v=Mo(p);return v}),r.set(c,u)),u!==void 0){var h=C(u);return h===dn?void 0:h}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=C(u))}else if(l===void 0){var d=r.get(c),h=d==null?void 0:d.v;if(d!==void 0&&h!==dn)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,c){var h;if(c===Oo)return!0;var l=r.get(c),u=l!==void 0&&l.v!==dn||Reflect.has(a,c);if(l!==void 0||Ht!==null&&(!u||(h=al(a,c))!=null&&h.writable)){l===void 0&&(l=o(()=>{var f=u?dl(a[c]):dn,p=Mo(f);return p}),r.set(c,l));var d=C(l);if(d===dn)return!1}return u},set(a,c,l,u){var S;var d=r.get(c),h=c in a;if(n&&c==="length")for(var f=l;f<d.v;f+=1){var p=r.get(f+"");p!==void 0?K(p,dn):f in a&&(p=o(()=>Mo(dn)),r.set(f+"",p))}if(d===void 0)(!h||(S=al(a,c))!=null&&S.writable)&&(d=o(()=>Mo(void 0)),K(d,dl(l)),r.set(c,d));else{h=d.v!==dn;var v=o(()=>dl(l));K(d,v)}var m=Reflect.getOwnPropertyDescriptor(a,c);if(m!=null&&m.set&&m.set.call(u,l),!h){if(n&&typeof c=="string"){var w=r.get("length"),_=Number(c);Number.isInteger(_)&&_>=w.v&&K(w,_+1)}yg(i)}return!0},ownKeys(a){C(i);var c=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==dn});for(var[l,u]of r)u.v!==dn&&!(l in a)&&c.push(l);return c},setPrototypeOf(){RN()}})}function yg(t,e=1){K(t,t.v+e)}function w5(t){try{if(t!==null&&typeof t=="object"&&Oo in t)return t[Oo]}catch{}return t}function WN(t,e){return Object.is(w5(t),w5(e))}function hl(t){var e=Ti|Os,r=Gt!==null&&(Gt.f&Ti)!==0?Gt:null;return Ht===null||r!==null&&(r.f&Zn)!==0?e|=Zn:Ht.f|=u5,{ctx:or,deps:null,effects:null,equals:p5,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:r??Ht}}function Qe(t){const e=hl(t);return e.equals=fg,e}function b5(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Bi(e[r])}}function ZN(t){for(var e=t.parent;e!==null;){if((e.f&Ti)===0)return e;e=e.parent}return null}function k5(t){var e,r=Ht;ns(ZN(t));try{b5(t),e=P5(t)}finally{ns(r)}return e}function _5(t){var e=k5(t);if(t.equals(e)||(t.v=e,t.wv=U5()),!pl){var r=(Vo||(t.f&Zn)!==0)&&t.deps!==null?Io:zn;xi(t,r)}}const Gd=new Map;function Uo(t,e){var r={f:0,v:t,reactions:null,equals:p5,rv:0,wv:0};return r}function Mo(t,e){const r=Uo(t);return jN(r),r}function me(t,e=!1,r=!0){var i;const n=Uo(t);return e||(n.equals=fg),ll&&r&&or!==null&&or.l!==null&&((i=or.l).s??(i.s=[])).push(n),n}function zN(t,e){return K(t,le(()=>C(t))),e}function K(t,e,r=!1){Gt!==null&&!rs&&ul()&&(Gt.f&(Ti|lg))!==0&&!(Yr!=null&&Yr[1].includes(t)&&Yr[0]===Gt)&&TN();let n=r?dl(e):e;return fl(t,n)}function fl(t,e){if(!t.equals(e)){var r=t.v;pl?Gd.set(t,e):Gd.set(t,r),t.v=e,(t.f&Ti)!==0&&((t.f&Os)!==0&&k5(t),xi(t,(t.f&Zn)===0?zn:Io)),t.wv=U5(),C5(t,Os),ul()&&Ht!==null&&(Ht.f&zn)!==0&&(Ht.f&(Is|cl))===0&&(oi===null?QN([t]):oi.push(t))}return e}function E5(t,e=1){var r=C(t),n=e===1?r++:r--;return K(t,r),n}function C5(t,e){var r=t.reactions;if(r!==null)for(var n=ul(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;(a&Os)===0&&(!n&&o===Ht||(xi(o,e),(a&(zn|Zn))!==0&&((a&Ti)!==0?C5(o,Io):bg(o))))}}function Hd(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function GN(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let ut=!1;function Gn(t){ut=t}let Ft;function In(t){if(t===null)throw Hd(),La;return Ft=t}function Ms(){return In(ts(Ft))}function ie(t){if(ut){if(ts(Ft)!==null)throw Hd(),La;Ft=t}}function On(t=1){if(ut){for(var e=t,r=Ft;e--;)r=ts(r);Ft=r}}function $0(){for(var t=0,e=Ft;;){if(e.nodeType===8){var r=e.data;if(r===vg){if(t===0)return e;t-=1}else(r===gg||r===J0)&&(t+=1)}var n=ts(e);e.remove(),e=n}}function S5(t){if(!t||t.nodeType!==8)throw Hd(),La;return t.data}var A5,R5,T5,N5;function wg(){if(A5===void 0){A5=window,R5=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;T5=al(e,"firstChild").get,N5=al(e,"nextSibling").get,o5(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),o5(r)&&(r.__t=void 0)}}function Po(t=""){return document.createTextNode(t)}function Ni(t){return T5.call(t)}function ts(t){return N5.call(t)}function oe(t,e){if(!ut)return Ni(t);var r=Ni(Ft);if(r===null)r=Ft.appendChild(Po());else if(e&&r.nodeType!==3){var n=Po();return r==null||r.before(n),In(n),n}return In(r),r}function Ne(t,e){if(!ut){var r=Ni(t);return r instanceof Comment&&r.data===""?ts(r):r}return Ft}function de(t,e=1,r=!1){let n=ut?Ft:t;for(var i;e--;)i=n,n=ts(n);if(!ut)return n;var s=n==null?void 0:n.nodeType;if(r&&s!==3){var o=Po();return n===null?i==null||i.after(o):n.before(o),In(o),o}return In(n),n}function x5(t){t.textContent=""}function HN(t){var e=Ht;if((e.f&l5)===0){if((e.f&ug)===0)throw t;e.fn(t)}else B5(t,e)}function B5(t,e){for(;e!==null;){if((e.f&ug)!==0)try{e.fn(t);return}catch{}e=e.parent}throw t}let jd=!1,Qd=null,Da=!1,pl=!1;function I5(t){pl=t}let Jd=[],GX=[],Gt=null,rs=!1;function si(t){Gt=t}let Ht=null;function ns(t){Ht=t}let Yr=null;function jN(t){Gt!==null&&Gt.f&hg&&(Yr===null?Yr=[Gt,[t]]:Yr[1].push(t))}let Cn=null,Hn=0,oi=null;function QN(t){oi=t}let O5=1,X0=0,Vo=!1;function U5(){return++O5}function Yd(t){var d;var e=t.f;if((e&Os)!==0)return!0;if((e&Io)!==0){var r=t.deps,n=(e&Zn)!==0;if(r!==null){var i,s,o=(e&j0)!==0,a=n&&Ht!==null&&!Vo,c=r.length;if(o||a){var l=t,u=l.parent;for(i=0;i<c;i++)s=r[i],(o||!((d=s==null?void 0:s.reactions)!=null&&d.includes(l)))&&(s.reactions??(s.reactions=[])).push(l);o&&(l.f^=j0),a&&u!==null&&(u.f&Zn)===0&&(l.f^=Zn)}for(i=0;i<c;i++)if(s=r[i],Yd(s)&&_5(s),s.wv>t.wv)return!0}(!n||Ht!==null&&!Vo)&&xi(t,zn)}return!1}function M5(t,e,r=!0){var n=t.reactions;if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];Yr!=null&&Yr[1].includes(t)&&Yr[0]===Gt||((s.f&Ti)!==0?M5(s,e,!1):e===s&&(r?xi(s,Os):(s.f&zn)!==0&&xi(s,Io),bg(s)))}}function P5(t){var f;var e=Cn,r=Hn,n=oi,i=Gt,s=Vo,o=Yr,a=or,c=rs,l=t.f;Cn=null,Hn=0,oi=null,Vo=(l&Zn)!==0&&(rs||!Da||Gt===null),Gt=(l&(Is|cl))===0?t:null,Yr=null,Y0(t.ctx),rs=!1,X0++,t.f|=hg;try{var u=(0,t.fn)(),d=t.deps;if(Cn!==null){var h;if(K0(t,Hn),d!==null&&Hn>0)for(d.length=Hn+Cn.length,h=0;h<Cn.length;h++)d[Hn+h]=Cn[h];else t.deps=d=Cn;if(!Vo)for(h=Hn;h<d.length;h++)((f=d[h]).reactions??(f.reactions=[])).push(t)}else d!==null&&Hn<d.length&&(K0(t,Hn),d.length=Hn);if(ul()&&oi!==null&&!rs&&d!==null&&(t.f&(Ti|Io|Os))===0)for(h=0;h<oi.length;h++)M5(oi[h],t);return i!==null&&i!==t&&(X0++,oi!==null&&(n===null?n=oi:n.push(...oi))),u}catch(p){HN(p)}finally{Cn=e,Hn=r,oi=n,Gt=i,Vo=s,Yr=o,Y0(a),rs=c,t.f^=hg}}function JN(t,e){let r=e.reactions;if(r!==null){var n=lN.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&Ti)!==0&&(Cn===null||!Cn.includes(e))&&(xi(e,Io),(e.f&(Zn|j0))===0&&(e.f^=j0),b5(e),K0(e,0))}function K0(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)JN(t,r[n])}function q0(t){var e=t.f;if((e&dg)===0){xi(t,zn);var r=Ht,n=Da;Ht=t,Da=!0;try{(e&lg)!==0?rx(t):D5(t),L5(t);var i=P5(t);t.teardown=typeof i=="function"?i:null,t.wv=O5;var s;Ld&&NN&&(t.f&Os)!==0&&t.deps}finally{Da=n,Ht=r}}}function YN(){try{EN()}catch(t){if(Qd!==null)B5(t,Qd);else throw t}}function V5(){var t=Da;try{var e=0;for(Da=!0;Jd.length>0;){e++>1e3&&YN();var r=Jd,n=r.length;Jd=[];for(var i=0;i<n;i++){var s=XN(r[i]);$N(s)}Gd.clear()}}finally{jd=!1,Da=t,Qd=null}}function $N(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];(n.f&(dg|Us))===0&&Yd(n)&&(q0(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Z5(n):n.fn=null))}}function bg(t){jd||(jd=!0,queueMicrotask(V5));for(var e=Qd=t;e.parent!==null;){e=e.parent;var r=e.f;if((r&(cl|Is))!==0){if((r&zn)===0)return;e.f^=zn}}Jd.push(e)}function XN(t){for(var e=[],r=t;r!==null;){var n=r.f,i=(n&(Is|cl))!==0,s=i&&(n&zn)!==0;if(!s&&(n&Us)===0){(n&c5)!==0?e.push(r):i?r.f^=zn:Yd(r)&&q0(r);var o=r.first;if(o!==null){r=o;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)r=a.next,a=a.parent}return e}function ge(t){for(var e;;){if(wN(),Jd.length===0)return jd=!1,Qd=null,e;jd=!0,V5()}}function C(t){var e=t.f,r=(e&Ti)!==0;if(Gt!==null&&!rs){if(!(Yr!=null&&Yr[1].includes(t))||Yr[0]!==Gt){var n=Gt.deps;t.rv<X0&&(t.rv=X0,Cn===null&&n!==null&&n[Hn]===t?Hn++:Cn===null?Cn=[t]:(!Vo||!Cn.includes(t))&&Cn.push(t))}}else if(r&&t.deps===null&&t.effects===null){var i=t,s=i.parent;s!==null&&(s.f&Zn)===0&&(i.f^=Zn)}return r&&(i=t,Yd(i)&&_5(i)),pl&&Gd.has(t)?Gd.get(t):t.v}function kg(t){return t&&C(t)}function le(t){var e=rs;try{return rs=!0,t()}finally{rs=e}}const KN=-7169;function xi(t,e){t.f=t.f&KN|e}function we(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Oo in t)_g(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Oo in r&&_g(r)}}}function _g(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{_g(t[n],e)}catch{}const r=cg(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=s5(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}function F5(t){Ht===null&&Gt===null&&_N(),Gt!==null&&(Gt.f&Zn)!==0&&Ht===null&&kN(),pl&&bN()}function qN(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ml(t,e,r,n=!0){var i=Ht,s={ctx:or,deps:null,nodes_start:null,nodes_end:null,f:t|Os,first:null,fn:e,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(r)try{q0(s),s.f|=l5}catch(c){throw Bi(s),c}else e!==null&&bg(s);var o=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&(u5|ug))===0;if(!o&&n&&(i!==null&&qN(s,i),Gt!==null&&(Gt.f&Ti)!==0)){var a=Gt;(a.effects??(a.effects=[])).push(s)}return s}function Eg(t){const e=ml(H0,null,!1);return xi(e,zn),e.teardown=t,e}function Cg(t){F5();var e=Ht!==null&&(Ht.f&Is)!==0&&or!==null&&!or.m;if(e){var r=or;(r.e??(r.e=[])).push({fn:t,effect:Ht,reaction:Gt})}else{var n=ep(t);return n}}function ex(t){return F5(),tp(t)}function tx(t){const e=ml(cl,t,!0);return(r={})=>new Promise(n=>{r.outro?Fo(e,()=>{Bi(e),n(void 0)}):(Bi(e),n(void 0))})}function ep(t){return ml(c5,t,!1)}function $e(t,e){var r=or,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=tp(()=>{t(),!n.ran&&(n.ran=!0,K(r.l.r2,!0),le(e))})}function ar(){var t=or;tp(()=>{if(C(t.l.r2)){for(var e of t.l.r1){var r=e.effect;(r.f&zn)!==0&&xi(r,Io),Yd(r)&&q0(r),e.ran=!1}t.l.r2.v=!1}})}function tp(t){return ml(H0,t,!0)}function Te(t,e=[],r=hl){const n=e.map(r);return Wa(()=>t(...n.map(C)))}function Wa(t,e=0){return ml(H0|lg|e,t,!0)}function Ps(t,e=!0){return ml(H0|Is,t,!0,e)}function L5(t){var e=t.teardown;if(e!==null){const r=pl,n=Gt;I5(!0),si(null);try{e.call(null)}finally{I5(r),si(n)}}}function D5(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;(r.f&cl)!==0?r.parent=null:Bi(r,e),r=n}}function rx(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Is)===0&&Bi(e),e=r}}function Bi(t,e=!0){var r=!1;(e||(t.f&mN)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(W5(t.nodes_start,t.nodes_end),r=!0),D5(t,e&&!r),K0(t,0),xi(t,dg);var n=t.transitions;if(n!==null)for(const s of n)s.stop();L5(t);var i=t.parent;i!==null&&i.first!==null&&Z5(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function W5(t,e){for(;t!==null;){var r=t===e?null:ts(t);t.remove(),t=r}}function Z5(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Fo(t,e){var r=[];Sg(t,r,!0),z5(r,()=>{Bi(t),e&&e()})}function z5(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Sg(t,e,r){if((t.f&Us)===0){if(t.f^=Us,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&Q0)!==0||(n.f&Is)!==0;Sg(n,e,s?r:!1),n=i}}}function $d(t){G5(t,!0)}function G5(t,e){if((t.f&Us)!==0){t.f^=Us;for(var r=t.first;r!==null;){var n=r.next,i=(r.f&Q0)!==0||(r.f&Is)!==0;G5(r,i?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}function nx(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ix=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function sx(t){return ix.includes(t)}const ox={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ax(t){return t=t.toLowerCase(),ox[t]??t}const cx=["touchstart","touchmove"];function lx(t){return cx.includes(t)}function ux(t,e){if(e){const r=document.body;t.autofocus=!0,zd(()=>{document.activeElement===r&&t.focus()})}}let H5=!1;function j5(){H5||(H5=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const r of t.target.elements)(e=r.__on_r)==null||e.call(r)})},{capture:!0}))}function Q5(t){var e=Gt,r=Ht;si(null),ns(null);try{return t()}finally{si(e),ns(r)}}function dx(t,e,r,n=r){t.addEventListener(e,()=>Q5(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),j5()}const J5=new Set,Ag=new Set;function Y5(t,e,r,n={}){function i(s){if(n.capture||Xd.call(e,s),!s.cancelBubble)return Q5(()=>r==null?void 0:r.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?zd(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function hn(t,e,r,n,i){var s={capture:n,passive:i},o=Y5(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Eg(()=>{e.removeEventListener(t,o,s)})}function hx(t){for(var e=0;e<t.length;e++)J5.add(t[e]);for(var r of Ag)r(t)}function Xd(t){var _;var e=this,r=e.ownerDocument,n=t.type,i=((_=t.composedPath)==null?void 0:_.call(t))||[],s=i[0]||t.target,o=0,a=t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=i.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(s=i[o]||t.target,s!==e){ag(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Gt,d=Ht;si(null),ns(null);try{for(var h,f=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var v=s["__"+n];if(v!=null&&(!s.disabled||t.target===s))if(G0(v)){var[m,...w]=v;m.apply(s,[t,...w])}else v.call(s,t)}catch(S){h?f.push(S):h=S}if(t.cancelBubble||p===e||p===null)break;s=p}if(h){for(let S of f)queueMicrotask(()=>{throw S});throw h}}finally{t.__root=e,delete t.currentTarget,si(u),ns(d)}}}function $5(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function is(t,e){var r=Ht;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function fe(t,e){var r=(e&VN)!==0,n=(e&FN)!==0,i,s=!t.startsWith("<!>");return()=>{if(ut)return is(Ft,null),Ft;i===void 0&&(i=$5(s?t:"<!>"+t),r||(i=Ni(i)));var o=n||R5?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ni(o),c=o.lastChild;is(a,c)}else is(o,o);return o}}function _r(t=""){if(!ut){var e=Po(t+"");return is(e,e),e}var r=Ft;return r.nodeType!==3&&(r.before(r=Po()),In(r)),is(r,r),r}function et(){if(ut)return is(Ft,null),Ft;var t=document.createDocumentFragment(),e=document.createComment(""),r=Po();return t.append(e,r),is(e,r),t}function J(t,e){if(ut){Ht.nodes_end=Ft,Ms();return}t!==null&&t.before(e)}function Xe(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function X5(t,e){return K5(t,e)}function fx(t,e){wg(),e.intro=e.intro??!1;const r=e.target,n=ut,i=Ft;try{for(var s=Ni(r);s&&(s.nodeType!==8||s.data!==gg);)s=ts(s);if(!s)throw La;Gn(!0),In(s),Ms();const o=K5(t,{...e,anchor:s});if(Ft===null||Ft.nodeType!==8||Ft.data!==vg)throw Hd(),La;return Gn(!1),o}catch(o){if(o===La)return e.recover===!1&&CN(),wg(),x5(r),Gn(!1),X5(t,e);throw o}finally{Gn(n),In(i)}}const gl=new Map;function K5(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){wg();var a=new Set,c=d=>{for(var h=0;h<d.length;h++){var f=d[h];if(!a.has(f)){a.add(f);var p=lx(f);e.addEventListener(f,Xd,{passive:p});var v=gl.get(f);v===void 0?(document.addEventListener(f,Xd,{passive:p}),gl.set(f,1)):gl.set(f,v+1)}}};c(og(J5)),Ag.add(c);var l=void 0,u=tx(()=>{var d=r??e.appendChild(Po());return Ps(()=>{if(s){Le({});var h=or;h.c=s}i&&(n.$$events=i),ut&&is(d,null),l=t(d,n)||{},ut&&(Ht.nodes_end=Ft),s&&De()}),()=>{var p;for(var h of a){e.removeEventListener(h,Xd);var f=gl.get(h);--f===0?(document.removeEventListener(h,Xd),gl.delete(h)):gl.set(h,f)}Ag.delete(c),d!==r&&((p=d.parentNode)==null||p.removeChild(d))}});return Rg.set(l,u),l}let Rg=new WeakMap;function px(t,e){const r=Rg.get(t);return r?(Rg.delete(t),r(e)):Promise.resolve()}const Tg=0,rp=1,Ng=2;function $r(t,e,r,n,i){ut&&Ms();var s=t,o=ul(),a=or,c=dn,l,u,d,h=o?Uo(void 0):me(void 0,!1,!1),f=o?Uo(void 0):me(void 0,!1,!1),p=!1;function v(w,_){p=!0,_&&(ns(m),si(m),Y0(a));try{w===rp&&n&&(u?$d(u):u=Ps(()=>n(s,h))),w!==Tg&&l&&Fo(l,()=>l=null),w!==rp&&u&&Fo(u,()=>u=null),w!==Ng&&d&&Fo(d,()=>d=null)}finally{_&&(Y0(null),si(null),ns(null),ge())}}var m=Wa(()=>{if(c===(c=e()))return;let w=ut&&a5(c)===(s.data===J0);if(w&&(s=$0(),In(s),Gn(!1),w=!0),a5(c)){var _=c;p=!1,_.then(S=>{_===c&&(fl(h,S),v(rp,!0))},S=>{if(_===c)throw fl(f,S),v(Ng,!0),f.v}),ut||zd(()=>{p||v(Tg,!0)})}else fl(h,c),v(rp,!1);return w&&Gn(!0),()=>c=dn});ut&&(s=Ft)}function Ce(t,e,[r,n]=[0,0]){ut&&r===0&&Ms();var i=t,s=null,o=null,a=dn,c=r>0?Q0:0,l=!1;const u=(h,f=!0)=>{l=!0,d(f,h)},d=(h,f)=>{if(a===(a=h))return;let p=!1;if(ut&&n!==-1){if(r===0){const m=S5(i);m===gg?n=0:m===J0?n=1/0:(n=parseInt(m.substring(1)),n!==n&&(n=a?1/0:-1))}const v=n>r;!!a===v&&(i=$0(),In(i),Gn(!1),p=!0,n=-1)}a?(s?$d(s):f&&(s=Ps(()=>f(i))),o&&Fo(o,()=>{o=null})):(o?$d(o):f&&(o=Ps(()=>f(i,[r+1,n]))),s&&Fo(s,()=>{s=null})),p&&Gn(!0)};Wa(()=>{l=!1,e(u),l||d(null,null)},c),ut&&(i=Ft)}function Za(t,e){return e}function mx(t,e,r,n){for(var i=[],s=e.length,o=0;o<s;o++)Sg(e[o].e,i,!0);var a=s>0&&i.length===0&&r!==null;if(a){var c=r.parentNode;x5(c),c.append(r),n.clear(),Lo(t,e[0].prev,e[s-1].next)}z5(i,()=>{for(var l=0;l<s;l++){var u=e[l];a||(n.delete(u.k),Lo(t,u.prev,u.next)),Bi(u.e,!a)}})}function za(t,e,r,n,i,s=null){var o=t,a={flags:e,items:new Map,first:null},c=(e&g5)!==0;if(c){var l=t;o=ut?In(Ni(l)):l.appendChild(Po())}ut&&Ms();var u=null,d=!1,h=Qe(()=>{var f=r();return G0(f)?f:f==null?[]:og(f)});Wa(()=>{var f=C(h),p=f.length;if(d&&p===0)return;d=p===0;let v=!1;if(ut){var m=S5(o)===J0;m!==(p===0)&&(o=$0(),In(o),Gn(!1),v=!0)}if(ut){for(var w=null,_,S=0;S<p;S++){if(Ft.nodeType===8&&Ft.data===vg){o=Ft,v=!0,Gn(!1);break}var T=f[S],N=n(T,S);_=q5(Ft,a,w,null,T,N,S,i,e,r),a.items.set(N,_),w=_}p>0&&In($0())}ut||gx(f,a,o,i,e,n,r),s!==null&&(p===0?u?$d(u):u=Ps(()=>s(o)):u!==null&&Fo(u,()=>{u=null})),v&&Gn(!0),C(h)}),ut&&(o=Ft)}function gx(t,e,r,n,i,s,o){var $,L,z,X;var a=(i&BN)!==0,c=(i&(pg|mg))!==0,l=t.length,u=e.items,d=e.first,h=d,f,p=null,v,m=[],w=[],_,S,T,N;if(a)for(N=0;N<l;N+=1)_=t[N],S=s(_,N),T=u.get(S),T!==void 0&&(($=T.a)==null||$.measure(),(v??(v=new Set)).add(T));for(N=0;N<l;N+=1){if(_=t[N],S=s(_,N),T=u.get(S),T===void 0){var I=h?h.e.nodes_start:r;p=q5(I,e,p,p===null?e.first:p.next,_,S,N,n,i,o),u.set(S,p),m=[],w=[],h=p.next;continue}if(c&&vx(T,_,N,i),(T.e.f&Us)!==0&&($d(T.e),a&&((L=T.a)==null||L.unfix(),(v??(v=new Set)).delete(T))),T!==h){if(f!==void 0&&f.has(T)){if(m.length<w.length){var O=w[0],U;p=O.prev;var G=m[0],D=m[m.length-1];for(U=0;U<m.length;U+=1)e6(m[U],O,r);for(U=0;U<w.length;U+=1)f.delete(w[U]);Lo(e,G.prev,D.next),Lo(e,p,G),Lo(e,D,O),h=O,p=D,N-=1,m=[],w=[]}else f.delete(T),e6(T,h,r),Lo(e,T.prev,T.next),Lo(e,T,p===null?e.first:p.next),Lo(e,p,T),p=T;continue}for(m=[],w=[];h!==null&&h.k!==S;)(h.e.f&Us)===0&&(f??(f=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;T=h}m.push(T),p=T,h=T.next}if(h!==null||f!==void 0){for(var M=f===void 0?[]:og(f);h!==null;)(h.e.f&Us)===0&&M.push(h),h=h.next;var Z=M.length;if(Z>0){var j=(i&g5)!==0&&l===0?r:null;if(a){for(N=0;N<Z;N+=1)(z=M[N].a)==null||z.measure();for(N=0;N<Z;N+=1)(X=M[N].a)==null||X.fix()}mx(e,M,j,u)}}a&&zd(()=>{var te;if(v!==void 0)for(T of v)(te=T.a)==null||te.apply()}),Ht.first=e.first&&e.first.e,Ht.last=p&&p.e}function vx(t,e,r,n){(n&pg)!==0&&fl(t.v,e),(n&mg)!==0?fl(t.i,r):t.i=r}function q5(t,e,r,n,i,s,o,a,c,l){var u=(c&pg)!==0,d=(c&IN)===0,h=u?d?me(i,!1,!1):Uo(i):i,f=(c&mg)===0?o:Uo(o),p={i:f,v:h,k:s,a:null,e:null,prev:r,next:n};try{return p.e=Ps(()=>a(t,h,f,l),ut),p.e.prev=r&&r.e,p.e.next=n&&n.e,r===null?e.first=p:(r.next=p,r.e.next=p.e),n!==null&&(n.prev=p,n.e.prev=p.e),p}finally{}}function e6(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==n;){var o=ts(s);i.before(s),s=o}}function Lo(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function xg(t,e,r=!1,n=!1,i=!1){var s=t,o="";Te(()=>{var a=Ht;if(o===(o=e()??"")){ut&&Ms();return}if(a.nodes_start!==null&&(W5(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),o!==""){if(ut){Ft.data;for(var c=Ms(),l=c;c!==null&&(c.nodeType!==8||c.data!=="");)l=c,c=ts(c);if(c===null)throw Hd(),La;is(Ft,l),s=In(c);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=$5(u);if((r||n)&&(d=Ni(d)),is(Ni(d),d.lastChild),r||n)for(;Ni(d);)s.before(Ni(d));else s.before(d)}})}function Ii(t,e,r,n,i){var a;ut&&Ms();var s=(a=e.$$slots)==null?void 0:a[r],o=!1;s===!0&&(s=e[r==="default"?"children":r],o=!0),s===void 0||s(t,o?()=>n:n)}function Xr(t,e,r){ut&&Ms();var n=t,i,s;Wa(()=>{i!==(i=e())&&(s&&(Fo(s),s=null),i&&(s=Ps(()=>r(n,i))))},Q0),ut&&(n=Ft)}function Do(t,e){zd(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function yx(t,e){var r=void 0,n;Wa(()=>{r!==(r=e())&&(n&&(Bi(n),n=null),r&&(n=Ps(()=>{ep(()=>r(t))})))})}function t6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=t6(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function wx(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=t6(t))&&(n&&(n+=" "),n+=e);return n}function bx(t){return typeof t=="object"?wx(t):t??""}const r6=[...`
|
|
2
|
+
(function(Ar,en){typeof exports=="object"&&typeof module<"u"?en(exports):typeof define=="function"&&define.amd?define(["exports"],en):(Ar=typeof globalThis<"u"?globalThis:Ar||self,en(Ar.CredenzaPassport={}))})(this,function(Ar){"use strict";var qT=Ar=>{throw TypeError(Ar)};var eN=(Ar,en,ii)=>en.has(Ar)||qT("Cannot "+ii);var Wn=(Ar,en,ii)=>(eN(Ar,en,"read from private field"),ii?ii.call(Ar):en.get(Ar)),e5=(Ar,en,ii)=>en.has(Ar)?qT("Cannot add the same private member more than once"):en instanceof WeakSet?en.add(Ar):en.set(Ar,ii),t5=(Ar,en,ii,Ld)=>(eN(Ar,en,"write to private field"),Ld?Ld.call(Ar,ii):en.set(Ar,ii),ii);var To,Ri,ZT;const ii={version:"0.2.8"},Ld=!1;var G0=Array.isArray,lN=Array.prototype.indexOf,og=Array.from,ag=Object.defineProperty,al=Object.getOwnPropertyDescriptor,s5=Object.getOwnPropertyDescriptors,uN=Object.prototype,dN=Array.prototype,cg=Object.getPrototypeOf,o5=Object.isExtensible;const Bo=()=>{};function a5(t){return typeof(t==null?void 0:t.then)=="function"}function hN(t){return t()}function Dd(t){for(var e=0;e<t.length;e++)t[e]()}function fN(t,e,r=!1){return t===void 0?r?e():e:t}const Ti=2,c5=4,H0=8,lg=16,Is=32,cl=64,ug=128,Zn=256,j0=512,zn=1024,Os=2048,Io=4096,Us=8192,dg=16384,l5=32768,Q0=65536,pN=1<<17,mN=1<<19,u5=1<<20,hg=1<<21,Oo=Symbol("$state"),d5=Symbol("legacy props"),gN=Symbol(""),vN=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Wd=[],Zd=[];function h5(){var t=Wd;Wd=[],Dd(t)}function f5(){var t=Zd;Zd=[],Dd(t)}function zd(t){Wd.length===0&&queueMicrotask(h5),Wd.push(t)}function yN(t){Zd.length===0&&vN(f5),Zd.push(t)}function wN(){Wd.length>0&&h5(),Zd.length>0&&f5()}function p5(t){return t===this.v}function m5(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function fg(t){return!m5(t,this.v)}function bN(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kN(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _N(t){throw new Error("https://svelte.dev/e/effect_orphan")}function EN(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function CN(){throw new Error("https://svelte.dev/e/hydration_failed")}function SN(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function AN(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function RN(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function TN(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ll=!1,NN=!1;function xN(){ll=!0}const pg=1,mg=2,g5=4,BN=8,IN=16,ON=1,UN=2,v5=4,MN=8,PN=16,VN=1,FN=2,gg="[",J0="[!",vg="]",La={},dn=Symbol(),LN="http://www.w3.org/1999/xhtml",DN="@attach";function y5(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let or=null;function Y0(t){or=t}function Le(t,e=!1,r){var n=or={p:or,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ll&&!e&&(or.l={s:null,u:null,r1:[],r2:Uo(!1)}),Eg(()=>{n.d=!0})}function De(t){const e=or;if(e!==null){t!==void 0&&(e.x=t);const o=e.e;if(o!==null){var r=Ht,n=Gt;e.e=null;try{for(var i=0;i<o.length;i++){var s=o[i];ns(s.effect),si(s.reaction),ep(s.fn)}}finally{ns(r),si(n)}}or=e.p,e.m=!0}return t||{}}function ul(){return!ll||or!==null&&or.l===null}function dl(t){if(typeof t!="object"||t===null||Oo in t)return t;const e=cg(t);if(e!==uN&&e!==dN)return t;var r=new Map,n=G0(t),i=Mo(0),s=Gt,o=a=>{var c=Gt;si(s);var l=a();return si(c),l};return n&&r.set("length",Mo(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&AN();var u=r.get(c);return u===void 0?u=o(()=>{var d=Mo(l.value);return r.set(c,d),d}):K(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const h=o(()=>Mo(dn));r.set(c,h),yg(i)}}else{if(n&&typeof c=="string"){var u=r.get("length"),d=Number(c);Number.isInteger(d)&&d<u.v&&K(u,d)}K(l,dn),yg(i)}return!0},get(a,c,l){var f;if(c===Oo)return t;var u=r.get(c),d=c in a;if(u===void 0&&(!d||(f=al(a,c))!=null&&f.writable)&&(u=o(()=>{var p=dl(d?a[c]:dn),v=Mo(p);return v}),r.set(c,u)),u!==void 0){var h=C(u);return h===dn?void 0:h}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=C(u))}else if(l===void 0){var d=r.get(c),h=d==null?void 0:d.v;if(d!==void 0&&h!==dn)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,c){var h;if(c===Oo)return!0;var l=r.get(c),u=l!==void 0&&l.v!==dn||Reflect.has(a,c);if(l!==void 0||Ht!==null&&(!u||(h=al(a,c))!=null&&h.writable)){l===void 0&&(l=o(()=>{var f=u?dl(a[c]):dn,p=Mo(f);return p}),r.set(c,l));var d=C(l);if(d===dn)return!1}return u},set(a,c,l,u){var S;var d=r.get(c),h=c in a;if(n&&c==="length")for(var f=l;f<d.v;f+=1){var p=r.get(f+"");p!==void 0?K(p,dn):f in a&&(p=o(()=>Mo(dn)),r.set(f+"",p))}if(d===void 0)(!h||(S=al(a,c))!=null&&S.writable)&&(d=o(()=>Mo(void 0)),K(d,dl(l)),r.set(c,d));else{h=d.v!==dn;var v=o(()=>dl(l));K(d,v)}var m=Reflect.getOwnPropertyDescriptor(a,c);if(m!=null&&m.set&&m.set.call(u,l),!h){if(n&&typeof c=="string"){var w=r.get("length"),_=Number(c);Number.isInteger(_)&&_>=w.v&&K(w,_+1)}yg(i)}return!0},ownKeys(a){C(i);var c=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==dn});for(var[l,u]of r)u.v!==dn&&!(l in a)&&c.push(l);return c},setPrototypeOf(){RN()}})}function yg(t,e=1){K(t,t.v+e)}function w5(t){try{if(t!==null&&typeof t=="object"&&Oo in t)return t[Oo]}catch{}return t}function WN(t,e){return Object.is(w5(t),w5(e))}function hl(t){var e=Ti|Os,r=Gt!==null&&(Gt.f&Ti)!==0?Gt:null;return Ht===null||r!==null&&(r.f&Zn)!==0?e|=Zn:Ht.f|=u5,{ctx:or,deps:null,effects:null,equals:p5,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:r??Ht}}function Qe(t){const e=hl(t);return e.equals=fg,e}function b5(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Bi(e[r])}}function ZN(t){for(var e=t.parent;e!==null;){if((e.f&Ti)===0)return e;e=e.parent}return null}function k5(t){var e,r=Ht;ns(ZN(t));try{b5(t),e=P5(t)}finally{ns(r)}return e}function _5(t){var e=k5(t);if(t.equals(e)||(t.v=e,t.wv=U5()),!pl){var r=(Vo||(t.f&Zn)!==0)&&t.deps!==null?Io:zn;xi(t,r)}}const Gd=new Map;function Uo(t,e){var r={f:0,v:t,reactions:null,equals:p5,rv:0,wv:0};return r}function Mo(t,e){const r=Uo(t);return jN(r),r}function me(t,e=!1,r=!0){var i;const n=Uo(t);return e||(n.equals=fg),ll&&r&&or!==null&&or.l!==null&&((i=or.l).s??(i.s=[])).push(n),n}function zN(t,e){return K(t,le(()=>C(t))),e}function K(t,e,r=!1){Gt!==null&&!rs&&ul()&&(Gt.f&(Ti|lg))!==0&&!(Yr!=null&&Yr[1].includes(t)&&Yr[0]===Gt)&&TN();let n=r?dl(e):e;return fl(t,n)}function fl(t,e){if(!t.equals(e)){var r=t.v;pl?Gd.set(t,e):Gd.set(t,r),t.v=e,(t.f&Ti)!==0&&((t.f&Os)!==0&&k5(t),xi(t,(t.f&Zn)===0?zn:Io)),t.wv=U5(),C5(t,Os),ul()&&Ht!==null&&(Ht.f&zn)!==0&&(Ht.f&(Is|cl))===0&&(oi===null?QN([t]):oi.push(t))}return e}function E5(t,e=1){var r=C(t),n=e===1?r++:r--;return K(t,r),n}function C5(t,e){var r=t.reactions;if(r!==null)for(var n=ul(),i=r.length,s=0;s<i;s++){var o=r[s],a=o.f;(a&Os)===0&&(!n&&o===Ht||(xi(o,e),(a&(zn|Zn))!==0&&((a&Ti)!==0?C5(o,Io):bg(o))))}}function Hd(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function GN(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let ut=!1;function Gn(t){ut=t}let Ft;function In(t){if(t===null)throw Hd(),La;return Ft=t}function Ms(){return In(ts(Ft))}function ie(t){if(ut){if(ts(Ft)!==null)throw Hd(),La;Ft=t}}function On(t=1){if(ut){for(var e=t,r=Ft;e--;)r=ts(r);Ft=r}}function $0(){for(var t=0,e=Ft;;){if(e.nodeType===8){var r=e.data;if(r===vg){if(t===0)return e;t-=1}else(r===gg||r===J0)&&(t+=1)}var n=ts(e);e.remove(),e=n}}function S5(t){if(!t||t.nodeType!==8)throw Hd(),La;return t.data}var A5,R5,T5,N5;function wg(){if(A5===void 0){A5=window,R5=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;T5=al(e,"firstChild").get,N5=al(e,"nextSibling").get,o5(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),o5(r)&&(r.__t=void 0)}}function Po(t=""){return document.createTextNode(t)}function Ni(t){return T5.call(t)}function ts(t){return N5.call(t)}function oe(t,e){if(!ut)return Ni(t);var r=Ni(Ft);if(r===null)r=Ft.appendChild(Po());else if(e&&r.nodeType!==3){var n=Po();return r==null||r.before(n),In(n),n}return In(r),r}function Ne(t,e){if(!ut){var r=Ni(t);return r instanceof Comment&&r.data===""?ts(r):r}return Ft}function de(t,e=1,r=!1){let n=ut?Ft:t;for(var i;e--;)i=n,n=ts(n);if(!ut)return n;var s=n==null?void 0:n.nodeType;if(r&&s!==3){var o=Po();return n===null?i==null||i.after(o):n.before(o),In(o),o}return In(n),n}function x5(t){t.textContent=""}function HN(t){var e=Ht;if((e.f&l5)===0){if((e.f&ug)===0)throw t;e.fn(t)}else B5(t,e)}function B5(t,e){for(;e!==null;){if((e.f&ug)!==0)try{e.fn(t);return}catch{}e=e.parent}throw t}let jd=!1,Qd=null,Da=!1,pl=!1;function I5(t){pl=t}let Jd=[],GX=[],Gt=null,rs=!1;function si(t){Gt=t}let Ht=null;function ns(t){Ht=t}let Yr=null;function jN(t){Gt!==null&&Gt.f&hg&&(Yr===null?Yr=[Gt,[t]]:Yr[1].push(t))}let Cn=null,Hn=0,oi=null;function QN(t){oi=t}let O5=1,X0=0,Vo=!1;function U5(){return++O5}function Yd(t){var d;var e=t.f;if((e&Os)!==0)return!0;if((e&Io)!==0){var r=t.deps,n=(e&Zn)!==0;if(r!==null){var i,s,o=(e&j0)!==0,a=n&&Ht!==null&&!Vo,c=r.length;if(o||a){var l=t,u=l.parent;for(i=0;i<c;i++)s=r[i],(o||!((d=s==null?void 0:s.reactions)!=null&&d.includes(l)))&&(s.reactions??(s.reactions=[])).push(l);o&&(l.f^=j0),a&&u!==null&&(u.f&Zn)===0&&(l.f^=Zn)}for(i=0;i<c;i++)if(s=r[i],Yd(s)&&_5(s),s.wv>t.wv)return!0}(!n||Ht!==null&&!Vo)&&xi(t,zn)}return!1}function M5(t,e,r=!0){var n=t.reactions;if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];Yr!=null&&Yr[1].includes(t)&&Yr[0]===Gt||((s.f&Ti)!==0?M5(s,e,!1):e===s&&(r?xi(s,Os):(s.f&zn)!==0&&xi(s,Io),bg(s)))}}function P5(t){var f;var e=Cn,r=Hn,n=oi,i=Gt,s=Vo,o=Yr,a=or,c=rs,l=t.f;Cn=null,Hn=0,oi=null,Vo=(l&Zn)!==0&&(rs||!Da||Gt===null),Gt=(l&(Is|cl))===0?t:null,Yr=null,Y0(t.ctx),rs=!1,X0++,t.f|=hg;try{var u=(0,t.fn)(),d=t.deps;if(Cn!==null){var h;if(K0(t,Hn),d!==null&&Hn>0)for(d.length=Hn+Cn.length,h=0;h<Cn.length;h++)d[Hn+h]=Cn[h];else t.deps=d=Cn;if(!Vo)for(h=Hn;h<d.length;h++)((f=d[h]).reactions??(f.reactions=[])).push(t)}else d!==null&&Hn<d.length&&(K0(t,Hn),d.length=Hn);if(ul()&&oi!==null&&!rs&&d!==null&&(t.f&(Ti|Io|Os))===0)for(h=0;h<oi.length;h++)M5(oi[h],t);return i!==null&&i!==t&&(X0++,oi!==null&&(n===null?n=oi:n.push(...oi))),u}catch(p){HN(p)}finally{Cn=e,Hn=r,oi=n,Gt=i,Vo=s,Yr=o,Y0(a),rs=c,t.f^=hg}}function JN(t,e){let r=e.reactions;if(r!==null){var n=lN.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&Ti)!==0&&(Cn===null||!Cn.includes(e))&&(xi(e,Io),(e.f&(Zn|j0))===0&&(e.f^=j0),b5(e),K0(e,0))}function K0(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)JN(t,r[n])}function q0(t){var e=t.f;if((e&dg)===0){xi(t,zn);var r=Ht,n=Da;Ht=t,Da=!0;try{(e&lg)!==0?rx(t):D5(t),L5(t);var i=P5(t);t.teardown=typeof i=="function"?i:null,t.wv=O5;var s;Ld&&NN&&(t.f&Os)!==0&&t.deps}finally{Da=n,Ht=r}}}function YN(){try{EN()}catch(t){if(Qd!==null)B5(t,Qd);else throw t}}function V5(){var t=Da;try{var e=0;for(Da=!0;Jd.length>0;){e++>1e3&&YN();var r=Jd,n=r.length;Jd=[];for(var i=0;i<n;i++){var s=XN(r[i]);$N(s)}Gd.clear()}}finally{jd=!1,Da=t,Qd=null}}function $N(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];(n.f&(dg|Us))===0&&Yd(n)&&(q0(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Z5(n):n.fn=null))}}function bg(t){jd||(jd=!0,queueMicrotask(V5));for(var e=Qd=t;e.parent!==null;){e=e.parent;var r=e.f;if((r&(cl|Is))!==0){if((r&zn)===0)return;e.f^=zn}}Jd.push(e)}function XN(t){for(var e=[],r=t;r!==null;){var n=r.f,i=(n&(Is|cl))!==0,s=i&&(n&zn)!==0;if(!s&&(n&Us)===0){(n&c5)!==0?e.push(r):i?r.f^=zn:Yd(r)&&q0(r);var o=r.first;if(o!==null){r=o;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)r=a.next,a=a.parent}return e}function ge(t){for(var e;;){if(wN(),Jd.length===0)return jd=!1,Qd=null,e;jd=!0,V5()}}function C(t){var e=t.f,r=(e&Ti)!==0;if(Gt!==null&&!rs){if(!(Yr!=null&&Yr[1].includes(t))||Yr[0]!==Gt){var n=Gt.deps;t.rv<X0&&(t.rv=X0,Cn===null&&n!==null&&n[Hn]===t?Hn++:Cn===null?Cn=[t]:(!Vo||!Cn.includes(t))&&Cn.push(t))}}else if(r&&t.deps===null&&t.effects===null){var i=t,s=i.parent;s!==null&&(s.f&Zn)===0&&(i.f^=Zn)}return r&&(i=t,Yd(i)&&_5(i)),pl&&Gd.has(t)?Gd.get(t):t.v}function kg(t){return t&&C(t)}function le(t){var e=rs;try{return rs=!0,t()}finally{rs=e}}const KN=-7169;function xi(t,e){t.f=t.f&KN|e}function we(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Oo in t)_g(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&Oo in r&&_g(r)}}}function _g(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{_g(t[n],e)}catch{}const r=cg(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=s5(r);for(let i in n){const s=n[i].get;if(s)try{s.call(t)}catch{}}}}}function F5(t){Ht===null&&Gt===null&&_N(),Gt!==null&&(Gt.f&Zn)!==0&&Ht===null&&kN(),pl&&bN()}function qN(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function ml(t,e,r,n=!0){var i=Ht,s={ctx:or,deps:null,nodes_start:null,nodes_end:null,f:t|Os,first:null,fn:e,last:null,next:null,parent:i,prev:null,teardown:null,transitions:null,wv:0};if(r)try{q0(s),s.f|=l5}catch(c){throw Bi(s),c}else e!==null&&bg(s);var o=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&(u5|ug))===0;if(!o&&n&&(i!==null&&qN(s,i),Gt!==null&&(Gt.f&Ti)!==0)){var a=Gt;(a.effects??(a.effects=[])).push(s)}return s}function Eg(t){const e=ml(H0,null,!1);return xi(e,zn),e.teardown=t,e}function Cg(t){F5();var e=Ht!==null&&(Ht.f&Is)!==0&&or!==null&&!or.m;if(e){var r=or;(r.e??(r.e=[])).push({fn:t,effect:Ht,reaction:Gt})}else{var n=ep(t);return n}}function ex(t){return F5(),tp(t)}function tx(t){const e=ml(cl,t,!0);return(r={})=>new Promise(n=>{r.outro?Fo(e,()=>{Bi(e),n(void 0)}):(Bi(e),n(void 0))})}function ep(t){return ml(c5,t,!1)}function $e(t,e){var r=or,n={effect:null,ran:!1};r.l.r1.push(n),n.effect=tp(()=>{t(),!n.ran&&(n.ran=!0,K(r.l.r2,!0),le(e))})}function ar(){var t=or;tp(()=>{if(C(t.l.r2)){for(var e of t.l.r1){var r=e.effect;(r.f&zn)!==0&&xi(r,Io),Yd(r)&&q0(r),e.ran=!1}t.l.r2.v=!1}})}function tp(t){return ml(H0,t,!0)}function Te(t,e=[],r=hl){const n=e.map(r);return Wa(()=>t(...n.map(C)))}function Wa(t,e=0){return ml(H0|lg|e,t,!0)}function Ps(t,e=!0){return ml(H0|Is,t,!0,e)}function L5(t){var e=t.teardown;if(e!==null){const r=pl,n=Gt;I5(!0),si(null);try{e.call(null)}finally{I5(r),si(n)}}}function D5(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;(r.f&cl)!==0?r.parent=null:Bi(r,e),r=n}}function rx(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&Is)===0&&Bi(e),e=r}}function Bi(t,e=!0){var r=!1;(e||(t.f&mN)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(W5(t.nodes_start,t.nodes_end),r=!0),D5(t,e&&!r),K0(t,0),xi(t,dg);var n=t.transitions;if(n!==null)for(const s of n)s.stop();L5(t);var i=t.parent;i!==null&&i.first!==null&&Z5(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function W5(t,e){for(;t!==null;){var r=t===e?null:ts(t);t.remove(),t=r}}function Z5(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function Fo(t,e){var r=[];Sg(t,r,!0),z5(r,()=>{Bi(t),e&&e()})}function z5(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Sg(t,e,r){if((t.f&Us)===0){if(t.f^=Us,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&Q0)!==0||(n.f&Is)!==0;Sg(n,e,s?r:!1),n=i}}}function $d(t){G5(t,!0)}function G5(t,e){if((t.f&Us)!==0){t.f^=Us;for(var r=t.first;r!==null;){var n=r.next,i=(r.f&Q0)!==0||(r.f&Is)!==0;G5(r,i?e:!1),r=n}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||e)&&s.in()}}function nx(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const ix=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function sx(t){return ix.includes(t)}const ox={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ax(t){return t=t.toLowerCase(),ox[t]??t}const cx=["touchstart","touchmove"];function lx(t){return cx.includes(t)}function ux(t,e){if(e){const r=document.body;t.autofocus=!0,zd(()=>{document.activeElement===r&&t.focus()})}}let H5=!1;function j5(){H5||(H5=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const r of t.target.elements)(e=r.__on_r)==null||e.call(r)})},{capture:!0}))}function Q5(t){var e=Gt,r=Ht;si(null),ns(null);try{return t()}finally{si(e),ns(r)}}function dx(t,e,r,n=r){t.addEventListener(e,()=>Q5(r));const i=t.__on_r;i?t.__on_r=()=>{i(),n(!0)}:t.__on_r=()=>n(!0),j5()}const J5=new Set,Ag=new Set;function Y5(t,e,r,n={}){function i(s){if(n.capture||Xd.call(e,s),!s.cancelBubble)return Q5(()=>r==null?void 0:r.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?zd(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function hn(t,e,r,n,i){var s={capture:n,passive:i},o=Y5(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Eg(()=>{e.removeEventListener(t,o,s)})}function hx(t){for(var e=0;e<t.length;e++)J5.add(t[e]);for(var r of Ag)r(t)}function Xd(t){var _;var e=this,r=e.ownerDocument,n=t.type,i=((_=t.composedPath)==null?void 0:_.call(t))||[],s=i[0]||t.target,o=0,a=t.__root;if(a){var c=i.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=i.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(s=i[o]||t.target,s!==e){ag(t,"currentTarget",{configurable:!0,get(){return s||r}});var u=Gt,d=Ht;si(null),ns(null);try{for(var h,f=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var v=s["__"+n];if(v!=null&&(!s.disabled||t.target===s))if(G0(v)){var[m,...w]=v;m.apply(s,[t,...w])}else v.call(s,t)}catch(S){h?f.push(S):h=S}if(t.cancelBubble||p===e||p===null)break;s=p}if(h){for(let S of f)queueMicrotask(()=>{throw S});throw h}}finally{t.__root=e,delete t.currentTarget,si(u),ns(d)}}}function $5(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function is(t,e){var r=Ht;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function fe(t,e){var r=(e&VN)!==0,n=(e&FN)!==0,i,s=!t.startsWith("<!>");return()=>{if(ut)return is(Ft,null),Ft;i===void 0&&(i=$5(s?t:"<!>"+t),r||(i=Ni(i)));var o=n||R5?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=Ni(o),c=o.lastChild;is(a,c)}else is(o,o);return o}}function _r(t=""){if(!ut){var e=Po(t+"");return is(e,e),e}var r=Ft;return r.nodeType!==3&&(r.before(r=Po()),In(r)),is(r,r),r}function et(){if(ut)return is(Ft,null),Ft;var t=document.createDocumentFragment(),e=document.createComment(""),r=Po();return t.append(e,r),is(e,r),t}function J(t,e){if(ut){Ht.nodes_end=Ft,Ms();return}t!==null&&t.before(e)}function Xe(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function X5(t,e){return K5(t,e)}function fx(t,e){wg(),e.intro=e.intro??!1;const r=e.target,n=ut,i=Ft;try{for(var s=Ni(r);s&&(s.nodeType!==8||s.data!==gg);)s=ts(s);if(!s)throw La;Gn(!0),In(s),Ms();const o=K5(t,{...e,anchor:s});if(Ft===null||Ft.nodeType!==8||Ft.data!==vg)throw Hd(),La;return Gn(!1),o}catch(o){if(o===La)return e.recover===!1&&CN(),wg(),x5(r),Gn(!1),X5(t,e);throw o}finally{Gn(n),In(i)}}const gl=new Map;function K5(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){wg();var a=new Set,c=d=>{for(var h=0;h<d.length;h++){var f=d[h];if(!a.has(f)){a.add(f);var p=lx(f);e.addEventListener(f,Xd,{passive:p});var v=gl.get(f);v===void 0?(document.addEventListener(f,Xd,{passive:p}),gl.set(f,1)):gl.set(f,v+1)}}};c(og(J5)),Ag.add(c);var l=void 0,u=tx(()=>{var d=r??e.appendChild(Po());return Ps(()=>{if(s){Le({});var h=or;h.c=s}i&&(n.$$events=i),ut&&is(d,null),l=t(d,n)||{},ut&&(Ht.nodes_end=Ft),s&&De()}),()=>{var p;for(var h of a){e.removeEventListener(h,Xd);var f=gl.get(h);--f===0?(document.removeEventListener(h,Xd),gl.delete(h)):gl.set(h,f)}Ag.delete(c),d!==r&&((p=d.parentNode)==null||p.removeChild(d))}});return Rg.set(l,u),l}let Rg=new WeakMap;function px(t,e){const r=Rg.get(t);return r?(Rg.delete(t),r(e)):Promise.resolve()}const Tg=0,rp=1,Ng=2;function $r(t,e,r,n,i){ut&&Ms();var s=t,o=ul(),a=or,c=dn,l,u,d,h=o?Uo(void 0):me(void 0,!1,!1),f=o?Uo(void 0):me(void 0,!1,!1),p=!1;function v(w,_){p=!0,_&&(ns(m),si(m),Y0(a));try{w===rp&&n&&(u?$d(u):u=Ps(()=>n(s,h))),w!==Tg&&l&&Fo(l,()=>l=null),w!==rp&&u&&Fo(u,()=>u=null),w!==Ng&&d&&Fo(d,()=>d=null)}finally{_&&(Y0(null),si(null),ns(null),ge())}}var m=Wa(()=>{if(c===(c=e()))return;let w=ut&&a5(c)===(s.data===J0);if(w&&(s=$0(),In(s),Gn(!1),w=!0),a5(c)){var _=c;p=!1,_.then(S=>{_===c&&(fl(h,S),v(rp,!0))},S=>{if(_===c)throw fl(f,S),v(Ng,!0),f.v}),ut||zd(()=>{p||v(Tg,!0)})}else fl(h,c),v(rp,!1);return w&&Gn(!0),()=>c=dn});ut&&(s=Ft)}function Ce(t,e,[r,n]=[0,0]){ut&&r===0&&Ms();var i=t,s=null,o=null,a=dn,c=r>0?Q0:0,l=!1;const u=(h,f=!0)=>{l=!0,d(f,h)},d=(h,f)=>{if(a===(a=h))return;let p=!1;if(ut&&n!==-1){if(r===0){const m=S5(i);m===gg?n=0:m===J0?n=1/0:(n=parseInt(m.substring(1)),n!==n&&(n=a?1/0:-1))}const v=n>r;!!a===v&&(i=$0(),In(i),Gn(!1),p=!0,n=-1)}a?(s?$d(s):f&&(s=Ps(()=>f(i))),o&&Fo(o,()=>{o=null})):(o?$d(o):f&&(o=Ps(()=>f(i,[r+1,n]))),s&&Fo(s,()=>{s=null})),p&&Gn(!0)};Wa(()=>{l=!1,e(u),l||d(null,null)},c),ut&&(i=Ft)}function Za(t,e){return e}function mx(t,e,r,n){for(var i=[],s=e.length,o=0;o<s;o++)Sg(e[o].e,i,!0);var a=s>0&&i.length===0&&r!==null;if(a){var c=r.parentNode;x5(c),c.append(r),n.clear(),Lo(t,e[0].prev,e[s-1].next)}z5(i,()=>{for(var l=0;l<s;l++){var u=e[l];a||(n.delete(u.k),Lo(t,u.prev,u.next)),Bi(u.e,!a)}})}function za(t,e,r,n,i,s=null){var o=t,a={flags:e,items:new Map,first:null},c=(e&g5)!==0;if(c){var l=t;o=ut?In(Ni(l)):l.appendChild(Po())}ut&&Ms();var u=null,d=!1,h=Qe(()=>{var f=r();return G0(f)?f:f==null?[]:og(f)});Wa(()=>{var f=C(h),p=f.length;if(d&&p===0)return;d=p===0;let v=!1;if(ut){var m=S5(o)===J0;m!==(p===0)&&(o=$0(),In(o),Gn(!1),v=!0)}if(ut){for(var w=null,_,S=0;S<p;S++){if(Ft.nodeType===8&&Ft.data===vg){o=Ft,v=!0,Gn(!1);break}var T=f[S],N=n(T,S);_=q5(Ft,a,w,null,T,N,S,i,e,r),a.items.set(N,_),w=_}p>0&&In($0())}ut||gx(f,a,o,i,e,n,r),s!==null&&(p===0?u?$d(u):u=Ps(()=>s(o)):u!==null&&Fo(u,()=>{u=null})),v&&Gn(!0),C(h)}),ut&&(o=Ft)}function gx(t,e,r,n,i,s,o){var $,L,z,X;var a=(i&BN)!==0,c=(i&(pg|mg))!==0,l=t.length,u=e.items,d=e.first,h=d,f,p=null,v,m=[],w=[],_,S,T,N;if(a)for(N=0;N<l;N+=1)_=t[N],S=s(_,N),T=u.get(S),T!==void 0&&(($=T.a)==null||$.measure(),(v??(v=new Set)).add(T));for(N=0;N<l;N+=1){if(_=t[N],S=s(_,N),T=u.get(S),T===void 0){var I=h?h.e.nodes_start:r;p=q5(I,e,p,p===null?e.first:p.next,_,S,N,n,i,o),u.set(S,p),m=[],w=[],h=p.next;continue}if(c&&vx(T,_,N,i),(T.e.f&Us)!==0&&($d(T.e),a&&((L=T.a)==null||L.unfix(),(v??(v=new Set)).delete(T))),T!==h){if(f!==void 0&&f.has(T)){if(m.length<w.length){var O=w[0],U;p=O.prev;var G=m[0],D=m[m.length-1];for(U=0;U<m.length;U+=1)e6(m[U],O,r);for(U=0;U<w.length;U+=1)f.delete(w[U]);Lo(e,G.prev,D.next),Lo(e,p,G),Lo(e,D,O),h=O,p=D,N-=1,m=[],w=[]}else f.delete(T),e6(T,h,r),Lo(e,T.prev,T.next),Lo(e,T,p===null?e.first:p.next),Lo(e,p,T),p=T;continue}for(m=[],w=[];h!==null&&h.k!==S;)(h.e.f&Us)===0&&(f??(f=new Set)).add(h),w.push(h),h=h.next;if(h===null)continue;T=h}m.push(T),p=T,h=T.next}if(h!==null||f!==void 0){for(var M=f===void 0?[]:og(f);h!==null;)(h.e.f&Us)===0&&M.push(h),h=h.next;var Z=M.length;if(Z>0){var j=(i&g5)!==0&&l===0?r:null;if(a){for(N=0;N<Z;N+=1)(z=M[N].a)==null||z.measure();for(N=0;N<Z;N+=1)(X=M[N].a)==null||X.fix()}mx(e,M,j,u)}}a&&zd(()=>{var te;if(v!==void 0)for(T of v)(te=T.a)==null||te.apply()}),Ht.first=e.first&&e.first.e,Ht.last=p&&p.e}function vx(t,e,r,n){(n&pg)!==0&&fl(t.v,e),(n&mg)!==0?fl(t.i,r):t.i=r}function q5(t,e,r,n,i,s,o,a,c,l){var u=(c&pg)!==0,d=(c&IN)===0,h=u?d?me(i,!1,!1):Uo(i):i,f=(c&mg)===0?o:Uo(o),p={i:f,v:h,k:s,a:null,e:null,prev:r,next:n};try{return p.e=Ps(()=>a(t,h,f,l),ut),p.e.prev=r&&r.e,p.e.next=n&&n.e,r===null?e.first=p:(r.next=p,r.e.next=p.e),n!==null&&(n.prev=p,n.e.prev=p.e),p}finally{}}function e6(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,s=t.e.nodes_start;s!==n;){var o=ts(s);i.before(s),s=o}}function Lo(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function xg(t,e,r=!1,n=!1,i=!1){var s=t,o="";Te(()=>{var a=Ht;if(o===(o=e()??"")){ut&&Ms();return}if(a.nodes_start!==null&&(W5(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),o!==""){if(ut){Ft.data;for(var c=Ms(),l=c;c!==null&&(c.nodeType!==8||c.data!=="");)l=c,c=ts(c);if(c===null)throw Hd(),La;is(Ft,l),s=In(c);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=$5(u);if((r||n)&&(d=Ni(d)),is(Ni(d),d.lastChild),r||n)for(;Ni(d);)s.before(Ni(d));else s.before(d)}})}function Ii(t,e,r,n,i){var a;ut&&Ms();var s=(a=e.$$slots)==null?void 0:a[r],o=!1;s===!0&&(s=e[r==="default"?"children":r],o=!0),s===void 0||s(t,o?()=>n:n)}function Xr(t,e,r){ut&&Ms();var n=t,i,s;Wa(()=>{i!==(i=e())&&(s&&(Fo(s),s=null),i&&(s=Ps(()=>r(n,i))))},Q0),ut&&(n=Ft)}function Do(t,e){zd(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}function yx(t,e){var r=void 0,n;Wa(()=>{r!==(r=e())&&(n&&(Bi(n),n=null),r&&(n=Ps(()=>{ep(()=>r(t))})))})}function t6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=t6(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function wx(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=t6(t))&&(n&&(n+=" "),n+=e);return n}function bx(t){return typeof t=="object"?wx(t):t??""}const r6=[...`
|
|
3
3
|
\r\f \v\uFEFF`];function kx(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+s;(o===0||r6.includes(n[o-1]))&&(a===n.length||r6.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function n6(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Bg(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function _x(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,o=0,a=!1,c=[];n&&c.push(...Object.keys(n).map(Bg)),i&&c.push(...Object.keys(i).map(Bg));var l=0,u=-1;const v=t.length;for(var d=0;d<v;d++){var h=t[d];if(a?h==="/"&&t[d-1]==="*"&&(a=!1):s?s===h&&(s=!1):h==="/"&&t[d+1]==="*"?a=!0:h==='"'||h==="'"?s=h:h==="("?o++:h===")"&&o--,!a&&s===!1&&o===0){if(h===":"&&u===-1)u=d;else if(h===";"||d===v-1){if(u!==-1){var f=Bg(t.substring(l,u).trim());if(!c.includes(f)){h!==";"&&d++;var p=t.substring(l,d).trim();r+=" "+p+";"}}l=d+1,u=-1}}}}return n&&(r+=n6(n)),i&&(r+=n6(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Pr(t,e,r,n,i,s){var o=t.__className;if(ut||o!==r||o===void 0){var a=kx(r,n,s);(!ut||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(s&&i!==s)for(var c in s){var l=!!s[c];(i==null||l!==!!i[c])&&t.classList.toggle(c,l)}return s}function Ig(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function Oi(t,e,r,n){var i=t.__style;if(ut||i!==e){var s=_x(e,n);(!ut||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t.__style=e}else n&&(Array.isArray(n)?(Ig(t,r==null?void 0:r[0],n[0]),Ig(t,r==null?void 0:r[1],n[1],"important")):Ig(t,r,n));return n}function Og(t,e,r){if(t.multiple){if(e==null)return;if(!G0(e))return GN();for(var n of t.options)n.selected=e.includes(i6(n));return}for(n of t.options){var i=i6(n);if(WN(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Ex(t,e){let r=!0;ep(()=>{e&&Og(t,le(e),r),r=!1;var n=new MutationObserver(()=>{var i=t.__value;Og(t,i)});return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function i6(t){return"__value"in t?t.__value:t.value}const vl=Symbol("class"),Kd=Symbol("style"),s6=Symbol("is custom element"),o6=Symbol("is html");function Ug(t){if(ut){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;at(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;at(t,"checked",null),t.checked=i}}};t.__on_r=r,yN(r),j5()}}function Mg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function at(t,e,r,n){var i=c6(t);ut&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=r)&&(e==="loading"&&(t[gN]=r),r==null?t.removeAttribute(e):typeof r!="string"&&u6(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Cx(t,e,r,n,i=!1){var s=c6(t),o=s[s6],a=!s[o6];let c=ut&&o;c&&Gn(!1);var l=e||{},u=t.tagName==="OPTION";for(var d in e)d in r||(r[d]=null);r.class?r.class=bx(r.class):(n||r[vl])&&(r.class=null),r[Kd]&&(r.style??(r.style=null));var h=u6(t);for(const S in r){let T=r[S];if(u&&S==="value"&&T==null){t.value=t.__value="",l[S]=T;continue}if(S==="class"){var f=t.namespaceURI==="http://www.w3.org/1999/xhtml";Pr(t,f,T,n,e==null?void 0:e[vl],r[vl]),l[S]=T,l[vl]=r[vl];continue}if(S==="style"){Oi(t,T,e==null?void 0:e[Kd],r[Kd]),l[S]=T,l[Kd]=r[Kd];continue}var p=l[S];if(!(T===p&&!(T===void 0&&t.hasAttribute(S)))){l[S]=T;var v=S[0]+S[1];if(v!=="$$")if(v==="on"){const N={},I="$$"+S;let O=S.slice(2);var m=sx(O);if(nx(O)&&(O=O.slice(0,-7),N.capture=!0),!m&&p){if(T!=null)continue;t.removeEventListener(O,l[I],N),l[I]=null}if(T!=null)if(m)t[`__${O}`]=T,hx([O]);else{let U=function(G){l[S].call(this,G)};l[I]=Y5(O,t,U,N)}else m&&(t[`__${O}`]=void 0)}else if(S==="style")at(t,S,T);else if(S==="autofocus")ux(t,!!T);else if(!o&&(S==="__value"||S==="value"&&T!=null))t.value=t.__value=T;else if(S==="selected"&&u)Mg(t,T);else{var w=S;a||(w=ax(w));var _=w==="defaultValue"||w==="defaultChecked";if(T==null&&!o&&!_)if(s[S]=null,w==="value"||w==="checked"){let N=t;const I=e===void 0;if(w==="value"){let O=N.defaultValue;N.removeAttribute(w),N.defaultValue=O,N.value=N.__value=I?O:null}else{let O=N.defaultChecked;N.removeAttribute(w),N.defaultChecked=O,N.checked=I?O:!1}}else t.removeAttribute(S);else _||h.includes(w)&&(o||typeof T!="string")?t[w]=T:typeof T!="function"&&at(t,w,T)}}}return c&&Gn(!0),l}function a6(t,e,r=[],n,i=!1,s=hl){const o=r.map(s);var a=void 0,c={},l=t.nodeName==="SELECT",u=!1;Wa(()=>{var d=e(...o.map(C)),h=Cx(t,a,d,n,i);u&&l&&"value"in d&&Og(t,d.value,!1);for(let p of Object.getOwnPropertySymbols(c))d[p]||Bi(c[p]);for(let p of Object.getOwnPropertySymbols(d)){var f=d[p];p.description===DN&&(!a||f!==a[p])&&(c[p]&&Bi(c[p]),c[p]=Ps(()=>yx(t,()=>f))),h[p]=f}a=h}),l&&Ex(t,()=>a.value),u=!0}function c6(t){return t.__attributes??(t.__attributes={[s6]:t.nodeName.includes("-"),[o6]:t.namespaceURI===LN})}var l6=new Map;function u6(t){var e=l6.get(t.nodeName);if(e)return e;l6.set(t.nodeName,e=[]);for(var r,n=t,i=Element.prototype;i!==n;){r=s5(n);for(var s in r)r[s].set&&e.push(s);n=cg(n)}return e}function Pg(t,e,r=e){var n=ul();dx(t,"input",i=>{var s=i?t.defaultValue:t.value;if(s=Vg(t)?Fg(s):s,r(s),n&&s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd;t.value=s??"",a!==null&&(t.selectionStart=o,t.selectionEnd=Math.min(a,t.value.length))}}),(ut&&t.defaultValue!==t.value||le(e)==null&&t.value)&&r(Vg(t)?Fg(t.value):t.value),tp(()=>{var i=e();Vg(t)&&i===Fg(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Vg(t){var e=t.type;return e==="number"||e==="range"}function Fg(t){return t===""?null:+t}function Lg(t){return function(...e){var r=e[0];return r.preventDefault(),t==null?void 0:t.apply(this,e)}}function it(t=!1){const e=or,r=e.l.u;if(!r)return;let n=()=>we(e.s);if(t){let i=0,s={};const o=hl(()=>{let a=!1;const c=e.s;for(const l in c)c[l]!==s[l]&&(s[l]=c[l],a=!0);return a&&i++,i});n=()=>C(o)}r.b.length&&ex(()=>{d6(e,n),Dd(r.b)}),Cg(()=>{const i=le(()=>r.m.map(hN));return()=>{for(const s of i)typeof s=="function"&&s()}}),r.a.length&&Cg(()=>{d6(e,n),Dd(r.a)})}function d6(t,e){if(t.l.s)for(const r of t.l.s)C(r);e()}function Ze(t,e,r){var n;t.$$events||(t.$$events={}),(n=t.$$events)[e]||(n[e]=[]),t.$$events[e].push(r)}function ze(t){for(var e in t)e in this&&(this[e]=t[e])}let np=!1,Dg=Symbol();function dt(t,e,r){const n=r[e]??(r[e]={store:null,source:me(void 0),unsubscribe:Bo});if(n.store!==t&&!(Dg in r))if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=Bo;else{var i=!0;n.unsubscribe=Wg(t,s=>{i?n.source.v=s:K(n.source,s)}),i=!1}return t&&Dg in r?ke(t):C(n.source)}function tn(){const t={};function e(){Eg(()=>{for(var r in t)t[r].unsubscribe();ag(t,Dg,{enumerable:!1,value:!0})})}return[t,e]}function Sx(t,e,r){return t.set(r),e}function Ax(t){var e=np;try{return np=!1,[t(),np]}finally{np=e}}const Rx={get(t,e){if(!t.exclude.includes(e))return C(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,r){return e in t.special||(t.special[e]=ye({get[e](){return t.props[e]}},e,v5)),t.special[e](r),E5(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),E5(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function qd(t,e){return new Proxy({props:t,exclude:e,special:{},version:Uo(0)},Rx)}function h6(t){var e;return((e=t.ctx)==null?void 0:e.d)??!1}function ye(t,e,r,n){var I;var i=(r&ON)!==0,s=!ll||(r&UN)!==0,o=(r&MN)!==0,a=(r&PN)!==0,c=!1,l;o?[l,c]=Ax(()=>t[e]):l=t[e];var u=Oo in t||d5 in t,d=o&&(((I=al(t,e))==null?void 0:I.set)??(u&&e in t&&(O=>t[e]=O)))||void 0,h=n,f=!0,p=!1,v=()=>(p=!0,f&&(f=!1,a?h=le(n):h=n),h);l===void 0&&n!==void 0&&(d&&s&&SN(),l=v(),d&&d(l));var m;if(s)m=()=>{var O=t[e];return O===void 0?v():(f=!0,p=!1,O)};else{var w=(i?hl:Qe)(()=>t[e]);w.f|=pN,m=()=>{var O=C(w);return O!==void 0&&(h=void 0),O===void 0?h:O}}if((r&v5)===0&&s)return m;if(d){var _=t.$$legacy;return function(O,U){return arguments.length>0?((!s||!U||_||c)&&d(U?m():O),O):m()}}var S=!1,T=me(l),N=hl(()=>{var O=m(),U=C(T);return S?(S=!1,U):T.v=O});return o&&C(N),i||(N.equals=fg),function(O,U){if(arguments.length>0){const G=U?C(N):s&&o?dl(O):O;if(!N.equals(G)){if(S=!0,K(T,G),p&&h!==void 0&&(h=G),h6(N))return O;le(()=>C(N))}return O}return h6(N)?N.v:C(N)}}function Ge(t){return new Tx(t)}class Tx{constructor(e){e5(this,To);e5(this,Ri);var s;var r=new Map,n=(o,a)=>{var c=me(a,!1,!1);return r.set(o,c),c};const i=new Proxy({...e.props||{},$$events:{}},{get(o,a){return C(r.get(a)??n(a,Reflect.get(o,a)))},has(o,a){return a===d5?!0:(C(r.get(a)??n(a,Reflect.get(o,a))),Reflect.has(o,a))},set(o,a,c){return K(r.get(a)??n(a,c),c),Reflect.set(o,a,c)}});t5(this,Ri,(e.hydrate?fx:X5)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&ge(),t5(this,To,i.$$events);for(const o of Object.keys(Wn(this,Ri)))o==="$set"||o==="$destroy"||o==="$on"||ag(this,o,{get(){return Wn(this,Ri)[o]},set(a){Wn(this,Ri)[o]=a},enumerable:!0});Wn(this,Ri).$set=o=>{Object.assign(i,o)},Wn(this,Ri).$destroy=()=>{px(Wn(this,Ri))}}$set(e){Wn(this,Ri).$set(e)}$on(e,r){Wn(this,To)[e]=Wn(this,To)[e]||[];const n=(...i)=>r.call(this,...i);return Wn(this,To)[e].push(n),()=>{Wn(this,To)[e]=Wn(this,To)[e].filter(i=>i!==n)}}$destroy(){Wn(this,Ri).$destroy()}}To=new WeakMap,Ri=new WeakMap;function yl(t){or===null&&y5(),ll&&or.l!==null?Nx(or).m.push(t):Cg(()=>{const e=le(t);if(typeof e=="function")return e})}function wl(t){or===null&&y5(),yl(()=>()=>le(t))}function Nx(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}function Wg(t,e,r){if(t==null)return e(void 0),r&&r(void 0),Bo;const n=le(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const bl=[];function xx(t,e){return{subscribe:fn(t,e).subscribe}}function fn(t,e=Bo){let r=null;const n=new Set;function i(a){if(m5(t,a)&&(t=a,r)){const c=!bl.length;for(const l of n)l[1](),bl.push(l,t);if(c){for(let l=0;l<bl.length;l+=2)bl[l][0](bl[l+1]);bl.length=0}}}function s(a){i(a(t))}function o(a,c=Bo){const l=[a,c];return n.add(l),n.size===1&&(r=e(i,s)||Bo),a(t),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:o}}function Zg(t,e,r){const n=!Array.isArray(t),i=n?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return xx(r,(o,a)=>{let c=!1;const l=[];let u=0,d=Bo;const h=()=>{if(u)return;d();const p=e(n?l[0]:l,o,a);s?o(p):d=typeof p=="function"?p:Bo},f=i.map((p,v)=>Wg(p,m=>{l[v]=m,u&=~(1<<v),c&&h()},()=>{u|=1<<v}));return c=!0,h(),function(){Dd(f),d(),c=!1}})}function ke(t){let e;return Wg(t,r=>e=r)(),e}var Bx=Object.defineProperty,f6=t=>{throw TypeError(t)},Ix=(t,e,r)=>e in t?Bx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H=(t,e,r)=>Ix(t,typeof e!="symbol"?e+"":e,r),zg=(t,e,r)=>e.has(t)||f6("Cannot "+r),A=(t,e,r)=>(zg(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>e.has(t)?f6("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),P=(t,e,r,n)=>(zg(t,e,"write to private field"),e.set(t,r),r),pe=(t,e,r)=>(zg(t,e,"access private method"),r),eh=(t,e,r,n)=>({set _(i){P(t,e,i)},get _(){return A(t,e,n)}});const ip="6.13.4";function Ox(t,e,r){const n=e.split("|").map(s=>s.trim());for(let s=0;s<n.length;s++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=t,i}async function zr(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,n,i)=>(r[e[i]]=n,r),{})}function Ue(t,e,r){for(let n in e){let i=e[n];const s=r?r[n]:null;s&&Ox(i,s,n),Object.defineProperty(t,n,{enumerable:!0,value:i,writable:!1})}}function kl(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(kl).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return kl(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${kl(r)}: ${kl(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Tr(t,e){return t&&t.code===e}function th(t){return Tr(t,"CALL_EXCEPTION")}function cr(t,e,r){let n=t;{const s=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${kl(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];s.push(o+"="+kl(a))}}s.push(`code=${e}`),s.push(`version=${ip}`),s.length&&(t+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(t);break;default:i=new Error(t)}return Ue(i,{code:e}),r&&Object.assign(i,r),i.shortMessage==null&&Ue(i,{shortMessage:n}),i}function ae(t,e,r,n){if(!t)throw cr(e,r,n)}function F(t,e,r,n){ae(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function sp(t,e,r){r==null&&(r=""),r&&(r=": "+r),ae(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),ae(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Ux=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function op(t){ae(Ux.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function ss(t,e,r){if(r==null&&(r=""),t!==e){let n=r,i="new";r&&(n+=".",i+=" "+r),ae(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function p6(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let i=2;for(let s=0;s<n.length;s++)n[s]=parseInt(t.substring(i,i+2),16),i+=2;return n}F(!1,"invalid BytesLike value",e||"value",t)}function xe(t,e){return p6(t,e,!1)}function Gr(t,e){return p6(t,e,!0)}function er(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function _l(t){return er(t,!0)||t instanceof Uint8Array}const m6="0123456789abcdef";function Ee(t){const e=xe(t);let r="0x";for(let n=0;n<e.length;n++){const i=e[n];r+=m6[(i&240)>>4]+m6[i&15]}return r}function At(t){return"0x"+t.map(e=>Ee(e).substring(2)).join("")}function Vs(t){return er(t,!0)?(t.length-2)/2:xe(t).length}function tr(t,e,r){const n=xe(t);return r!=null&&r>n.length&&ae(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),Ee(n.slice(e??0,r??n.length))}function g6(t){let e=Ee(t).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function v6(t,e,r){const n=xe(t);ae(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const i=new Uint8Array(e);return i.fill(0),r?i.set(n,e-n.length):i.set(n,0),Ee(i)}function ai(t,e){return v6(t,e,!0)}function rh(t,e){return v6(t,e,!1)}const ap=BigInt(0),Ui=BigInt(1),Gg=9007199254740991;function El(t,e){const r=Cl(t,"value"),n=BigInt(qe(e,"width"));if(ae(r>>n===ap,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ui){const i=(Ui<<n)-Ui;return-((~r&i)+Ui)}return r}function nh(t,e){let r=We(t,"value");const n=BigInt(qe(e,"width")),i=Ui<<n-Ui;if(r<ap){r=-r,ae(r<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const s=(Ui<<n)-Ui;return(~r&s)+Ui}else ae(r<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function Fs(t,e){const r=Cl(t,"value"),n=BigInt(qe(e,"bits"));return r&(Ui<<n)-Ui}function We(t,e){switch(typeof t){case"bigint":return t;case"number":return F(Number.isInteger(t),"underflow",e||"value",t),F(t>=-9007199254740991&&t<=Gg,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){F(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}F(!1,"invalid BigNumberish value",e||"value",t)}function Cl(t,e){const r=We(t,e);return ae(r>=ap,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const y6="0123456789abcdef";function Ga(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=y6[r>>4],e+=y6[r&15];return BigInt(e)}return We(t)}function qe(t,e){switch(typeof t){case"bigint":return F(t>=-9007199254740991&&t<=Gg,"overflow",e||"value",t),Number(t);case"number":return F(Number.isInteger(t),"underflow",e||"value",t),F(t>=-9007199254740991&&t<=Gg,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return qe(BigInt(t),e)}catch(r){F(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}F(!1,"invalid numeric value",e||"value",t)}function ih(t){return qe(Ga(t))}function ci(t,e){let r=Cl(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const n=qe(e,"width");for(ae(n*2>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length<n*2;)r="0"+r}return"0x"+r}function Hr(t){const e=Cl(t,"value");if(e===ap)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let i=0;i<n.length;i++){const s=i*2;n[i]=parseInt(r.substring(s,s+2),16)}return n}function Ls(t){let e=Ee(_l(t)?t:Hr(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const cp="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let lp=null;function Mx(t){if(lp==null){lp={};for(let r=0;r<cp.length;r++)lp[cp[r]]=BigInt(r)}const e=lp[t];return F(e!=null,"invalid base58 value","letter",t),e}const Px=BigInt(0),Hg=BigInt(58);function up(t){const e=xe(t);let r=Ga(e),n="";for(;r;)n=cp[Number(r%Hg)]+n,r/=Hg;for(let i=0;i<e.length&&!e[i];i++)n=cp[0]+n;return n}function jg(t){let e=Px;for(let r=0;r<t.length;r++)e*=Hg,e+=Mx(t[r]);return e}function Qg(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return xe(e)}function Jg(t){const e=xe(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var sh;class dp{constructor(e,r,n){H(this,"filter"),H(this,"emitter"),q(this,sh),P(this,sh,r),Ue(this,{emitter:e,filter:n})}async removeListener(){A(this,sh)!=null&&await this.emitter.off(this.filter,A(this,sh))}}sh=new WeakMap;function Vx(t,e,r,n,i){F(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function w6(t,e,r,n,i){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let s=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)s++;return s}return t==="OVERRUN"?r.length-e-1:0}function Fx(t,e,r,n,i){return t==="OVERLONG"?(F(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),w6(t,e,r))}const Yg=Object.freeze({error:Vx,ignore:w6,replace:Fx});function b6(t,e){e==null&&(e=Yg.error);const r=xe(t,"bytes"),n=[];let i=0;for(;i<r.length;){const s=r[i++];if(!(s>>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,r,n):i+=e("BAD_PREFIX",i-1,r,n);continue}if(i-1+o>=r.length){i+=e("OVERRUN",i-1,r,n);continue}let c=s&(1<<8-o-1)-1;for(let l=0;l<o;l++){let u=r[i];if((u&192)!=128){i+=e("MISSING_CONTINUE",i,r,n),c=null;break}c=c<<6|u&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-o,r,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,r,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,r,n,c);continue}n.push(c)}}return n}function Vr(t,e){F(typeof t=="string","invalid string value","str",t),e!=null&&(op(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);F(n<t.length&&(s&64512)===56320,"invalid surrogate pair","str",t);const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return new Uint8Array(r)}function Lx(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ds(t,e){return Lx(b6(t,e))}function k6(t,e){return b6(Vr(t,e))}function _6(t){async function e(r,n){ae(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const i=r.url.split(":")[0].toLowerCase();ae(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ae(i==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=null;const o=new AbortController,a=setTimeout(()=>{s=cr("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{s=cr("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(f){throw clearTimeout(a),s||f}clearTimeout(a);const u={};l.headers.forEach((f,p)=>{u[p.toLowerCase()]=f});const d=await l.arrayBuffer(),h=d==null?null:new Uint8Array(d);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:h}}return e}const Dx=12,Wx=250;let E6=_6();const Zx=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),zx=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let $g=!1;async function C6(t,e){try{const r=t.match(Zx);if(!r)throw new Error("invalid data");return new zo(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?Qg(r[3]):jx(r[3]))}catch{return new zo(599,"BAD REQUEST (invalid data: URI)",{},null,new pn(t))}}function S6(t){async function e(r,n){try{const i=r.match(zx);if(!i)throw new Error("invalid link");return new pn(`${t}${i[2]}`)}catch{return new zo(599,"BAD REQUEST (invalid IPFS URI)",{},null,new pn(r))}}return e}const hp={data:C6,ipfs:S6("https://gateway.ipfs.io/ipfs/")},A6=new WeakMap;var Sl,Ha;class Xg{constructor(e){q(this,Sl),q(this,Ha),P(this,Sl,[]),P(this,Ha,!1),A6.set(e,()=>{if(!A(this,Ha)){P(this,Ha,!0);for(const r of A(this,Sl))setTimeout(()=>{r()},0);P(this,Sl,[])}})}addListener(e){ae(!A(this,Ha),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),A(this,Sl).push(e)}get cancelled(){return A(this,Ha)}checkSignal(){ae(!this.cancelled,"cancelled","CANCELLED",{})}}Sl=new WeakMap,Ha=new WeakMap;function fp(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var oh,ah,os,Wo,ch,lh,rn,li,Zo,Al,Rl,Tl,Ws,as,ja,Nl,uh;const Gx=class r5{constructor(e){q(this,Nl),q(this,oh),q(this,ah),q(this,os),q(this,Wo),q(this,ch),q(this,lh),q(this,rn),q(this,li),q(this,Zo),q(this,Al),q(this,Rl),q(this,Tl),q(this,Ws),q(this,as),q(this,ja),P(this,lh,String(e)),P(this,oh,!1),P(this,ah,!0),P(this,os,{}),P(this,Wo,""),P(this,ch,3e5),P(this,as,{slotInterval:Wx,maxAttempts:Dx}),P(this,ja,null)}get url(){return A(this,lh)}set url(e){P(this,lh,String(e))}get body(){return A(this,rn)==null?null:new Uint8Array(A(this,rn))}set body(e){if(e==null)P(this,rn,void 0),P(this,li,void 0);else if(typeof e=="string")P(this,rn,Vr(e)),P(this,li,"text/plain");else if(e instanceof Uint8Array)P(this,rn,e),P(this,li,"application/octet-stream");else if(typeof e=="object")P(this,rn,Vr(JSON.stringify(e))),P(this,li,"application/json");else throw new Error("invalid body")}hasBody(){return A(this,rn)!=null}get method(){return A(this,Wo)?A(this,Wo):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),P(this,Wo,String(e).toUpperCase())}get headers(){const e=Object.assign({},A(this,os));return A(this,Zo)&&(e.authorization=`Basic ${Jg(Vr(A(this,Zo)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&A(this,li)&&(e["content-type"]=A(this,li)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){A(this,os)[String(e).toLowerCase()]=String(r)}clearHeaders(){P(this,os,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return A(this,Zo)||null}setCredentials(e,r){F(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),P(this,Zo,`${e}:${r}`)}get allowGzip(){return A(this,ah)}set allowGzip(e){P(this,ah,!!e)}get allowInsecureAuthentication(){return!!A(this,oh)}set allowInsecureAuthentication(e){P(this,oh,!!e)}get timeout(){return A(this,ch)}set timeout(e){F(e>=0,"timeout must be non-zero","timeout",e),P(this,ch,e)}get preflightFunc(){return A(this,Al)||null}set preflightFunc(e){P(this,Al,e)}get processFunc(){return A(this,Rl)||null}set processFunc(e){P(this,Rl,e)}get retryFunc(){return A(this,Tl)||null}set retryFunc(e){P(this,Tl,e)}get getUrlFunc(){return A(this,ja)||E6}set getUrlFunc(e){P(this,ja,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${A(this,rn)?Ee(A(this,rn)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(A(this,as).slotInterval=e.slotInterval),e.maxAttempts!=null&&(A(this,as).maxAttempts=e.maxAttempts)}send(){return ae(A(this,Ws)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),P(this,Ws,new Xg(this)),pe(this,Nl,uh).call(this,0,R6()+this.timeout,0,this,new zo(0,"",{},null,this))}cancel(){ae(A(this,Ws)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=A6.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();ae(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const i=new r5(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,P(i,os,Object.assign({},A(this,os))),A(this,rn)&&P(i,rn,new Uint8Array(A(this,rn))),P(i,li,A(this,li)),i}clone(){const e=new r5(this.url);return P(e,Wo,A(this,Wo)),A(this,rn)&&P(e,rn,A(this,rn)),P(e,li,A(this,li)),P(e,os,Object.assign({},A(this,os))),P(e,Zo,A(this,Zo)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),P(e,Al,A(this,Al)),P(e,Rl,A(this,Rl)),P(e,Tl,A(this,Tl)),P(e,as,Object.assign({},A(this,as))),P(e,ja,A(this,ja)),e}static lockConfig(){$g=!0}static getGateway(e){return hp[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if($g)throw new Error("gateways locked");hp[e]=r}static registerGetUrl(e){if($g)throw new Error("gateways locked");E6=e}static createGetUrlFunc(e){return _6()}static createDataGateway(){return C6}static createIpfsGatewayFunc(e){return S6(e)}};oh=new WeakMap,ah=new WeakMap,os=new WeakMap,Wo=new WeakMap,ch=new WeakMap,lh=new WeakMap,rn=new WeakMap,li=new WeakMap,Zo=new WeakMap,Al=new WeakMap,Rl=new WeakMap,Tl=new WeakMap,Ws=new WeakMap,as=new WeakMap,ja=new WeakMap,Nl=new WeakSet,uh=async function(t,e,r,n,i){var s,o,a;if(t>=A(this,as).maxAttempts)return i.makeServerError("exceeded maximum retry limit");ae(R6()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await Qx(r);let c=this.clone();const l=(c.url.split(":")[0]||"").toLowerCase();if(l in hp){const h=await hp[l](c.url,fp(A(n,Ws)));if(h instanceof zo){let f=h;if(this.processFunc){fp(A(n,Ws));try{f=await this.processFunc(c,f)}catch(p){(p.throttle==null||typeof p.stall!="number")&&f.makeServerError("error in post-processing function",p).assertOk()}}return f}c=h}this.preflightFunc&&(c=await this.preflightFunc(c));const u=await this.getUrlFunc(c,fp(A(n,Ws)));let d=new zo(u.statusCode,u.statusMessage,u.headers,u.body,n);if(d.statusCode===301||d.statusCode===302){try{const h=d.headers.location||"";return pe(s=c.redirect(h),Nl,uh).call(s,t+1,e,0,n,d)}catch{}return d}else if(d.statusCode===429&&(this.retryFunc==null||await this.retryFunc(c,d,t))){const h=d.headers["retry-after"];let f=A(this,as).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(f=parseInt(h)),pe(o=c.clone(),Nl,uh).call(o,t+1,e,f,n,d)}if(this.processFunc){fp(A(n,Ws));try{d=await this.processFunc(c,d)}catch(h){(h.throttle==null||typeof h.stall!="number")&&d.makeServerError("error in post-processing function",h).assertOk();let f=A(this,as).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return h.stall>=0&&(f=h.stall),pe(a=c.clone(),Nl,uh).call(a,t+1,e,f,n,d)}}return d};let pn=Gx;var pp,mp,gp,ui,dh,xl;const Hx=class tN{constructor(e,r,n,i,s){q(this,pp),q(this,mp),q(this,gp),q(this,ui),q(this,dh),q(this,xl),P(this,pp,e),P(this,mp,r),P(this,gp,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),P(this,ui,i==null?null:new Uint8Array(i)),P(this,dh,s||null),P(this,xl,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${A(this,ui)?Ee(A(this,ui)):"null"}>`}get statusCode(){return A(this,pp)}get statusMessage(){return A(this,mp)}get headers(){return Object.assign({},A(this,gp))}get body(){return A(this,ui)==null?null:new Uint8Array(A(this,ui))}get bodyText(){try{return A(this,ui)==null?"":Ds(A(this,ui))}catch{ae(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ae(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const i=r[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);const i=new tN(599,n,this.headers,this.body,A(this,dh)||void 0);return P(i,xl,{message:e,error:r}),i}throwThrottleError(e,r){r==null?r=-1:F(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw Ue(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return A(this,ui)!=null}get request(){return A(this,dh)}ok(){return A(this,xl).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=A(this,xl);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{A(this,ui)&&(i=Ds(A(this,ui)))}catch{}ae(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};pp=new WeakMap,mp=new WeakMap,gp=new WeakMap,ui=new WeakMap,dh=new WeakMap,xl=new WeakMap;let zo=Hx;function R6(){return new Date().getTime()}function jx(t){return Vr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function Qx(t){return new Promise(e=>setTimeout(e,t))}const Jx=BigInt(-1),Mi=BigInt(0),Bl=BigInt(1),Yx=BigInt(5),Il={};let Ol="0000";for(;Ol.length<80;)Ol+=Ol;function Qa(t){let e=Ol;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function hh(t,e,r){const n=BigInt(e.width);if(e.signed){const i=Bl<<n-Bl;ae(r==null||t>=-i&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>Mi?t=El(Fs(t,n),n):t=-El(Fs(-t,n),n)}else{const i=Bl<<n;ae(r==null||t>=0&&t<i,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%i+i)%i&i-Bl}return t}function Kg(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const s=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);F(s,"invalid fixed format","format",t),e=s[1]!=="u",r=parseInt(s[2]),n=parseInt(s[3])}}else if(t){const s=t,o=(a,c,l)=>s[a]==null?l:(F(typeof s[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,s[a]),s[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}F(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),F(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const i=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:i}}function $x(t,e){let r="";t<Mi&&(r="-",t*=Jx);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=Ol+n;const i=n.length-e;for(n=n.substring(0,i)+"."+n.substring(i);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var cs,ir,Un,mr,Ja,Zs,qg,ev,tv,rv;const T6=class Ud{constructor(e,r,n){q(this,mr),H(this,"format"),q(this,cs),q(this,ir),q(this,Un),H(this,"_value"),ss(e,Il,"FixedNumber"),P(this,ir,r),P(this,cs,n);const i=$x(r,n.decimals);Ue(this,{format:n.name,_value:i}),P(this,Un,Qa(n.decimals))}get signed(){return A(this,cs).signed}get width(){return A(this,cs).width}get decimals(){return A(this,cs).decimals}get value(){return A(this,ir)}addUnsafe(e){return pe(this,mr,qg).call(this,e)}add(e){return pe(this,mr,qg).call(this,e,"add")}subUnsafe(e){return pe(this,mr,ev).call(this,e)}sub(e){return pe(this,mr,ev).call(this,e,"sub")}mulUnsafe(e){return pe(this,mr,tv).call(this,e)}mul(e){return pe(this,mr,tv).call(this,e,"mul")}mulSignal(e){pe(this,mr,Ja).call(this,e);const r=A(this,ir)*A(e,ir);return ae(r%A(this,Un)===Mi,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),pe(this,mr,Zs).call(this,r/A(this,Un),"mulSignal")}divUnsafe(e){return pe(this,mr,rv).call(this,e)}div(e){return pe(this,mr,rv).call(this,e,"div")}divSignal(e){ae(A(e,ir)!==Mi,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),pe(this,mr,Ja).call(this,e);const r=A(this,ir)*A(this,Un);return ae(r%A(e,ir)===Mi,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),pe(this,mr,Zs).call(this,r/A(e,ir),"divSignal")}cmp(e){let r=this.value,n=e.value;const i=this.decimals-e.decimals;return i>0?n*=Qa(i):i<0&&(r*=Qa(-i)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=A(this,ir);return A(this,ir)<Mi&&(e-=A(this,Un)-Bl),e=A(this,ir)/A(this,Un)*A(this,Un),pe(this,mr,Zs).call(this,e,"floor")}ceiling(){let e=A(this,ir);return A(this,ir)>Mi&&(e+=A(this,Un)-Bl),e=A(this,ir)/A(this,Un)*A(this,Un),pe(this,mr,Zs).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=Yx*Qa(r-1);let i=this.value+n;const s=Qa(r);return i=i/s*s,hh(i,A(this,cs),"round"),new Ud(Il,i,A(this,cs))}isZero(){return A(this,ir)===Mi}isNegative(){return A(this,ir)<Mi}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ud.fromString(this.toString(),e)}static fromValue(e,r,n){const i=r==null?0:qe(r),s=Kg(n);let o=We(e,"value");const a=i-s.decimals;if(a>0){const c=Qa(a);ae(o%c===Mi,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Qa(-a));return hh(o,s,"fromValue"),new Ud(Il,o,s)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);F(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const i=Kg(r);let s=n[2]||"0",o=n[3]||"";for(;o.length<i.decimals;)o+=Ol;ae(o.substring(i.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,i.decimals);const a=BigInt(n[1]+s+o);return hh(a,i,"fromString"),new Ud(Il,a,i)}static fromBytes(e,r){let n=Ga(xe(e,"value"));const i=Kg(r);return i.signed&&(n=El(n,i.width)),hh(n,i,"fromBytes"),new Ud(Il,n,i)}};cs=new WeakMap,ir=new WeakMap,Un=new WeakMap,mr=new WeakSet,Ja=function(t){F(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)},Zs=function(t,e){return t=hh(t,A(this,cs),e),new T6(Il,t,A(this,cs))},qg=function(t,e){return pe(this,mr,Ja).call(this,t),pe(this,mr,Zs).call(this,A(this,ir)+A(t,ir),e)},ev=function(t,e){return pe(this,mr,Ja).call(this,t),pe(this,mr,Zs).call(this,A(this,ir)-A(t,ir),e)},tv=function(t,e){return pe(this,mr,Ja).call(this,t),pe(this,mr,Zs).call(this,A(this,ir)*A(t,ir)/A(this,Un),e)},rv=function(t,e){return ae(A(t,ir)!==Mi,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),pe(this,mr,Ja).call(this,t),pe(this,mr,Zs).call(this,A(this,ir)*A(this,Un)/A(t,ir),e)};let vp=T6;function Xx(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function N6(t,e,r){let n=0;for(let i=0;i<r;i++)n=n*256+t[e+i];return n}function x6(t,e,r,n){const i=[];for(;r<e+1+n;){const s=B6(t,r);i.push(s.result),r+=s.consumed,ae(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:i}}function B6(t,e){ae(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{ae(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const i=N6(t,e+1,n);return r(e+1+n+i),x6(t,e,e+1+n,n+i)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),x6(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const i=N6(t,e+1,n);r(e+1+n+i);const s=Ee(t.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const i=Ee(t.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:Xx(t[e])}}function Ul(t){const e=xe(t,"data"),r=B6(e,0);return F(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function I6(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function O6(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(s){n=n.concat(O6(s))}),n.length<=55)return n.unshift(192+n.length),n;const i=I6(n.length);return i.unshift(247+i.length),i.concat(n)}const e=Array.prototype.slice.call(xe(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=I6(e.length);return r.unshift(183+r.length),r.concat(e)}const U6="0123456789abcdef";function zs(t){let e="0x";for(const r of O6(t))e+=U6[r>>4],e+=U6[r&15];return e}const M6=["wei","kwei","mwei","gwei","szabo","finney","ether"];function nv(t,e){let r=18;if(typeof e=="string"){const n=M6.indexOf(e);F(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=qe(e,"unit"));return vp.fromValue(t,r,{decimals:r,width:512}).toString()}function iv(t,e){F(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=M6.indexOf(e);F(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=qe(e,"unit"));return vp.fromString(t,{decimals:r,width:512}).value}function P6(t){return nv(t,18)}function V6(t){return iv(t,18)}function sv(t){const e=xe(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=Ee(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Sn=32,ov=new Uint8Array(Sn),Kx=["then"],yp={},F6=new WeakMap;function Ya(t){return F6.get(t)}function L6(t,e){F6.set(t,e)}function fh(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function av(t,e,r){return t.indexOf(null)>=0?e.map((n,i)=>n instanceof Ml?av(Ya(n),n,r):n):t.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(r&&o instanceof Ml&&(o=av(Ya(o),o,r)),n[i]=o),n},{})}var ph;const qx=class D0 extends Array{constructor(...e){const r=e[0];let n=e[1],i=(e[2]||[]).slice(),s=!0;r!==yp&&(n=e,i=[],s=!1),super(n.length),q(this,ph),n.forEach((c,l)=>{this[l]=c});const o=i.reduce((c,l)=>(typeof l=="string"&&c.set(l,(c.get(l)||0)+1),c),new Map);if(L6(this,Object.freeze(n.map((c,l)=>{const u=i[l];return u!=null&&o.get(u)===1?u:null}))),P(this,ph,[]),A(this,ph)==null&&A(this,ph),!s)return;Object.freeze(this);const a=new Proxy(this,{get:(c,l,u)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const h=qe(l,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const f=c[h];return f instanceof Error&&fh(`index ${h}`,f),f}if(Kx.indexOf(l)>=0)return Reflect.get(c,l,u);const d=c[l];if(d instanceof Function)return function(...h){return d.apply(this===u?c:this,h)};if(!(l in c))return c.getValue.apply(this===u?c:this,[l])}return Reflect.get(c,l,u)}});return L6(a,Ya(this)),a}toArray(e){const r=[];return this.forEach((n,i)=>{n instanceof Error&&fh(`index ${i}`,n),e&&n instanceof D0&&(n=n.toArray(e)),r.push(n)}),r}toObject(e){const r=Ya(this);return r.reduce((n,i,s)=>(ae(i!=null,`value at index ${s} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),av(r,this,e)),{})}slice(e,r){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const n=Ya(this),i=[],s=[];for(let o=e;o<r;o++)i.push(this[o]),s.push(n[o]);return new D0(yp,i,s)}filter(e,r){const n=Ya(this),i=[],s=[];for(let o=0;o<this.length;o++){const a=this[o];a instanceof Error&&fh(`index ${o}`,a),e.call(r,a,o,this)&&(i.push(a),s.push(n[o]))}return new D0(yp,i,s)}map(e,r){const n=[];for(let i=0;i<this.length;i++){const s=this[i];s instanceof Error&&fh(`index ${i}`,s),n.push(e.call(r,s,i,this))}return n}getValue(e){const r=Ya(this).indexOf(e);if(r===-1)return;const n=this[r];return n instanceof Error&&fh(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,r){return new D0(yp,e,r)}};ph=new WeakMap;let Ml=qx;function D6(t){const e=[],r=function(n,i){if(Array.isArray(i))for(let s in i){const o=n.slice();o.push(s);try{r(o,i[s])}catch(a){e.push({path:o,error:a})}}};return r([],t),e}function W6(t){let e=Hr(t);return ae(e.length<=Sn,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:Sn,offset:e.length}),e.length!==Sn&&(e=Gr(At([ov.slice(e.length%Sn),e]))),e}class Gs{constructor(e,r,n,i){H(this,"name"),H(this,"type"),H(this,"localName"),H(this,"dynamic"),Ue(this,{name:e,type:r,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){F(!1,e,this.localName,r)}}var Go,Ho,mh,wp;class cv{constructor(){q(this,mh),q(this,Go),q(this,Ho),P(this,Go,[]),P(this,Ho,0)}get data(){return At(A(this,Go))}get length(){return A(this,Ho)}appendWriter(e){return pe(this,mh,wp).call(this,Gr(e.data))}writeBytes(e){let r=Gr(e);const n=r.length%Sn;return n&&(r=Gr(At([r,ov.slice(n)]))),pe(this,mh,wp).call(this,r)}writeValue(e){return pe(this,mh,wp).call(this,W6(e))}writeUpdatableValue(){const e=A(this,Go).length;return A(this,Go).push(ov),P(this,Ho,A(this,Ho)+Sn),r=>{A(this,Go)[e]=W6(r)}}}Go=new WeakMap,Ho=new WeakMap,mh=new WeakSet,wp=function(t){return A(this,Go).push(t),P(this,Ho,A(this,Ho)+t.length),t.length};var jn,Qn,$a,Pl,Xa,gh,lv,Z6;const eB=class rN{constructor(e,r,n){q(this,gh),H(this,"allowLoose"),q(this,jn),q(this,Qn),q(this,$a),q(this,Pl),q(this,Xa),Ue(this,{allowLoose:!!r}),P(this,jn,Gr(e)),P(this,$a,0),P(this,Pl,null),P(this,Xa,n??1024),P(this,Qn,0)}get data(){return Ee(A(this,jn))}get dataLength(){return A(this,jn).length}get consumed(){return A(this,Qn)}get bytes(){return new Uint8Array(A(this,jn))}subReader(e){const r=new rN(A(this,jn).slice(A(this,Qn)+e),this.allowLoose,A(this,Xa));return P(r,Pl,this),r}readBytes(e,r){let n=pe(this,gh,Z6).call(this,0,e,!!r);return pe(this,gh,lv).call(this,e),P(this,Qn,A(this,Qn)+n.length),n.slice(0,e)}readValue(){return Ga(this.readBytes(Sn))}readIndex(){return ih(this.readBytes(Sn))}};jn=new WeakMap,Qn=new WeakMap,$a=new WeakMap,Pl=new WeakMap,Xa=new WeakMap,gh=new WeakSet,lv=function(t){var e;if(A(this,Pl))return pe(e=A(this,Pl),gh,lv).call(e,t);P(this,$a,A(this,$a)+t),ae(A(this,Xa)<1||A(this,$a)<=A(this,Xa)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${A(this,Xa)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Gr(A(this,jn)),offset:A(this,Qn),length:t,info:{bytesRead:A(this,$a),dataLength:this.dataLength}})},Z6=function(t,e,r){let n=Math.ceil(e/Sn)*Sn;return A(this,Qn)+n>A(this,jn).length&&(this.allowLoose&&r&&A(this,Qn)+e<=A(this,jn).length?n=e:ae(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Gr(A(this,jn)),length:A(this,jn).length,offset:A(this,Qn)+n})),A(this,jn).slice(A(this,Qn),A(this,Qn)+n)};let tB=eB;function Jn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function uv(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function z6(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Jn(t.outputLen),Jn(t.blockLen)}function Vl(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 G6(t,e){uv(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const dv=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const H6=t=>t instanceof Uint8Array,bp=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),kp=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),ls=(t,e)=>t<<32-e|t>>>e;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const rB=async()=>{};async function j6(t,e,r){let n=Date.now();for(let i=0;i<t;i++){r(i);const s=Date.now()-n;s>=0&&s<e||(await rB(),n+=s)}}function nB(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Fl(t){if(typeof t=="string"&&(t=nB(t)),!H6(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function iB(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!H6(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class hv{clone(){return this._cloneInto()}}const sB={}.toString;function Q6(t,e){if(e!==void 0&&sB.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function _p(t){const e=n=>t().update(Fl(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function oB(t=32){if(dv&&typeof dv.getRandomValues=="function")return dv.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class J6 extends hv{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,z6(e);const n=Fl(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;const 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 Vl(this),this.iHash.update(e),this}digestInto(e){Vl(this),uv(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash: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()}}const Ep=(t,e,r)=>new J6(t,e).update(r).digest();Ep.create=(t,e)=>new J6(t,e);function aB(t,e,r,n){z6(t);const i=Q6({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:a}=i;if(Jn(s),Jn(o),Jn(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=Fl(e),l=Fl(r),u=new Uint8Array(o),d=Ep.create(t,c),h=d._cloneInto().update(l);return{c:s,dkLen:o,asyncTick:a,DK:u,PRF:d,PRFSalt:h}}function cB(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function fv(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:c}=aB(t,e,r,n);let l;const u=new Uint8Array(4),d=kp(u),h=new Uint8Array(a.outputLen);for(let f=1,p=0;p<s;f++,p+=a.outputLen){const v=o.subarray(p,p+a.outputLen);d.setInt32(0,f,!1),(l=c._cloneInto(l)).update(u).digestInto(h),v.set(h.subarray(0,v.length));for(let m=1;m<i;m++){a._cloneInto(l).update(h).digestInto(h);for(let w=0;w<v.length;w++)v[w]^=h[w]}}return cB(a,c,o,l,h)}function lB(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const 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)}class pv extends hv{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=kp(this.buffer)}update(e){Vl(this);const{view:r,buffer:n,blockLen:i}=this;e=Fl(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=kp(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){Vl(this),G6(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)r[d]=0;lB(n,i-8,BigInt(this.length*8),s),this.process(n,0);const a=kp(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{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}}const uB=(t,e,r)=>t&e^~t&r,dB=(t,e,r)=>t&e^t&r^e&r,hB=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]),jo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Qo=new Uint32Array(64);class fB extends pv{constructor(){super(64,32,8,!1),this.A=jo[0]|0,this.B=jo[1]|0,this.C=jo[2]|0,this.D=jo[3]|0,this.E=jo[4]|0,this.F=jo[5]|0,this.G=jo[6]|0,this.H=jo[7]|0}get(){const{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 d=0;d<16;d++,r+=4)Qo[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=Qo[d-15],f=Qo[d-2],p=ls(h,7)^ls(h,18)^h>>>3,v=ls(f,17)^ls(f,19)^f>>>10;Qo[d]=v+Qo[d-7]+p+Qo[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=ls(a,6)^ls(a,11)^ls(a,25),f=u+h+uB(a,c,l)+hB[d]+Qo[d]|0,p=(ls(n,2)^ls(n,13)^ls(n,22))+dB(n,i,s)|0;u=l,l=c,c=a,a=o+f|0,o=s,s=i,i=n,n=f+p|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,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Qo.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ll=_p(()=>new fB),Cp=BigInt(2**32-1),mv=BigInt(32);function Y6(t,e=!1){return e?{h:Number(t&Cp),l:Number(t>>mv&Cp)}:{h:Number(t>>mv&Cp)|0,l:Number(t&Cp)|0}}function $6(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=Y6(t[i],e);[r[i],n[i]]=[s,o]}return[r,n]}const pB=(t,e)=>BigInt(t>>>0)<<mv|BigInt(e>>>0),mB=(t,e,r)=>t>>>r,gB=(t,e,r)=>t<<32-r|e>>>r,vB=(t,e,r)=>t>>>r|e<<32-r,yB=(t,e,r)=>t<<32-r|e>>>r,wB=(t,e,r)=>t<<64-r|e>>>r-32,bB=(t,e,r)=>t>>>r-32|e<<64-r,kB=(t,e)=>e,_B=(t,e)=>t,X6=(t,e,r)=>t<<r|e>>>32-r,K6=(t,e,r)=>e<<r|t>>>32-r,q6=(t,e,r)=>e<<r-32|t>>>64-r,e8=(t,e,r)=>t<<r-32|e>>>64-r;function EB(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const CB=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),SB=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,AB=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),RB=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,TB=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),NB=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,gt={fromBig:Y6,split:$6,toBig:pB,shrSH:mB,shrSL:gB,rotrSH:vB,rotrSL:yB,rotrBH:wB,rotrBL:bB,rotr32H:kB,rotr32L:_B,rotlSH:X6,rotlSL:K6,rotlBH:q6,rotlBL:e8,add:EB,add3L:CB,add3H:SB,add4L:AB,add4H:RB,add5H:NB,add5L:TB},[xB,BB]=gt.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))),Jo=new Uint32Array(80),Yo=new Uint32Array(80);class IB extends pv{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:d,Fl:h,Gh:f,Gl:p,Hh:v,Hl:m}=this;return[e,r,n,i,s,o,a,c,l,u,d,h,f,p,v,m]}set(e,r,n,i,s,o,a,c,l,u,d,h,f,p,v,m){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=u|0,this.Fh=d|0,this.Fl=h|0,this.Gh=f|0,this.Gl=p|0,this.Hh=v|0,this.Hl=m|0}process(e,r){for(let S=0;S<16;S++,r+=4)Jo[S]=e.getUint32(r),Yo[S]=e.getUint32(r+=4);for(let S=16;S<80;S++){const T=Jo[S-15]|0,N=Yo[S-15]|0,I=gt.rotrSH(T,N,1)^gt.rotrSH(T,N,8)^gt.shrSH(T,N,7),O=gt.rotrSL(T,N,1)^gt.rotrSL(T,N,8)^gt.shrSL(T,N,7),U=Jo[S-2]|0,G=Yo[S-2]|0,D=gt.rotrSH(U,G,19)^gt.rotrBH(U,G,61)^gt.shrSH(U,G,6),M=gt.rotrSL(U,G,19)^gt.rotrBL(U,G,61)^gt.shrSL(U,G,6),Z=gt.add4L(O,M,Yo[S-7],Yo[S-16]),j=gt.add4H(Z,I,D,Jo[S-7],Jo[S-16]);Jo[S]=j|0,Yo[S]=Z|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:d,El:h,Fh:f,Fl:p,Gh:v,Gl:m,Hh:w,Hl:_}=this;for(let S=0;S<80;S++){const T=gt.rotrSH(d,h,14)^gt.rotrSH(d,h,18)^gt.rotrBH(d,h,41),N=gt.rotrSL(d,h,14)^gt.rotrSL(d,h,18)^gt.rotrBL(d,h,41),I=d&f^~d&v,O=h&p^~h&m,U=gt.add5L(_,N,O,BB[S],Yo[S]),G=gt.add5H(U,w,T,I,xB[S],Jo[S]),D=U|0,M=gt.rotrSH(n,i,28)^gt.rotrBH(n,i,34)^gt.rotrBH(n,i,39),Z=gt.rotrSL(n,i,28)^gt.rotrBL(n,i,34)^gt.rotrBL(n,i,39),j=n&s^n&a^s&a,$=i&o^i&c^o&c;w=v|0,_=m|0,v=f|0,m=p|0,f=d|0,p=h|0,{h:d,l:h}=gt.add(l|0,u|0,G|0,D|0),l=a|0,u=c|0,a=s|0,c=o|0,s=n|0,o=i|0;const L=gt.add3L(D,Z,$);n=gt.add3H(L,G,M,j),i=L|0}({h:n,l:i}=gt.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=gt.add(this.Bh|0,this.Bl|0,s|0,o|0),{h:a,l:c}=gt.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=gt.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:h}=gt.add(this.Eh|0,this.El|0,d|0,h|0),{h:f,l:p}=gt.add(this.Fh|0,this.Fl|0,f|0,p|0),{h:v,l:m}=gt.add(this.Gh|0,this.Gl|0,v|0,m|0),{h:w,l:_}=gt.add(this.Hh|0,this.Hl|0,w|0,_|0),this.set(n,i,s,o,a,c,l,u,d,h,f,p,v,m,w,_)}roundClean(){Jo.fill(0),Yo.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)}}const gv=_p(()=>new IB);function OB(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const t8=OB(),r8=t8.crypto||t8.msCrypto;function n8(t){switch(t){case"sha256":return Ll.create();case"sha512":return gv.create()}F(!1,"invalid hashing algorithm name","algorithm",t)}function UB(t,e){const r={sha256:Ll,sha512:gv}[t];return F(r!=null,"invalid hmac algorithm","algorithm",t),Ep.create(r,e)}function MB(t,e,r,n,i){const s={sha256:Ll,sha512:gv}[i];return F(s!=null,"invalid pbkdf2 algorithm","algorithm",i),fv(s,t,e,{c:r,dkLen:n})}function PB(t){ae(r8!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),F(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return r8.getRandomValues(e),e}let i8=!1;const s8=function(t,e,r){return UB(t,e).update(r).digest()};let o8=s8;function Hs(t,e,r){const n=xe(e,"key"),i=xe(r,"data");return Ee(o8(t,n,i))}Hs._=s8,Hs.lock=function(){i8=!0},Hs.register=function(t){if(i8)throw new Error("computeHmac is locked");o8=t},Object.freeze(Hs);const[a8,c8,l8]=[[],[],[]],VB=BigInt(0),vh=BigInt(1),FB=BigInt(2),LB=BigInt(7),DB=BigInt(256),WB=BigInt(113);for(let t=0,e=vh,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],a8.push(2*(5*n+r)),c8.push((t+1)*(t+2)/2%64);let i=VB;for(let s=0;s<7;s++)e=(e<<vh^(e>>LB)*WB)%DB,e&FB&&(i^=vh<<(vh<<BigInt(s))-vh);l8.push(i)}const[ZB,zB]=$6(l8,!0),u8=(t,e,r)=>r>32?q6(t,e,r):X6(t,e,r),d8=(t,e,r)=>r>32?e8(t,e,r):K6(t,e,r);function GB(t,e=24){const 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){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=u8(l,u,1)^r[a],h=d8(l,u,1)^r[a+1];for(let f=0;f<50;f+=10)t[o+f]^=d,t[o+f+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=c8[o],c=u8(i,s,a),l=d8(i,s,a),u=a8[o];i=t[u],s=t[u+1],t[u]=c,t[u+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]^=ZB[n],t[1]^=zB[n]}r.fill(0)}class vv extends hv{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,Jn(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=bp(this.state)}keccak(){GB(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Vl(this);const{blockLen:r,state:n}=this;e=Fl(e);const i=e.length;for(let s=0;s<i;){const 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;const{state:e,suffix:r,pos:n,blockLen:i}=this;e[n]^=r,r&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Vl(this,!1),uv(e),this.finish();const r=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();const 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 Jn(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(G6(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new vv(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}}const HB=(t,e,r)=>_p(()=>new vv(e,t,r)),jB=HB(1,136,256/8);let h8=!1;const f8=function(t){return jB(t)};let p8=f8;function rr(t){const e=xe(t,"data");return Ee(p8(e))}rr._=f8,rr.lock=function(){h8=!0},rr.register=function(t){if(h8)throw new TypeError("keccak256 is locked");p8=t},Object.freeze(rr);const QB=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),m8=Uint8Array.from({length:16},(t,e)=>e),JB=m8.map(t=>(9*t+5)%16);let yv=[m8],wv=[JB];for(let t=0;t<4;t++)for(let e of[yv,wv])e.push(e[t].map(r=>QB[r]));const g8=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),YB=yv.map((t,e)=>t.map(r=>g8[e][r])),$B=wv.map((t,e)=>t.map(r=>g8[e][r])),XB=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),KB=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Sp=(t,e)=>t<<e|t>>>32-e;function v8(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const Ap=new Uint32Array(16);class qB extends pv{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:i,h4:s}=this;return[e,r,n,i,s]}set(e,r,n,i,s){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=i|0,this.h4=s|0}process(e,r){for(let f=0;f<16;f++,r+=4)Ap[f]=e.getUint32(r,!0);let n=this.h0|0,i=n,s=this.h1|0,o=s,a=this.h2|0,c=a,l=this.h3|0,u=l,d=this.h4|0,h=d;for(let f=0;f<5;f++){const p=4-f,v=XB[f],m=KB[f],w=yv[f],_=wv[f],S=YB[f],T=$B[f];for(let N=0;N<16;N++){const I=Sp(n+v8(f,s,a,l)+Ap[w[N]]+v,S[N])+d|0;n=d,d=l,l=Sp(a,10)|0,a=s,s=I}for(let N=0;N<16;N++){const I=Sp(i+v8(p,o,c,u)+Ap[_[N]]+m,T[N])+h|0;i=h,h=u,u=Sp(c,10)|0,c=o,o=I}}this.set(this.h1+a+u|0,this.h2+l+h|0,this.h3+d+i|0,this.h4+n+o|0,this.h0+s+c|0)}roundClean(){Ap.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const eI=_p(()=>new qB);let y8=!1;const w8=function(t){return eI(t)};let b8=w8;function js(t){const e=xe(t,"data");return Ee(b8(e))}js._=w8,js.lock=function(){y8=!0},js.register=function(t){if(y8)throw new TypeError("ripemd160 is locked");b8=t},Object.freeze(js);let k8=!1;const _8=function(t,e,r,n,i){return MB(t,e,r,n,i)};let E8=_8;function Pi(t,e,r,n,i){const s=xe(t,"password"),o=xe(e,"salt");return Ee(E8(s,o,r,n,i))}Pi._=_8,Pi.lock=function(){k8=!0},Pi.register=function(t){if(k8)throw new Error("pbkdf2 is locked");E8=t},Object.freeze(Pi);let C8=!1;const S8=function(t){return new Uint8Array(PB(t))};let A8=S8;function Yn(t){return A8(t)}Yn._=S8,Yn.lock=function(){C8=!0},Yn.register=function(t){if(C8)throw new Error("randomBytes is locked");A8=t},Object.freeze(Yn);const Lt=(t,e)=>t<<e|t>>>32-e;function R8(t,e,r,n,i,s){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],f=t[e++]^r[n++],p=t[e++]^r[n++],v=t[e++]^r[n++],m=t[e++]^r[n++],w=t[e++]^r[n++],_=t[e++]^r[n++],S=t[e++]^r[n++],T=t[e++]^r[n++],N=t[e++]^r[n++],I=o,O=a,U=c,G=l,D=u,M=d,Z=h,j=f,$=p,L=v,z=m,X=w,te=_,re=S,ne=T,ce=N;for(let Se=0;Se<8;Se+=2)D^=Lt(I+te|0,7),$^=Lt(D+I|0,9),te^=Lt($+D|0,13),I^=Lt(te+$|0,18),L^=Lt(M+O|0,7),re^=Lt(L+M|0,9),O^=Lt(re+L|0,13),M^=Lt(O+re|0,18),ne^=Lt(z+Z|0,7),U^=Lt(ne+z|0,9),Z^=Lt(U+ne|0,13),z^=Lt(Z+U|0,18),G^=Lt(ce+X|0,7),j^=Lt(G+ce|0,9),X^=Lt(j+G|0,13),ce^=Lt(X+j|0,18),O^=Lt(I+G|0,7),U^=Lt(O+I|0,9),G^=Lt(U+O|0,13),I^=Lt(G+U|0,18),Z^=Lt(M+D|0,7),j^=Lt(Z+M|0,9),D^=Lt(j+Z|0,13),M^=Lt(D+j|0,18),X^=Lt(z+L|0,7),$^=Lt(X+z|0,9),L^=Lt($+X|0,13),z^=Lt(L+$|0,18),te^=Lt(ce+ne|0,7),re^=Lt(te+ce|0,9),ne^=Lt(re+te|0,13),ce^=Lt(ne+re|0,18);i[s++]=o+I|0,i[s++]=a+O|0,i[s++]=c+U|0,i[s++]=l+G|0,i[s++]=u+D|0,i[s++]=d+M|0,i[s++]=h+Z|0,i[s++]=f+j|0,i[s++]=p+$|0,i[s++]=v+L|0,i[s++]=m+z|0,i[s++]=w+X|0,i[s++]=_+te|0,i[s++]=S+re|0,i[s++]=T+ne|0,i[s++]=N+ce|0}function Dl(t,e,r,n,i){let s=n+0,o=n+16*i;for(let a=0;a<16;a++)r[o+a]=t[e+(2*i-1)*16+a];for(let a=0;a<i;a++,s+=16,e+=16)R8(r,o,t,e,r,s),a>0&&(o+=16),R8(r,s,t,e+=16,r,o)}function T8(t,e,r){const n=Q6({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:i,r:s,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Jn(i),Jn(s),Jn(o),Jn(a),Jn(c),Jn(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const d=128*s,h=d/4;if(i<=1||i&i-1||i>=2**(d/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const f=d*(i+o);if(f>l)throw new Error(`Scrypt: parameters too large, ${f} (128 * r * (N + p)) > ${l} (maxmem)`);const p=fv(Ll,t,e,{c:1,dkLen:d*o}),v=bp(p),m=bp(new Uint8Array(d*i)),w=bp(new Uint8Array(d));let _=()=>{};if(u){const S=2*i*o,T=Math.max(Math.floor(S/1e4),1);let N=0;_=()=>{N++,u&&(!(N%T)||N===S)&&u(N/S)}}return{N:i,r:s,p:o,dkLen:a,blockSize32:h,V:m,B32:v,B:p,tmp:w,blockMixCb:_,asyncTick:c}}function N8(t,e,r,n,i){const s=fv(Ll,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),i.fill(0),s}function tI(t,e,r){const{N:n,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h}=T8(t,e,r);for(let f=0;f<s;f++){const p=a*f;for(let v=0;v<a;v++)c[v]=l[p+v];for(let v=0,m=0;v<n-1;v++)Dl(c,m,c,m+=a,i),h();Dl(c,(n-1)*a,l,p,i),h();for(let v=0;v<n;v++){const m=l[p+a-16]%n;for(let w=0;w<a;w++)d[w]=l[p+w]^c[m*a+w];Dl(d,0,l,p,i),h()}}return N8(t,o,u,c,d)}async function rI(t,e,r){const{N:n,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h,asyncTick:f}=T8(t,e,r);for(let p=0;p<s;p++){const v=a*p;for(let w=0;w<a;w++)c[w]=l[v+w];let m=0;await j6(n-1,f,()=>{Dl(c,m,c,m+=a,i),h()}),Dl(c,(n-1)*a,l,v,i),h(),await j6(n,f,()=>{const w=l[v+a-16]%n;for(let _=0;_<a;_++)d[_]=l[v+_]^c[w*a+_];Dl(d,0,l,v,i),h()})}return N8(t,o,u,c,d)}let x8=!1,B8=!1;const I8=async function(t,e,r,n,i,s,o){return await rI(t,e,{N:r,r:n,p:i,dkLen:s,onProgress:o})},O8=function(t,e,r,n,i,s){return tI(t,e,{N:r,r:n,p:i,dkLen:s})};let U8=I8,M8=O8;async function Qs(t,e,r,n,i,s,o){const a=xe(t,"passwd"),c=xe(e,"salt");return Ee(await U8(a,c,r,n,i,s,o))}Qs._=I8,Qs.lock=function(){B8=!0},Qs.register=function(t){if(B8)throw new Error("scrypt is locked");U8=t},Object.freeze(Qs);function Js(t,e,r,n,i,s){const o=xe(t,"passwd"),a=xe(e,"salt");return Ee(M8(o,a,r,n,i,s))}Js._=O8,Js.lock=function(){x8=!0},Js.register=function(t){if(x8)throw new Error("scryptSync is locked");M8=t},Object.freeze(Js);const P8=function(t){return n8("sha256").update(t).digest()},V8=function(t){return n8("sha512").update(t).digest()};let F8=P8,L8=V8,D8=!1,W8=!1;function mn(t){const e=xe(t,"data");return Ee(F8(e))}mn._=P8,mn.lock=function(){D8=!0},mn.register=function(t){if(D8)throw new Error("sha256 is locked");F8=t},Object.freeze(mn);function Wl(t){const e=xe(t,"data");return Ee(L8(e))}Wl._=V8,Wl.lock=function(){W8=!0},Wl.register=function(t){if(W8)throw new Error("sha512 is locked");L8=t},Object.freeze(mn);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Z8=BigInt(0),Rp=BigInt(1),nI=BigInt(2),Tp=t=>t instanceof Uint8Array,iI=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Zl(t){if(!Tp(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=iI[t[r]];return e}function z8(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function bv(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function zl(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const i=n*2,s=t.slice(i,i+2),o=Number.parseInt(s,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function Ka(t){return bv(Zl(t))}function kv(t){if(!Tp(t))throw new Error("Uint8Array expected");return bv(Zl(Uint8Array.from(t).reverse()))}function Gl(t,e){return zl(t.toString(16).padStart(e*2,"0"))}function _v(t,e){return Gl(t,e).reverse()}function sI(t){return zl(z8(t))}function Vi(t,e,r){let n;if(typeof e=="string")try{n=zl(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if(Tp(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=n.length;if(typeof r=="number"&&i!==r)throw new Error(`${t} expected ${r} bytes, got ${i}`);return n}function yh(...t){const e=new Uint8Array(t.reduce((n,i)=>n+i.length,0));let r=0;return t.forEach(n=>{if(!Tp(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function oI(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function aI(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function cI(t){let e;for(e=0;t>Z8;t>>=Rp,e+=1);return e}function lI(t,e){return t>>BigInt(e)&Rp}const uI=(t,e,r)=>t|(r?Rp:Z8)<<BigInt(e),Ev=t=>(nI<<BigInt(t-1))-Rp,Cv=t=>new Uint8Array(t),G8=t=>Uint8Array.from(t);function H8(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=Cv(t),i=Cv(t),s=0;const o=()=>{n.fill(1),i.fill(0),s=0},a=(...u)=>r(i,n,...u),c=(u=Cv())=>{i=a(G8([0]),u),n=a(),u.length!==0&&(i=a(G8([1]),u),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const d=[];for(;u<e;){n=a();const h=n.slice();d.push(h),u+=n.length}return yh(...d)};return(u,d)=>{o(),c(u);let h;for(;!(h=d(l()));)c();return o(),h}}const dI={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"||t instanceof Uint8Array,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 wh(t,e,r={}){const n=(i,s,o)=>{const a=dI[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))n(i,s,!1);for(const[i,s]of Object.entries(r))n(i,s,!0);return t}const hI=Object.freeze(Object.defineProperty({__proto__:null,bitGet:lI,bitLen:cI,bitMask:Ev,bitSet:uI,bytesToHex:Zl,bytesToNumberBE:Ka,bytesToNumberLE:kv,concatBytes:yh,createHmacDrbg:H8,ensureBytes:Vi,equalBytes:oI,hexToBytes:zl,hexToNumber:bv,numberToBytesBE:Gl,numberToBytesLE:_v,numberToHexUnpadded:z8,numberToVarBytesBE:sI,utf8ToBytes:aI,validateObject:wh},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Kr=BigInt(0),Nr=BigInt(1),qa=BigInt(2),fI=BigInt(3),Sv=BigInt(4),j8=BigInt(5),Q8=BigInt(8);BigInt(9),BigInt(16);function Mn(t,e){const r=t%e;return r>=Kr?r:e+r}function pI(t,e,r){if(r<=Kr||e<Kr)throw new Error("Expected power/modulo > 0");if(r===Nr)return Kr;let n=Nr;for(;e>Kr;)e&Nr&&(n=n*t%r),t=t*t%r,e>>=Nr;return n}function di(t,e,r){let n=t;for(;e-- >Kr;)n*=n,n%=r;return n}function Av(t,e){if(t===Kr||e<=Kr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Mn(t,e),n=e,i=Kr,s=Nr;for(;r!==Kr;){const o=n/r,a=n%r,c=i-s*o;n=r,r=a,i=s,s=c}if(n!==Nr)throw new Error("invert: does not exist");return Mn(i,e)}function mI(t){const e=(t-Nr)/qa;let r,n,i;for(r=t-Nr,n=0;r%qa===Kr;r/=qa,n++);for(i=qa;i<t&&pI(i,e,t)!==t-Nr;i++);if(n===1){const o=(t+Nr)/Sv;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const s=(r+Nr)/qa;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),u=o.pow(a,s),d=o.pow(a,r);for(;!o.eql(d,o.ONE);){if(o.eql(d,o.ZERO))return o.ZERO;let h=1;for(let p=o.sqr(d);h<c&&!o.eql(p,o.ONE);h++)p=o.sqr(p);const f=o.pow(l,Nr<<BigInt(c-h-1));l=o.sqr(f),u=o.mul(u,f),d=o.mul(d,l),c=h}return u}}function gI(t){if(t%Sv===fI){const e=(t+Nr)/Sv;return function(r,n){const i=r.pow(n,e);if(!r.eql(r.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%Q8===j8){const e=(t-j8)/Q8;return function(r,n){const i=r.mul(n,qa),s=r.pow(i,e),o=r.mul(n,s),a=r.mul(r.mul(o,qa),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 mI(t)}const vI=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function yI(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=vI.reduce((n,i)=>(n[i]="function",n),e);return wh(t,r)}function wI(t,e,r){if(r<Kr)throw new Error("Expected power > 0");if(r===Kr)return t.ONE;if(r===Nr)return e;let n=t.ONE,i=e;for(;r>Kr;)r&Nr&&(n=t.mul(n,i)),i=t.sqr(i),r>>=Nr;return n}function bI(t,e){const 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 J8(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function kI(t,e,r=!1,n={}){if(t<=Kr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:s}=J8(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=gI(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:Ev(i),ZERO:Kr,ONE:Nr,create:c=>Mn(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Kr<=c&&c<t},is0:c=>c===Kr,isOdd:c=>(c&Nr)===Nr,neg:c=>Mn(-c,t),eql:(c,l)=>c===l,sqr:c=>Mn(c*c,t),add:(c,l)=>Mn(c+l,t),sub:(c,l)=>Mn(c-l,t),mul:(c,l)=>Mn(c*l,t),pow:(c,l)=>wI(a,c,l),div:(c,l)=>Mn(c*Av(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Av(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>bI(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?_v(c,s):Gl(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return r?kv(c):Ka(c)}});return Object.freeze(a)}function Y8(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function $8(t){const e=Y8(t);return e+Math.ceil(e/2)}function _I(t,e,r=!1){const n=t.length,i=Y8(e),s=$8(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const o=r?Ka(t):kv(t),a=Mn(o,e-Nr)+Nr;return r?_v(a,i):Gl(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const EI=BigInt(0),Rv=BigInt(1);function CI(t,e){const r=(i,s)=>{const o=s.negate();return i?o:s},n=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:r,unsafeLadder(i,s){let o=t.ZERO,a=i;for(;s>EI;)s&Rv&&(o=o.add(a)),a=a.double(),s>>=Rv;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=n(s),c=[];let l=i,u=l;for(let d=0;d<o;d++){u=l,c.push(u);for(let h=1;h<a;h++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(i,s,o){const{windows:a,windowSize:c}=n(i);let l=t.ZERO,u=t.BASE;const d=BigInt(2**i-1),h=2**i,f=BigInt(i);for(let p=0;p<a;p++){const v=p*c;let m=Number(o&d);o>>=f,m>c&&(m-=h,o+=Rv);const w=v,_=v+Math.abs(m)-1,S=p%2!==0,T=m<0;m===0?u=u.add(r(S,s[w])):l=l.add(r(T,s[_]))}return{p:l,f:u}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function X8(t){return yI(t.Fp),wh(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...J8(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function SI(t){const e=X8(t);wh(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("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("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:AI,hexToBytes:RI}=hI,ec={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=ec;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:AI(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=ec,r=typeof t=="string"?RI(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=ec._parseInt(r.subarray(2)),{d:o,l:a}=ec._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),i=e(r(t.r)),s=n.length/2,o=i.length/2,a=r(s),c=r(o);return`30${r(o+s+4)}02${c}${i}02${a}${n}`}},Ys=BigInt(0),hi=BigInt(1);BigInt(2);const K8=BigInt(3);BigInt(4);function TI(t){const e=SI(t),{Fp:r}=e,n=e.toBytes||((p,v,m)=>{const w=v.toAffine();return yh(Uint8Array.from([4]),r.toBytes(w.x),r.toBytes(w.y))}),i=e.fromBytes||(p=>{const v=p.subarray(1),m=r.fromBytes(v.subarray(0,r.BYTES)),w=r.fromBytes(v.subarray(r.BYTES,2*r.BYTES));return{x:m,y:w}});function s(p){const{a:v,b:m}=e,w=r.sqr(p),_=r.mul(w,p);return r.add(r.add(_,r.mul(p,v)),m)}if(!r.eql(r.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(p){return typeof p=="bigint"&&Ys<p&&p<e.n}function a(p){if(!o(p))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(p){const{allowedPrivateKeyLengths:v,nByteLength:m,wrapPrivateKey:w,n:_}=e;if(v&&typeof p!="bigint"){if(p instanceof Uint8Array&&(p=Zl(p)),typeof p!="string"||!v.includes(p.length))throw new Error("Invalid key");p=p.padStart(m*2,"0")}let S;try{S=typeof p=="bigint"?p:Ka(Vi("private key",p,m))}catch{throw new Error(`private key must be ${m} bytes, hex or bigint, not ${typeof p}`)}return w&&(S=Mn(S,_)),a(S),S}const l=new Map;function u(p){if(!(p instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(v,m,w){if(this.px=v,this.py=m,this.pz=w,v==null||!r.isValid(v))throw new Error("x required");if(m==null||!r.isValid(m))throw new Error("y required");if(w==null||!r.isValid(w))throw new Error("z required")}static fromAffine(v){const{x:m,y:w}=v||{};if(!v||!r.isValid(m)||!r.isValid(w))throw new Error("invalid affine point");if(v instanceof d)throw new Error("projective point not allowed");const _=S=>r.eql(S,r.ZERO);return _(m)&&_(w)?d.ZERO:new d(m,w,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const m=r.invertBatch(v.map(w=>w.pz));return v.map((w,_)=>w.toAffine(m[_])).map(d.fromAffine)}static fromHex(v){const m=d.fromAffine(i(Vi("pointHex",v)));return m.assertValidity(),m}static fromPrivateKey(v){return d.BASE.multiply(c(v))}_setWindowSize(v){this._WINDOW_SIZE=v,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y:m}=this.toAffine();if(!r.isValid(v)||!r.isValid(m))throw new Error("bad point: x or y not FE");const w=r.sqr(m),_=s(v);if(!r.eql(w,_))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:v}=this.toAffine();if(r.isOdd)return!r.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){u(v);const{px:m,py:w,pz:_}=this,{px:S,py:T,pz:N}=v,I=r.eql(r.mul(m,N),r.mul(S,_)),O=r.eql(r.mul(w,N),r.mul(T,_));return I&&O}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:v,b:m}=e,w=r.mul(m,K8),{px:_,py:S,pz:T}=this;let N=r.ZERO,I=r.ZERO,O=r.ZERO,U=r.mul(_,_),G=r.mul(S,S),D=r.mul(T,T),M=r.mul(_,S);return M=r.add(M,M),O=r.mul(_,T),O=r.add(O,O),N=r.mul(v,O),I=r.mul(w,D),I=r.add(N,I),N=r.sub(G,I),I=r.add(G,I),I=r.mul(N,I),N=r.mul(M,N),O=r.mul(w,O),D=r.mul(v,D),M=r.sub(U,D),M=r.mul(v,M),M=r.add(M,O),O=r.add(U,U),U=r.add(O,U),U=r.add(U,D),U=r.mul(U,M),I=r.add(I,U),D=r.mul(S,T),D=r.add(D,D),U=r.mul(D,M),N=r.sub(N,U),O=r.mul(D,G),O=r.add(O,O),O=r.add(O,O),new d(N,I,O)}add(v){u(v);const{px:m,py:w,pz:_}=this,{px:S,py:T,pz:N}=v;let I=r.ZERO,O=r.ZERO,U=r.ZERO;const G=e.a,D=r.mul(e.b,K8);let M=r.mul(m,S),Z=r.mul(w,T),j=r.mul(_,N),$=r.add(m,w),L=r.add(S,T);$=r.mul($,L),L=r.add(M,Z),$=r.sub($,L),L=r.add(m,_);let z=r.add(S,N);return L=r.mul(L,z),z=r.add(M,j),L=r.sub(L,z),z=r.add(w,_),I=r.add(T,N),z=r.mul(z,I),I=r.add(Z,j),z=r.sub(z,I),U=r.mul(G,L),I=r.mul(D,j),U=r.add(I,U),I=r.sub(Z,U),U=r.add(Z,U),O=r.mul(I,U),Z=r.add(M,M),Z=r.add(Z,M),j=r.mul(G,j),L=r.mul(D,L),Z=r.add(Z,j),j=r.sub(M,j),j=r.mul(G,j),L=r.add(L,j),M=r.mul(Z,L),O=r.add(O,M),M=r.mul(z,L),I=r.mul($,I),I=r.sub(I,M),M=r.mul($,Z),U=r.mul(z,U),U=r.add(U,M),new d(I,O,U)}subtract(v){return this.add(v.negate())}is0(){return this.equals(d.ZERO)}wNAF(v){return f.wNAFCached(this,l,v,m=>{const w=r.invertBatch(m.map(_=>_.pz));return m.map((_,S)=>_.toAffine(w[S])).map(d.fromAffine)})}multiplyUnsafe(v){const m=d.ZERO;if(v===Ys)return m;if(a(v),v===hi)return this;const{endo:w}=e;if(!w)return f.unsafeLadder(this,v);let{k1neg:_,k1:S,k2neg:T,k2:N}=w.splitScalar(v),I=m,O=m,U=this;for(;S>Ys||N>Ys;)S&hi&&(I=I.add(U)),N&hi&&(O=O.add(U)),U=U.double(),S>>=hi,N>>=hi;return _&&(I=I.negate()),T&&(O=O.negate()),O=new d(r.mul(O.px,w.beta),O.py,O.pz),I.add(O)}multiply(v){a(v);let m=v,w,_;const{endo:S}=e;if(S){const{k1neg:T,k1:N,k2neg:I,k2:O}=S.splitScalar(m);let{p:U,f:G}=this.wNAF(N),{p:D,f:M}=this.wNAF(O);U=f.constTimeNegate(T,U),D=f.constTimeNegate(I,D),D=new d(r.mul(D.px,S.beta),D.py,D.pz),w=U.add(D),_=G.add(M)}else{const{p:T,f:N}=this.wNAF(m);w=T,_=N}return d.normalizeZ([w,_])[0]}multiplyAndAddUnsafe(v,m,w){const _=d.BASE,S=(N,I)=>I===Ys||I===hi||!N.equals(_)?N.multiplyUnsafe(I):N.multiply(I),T=S(this,m).add(S(v,w));return T.is0()?void 0:T}toAffine(v){const{px:m,py:w,pz:_}=this,S=this.is0();v==null&&(v=S?r.ONE:r.inv(_));const T=r.mul(m,v),N=r.mul(w,v),I=r.mul(_,v);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(I,r.ONE))throw new Error("invZ was invalid");return{x:T,y:N}}isTorsionFree(){const{h:v,isTorsionFree:m}=e;if(v===hi)return!0;if(m)return m(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:m}=e;return v===hi?this:m?m(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),n(d,this,v)}toHex(v=!0){return Zl(this.toRawBytes(v))}}d.BASE=new d(e.Gx,e.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const h=e.nBitLength,f=CI(d,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function NI(t){const e=X8(t);return wh(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function xI(t){const e=NI(t),{Fp:r,n}=e,i=r.BYTES+1,s=2*r.BYTES+1;function o(L){return Ys<L&&L<r.ORDER}function a(L){return Mn(L,n)}function c(L){return Av(L,n)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:h}=TI({...e,toBytes(L,z,X){const te=z.toAffine(),re=r.toBytes(te.x),ne=yh;return X?ne(Uint8Array.from([z.hasEvenY()?2:3]),re):ne(Uint8Array.from([4]),re,r.toBytes(te.y))},fromBytes(L){const z=L.length,X=L[0],te=L.subarray(1);if(z===i&&(X===2||X===3)){const re=Ka(te);if(!o(re))throw new Error("Point is not on curve");const ne=d(re);let ce=r.sqrt(ne);const Se=(ce&hi)===hi;return(X&1)===1!==Se&&(ce=r.neg(ce)),{x:re,y:ce}}else if(z===s&&X===4){const re=r.fromBytes(te.subarray(0,r.BYTES)),ne=r.fromBytes(te.subarray(r.BYTES,2*r.BYTES));return{x:re,y:ne}}else throw new Error(`Point of length ${z} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),f=L=>Zl(Gl(L,e.nByteLength));function p(L){const z=n>>hi;return L>z}function v(L){return p(L)?a(-L):L}const m=(L,z,X)=>Ka(L.slice(z,X));class w{constructor(z,X,te){this.r=z,this.s=X,this.recovery=te,this.assertValidity()}static fromCompact(z){const X=e.nByteLength;return z=Vi("compactSignature",z,X*2),new w(m(z,0,X),m(z,X,2*X))}static fromDER(z){const{r:X,s:te}=ec.toSig(Vi("DER",z));return new w(X,te)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(z){return new w(this.r,this.s,z)}recoverPublicKey(z){const{r:X,s:te,recovery:re}=this,ne=O(Vi("msgHash",z));if(re==null||![0,1,2,3].includes(re))throw new Error("recovery id invalid");const ce=re===2||re===3?X+e.n:X;if(ce>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const Se=re&1?"03":"02",_e=l.fromHex(Se+f(ce)),Re=c(ce),be=a(-ne*Re),ve=a(te*Re),je=l.BASE.multiplyAndAddUnsafe(_e,be,ve);if(!je)throw new Error("point at infinify");return je.assertValidity(),je}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new w(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return zl(this.toDERHex())}toDERHex(){return ec.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return zl(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const _={isValidPrivateKey(L){try{return u(L),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const L=$8(e.n);return _I(e.randomBytes(L),e.n)},precompute(L=8,z=l.BASE){return z._setWindowSize(L),z.multiply(BigInt(3)),z}};function S(L,z=!0){return l.fromPrivateKey(L).toRawBytes(z)}function T(L){const z=L instanceof Uint8Array,X=typeof L=="string",te=(z||X)&&L.length;return z?te===i||te===s:X?te===2*i||te===2*s:L instanceof l}function N(L,z,X=!0){if(T(L))throw new Error("first arg must be private key");if(!T(z))throw new Error("second arg must be public key");return l.fromHex(z).multiply(u(L)).toRawBytes(X)}const I=e.bits2int||function(L){const z=Ka(L),X=L.length*8-e.nBitLength;return X>0?z>>BigInt(X):z},O=e.bits2int_modN||function(L){return a(I(L))},U=Ev(e.nBitLength);function G(L){if(typeof L!="bigint")throw new Error("bigint expected");if(!(Ys<=L&&L<U))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Gl(L,e.nByteLength)}function D(L,z,X=M){if(["recovered","canonical"].some(Ve=>Ve in X))throw new Error("sign() legacy options not supported");const{hash:te,randomBytes:re}=e;let{lowS:ne,prehash:ce,extraEntropy:Se}=X;ne==null&&(ne=!0),L=Vi("msgHash",L),ce&&(L=Vi("prehashed msgHash",te(L)));const _e=O(L),Re=u(z),be=[G(Re),G(_e)];if(Se!=null){const Ve=Se===!0?re(r.BYTES):Se;be.push(Vi("extraEntropy",Ve))}const ve=yh(...be),je=_e;function Pe(Ve){const Ke=I(Ve);if(!h(Ke))return;const rt=c(Ke),vt=l.BASE.multiply(Ke).toAffine(),tt=a(vt.x);if(tt===Ys)return;const ot=a(rt*a(je+tt*Re));if(ot===Ys)return;let Kt=(vt.x===tt?0:2)|Number(vt.y&hi),Yt=ot;return ne&&p(ot)&&(Yt=v(ot),Kt^=1),new w(tt,Yt,Kt)}return{seed:ve,k2sig:Pe}}const M={lowS:e.lowS,prehash:!1},Z={lowS:e.lowS,prehash:!1};function j(L,z,X=M){const{seed:te,k2sig:re}=D(L,z,X),ne=e;return H8(ne.hash.outputLen,ne.nByteLength,ne.hmac)(te,re)}l.BASE._setWindowSize(8);function $(L,z,X,te=Z){var re;const ne=L;if(z=Vi("msgHash",z),X=Vi("publicKey",X),"strict"in te)throw new Error("options.strict was renamed to lowS");const{lowS:ce,prehash:Se}=te;let _e,Re;try{if(typeof ne=="string"||ne instanceof Uint8Array)try{_e=w.fromDER(ne)}catch(vt){if(!(vt instanceof ec.Err))throw vt;_e=w.fromCompact(ne)}else if(typeof ne=="object"&&typeof ne.r=="bigint"&&typeof ne.s=="bigint"){const{r:vt,s:tt}=ne;_e=new w(vt,tt)}else throw new Error("PARSE");Re=l.fromHex(X)}catch(vt){if(vt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(ce&&_e.hasHighS())return!1;Se&&(z=e.hash(z));const{r:be,s:ve}=_e,je=O(z),Pe=c(ve),Ve=a(je*Pe),Ke=a(be*Pe),rt=(re=l.BASE.multiplyAndAddUnsafe(Re,Ve,Ke))==null?void 0:re.toAffine();return rt?a(rt.x)===be:!1}return{CURVE:e,getPublicKey:S,getSharedSecret:N,sign:j,verify:$,ProjectivePoint:l,Signature:w,utils:_}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function BI(t){return{hash:t,hmac:(e,...r)=>Ep(t,e,iB(...r)),randomBytes:oB}}function II(t,e){const r=n=>xI({...t,...BI(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const q8=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),e9=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),OI=BigInt(1),Tv=BigInt(2),t9=(t,e)=>(t+e/Tv)/e;function UI(t){const e=q8,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,u=l*l*t%e,d=di(u,r,e)*u%e,h=di(d,r,e)*u%e,f=di(h,Tv,e)*l%e,p=di(f,i,e)*f%e,v=di(p,s,e)*p%e,m=di(v,a,e)*v%e,w=di(m,c,e)*m%e,_=di(w,a,e)*v%e,S=di(_,r,e)*u%e,T=di(S,o,e)*p%e,N=di(T,n,e)*l%e,I=di(N,Tv,e);if(!Nv.eql(Nv.sqr(I),t))throw new Error("Cannot find square root");return I}const Nv=kI(q8,void 0,void 0,{sqrt:UI}),$o=II({a:BigInt(0),b:BigInt(7),Fp:Nv,n:e9,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=e9,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-OI*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,o=BigInt("0x100000000000000000000000000000000"),a=t9(s*t,e),c=t9(-n*t,e);let l=Mn(t-a*r-c*i,e),u=Mn(-a*n-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},Ll);BigInt(0),$o.ProjectivePoint;const tc="0x0000000000000000000000000000000000000000",Np="0x0000000000000000000000000000000000000000000000000000000000000000",r9=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),n9=BigInt("1000000000000000000"),i9=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),s9=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),o9=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),a9="Ξ",xv=`Ethereum Signed Message:
|
|
4
4
|
`,c9=BigInt(0),l9=BigInt(1),u9=BigInt(2),d9=BigInt(27),h9=BigInt(28),xp=BigInt(35),Hl={};function f9(t){return ai(Hr(t),32)}var bh,kh,_h,jl;const MI=class Bs{constructor(e,r,n,i){q(this,bh),q(this,kh),q(this,_h),q(this,jl),ss(e,Hl,"Signature"),P(this,bh,r),P(this,kh,n),P(this,_h,i),P(this,jl,null)}get r(){return A(this,bh)}set r(e){F(Vs(e)===32,"invalid r","value",e),P(this,bh,Ee(e))}get s(){return A(this,kh)}set s(e){F(Vs(e)===32,"invalid s","value",e);const r=Ee(e);F(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),P(this,kh,r)}get v(){return A(this,_h)}set v(e){const r=qe(e,"value");F(r===27||r===28,"invalid v","v",e),P(this,_h,r)}get networkV(){return A(this,jl)}get legacyChainId(){const e=this.networkV;return e==null?null:Bs.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=xe(this.s);return this.yParity&&(e[0]|=128),Ee(e)}get compactSerialized(){return At([this.r,this.yParityAndS])}get serialized(){return At([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new Bs(Hl,this.r,this.s,this.v);return this.networkV&&P(e,jl,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=We(e,"v");return r==d9||r==h9?c9:(F(r>=xp,"invalid EIP-155 v","v",e),(r-xp)/u9)}static getChainIdV(e,r){return We(e)*u9+BigInt(35+r-27)}static getNormalizedV(e){const r=We(e);return r===c9||r===d9?27:r===l9||r===h9?28:(F(r>=xp,"invalid v","v",e),r&l9?27:28)}static from(e){function r(l,u){F(l,u,"signature",e)}if(e==null)return new Bs(Hl,Np,Np,27);if(typeof e=="string"){const l=xe(e,"signature");if(l.length===64){const u=Ee(l.slice(0,32)),d=l.slice(32,64),h=d[0]&128?28:27;return d[0]&=127,new Bs(Hl,u,Ee(d),h)}if(l.length===65){const u=Ee(l.slice(0,32)),d=l.slice(32,64);r((d[0]&128)===0,"non-canonical s");const h=Bs.getNormalizedV(l[64]);return new Bs(Hl,u,Ee(d),h)}r(!1,"invalid raw signature length")}if(e instanceof Bs)return e.clone();const n=e.r;r(n!=null,"missing r");const i=f9(n),s=function(l,u){if(l!=null)return f9(l);if(u!=null){r(er(u,32),"invalid yParityAndS");const d=xe(u);return d[0]&=127,Ee(d)}r(!1,"missing s")}(e.s,e.yParityAndS);r((xe(s)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,d){if(l!=null){const h=We(l);return{networkV:h>=xp?h:void 0,v:Bs.getNormalizedV(h)}}if(u!=null)return r(er(u,32),"invalid yParityAndS"),{v:xe(u)[0]&128?28:27};if(d!=null){switch(qe(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new Bs(Hl,i,s,a);return o&&P(c,jl,o),r(e.yParity==null||qe(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};bh=new WeakMap,kh=new WeakMap,_h=new WeakMap,jl=new WeakMap;let Fi=MI;var Xo;const PI=class Md{constructor(e){q(this,Xo),F(Vs(e)===32,"invalid private key","privateKey","[REDACTED]"),P(this,Xo,Ee(e))}get privateKey(){return A(this,Xo)}get publicKey(){return Md.computePublicKey(A(this,Xo))}get compressedPublicKey(){return Md.computePublicKey(A(this,Xo),!0)}sign(e){F(Vs(e)===32,"invalid digest length","digest",e);const r=$o.sign(Gr(e),Gr(A(this,Xo)),{lowS:!0});return Fi.from({r:ci(r.r,32),s:ci(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=Md.computePublicKey(e);return Ee($o.getSharedSecret(Gr(A(this,Xo)),xe(r),!1))}static computePublicKey(e,r){let n=xe(e,"key");if(n.length===32){const s=$o.getPublicKey(n,!!r);return Ee(s)}if(n.length===64){const s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}const i=$o.ProjectivePoint.fromHex(n);return Ee(i.toRawBytes(r))}static recoverPublicKey(e,r){F(Vs(e)===32,"invalid digest length","digest",e);const n=Fi.from(r);let i=$o.Signature.fromCompact(Gr(At([n.r,n.s])));i=i.addRecoveryBit(n.yParity);const s=i.recoverPublicKey(Gr(e));return F(s!=null,"invalid signautre for digest","signature",r),"0x"+s.toHex(!1)}static addPoints(e,r,n){const i=$o.ProjectivePoint.fromHex(Md.computePublicKey(e).substring(2)),s=$o.ProjectivePoint.fromHex(Md.computePublicKey(r).substring(2));return"0x"+i.add(s).toHex(!!n)}};Xo=new WeakMap;let us=PI;function p9(){Hs.lock(),rr.lock(),Pi.lock(),Yn.lock(),js.lock(),Qs.lock(),Js.lock(),mn.lock(),Wl.lock(),Yn.lock()}const VI=BigInt(0),FI=BigInt(36);function m9(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=xe(rr(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Bv={};for(let t=0;t<10;t++)Bv[String(t)]=String(t);for(let t=0;t<26;t++)Bv[String.fromCharCode(65+t)]=String(10+t);const g9=15;function v9(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Bv[n]).join("");for(;e.length>=g9;){let n=e.substring(0,g9);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const LI=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function DI(t){t=t.toLowerCase();let e=VI;for(let r=0;r<t.length;r++)e=e*FI+LI[t[r]];return e}function wt(t){if(F(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=m9(t);return F(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){F(t.substring(2,4)===v9(t),"bad icap checksum","address",t);let e=DI(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return m9("0x"+e)}F(!1,"invalid address","address",t)}function y9(t){let e=BigInt(wt(t)).toString(36).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+v9("XE00"+e)+e}function Bp(t){const e=wt(t.from);let r=We(t.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,wt(tr(rr(zs([e,r])),12))}function w9(t,e,r){const n=wt(t),i=xe(e,"salt"),s=xe(r,"initCodeHash");return F(i.length===32,"salt must be 32 bytes","salt",e),F(s.length===32,"initCodeHash must be 32 bytes","initCodeHash",r),wt(tr(rr(At(["0xff",n,i,s])),12))}function Ip(t){return t&&typeof t.getAddress=="function"}function b9(t){try{return wt(t),!0}catch{}return!1}async function Iv(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(ae(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),F(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),wt(r)}function jr(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?wt(t):(ae(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Iv(t,e.resolveName(t)));if(Ip(t))return Iv(t,t.getAddress());if(t&&typeof t.then=="function")return Iv(t,t);F(!1,"unsupported addressable value","target",t)}const $s={};function Fe(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new gn($s,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function Dt(t,e){return new gn($s,`bytes${e||""}`,t,{size:e})}const k9=Symbol.for("_ethers_typed");var Ql;const WI=class Pa{constructor(e,r,n,i){H(this,"type"),H(this,"value"),q(this,Ql),H(this,"_typedSymbol"),i==null&&(i=null),ss($s,e,"Typed"),Ue(this,{_typedSymbol:k9,type:r,value:n}),P(this,Ql,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return A(this,Ql)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return A(this,Ql)===!0?-1:A(this,Ql)===!1?this.value.length:null}static from(e,r){return new Pa($s,e,r)}static uint8(e){return Fe(e,8)}static uint16(e){return Fe(e,16)}static uint24(e){return Fe(e,24)}static uint32(e){return Fe(e,32)}static uint40(e){return Fe(e,40)}static uint48(e){return Fe(e,48)}static uint56(e){return Fe(e,56)}static uint64(e){return Fe(e,64)}static uint72(e){return Fe(e,72)}static uint80(e){return Fe(e,80)}static uint88(e){return Fe(e,88)}static uint96(e){return Fe(e,96)}static uint104(e){return Fe(e,104)}static uint112(e){return Fe(e,112)}static uint120(e){return Fe(e,120)}static uint128(e){return Fe(e,128)}static uint136(e){return Fe(e,136)}static uint144(e){return Fe(e,144)}static uint152(e){return Fe(e,152)}static uint160(e){return Fe(e,160)}static uint168(e){return Fe(e,168)}static uint176(e){return Fe(e,176)}static uint184(e){return Fe(e,184)}static uint192(e){return Fe(e,192)}static uint200(e){return Fe(e,200)}static uint208(e){return Fe(e,208)}static uint216(e){return Fe(e,216)}static uint224(e){return Fe(e,224)}static uint232(e){return Fe(e,232)}static uint240(e){return Fe(e,240)}static uint248(e){return Fe(e,248)}static uint256(e){return Fe(e,256)}static uint(e){return Fe(e,256)}static int8(e){return Fe(e,-8)}static int16(e){return Fe(e,-16)}static int24(e){return Fe(e,-24)}static int32(e){return Fe(e,-32)}static int40(e){return Fe(e,-40)}static int48(e){return Fe(e,-48)}static int56(e){return Fe(e,-56)}static int64(e){return Fe(e,-64)}static int72(e){return Fe(e,-72)}static int80(e){return Fe(e,-80)}static int88(e){return Fe(e,-88)}static int96(e){return Fe(e,-96)}static int104(e){return Fe(e,-104)}static int112(e){return Fe(e,-112)}static int120(e){return Fe(e,-120)}static int128(e){return Fe(e,-128)}static int136(e){return Fe(e,-136)}static int144(e){return Fe(e,-144)}static int152(e){return Fe(e,-152)}static int160(e){return Fe(e,-160)}static int168(e){return Fe(e,-168)}static int176(e){return Fe(e,-176)}static int184(e){return Fe(e,-184)}static int192(e){return Fe(e,-192)}static int200(e){return Fe(e,-200)}static int208(e){return Fe(e,-208)}static int216(e){return Fe(e,-216)}static int224(e){return Fe(e,-224)}static int232(e){return Fe(e,-232)}static int240(e){return Fe(e,-240)}static int248(e){return Fe(e,-248)}static int256(e){return Fe(e,-256)}static int(e){return Fe(e,-256)}static bytes1(e){return Dt(e,1)}static bytes2(e){return Dt(e,2)}static bytes3(e){return Dt(e,3)}static bytes4(e){return Dt(e,4)}static bytes5(e){return Dt(e,5)}static bytes6(e){return Dt(e,6)}static bytes7(e){return Dt(e,7)}static bytes8(e){return Dt(e,8)}static bytes9(e){return Dt(e,9)}static bytes10(e){return Dt(e,10)}static bytes11(e){return Dt(e,11)}static bytes12(e){return Dt(e,12)}static bytes13(e){return Dt(e,13)}static bytes14(e){return Dt(e,14)}static bytes15(e){return Dt(e,15)}static bytes16(e){return Dt(e,16)}static bytes17(e){return Dt(e,17)}static bytes18(e){return Dt(e,18)}static bytes19(e){return Dt(e,19)}static bytes20(e){return Dt(e,20)}static bytes21(e){return Dt(e,21)}static bytes22(e){return Dt(e,22)}static bytes23(e){return Dt(e,23)}static bytes24(e){return Dt(e,24)}static bytes25(e){return Dt(e,25)}static bytes26(e){return Dt(e,26)}static bytes27(e){return Dt(e,27)}static bytes28(e){return Dt(e,28)}static bytes29(e){return Dt(e,29)}static bytes30(e){return Dt(e,30)}static bytes31(e){return Dt(e,31)}static bytes32(e){return Dt(e,32)}static address(e){return new Pa($s,"address",e)}static bool(e){return new Pa($s,"bool",!!e)}static bytes(e){return new Pa($s,"bytes",e)}static string(e){return new Pa($s,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Pa($s,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===k9}static dereference(e,r){if(Pa.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Ql=new WeakMap;let gn=WI;class ZI extends Gs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=gn.dereference(r,"string");try{n=wt(n)}catch(i){return this._throwError(i.message,r)}return e.writeValue(n)}decode(e){return wt(ci(e.readValue(),20))}}class zI extends Gs{constructor(e){super(e.name,e.type,"_",e.dynamic),H(this,"coder"),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}function _9(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return ae(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),ae(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else F(!1,"invalid tuple value","tuple",r);F(e.length===n.length,"types/value length mismatch","tuple",r);let i=new cv,s=new cv,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let d=s.length;c.encode(s,u);let h=i.writeUpdatableValue();o.push(f=>{h(f+d)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function E9(t,e){let r=[],n=[],i=t.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(l){if(Tr(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(Tr(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");r.push(o),n.push(s.localName||null)}),Ml.fromItems(r,n)}class GI extends Gs{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),H(this,"coder"),H(this,"length"),Ue(this,{coder:e,length:r})}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;n<this.length;n++)r.push(e);return r}encode(e,r){const n=gn.dereference(r,"array");Array.isArray(n)||this._throwError("expected array value",n);let i=this.length;i===-1&&(i=n.length,e.writeValue(n.length)),sp(n.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let o=0;o<n.length;o++)s.push(this.coder);return _9(e,s,n)}decode(e){let r=this.length;r===-1&&(r=e.readIndex(),ae(r*Sn<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:r*Sn,length:e.dataLength}));let n=[];for(let i=0;i<r;i++)n.push(new zI(this.coder));return E9(e,n)}}class HI extends Gs{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=gn.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class C9 extends Gs{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=Gr(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class jI extends C9{constructor(e){super("bytes",e)}decode(e){return Ee(super.decode(e))}}class QI extends Gs{constructor(e,r){let n="bytes"+String(e);super(n,n,r,!1),H(this,"size"),Ue(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let n=Gr(gn.dereference(r,this.type));return n.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(n)}decode(e){return Ee(e.readBytes(this.size))}}const JI=new Uint8Array([]);class YI extends Gs{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(JI)}decode(e){return e.readBytes(0),null}}const $I=BigInt(0),XI=BigInt(1),KI=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class qI extends Gs{constructor(e,r,n){const i=(r?"int":"uint")+e*8;super(i,i,n,!1),H(this,"size"),H(this,"signed"),Ue(this,{size:e,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,r){let n=We(gn.dereference(r,this.type)),i=Fs(KI,Sn*8);if(this.signed){let s=Fs(i,this.size*8-1);(n>s||n<-(s+XI))&&this._throwError("value out-of-bounds",r),n=nh(n,8*Sn)}else(n<$I||n>Fs(i,this.size*8))&&this._throwError("value out-of-bounds",r);return e.writeValue(n)}decode(e){let r=Fs(e.readValue(),this.size*8);return this.signed&&(r=El(r,this.size*8)),r}}class eO extends C9{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Vr(gn.dereference(r,"string")))}decode(e){return Ds(super.decode(e))}}class Op extends Gs{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),H(this,"coders"),Ue(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){const n=gn.dereference(r,"tuple");return _9(e,this.coders,n)}decode(e){return E9(e,this.coders)}}function Li(t){return rr(Vr(t))}var tO="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const S9=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),A9=4;function rO(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),i=1,s=[0,1];for(let N=1;N<n;N++)s.push(i+=r());let o=r(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const d=31,h=2**d,f=h>>>1,p=f>>1,v=h-1;let m=0;for(let N=0;N<d;N++)m=m<<1|u();let w=[],_=0,S=h;for(;;){let N=Math.floor(((m-_+1)*i-1)/S),I=0,O=n;for(;O-I>1;){let D=I+O>>>1;N<s[D]?O=D:I=D}if(I==0)break;w.push(I);let U=_+Math.floor(S*s[I]/i),G=_+Math.floor(S*s[I+1]/i)-1;for(;!((U^G)&f);)m=m<<1&v|u(),U=U<<1&v,G=G<<1&v|1;for(;U&~G&p;)m=m&f|m<<1&v>>>1|u(),U=U<<1^f,G=(G^f)<<1|f|1;_=U,S=1+G-U}let T=n-4;return w.map(N=>{switch(N-T){case 3:return T+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return T+256+(t[a++]<<8|t[a++]);case 1:return T+t[a++];default:return N-1}})}function nO(t){let e=0;return()=>t[e++]}function R9(t){return nO(rO(iO(t)))}function iO(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let r=t.length,n=new Uint8Array(6*r>>3);for(let i=0,s=0,o=0,a=0;i<r;i++)a=a<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(n[s++]=a>>(o-=8));return n}function sO(t){return t&1?~t>>1:t>>1}function oO(t,e){let r=Array(t);for(let n=0,i=0;n<t;n++)r[n]=i+=sO(e());return r}function Eh(t,e=0){let r=[];for(;;){let n=t(),i=t();if(!i)break;e+=n;for(let s=0;s<i;s++)r.push(e+s);e+=i+1}return r}function T9(t){return Ch(()=>{let e=Eh(t);if(e.length)return e})}function N9(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(aO(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(cO(r,t))}return e.flat()}function Ch(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function x9(t,e,r){let n=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)oO(t,r).forEach((s,o)=>n[o].push(s));return n}function aO(t,e){let r=1+e(),n=e(),i=Ch(e);return x9(i.length,1+t,e).flatMap((s,o)=>{let[a,...c]=s;return Array(i[o]).fill().map((l,u)=>{let d=u*n;return[a+u*r,c.map(h=>h+d)]})})}function cO(t,e){let r=1+e();return x9(r,1+t,e).map(n=>[n[0],n.slice(1)])}function lO(t){let e=[],r=Eh(t);return i(n([]),[]),e;function n(s){let o=t(),a=Ch(()=>{let c=Eh(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let u of l.Q)i(l,[...a,u],c)}}}function uO(t){return t.toString(16).toUpperCase().padStart(2,"0")}function B9(t){return`{${uO(t)}}`}function dO(t){let e=[];for(let r=0,n=t.length;r<n;){let i=t.codePointAt(r);r+=i<65536?1:2,e.push(i)}return e}function Jl(t){let e=t.length;if(e<4096)return String.fromCodePoint(...t);let r=[];for(let n=0;n<e;)r.push(String.fromCodePoint(...t.slice(n,n+=4096)));return r.join("")}function hO(t,e){let r=t.length,n=r-e.length;for(let i=0;n==0&&i<r;i++)n=t[i]-e[i];return n}var fO="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";const Sh=44032,Up=4352,Mp=4449,Pp=4519,I9=19,O9=21,Yl=28,Vp=O9*Yl,pO=I9*Vp,mO=Sh+pO,gO=Up+I9,vO=Mp+O9,yO=Pp+Yl;function Ah(t){return t>>24&255}function U9(t){return t&16777215}let Ov,M9,Uv,Fp;function wO(){let t=R9(fO);Ov=new Map(T9(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),M9=new Set(Eh(t)),Uv=new Map,Fp=new Map;for(let[e,r]of N9(t)){if(!M9.has(e)&&r.length==2){let[n,i]=r,s=Fp.get(n);s||(s=new Map,Fp.set(n,s)),s.set(i,e)}Uv.set(e,r.reverse())}}function P9(t){return t>=Sh&&t<mO}function bO(t,e){if(t>=Up&&t<gO&&e>=Mp&&e<vO)return Sh+(t-Up)*Vp+(e-Mp)*Yl;if(P9(t)&&e>Pp&&e<yO&&(t-Sh)%Yl==0)return t+(e-Pp);{let r=Fp.get(t);return r&&(r=r.get(e),r)?r:-1}}function V9(t){Ov||wO();let e=[],r=[],n=!1;function i(s){let o=Ov.get(s);o&&(n=!0,s|=o),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(P9(s)){let o=s-Sh,a=o/Vp|0,c=o%Vp/Yl|0,l=o%Yl;i(Up+a),i(Mp+c),l>0&&i(Pp+l)}else{let o=Uv.get(s);o?r.push(...o):i(s)}if(!r.length)break;s=r.pop()}if(n&&e.length>1){let s=Ah(e[0]);for(let o=1;o<e.length;o++){let a=Ah(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(s=Ah(e[--c]),s<=a))break}s=Ah(e[o])}}return e}function kO(t){let e=[],r=[],n=-1,i=0;for(let s of t){let o=Ah(s),a=U9(s);if(n==-1)o==0?n=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),i=o;else{let c=bO(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(r.push(a),i=o)}}return n>=0&&e.push(n,...r),e}function F9(t){return V9(t).map(U9)}function _O(t){return kO(V9(t))}const L9=45,D9=".",W9=65039,Z9=1,Lp=t=>Array.from(t);function Rh(t,e){return t.P.has(e)||t.Q.has(e)}class EO extends Array{get is_emoji(){return!0}}let Mv,z9,rc,Pv,G9,$l,Vv,Xl,nc,H9,Fv;function Lv(){if(Mv)return;let t=R9(tO);const e=()=>Eh(t),r=()=>new Set(e()),n=(u,d)=>d.forEach(h=>u.add(h));Mv=new Map(N9(t)),z9=r(),rc=e(),Pv=new Set(e().map(u=>rc[u])),rc=new Set(rc),G9=r(),r();let i=T9(t),s=t();const o=()=>{let u=new Set;return e().forEach(d=>n(u,i[d])),n(u,e()),u};$l=Ch(u=>{let d=Ch(t).map(h=>h+96);if(d.length){let h=u>=s;d[0]-=32,d=Jl(d),h&&(d=`Restricted[${d}]`);let f=o(),p=o(),v=!t();return{N:d,P:f,Q:p,M:v,R:h}}}),Vv=r(),Xl=new Map;let a=e().concat(Lp(Vv)).sort((u,d)=>u-d);a.forEach((u,d)=>{let h=t(),f=a[d]=h?a[d-h]:{V:[],M:new Map};f.V.push(u),Vv.has(u)||Xl.set(u,f)});for(let{V:u,M:d}of new Set(Xl.values())){let h=[];for(let p of u){let v=$l.filter(w=>Rh(w,p)),m=h.find(({G:w})=>v.some(_=>w.has(_)));m||(m={G:new Set,V:[]},h.push(m)),m.V.push(p),n(m.G,v)}let f=h.flatMap(p=>Lp(p.G));for(let{G:p,V:v}of h){let m=new Set(f.filter(w=>!p.has(w)));for(let w of v)d.set(w,m)}}nc=new Set;let c=new Set;const l=u=>nc.has(u)?c.add(u):nc.add(u);for(let u of $l){for(let d of u.P)l(d);for(let d of u.Q)l(d)}for(let u of nc)!Xl.has(u)&&!c.has(u)&&Xl.set(u,Z9);n(nc,F9(nc)),H9=lO(t).map(u=>EO.from(u)).sort(hO),Fv=new Map;for(let u of H9){let d=[Fv];for(let h of u){let f=d.map(p=>{let v=p.get(h);return v||(v=new Map,p.set(h,v)),v});h===W9?d.push(...f):d=f}for(let h of d)h.V=u}}function Dv(t){return(j9(t)?"":`${Wv(Dp([t]))} `)+B9(t)}function Wv(t){return`"${t}"`}function CO(t){if(t.length>=4&&t[2]==L9&&t[3]==L9)throw new Error(`invalid label extension: "${Jl(t.slice(0,4))}"`)}function SO(t){for(let e=t.lastIndexOf(95);e>0;)if(t[--e]!==95)throw new Error("underscore allowed only at start")}function AO(t){let e=t[0],r=S9.get(e);if(r)throw Th(`leading ${r}`);let n=t.length,i=-1;for(let s=1;s<n;s++){e=t[s];let o=S9.get(e);if(o){if(i==s)throw Th(`${r} + ${o}`);i=s+1,r=o}}if(i==n)throw Th(`trailing ${r}`)}function Dp(t,e=1/0,r=B9){let n=[];RO(t[0])&&n.push("◌"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let o=0;o<s;o++){let a=t[o];j9(a)&&(n.push(Jl(t.slice(i,o))),n.push(r(a)),i=o+1)}return n.push(Jl(t.slice(i,s))),n.join("")}function RO(t){return Lv(),rc.has(t)}function j9(t){return Lv(),G9.has(t)}function TO(t){return IO(NO(t,_O,MO))}function NO(t,e,r){if(!t)return[];Lv();let n=0;return t.split(D9).map(i=>{let s=dO(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=UO(s,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(SO(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))CO(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(rc.has(u[0]))throw Th("leading combining mark");for(let p=1;p<c;p++){let v=a[p];if(!v.is_emoji&&rc.has(v[0]))throw Th(`emoji + combining mark: "${Jl(a[p-1])} + ${Dp([v[0]])}"`)}AO(u);let h=Lp(new Set(d)),[f]=BO(h);OO(f,d),xO(f,h),l=f.N}}o.type=l}catch(a){o.error=a}return o})}function xO(t,e){let r,n=[];for(let i of e){let s=Xl.get(i);if(s===Z9)return;if(s){let o=s.M.get(i);if(r=r?r.filter(a=>o.has(a)):Lp(o),!r.length)return}else n.push(i)}if(r){for(let i of r)if(n.every(s=>Rh(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function BO(t){let e=$l;for(let r of t){let n=e.filter(i=>Rh(i,r));if(!n.length)throw $l.some(i=>Rh(i,r))?J9(e[0],r):Q9(r);if(e=n,n.length==1)break}return e}function IO(t){return t.map(({input:e,error:r,output:n})=>{if(r){let i=r.message;throw new Error(t.length==1?i:`Invalid label ${Wv(Dp(e,63))}: ${i}`)}return Jl(n)}).join(D9)}function Q9(t){return new Error(`disallowed character: ${Dv(t)}`)}function J9(t,e){let r=Dv(e),n=$l.find(i=>i.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Th(t){return new Error(`illegal placement: ${t}`)}function OO(t,e){for(let r of e)if(!Rh(t,r))throw J9(t,r);if(t.M){let r=F9(e);for(let n=1,i=r.length;n<i;n++)if(Pv.has(r[n])){let s=n+1;for(let o;s<i&&Pv.has(o=r[s]);s++)for(let a=n;a<s;a++)if(r[a]==o)throw new Error(`duplicate non-spacing marks: ${Dv(o)}`);if(s-n>A9)throw new Error(`excessive non-spacing marks: ${Wv(Dp(r.slice(n-1,s)))} (${s-n}/${A9})`);n=s}}}function UO(t,e,r){let n=[],i=[];for(t=t.slice().reverse();t.length;){let s=PO(t);if(s)i.length&&(n.push(e(i)),i=[]),n.push(r(s));else{let o=t.pop();if(nc.has(o))i.push(o);else{let a=Mv.get(o);if(a)i.push(...a);else if(!z9.has(o))throw Q9(o)}}}return i.length&&n.push(e(i)),n}function MO(t){return t.filter(e=>e!=W9)}function PO(t,e){let r=Fv,n,i=t.length;for(;i&&(r=r.get(t[--i]),!!r);){let{V:s}=r;s&&(n=s,t.length=i)}return n}const Y9=new Uint8Array(32);Y9.fill(0);function $9(t){return F(t.length!==0,"invalid ENS name; empty component","comp",t),t}function Zv(t){const e=Vr(zv(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(r.push($9(e.slice(n,i))),n=i+1);return F(n<e.length,"invalid ENS name; empty component","name",t),r.push($9(e.slice(n))),r}function zv(t){try{if(t.length===0)throw new Error("empty label");return TO(t)}catch(e){F(!1,`invalid ENS name (${e.message})`,"name",t)}}function X9(t){try{return Zv(t).length!==0}catch{}return!1}function Nh(t){F(typeof t=="string","invalid ENS name; not a string","name",t),F(t.length,"invalid ENS name (empty label)","name",t);let e=Y9;const r=Zv(t);for(;r.length;)e=rr(At([e,rr(r.pop())]));return Ee(e)}function Gv(t,e){const r=e??63;return F(r<=255,"DNS encoded label cannot exceed 255","length",r),Ee(At(Zv(t).map(n=>{F(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function Hv(t,e){return{address:wt(t),storageKeys:e.map((r,n)=>(F(er(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function ds(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(F(r.length===2,"invalid slot set",`value[${n}]`,r),Hv(r[0],r[1])):(F(r!=null&&typeof r=="object","invalid address-slot set","value",t),Hv(r.address,r.storageKeys)));F(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Hv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function ic(t){let e;return typeof t=="string"?e=us.computePublicKey(t,!1):e=t.publicKey,wt(rr("0x"+e.substring(4)).substring(26))}function xh(t,e){return ic(us.recoverPublicKey(t,e))}const qr=BigInt(0),VO=BigInt(2),FO=BigInt(27),LO=BigInt(28),DO=BigInt(35),WO=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),jv=4096*32;function K9(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=mn(e).substring(4),"0x"+r}function Wp(t){return t==="0x"?null:wt(t)}function Qv(t,e){try{return ds(t)}catch(r){F(!1,r.message,e,t)}}function Bh(t,e){return t==="0x"?0:qe(t,e)}function xr(t,e){if(t==="0x")return qr;const r=We(t,e);return F(r<=WO,"value exceeds uint size",e,r),r}function dr(t,e){const r=We(t,"value"),n=Hr(r);return F(n.length<=32,"value too large",`tx.${e}`,r),n}function Jv(t){return ds(t).map(e=>[e.address,e.storageKeys])}function ZO(t,e){F(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;r<t.length;r++)F(er(t[r],32),"invalid ${ param } hash",`value[${r}]`,t[r]);return t}function zO(t){const e=Ul(t);F(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:Bh(e[0],"nonce"),gasPrice:xr(e[1],"gasPrice"),gasLimit:xr(e[2],"gasLimit"),to:Wp(e[3]),value:xr(e[4],"value"),data:Ee(e[5]),chainId:qr};if(e.length===6)return r;const n=xr(e[6],"v"),i=xr(e[7],"r"),s=xr(e[8],"s");if(i===qr&&s===qr)r.chainId=n;else{let o=(n-DO)/VO;o<qr&&(o=qr),r.chainId=o,F(o!==qr||n===FO||n===LO,"non-canonical legacy v","v",e[6]),r.signature=Fi.from({r:ai(e[7],32),s:ai(e[8],32),v:n})}return r}function GO(t,e){const r=[dr(t.nonce,"nonce"),dr(t.gasPrice||0,"gasPrice"),dr(t.gasLimit,"gasLimit"),t.to||"0x",dr(t.value,"value"),t.data];let n=qr;if(t.chainId!=qr)n=We(t.chainId,"tx.chainId"),F(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const s=t.signature.legacyChainId;s!=null&&(n=s)}if(!e)return n!==qr&&(r.push(Hr(n)),r.push("0x"),r.push("0x")),zs(r);let i=BigInt(27+e.yParity);return n!==qr?i=Fi.getChainIdV(n,e.v):BigInt(e.v)!==i&&F(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(Hr(i)),r.push(Hr(e.r)),r.push(Hr(e.s)),zs(r)}function Yv(t,e){let r;try{if(r=Bh(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{F(!1,"invalid yParity","yParity",e[0])}const n=ai(e[1],32),i=ai(e[2],32),s=Fi.from({r:n,s:i,yParity:r});t.signature=s}function HO(t){const e=Ul(xe(t).slice(1));F(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",Ee(t));const r={type:2,chainId:xr(e[0],"chainId"),nonce:Bh(e[1],"nonce"),maxPriorityFeePerGas:xr(e[2],"maxPriorityFeePerGas"),maxFeePerGas:xr(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:xr(e[4],"gasLimit"),to:Wp(e[5]),value:xr(e[6],"value"),data:Ee(e[7]),accessList:Qv(e[8],"accessList")};return e.length===9||Yv(r,e.slice(9)),r}function jO(t,e){const r=[dr(t.chainId,"chainId"),dr(t.nonce,"nonce"),dr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),dr(t.maxFeePerGas||0,"maxFeePerGas"),dr(t.gasLimit,"gasLimit"),t.to||"0x",dr(t.value,"value"),t.data,Jv(t.accessList||[])];return e&&(r.push(dr(e.yParity,"yParity")),r.push(Hr(e.r)),r.push(Hr(e.s))),At(["0x02",zs(r)])}function QO(t){const e=Ul(xe(t).slice(1));F(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",Ee(t));const r={type:1,chainId:xr(e[0],"chainId"),nonce:Bh(e[1],"nonce"),gasPrice:xr(e[2],"gasPrice"),gasLimit:xr(e[3],"gasLimit"),to:Wp(e[4]),value:xr(e[5],"value"),data:Ee(e[6]),accessList:Qv(e[7],"accessList")};return e.length===8||Yv(r,e.slice(8)),r}function JO(t,e){const r=[dr(t.chainId,"chainId"),dr(t.nonce,"nonce"),dr(t.gasPrice||0,"gasPrice"),dr(t.gasLimit,"gasLimit"),t.to||"0x",dr(t.value,"value"),t.data,Jv(t.accessList||[])];return e&&(r.push(dr(e.yParity,"recoveryParam")),r.push(Hr(e.r)),r.push(Hr(e.s))),At(["0x01",zs(r)])}function YO(t){let e=Ul(xe(t).slice(1)),r="3",n=null;if(e.length===4&&Array.isArray(e[0])){r="3 (network format)";const s=e[1],o=e[2],a=e[3];F(Array.isArray(s),"invalid network format: blobs not an array","fields[1]",s),F(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),F(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),F(s.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",e),F(s.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",e),n=[];for(let c=0;c<e[1].length;c++)n.push({data:s[c],commitment:o[c],proof:a[c]});e=e[0]}F(Array.isArray(e)&&(e.length===11||e.length===14),`invalid field count for transaction type: ${r}`,"data",Ee(t));const i={type:3,chainId:xr(e[0],"chainId"),nonce:Bh(e[1],"nonce"),maxPriorityFeePerGas:xr(e[2],"maxPriorityFeePerGas"),maxFeePerGas:xr(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:xr(e[4],"gasLimit"),to:Wp(e[5]),value:xr(e[6],"value"),data:Ee(e[7]),accessList:Qv(e[8],"accessList"),maxFeePerBlobGas:xr(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};n&&(i.blobs=n),F(i.to!=null,`invalid address for transaction type: ${r}`,"data",t),F(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",t);for(let s=0;s<i.blobVersionedHashes.length;s++)F(er(i.blobVersionedHashes[s],32),`invalid blobVersionedHash at index ${s}: must be length 32`,"data",t);return e.length===11||Yv(i,e.slice(11)),i}function $O(t,e,r){const n=[dr(t.chainId,"chainId"),dr(t.nonce,"nonce"),dr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),dr(t.maxFeePerGas||0,"maxFeePerGas"),dr(t.gasLimit,"gasLimit"),t.to||tc,dr(t.value,"value"),t.data,Jv(t.accessList||[]),dr(t.maxFeePerBlobGas||0,"maxFeePerBlobGas"),ZO(t.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(n.push(dr(e.yParity,"yParity")),n.push(Hr(e.r)),n.push(Hr(e.s)),r)?At(["0x03",zs([n,r.map(i=>i.data),r.map(i=>i.commitment),r.map(i=>i.proof)])]):At(["0x03",zs(n)])}var Xs,Ih,Oh,Uh,Mh,Ph,Vh,Fh,Lh,Dh,Wh,Zh,Kl,sc,Ko,oc,zh,Zp;const XO=class Va{constructor(){q(this,zh),q(this,Xs),q(this,Ih),q(this,Oh),q(this,Uh),q(this,Mh),q(this,Ph),q(this,Vh),q(this,Fh),q(this,Lh),q(this,Dh),q(this,Wh),q(this,Zh),q(this,Kl),q(this,sc),q(this,Ko),q(this,oc),P(this,Xs,null),P(this,Ih,null),P(this,Uh,0),P(this,Mh,qr),P(this,Ph,null),P(this,Vh,null),P(this,Fh,null),P(this,Oh,"0x"),P(this,Lh,qr),P(this,Dh,qr),P(this,Wh,null),P(this,Zh,null),P(this,Kl,null),P(this,sc,null),P(this,oc,null),P(this,Ko,null)}get type(){return A(this,Xs)}set type(e){switch(e){case null:P(this,Xs,null);break;case 0:case"legacy":P(this,Xs,0);break;case 1:case"berlin":case"eip-2930":P(this,Xs,1);break;case 2:case"london":case"eip-1559":P(this,Xs,2);break;case 3:case"cancun":case"eip-4844":P(this,Xs,3);break;default:F(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=A(this,Ih);return e==null&&this.type===3?tc:e}set to(e){P(this,Ih,e==null?null:wt(e))}get nonce(){return A(this,Uh)}set nonce(e){P(this,Uh,qe(e,"value"))}get gasLimit(){return A(this,Mh)}set gasLimit(e){P(this,Mh,We(e))}get gasPrice(){const e=A(this,Ph);return e==null&&(this.type===0||this.type===1)?qr:e}set gasPrice(e){P(this,Ph,e==null?null:We(e,"gasPrice"))}get maxPriorityFeePerGas(){return A(this,Vh)??(this.type===2||this.type===3?qr:null)}set maxPriorityFeePerGas(e){P(this,Vh,e==null?null:We(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){return A(this,Fh)??(this.type===2||this.type===3?qr:null)}set maxFeePerGas(e){P(this,Fh,e==null?null:We(e,"maxFeePerGas"))}get data(){return A(this,Oh)}set data(e){P(this,Oh,Ee(e))}get value(){return A(this,Lh)}set value(e){P(this,Lh,We(e,"value"))}get chainId(){return A(this,Dh)}set chainId(e){P(this,Dh,We(e))}get signature(){return A(this,Wh)||null}set signature(e){P(this,Wh,e==null?null:Fi.from(e))}get accessList(){return(A(this,Zh)||null)??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){P(this,Zh,e==null?null:ds(e))}get maxFeePerBlobGas(){const e=A(this,Kl);return e==null&&this.type===3?qr:e}set maxFeePerBlobGas(e){P(this,Kl,e==null?null:We(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=A(this,sc);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){F(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;r<e.length;r++)F(er(e[r],32),"invalid blobVersionedHash",`value[${r}]`,e[r])}P(this,sc,e)}get blobs(){return A(this,oc)==null?null:A(this,oc).map(e=>Object.assign({},e))}set blobs(e){if(e==null){P(this,oc,null);return}const r=[],n=[];for(let i=0;i<e.length;i++){const s=e[i];if(_l(s)){ae(A(this,Ko),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=xe(s);if(F(o.length<=jv,"blob is too large",`blobs[${i}]`,s),o.length!==jv){const l=new Uint8Array(jv);l.set(o),o=l}const a=A(this,Ko).blobToKzgCommitment(o),c=Ee(A(this,Ko).computeBlobKzgProof(o,a));r.push({data:Ee(o),commitment:Ee(a),proof:c}),n.push(K9(1,a))}else{const o=Ee(s.commitment);r.push({data:Ee(s.data),commitment:o,proof:Ee(s.proof)}),n.push(K9(1,o))}}P(this,oc,r),P(this,sc,n)}get kzg(){return A(this,Ko)}set kzg(e){P(this,Ko,e)}get hash(){return this.signature==null?null:rr(pe(this,zh,Zp).call(this,!0,!1))}get unsignedHash(){return rr(this.unsignedSerialized)}get from(){return this.signature==null?null:xh(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:us.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return pe(this,zh,Zp).call(this,!0,!0)}get unsignedSerialized(){return pe(this,zh,Zp).call(this,!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=A(this,Kl)!=null||A(this,sc);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ae(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ae(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ae(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const s=[];return this.type!=null?s.push(this.type):r?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Va.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Va;if(typeof e=="string"){const n=xe(e);if(n[0]>=127)return Va.from(zO(n));switch(n[0]){case 1:return Va.from(QO(n));case 2:return Va.from(HO(n));case 3:return Va.from(YO(n))}ae(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Va;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Fi.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(F(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),F(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(F(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),F(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Xs=new WeakMap,Ih=new WeakMap,Oh=new WeakMap,Uh=new WeakMap,Mh=new WeakMap,Ph=new WeakMap,Vh=new WeakMap,Fh=new WeakMap,Lh=new WeakMap,Dh=new WeakMap,Wh=new WeakMap,Zh=new WeakMap,Kl=new WeakMap,sc=new WeakMap,Ko=new WeakMap,oc=new WeakMap,zh=new WeakSet,Zp=function(t,e){ae(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return GO(this,r);case 1:return JO(this,r);case 2:return jO(this,r);case 3:return $O(this,r,e?this.blobs:null)}ae(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let ql=XO;function zp(t){return typeof t=="string"&&(t=Vr(t)),rr(At([Vr(xv),Vr(String(t.length)),t]))}function q9(t,e){const r=zp(t);return xh(r,e)}const KO=new RegExp("^bytes([0-9]+)$"),qO=new RegExp("^(u?int)([0-9]*)$"),eU=new RegExp("^(.*)\\[([0-9]*)\\]$");function e7(t,e,r){switch(t){case"address":return xe(r?ai(e,32):wt(e));case"string":return Vr(e);case"bytes":return xe(e);case"bool":return e=e?"0x01":"0x00",xe(r?ai(e,32):e)}let n=t.match(qO);if(n){let i=n[1]==="int",s=parseInt(n[2]||"256");return F((!n[2]||n[2]===String(s))&&s%8===0&&s!==0&&s<=256,"invalid number type","type",t),r&&(s=256),i&&(e=nh(e,s)),xe(ai(Hr(e),s/8))}if(n=t.match(KO),n){const i=parseInt(n[1]);return F(String(i)===n[1]&&i!==0&&i<=32,"invalid bytes type","type",t),F(Vs(e)===i,`invalid value for ${t}`,"value",e),r?xe(rh(e,32)):e}if(n=t.match(eU),n&&Array.isArray(e)){const i=n[1],s=parseInt(n[2]||String(e.length));F(s===e.length,`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(e7(i,a,!0))}),xe(At(o))}F(!1,"invalid type","type",t)}function Gp(t,e){F(t.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(e7(n,e[i]))}),Ee(At(r))}function t7(t,e){return rr(Gp(t,e))}function r7(t,e){return mn(Gp(t,e))}const n7=new Uint8Array(32);n7.fill(0);const tU=BigInt(-1),i7=BigInt(0),s7=BigInt(1),rU=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function nU(t){const e=xe(t),r=e.length%32;return r?At([e,n7.slice(r)]):Ee(e)}const iU=ci(s7,32),sU=ci(i7,32),o7={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},$v=["name","version","chainId","verifyingContract","salt"];function a7(t){return function(e){return F(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const oU={name:a7("name"),version:a7("version"),chainId:function(t){const e=We(t,"domain.chainId");return F(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):Ls(e)},verifyingContract:function(t){try{return wt(t).toLowerCase()}catch{}F(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=xe(t,"domain.salt");return F(e.length===32,'invalid domain value "salt"',"domain.salt",t),Ee(e)}};function Xv(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);F(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const i=Fs(rU,r?n-1:n),s=r?(i+s7)*tU:i7;return function(o){const a=We(o,"value");return F(a>=s&&a<=i,`value out-of-bounds for ${t}`,"value",a),ci(r?nh(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return F(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const i=xe(n);return F(i.length===r,`invalid length for ${t}`,"value",n),nU(n)}}}switch(t){case"address":return function(e){return ai(wt(e),32)};case"bool":return function(e){return e?iU:sU};case"bytes":return function(e){return rr(e)};case"string":return function(e){return Li(e)}}return null}function c7(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function Hp(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var jp,qo,Gh,Kv,l7;const aU=class qi{constructor(e){q(this,Kv),H(this,"primaryType"),q(this,jp),q(this,qo),q(this,Gh),P(this,qo,new Map),P(this,Gh,new Map);const r=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:l,type:u})=>{let{base:d,index:h}=Hp(u);return d==="int"&&!e.int&&(d="int256"),d==="uint"&&!e.uint&&(d="uint256"),{name:l,type:d+(h||"")}}),r.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),P(this,jp,JSON.stringify(s));for(const c in s){const l=new Set;for(const u of s[c]){F(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const d=Hp(u.type).base;F(d!==c,`circular type reference to ${JSON.stringify(d)}`,"types",e),!Xv(d)&&(F(n.has(d),`unknown type ${JSON.stringify(d)}`,"types",e),n.get(d).push(c),r.get(c).add(d))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);F(o.length!==0,"missing primary type","types",e),F(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),Ue(this,{primaryType:o[0]});function a(c,l){F(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const d of l)i.get(d).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of i){const u=Array.from(l);u.sort(),A(this,qo).set(c,c7(c,s[c])+u.map(d=>c7(d,s[d])).join(""))}}get types(){return JSON.parse(A(this,jp))}getEncoder(e){let r=A(this,Gh).get(e);return r||(r=pe(this,Kv,l7).call(this,e),A(this,Gh).set(e,r)),r}encodeType(e){const r=A(this,qo).get(e);return F(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return rr(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Xv(e))return n(e,r);const i=Hp(e).array;if(i)return F(i.count===-1||i.count===r.length,`array length mismatch; expected length ${i.count}`,"value",r),r.map(o=>this._visit(i.prefix,o,n));const s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});F(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new qi(e)}static getPrimaryType(e){return qi.from(e).primaryType}static hashStruct(e,r,n){return qi.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const i=o7[n];F(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>$v.indexOf(n.name)-$v.indexOf(i.name)),qi.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return At(["0x1901",qi.hashDomain(e),qi.from(r).hash(n)])}static hash(e,r,n){return rr(qi.encode(e,r,n))}static async resolveNames(e,r,n,i){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const s={};e.verifyingContract&&!er(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=qi.from(r);o.visit(n,(a,c)=>(a==="address"&&!er(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}}static getPayload(e,r,n){qi.hashDomain(e);const i={},s=[];$v.forEach(c=>{const l=e[c];l!=null&&(i[c]=oU[c](l),s.push({name:c,type:o7[c]}))});const o=qi.from(r);r=o.types;const a=Object.assign({},r);return F(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return Ee(xe(l));if(c.match(/^u?int/))return We(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return F(typeof l=="string","invalid string","value",l),l}F(!1,"unsupported type","type",c)})}}};jp=new WeakMap,qo=new WeakMap,Gh=new WeakMap,Kv=new WeakSet,l7=function(t){{const n=Xv(t);if(n)return n}const e=Hp(t).array;if(e){const n=e.prefix,i=this.getEncoder(n);return s=>{F(e.count===-1||e.count===s.length,`array length mismatch; expected length ${e.count}`,"value",s);let o=s.map(i);return A(this,qo).has(n)&&(o=o.map(rr)),rr(At(o))}}const r=this.types[t];if(r){const n=Li(A(this,qo).get(t));return i=>{const s=r.map(({name:o,type:a})=>{const c=this.getEncoder(a)(i[o]);return A(this,qo).has(a)?rr(c):c});return s.unshift(n),At(s)}}F(!1,`unknown type: ${t}`,"type",t)};let ac=aU;function u7(t,e,r,n){return xh(ac.hash(t,e,r),n)}function An(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const cU="external public payable override",lU=An(cU.split(" ")),d7="constant external internal payable private public pure view override",uU=An(d7.split(" ")),h7="constructor error event fallback function receive struct",f7=An(h7.split(" ")),p7="calldata memory storage payable indexed",dU=An(p7.split(" ")),hU="tuple returns",fU=[h7,p7,hU,d7].join(" "),pU=An(fU.split(" ")),mU={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},gU=new RegExp("^(\\s*)"),vU=new RegExp("^([0-9]+)"),yU=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),m7=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),g7=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var vn,hs,Qp,qv;const v7=class nN{constructor(e){q(this,Qp),q(this,vn),q(this,hs),P(this,vn,0),P(this,hs,e.slice())}get offset(){return A(this,vn)}get length(){return A(this,hs).length-A(this,vn)}clone(){return new nN(A(this,hs))}reset(){P(this,vn,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=pe(this,Qp,qv).call(this,A(this,vn)+1,e.match+1);return P(this,vn,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;A(this,vn)<e.match-1;){const n=this.peek().linkNext;r.push(pe(this,Qp,qv).call(this,A(this,vn)+1,n)),P(this,vn,n)}return P(this,vn,e.match+1),r}peek(){if(A(this,vn)>=A(this,hs).length)throw new Error("out-of-bounds");return A(this,hs)[A(this,vn)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return eh(this,vn)._++,e}toString(){const e=[];for(let r=A(this,vn);r<A(this,hs).length;r++){const n=A(this,hs)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};vn=new WeakMap,hs=new WeakMap,Qp=new WeakSet,qv=function(t=0,e=0){return new v7(A(this,hs).slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))};let Ks=v7;function ea(t){const e=[],r=o=>{const a=s<t.length?JSON.stringify(t[s]):"$EOI";throw new Error(`invalid token ${a} at ${s}: ${o}`)};let n=[],i=[],s=0;for(;s<t.length;){let o=t.substring(s),a=o.match(gU);a&&(s+=a[1].length,o=t.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};e.push(c);let l=mU[o[0]]||"";if(l){if(c.type=l,c.text=o[0],s++,l==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(l=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(l==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(l==="OPEN_BRACKET")c.type="BRACKET";else if(l==="CLOSE_BRACKET"){let u=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const d=e.pop().text;u=d+u,e[e.length-1].value=qe(d)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(yU),a){if(c.text=a[1],s+=c.text.length,pU.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(g7)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(vU),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new Ks(e.map(o=>Object.freeze(o)))}function y7(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Jp(t,e){if(e.peekKeyword(f7)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function qs(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function w7(t){let e=qs(t,uU);return y7(e,An("constant payable nonpayable".split(" "))),y7(e,An("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function eo(t,e){return t.popParams().map(r=>nn.from(r,e))}function b7(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return We(t.pop().text);throw new Error("invalid gas")}return null}function cc(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const wU=new RegExp(/^(.*)\[([0-9]*)\]$/);function k7(t){const e=t.match(g7);if(F(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);F(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);F(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Er={},Pn=Symbol.for("_ethers_internal"),_7="_ParamTypeInternal",E7="_ErrorInternal",C7="_EventInternal",S7="_ConstructorInternal",A7="_FallbackInternal",R7="_FunctionInternal",T7="_StructInternal";var Hh,Yp;const bU=class es{constructor(e,r,n,i,s,o,a,c){if(q(this,Hh),H(this,"name"),H(this,"type"),H(this,"baseType"),H(this,"indexed"),H(this,"components"),H(this,"arrayLength"),H(this,"arrayChildren"),ss(e,Er,"ParamType"),Object.defineProperty(this,Pn,{value:_7}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");Ue(this,{name:r,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(i=>n.arrayChildren.walk(i,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((i,s)=>n.components[s].walk(i,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],i=[e];return pe(this,Hh,Yp).call(this,n,e,r,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,r){if(es.isParamType(e))return e;if(typeof e=="string")try{return es.from(ea(e),r)}catch{F(!1,"invalid param type","obj",e)}else if(e instanceof Ks){let a="",c="",l=null;qs(e,An(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(p=>es.from(p)),a=`tuple(${l.map(p=>p.format()).join(",")})`):(a=k7(e.popType("TYPE")),c=a);let u=null,d=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new es(Er,"",a,c,null,l,d,u),d=p.value,a+=p.text,c="array",l=null}let h=null;if(qs(e,dU).has("indexed")){if(!r)throw new Error("");h=!0}const f=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new es(Er,f,a,c,h,l,d,u)}const n=e.name;F(!n||typeof n=="string"&&n.match(m7),"invalid name","obj.name",n);let i=e.indexed;i!=null&&(F(r,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,o=s.match(wU);if(o){const a=parseInt(o[2]||"-1"),c=es.from({type:o[1],components:e.components});return new es(Er,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){const a=e.components!=null?e.components.map(c=>es.from(c)):null;return new es(Er,n||"",s,"tuple",i,a,null,null)}return s=k7(e.type),new es(Er,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[Pn]===_7}};Hh=new WeakSet,Yp=function(t,e,r,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const s=this.arrayChildren,o=e.slice();o.forEach((a,c)=>{var l;pe(l=s,Hh,Yp).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}if(this.isTuple()){const s=this.components;let o;if(Array.isArray(e))o=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");o=s.map(a=>{if(!a.name)throw new Error("cannot use object value with unnamed components");if(!(a.name in e))throw new Error(`missing value for component ${a.name}`);return e[a.name]})}if(o.length!==this.components.length)throw new Error("array is wrong length");o.forEach((a,c)=>{var l;pe(l=s[c],Hh,Yp).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}const i=r(this.type,e);i.then?t.push(async function(){n(await i)}()):n(i)};let nn=bU;class to{constructor(e,r,n){H(this,"type"),H(this,"inputs"),ss(e,Er,"Fragment"),n=Object.freeze(n.slice()),Ue(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{to.from(JSON.parse(e))}catch{}return to.from(ea(e))}if(e instanceof Ks)switch(e.peekKeyword(f7)){case"constructor":return ru.from(e);case"error":return Di.from(e);case"event":return tu.from(e);case"fallback":case"receive":return $p.from(e);case"function":return nu.from(e);case"struct":return ro.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return ru.from(e);case"error":return Di.from(e);case"event":return tu.from(e);case"fallback":case"receive":return $p.from(e);case"function":return nu.from(e);case"struct":return ro.from(e)}ae(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}F(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return ru.isFragment(e)}static isError(e){return Di.isFragment(e)}static isEvent(e){return tu.isFragment(e)}static isFunction(e){return nu.isFragment(e)}static isStruct(e){return ro.isFragment(e)}}class eu extends to{constructor(e,r,n,i){super(e,r,i),H(this,"name"),F(typeof n=="string"&&n.match(m7),"invalid identifier","name",n),i=Object.freeze(i.slice()),Ue(this,{name:n})}}function jh(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}let Di=class W0 extends eu{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,Pn,{value:E7})}get selector(){return Li(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+jh(e,this.inputs)),r.join(" ")}static from(e){if(W0.isFragment(e))return e;if(typeof e=="string")return W0.from(ea(e));if(e instanceof Ks){const r=Jp("error",e),n=eo(e);return cc(e),new W0(Er,r,n)}return new W0(Er,e.name,e.inputs?e.inputs.map(nn.from):[])}static isFragment(e){return e&&e[Pn]===E7}},tu=class Pd extends eu{constructor(e,r,n,i){super(e,"event",r,n),H(this,"anonymous"),Object.defineProperty(this,Pn,{value:C7}),Ue(this,{anonymous:i})}get topicHash(){return Li(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("event"),r.push(this.name+jh(e,this.inputs)),e!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(e,r){return r=(r||[]).map(n=>nn.from(n)),new Pd(Er,e,r,!1).topicHash}static from(e){if(Pd.isFragment(e))return e;if(typeof e=="string")try{return Pd.from(ea(e))}catch{F(!1,"invalid event fragment","obj",e)}else if(e instanceof Ks){const r=Jp("event",e),n=eo(e,!0),i=!!qs(e,An(["anonymous"])).has("anonymous");return cc(e),new Pd(Er,r,n,i)}return new Pd(Er,e.name,e.inputs?e.inputs.map(r=>nn.from(r,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[Pn]===C7}},ru=class Z0 extends to{constructor(e,r,n,i,s){super(e,r,n),H(this,"payable"),H(this,"gas"),Object.defineProperty(this,Pn,{value:S7}),Ue(this,{payable:i,gas:s})}format(e){if(ae(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[`constructor${jh(e,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(e){if(Z0.isFragment(e))return e;if(typeof e=="string")try{return Z0.from(ea(e))}catch{F(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof Ks){qs(e,An(["constructor"]));const r=eo(e),n=!!qs(e,lU).has("payable"),i=b7(e);return cc(e),new Z0(Er,"constructor",r,n,i)}return new Z0(Er,"constructor",e.inputs?e.inputs.map(nn.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Pn]===S7}},$p=class ol extends to{constructor(e,r,n){super(e,"fallback",r),H(this,"payable"),Object.defineProperty(this,Pn,{value:A7}),Ue(this,{payable:n})}format(e){const r=this.inputs.length===0?"receive":"fallback";if(e==="json"){const n=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:n})}return`${r}()${this.payable?" payable":""}`}static from(e){if(ol.isFragment(e))return e;if(typeof e=="string")try{return ol.from(ea(e))}catch{F(!1,"invalid fallback fragment","obj",e)}else if(e instanceof Ks){const r=e.toString(),n=e.peekKeyword(An(["fallback","receive"]));if(F(n,"type must be fallback or receive","obj",r),e.popKeyword(An(["fallback","receive"]))==="receive"){const o=eo(e);return F(o.length===0,"receive cannot have arguments","obj.inputs",o),qs(e,An(["payable"])),cc(e),new ol(Er,[],!0)}let i=eo(e);i.length?F(i.length===1&&i[0].type==="bytes","invalid fallback inputs","obj.inputs",i.map(o=>o.format("minimal")).join(", ")):i=[nn.from("bytes")];const s=w7(e);if(F(s==="nonpayable"||s==="payable","fallback cannot be constants","obj.stateMutability",s),qs(e,An(["returns"])).has("returns")){const o=eo(e);F(o.length===1&&o[0].type==="bytes","invalid fallback outputs","obj.outputs",o.map(a=>a.format("minimal")).join(", "))}return cc(e),new ol(Er,i,s==="payable")}if(e.type==="receive")return new ol(Er,[],!0);if(e.type==="fallback"){const r=[nn.from("bytes")],n=e.stateMutability==="payable";return new ol(Er,r,n)}F(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Pn]===A7}},nu=class Vd extends eu{constructor(e,r,n,i,s,o){super(e,"function",r,i),H(this,"constant"),H(this,"outputs"),H(this,"stateMutability"),H(this,"payable"),H(this,"gas"),Object.defineProperty(this,Pn,{value:R7}),s=Object.freeze(s.slice()),Ue(this,{constant:n==="view"||n==="pure",gas:o,outputs:s,payable:n==="payable",stateMutability:n})}get selector(){return Li(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("function"),r.push(this.name+jh(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(jh(e,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(e,r){return r=(r||[]).map(n=>nn.from(n)),new Vd(Er,e,"view",r,[],null).selector}static from(e){if(Vd.isFragment(e))return e;if(typeof e=="string")try{return Vd.from(ea(e))}catch{F(!1,"invalid function fragment","obj",e)}else if(e instanceof Ks){const n=Jp("function",e),i=eo(e),s=w7(e);let o=[];qs(e,An(["returns"])).has("returns")&&(o=eo(e));const a=b7(e);return cc(e),new Vd(Er,n,s,i,o,a)}let r=e.stateMutability;return r==null&&(r="payable",typeof e.constant=="boolean"?(r="view",e.constant||(r="payable",typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable")),new Vd(Er,e.name,r,e.inputs?e.inputs.map(nn.from):[],e.outputs?e.outputs.map(nn.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[Pn]===R7}};class ro extends eu{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,Pn,{value:T7})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return ro.from(ea(e))}catch{F(!1,"invalid struct fragment","obj",e)}else if(e instanceof Ks){const r=Jp("struct",e),n=eo(e);return cc(e),new ro(Er,r,n)}return new ro(Er,e.name,e.inputs?e.inputs.map(nn.from):[])}static isFragment(e){return e&&e[Pn]===T7}}const Wi=new Map;Wi.set(0,"GENERIC_PANIC"),Wi.set(1,"ASSERT_FALSE"),Wi.set(17,"OVERFLOW"),Wi.set(18,"DIVIDE_BY_ZERO"),Wi.set(33,"ENUM_RANGE_ERROR"),Wi.set(34,"BAD_STORAGE_DATA"),Wi.set(49,"STACK_UNDERFLOW"),Wi.set(50,"ARRAY_RANGE_ERROR"),Wi.set(65,"OUT_OF_MEMORY"),Wi.set(81,"UNINITIALIZED_FUNCTION_CALL");const kU=new RegExp(/^bytes([0-9]*)$/),_U=new RegExp(/^(u?int)([0-9]*)$/);let e3=null,N7=1024;function EU(t,e,r,n){let i="missing revert data",s=null;const o=null;let a=null;if(r){i="execution reverted";const l=xe(r);if(r=Ee(r),l.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Ee(l.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Ee(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},s=`Panic due to ${Wi.get(u)||"UNKNOWN"}(${u})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const c={to:e.to?wt(e.to):null,data:e.data||"0x"};return e.from&&(c.from=wt(e.from)),cr(i,"CALL_EXCEPTION",{action:t,data:r,reason:s,transaction:c,invocation:o,revert:a})}var lc,iu;const CU=class n5{constructor(){q(this,lc)}getDefaultValue(e){const r=e.map(n=>pe(this,lc,iu).call(this,nn.from(n)));return new Op(r,"_").defaultValue()}encode(e,r){sp(r.length,e.length,"types/values length mismatch");const n=e.map(o=>pe(this,lc,iu).call(this,nn.from(o))),i=new Op(n,"_"),s=new cv;return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(s=>pe(this,lc,iu).call(this,nn.from(s)));return new Op(i,"_").decode(new tB(r,n,N7))}static _setDefaultMaxInflation(e){F(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),N7=e}static defaultAbiCoder(){return e3==null&&(e3=new n5),e3}static getBuiltinCallException(e,r,n){return EU(e,r,n,n5.defaultAbiCoder())}};lc=new WeakSet,iu=function(t){if(t.isArray())return new GI(pe(this,lc,iu).call(this,t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new Op(t.components.map(r=>pe(this,lc,iu).call(this,r)),t.name);switch(t.baseType){case"address":return new ZI(t.name);case"bool":return new HI(t.name);case"string":return new eO(t.name);case"bytes":return new jI(t.name);case"":return new YI(t.name)}let e=t.type.match(_U);if(e){let r=parseInt(e[2]||"256");return F(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new qI(r/8,e[1]==="int",t.name)}if(e=t.type.match(kU),e){let r=parseInt(e[1]);return F(r!==0&&r<=32,"invalid bytes length","param",t),new QI(r,t.name)}F(!1,"invalid type","type",t.type)};let su=CU;function x7(t){const e=Vr(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return rh(e,32)}function B7(t){const e=xe(t,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Ds(e.slice(0,r))}class t3{constructor(e,r,n){H(this,"fragment"),H(this,"name"),H(this,"signature"),H(this,"topic"),H(this,"args");const i=e.name,s=e.format();Ue(this,{fragment:e,name:i,signature:s,topic:r,args:n})}}class r3{constructor(e,r,n,i){H(this,"fragment"),H(this,"name"),H(this,"args"),H(this,"signature"),H(this,"selector"),H(this,"value");const s=e.name,o=e.format();Ue(this,{fragment:e,name:s,args:n,signature:o,selector:r,value:i})}}class n3{constructor(e,r,n){H(this,"fragment"),H(this,"name"),H(this,"args"),H(this,"signature"),H(this,"selector");const i=e.name,s=e.format();Ue(this,{fragment:e,name:i,args:n,signature:s,selector:r})}}class Xp{constructor(e){H(this,"hash"),H(this,"_isIndexed"),Ue(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const I7={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},O7={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&I7[t.toString()]&&(e=I7[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var no,io,so,Rn,ta,Kp,qp;const SU=class Fd{constructor(e){q(this,ta),H(this,"fragments"),H(this,"deploy"),H(this,"fallback"),H(this,"receive"),q(this,no),q(this,io),q(this,so),q(this,Rn);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,P(this,so,new Map),P(this,no,new Map),P(this,io,new Map);const n=[];for(const o of r)try{n.push(to.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}Ue(this,{fragments:Object.freeze(n)});let i=null,s=!1;P(this,Rn,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Ue(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(F(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=A(this,so);break;case"event":c=A(this,io);break;case"error":c=A(this,no);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||Ue(this,{deploy:ru.from("constructor()")}),Ue(this,{fallback:i,receive:s})}format(e){const r=e?"minimal":"full";return this.fragments.map(n=>n.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return su.defaultAbiCoder()}getFunctionName(e){const r=pe(this,ta,Kp).call(this,e,null,!1);return F(r,"no matching function","key",e),r.name}hasFunction(e){return!!pe(this,ta,Kp).call(this,e,null,!1)}getFunction(e,r){return pe(this,ta,Kp).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(A(this,so).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(A(this,so).get(i),n)}}getEventName(e){const r=pe(this,ta,qp).call(this,e,null,!1);return F(r,"no matching event","key",e),r.name}hasEvent(e){return!!pe(this,ta,qp).call(this,e,null,!1)}getEvent(e,r){return pe(this,ta,qp).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(A(this,io).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(A(this,io).get(i),n)}}getError(e,r){if(er(e)){const i=e.toLowerCase();if(O7[i])return Di.from(O7[i].signature);for(const s of A(this,no).values())if(i===s.selector)return s;return null}if(e.indexOf("(")===-1){const i=[];for(const[s,o]of A(this,no))s.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?Di.from("error Error(string)"):e==="Panic"?Di.from("error Panic(uint256)"):null;if(i.length>1){const s=i.map(o=>JSON.stringify(o.format())).join(", ");F(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}return e=Di.from(e).format(),e==="Error(string)"?Di.from("error Error(string)"):e==="Panic(uint256)"?Di.from("error Panic(uint256)"):A(this,no).get(e)||null}forEachError(e){const r=Array.from(A(this,no).keys());r.sort((n,i)=>n.localeCompare(i));for(let n=0;n<r.length;n++){const i=r[n];e(A(this,no).get(i),n)}}_decodeParams(e,r){return A(this,Rn).decode(e,r)}_encodeParams(e,r){return A(this,Rn).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);F(n,"unknown error","fragment",e),e=n}return F(tr(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,tr(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);F(n,"unknown error","fragment",e),e=n}return At([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);F(n,"unknown function","fragment",e),e=n}return F(tr(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,tr(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);F(n,"unknown function","fragment",e),e=n}return At([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const s=this.getFunction(e);F(s,"unknown function","fragment",e),e=s}let n="invalid length for result data";const i=Gr(r);if(i.length%32===0)try{return A(this,Rn).decode(e.outputs,i)}catch{n="could not decode result data"}ae(!1,n,"BAD_DATA",{value:Ee(i),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=xe(e,"data"),i=su.getBuiltinCallException("call",r,n);if(i.message.startsWith("execution reverted (unknown custom error)")){const o=Ee(n.slice(0,4)),a=this.getError(o);if(a)try{const c=A(this,Rn).decode(a.inputs,n.slice(4));i.revert={name:a.name,signature:a.format(),args:c},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const s=this.parseTransaction(r);return s&&(i.invocation={method:s.name,signature:s.signature,args:s.args}),i}encodeFunctionResult(e,r){if(typeof e=="string"){const n=this.getFunction(e);F(n,"unknown function","fragment",e),e=n}return Ee(A(this,Rn).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const s=this.getEvent(e);F(s,"unknown event","eventFragment",e),e=s}ae(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const i=(s,o)=>s.type==="string"?Li(o):s.type==="bytes"?rr(Ee(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=ci(o):s.type.match(/^bytes/)?o=rh(o,32):s.type==="address"&&A(this,Rn).encode(["address"],[o]),ai(Ee(o),32));for(r.forEach((s,o)=>{const a=e.inputs[o];if(!a.indexed){F(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?F(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);F(o,"unknown event","eventFragment",e),e=o}const n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),F(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Li(c));else if(o.type==="bytes")n.push(rr(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(A(this,Rn).encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:A(this,Rn).encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const f=this.getEvent(e);F(f,"unknown event","eventFragment",e),e=f}if(n!=null&&!e.anonymous){const f=e.topicHash;F(er(n[0],32)&&n[0].toLowerCase()===f,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const i=[],s=[],o=[];e.inputs.forEach((f,p)=>{f.indexed?f.type==="string"||f.type==="bytes"||f.baseType==="tuple"||f.baseType==="array"?(i.push(nn.from({type:"bytes32",name:f.name})),o.push(!0)):(i.push(f),o.push(!1)):(s.push(f),o.push(!1))});const a=n!=null?A(this,Rn).decode(i,At(n)):null,c=A(this,Rn).decode(s,r,!0),l=[],u=[];let d=0,h=0;return e.inputs.forEach((f,p)=>{let v=null;if(f.indexed)if(a==null)v=new Xp(null);else if(o[p])v=new Xp(a[h++]);else try{v=a[h++]}catch(m){v=m}else try{v=c[d++]}catch(m){v=m}l.push(v),u.push(f.name||null)}),Ml.fromItems(l,u)}parseTransaction(e){const r=xe(e.data,"tx.data"),n=We(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(Ee(r.slice(0,4)));if(!i)return null;const s=A(this,Rn).decode(i.inputs,r.slice(4));return new r3(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new t3(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=Ee(e),n=this.getError(tr(r,0,4));if(!n)return null;const i=A(this,Rn).decode(n.inputs,tr(r,4));return new n3(n,n.selector,i)}static from(e){return e instanceof Fd?e:typeof e=="string"?new Fd(JSON.parse(e)):typeof e.formatJson=="function"?new Fd(e.formatJson()):typeof e.format=="function"?new Fd(e.format("json")):new Fd(e)}};no=new WeakMap,io=new WeakMap,so=new WeakMap,Rn=new WeakMap,ta=new WeakSet,Kp=function(t,e,r){if(er(t)){const i=t.toLowerCase();for(const s of A(this,so).values())if(i===s.selector)return s;return null}if(t.indexOf("(")===-1){const i=[];for(const[s,o]of A(this,so))s.split("(")[0]===t&&i.push(o);if(e){const s=e.length>0?e[e.length-1]:null;let o=e.length,a=!0;gn.isTyped(s)&&s.type==="overrides"&&(a=!1,o--);for(let c=i.length-1;c>=0;c--){const l=i[c].inputs.length;l!==o&&(!a||l!==o-1)&&i.splice(c,1)}for(let c=i.length-1;c>=0;c--){const l=i[c].inputs;for(let u=0;u<e.length;u++)if(gn.isTyped(e[u])){if(u>=l.length){if(e[u].type==="overrides")continue;i.splice(c,1);break}if(e[u].type!==l[u].baseType){i.splice(c,1);break}}}}if(i.length===1&&e&&e.length!==i[0].inputs.length){const s=e[e.length-1];(s==null||Array.isArray(s)||typeof s!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&r){const s=i.map(o=>JSON.stringify(o.format())).join(", ");F(!1,`ambiguous function description (i.e. matches ${s})`,"key",t)}return i[0]}return A(this,so).get(nu.from(t).format())||null},qp=function(t,e,r){if(er(t)){const i=t.toLowerCase();for(const s of A(this,io).values())if(i===s.topicHash)return s;return null}if(t.indexOf("(")===-1){const i=[];for(const[s,o]of A(this,io))s.split("(")[0]===t&&i.push(o);if(e){for(let s=i.length-1;s>=0;s--)i[s].inputs.length<e.length&&i.splice(s,1);for(let s=i.length-1;s>=0;s--){const o=i[s].inputs;for(let a=0;a<e.length;a++)if(gn.isTyped(e[a])&&e[a].type!==o[a].baseType){i.splice(s,1);break}}}if(i.length===0)return null;if(i.length>1&&r){const s=i.map(o=>JSON.stringify(o.format())).join(", ");F(!1,`ambiguous event description (i.e. matches ${s})`,"key",t)}return i[0]}return A(this,io).get(tu.from(t).format())||null};let e1=SU;const U7=BigInt(0);function ou(t){return t??null}function Br(t){return t==null?null:t.toString()}class t1{constructor(e,r,n){H(this,"gasPrice"),H(this,"maxFeePerGas"),H(this,"maxPriorityFeePerGas"),Ue(this,{gasPrice:ou(e),maxFeePerGas:ou(r),maxPriorityFeePerGas:ou(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Br(e),maxFeePerGas:Br(r),maxPriorityFeePerGas:Br(n)}}}function uc(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Ee(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)!(i in t)||t[i]==null||(e[i]=We(t[i],`request.${i}`));const n="type,nonce".split(/,/);for(const i of n)!(i in t)||t[i]==null||(e[i]=qe(t[i],`request.${i}`));return t.accessList&&(e.accessList=ds(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(i=>_l(i)?Ee(i):Object.assign({},i))),e}var ra;class i3{constructor(e,r){H(this,"provider"),H(this,"number"),H(this,"hash"),H(this,"timestamp"),H(this,"parentHash"),H(this,"parentBeaconBlockRoot"),H(this,"nonce"),H(this,"difficulty"),H(this,"gasLimit"),H(this,"gasUsed"),H(this,"stateRoot"),H(this,"receiptsRoot"),H(this,"blobGasUsed"),H(this,"excessBlobGas"),H(this,"miner"),H(this,"prevRandao"),H(this,"extraData"),H(this,"baseFeePerGas"),q(this,ra),P(this,ra,e.transactions.map(n=>typeof n!="string"?new Qh(n,r):n)),Ue(this,{provider:r,hash:ou(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:ou(e.prevRandao),extraData:e.extraData,baseFeePerGas:ou(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return A(this,ra).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=A(this,ra).slice();return e.length===0?[]:(ae(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,parentBeaconBlockRoot:h,stateRoot:f,receiptsRoot:p,timestamp:v,transactions:m}=this;return{_type:"Block",baseFeePerGas:Br(e),difficulty:Br(r),extraData:n,gasLimit:Br(i),gasUsed:Br(s),blobGasUsed:Br(this.blobGasUsed),excessBlobGas:Br(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,timestamp:v,parentBeaconBlockRoot:h,stateRoot:f,receiptsRoot:p,transactions:m}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return A(this,ra).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=A(this,ra)[e];else{const n=e.toLowerCase();for(const i of A(this,ra))if(typeof i=="string"){if(i!==n)continue;r=i;break}else{if(i.hash===n)continue;r=i;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?await this.provider.getTransaction(r):r}getPrefetchedTransaction(e){const r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(const n of r)if(n.hash===e)return n;F(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return RU(this)}}ra=new WeakMap;class dc{constructor(e,r){H(this,"provider"),H(this,"transactionHash"),H(this,"blockHash"),H(this,"blockNumber"),H(this,"removed"),H(this,"address"),H(this,"data"),H(this,"topics"),H(this,"index"),H(this,"transactionIndex"),this.provider=r;const n=Object.freeze(e.topics.slice());Ue(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return ae(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return ae(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return ae(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return TU(this)}}var r1;class n1{constructor(e,r){H(this,"provider"),H(this,"to"),H(this,"from"),H(this,"contractAddress"),H(this,"hash"),H(this,"index"),H(this,"blockHash"),H(this,"blockNumber"),H(this,"logsBloom"),H(this,"gasUsed"),H(this,"blobGasUsed"),H(this,"cumulativeGasUsed"),H(this,"gasPrice"),H(this,"blobGasPrice"),H(this,"type"),H(this,"status"),H(this,"root"),q(this,r1),P(this,r1,Object.freeze(e.logs.map(i=>new dc(i,r))));let n=U7;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),Ue(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return A(this,r1)}toJSON(){const{to:e,from:r,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:d}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Br(this.cumulativeGasUsed),from:r,gasPrice:Br(this.gasPrice),blobGasUsed:Br(this.blobGasUsed),blobGasPrice:Br(this.blobGasPrice),gasUsed:Br(this.gasUsed),hash:i,index:s,logs:l,logsBloom:c,root:d,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return P7(this)}reorderedEvent(e){return ae(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),M7(this,e)}}r1=new WeakMap;var hc;const AU=class iN{constructor(e,r){H(this,"provider"),H(this,"blockNumber"),H(this,"blockHash"),H(this,"index"),H(this,"hash"),H(this,"type"),H(this,"to"),H(this,"from"),H(this,"nonce"),H(this,"gasLimit"),H(this,"gasPrice"),H(this,"maxPriorityFeePerGas"),H(this,"maxFeePerGas"),H(this,"maxFeePerBlobGas"),H(this,"data"),H(this,"value"),H(this,"chainId"),H(this,"signature"),H(this,"accessList"),H(this,"blobVersionedHashes"),q(this,hc),this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,P(this,hc,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:i,type:s,to:o,from:a,nonce:c,data:l,signature:u,accessList:d,blobVersionedHashes:h}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:e,blockHash:r,blobVersionedHashes:h,chainId:Br(this.chainId),data:l,from:a,gasLimit:Br(this.gasLimit),gasPrice:Br(this.gasPrice),hash:i,maxFeePerGas:Br(this.maxFeePerGas),maxPriorityFeePerGas:Br(this.maxPriorityFeePerGas),maxFeePerBlobGas:Br(this.maxFeePerBlobGas),nonce:c,signature:u,to:o,index:n,type:s,value:Br(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await zr({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,r){const n=e??1,i=r??0;let s=A(this,hc),o=-1,a=s===-1;const c=async()=>{if(a)return null;const{blockNumber:d,nonce:h}=await zr({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h<this.nonce){s=d;return}if(a)return null;const f=await this.getTransaction();if(!(f&&f.blockNumber!=null))for(o===-1&&(o=s-3,o<A(this,hc)&&(o=A(this,hc)));o<=d;){if(a)return null;const p=await this.provider.getBlock(o,!0);if(p==null)return;for(const v of p)if(v===this.hash)return;for(let v=0;v<p.length;v++){const m=await p.getTransaction(v);if(m.from===this.from&&m.nonce===this.nonce){if(a)return null;const w=await this.provider.getTransactionReceipt(m.hash);if(w==null||d-w.blockNumber+1<n)return;let _="replaced";m.data===this.data&&m.to===this.to&&m.value===this.value?_="repriced":m.data==="0x"&&m.from===m.to&&m.value===U7&&(_="cancelled"),ae(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:_==="replaced"||_==="cancelled",reason:_,replacement:m.replaceableTransaction(s),hash:m.hash,receipt:w})}}o++}},l=d=>{if(d==null||d.status!==0)return d;ae(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const f=[],p=()=>{f.forEach(m=>m())};if(f.push(()=>{a=!0}),i>0){const m=setTimeout(()=>{p(),h(cr("wait for transaction timeout","TIMEOUT"))},i);f.push(()=>{clearTimeout(m)})}const v=async m=>{if(await m.confirmations()>=n){p();try{d(l(m))}catch(w){h(w)}}};if(f.push(()=>{this.provider.off(this.hash,v)}),this.provider.on(this.hash,v),s>=0){const m=async()=>{try{await c()}catch(w){if(Tr(w,"TRANSACTION_REPLACED")){p(),h(w);return}}a||this.provider.once("block",m)};f.push(()=>{this.provider.off("block",m)}),this.provider.once("block",m)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ae(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),P7(this)}reorderedEvent(e){return ae(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ae(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),M7(this,e)}replaceableTransaction(e){F(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new iN(this,this.provider);return P(r,hc,e),r}};hc=new WeakMap;let Qh=AU;function RU(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function M7(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function P7(t){return{orphan:"drop-transaction",tx:t}}function TU(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class Jh extends dc{constructor(e,r,n){super(e,e.provider),H(this,"interface"),H(this,"fragment"),H(this,"args");const i=r.decodeEventLog(n,e.data,e.topics);Ue(this,{args:i,fragment:n,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class i1 extends dc{constructor(e,r){super(e,e.provider),H(this,"error"),Ue(this,{error:r})}}var Yh;class s3 extends n1{constructor(e,r,n){super(n,r),q(this,Yh),P(this,Yh,e)}get logs(){return super.logs.map(e=>{const r=e.topics.length?A(this,Yh).getEvent(e.topics[0]):null;if(r)try{return new Jh(e,A(this,Yh),r)}catch(n){return new i1(e,n)}return e})}}Yh=new WeakMap;var s1;class $h extends Qh{constructor(e,r,n){super(n,r),q(this,s1),P(this,s1,e)}async wait(e,r){const n=await super.wait(e,r);return n==null?null:new s3(A(this,s1),this.provider,n)}}s1=new WeakMap;class o1 extends dp{constructor(e,r,n,i){super(e,r,n),H(this,"log"),Ue(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class o3 extends o1{constructor(e,r,n,i,s){super(e,r,n,new Jh(s,e.interface,i));const o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);Ue(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const V7=BigInt(0);function F7(t){return t&&typeof t.call=="function"}function L7(t){return t&&typeof t.estimateGas=="function"}function a1(t){return t&&typeof t.resolveName=="function"}function D7(t){return t&&typeof t.sendTransaction=="function"}function W7(t){if(t!=null){if(a1(t))return t;if(t.provider)return t.provider}}var c1;class NU{constructor(e,r,n){if(q(this,c1),H(this,"fragment"),Ue(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const i=fc(e.runner,"resolveName"),s=a1(i)?i:null;P(this,c1,async function(){const o=await Promise.all(r.inputs.map((a,c)=>n[c]==null?null:a.walkAsync(n[c],(l,u)=>l==="address"?Array.isArray(u)?Promise.all(u.map(d=>jr(d,s))):jr(u,s):u)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return A(this,c1)}}c1=new WeakMap;function fc(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function pc(t){return t==null?null:t.provider||null}async function a3(t,e){const r=gn.dereference(t,"overrides");F(typeof r=="object","invalid overrides parameter","overrides",t);const n=uc(r);return F(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),F(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function Z7(t,e,r){const n=fc(t,"resolveName"),i=a1(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(r[o],(a,c)=>(c=gn.dereference(c,a),a==="address"?jr(c,i):c))))}function xU(t){const e=async function(o){const a=await a3(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await jr(a.from,W7(t.runner)));const c=t.interface,l=We(a.value||V7,"overrides.value")===V7,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&F(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),F(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const d=c.receive||c.fallback&&c.fallback.payable;return F(d||l,"cannot send value to non-payable fallback","overrides.value",a.value),F(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=fc(t.runner,"call");ae(F7(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw th(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;ae(D7(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=pc(t.runner);return new $h(t.interface,l,c)},i=async function(o){const a=fc(t.runner,"estimateGas");return ae(L7(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return Ue(s,{_contract:t,estimateGas:i,populateTransaction:e,send:n,staticCall:r}),s}function BU(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return ae(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let d={};if(u.inputs.length+1===l.length&&(d=await a3(l.pop()),d.from&&(d.from=await jr(d.from,W7(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await Z7(t.runner,u.inputs,l);return Object.assign({},d,await zr({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},i=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},s=async function(...l){const u=t.runner;ae(D7(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await u.sendTransaction(await n(...l)),h=pc(t.runner);return new $h(t.interface,h,d)},o=async function(...l){const u=fc(t.runner,"estimateGas");return ae(L7(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=fc(t.runner,"call");ae(F7(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await n(...l);let h="0x";try{h=await u.call(d)}catch(p){throw th(p)&&p.data?t.interface.makeError(p.data,d):p}const f=r(...l);return t.interface.decodeFunctionResult(f,h)},c=async(...l)=>r(...l).constant?await i(...l):await s(...l);return Ue(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return ae(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function IU(t,e){const r=function(...i){const s=t.interface.getEvent(e,i);return ae(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new NU(t,r(...i),i)};return Ue(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=t.interface.getEvent(e);return ae(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}const l1=Symbol.for("_ethersInternal_contract"),z7=new WeakMap;function OU(t,e){z7.set(t[l1],e)}function $n(t){return z7.get(t[l1])}function UU(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function c3(t,e){let r,n=null;if(Array.isArray(e)){const s=function(o){if(er(o,32))return o;const a=t.interface.getEvent(o);return F(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?r=[null]:typeof e=="string"?er(e,32)?r=[e]:(n=t.interface.getEvent(e),F(n,"unknown fragment","event",e),r=[n.topicHash]):UU(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):F(!1,"unknown event name","event",e);r=r.map(s=>{if(s==null)return null;if(Array.isArray(s)){const o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});const i=r.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:r}}async function Xh(t,e){const{subs:r}=$n(t);return r.get((await c3(t,e)).tag)||null}async function G7(t,e,r){const n=pc(t.runner);ae(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:i,tag:s,topics:o}=await c3(t,r),{addr:a,subs:c}=$n(t);let l=c.get(s);if(!l){const u={address:a||t,topics:o},d=f=>{let p=i;if(p==null)try{p=t.interface.getEvent(f.topics[0])}catch{}if(p){const v=p,m=i?t.interface.decodeEventLog(i,f.data,f.topics):[];u3(t,r,m,w=>new o3(t,w,r,v,f))}else u3(t,r,[],v=>new o1(t,v,r,f))};let h=[];l={tag:s,listeners:[],start:()=>{h.length||h.push(n.on(u,d))},stop:async()=>{if(h.length==0)return;let f=h;h=[],await Promise.all(f),n.off(u,d)}},c.set(s,l)}return l}let l3=Promise.resolve();async function MU(t,e,r,n){await l3;const i=await Xh(t,e);if(!i)return!1;const s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),$n(t).subs.delete(i.tag)),s>0}async function u3(t,e,r,n){try{await l3}catch{}const i=MU(t,e,r,n);return l3=i,await i}const u1=["then"];var H7;H7=l1;let Kh=class ig{constructor(e,r,n,i){H(this,"target"),H(this,"interface"),H(this,"runner"),H(this,"filters"),H(this,H7),H(this,"fallback"),F(typeof e=="string"||Ip(e),"invalid value for Contract target","target",e),n==null&&(n=null);const s=e1.from(r);Ue(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,l1,{value:{}});let o,a=null,c=null;if(i){const d=pc(n);c=new $h(this.interface,d,i)}let l=new Map;if(typeof e=="string")if(er(e))a=e,o=Promise.resolve(e);else{const d=fc(n,"resolveName");if(!a1(d))throw cr("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=d.resolveName(e).then(h=>{if(h==null)throw cr("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return $n(this).addr=h,h})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return $n(this).addr=d,d});OU(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(d,h,f)=>{if(typeof h=="symbol"||u1.indexOf(h)>=0)return Reflect.get(d,h,f);try{return this.getEvent(h)}catch(p){if(!Tr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(d,h)=>u1.indexOf(h)>=0?Reflect.has(d,h):Reflect.has(d,h)||this.interface.hasEvent(String(h))});return Ue(this,{filters:u}),Ue(this,{fallback:s.receive||s.fallback?xU(this):null}),new Proxy(this,{get:(d,h,f)=>{if(typeof h=="symbol"||h in d||u1.indexOf(h)>=0)return Reflect.get(d,h,f);try{return d.getFunction(h)}catch(p){if(!Tr(p,"INVALID_ARGUMENT")||p.argument!=="key")throw p}},has:(d,h)=>typeof h=="symbol"||h in d||u1.indexOf(h)>=0?Reflect.has(d,h):d.interface.hasFunction(h)})}connect(e){return new ig(this.target,this.interface,e)}attach(e){return new ig(e,this.interface,this.runner)}async getAddress(){return await $n(this).addrPromise}async getDeployedCode(){const e=pc(this.runner);ae(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=pc(this.runner);return ae(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((n,i)=>{const s=async()=>{try{if(await this.getDeployedCode()!=null)return n(this);r.once("block",s)}catch(o){i(o)}};s()})}deploymentTransaction(){return $n(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),BU(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),IU(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:i,addrPromise:s}=$n(this),o=i||await s,{fragment:a,topics:c}=await c3(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=pc(this.runner);return ae(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(d=>{let h=a;if(h==null)try{h=this.interface.getEvent(d.topics[0])}catch{}if(h)try{return new Jh(d,this.interface,h)}catch(f){return new i1(d,f)}return new dc(d,u)})}async on(e,r){const n=await G7(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await G7(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await u3(this,e,r,null)}async listenerCount(e){if(e){const i=await Xh(this,e);return i?i.listeners.length:0}const{subs:r}=$n(this);let n=0;for(const{listeners:i}of r.values())n+=i.length;return n}async listeners(e){if(e){const i=await Xh(this,e);return i?i.listeners.map(({listener:s})=>s):[]}const{subs:r}=$n(this);let n=[];for(const{listeners:i}of r.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,r){const n=await Xh(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(r==null||n.listeners.length===0)&&(n.stop(),$n(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await Xh(this,e);if(!r)return this;r.stop(),$n(this).subs.delete(r.tag)}else{const{subs:r}=$n(this);for(const{tag:n,stop:i}of r.values())i(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends ig{constructor(i,s=null){super(i,e,s)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};function PU(){return Kh}class na extends PU(){}class d1{constructor(e,r,n){H(this,"interface"),H(this,"bytecode"),H(this,"runner");const i=e1.from(e);r instanceof Uint8Array||(typeof r=="object"&&(r=r.object),r.startsWith("0x")||(r="0x"+r)),r=Ee(xe(r)),Ue(this,{bytecode:r,interface:i,runner:n||null})}attach(e){return new Kh(e,this.interface,this.runner)}async getDeployTransaction(...e){let r={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(r=await a3(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const i=await Z7(this.runner,n.inputs,e),s=At([this.bytecode,this.interface.encodeDeploy(i)]);return Object.assign({},r,{data:s})}async deploy(...e){const r=await this.getDeployTransaction(...e);ae(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(r),i=Bp(n);return new Kh(i,this.interface,this.runner,n)}connect(e){return new d1(this.interface,this.bytecode,e)}static fromSolidity(e,r){F(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let i="";return e.bytecode?i=e.bytecode:e.evm&&e.evm.bytecode&&(i=e.evm.bytecode),new this(n,i,r)}}function d3(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):F(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class h3{constructor(e){H(this,"name"),Ue(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const j7=new RegExp("^(ipfs)://(.*)$","i"),Q7=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),j7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var mc,au,gc,cu,f3,J7;const p3=class i5{constructor(e,r,n){q(this,gc),H(this,"provider"),H(this,"address"),H(this,"name"),q(this,mc),q(this,au),Ue(this,{provider:e,address:r,name:n}),P(this,mc,null),P(this,au,new na(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return A(this,mc)==null&&P(this,mc,(async()=>{try{return await A(this,au).supportsInterface("0x9061b923")}catch(e){if(Tr(e,"CALL_EXCEPTION"))return!1;throw P(this,mc,null),e}})()),await A(this,mc)}async getAddress(e){if(e==null&&(e=60),e===60)try{const s=await pe(this,gc,cu).call(this,"addr(bytes32)");return s==null||s===tc?null:s}catch(s){if(Tr(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648;const o=await pe(this,gc,cu).call(this,"addr(bytes32,uint)",[s]);if(er(o,20))return wt(o)}let r=null;for(const s of this.provider.plugins)if(s instanceof h3&&s.supportsCoinType(e)){r=s;break}if(r==null)return null;const n=await pe(this,gc,cu).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const i=await r.decodeAddress(e,n);if(i!=null)return i;ae(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await pe(this,gc,cu).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await pe(this,gc,cu).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const i=r[1]==="e3010170"?"ipfs":"ipns",s=parseInt(r[4],16);if(r[5].length===s*2)return`${i}://${up("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;ae(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<Q7.length;n++){const i=r.match(Q7[n]);if(i==null)continue;const s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{const o=d3(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{const o=s==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:r});const a=await this.getAddress();if(a==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};const l=c[1],u=new na(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(s==="erc721"){const v=await u.ownerOf(l);if(a!==v)return e.push({type:"!owner",value:v}),{url:null,linkage:e};e.push({type:"owner",value:v})}else if(s==="erc1155"){const v=await u.balanceOf(a,l);if(!v)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:v.toString()})}let d=await u[o](l);if(d==null||d==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:d}),s==="erc1155"&&(d=d.replace("{id}",ci(l,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=d3(d)),e.push({type:"metadata-url",value:d});let h={};const f=await new pn(d).send();f.assertOk();try{h=f.bodyJson}catch{try{e.push({type:"!metadata",value:f.bodyText})}catch{const v=f.body;return v&&e.push({type:"!metadata",value:Ee(v)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!h)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(h)});let p=h.image;if(typeof p!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!p.match(/^(https:\/\/|data:)/i)){if(p.match(j7)==null)return e.push({type:"!imageUrl-ipfs",value:p}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:p}),p=d3(p)}return e.push({type:"url",value:p}),{linkage:e,url:p}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const r=await e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return ae(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address}static async fromName(e,r){var n;let i=r;for(;;){if(i===""||i==="."||r!=="eth"&&i==="eth")return null;const s=await pe(n=i5,f3,J7).call(n,e,i);if(s!=null){const o=new i5(e,s,r);return i!==r&&!await o.supportsWildcard()?null:o}i=i.split(".").slice(1).join(".")}}};mc=new WeakMap,au=new WeakMap,gc=new WeakSet,cu=async function(t,e){e=(e||[]).slice();const r=A(this,au).interface;e.unshift(Nh(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(t),ae(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[Gv(this.name,255),r.encodeFunctionData(n,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const i=await A(this,au)[t](...e);return n?r.decodeFunctionResult(n,i)[0]:i}catch(i){if(!Tr(i,"CALL_EXCEPTION"))throw i}return null},f3=new WeakSet,J7=async function(t,e){const r=await p3.getEnsAddress(t);try{const n=await new na(r,["function resolver(bytes32) view returns (address)"],t).resolver(Nh(e),{enableCcipRead:!0});return n===tc?null:n}catch(n){throw n}return null},q(p3,f3);let h1=p3;const Y7=BigInt(0);function Rt(t,e){return function(r){return r==null?e:t(r)}}function f1(t,e){return r=>{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function qh(t,e){return r=>{const n={};for(const i in t){let s=i;if(e&&i in e&&!(s in r)){for(const o of e[i])if(o in r){s=o;break}}try{const o=t[i](r[s]);o!==void 0&&(n[i]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";ae(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:r})}}return n}}function VU(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}F(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function lu(t){return F(er(t,!0),"invalid data","value",t),t}function sn(t){return F(er(t,32),"invalid hash","value",t),t}const FU=qh({address:wt,blockHash:sn,blockNumber:qe,data:lu,index:qe,removed:Rt(VU,!1),topics:f1(sn),transactionHash:sn,transactionIndex:qe},{index:["logIndex"]});function LU(t){return FU(t)}const DU=qh({hash:Rt(sn),parentHash:sn,parentBeaconBlockRoot:Rt(sn,null),number:qe,timestamp:qe,nonce:Rt(lu),difficulty:We,gasLimit:We,gasUsed:We,stateRoot:Rt(sn,null),receiptsRoot:Rt(sn,null),blobGasUsed:Rt(We,null),excessBlobGas:Rt(We,null),miner:Rt(wt),prevRandao:Rt(sn,null),extraData:lu,baseFeePerGas:Rt(We)},{prevRandao:["mixHash"]});function WU(t){const e=DU(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:$7(r)),e}const ZU=qh({transactionIndex:qe,blockNumber:qe,transactionHash:sn,address:wt,topics:f1(sn),data:lu,index:qe,blockHash:sn},{index:["logIndex"]});function zU(t){return ZU(t)}const GU=qh({to:Rt(wt,null),from:Rt(wt,null),contractAddress:Rt(wt,null),index:qe,root:Rt(Ee),gasUsed:We,blobGasUsed:Rt(We,null),logsBloom:Rt(lu),blockHash:sn,hash:sn,logs:f1(zU),blockNumber:qe,cumulativeGasUsed:We,effectiveGasPrice:Rt(We),blobGasPrice:Rt(We,null),status:Rt(qe),type:Rt(qe,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function HU(t){return GU(t)}function $7(t){t.to&&We(t.to)===Y7&&(t.to="0x0000000000000000000000000000000000000000");const e=qh({hash:sn,index:Rt(qe,void 0),type:r=>r==="0x"||r==null?0:qe(r),accessList:Rt(ds,null),blobVersionedHashes:Rt(f1(sn,!0),null),blockHash:Rt(sn,null),blockNumber:Rt(qe,null),transactionIndex:Rt(qe,null),from:wt,gasPrice:Rt(We),maxPriorityFeePerGas:Rt(We),maxFeePerGas:Rt(We),maxFeePerBlobGas:Rt(We,null),gasLimit:We,to:Rt(wt,null),value:We,nonce:qe,data:lu,creates:Rt(wt,null),chainId:Rt(We,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=Bp(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Fi.from(t.signature):e.signature=Fi.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&We(e.blockHash)===Y7&&(e.blockHash=null),e}const jU="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class oo{constructor(e){H(this,"name"),Ue(this,{name:e})}clone(){return new oo(this.name)}}class uu extends oo{constructor(e,r){e==null&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`),H(this,"effectiveBlock"),H(this,"txBase"),H(this,"txCreate"),H(this,"txDataZero"),H(this,"txDataNonzero"),H(this,"txAccessListStorageKey"),H(this,"txAccessListAddress");const n={effectiveBlock:e};function i(s,o){let a=(r||{})[s];a==null&&(a=o),F(typeof a=="number",`invalud value for ${s}`,"costs",r),n[s]=a}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),Ue(this,n)}clone(){return new uu(this.effectiveBlock,this)}}class du extends oo{constructor(e,r){super("org.ethers.plugins.network.Ens"),H(this,"address"),H(this,"targetNetwork"),Ue(this,{address:e||jU,targetNetwork:r??1})}clone(){return new du(this.address,this.targetNetwork)}}var hu;const QU=class sN extends oo{constructor(e){super("org.ethers.plugins.network.FeeData"),q(this,hu),P(this,hu,e)}get feeDataFunc(){return A(this,hu)}async getFeeData(e){return await A(this,hu).call(this,e)}clone(){return new sN(A(this,hu))}};hu=new WeakMap;let X7=QU;var p1,m1;class m3 extends oo{constructor(e,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),q(this,p1),q(this,m1),P(this,p1,e),P(this,m1,r)}get url(){return A(this,p1)}get processFunc(){return A(this,m1)}clone(){return this}}p1=new WeakMap,m1=new WeakMap;const g3=new Map;var ef,tf,vc;const JU=class z0{constructor(e,r){q(this,ef),q(this,tf),q(this,vc),P(this,ef,e),P(this,tf,We(r)),P(this,vc,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return A(this,ef)}set name(e){P(this,ef,e)}get chainId(){return A(this,tf)}set chainId(e){P(this,tf,We(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===We(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===We(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===We(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(A(this,vc).values())}attachPlugin(e){if(A(this,vc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return A(this,vc).set(e.name,e.clone()),this}getPlugin(e){return A(this,vc).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new z0(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new uu;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){const i=ds(e.accessList);for(const s in i)n+=r.txAccessListAddress+r.txAccessListStorageKey*i[s].storageKeys.length}return n}static from(e){if(YU(),e==null)return z0.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=g3.get(e);if(r)return r();if(typeof e=="bigint")return new z0("unknown",e);F(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){F(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new z0(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new du(e.ensAddress,e.ensNetwork)),r}F(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=g3.get(e);n&&F(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),g3.set(e,r)}};ef=new WeakMap,tf=new WeakMap,vc=new WeakMap;let Fr=JU;function K7(t,e){const r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function q7(t){return new m3(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let i;try{const[s,o]=await Promise.all([n.send(),e()]);i=s;const a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:K7(a.maxFee,9),maxPriorityFeePerGas:K7(a.maxPriorityFee,9)}}catch(s){ae(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}let ek=!1;function YU(){if(ek)return;ek=!0;function t(e,r,n){const i=function(){const s=new Fr(e,r);return n.ensNetwork!=null&&s.attachPlugin(new du(null,n.ensNetwork)),s.attachPlugin(new uu),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};Fr.register(e,i),Fr.register(r,i),n.altNames&&n.altNames.forEach(s=>{Fr.register(s,i)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[q7("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[q7("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function v3(t){return JSON.parse(JSON.stringify(t))}var ia,Zi,yc,ao,rf,g1;class $U{constructor(e){q(this,rf),q(this,ia),q(this,Zi),q(this,yc),q(this,ao),P(this,ia,e),P(this,Zi,null),P(this,yc,4e3),P(this,ao,-2)}get pollingInterval(){return A(this,yc)}set pollingInterval(e){P(this,yc,e)}start(){A(this,Zi)||(P(this,Zi,A(this,ia)._setTimeout(pe(this,rf,g1).bind(this),A(this,yc))),pe(this,rf,g1).call(this))}stop(){A(this,Zi)&&(A(this,ia)._clearTimeout(A(this,Zi)),P(this,Zi,null))}pause(e){this.stop(),e&&P(this,ao,-2)}resume(){this.start()}}ia=new WeakMap,Zi=new WeakMap,yc=new WeakMap,ao=new WeakMap,rf=new WeakSet,g1=async function(){try{const t=await A(this,ia).getBlockNumber();if(A(this,ao)===-2){P(this,ao,t);return}if(t!==A(this,ao)){for(let e=A(this,ao)+1;e<=t;e++){if(A(this,Zi)==null)return;await A(this,ia).emit("block",e)}P(this,ao,t)}}catch{}A(this,Zi)!=null&&P(this,Zi,A(this,ia)._setTimeout(pe(this,rf,g1).bind(this),A(this,yc)))};var fu,pu,wc;class y3{constructor(e){q(this,fu),q(this,pu),q(this,wc),P(this,fu,e),P(this,wc,!1),P(this,pu,r=>{this._poll(r,A(this,fu))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){A(this,wc)||(P(this,wc,!0),A(this,pu).call(this,-2),A(this,fu).on("block",A(this,pu)))}stop(){A(this,wc)&&(P(this,wc,!1),A(this,fu).off("block",A(this,pu)))}pause(e){this.stop()}resume(){this.start()}}fu=new WeakMap,pu=new WeakMap,wc=new WeakMap;var nf,sa;class XU extends y3{constructor(e,r){super(e),q(this,nf),q(this,sa),P(this,nf,r),P(this,sa,-2)}pause(e){e&&P(this,sa,-2),super.pause(e)}async _poll(e,r){const n=await r.getBlock(A(this,nf));n!=null&&(A(this,sa)===-2?P(this,sa,n.number):n.number>A(this,sa)&&(r.emit(A(this,nf),n.number),P(this,sa,n.number)))}}nf=new WeakMap,sa=new WeakMap;var w3;class KU extends y3{constructor(e,r){super(e),q(this,w3),P(this,w3,v3(r))}async _poll(e,r){throw new Error("@TODO")}}w3=new WeakMap;var sf;class qU extends y3{constructor(e,r){super(e),q(this,sf),P(this,sf,r)}async _poll(e,r){const n=await r.getTransactionReceipt(A(this,sf));n&&r.emit(A(this,sf),n)}}sf=new WeakMap;var oa,of,af,bc,zi,b3,tk;class k3{constructor(e,r){q(this,b3),q(this,oa),q(this,of),q(this,af),q(this,bc),q(this,zi),P(this,oa,e),P(this,of,v3(r)),P(this,af,pe(this,b3,tk).bind(this)),P(this,bc,!1),P(this,zi,-2)}start(){A(this,bc)||(P(this,bc,!0),A(this,zi)===-2&&A(this,oa).getBlockNumber().then(e=>{P(this,zi,e)}),A(this,oa).on("block",A(this,af)))}stop(){A(this,bc)&&(P(this,bc,!1),A(this,oa).off("block",A(this,af)))}pause(e){this.stop(),e&&P(this,zi,-2)}resume(){this.start()}}oa=new WeakMap,of=new WeakMap,af=new WeakMap,bc=new WeakMap,zi=new WeakMap,b3=new WeakSet,tk=async function(t){if(A(this,zi)===-2)return;const e=v3(A(this,of));e.fromBlock=A(this,zi)+1,e.toBlock=t;const r=await A(this,oa).getLogs(e);if(r.length===0){A(this,zi)<t-60&&P(this,zi,t-60);return}for(const n of r)A(this,oa).emit(A(this,of),n),P(this,zi,n.blockNumber)};const eM=BigInt(2),tM=10;function v1(t){return t&&typeof t.then=="function"}function y1(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}class mu{constructor(e){H(this,"name"),Ue(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function rM(t){return JSON.parse(JSON.stringify(t))}function _3(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function E3(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(er(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:y1("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:y1("orphan",r),filter:rM(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(i=>i==null?null:Array.isArray(i)?_3(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(r.address){const i=[],s=[],o=a=>{er(a)?i.push(a):s.push((async()=>{i.push(await jr(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),s.length&&await Promise.all(s),n.address=_3(i.map(a=>a.toLowerCase()))}return{filter:n,tag:y1("event",n),type:"event"}}F(!1,"unknown ProviderEvent","event",t)}function C3(){return new Date().getTime()}const nM={cacheTimeout:250,pollingInterval:4e3};var Tn,kc,Nn,cf,fi,gu,_c,aa,w1,Gi,lf,uf,jt,Xn,S3,A3,df,R3,hf,b1;class vu{constructor(e,r){if(q(this,jt),q(this,Tn),q(this,kc),q(this,Nn),q(this,cf),q(this,fi),q(this,gu),q(this,_c),q(this,aa),q(this,w1),q(this,Gi),q(this,lf),q(this,uf),P(this,uf,Object.assign({},nM,r||{})),e==="any")P(this,gu,!0),P(this,fi,null);else if(e){const n=Fr.from(e);P(this,gu,!1),P(this,fi,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else P(this,gu,!1),P(this,fi,null);P(this,aa,-1),P(this,_c,new Map),P(this,Tn,new Map),P(this,kc,new Map),P(this,Nn,null),P(this,cf,!1),P(this,w1,1),P(this,Gi,new Map),P(this,lf,!1)}get pollingInterval(){return A(this,uf).pollingInterval}get provider(){return this}get plugins(){return Array.from(A(this,kc).values())}attachPlugin(e){if(A(this,kc).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return A(this,kc).set(e.name,e.connect(this)),this}getPlugin(e){return A(this,kc).get(e)||null}get disableCcipRead(){return A(this,lf)}set disableCcipRead(e){P(this,lf,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],l=c.replace("{sender}",i).replace("{data}",s),u=new pn(l);c.indexOf("{data}")===-1&&(u.body={data:s,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:a,urls:n});let d="unknown error",h;try{h=await u.send()}catch(f){o.push(f.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:f}});continue}try{const f=h.bodyJson;if(f.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:f}),f.data;f.message&&(d=f.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:f})}catch{}ae(h.statusCode<400||h.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:d}}),o.push(d)}ae(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new i3(WU(e),this)}_wrapLog(e,r){return new dc(LU(e),this)}_wrapTransactionReceipt(e,r){return new n1(HU(e),this)}_wrapTransactionResponse(e,r){return new Qh($7(e),this)}_detectNetwork(){ae(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){ae(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=qe(await pe(this,jt,Xn).call(this,{method:"getBlockNumber"}),"%response");return A(this,aa)>=0&&P(this,aa,e),e}_getAddress(e){return jr(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(er(e))return er(e,32)?e:Ls(e);if(typeof e=="bigint"&&(e=qe(e,"blockTag")),typeof e=="number")return e>=0?Ls(e):A(this,aa)>=0?Ls(A(this,aa)+e):this.getBlockNumber().then(r=>Ls(r+e));F(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?_3(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,l,u)=>{let d;switch(c.length){case 0:break;case 1:d=c[0];break;default:c.sort(),d=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const h={};return d&&(h.address=d),r.length&&(h.topics=r),l&&(h.fromBlock=l),u&&(h.toBlock=u),n&&(h.blockHash=n),h};let s=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){const r=uc(e),n=[];if(["to","from"].forEach(i=>{if(r[i]==null)return;const s=jr(r[i],this);v1(s)?n.push(async function(){r[i]=await s}()):r[i]=s}),r.blockTag!=null){const i=this._getBlockTag(r.blockTag);v1(i)?n.push(async function(){r.blockTag=await i}()):r.blockTag=i}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(A(this,fi)==null){const i=(async()=>{try{const s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw A(this,fi)===i&&P(this,fi,null),s}})();return P(this,fi,i),(await i).clone()}const e=A(this,fi),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(A(this,gu)?(this.emit("network",n,r),A(this,fi)===e&&P(this,fi,Promise.resolve(n))):ae(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:i,gasPrice:s,priorityFee:o}=await zr({_block:pe(this,jt,R3).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await pe(this,jt,Xn).call(this,{method:"getGasPrice"});return We(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await pe(this,jt,Xn).call(this,{method:"getPriorityFee"});return We(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(i,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*eM+c),new t1(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const i=new pn(n.url),s=await n.processFunc(r,this,i);return new t1(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return v1(r)&&(r=await r),We(await pe(this,jt,Xn).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await zr({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await pe(this,jt,A3).call(this,pe(this,jt,S3).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return We(await pe(this,jt,df).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return qe(await pe(this,jt,df).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return Ee(await pe(this,jt,df).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const i=We(r,"position");return Ee(await pe(this,jt,df).call(this,{method:"getStorage",position:i},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:i}=await zr({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=ql.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:i}=await zr({network:this.getNetwork(),params:pe(this,jt,R3).call(this,e,!!r)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){const{network:r,params:n}=await zr({network:this.getNetwork(),params:pe(this,jt,Xn).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await zr({network:this.getNetwork(),params:pe(this,jt,Xn).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const i=await pe(this,jt,Xn).call(this,{method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await zr({network:this.getNetwork(),result:pe(this,jt,Xn).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:Ee(r)}async getLogs(e){let r=this._getFilter(e);v1(r)&&(r=await r);const{network:n,params:i}=await zr({network:this.getNetwork(),params:pe(this,jt,Xn).call(this,{method:"getLogs",filter:r})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){ae(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await h1.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=wt(e);const r=Nh(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await h1.getEnsAddress(this),i=await new na(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===tc)return null;const s=await new na(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(s)!==e?null:s}catch(n){if(Tr(n,"BAD_DATA")&&n.value==="0x"||Tr(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const i=r??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=i){s(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(cr("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){ae(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=A(this,Gi).get(e);r&&(r.timer&&clearTimeout(r.timer),A(this,Gi).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=eh(this,w1)._++,i=()=>{A(this,Gi).delete(n),e()};if(this.paused)A(this,Gi).set(n,{timer:null,func:i,time:r});else{const s=setTimeout(i,r);A(this,Gi).set(n,{timer:s,func:i,time:C3()})}return n}_forEachSubscriber(e){for(const r of A(this,Tn).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new mu(e.type);case"block":{const r=new $U(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new XU(this,e.type);case"event":return new k3(this,e.filter);case"transaction":return new qU(this,e.hash);case"orphan":return new KU(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of A(this,Tn).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),A(this,Nn)!=null&&r.pause(A(this,Nn));break}}async on(e,r){const n=await pe(this,jt,b1).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,A(this,Nn)!=null&&n.subscriber.pause(A(this,Nn))),this}async once(e,r){const n=await pe(this,jt,b1).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,A(this,Nn)!=null&&n.subscriber.pause(A(this,Nn))),this}async emit(e,...r){const n=await pe(this,jt,hf).call(this,e,r);if(!n||n.listeners.length===0)return!1;const i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{const a=new dp(this,o?null:s,e);try{s.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),A(this,Tn).delete(n.tag)),i>0}async listenerCount(e){if(e){const n=await pe(this,jt,hf).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of A(this,Tn).values())r+=n.length;return r}async listeners(e){if(e){const n=await pe(this,jt,hf).call(this,e);return n?n.listeners.map(({listener:i})=>i):[]}let r=[];for(const{listeners:n}of A(this,Tn).values())r=r.concat(n.map(({listener:i})=>i));return r}async off(e,r){const n=await pe(this,jt,hf).call(this,e);if(!n)return this;if(r){const i=n.listeners.map(({listener:s})=>s).indexOf(r);i>=0&&n.listeners.splice(i,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),A(this,Tn).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:i}=await pe(this,jt,b1).call(this,e);n&&i.stop(),A(this,Tn).delete(r)}else for(const[r,{started:n,subscriber:i}]of A(this,Tn))n&&i.stop(),A(this,Tn).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return A(this,cf)}destroy(){this.removeAllListeners();for(const e of A(this,Gi).keys())this._clearTimeout(e);P(this,cf,!0)}get paused(){return A(this,Nn)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(P(this,aa,-1),A(this,Nn)!=null){if(A(this,Nn)==!!e)return;ae(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),P(this,Nn,!!e);for(const r of A(this,Gi).values())r.timer&&clearTimeout(r.timer),r.time=C3()-r.time}resume(){if(A(this,Nn)!=null){this._forEachSubscriber(e=>e.resume()),P(this,Nn,null);for(const e of A(this,Gi).values()){let r=e.time;r<0&&(r=0),e.time=C3(),setTimeout(e.func,r)}}}}Tn=new WeakMap,kc=new WeakMap,Nn=new WeakMap,cf=new WeakMap,fi=new WeakMap,gu=new WeakMap,_c=new WeakMap,aa=new WeakMap,w1=new WeakMap,Gi=new WeakMap,lf=new WeakMap,uf=new WeakMap,jt=new WeakSet,Xn=async function(t){const e=A(this,uf).cacheTimeout;if(e<0)return await this._perform(t);const r=y1(t.method,t);let n=A(this,_c).get(r);return n||(n=this._perform(t),A(this,_c).set(r,n),setTimeout(()=>{A(this,_c).get(r)===n&&A(this,_c).delete(r)},e)),await n},S3=async function(t,e,r){ae(r<tM,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const n=uc(t);try{return Ee(await this._perform({method:"call",transaction:n,blockTag:e}))}catch(i){if(!this.disableCcipRead&&th(i)&&i.data&&r>=0&&e==="latest"&&n.to!=null&&tr(i.data,0,4)==="0x556f1830"){const s=i.data,o=await jr(n.to,this);let a;try{a=cM(tr(i.data,4))}catch(u){ae(!1,u.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:n,info:{data:s}})}ae(a.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:s,reason:"OffchainLookup",transaction:n,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const c=await this.ccipReadFetch(n,a.calldata,a.urls);ae(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:n,info:{data:i.data,errorArgs:a.errorArgs}});const l={to:o,data:At([a.selector,aM([c,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const u=await pe(this,jt,S3).call(this,l,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:u}),u}catch(u){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:u}),u}}throw i}},A3=async function(t){const{value:e}=await zr({network:this.getNetwork(),value:t});return e},df=async function(t,e,r){let n=this._getAddress(e),i=this._getBlockTag(r);return(typeof n!="string"||typeof i!="string")&&([n,i]=await Promise.all([n,i])),await pe(this,jt,A3).call(this,pe(this,jt,Xn).call(this,Object.assign(t,{address:n,blockTag:i})))},R3=async function(t,e){if(er(t,32))return await pe(this,jt,Xn).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await pe(this,jt,Xn).call(this,{method:"getBlock",blockTag:r,includeTransactions:e})},hf=async function(t,e){let r=await E3(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await E3({orphan:"drop-log",log:e[0]},this)),A(this,Tn).get(r.tag)||null},b1=async function(t){const e=await E3(t,this),r=e.tag;let n=A(this,Tn).get(r);return n||(n={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},A(this,Tn).set(r,n)),n};function iM(t,e){try{const r=T3(t,e);if(r)return Ds(r)}catch{}return null}function T3(t,e){if(t==="0x")return null;try{const r=qe(tr(t,e,e+32)),n=qe(tr(t,r,r+32));return tr(t,r+32,r+32+n)}catch{}return null}function rk(t){const e=Hr(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function sM(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const oM=new Uint8Array([]);function aM(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(oM),r+=32;for(let n=0;n<t.length;n++){const i=xe(t[n]);e[n]=rk(r),e.push(rk(i.length)),e.push(sM(i)),r+=32+Math.ceil(i.length/32)*32}return At(e)}const nk="0x0000000000000000000000000000000000000000000000000000000000000000";function cM(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ae(Vs(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=tr(t,0,32);ae(tr(r,0,12)===tr(nk,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=tr(r,12);try{const n=[],i=qe(tr(t,32,64)),s=qe(tr(t,i,i+32)),o=tr(t,i+32);for(let a=0;a<s;a++){const c=iM(o,a*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{ae(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=T3(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{ae(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ae(tr(t,100,128)===tr(nk,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=tr(t,96,100);try{const n=T3(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{ae(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function yu(t,e){if(t.provider)return t.provider;ae(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function ik(t,e){let r=uc(e);if(r.to!=null&&(r.to=jr(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),jr(n,t)]).then(([i,s])=>(F(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else r.from=t.getAddress();return await zr(r)}class wu{constructor(e){H(this,"provider"),Ue(this,{provider:e||null})}async getNonce(e){return yu(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await ik(this,e)}async populateTransaction(e){const r=yu(this,"populateTransaction"),n=await ik(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const i=await this.provider.getNetwork();if(n.chainId!=null){const o=We(n.chainId);F(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;const s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?F(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&F(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();ae(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(ae(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):ae(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await zr(n)}async estimateGas(e){return yu(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return yu(this,"call").call(await this.populateCall(e))}async resolveName(e){return await yu(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=yu(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const i=ql.from(n);return await r.broadcastTransaction(await this.signTransaction(i))}}var ff,k1;const lM=class oN extends wu{constructor(e,r){super(r),q(this,ff),H(this,"address"),Ue(this,{address:e})}async getAddress(){return this.address}connect(e){return new oN(this.address,e)}async signTransaction(e){pe(this,ff,k1).call(this,"transactions","signTransaction")}async signMessage(e){pe(this,ff,k1).call(this,"messages","signMessage")}async signTypedData(e,r,n){pe(this,ff,k1).call(this,"typed-data","signTypedData")}};ff=new WeakSet,k1=function(t,e){ae(!1,`VoidSigner cannot sign ${t}`,"UNSUPPORTED_OPERATION",{operation:e})};let _1=lM;const sk=new Set;function co(t){sk.has(t)||(sk.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function uM(t){return JSON.parse(JSON.stringify(t))}var Vn,lo,bu,Ec,ku,pf,_u,N3,x3;class ok{constructor(e){q(this,_u),q(this,Vn),q(this,lo),q(this,bu),q(this,Ec),q(this,ku),q(this,pf),P(this,Vn,e),P(this,lo,null),P(this,bu,pe(this,_u,N3).bind(this)),P(this,Ec,!1),P(this,ku,null),P(this,pf,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){A(this,Ec)||(P(this,Ec,!0),pe(this,_u,N3).call(this,-2))}stop(){A(this,Ec)&&(P(this,Ec,!1),P(this,pf,!0),pe(this,_u,x3).call(this),A(this,Vn).off("block",A(this,bu)))}pause(e){e&&pe(this,_u,x3).call(this),A(this,Vn).off("block",A(this,bu))}resume(){this.start()}}Vn=new WeakMap,lo=new WeakMap,bu=new WeakMap,Ec=new WeakMap,ku=new WeakMap,pf=new WeakMap,_u=new WeakSet,N3=async function(t){try{A(this,lo)==null&&P(this,lo,this._subscribe(A(this,Vn)));let e=null;try{e=await A(this,lo)}catch(i){if(!Tr(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(e==null){P(this,lo,null),A(this,Vn)._recoverSubscriber(this,this._recover(A(this,Vn)));return}const r=await A(this,Vn).getNetwork();if(A(this,ku)||P(this,ku,r),A(this,ku).chainId!==r.chainId)throw new Error("chaid changed");if(A(this,pf))return;const n=await A(this,Vn).send("eth_getFilterChanges",[e]);await this._emitResults(A(this,Vn),n)}catch(e){console.log("@TODO",e)}A(this,Vn).once("block",A(this,bu))},x3=function(){const t=A(this,lo);t&&(P(this,lo,null),t.then(e=>{A(this,Vn).destroyed||A(this,Vn).send("eth_uninstallFilter",[e])}))};var Eu;class dM extends ok{constructor(e,r){super(e),q(this,Eu),P(this,Eu,uM(r))}_recover(e){return new k3(e,A(this,Eu))}async _subscribe(e){return await e.send("eth_newFilter",[A(this,Eu)])}async _emitResults(e,r){for(const n of r)e.emit(A(this,Eu),e._wrapLog(n,e._network))}}Eu=new WeakMap;class hM extends ok{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const fM="bigint,boolean,function,number,string,symbol".split(/,/g);function E1(t){if(t==null||fM.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(E1);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function pM(t){return new Promise(e=>{setTimeout(e,t)})}function Cu(t){return t&&t.toLowerCase()}function ak(t){return t&&typeof t.pollingInterval=="number"}const ck={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class mf extends wu{constructor(e,r){super(e),H(this,"address"),r=wt(r),Ue(this,{address:r})}connect(e){ae(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const r=E1(e),n=[];if(r.from){const s=r.from;n.push((async()=>{const o=await jr(s,this.provider);F(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=o})())}else r.from=this.address;if(r.gasLimit==null&&n.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const s=r.to;n.push((async()=>{r.to=await jr(s,this.provider)})())}n.length&&await Promise.all(n);const i=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(e){const r=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise((i,s)=>{const o=[1e3,100];let a=0;const c=async()=>{try{const l=await this.provider.getTransaction(n);if(l!=null){i(l.replaceableTransaction(r));return}}catch(l){if(Tr(l,"CANCELLED")||Tr(l,"BAD_DATA")||Tr(l,"NETWORK_ERROR")||Tr(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=n,s(l);return}if(Tr(l,"INVALID_ARGUMENT")&&(a++,l.info==null&&(l.info={}),l.info.sendTransactionHash=n,a>10)){s(l);return}this.provider.emit("error",cr("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{c()},o.pop()||4e3)};c()})}async signTransaction(e){const r=E1(e);if(r.from){const i=await jr(r.from,this.provider);F(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=i}else r.from=this.address;const n=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){const r=typeof e=="string"?Vr(e):e;return await this.provider.send("personal_sign",[Ee(r),this.address.toLowerCase()])}async signTypedData(e,r,n){const i=E1(n),s=await ac.resolveNames(e,r,i,async o=>{const a=await jr(o);return F(a!=null,"TypedData does not support null address","value",o),a});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ac.getPayload(s.domain,r,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const r=typeof e=="string"?Vr(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ee(r)])}}var Su,gf,ca,uo,fs,Hi,Kn,C1,B3;class S1 extends vu{constructor(e,r){super(e,r),q(this,C1),q(this,Su),q(this,gf),q(this,ca),q(this,uo),q(this,fs),q(this,Hi),q(this,Kn),P(this,gf,1),P(this,Su,Object.assign({},ck,r||{})),P(this,ca,[]),P(this,uo,null),P(this,Hi,null),P(this,Kn,null);{let i=null;const s=new Promise(o=>{i=o});P(this,fs,{promise:s,resolve:i})}const n=this._getOption("staticNetwork");typeof n=="boolean"?(F(!n||e!=="any","staticNetwork cannot be used on special network 'any'","options",r),n&&e!=null&&P(this,Hi,Fr.from(e))):n&&(F(e==null||n.matches(e),"staticNetwork MUST match network object","options",r),P(this,Hi,n))}_getOption(e){return A(this,Su)[e]}get _network(){return ae(A(this,Hi),"network is not available yet","NETWORK_ERROR"),A(this,Hi)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let n=e.transaction;if(n&&n.type!=null&&We(n.type)&&n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},n,{type:void 0})}))}}const r=this.getRpcRequest(e);return r!=null?await this.send(r.method,r.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(A(this,Hi))return A(this,Hi)}else return e;return A(this,Kn)?await A(this,Kn):this.ready?(P(this,Kn,(async()=>{try{const r=Fr.from(We(await this.send("eth_chainId",[])));return P(this,Kn,null),r}catch(r){throw P(this,Kn,null),r}})()),await A(this,Kn)):(P(this,Kn,(async()=>{const r={id:eh(this,gf)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let n;try{n=(await this._send(r))[0],P(this,Kn,null)}catch(i){throw P(this,Kn,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:n}),"result"in n)return Fr.from(We(n.result));throw this.getRpcError(r,n)})()),await A(this,Kn))}_start(){A(this,fs)==null||A(this,fs).resolve==null||(A(this,fs).resolve(),P(this,fs,null),(async()=>{for(;A(this,Hi)==null&&!this.destroyed;)try{P(this,Hi,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",cr("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await pM(1e3)}pe(this,C1,B3).call(this)})())}async _waitUntilReady(){if(A(this,fs)!=null)return await A(this,fs).promise}_getSubscriber(e){return e.type==="pending"?new hM(this):e.type==="event"?this._getOption("polling")?new k3(this,e.filter):new dM(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new mu("orphan"):super._getSubscriber(e)}get ready(){return A(this,fs)==null}getRpcTransaction(e){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(n=>{if(e[n]==null)return;let i=n;n==="gasLimit"&&(i="gas"),r[i]=Ls(We(e[n],`tx.${n}`))}),["from","to","data"].forEach(n=>{e[n]!=null&&(r[n]=Ee(e[n]))}),e.accessList&&(r.accessList=ds(e.accessList)),e.blobVersionedHashes&&(r.blobVersionedHashes=e.blobVersionedHashes.map(n=>n.toLowerCase())),r}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Cu(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Cu(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[Cu(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Cu(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(Cu):e.filter.address=Cu(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,r){const{method:n}=e,{error:i}=r;if(n==="eth_estimateGas"&&i.message){const a=i.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return cr("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(n==="eth_call"||n==="eth_estimateGas"){const a=I3(i),c=su.getBuiltinCallException(n==="eth_call"?"call":"estimateGas",e.params[0],a?a.data:null);return c.info={error:i,payload:e},c}const s=JSON.stringify(mM(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return cr("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(n==="eth_sendRawTransaction"||n==="eth_sendTransaction"){const a=e.params[0];if(s.match(/insufficient funds|base fee exceeds gas limit/i))return cr("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:i}});if(s.match(/nonce/i)&&s.match(/too low/i))return cr("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:i}});if(s.match(/replacement transaction/i)&&s.match(/underpriced/i))return cr("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:i}});if(s.match(/only replay-protected/i))return cr("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:a,info:{error:i}}})}let o=!!s.match(/the method .* does not exist/i);return o||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(o=!0),o?cr("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):cr("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,r){if(this.destroyed)return Promise.reject(cr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const n=eh(this,gf)._++,i=new Promise((s,o)=>{A(this,ca).push({resolve:s,reject:o,payload:{method:e,params:r,id:n,jsonrpc:"2.0"}})});return pe(this,C1,B3).call(this),i}async getSigner(e){e==null&&(e=0);const r=this.send("eth_accounts",[]);if(typeof e=="number"){const i=await r;if(e>=i.length)throw new Error("no such account");return new mf(this,i[e])}const{accounts:n}=await zr({network:this.getNetwork(),accounts:r});e=wt(e);for(const i of n)if(wt(i)===e)return new mf(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new mf(this,e))}destroy(){A(this,uo)&&(clearTimeout(A(this,uo)),P(this,uo,null));for(const{payload:e,reject:r}of A(this,ca))r(cr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));P(this,ca,[]),super.destroy()}}Su=new WeakMap,gf=new WeakMap,ca=new WeakMap,uo=new WeakMap,fs=new WeakMap,Hi=new WeakMap,Kn=new WeakMap,C1=new WeakSet,B3=function(){if(A(this,uo))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");P(this,uo,setTimeout(()=>{P(this,uo,null);const e=A(this,ca);for(P(this,ca,[]);e.length;){const r=[e.shift()];for(;e.length&&r.length!==A(this,Su).batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(n=>n.payload)).length>A(this,Su).batchMaxSize){e.unshift(r.pop());break}(async()=>{const n=r.length===1?r[0].payload:r.map(i=>i.payload);this.emit("debug",{action:"sendRpcPayload",payload:n});try{const i=await this._send(n);this.emit("debug",{action:"receiveRpcResult",result:i});for(const{resolve:s,reject:o,payload:a}of r){if(this.destroyed){o(cr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:a.method}));continue}const c=i.filter(l=>l.id===a.id)[0];if(c==null){const l=cr("missing response for request","BAD_DATA",{value:i,info:{payload:a}});this.emit("error",l),o(l);continue}if("error"in c){o(this.getRpcError(a,c));continue}s(c.result)}}catch(i){this.emit("debug",{action:"receiveRpcError",error:i});for(const{reject:s}of r)s(i)}})()}},t))};var Cc;class lk extends S1{constructor(e,r){super(e,r),q(this,Cc);let n=this._getOption("pollingInterval");n==null&&(n=ck.pollingInterval),P(this,Cc,n)}_getSubscriber(e){const r=super._getSubscriber(e);return ak(r)&&(r.pollingInterval=A(this,Cc)),r}get pollingInterval(){return A(this,Cc)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");P(this,Cc,e),this._forEachSubscriber(r=>{ak(r)&&(r.pollingInterval=A(this,Cc))})}}Cc=new WeakMap;var vf;class qn extends lk{constructor(e,r,n){e==null&&(e="http://localhost:8545"),super(r,n),q(this,vf),typeof e=="string"?P(this,vf,new pn(e)):P(this,vf,e.clone())}_getConnection(){return A(this,vf).clone()}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){const r=this._getConnection();r.body=JSON.stringify(e),r.setHeader("content-type","application/json");const n=await r.send();n.assertOk();let i=n.bodyJson;return Array.isArray(i)||(i=[i]),i}}vf=new WeakMap;function I3(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&er(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=I3(t[e]);if(r)return r}return null}if(typeof t=="string")try{return I3(JSON.parse(t))}catch{}return null}function O3(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)O3(t[r],e);if(typeof t=="string")try{return O3(JSON.parse(t),e)}catch{}}}function mM(t){const e=[];return O3(t,e),e}const A1="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function gM(t){switch(t){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}F(!1,"unsupported network","network",t)}class Au extends qn{constructor(e,r){e==null&&(e="mainnet");const n=Fr.from(e);r==null&&(r=A1);const i={polling:!0,staticNetwork:n},s=Au.getRequest(n,r);super(s,n,i),H(this,"apiKey"),Ue(this,{apiKey:r})}_getProvider(e){try{return new Au(e,this.apiKey)}catch{}return super._getProvider(e)}static getRequest(e,r){r==null&&(r=A1);const n=new pn(`https://${gM(e.name)}/${r}`);return n.allowGzip=!0,r===A1&&(n.retryFunc=async(i,s,o)=>(co("AnkrProvider"),!0)),n}getRpcError(e,r){return e.method==="eth_sendRawTransaction"&&r&&r.error&&r.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(r.error.message="replacement transaction underpriced"),super.getRpcError(e,r)}isCommunityResource(){return this.apiKey===A1}}const R1="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function vM(t){switch(t){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}F(!1,"unsupported network","network",t)}class Ru extends qn{constructor(e,r){e==null&&(e="mainnet");const n=Fr.from(e);r==null&&(r=R1);const i=Ru.getRequest(n,r);super(i,n,{staticNetwork:n}),H(this,"apiKey"),Ue(this,{apiKey:r})}_getProvider(e){try{return new Ru(e,this.apiKey)}catch{}return super._getProvider(e)}async _perform(e){if(e.method==="getTransactionResult"){const{trace:r,tx:n}=await zr({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(r==null||n==null)return null;let i,s=!1;try{i=r[0].result.output,s=r[0].error==="Reverted"}catch{}if(i)return ae(!s,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:n,invocation:null,revert:null}),i;ae(!1,"could not parse trace result","BAD_DATA",{value:r})}return await super._perform(e)}isCommunityResource(){return this.apiKey===R1}static getRequest(e,r){r==null&&(r=R1);const n=new pn(`https://${vM(e.name)}/v2/${r}`);return n.allowGzip=!0,r===R1&&(n.retryFunc=async(i,s,o)=>(co("alchemy"),!0)),n}}function T1(t){switch(t){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}F(!1,"unsupported network","network",t)}function yM(t){switch(t){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}F(!1,"unsupported network","network",t)}class Tu extends qn{constructor(e,r){e==null&&(e="mainnet");const n=Fr.from(e);r==null&&(r=T1(n.name));const i=Tu.getRequest(n,r);super(i,n,{staticNetwork:n}),H(this,"apiKey"),Ue(this,{apiKey:r})}_getProvider(e){try{return new Tu(e,this.apiKey)}catch{}return super._getProvider(e)}isCommunityResource(){return this.apiKey===T1(this._network.name)}static getRequest(e,r){r==null&&(r=T1(e.name));const n=new pn(`https://${yM(e.name)}/${r}`);return n.allowGzip=!0,r===T1(e.name)&&(n.retryFunc=async(i,s,o)=>(co("ChainstackProvider"),!0)),n}}class U3 extends qn{constructor(e){e==null&&(e="mainnet");const r=Fr.from(e);F(r.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",r,{staticNetwork:r})}}const uk=2e3;function wM(t){return t&&typeof t.then=="function"}const dk="org.ethers.plugins.provider.Etherscan";class N1 extends oo{constructor(e){super(dk),H(this,"baseUrl"),Ue(this,{baseUrl:e})}clone(){return new N1(this.baseUrl)}}const bM=["enableCcipRead"];let kM=1;var yf;class M3 extends vu{constructor(e,r){const n=r??null;super(),H(this,"network"),H(this,"apiKey"),q(this,yf);const i=Fr.from(e);P(this,yf,i.getPlugin(dk)),Ue(this,{apiKey:n,network:i}),this.getBaseUrl()}getBaseUrl(){if(A(this,yf))return A(this,yf).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}F(!1,"unsupported network","network",this.network)}getUrl(e,r){const n=Object.keys(r).reduce((s,o)=>{const a=r[o];return a!=null&&(s+=`&${o}=${a}`),s},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${n}${i}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}async detectNetwork(){return this.network}async fetch(e,r,n){const i=kM++,s=n?this.getPostUrl():this.getUrl(e,r),o=n?this.getPostData(e,r):null;this.emit("debug",{action:"sendRequest",id:i,url:s,payload:o});const a=new pn(s);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(u,d,h)=>(this.isCommunityResource()&&co("Etherscan"),Promise.resolve(!0)),a.processFunc=async(u,d)=>{const h=d.hasBody()?JSON.parse(Ds(d.body)):{},f=(typeof h.result=="string"?h.result:"").toLowerCase().indexOf("rate limit")>=0;return e==="proxy"?h&&h.status==0&&h.message=="NOTOK"&&f&&(this.emit("debug",{action:"receiveError",id:i,reason:"proxy-NOTOK",error:h}),d.throwThrottleError(h.result,uk)):f&&(this.emit("debug",{action:"receiveError",id:i,reason:"null result",error:h.result}),d.throwThrottleError(h.result,uk)),d},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map(u=>`${u}=${o[u]}`).join("&"));const c=await a.send();try{c.assertOk()}catch(u){this.emit("debug",{action:"receiveError",id:i,error:u,reason:"assertOk"}),ae(!1,"response error","SERVER_ERROR",{request:a,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:i,error:"missing body",reason:"null body"}),ae(!1,"missing response","SERVER_ERROR",{request:a,response:c}));const l=JSON.parse(Ds(c.body));return e==="proxy"?(l.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:i,result:l,reason:"invalid JSON-RPC"}),ae(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:c,info:{result:l}})),l.error&&(this.emit("debug",{action:"receiveError",id:i,result:l,reason:"JSON-RPC error"}),ae(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result):l.status==0&&(l.message==="No records found"||l.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result):((l.status!=1||typeof l.message=="string"&&!l.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:i,result:l}),ae(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:i,result:l}),l.result)}_getTransactionPostData(e){const r={};for(let n in e){if(bM.indexOf(n)>=0||e[n]==null)continue;let i=e[n];if(!(n==="type"&&i===0)&&!(n==="blockTag"&&i==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n])i=Ls(i);else if(n==="accessList")i="["+ds(i).map(s=>`{address:"${s.address}",storageKeys:["${s.storageKeys.join('","')}"]}`).join(",")+"]";else if(n==="blobVersionedHashes"){if(i.length===0)continue;ae(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else i=Ee(i);r[n]=i}}return r}_checkError(e,r,n){let i="";if(Tr(r,"SERVER_ERROR")){try{i=r.info.result.error.message}catch{}if(!i)try{i=r.info.message}catch{}}if(e.method==="estimateGas"&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&ae(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),(e.method==="call"||e.method==="estimateGas")&&i.match(/execution reverted/i)){let s="";try{s=r.info.result.error.data}catch{}const o=su.getBuiltinCallException(e.method,e.transaction,s);throw o.info={request:e,error:r},o}if(i&&e.method==="broadcastTransaction"){const s=ql.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&ae(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:s}),i.match(/insufficient funds/)&&ae(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:s}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&ae(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:s})}throw r}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch(r=>this._checkError(e,r,e.signedTransaction));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});ae(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if(e.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_call";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}case"estimateGas":{const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_estimateGas";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let r=this._getAddress(e);wM(r)&&(r=await r);try{const n=await this.fetch("contract",{action:"getabi",address:r}),i=JSON.parse(n);return new na(r,i,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}yf=new WeakMap;function _M(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const EM=_M().WebSocket;var ho,x1,Sc,Nu,Ac;class wf{constructor(e,r){q(this,ho),q(this,x1),q(this,Sc),q(this,Nu),q(this,Ac),P(this,ho,e),P(this,x1,JSON.stringify(r)),P(this,Sc,null),P(this,Nu,null),P(this,Ac,null)}get filter(){return JSON.parse(A(this,x1))}start(){P(this,Sc,A(this,ho).send("eth_subscribe",this.filter).then(e=>(A(this,ho)._register(e,this),e)))}stop(){A(this,Sc).then(e=>{A(this,ho).destroyed||A(this,ho).send("eth_unsubscribe",[e])}),P(this,Sc,null)}pause(e){ae(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),P(this,Nu,!!e)}resume(){P(this,Nu,null)}_handleMessage(e){if(A(this,Sc)!=null&&A(this,Nu)===null){let r=A(this,Ac);r==null?r=this._emit(A(this,ho),e):r=r.then(async()=>{await this._emit(A(this,ho),e)}),P(this,Ac,r.then(()=>{A(this,Ac)===r&&P(this,Ac,null)}))}}async _emit(e,r){throw new Error("sub-classes must implemente this; _emit")}}ho=new WeakMap,x1=new WeakMap,Sc=new WeakMap,Nu=new WeakMap,Ac=new WeakMap;class P3 extends wf{constructor(e){super(e,["newHeads"])}async _emit(e,r){e.emit("block",parseInt(r.number))}}class V3 extends wf{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,r){e.emit("pending",r)}}var B1;class F3 extends wf{constructor(e,r){super(e,["logs",r]),q(this,B1),P(this,B1,JSON.stringify(r))}get logFilter(){return JSON.parse(A(this,B1))}async _emit(e,r){e.emit(this.logFilter,e._wrapLog(r,e._network))}}B1=new WeakMap;var xu,bf,Rc;class L3 extends S1{constructor(e,r){const n=Object.assign({},r??{});F(n.batchMaxCount==null||n.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",r),n.batchMaxCount=1,n.staticNetwork==null&&(n.staticNetwork=!0),super(e,n),q(this,xu),q(this,bf),q(this,Rc),P(this,xu,new Map),P(this,bf,new Map),P(this,Rc,new Map)}_getSubscriber(e){switch(e.type){case"close":return new mu("close");case"block":return new P3(this);case"pending":return new V3(this);case"event":return new F3(this,e.filter);case"orphan":if(e.filter.orphan==="drop-log")return new mu("drop-log")}return super._getSubscriber(e)}_register(e,r){A(this,bf).set(e,r);const n=A(this,Rc).get(e);if(n){for(const i of n)r._handleMessage(i);A(this,Rc).delete(e)}}async _send(e){F(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const r=new Promise((n,i)=>{A(this,xu).set(e.id,{payload:e,resolve:n,reject:i})});return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await r]}async _processMessage(e){const r=JSON.parse(e);if(r&&typeof r=="object"&&"id"in r){const n=A(this,xu).get(r.id);if(n==null){this.emit("error",cr("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:r}));return}A(this,xu).delete(r.id),n.resolve(r)}else if(r&&r.method==="eth_subscription"){const n=r.params.subscription,i=A(this,bf).get(n);if(i)i._handleMessage(r.params.result);else{let s=A(this,Rc).get(n);s==null&&(s=[],A(this,Rc).set(n,s)),s.push(r.params.result)}}else{this.emit("error",cr("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:r}));return}}async _write(e){throw new Error("sub-classes must override this")}}xu=new WeakMap,bf=new WeakMap,Rc=new WeakMap;var Bu,ps;class I1 extends L3{constructor(e,r,n){super(r,n),q(this,Bu),q(this,ps),typeof e=="string"?(P(this,Bu,()=>new EM(e)),P(this,ps,A(this,Bu).call(this))):typeof e=="function"?(P(this,Bu,e),P(this,ps,e())):(P(this,Bu,null),P(this,ps,e)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(i){console.log("failed to start WebsocketProvider",i)}},this.websocket.onmessage=i=>{this._processMessage(i.data)}}get websocket(){if(A(this,ps)==null)throw new Error("websocket closed");return A(this,ps)}async _write(e){this.websocket.send(e)}async destroy(){A(this,ps)!=null&&(A(this,ps).close(),P(this,ps,null)),super.destroy()}}Bu=new WeakMap,ps=new WeakMap;const kf="84842078b09946638c03157f83405213";function CM(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}F(!1,"unsupported network","network",t)}class D3 extends I1{constructor(e,r){const n=new Tc(e,r),i=n._getConnection();ae(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const s=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(s,n._network),H(this,"projectId"),H(this,"projectSecret"),Ue(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===kf}}class Tc extends qn{constructor(e,r,n){e==null&&(e="mainnet");const i=Fr.from(e);r==null&&(r=kf),n==null&&(n=null);const s=Tc.getRequest(i,r,n);super(s,i,{staticNetwork:i}),H(this,"projectId"),H(this,"projectSecret"),Ue(this,{projectId:r,projectSecret:n})}_getProvider(e){try{return new Tc(e,this.projectId,this.projectSecret)}catch{}return super._getProvider(e)}isCommunityResource(){return this.projectId===kf}static getWebSocketProvider(e,r){return new D3(e,r)}static getRequest(e,r,n){r==null&&(r=kf),n==null&&(n=null);const i=new pn(`https://${CM(e.name)}/v3/${r}`);return i.allowGzip=!0,n&&i.setCredentials("",n),r===kf&&(i.retryFunc=async(s,o,a)=>(co("InfuraProvider"),!0)),i}}const O1="919b412a057b5e9c9b6dce193c5a60242d6efadb";function SM(t){switch(t){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}F(!1,"unsupported network","network",t)}class Iu extends qn{constructor(e,r){e==null&&(e="mainnet");const n=Fr.from(e);r==null&&(r=O1);const i=Iu.getRequest(n,r);super(i,n,{staticNetwork:n}),H(this,"token"),Ue(this,{token:r})}_getProvider(e){try{return new Iu(e,this.token)}catch{}return super._getProvider(e)}isCommunityResource(){return this.token===O1}static getRequest(e,r){r==null&&(r=O1);const n=new pn(`https://${SM(e.name)}/${r}`);return n.allowGzip=!0,r===O1&&(n.retryFunc=async(i,s,o)=>(co("QuickNodeProvider"),!0)),n}}const AM=BigInt("1"),RM=BigInt("2");function TM(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}}function NM(t){return new Promise(e=>{setTimeout(e,t)})}function W3(){return new Date().getTime()}function Z3(t){return JSON.stringify(t,(e,r)=>typeof r=="bigint"?{type:"bigint",value:r.toString()}:r)}const hk={stallTimeout:400,priority:1,weight:1},fk={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function xM(t,e){for(;(t.blockNumber<0||t.blockNumber<e)&&(t._updateNumber||(t._updateNumber=(async()=>{try{const r=await t.provider.getBlockNumber();r>t.blockNumber&&(t.blockNumber=r)}catch(r){t.blockNumber=-2,t._lastFatalError=r,t._lastFatalErrorTimestamp=W3()}t._updateNumber=null})()),await t._updateNumber,t.outOfSync++,!t._lastFatalError););}function _f(t){if(t==null)return"null";if(Array.isArray(t))return"["+t.map(_f).join(",")+"]";if(typeof t=="object"&&typeof t.toJSON=="function")return _f(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":case"number":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{"+e.map(r=>`${JSON.stringify(r)}:${_f(t[r])}`).join(",")+"}"}}throw console.log("Could not serialize",t),new Error("Hmm...")}function z3(t){if("error"in t){const r=t.error;return{tag:_f(r),value:r}}const e=t.result;return{tag:_f(e),value:e}}function U1(t,e){const r=new Map;for(const{value:i,tag:s,weight:o}of e){const a=r.get(s)||{value:i,weight:0};a.weight+=o,r.set(s,a)}let n=null;for(const i of r.values())i.weight>=t&&(!n||i.weight>n.weight)&&(n=i);if(n)return n.value}function G3(t,e){let r=0;const n=new Map;let i=null;const s=[];for(const{value:a,tag:c,weight:l}of e)if(a instanceof Error){const u=n.get(c)||{value:a,weight:0};u.weight+=l,n.set(c,u),(i==null||u.weight>i.weight)&&(i=u)}else s.push(BigInt(a)),r+=l;if(r<t)return i&&i.weight>=t?i.value:void 0;s.sort((a,c)=>a<c?-1:c>a?1:0);const o=Math.floor(s.length/2);return s.length%2?s[o]:(s[o-1]+s[o]+AM)/RM}function H3(t,e){const r=U1(t,e);if(r!==void 0)return r;for(const n of e)if(n.value)return n.value}function BM(t,e){if(t===1)return qe(G3(t,e),"%internal");const r=new Map,n=(o,a)=>{const c=r.get(o)||{result:o,weight:0};c.weight+=a,r.set(o,c)};for(const{weight:o,value:a}of e){const c=qe(a);n(c-1,o),n(c,o),n(c+1,o)}let i=0,s;for(const{weight:o,result:a}of r.values())o>=t&&(o>i||s!=null&&o===i&&a>s)&&(i=o,s=a);return s}var ei,la,Ef,fo,pk,j3,mk,gk,Q3;class J3 extends vu{constructor(e,r,n){super(r,n),q(this,fo),H(this,"quorum"),H(this,"eventQuorum"),H(this,"eventWorkers"),q(this,ei),q(this,la),q(this,Ef),P(this,ei,e.map(i=>i instanceof vu?Object.assign({provider:i},hk,fk):Object.assign({},hk,i,fk))),P(this,la,-2),P(this,Ef,null),n&&n.quorum!=null?this.quorum=n.quorum:this.quorum=Math.ceil(A(this,ei).reduce((i,s)=>(i+=s.weight,i),0)/2),this.eventQuorum=1,this.eventWorkers=1,F(this.quorum<=A(this,ei).reduce((i,s)=>i+s.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return A(this,ei).map(e=>{const r=Object.assign({},e);for(const n in r)n[0]==="_"&&delete r[n];return r})}async _detectNetwork(){return Fr.from(We(await this._perform({method:"chainId"})))}async _translatePerform(e,r){switch(r.method){case"broadcastTransaction":return await e.broadcastTransaction(r.signedTransaction);case"call":return await e.call(Object.assign({},r.transaction,{blockTag:r.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(r.transaction);case"getBalance":return await e.getBalance(r.address,r.blockTag);case"getBlock":{const n="blockHash"in r?r.blockHash:r.blockTag;return await e.getBlock(n,r.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(r.address,r.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(r.filter);case"getStorage":return await e.getStorage(r.address,r.position,r.blockTag);case"getTransaction":return await e.getTransaction(r.hash);case"getTransactionCount":return await e.getTransactionCount(r.address,r.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(r.hash);case"getTransactionResult":return await e.getTransactionResult(r.hash)}}async _perform(e){if(e.method==="broadcastTransaction"){const s=A(this,ei).map(c=>null),o=A(this,ei).map(async({provider:c,weight:l},u)=>{try{const d=await c._perform(e);s[u]=Object.assign(z3({result:d}),{weight:l})}catch(d){s[u]=Object.assign(z3({error:d}),{weight:l})}});for(;;){const c=s.filter(d=>d!=null);for(const{value:d}of c)if(!(d instanceof Error))return d;const l=U1(this.quorum,s.filter(d=>d!=null));if(Tr(l,"INSUFFICIENT_FUNDS"))throw l;const u=o.filter((d,h)=>s[h]==null);if(u.length===0)break;await Promise.race(u)}const a=H3(this.quorum,s);if(ae(a!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:s.map(Z3)}}),a instanceof Error)throw a;return a}await pe(this,fo,mk).call(this);const r=new Set;let n=0;for(;;){const s=pe(this,fo,j3).call(this,r,e);if(s==null||(n+=s.config.weight,n>=this.quorum))break}const i=await pe(this,fo,Q3).call(this,r,e);for(const s of r)s.perform&&s.result==null&&s.config.lateResponses++;return i}async destroy(){for(const{provider:e}of A(this,ei))e.destroy();super.destroy()}}ei=new WeakMap,la=new WeakMap,Ef=new WeakMap,fo=new WeakSet,pk=function(t){const e=Array.from(t).map(n=>n.config),r=A(this,ei).slice();TM(r),r.sort((n,i)=>n.priority-i.priority);for(const n of r)if(!n._lastFatalError&&e.indexOf(n)===-1)return n;return null},j3=function(t,e){const r=pe(this,fo,pk).call(this,t);if(r==null)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=W3();return n.perform=(async()=>{try{r.requests++;const o=await this._translatePerform(r.provider,e);n.result={result:o}}catch(o){r.errorResponses++,n.result={error:o}}const s=W3()-i;r._totalTime+=s,r.rollingDuration=.95*r.rollingDuration+.05*s,n.perform=null})(),n.staller=(async()=>{await NM(r.stallTimeout),n.staller=null})(),t.add(n),n},mk=async function(){let t=A(this,Ef);if(!t){const e=[];A(this,ei).forEach(r=>{e.push((async()=>{await xM(r,0),r._lastFatalError||(r._network=await r.provider.getNetwork())})())}),P(this,Ef,t=(async()=>{await Promise.all(e);let r=null;for(const n of A(this,ei)){if(n._lastFatalError)continue;const i=n._network;r==null?r=i.chainId:i.chainId!==r&&ae(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await t},gk=async function(t,e){const r=[];for(const n of t)if(n.result!=null){const{tag:i,value:s}=z3(n.result);r.push({tag:i,value:s,weight:n.config.weight})}if(!(r.reduce((n,i)=>n+i.weight,0)<this.quorum)){switch(e.method){case"getBlockNumber":{A(this,la)===-2&&P(this,la,Math.ceil(qe(G3(this.quorum,A(this,ei).filter(i=>!i._lastFatalError).map(i=>({value:i.blockNumber,tag:qe(i.blockNumber).toString(),weight:i.weight}))))));const n=BM(this.quorum,r);return n===void 0?void 0:(n>A(this,la)&&P(this,la,n),A(this,la))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return G3(this.quorum,r);case"getBlock":return"blockTag"in e&&e.blockTag==="pending"?H3(this.quorum,r):U1(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return U1(this.quorum,r);case"broadcastTransaction":return H3(this.quorum,r)}ae(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${Z3(e.method)})`})}},Q3=async function(t,e){if(t.size===0)throw new Error("no runners?!");const r=[];let n=0;for(const s of t){if(s.perform&&r.push(s.perform),s.staller){r.push(s.staller);continue}s.didBump||(s.didBump=!0,n++)}const i=await pe(this,fo,gk).call(this,t,e);if(i!==void 0){if(i instanceof Error)throw i;return i}for(let s=0;s<n;s++)pe(this,fo,j3).call(this,t,e);return ae(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:Array.from(t).map(s=>Z3(s.result))}}),await Promise.race(r),await pe(this,fo,Q3).call(this,t,e)};function IM(t){return t&&typeof t.send=="function"&&typeof t.close=="function"}const OM="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function vk(t,e){e==null&&(e={});const r=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof t=="string"&&t.match(/^https?:/))return new qn(t);if(typeof t=="string"&&t.match(/^wss?:/)||IM(t))return new I1(t);let n=null;try{n=Fr.from(t)}catch{}const i=[];if(r("publicPolygon")&&n&&(n.name==="matic"?i.push(new qn("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&i.push(new qn("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),r("alchemy"))try{i.push(new Ru(t,e.alchemy))}catch{}if(r("ankr")&&e.ankr!=null)try{i.push(new Au(t,e.ankr))}catch{}if(r("chainstack"))try{i.push(new Tu(t,e.chainstack))}catch{}if(r("cloudflare"))try{i.push(new U3(t))}catch{}if(r("etherscan"))try{i.push(new M3(t,e.etherscan))}catch{}if(r("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),i.push(new Tc(t,o,a))}catch{}if(r("quicknode"))try{let o=e.quicknode;i.push(new Iu(t,o))}catch{}if(ae(i.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),i.length===1)return i[0];let s=Math.floor(i.length/2);return s>2&&(s=2),n&&OM.indexOf(n.name)!==-1&&(s=1),e&&e.quorum&&(s=e.quorum),new J3(i,void 0,{quorum:s})}var Nc,Ou;const UM=class aN extends wu{constructor(e){super(e.provider),H(this,"signer"),q(this,Nc),q(this,Ou),Ue(this,{signer:e}),P(this,Nc,null),P(this,Ou,0)}async getAddress(){return this.signer.getAddress()}connect(e){return new aN(this.signer.connect(e))}async getNonce(e){if(e==="pending"){A(this,Nc)==null&&P(this,Nc,super.getNonce("pending"));const r=A(this,Ou);return await A(this,Nc)+r}return super.getNonce(e)}increment(){eh(this,Ou)._++}reset(){P(this,Ou,0),P(this,Nc,null)}async sendTransaction(e){const r=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await r,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,r,n){return this.signer.signTypedData(e,r,n)}};Nc=new WeakMap,Ou=new WeakMap;let yk=UM;var Cf;class Y3 extends lk{constructor(e,r,n){const i=Object.assign({},n??{},{batchMaxCount:1});F(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(r,i),q(this,Cf),P(this,Cf,async(s,o)=>{const a={method:s,params:o};this.emit("debug",{action:"sendEip1193Request",payload:a});try{const c=await e.request(a);return this.emit("debug",{action:"receiveEip1193Result",result:c}),c}catch(c){const l=new Error(c.message);throw l.code=c.code,l.data=c.data,l.payload=a,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){F(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const r=await A(this,Cf).call(this,e.method,e.params||[]);return[{id:e.id,result:r}]}catch(r){return[{id:e.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(e,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(e,r)}async hasSigner(e){e==null&&(e=0);const r=await this.send("eth_accounts",[]);return typeof e=="number"?r.length>e:(e=e.toLowerCase(),r.filter(n=>n.toLowerCase()===e).length!==0)}async getSigner(e){if(e==null&&(e=0),!await this.hasSigner(e))try{await A(this,Cf).call(this,"eth_requestAccounts",[])}catch(r){const n=r.payload;throw this.getRpcError(n,{id:n.id,error:r})}return await super.getSigner(e)}}Cf=new WeakMap;const M1="62e1ad51b37b8e00394bda3b";function MM(t){switch(t){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}F(!1,"unsupported network","network",t)}class Sf extends qn{constructor(e,r,n){e==null&&(e="mainnet");const i=Fr.from(e);r==null&&(r=M1),n==null&&(n=null);const s={staticNetwork:i},o=Sf.getRequest(i,r,n);super(o,i,s),H(this,"applicationId"),H(this,"applicationSecret"),Ue(this,{applicationId:r,applicationSecret:n})}_getProvider(e){try{return new Sf(e,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(e)}static getRequest(e,r,n){r==null&&(r=M1);const i=new pn(`https://${MM(e.name)}/v1/lb/${r}`);return i.allowGzip=!0,n&&i.setCredentials("",n),r===M1&&(i.retryFunc=async(s,o,a)=>(co("PocketProvider"),!0)),i}isCommunityResource(){return this.applicationId===M1}}const wk=void 0;var Af;const PM=class cN extends wu{constructor(e,r){super(r),H(this,"address"),q(this,Af),F(e&&typeof e.sign=="function","invalid private key","privateKey","[ REDACTED ]"),P(this,Af,e);const n=ic(this.signingKey.publicKey);Ue(this,{address:n})}get signingKey(){return A(this,Af)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new cN(A(this,Af),e)}async signTransaction(e){e=uc(e);const{to:r,from:n}=await zr({to:e.to?jr(e.to,this.provider):void 0,from:e.from?jr(e.from,this.provider):void 0});r!=null&&(e.to=r),n!=null&&(e.from=n),e.from!=null&&(F(wt(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=ql.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(zp(e)).serialized}async signTypedData(e,r,n){const i=await ac.resolveNames(e,r,n,async s=>{ae(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:s}});const o=await this.provider.resolveName(s);return ae(o!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:s}),o});return this.signingKey.sign(ac.hash(i.domain,r,i.value)).serialized}};Af=new WeakMap;let P1=PM;const V1=" !#$%&'()*+,-./<=>?@[]^_`{|}~",VM=/^[a-z]*$/i;function bk(t,e){let r=97;return t.reduce((n,i)=>(i===e?r++:i.match(VM)?n.push(String.fromCharCode(r)+i):(r=97,n.push(i)),n),[])}function FM(t,e){for(let i=V1.length-1;i>=0;i--)t=t.split(V1[i]).join(e.substring(2*i,2*i+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(i,s,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(s.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return bk(bk(r,";"),":")}function kk(t){return F(t[0]==="0","unsupported auwl data","data",t),FM(t.substring(1+2*V1.length),t.substring(1,1+2*V1.length))}class $3{constructor(e){H(this,"locale"),Ue(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Rf,F1,Uu,L1,X3;class D1 extends $3{constructor(e,r,n){super(e),q(this,L1),q(this,Rf),q(this,F1),q(this,Uu),P(this,Rf,r),P(this,F1,n),P(this,Uu,null)}get _data(){return A(this,Rf)}_decodeWords(){return kk(A(this,Rf))}getWord(e){const r=pe(this,L1,X3).call(this);return F(e>=0&&e<r.length,`invalid word index: ${e}`,"index",e),r[e]}getWordIndex(e){return pe(this,L1,X3).call(this).indexOf(e)}}Rf=new WeakMap,F1=new WeakMap,Uu=new WeakMap,L1=new WeakSet,X3=function(){if(A(this,Uu)==null){const t=this._decodeWords();if(Li(t.join(`
|
|
5
5
|
`)+`
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/(function(t){const e=n2,r=by,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=N,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.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 c(){try{const k=new s(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,s.prototype),Object.setPrototypeOf(k,g),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');const g=new s(k);return Object.setPrototypeOf(g,u.prototype),g}function u(k,g,b){if(typeof k=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(k)}return d(k,g,b)}u.poolSize=8192;function d(k,g,b){if(typeof k=="string")return v(k,g);if(o.isView(k))return w(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(pt(k,o)||k&&pt(k.buffer,o)||typeof a<"u"&&(pt(k,a)||k&&pt(k.buffer,a)))return _(k,g,b);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=k.valueOf&&k.valueOf();if(B!=null&&B!==k)return u.from(B,g,b);const W=S(k);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),g,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,g,b){return d(k,g,b)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function h(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function f(k,g,b){return h(k),k<=0?l(k):g!==void 0?typeof b=="string"?l(k).fill(g,b):l(k).fill(g):l(k)}u.alloc=function(k,g,b){return f(k,g,b)};function p(k){return h(k),l(k<0?0:T(k)|0)}u.allocUnsafe=function(k){return p(k)},u.allocUnsafeSlow=function(k){return p(k)};function v(k,g){if((typeof g!="string"||g==="")&&(g="utf8"),!u.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=I(k,g)|0;let B=l(b);const W=B.write(k,g);return W!==b&&(B=B.slice(0,W)),B}function m(k){const g=k.length<0?0:T(k.length)|0,b=l(g);for(let B=0;B<g;B+=1)b[B]=k[B]&255;return b}function w(k){if(pt(k,s)){const g=new s(k);return _(g.buffer,g.byteOffset,g.byteLength)}return m(k)}function _(k,g,b){if(g<0||k.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let B;return g===void 0&&b===void 0?B=new s(k):b===void 0?B=new s(k,g):B=new s(k,g,b),Object.setPrototypeOf(B,u.prototype),B}function S(k){if(u.isBuffer(k)){const g=T(k.length)|0,b=l(g);return b.length===0||k.copy(b,0,0,g),b}if(k.length!==void 0)return typeof k.length!="number"||Sr(k.length)?l(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function T(k){if(k>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function N(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==u.prototype},u.compare=function(g,b){if(pt(g,s)&&(g=u.from(g,g.offset,g.byteLength)),pt(b,s)&&(b=u.from(b,b.offset,b.byteLength)),!u.isBuffer(g)||!u.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let B=g.length,W=b.length;for(let Q=0,ee=Math.min(B,W);Q<ee;++Q)if(g[Q]!==b[Q]){B=g[Q],W=b[Q];break}return B<W?-1:W<B?1:0},u.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(g,b){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return u.alloc(0);let B;if(b===void 0)for(b=0,B=0;B<g.length;++B)b+=g[B].length;const W=u.allocUnsafe(b);let Q=0;for(B=0;B<g.length;++B){let ee=g[B];if(pt(ee,s))Q+ee.length>W.length?(u.isBuffer(ee)||(ee=u.from(ee)),ee.copy(W,Q)):s.prototype.set.call(W,ee,Q);else if(u.isBuffer(ee))ee.copy(W,Q);else throw new TypeError('"list" argument must be an Array of Buffers');Q+=ee.length}return W};function I(k,g){if(u.isBuffer(k))return k.length;if(o.isView(k)||pt(k,o))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const b=k.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&b===0)return 0;let W=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return qt(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return Pt(k).length;default:if(W)return B?-1:qt(k).length;g=(""+g).toLowerCase(),W=!0}}u.byteLength=I;function O(k,g,b){let B=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(k||(k="utf8");;)switch(k){case"hex":return Se(this,g,b);case"utf8":case"utf-8":return X(this,g,b);case"ascii":return ne(this,g,b);case"latin1":case"binary":return ce(this,g,b);case"base64":return z(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,g,b);default:if(B)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),B=!0}}u.prototype._isBuffer=!0;function U(k,g,b){const B=k[g];k[g]=k[b],k[b]=B}u.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<g;b+=2)U(this,b,b+1);return this},u.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<g;b+=4)U(this,b,b+3),U(this,b+1,b+2);return this},u.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<g;b+=8)U(this,b,b+7),U(this,b+1,b+6),U(this,b+2,b+5),U(this,b+3,b+4);return this},u.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?X(this,0,g):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(g){if(!u.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:u.compare(this,g)===0},u.prototype.inspect=function(){let g="";const b=t.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(g,b,B,W,Q){if(pt(g,s)&&(g=u.from(g,g.offset,g.byteLength)),!u.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(b===void 0&&(b=0),B===void 0&&(B=g?g.length:0),W===void 0&&(W=0),Q===void 0&&(Q=this.length),b<0||B>g.length||W<0||Q>this.length)throw new RangeError("out of range index");if(W>=Q&&b>=B)return 0;if(W>=Q)return-1;if(b>=B)return 1;if(b>>>=0,B>>>=0,W>>>=0,Q>>>=0,this===g)return 0;let ee=Q-W,he=B-b;const Ie=Math.min(ee,he),Bt=this.slice(W,Q),Vt=g.slice(b,B);for(let mt=0;mt<Ie;++mt)if(Bt[mt]!==Vt[mt]){ee=Bt[mt],he=Vt[mt];break}return ee<he?-1:he<ee?1:0};function G(k,g,b,B,W){if(k.length===0)return-1;if(typeof b=="string"?(B=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Sr(b)&&(b=W?0:k.length-1),b<0&&(b=k.length+b),b>=k.length){if(W)return-1;b=k.length-1}else if(b<0)if(W)b=0;else return-1;if(typeof g=="string"&&(g=u.from(g,B)),u.isBuffer(g))return g.length===0?-1:D(k,g,b,B,W);if(typeof g=="number")return g=g&255,typeof s.prototype.indexOf=="function"?W?s.prototype.indexOf.call(k,g,b):s.prototype.lastIndexOf.call(k,g,b):D(k,[g],b,B,W);throw new TypeError("val must be string, number or Buffer")}function D(k,g,b,B,W){let Q=1,ee=k.length,he=g.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(k.length<2||g.length<2)return-1;Q=2,ee/=2,he/=2,b/=2}function Ie(Vt,mt){return Q===1?Vt[mt]:Vt.readUInt16BE(mt*Q)}let Bt;if(W){let Vt=-1;for(Bt=b;Bt<ee;Bt++)if(Ie(k,Bt)===Ie(g,Vt===-1?0:Bt-Vt)){if(Vt===-1&&(Vt=Bt),Bt-Vt+1===he)return Vt*Q}else Vt!==-1&&(Bt-=Bt-Vt),Vt=-1}else for(b+he>ee&&(b=ee-he),Bt=b;Bt>=0;Bt--){let Vt=!0;for(let mt=0;mt<he;mt++)if(Ie(k,Bt+mt)!==Ie(g,mt)){Vt=!1;break}if(Vt)return Bt}return-1}u.prototype.includes=function(g,b,B){return this.indexOf(g,b,B)!==-1},u.prototype.indexOf=function(g,b,B){return G(this,g,b,B,!0)},u.prototype.lastIndexOf=function(g,b,B){return G(this,g,b,B,!1)};function M(k,g,b,B){b=Number(b)||0;const W=k.length-b;B?(B=Number(B),B>W&&(B=W)):B=W;const Q=g.length;B>Q/2&&(B=Q/2);let ee;for(ee=0;ee<B;++ee){const he=parseInt(g.substr(ee*2,2),16);if(Sr(he))return ee;k[b+ee]=he}return ee}function Z(k,g,b,B){return Mr(qt(g,k.length-b),k,b,B)}function j(k,g,b,B){return Mr(Je(g),k,b,B)}function $(k,g,b,B){return Mr(Pt(g),k,b,B)}function L(k,g,b,B){return Mr(nt(g,k.length-b),k,b,B)}u.prototype.write=function(g,b,B,W){if(b===void 0)W="utf8",B=this.length,b=0;else if(B===void 0&&typeof b=="string")W=b,B=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(B)?(B=B>>>0,W===void 0&&(W="utf8")):(W=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Q=this.length-b;if((B===void 0||B>Q)&&(B=Q),g.length>0&&(B<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let ee=!1;for(;;)switch(W){case"hex":return M(this,g,b,B);case"utf8":case"utf-8":return Z(this,g,b,B);case"ascii":case"latin1":case"binary":return j(this,g,b,B);case"base64":return $(this,g,b,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,g,b,B);default:if(ee)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),ee=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(k,g,b){return g===0&&b===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(g,b))}function X(k,g,b){b=Math.min(k.length,b);const B=[];let W=g;for(;W<b;){const Q=k[W];let ee=null,he=Q>239?4:Q>223?3:Q>191?2:1;if(W+he<=b){let Ie,Bt,Vt,mt;switch(he){case 1:Q<128&&(ee=Q);break;case 2:Ie=k[W+1],(Ie&192)===128&&(mt=(Q&31)<<6|Ie&63,mt>127&&(ee=mt));break;case 3:Ie=k[W+1],Bt=k[W+2],(Ie&192)===128&&(Bt&192)===128&&(mt=(Q&15)<<12|(Ie&63)<<6|Bt&63,mt>2047&&(mt<55296||mt>57343)&&(ee=mt));break;case 4:Ie=k[W+1],Bt=k[W+2],Vt=k[W+3],(Ie&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(mt=(Q&15)<<18|(Ie&63)<<12|(Bt&63)<<6|Vt&63,mt>65535&&mt<1114112&&(ee=mt))}}ee===null?(ee=65533,he=1):ee>65535&&(ee-=65536,B.push(ee>>>10&1023|55296),ee=56320|ee&1023),B.push(ee),W+=he}return re(B)}const te=4096;function re(k){const g=k.length;if(g<=te)return String.fromCharCode.apply(String,k);let b="",B=0;for(;B<g;)b+=String.fromCharCode.apply(String,k.slice(B,B+=te));return b}function ne(k,g,b){let B="";b=Math.min(k.length,b);for(let W=g;W<b;++W)B+=String.fromCharCode(k[W]&127);return B}function ce(k,g,b){let B="";b=Math.min(k.length,b);for(let W=g;W<b;++W)B+=String.fromCharCode(k[W]);return B}function Se(k,g,b){const B=k.length;(!g||g<0)&&(g=0),(!b||b<0||b>B)&&(b=B);let W="";for(let Q=g;Q<b;++Q)W+=y[k[Q]];return W}function _e(k,g,b){const B=k.slice(g,b);let W="";for(let Q=0;Q<B.length-1;Q+=2)W+=String.fromCharCode(B[Q]+B[Q+1]*256);return W}u.prototype.slice=function(g,b){const B=this.length;g=~~g,b=b===void 0?B:~~b,g<0?(g+=B,g<0&&(g=0)):g>B&&(g=B),b<0?(b+=B,b<0&&(b=0)):b>B&&(b=B),b<g&&(b=g);const W=this.subarray(g,b);return Object.setPrototypeOf(W,u.prototype),W};function Re(k,g,b){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+g>b)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g],Q=1,ee=0;for(;++ee<b&&(Q*=256);)W+=this[g+ee]*Q;return W},u.prototype.readUintBE=u.prototype.readUIntBE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g+--b],Q=1;for(;b>0&&(Q*=256);)W+=this[g+--b]*Q;return W},u.prototype.readUint8=u.prototype.readUInt8=function(g,b){return g=g>>>0,b||Re(g,1,this.length),this[g]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||Re(g,2,this.length),this[g]|this[g+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||Re(g,2,this.length),this[g]<<8|this[g+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},u.prototype.readBigUInt64LE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,Q=this[++g]+this[++g]*2**8+this[++g]*2**16+B*2**24;return BigInt(W)+(BigInt(Q)<<BigInt(32))}),u.prototype.readBigUInt64BE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],Q=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+B;return(BigInt(W)<<BigInt(32))+BigInt(Q)}),u.prototype.readIntLE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g],Q=1,ee=0;for(;++ee<b&&(Q*=256);)W+=this[g+ee]*Q;return Q*=128,W>=Q&&(W-=Math.pow(2,8*b)),W},u.prototype.readIntBE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=b,Q=1,ee=this[g+--W];for(;W>0&&(Q*=256);)ee+=this[g+--W]*Q;return Q*=128,ee>=Q&&(ee-=Math.pow(2,8*b)),ee},u.prototype.readInt8=function(g,b){return g=g>>>0,b||Re(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},u.prototype.readInt16LE=function(g,b){g=g>>>0,b||Re(g,2,this.length);const B=this[g]|this[g+1]<<8;return B&32768?B|4294901760:B},u.prototype.readInt16BE=function(g,b){g=g>>>0,b||Re(g,2,this.length);const B=this[g+1]|this[g]<<8;return B&32768?B|4294901760:B},u.prototype.readInt32LE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},u.prototype.readInt32BE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},u.prototype.readBigInt64LE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(B<<24);return(BigInt(W)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),u.prototype.readBigInt64BE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=(b<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(W)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+B)}),u.prototype.readFloatLE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),r.read(this,g,!0,23,4)},u.prototype.readFloatBE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),r.read(this,g,!1,23,4)},u.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||Re(g,8,this.length),r.read(this,g,!0,52,8)},u.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||Re(g,8,this.length),r.read(this,g,!1,52,8)};function be(k,g,b,B,W,Q){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>W||g<Q)throw new RangeError('"value" argument is out of bounds');if(b+B>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(g,b,B,W){if(g=+g,b=b>>>0,B=B>>>0,!W){const he=Math.pow(2,8*B)-1;be(this,g,b,B,he,0)}let Q=1,ee=0;for(this[b]=g&255;++ee<B&&(Q*=256);)this[b+ee]=g/Q&255;return b+B},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(g,b,B,W){if(g=+g,b=b>>>0,B=B>>>0,!W){const he=Math.pow(2,8*B)-1;be(this,g,b,B,he,0)}let Q=B-1,ee=1;for(this[b+Q]=g&255;--Q>=0&&(ee*=256);)this[b+Q]=g/ee&255;return b+B},u.prototype.writeUint8=u.prototype.writeUInt8=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,1,255,0),this[b]=g&255,b+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function ve(k,g,b,B,W){Kt(g,B,W,k,b,7);let Q=Number(g&BigInt(4294967295));k[b++]=Q,Q=Q>>8,k[b++]=Q,Q=Q>>8,k[b++]=Q,Q=Q>>8,k[b++]=Q;let ee=Number(g>>BigInt(32)&BigInt(4294967295));return k[b++]=ee,ee=ee>>8,k[b++]=ee,ee=ee>>8,k[b++]=ee,ee=ee>>8,k[b++]=ee,b}function je(k,g,b,B,W){Kt(g,B,W,k,b,7);let Q=Number(g&BigInt(4294967295));k[b+7]=Q,Q=Q>>8,k[b+6]=Q,Q=Q>>8,k[b+5]=Q,Q=Q>>8,k[b+4]=Q;let ee=Number(g>>BigInt(32)&BigInt(4294967295));return k[b+3]=ee,ee=ee>>8,k[b+2]=ee,ee=ee>>8,k[b+1]=ee,ee=ee>>8,k[b]=ee,b+8}u.prototype.writeBigUInt64LE=E(function(g,b=0){return ve(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=E(function(g,b=0){return je(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(g,b,B,W){if(g=+g,b=b>>>0,!W){const Ie=Math.pow(2,8*B-1);be(this,g,b,B,Ie-1,-Ie)}let Q=0,ee=1,he=0;for(this[b]=g&255;++Q<B&&(ee*=256);)g<0&&he===0&&this[b+Q-1]!==0&&(he=1),this[b+Q]=(g/ee>>0)-he&255;return b+B},u.prototype.writeIntBE=function(g,b,B,W){if(g=+g,b=b>>>0,!W){const Ie=Math.pow(2,8*B-1);be(this,g,b,B,Ie-1,-Ie)}let Q=B-1,ee=1,he=0;for(this[b+Q]=g&255;--Q>=0&&(ee*=256);)g<0&&he===0&&this[b+Q+1]!==0&&(he=1),this[b+Q]=(g/ee>>0)-he&255;return b+B},u.prototype.writeInt8=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},u.prototype.writeInt16LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},u.prototype.writeInt16BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},u.prototype.writeInt32LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},u.prototype.writeInt32BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},u.prototype.writeBigInt64LE=E(function(g,b=0){return ve(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=E(function(g,b=0){return je(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Pe(k,g,b,B,W,Q){if(b+B>k.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function Ve(k,g,b,B,W){return g=+g,b=b>>>0,W||Pe(k,g,b,4),r.write(k,g,b,B,23,4),b+4}u.prototype.writeFloatLE=function(g,b,B){return Ve(this,g,b,!0,B)},u.prototype.writeFloatBE=function(g,b,B){return Ve(this,g,b,!1,B)};function Ke(k,g,b,B,W){return g=+g,b=b>>>0,W||Pe(k,g,b,8),r.write(k,g,b,B,52,8),b+8}u.prototype.writeDoubleLE=function(g,b,B){return Ke(this,g,b,!0,B)},u.prototype.writeDoubleBE=function(g,b,B){return Ke(this,g,b,!1,B)},u.prototype.copy=function(g,b,B,W){if(!u.isBuffer(g))throw new TypeError("argument should be a Buffer");if(B||(B=0),!W&&W!==0&&(W=this.length),b>=g.length&&(b=g.length),b||(b=0),W>0&&W<B&&(W=B),W===B||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),g.length-b<W-B&&(W=g.length-b+B);const Q=W-B;return this===g&&typeof s.prototype.copyWithin=="function"?this.copyWithin(b,B,W):s.prototype.set.call(g,this.subarray(B,W),b),Q},u.prototype.fill=function(g,b,B,W){if(typeof g=="string"){if(typeof b=="string"?(W=b,b=0,B=this.length):typeof B=="string"&&(W=B,B=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!u.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(g.length===1){const ee=g.charCodeAt(0);(W==="utf8"&&ee<128||W==="latin1")&&(g=ee)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<B)throw new RangeError("Out of range index");if(B<=b)return this;b=b>>>0,B=B===void 0?this.length:B>>>0,g||(g=0);let Q;if(typeof g=="number")for(Q=b;Q<B;++Q)this[Q]=g;else{const ee=u.isBuffer(g)?g:u.from(g,W),he=ee.length;if(he===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(Q=0;Q<B-b;++Q)this[Q+b]=ee[Q%he]}return this};const rt={};function vt(k,g,b){rt[k]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}vt("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),vt("ERR_INVALID_ARG_TYPE",function(k,g){return`The "${k}" argument must be of type number. Received type ${typeof g}`},TypeError),vt("ERR_OUT_OF_RANGE",function(k,g,b){let B=`The value of "${k}" is out of range.`,W=b;return Number.isInteger(b)&&Math.abs(b)>2**32?W=tt(String(b)):typeof b=="bigint"&&(W=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(W=tt(W)),W+="n"),B+=` It must be ${g}. Received ${W}`,B},RangeError);function tt(k){let g="",b=k.length;const B=k[0]==="-"?1:0;for(;b>=B+4;b-=3)g=`_${k.slice(b-3,b)}${g}`;return`${k.slice(0,b)}${g}`}function ot(k,g,b){Yt(g,"offset"),(k[g]===void 0||k[g+b]===void 0)&&Mt(g,k.length-(b+1))}function Kt(k,g,b,B,W,Q){if(k>b||k<g){const ee=typeof g=="bigint"?"n":"";let he;throw g===0||g===BigInt(0)?he=`>= 0${ee} and < 2${ee} ** ${(Q+1)*8}${ee}`:he=`>= -(2${ee} ** ${(Q+1)*8-1}${ee}) and < 2 ** ${(Q+1)*8-1}${ee}`,new rt.ERR_OUT_OF_RANGE("value",he,k)}ot(B,W,Q)}function Yt(k,g){if(typeof k!="number")throw new rt.ERR_INVALID_ARG_TYPE(g,"number",k)}function Mt(k,g,b){throw Math.floor(k)!==k?(Yt(k,b),new rt.ERR_OUT_OF_RANGE("offset","an integer",k)):g<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${g}`,k)}const wr=/[^+/0-9A-Za-z-_]/g;function nr(k){if(k=k.split("=")[0],k=k.trim().replace(wr,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function qt(k,g){g=g||1/0;let b;const B=k.length;let W=null;const Q=[];for(let ee=0;ee<B;++ee){if(b=k.charCodeAt(ee),b>55295&&b<57344){if(!W){if(b>56319){(g-=3)>-1&&Q.push(239,191,189);continue}else if(ee+1===B){(g-=3)>-1&&Q.push(239,191,189);continue}W=b;continue}if(b<56320){(g-=3)>-1&&Q.push(239,191,189),W=b;continue}b=(W-55296<<10|b-56320)+65536}else W&&(g-=3)>-1&&Q.push(239,191,189);if(W=null,b<128){if((g-=1)<0)break;Q.push(b)}else if(b<2048){if((g-=2)<0)break;Q.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;Q.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;Q.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return Q}function Je(k){const g=[];for(let b=0;b<k.length;++b)g.push(k.charCodeAt(b)&255);return g}function nt(k,g){let b,B,W;const Q=[];for(let ee=0;ee<k.length&&!((g-=2)<0);++ee)b=k.charCodeAt(ee),B=b>>8,W=b%256,Q.push(W),Q.push(B);return Q}function Pt(k){return e.toByteArray(nr(k))}function Mr(k,g,b,B){let W;for(W=0;W<B&&!(W+b>=g.length||W>=k.length);++W)g[W+b]=k[W];return W}function pt(k,g){return k instanceof g||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===g.name}function Sr(k){return k!==k}const y=function(){const k="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const B=b*16;for(let W=0;W<16;++W)g[B+W]=k[b]+k[W]}return g}();function E(k){return typeof BigInt>"u"?x:k}function x(){throw new Error("BigInt not supported")}})(Wk);const pa=Wk.Buffer;var i2={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_f35c6a36-15ba-4ab0-b787-7a667e84a6e5",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",STATS_TRP:"true",USER:"runner",npm_config_always_auth:"true",npm_config_user_agent:"pnpm/10.12.3 npm/? node/v20.19.2 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_f35c6a36-15ba-4ab0-b787-7a667e84a6e5",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.1.13356709",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-8.14.2",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"711",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20250622.1.0",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.10/x64",JOURNAL_STREAM:"9:6706",RUNNER_USER:"runner",STATS_V3PS:"true",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.4/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"15877783071",STATS_D:"true",STATS_VMFE:"true",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"7ee90954299258ed32bbac5184ecbf58f60ec9ea",ImageOS:"ubuntu24",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish-evm.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"8013c6c9f909409eada557ec131cb834",NODE:"/opt/hostedtoolcache/node/20.19.2/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_65b56151-8ef7-4523-9e52-f19cad42e713",TURBO_HASH:"9156f2edee01974d",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"58",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000342",STATS_D_D:"true",STATS_VMD:"true",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",STATS_UE:"true",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",STATS_PIP:"false",npm_package_version:"0.2.7",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",RUNNER_PERFLOG:"/home/runner/perflog",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"7ee90954299258ed32bbac5184ecbf58f60ec9ea",STATS_D_TC:"true",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_f35c6a36-15ba-4ab0-b787-7a667e84a6e5",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/pnpm.cjs",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_f35c6a36-15ba-4ab0-b787-7a667e84a6e5",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",STATS_EXT:"true",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_f35c6a36-15ba-4ab0-b787-7a667e84a6e5",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},Me;if(typeof window>"u"){var zk={hostname:""};Me={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:zk,referrer:""},screen:{width:0,height:0},location:zk,addEventListener:function(){},removeEventListener:function(){}}}else Me=window;function Gk(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hk(t,e,r,n,i,s,o){try{var a=t[s](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,i)}function ky(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(c){Hk(s,n,i,o,a,"next",c)}function a(c){Hk(s,n,i,o,a,"throw",c)}o(void 0)})}}function s2(t,e,r){return jk()?s2=Reflect.construct:s2=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),l=new c;return o&&Vf(l,o.prototype),l},s2.apply(null,arguments)}function RP(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,n.key,n)}}function an(t,e,r){return e&&RP(t.prototype,e),t}function Ut(){return Ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ut.apply(this,arguments)}function _y(t){return _y=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_y(t)}function wn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vf(t,e)}function ht(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function TP(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Pf(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Vf(t,e){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(t,e)}function _t(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function NP(t,e){if(t){if(typeof t=="string")return Gk(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gk(t,e)}}function o2(t){var e=typeof Map=="function"?new Map:void 0;return o2=function(n){if(n===null||!TP(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return s2(n,arguments,_y(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Vf(i,n)},o2(t)}function jk(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jk=function(){return!!t})()}function He(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=NP(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ff(t,e){var r,n,i,s,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(l[0]===6&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Qk(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var xP=Object.defineProperty,BP=function(t,e,r){return e in t?xP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Oe=function(t,e,r){return BP(t,(typeof e>"u"?"undefined":_t(e))!=="symbol"?e+"":e,r)},Jk,IP=Object.defineProperty,OP=function(t,e,r){return e in t?IP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Yk=function(t,e,r){return OP(t,(typeof e>"u"?"undefined":_t(e))!=="symbol"?e+"":e,r)},Qr=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(Qr||{}),$k={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},a2={},UP=function(){return!!globalThis.Zone};function Ey(t){if(a2[t])return a2[t];var e=globalThis[t],r=e.prototype,n=t in $k?$k[t]:void 0,i=!!(n&&n.every(function(u){var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,u))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),s=t in Xk?Xk[t]:void 0,o=!!(s&&s.every(function(u){var d;return typeof r[u]=="function"&&((d=r[u])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o&&!UP())return a2[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?a2[t]=l:r}catch{return r}}var Cy={};function ma(t,e,r){var n,i=t+"."+String(r);if(Cy[i])return Cy[i].call(e);var s=Ey(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Cy[i]=o,o.call(e)):e[r]}var Sy={};function Kk(t,e,r){var n=t+"."+String(r);if(Sy[n])return Sy[n].bind(e);var i=Ey(t),s=i[r];return typeof s!="function"?e[r]:(Sy[n]=s,s.bind(e))}function MP(t){return ma("Node",t,"childNodes")}function PP(t){return ma("Node",t,"parentNode")}function VP(t){return ma("Node",t,"parentElement")}function FP(t){return ma("Node",t,"textContent")}function LP(t,e){return Kk("Node",t,"contains")(e)}function DP(t){return Kk("Node",t,"getRootNode")()}function WP(t){return!t||!("host"in t)?null:ma("ShadowRoot",t,"host")}function ZP(t){return t.styleSheets}function zP(t){return!t||!("shadowRoot"in t)?null:ma("Element",t,"shadowRoot")}function GP(t,e){return ma("Element",t,"querySelector")(e)}function HP(t,e){return ma("Element",t,"querySelectorAll")(e)}function jP(){return Ey("MutationObserver").constructor}var bn={childNodes:MP,parentNode:PP,parentElement:VP,textContent:FP,contains:LP,getRootNode:DP,host:WP,styleSheets:ZP,shadowRoot:zP,querySelector:GP,querySelectorAll:HP,mutationObserver:jP};function qk(t){return t.nodeType===t.ELEMENT_NODE}function Lf(t){var e=t&&"host"in t&&"mode"in t&&bn.host(t)||null;return!!(e&&"shadowRoot"in e&&bn.shadowRoot(e)===t)}function Df(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function QP(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function JP(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function Ay(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(i){return e_(i,r)}).join("");return QP(n)}catch{return null}}function e_(t,e){if($P(t)){var r;try{r=Ay(t.styleSheet)||JP(t)}catch{r=t.cssText}return t.styleSheet.href?c2(r,t.styleSheet.href):r}else{var n=t.cssText;return XP(t)&&t.selectorText.includes(":")&&(n=YP(n)),e?c2(n,e):n}}function YP(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function $P(t){return"styleSheet"in t}function XP(t){return"selectorText"in t}var t_=function(){function t(){Yk(this,"idNodeMap",new Map),Yk(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var i;if(!n)return-1;var s=(i=this.getMeta(n))==null?void 0:i.id;return s??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var i=this,s=this.getId(n);this.idNodeMap.delete(s),n.childNodes&&n.childNodes.forEach(function(o){return i.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,i){var s=i.id;this.idNodeMap.set(s,n),this.nodeMetaMap.set(n,i)},e.replace=function(n,i){var s=this.getNode(n);if(s){var o=this.nodeMetaMap.get(s);o&&this.nodeMetaMap.set(i,o)}this.idNodeMap.set(n,i)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function KP(){return new t_}function Ry(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,i=t.type,s=t.value,o=t.maskInputFn,a=s||"",c=i&&Vc(i);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Vc(t){return t.toLowerCase()}var r_="__rrweb_original__";function qP(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var i=0;i<t.height;i+=r){var s=e.getImageData,o=r_ in s?s[r_]:s,a=new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function Ty(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Vc(e):null}function n_(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n),s;return(s=i==null?void 0:i[1])!=null?s:null}function eV(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var tV=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rV=/^(?:[a-z+]+:)?\/\//i,nV=/^www\..*/i,iV=/^(data:)([^,]*),(.*)/i;function c2(t,e){return(t||"").replace(tV,function(r,n,i,s,o,a){var c=i||o||a,l=n||s||"";if(!c)return r;if(rV.test(c)||nV.test(c)||iV.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(eV(e)+c)+l+")";var u=e.split("/"),d=c.split("/");u.pop();for(var h=He(d),f;!(f=h()).done;){var p=f.value;p!=="."&&(p===".."?u.pop():u.push(p))}return"url("+l+u.join("/")+l+")"})}function Ny(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function sV(t,e){var r=Array.from(e.childNodes),n=[];if(r.length>1&&t&&typeof t=="string"){for(var i=Ny(t),s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent=="string")for(var o=Ny(r[s].textContent),a=3;a<o.length;a++){var c=o.substring(0,a);if(i.split(c).length===2){for(var l=i.indexOf(c),u=l;u<t.length;u++)if(Ny(t.substring(0,u)).length===l){n.push(t.substring(0,u)),t=t.substring(u);break}break}}}return n.push(t),n}function oV(t,e){return sV(t,e).join("/* rr_split */")}var aV=1,cV=new RegExp("[^a-z0-9-_:]"),Wf=-2;function i_(){return aV++}function lV(t){if(ht(t,HTMLFormElement))return"form";var e=Vc(t.tagName);return cV.test(e)?"div":e}var Zu,s_,uV=/^[^ \t\n\r\u000c]+/,dV=/^[, \t\n\r\u000c]+/;function hV(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,d=l.exec(e.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var i=[];n(dV),!(r>=e.length);){var s=n(uV);if(s.slice(-1)===",")s=zu(t,s.substring(0,s.length-1)),i.push(s);else{var o="";s=zu(t,s);for(var a=!1;;){var c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return i.join(", ")}var o_=new WeakMap;function zu(t,e){return!e||e.trim()===""?e:xy(t,e)}function fV(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function xy(t,e){var r=o_.get(t);if(r||(r=t.createElement("a"),o_.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function a_(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?zu(t,n):r==="srcset"?hV(t,n):r==="style"?c2(n,xy(t)):e==="object"&&r==="data"?zu(t,n):n)}function c_(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function pV(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function l2(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?l2(bn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}return r?l2(bn.parentNode(t),e,r):!1}function l_(t,e,r,n){var i;if(qk(t)){if(i=t,!bn.childNodes(i).length)return!1}else{if(bn.parentElement(t)===null)return!1;i=bn.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest("."+e))return!0}else if(i.classList.contains(e))return!0}else if(l2(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function mV(t,e,r){var n=t.contentWindow;if(n){var i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function gV(t,e,r){var n=!1,i;try{i=t.sheet}catch{return}if(!i){var s=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(s),n=!0,e()})}}function vV(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,d=e.maskInputFn,h=e.dataURLOptions,f=h===void 0?{}:h,p=e.inlineImages,v=e.recordCanvas,m=e.keepIframeSrcFn,w=e.newlyAddedElement,_=w===void 0?!1:w,S=e.cssCaptured,T=S===void 0?!1:S,N=yV(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Qr.Document,childNodes:[],compatMode:t.compatMode}:{type:Qr.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Qr.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:N};case t.ELEMENT_NODE:return bV(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,dataURLOptions:f,inlineImages:p,recordCanvas:v,keepIframeSrcFn:m,newlyAddedElement:_,rootId:N});case t.TEXT_NODE:return wV(t,{doc:r,needsMask:o,maskTextFn:u,rootId:N,cssCaptured:T});case t.CDATA_SECTION_NODE:return{type:Qr.CDATA,textContent:"",rootId:N};case t.COMMENT_NODE:return{type:Qr.Comment,textContent:bn.textContent(t)||"",rootId:N};default:return!1}}function yV(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function wV(t,e){var r=e.needsMask,n=e.maskTextFn,i=e.rootId,s=e.cssCaptured,o=bn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":s||(c=bn.textContent(t),l&&c&&(c=c2(c,xy(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,bn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Qr.Text,textContent:c||"",rootId:i}}function bV(t,e){for(var r=e.doc,n=e.blockClass,i=e.blockSelector,s=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,d=e.inlineImages,h=e.recordCanvas,f=e.keepIframeSrcFn,p=e.newlyAddedElement,v=p===void 0?!1:p,m=e.rootId,w=pV(t,n,i),_=lV(t),S={},T=t.attributes.length,N=0;N<T;N++){var I=t.attributes[N];c_(_,I.name,I.value)||(S[I.name]=a_(r,_,Vc(I.name),I.value))}if(_==="link"&&s){var O=Array.from(r.styleSheets).find(function(Re){return Re.href===t.href}),U=null;O&&(U=Ay(O)),U&&(delete S.rel,delete S.href,S._cssText=U)}if(_==="style"&&t.sheet){var G=Ay(t.sheet);G&&(t.childNodes.length>1&&(G=oV(G,t)),S._cssText=G)}if(_==="input"||_==="textarea"||_==="select"){var D=t.value,M=t.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&D?S.value=Ry({element:t,type:Ty(t),tagName:_,value:D,maskInputOptions:a,maskInputFn:c}):M&&(S.checked=M)}if(_==="option"&&(t.selected&&!a.select?S.selected=!0:delete S.selected),_==="dialog"&&t.open&&(S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&h){if(t.__context==="2d")qP(t)||(S.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var Z=t.toDataURL(u.type,u.quality),j=r.createElement("canvas");j.width=t.width,j.height=t.height;var $=j.toDataURL(u.type,u.quality);Z!==$&&(S.rr_dataURL=Z)}}if(_==="img"&&d){Zu||(Zu=r.createElement("canvas"),s_=Zu.getContext("2d"));var L=t,z=L.currentSrc||L.getAttribute("src")||"<unknown-src>",X=L.crossOrigin,te=function(){L.removeEventListener("load",te);try{Zu.width=L.naturalWidth,Zu.height=L.naturalHeight,s_.drawImage(L,0,0),S.rr_dataURL=Zu.toDataURL(u.type,u.quality)}catch(Re){if(L.crossOrigin!=="anonymous"){L.crossOrigin="anonymous",L.complete&&L.naturalWidth!==0?te():L.addEventListener("load",te);return}else console.warn("Cannot inline img src="+z+"! Error: "+Re)}L.crossOrigin==="anonymous"&&(X?S.crossOrigin=X:L.removeAttribute("crossorigin"))};L.complete&&L.naturalWidth!==0?te():L.addEventListener("load",te)}if(_==="audio"||_==="video"){var re=S;re.rr_mediaState=t.paused?"paused":"played",re.rr_mediaCurrentTime=t.currentTime,re.rr_mediaPlaybackRate=t.playbackRate,re.rr_mediaMuted=t.muted,re.rr_mediaLoop=t.loop,re.rr_mediaVolume=t.volume}if(v||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),w){var ne=t.getBoundingClientRect(),ce=ne.width,Se=ne.height;S={class:S.class,rr_width:""+ce+"px",rr_height:""+Se+"px"}}_==="iframe"&&!f(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src);var _e;try{customElements.get(_)&&(_e=!0)}catch{}return{type:Qr.Element,tagName:_,attributes:S,childNodes:[],isSVG:fV(t)||void 0,needBlock:w,rootId:m,isCustom:_e}}function ur(t){return t==null?"":t.toLowerCase()}function kV(t,e){if(e.comment&&t.type===Qr.Comment)return!0;if(t.type===Qr.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&n_(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ur(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ur(t.attributes.name)==="application-name"||ur(t.attributes.rel)==="icon"||ur(t.attributes.rel)==="apple-touch-icon"||ur(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&ur(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ur(t.attributes.property).match(/^(og|twitter|fb):/)||ur(t.attributes.name).match(/^(og|twitter):/)||ur(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(ur(t.attributes.name)==="robots"||ur(t.attributes.name)==="googlebot"||ur(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(ur(t.attributes.name)==="author"||ur(t.attributes.name)==="generator"||ur(t.attributes.name)==="framework"||ur(t.attributes.name)==="publisher"||ur(t.attributes.name)==="progid"||ur(t.attributes.property).match(/^article:/)||ur(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(ur(t.attributes.name)==="google-site-verification"||ur(t.attributes.name)==="yandex-verification"||ur(t.attributes.name)==="csrf-token"||ur(t.attributes.name)==="p:domain_verify"||ur(t.attributes.name)==="verify-v1"||ur(t.attributes.name)==="verification"||ur(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Gu(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,d=u===void 0?!0:u,h=e.maskInputOptions,f=h===void 0?{}:h,p=e.maskTextFn,v=e.maskInputFn,m=e.slimDOMOptions,w=e.dataURLOptions,_=w===void 0?{}:w,S=e.inlineImages,T=S===void 0?!1:S,N=e.recordCanvas,I=N===void 0?!1:N,O=e.onSerialize,U=e.onIframeLoad,G=e.iframeLoadTimeout,D=G===void 0?5e3:G,M=e.onStylesheetLoad,Z=e.stylesheetLoadTimeout,j=Z===void 0?5e3:Z,$=e.keepIframeSrcFn,L=$===void 0?function(){return!1}:$,z=e.newlyAddedElement,X=z===void 0?!1:z,te=e.cssCaptured,re=te===void 0?!1:te,ne=e.needsMask,ce=e.preserveWhiteSpace,Se=ce===void 0?!0:ce;if(!ne){var _e=ne===void 0;ne=l_(t,o,a,_e)}var Re=vV(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,dataURLOptions:_,inlineImages:T,recordCanvas:I,keepIframeSrcFn:L,newlyAddedElement:X,cssCaptured:re});if(!Re)return console.warn(t,"not serialized"),null;var be;n.hasNode(t)?be=n.getId(t):kV(Re,m)||!Se&&Re.type===Qr.Text&&!Re.textContent.replace(/^\s+|\s+$/gm,"").length?be=Wf:be=i_();var ve=Object.assign(Re,{id:be});if(n.add(t,ve),be===Wf)return null;O&&O(t);var je=!l;if(ve.type===Qr.Element){je=je&&!ve.needBlock,delete ve.needBlock;var Pe=bn.shadowRoot(t);Pe&&Df(Pe)&&(ve.isShadowHost=!0)}if((ve.type===Qr.Document||ve.type===Qr.Element)&&je){m.headWhitespace&&ve.type===Qr.Element&&ve.tagName==="head"&&(Se=!1);var Ve={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L,cssCaptured:!1};if(!(ve.type===Qr.Element&&ve.tagName==="textarea"&&ve.attributes.value!==void 0)){ve.type===Qr.Element&&ve.attributes._cssText!==void 0&&typeof ve.attributes._cssText=="string"&&(Ve.cssCaptured=!0);for(var Ke=He(Array.from(bn.childNodes(t))),rt;!(rt=Ke()).done;){var vt=rt.value,tt=Gu(vt,Ve);tt&&ve.childNodes.push(tt)}}var ot=null;if(qk(t)&&(ot=bn.shadowRoot(t)))for(var Kt=He(Array.from(bn.childNodes(ot))),Yt;!(Yt=Kt()).done;){var Mt=Yt.value,wr=Gu(Mt,Ve);wr&&(Df(ot)&&(wr.isShadow=!0),ve.childNodes.push(wr))}}var nr=bn.parentNode(t);return nr&&Lf(nr)&&Df(nr)&&(ve.isShadow=!0),ve.type===Qr.Element&&ve.tagName==="iframe"&&mV(t,function(){var qt=t.contentDocument;if(qt&&U){var Je=Gu(qt,{doc:qt,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L});Je&&U(t,Je)}},D),ve.type===Qr.Element&&ve.tagName==="link"&&typeof ve.attributes.rel=="string"&&(ve.attributes.rel==="stylesheet"||ve.attributes.rel==="preload"&&typeof ve.attributes.href=="string"&&n_(ve.attributes.href)==="css")&&gV(t,function(){if(M){var qt=Gu(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L});qt&&M(t,qt)}},j),ve}function _V(t,e){var r=e||{},n=r.mirror,i=n===void 0?new t_:n,s=r.blockClass,o=s===void 0?"rr-block":s,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,d=r.maskTextSelector,h=d===void 0?null:d,f=r.inlineStylesheet,p=f===void 0?!0:f,v=r.inlineImages,m=v===void 0?!1:v,w=r.recordCanvas,_=w===void 0?!1:w,S=r.maskAllInputs,T=S===void 0?!1:S,N=r.maskTextFn,I=r.maskInputFn,O=r.slimDOM,U=O===void 0?!1:O,G=r.dataURLOptions,D=r.preserveWhiteSpace,M=r.onSerialize,Z=r.onIframeLoad,j=r.iframeLoadTimeout,$=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,z=r.keepIframeSrcFn,X=z===void 0?function(){return!1}:z,te=T===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:T===!1?{password:!0}:T,re=U===!0||U==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:U==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:U===!1?{}:U;return Gu(t,{doc:t,mirror:i,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:p,maskInputOptions:te,maskTextFn:N,maskInputFn:I,slimDOMOptions:re,dataURLOptions:G,inlineImages:m,recordCanvas:_,preserveWhiteSpace:D,onSerialize:M,onIframeLoad:Z,iframeLoadTimeout:j,onStylesheetLoad:$,stylesheetLoadTimeout:L,keepIframeSrcFn:X,newlyAddedElement:!1})}function EV(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function CV(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return ht(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var By={exports:{}},hr=String,u_=function(){return{isColorSupported:!1,reset:hr,bold:hr,dim:hr,italic:hr,underline:hr,inverse:hr,hidden:hr,strikethrough:hr,black:hr,red:hr,green:hr,yellow:hr,blue:hr,magenta:hr,cyan:hr,white:hr,gray:hr,bgBlack:hr,bgRed:hr,bgGreen:hr,bgYellow:hr,bgBlue:hr,bgMagenta:hr,bgCyan:hr,bgWhite:hr}};By.exports=u_(),By.exports.createColors=u_;var SV=By.exports,AV={},RV=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),Or=CV(RV),d_=SV,h_=Or,Iy=function(t){wn(e,t);function e(n,i,s,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof i<"u"&&typeof s<"u"&&(typeof i=="number"?(l.line=i,l.column=s):(l.line=i.line,l.column=i.column,l.endLine=s.line,l.endColumn=s.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var s=this;if(!this.source)return"";var o=this.source;i==null&&(i=d_.isColorSupported),h_&&i&&(o=h_(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,d,h;if(i){var f=d_.createColors(!0),p=f.bold,v=f.gray,m=f.red;d=function(w){return p(m(w))},h=function(w){return v(w)}}else d=h=function(w){return w};return a.slice(c,l).map(function(w,_){var S=c+1+_,T=" "+(" "+S).slice(-u)+" | ";if(S===s.line){var N=h(T.replace(/\d/g," "))+w.slice(0,s.column-1).replace(/[^\t]/g," ");return d(">")+h(T)+w+`
|
|
11
|
+
*/(function(t){const e=n2,r=by,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=N,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.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 c(){try{const k=new s(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,s.prototype),Object.setPrototypeOf(k,g),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(k){if(k>i)throw new RangeError('The value "'+k+'" is invalid for option "size"');const g=new s(k);return Object.setPrototypeOf(g,u.prototype),g}function u(k,g,b){if(typeof k=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(k)}return d(k,g,b)}u.poolSize=8192;function d(k,g,b){if(typeof k=="string")return v(k,g);if(o.isView(k))return w(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(pt(k,o)||k&&pt(k.buffer,o)||typeof a<"u"&&(pt(k,a)||k&&pt(k.buffer,a)))return _(k,g,b);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const B=k.valueOf&&k.valueOf();if(B!=null&&B!==k)return u.from(B,g,b);const W=S(k);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),g,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,g,b){return d(k,g,b)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function h(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function f(k,g,b){return h(k),k<=0?l(k):g!==void 0?typeof b=="string"?l(k).fill(g,b):l(k).fill(g):l(k)}u.alloc=function(k,g,b){return f(k,g,b)};function p(k){return h(k),l(k<0?0:T(k)|0)}u.allocUnsafe=function(k){return p(k)},u.allocUnsafeSlow=function(k){return p(k)};function v(k,g){if((typeof g!="string"||g==="")&&(g="utf8"),!u.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=I(k,g)|0;let B=l(b);const W=B.write(k,g);return W!==b&&(B=B.slice(0,W)),B}function m(k){const g=k.length<0?0:T(k.length)|0,b=l(g);for(let B=0;B<g;B+=1)b[B]=k[B]&255;return b}function w(k){if(pt(k,s)){const g=new s(k);return _(g.buffer,g.byteOffset,g.byteLength)}return m(k)}function _(k,g,b){if(g<0||k.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let B;return g===void 0&&b===void 0?B=new s(k):b===void 0?B=new s(k,g):B=new s(k,g,b),Object.setPrototypeOf(B,u.prototype),B}function S(k){if(u.isBuffer(k)){const g=T(k.length)|0,b=l(g);return b.length===0||k.copy(b,0,0,g),b}if(k.length!==void 0)return typeof k.length!="number"||Sr(k.length)?l(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function T(k){if(k>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return k|0}function N(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==u.prototype},u.compare=function(g,b){if(pt(g,s)&&(g=u.from(g,g.offset,g.byteLength)),pt(b,s)&&(b=u.from(b,b.offset,b.byteLength)),!u.isBuffer(g)||!u.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let B=g.length,W=b.length;for(let Q=0,ee=Math.min(B,W);Q<ee;++Q)if(g[Q]!==b[Q]){B=g[Q],W=b[Q];break}return B<W?-1:W<B?1:0},u.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(g,b){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return u.alloc(0);let B;if(b===void 0)for(b=0,B=0;B<g.length;++B)b+=g[B].length;const W=u.allocUnsafe(b);let Q=0;for(B=0;B<g.length;++B){let ee=g[B];if(pt(ee,s))Q+ee.length>W.length?(u.isBuffer(ee)||(ee=u.from(ee)),ee.copy(W,Q)):s.prototype.set.call(W,ee,Q);else if(u.isBuffer(ee))ee.copy(W,Q);else throw new TypeError('"list" argument must be an Array of Buffers');Q+=ee.length}return W};function I(k,g){if(u.isBuffer(k))return k.length;if(o.isView(k)||pt(k,o))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const b=k.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&b===0)return 0;let W=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return qt(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return Pt(k).length;default:if(W)return B?-1:qt(k).length;g=(""+g).toLowerCase(),W=!0}}u.byteLength=I;function O(k,g,b){let B=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(k||(k="utf8");;)switch(k){case"hex":return Se(this,g,b);case"utf8":case"utf-8":return X(this,g,b);case"ascii":return ne(this,g,b);case"latin1":case"binary":return ce(this,g,b);case"base64":return z(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,g,b);default:if(B)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),B=!0}}u.prototype._isBuffer=!0;function U(k,g,b){const B=k[g];k[g]=k[b],k[b]=B}u.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<g;b+=2)U(this,b,b+1);return this},u.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<g;b+=4)U(this,b,b+3),U(this,b+1,b+2);return this},u.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<g;b+=8)U(this,b,b+7),U(this,b+1,b+6),U(this,b+2,b+5),U(this,b+3,b+4);return this},u.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?X(this,0,g):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(g){if(!u.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:u.compare(this,g)===0},u.prototype.inspect=function(){let g="";const b=t.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(g,b,B,W,Q){if(pt(g,s)&&(g=u.from(g,g.offset,g.byteLength)),!u.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(b===void 0&&(b=0),B===void 0&&(B=g?g.length:0),W===void 0&&(W=0),Q===void 0&&(Q=this.length),b<0||B>g.length||W<0||Q>this.length)throw new RangeError("out of range index");if(W>=Q&&b>=B)return 0;if(W>=Q)return-1;if(b>=B)return 1;if(b>>>=0,B>>>=0,W>>>=0,Q>>>=0,this===g)return 0;let ee=Q-W,he=B-b;const Ie=Math.min(ee,he),Bt=this.slice(W,Q),Vt=g.slice(b,B);for(let mt=0;mt<Ie;++mt)if(Bt[mt]!==Vt[mt]){ee=Bt[mt],he=Vt[mt];break}return ee<he?-1:he<ee?1:0};function G(k,g,b,B,W){if(k.length===0)return-1;if(typeof b=="string"?(B=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Sr(b)&&(b=W?0:k.length-1),b<0&&(b=k.length+b),b>=k.length){if(W)return-1;b=k.length-1}else if(b<0)if(W)b=0;else return-1;if(typeof g=="string"&&(g=u.from(g,B)),u.isBuffer(g))return g.length===0?-1:D(k,g,b,B,W);if(typeof g=="number")return g=g&255,typeof s.prototype.indexOf=="function"?W?s.prototype.indexOf.call(k,g,b):s.prototype.lastIndexOf.call(k,g,b):D(k,[g],b,B,W);throw new TypeError("val must be string, number or Buffer")}function D(k,g,b,B,W){let Q=1,ee=k.length,he=g.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(k.length<2||g.length<2)return-1;Q=2,ee/=2,he/=2,b/=2}function Ie(Vt,mt){return Q===1?Vt[mt]:Vt.readUInt16BE(mt*Q)}let Bt;if(W){let Vt=-1;for(Bt=b;Bt<ee;Bt++)if(Ie(k,Bt)===Ie(g,Vt===-1?0:Bt-Vt)){if(Vt===-1&&(Vt=Bt),Bt-Vt+1===he)return Vt*Q}else Vt!==-1&&(Bt-=Bt-Vt),Vt=-1}else for(b+he>ee&&(b=ee-he),Bt=b;Bt>=0;Bt--){let Vt=!0;for(let mt=0;mt<he;mt++)if(Ie(k,Bt+mt)!==Ie(g,mt)){Vt=!1;break}if(Vt)return Bt}return-1}u.prototype.includes=function(g,b,B){return this.indexOf(g,b,B)!==-1},u.prototype.indexOf=function(g,b,B){return G(this,g,b,B,!0)},u.prototype.lastIndexOf=function(g,b,B){return G(this,g,b,B,!1)};function M(k,g,b,B){b=Number(b)||0;const W=k.length-b;B?(B=Number(B),B>W&&(B=W)):B=W;const Q=g.length;B>Q/2&&(B=Q/2);let ee;for(ee=0;ee<B;++ee){const he=parseInt(g.substr(ee*2,2),16);if(Sr(he))return ee;k[b+ee]=he}return ee}function Z(k,g,b,B){return Mr(qt(g,k.length-b),k,b,B)}function j(k,g,b,B){return Mr(Je(g),k,b,B)}function $(k,g,b,B){return Mr(Pt(g),k,b,B)}function L(k,g,b,B){return Mr(nt(g,k.length-b),k,b,B)}u.prototype.write=function(g,b,B,W){if(b===void 0)W="utf8",B=this.length,b=0;else if(B===void 0&&typeof b=="string")W=b,B=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(B)?(B=B>>>0,W===void 0&&(W="utf8")):(W=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Q=this.length-b;if((B===void 0||B>Q)&&(B=Q),g.length>0&&(B<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let ee=!1;for(;;)switch(W){case"hex":return M(this,g,b,B);case"utf8":case"utf-8":return Z(this,g,b,B);case"ascii":case"latin1":case"binary":return j(this,g,b,B);case"base64":return $(this,g,b,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,g,b,B);default:if(ee)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),ee=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(k,g,b){return g===0&&b===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(g,b))}function X(k,g,b){b=Math.min(k.length,b);const B=[];let W=g;for(;W<b;){const Q=k[W];let ee=null,he=Q>239?4:Q>223?3:Q>191?2:1;if(W+he<=b){let Ie,Bt,Vt,mt;switch(he){case 1:Q<128&&(ee=Q);break;case 2:Ie=k[W+1],(Ie&192)===128&&(mt=(Q&31)<<6|Ie&63,mt>127&&(ee=mt));break;case 3:Ie=k[W+1],Bt=k[W+2],(Ie&192)===128&&(Bt&192)===128&&(mt=(Q&15)<<12|(Ie&63)<<6|Bt&63,mt>2047&&(mt<55296||mt>57343)&&(ee=mt));break;case 4:Ie=k[W+1],Bt=k[W+2],Vt=k[W+3],(Ie&192)===128&&(Bt&192)===128&&(Vt&192)===128&&(mt=(Q&15)<<18|(Ie&63)<<12|(Bt&63)<<6|Vt&63,mt>65535&&mt<1114112&&(ee=mt))}}ee===null?(ee=65533,he=1):ee>65535&&(ee-=65536,B.push(ee>>>10&1023|55296),ee=56320|ee&1023),B.push(ee),W+=he}return re(B)}const te=4096;function re(k){const g=k.length;if(g<=te)return String.fromCharCode.apply(String,k);let b="",B=0;for(;B<g;)b+=String.fromCharCode.apply(String,k.slice(B,B+=te));return b}function ne(k,g,b){let B="";b=Math.min(k.length,b);for(let W=g;W<b;++W)B+=String.fromCharCode(k[W]&127);return B}function ce(k,g,b){let B="";b=Math.min(k.length,b);for(let W=g;W<b;++W)B+=String.fromCharCode(k[W]);return B}function Se(k,g,b){const B=k.length;(!g||g<0)&&(g=0),(!b||b<0||b>B)&&(b=B);let W="";for(let Q=g;Q<b;++Q)W+=y[k[Q]];return W}function _e(k,g,b){const B=k.slice(g,b);let W="";for(let Q=0;Q<B.length-1;Q+=2)W+=String.fromCharCode(B[Q]+B[Q+1]*256);return W}u.prototype.slice=function(g,b){const B=this.length;g=~~g,b=b===void 0?B:~~b,g<0?(g+=B,g<0&&(g=0)):g>B&&(g=B),b<0?(b+=B,b<0&&(b=0)):b>B&&(b=B),b<g&&(b=g);const W=this.subarray(g,b);return Object.setPrototypeOf(W,u.prototype),W};function Re(k,g,b){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+g>b)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g],Q=1,ee=0;for(;++ee<b&&(Q*=256);)W+=this[g+ee]*Q;return W},u.prototype.readUintBE=u.prototype.readUIntBE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g+--b],Q=1;for(;b>0&&(Q*=256);)W+=this[g+--b]*Q;return W},u.prototype.readUint8=u.prototype.readUInt8=function(g,b){return g=g>>>0,b||Re(g,1,this.length),this[g]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||Re(g,2,this.length),this[g]|this[g+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||Re(g,2,this.length),this[g]<<8|this[g+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},u.prototype.readBigUInt64LE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,Q=this[++g]+this[++g]*2**8+this[++g]*2**16+B*2**24;return BigInt(W)+(BigInt(Q)<<BigInt(32))}),u.prototype.readBigUInt64BE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],Q=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+B;return(BigInt(W)<<BigInt(32))+BigInt(Q)}),u.prototype.readIntLE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=this[g],Q=1,ee=0;for(;++ee<b&&(Q*=256);)W+=this[g+ee]*Q;return Q*=128,W>=Q&&(W-=Math.pow(2,8*b)),W},u.prototype.readIntBE=function(g,b,B){g=g>>>0,b=b>>>0,B||Re(g,b,this.length);let W=b,Q=1,ee=this[g+--W];for(;W>0&&(Q*=256);)ee+=this[g+--W]*Q;return Q*=128,ee>=Q&&(ee-=Math.pow(2,8*b)),ee},u.prototype.readInt8=function(g,b){return g=g>>>0,b||Re(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},u.prototype.readInt16LE=function(g,b){g=g>>>0,b||Re(g,2,this.length);const B=this[g]|this[g+1]<<8;return B&32768?B|4294901760:B},u.prototype.readInt16BE=function(g,b){g=g>>>0,b||Re(g,2,this.length);const B=this[g+1]|this[g]<<8;return B&32768?B|4294901760:B},u.prototype.readInt32LE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},u.prototype.readInt32BE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},u.prototype.readBigInt64LE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(B<<24);return(BigInt(W)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),u.prototype.readBigInt64BE=E(function(g){g=g>>>0,Yt(g,"offset");const b=this[g],B=this[g+7];(b===void 0||B===void 0)&&Mt(g,this.length-8);const W=(b<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(W)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+B)}),u.prototype.readFloatLE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),r.read(this,g,!0,23,4)},u.prototype.readFloatBE=function(g,b){return g=g>>>0,b||Re(g,4,this.length),r.read(this,g,!1,23,4)},u.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||Re(g,8,this.length),r.read(this,g,!0,52,8)},u.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||Re(g,8,this.length),r.read(this,g,!1,52,8)};function be(k,g,b,B,W,Q){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>W||g<Q)throw new RangeError('"value" argument is out of bounds');if(b+B>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(g,b,B,W){if(g=+g,b=b>>>0,B=B>>>0,!W){const he=Math.pow(2,8*B)-1;be(this,g,b,B,he,0)}let Q=1,ee=0;for(this[b]=g&255;++ee<B&&(Q*=256);)this[b+ee]=g/Q&255;return b+B},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(g,b,B,W){if(g=+g,b=b>>>0,B=B>>>0,!W){const he=Math.pow(2,8*B)-1;be(this,g,b,B,he,0)}let Q=B-1,ee=1;for(this[b+Q]=g&255;--Q>=0&&(ee*=256);)this[b+Q]=g/ee&255;return b+B},u.prototype.writeUint8=u.prototype.writeUInt8=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,1,255,0),this[b]=g&255,b+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function ve(k,g,b,B,W){Kt(g,B,W,k,b,7);let Q=Number(g&BigInt(4294967295));k[b++]=Q,Q=Q>>8,k[b++]=Q,Q=Q>>8,k[b++]=Q,Q=Q>>8,k[b++]=Q;let ee=Number(g>>BigInt(32)&BigInt(4294967295));return k[b++]=ee,ee=ee>>8,k[b++]=ee,ee=ee>>8,k[b++]=ee,ee=ee>>8,k[b++]=ee,b}function je(k,g,b,B,W){Kt(g,B,W,k,b,7);let Q=Number(g&BigInt(4294967295));k[b+7]=Q,Q=Q>>8,k[b+6]=Q,Q=Q>>8,k[b+5]=Q,Q=Q>>8,k[b+4]=Q;let ee=Number(g>>BigInt(32)&BigInt(4294967295));return k[b+3]=ee,ee=ee>>8,k[b+2]=ee,ee=ee>>8,k[b+1]=ee,ee=ee>>8,k[b]=ee,b+8}u.prototype.writeBigUInt64LE=E(function(g,b=0){return ve(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=E(function(g,b=0){return je(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(g,b,B,W){if(g=+g,b=b>>>0,!W){const Ie=Math.pow(2,8*B-1);be(this,g,b,B,Ie-1,-Ie)}let Q=0,ee=1,he=0;for(this[b]=g&255;++Q<B&&(ee*=256);)g<0&&he===0&&this[b+Q-1]!==0&&(he=1),this[b+Q]=(g/ee>>0)-he&255;return b+B},u.prototype.writeIntBE=function(g,b,B,W){if(g=+g,b=b>>>0,!W){const Ie=Math.pow(2,8*B-1);be(this,g,b,B,Ie-1,-Ie)}let Q=B-1,ee=1,he=0;for(this[b+Q]=g&255;--Q>=0&&(ee*=256);)g<0&&he===0&&this[b+Q+1]!==0&&(he=1),this[b+Q]=(g/ee>>0)-he&255;return b+B},u.prototype.writeInt8=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},u.prototype.writeInt16LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},u.prototype.writeInt16BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},u.prototype.writeInt32LE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},u.prototype.writeInt32BE=function(g,b,B){return g=+g,b=b>>>0,B||be(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},u.prototype.writeBigInt64LE=E(function(g,b=0){return ve(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=E(function(g,b=0){return je(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Pe(k,g,b,B,W,Q){if(b+B>k.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function Ve(k,g,b,B,W){return g=+g,b=b>>>0,W||Pe(k,g,b,4),r.write(k,g,b,B,23,4),b+4}u.prototype.writeFloatLE=function(g,b,B){return Ve(this,g,b,!0,B)},u.prototype.writeFloatBE=function(g,b,B){return Ve(this,g,b,!1,B)};function Ke(k,g,b,B,W){return g=+g,b=b>>>0,W||Pe(k,g,b,8),r.write(k,g,b,B,52,8),b+8}u.prototype.writeDoubleLE=function(g,b,B){return Ke(this,g,b,!0,B)},u.prototype.writeDoubleBE=function(g,b,B){return Ke(this,g,b,!1,B)},u.prototype.copy=function(g,b,B,W){if(!u.isBuffer(g))throw new TypeError("argument should be a Buffer");if(B||(B=0),!W&&W!==0&&(W=this.length),b>=g.length&&(b=g.length),b||(b=0),W>0&&W<B&&(W=B),W===B||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),g.length-b<W-B&&(W=g.length-b+B);const Q=W-B;return this===g&&typeof s.prototype.copyWithin=="function"?this.copyWithin(b,B,W):s.prototype.set.call(g,this.subarray(B,W),b),Q},u.prototype.fill=function(g,b,B,W){if(typeof g=="string"){if(typeof b=="string"?(W=b,b=0,B=this.length):typeof B=="string"&&(W=B,B=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!u.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(g.length===1){const ee=g.charCodeAt(0);(W==="utf8"&&ee<128||W==="latin1")&&(g=ee)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<B)throw new RangeError("Out of range index");if(B<=b)return this;b=b>>>0,B=B===void 0?this.length:B>>>0,g||(g=0);let Q;if(typeof g=="number")for(Q=b;Q<B;++Q)this[Q]=g;else{const ee=u.isBuffer(g)?g:u.from(g,W),he=ee.length;if(he===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(Q=0;Q<B-b;++Q)this[Q+b]=ee[Q%he]}return this};const rt={};function vt(k,g,b){rt[k]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}vt("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),vt("ERR_INVALID_ARG_TYPE",function(k,g){return`The "${k}" argument must be of type number. Received type ${typeof g}`},TypeError),vt("ERR_OUT_OF_RANGE",function(k,g,b){let B=`The value of "${k}" is out of range.`,W=b;return Number.isInteger(b)&&Math.abs(b)>2**32?W=tt(String(b)):typeof b=="bigint"&&(W=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(W=tt(W)),W+="n"),B+=` It must be ${g}. Received ${W}`,B},RangeError);function tt(k){let g="",b=k.length;const B=k[0]==="-"?1:0;for(;b>=B+4;b-=3)g=`_${k.slice(b-3,b)}${g}`;return`${k.slice(0,b)}${g}`}function ot(k,g,b){Yt(g,"offset"),(k[g]===void 0||k[g+b]===void 0)&&Mt(g,k.length-(b+1))}function Kt(k,g,b,B,W,Q){if(k>b||k<g){const ee=typeof g=="bigint"?"n":"";let he;throw g===0||g===BigInt(0)?he=`>= 0${ee} and < 2${ee} ** ${(Q+1)*8}${ee}`:he=`>= -(2${ee} ** ${(Q+1)*8-1}${ee}) and < 2 ** ${(Q+1)*8-1}${ee}`,new rt.ERR_OUT_OF_RANGE("value",he,k)}ot(B,W,Q)}function Yt(k,g){if(typeof k!="number")throw new rt.ERR_INVALID_ARG_TYPE(g,"number",k)}function Mt(k,g,b){throw Math.floor(k)!==k?(Yt(k,b),new rt.ERR_OUT_OF_RANGE("offset","an integer",k)):g<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${g}`,k)}const wr=/[^+/0-9A-Za-z-_]/g;function nr(k){if(k=k.split("=")[0],k=k.trim().replace(wr,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function qt(k,g){g=g||1/0;let b;const B=k.length;let W=null;const Q=[];for(let ee=0;ee<B;++ee){if(b=k.charCodeAt(ee),b>55295&&b<57344){if(!W){if(b>56319){(g-=3)>-1&&Q.push(239,191,189);continue}else if(ee+1===B){(g-=3)>-1&&Q.push(239,191,189);continue}W=b;continue}if(b<56320){(g-=3)>-1&&Q.push(239,191,189),W=b;continue}b=(W-55296<<10|b-56320)+65536}else W&&(g-=3)>-1&&Q.push(239,191,189);if(W=null,b<128){if((g-=1)<0)break;Q.push(b)}else if(b<2048){if((g-=2)<0)break;Q.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;Q.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;Q.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return Q}function Je(k){const g=[];for(let b=0;b<k.length;++b)g.push(k.charCodeAt(b)&255);return g}function nt(k,g){let b,B,W;const Q=[];for(let ee=0;ee<k.length&&!((g-=2)<0);++ee)b=k.charCodeAt(ee),B=b>>8,W=b%256,Q.push(W),Q.push(B);return Q}function Pt(k){return e.toByteArray(nr(k))}function Mr(k,g,b,B){let W;for(W=0;W<B&&!(W+b>=g.length||W>=k.length);++W)g[W+b]=k[W];return W}function pt(k,g){return k instanceof g||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===g.name}function Sr(k){return k!==k}const y=function(){const k="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const B=b*16;for(let W=0;W<16;++W)g[B+W]=k[b]+k[W]}return g}();function E(k){return typeof BigInt>"u"?x:k}function x(){throw new Error("BigInt not supported")}})(Wk);const pa=Wk.Buffer;var i2={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_f6376285-791f-4512-9f57-b38ea7aefea1",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",STATS_TRP:"true",USER:"runner",npm_config_always_auth:"true",npm_config_user_agent:"pnpm/10.12.3 npm/? node/v20.19.2 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_f6376285-791f-4512-9f57-b38ea7aefea1",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/20.19.2/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.1.13356709",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-8.14.2",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"711",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20250622.1.0",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.10/x64",JOURNAL_STREAM:"9:5912",RUNNER_USER:"runner",STATS_V3PS:"true",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.4/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"15899260420",STATS_D:"true",STATS_VMFE:"true",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"6bc73a5f892656e696a48e76140a1590c5b22a41",ImageOS:"ubuntu24",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish-evm.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"0f18c7bbfa2e49d4abf444f0b522612d",NODE:"/opt/hostedtoolcache/node/20.19.2/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_c0975366-d7dd-400a-8b86-32fc3439dadc",TURBO_HASH:"31dd050eede6ff29",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"59",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000345",STATS_D_D:"true",STATS_VMD:"true",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",STATS_UE:"true",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@6.3.5_@types+node@24.0.3_jiti@2.4.2_lightningcss@1.29.1_sass@1.89.2_yaml@2.8.0/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",STATS_PIP:"false",npm_package_version:"0.2.8",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",RUNNER_PERFLOG:"/home/runner/perflog",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"6bc73a5f892656e696a48e76140a1590c5b22a41",STATS_D_TC:"true",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_f6376285-791f-4512-9f57-b38ea7aefea1",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.12.3/node_modules/pnpm/bin/pnpm.cjs",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_f6376285-791f-4512-9f57-b38ea7aefea1",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",STATS_EXT:"true",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_f6376285-791f-4512-9f57-b38ea7aefea1",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},Me;if(typeof window>"u"){var zk={hostname:""};Me={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:zk,referrer:""},screen:{width:0,height:0},location:zk,addEventListener:function(){},removeEventListener:function(){}}}else Me=window;function Gk(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hk(t,e,r,n,i,s,o){try{var a=t[s](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,i)}function ky(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function o(c){Hk(s,n,i,o,a,"next",c)}function a(c){Hk(s,n,i,o,a,"throw",c)}o(void 0)})}}function s2(t,e,r){return jk()?s2=Reflect.construct:s2=function(i,s,o){var a=[null];a.push.apply(a,s);var c=Function.bind.apply(i,a),l=new c;return o&&Vf(l,o.prototype),l},s2.apply(null,arguments)}function RP(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,n.key,n)}}function an(t,e,r){return e&&RP(t.prototype,e),t}function Ut(){return Ut=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ut.apply(this,arguments)}function _y(t){return _y=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_y(t)}function wn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vf(t,e)}function ht(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function TP(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Pf(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Vf(t,e){return Vf=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Vf(t,e)}function _t(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function NP(t,e){if(t){if(typeof t=="string")return Gk(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gk(t,e)}}function o2(t){var e=typeof Map=="function"?new Map:void 0;return o2=function(n){if(n===null||!TP(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return s2(n,arguments,_y(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Vf(i,n)},o2(t)}function jk(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jk=function(){return!!t})()}function He(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=NP(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ff(t,e){var r,n,i,s,o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=l[0]&2?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(l[0]===6&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Qk(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var xP=Object.defineProperty,BP=function(t,e,r){return e in t?xP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Oe=function(t,e,r){return BP(t,(typeof e>"u"?"undefined":_t(e))!=="symbol"?e+"":e,r)},Jk,IP=Object.defineProperty,OP=function(t,e,r){return e in t?IP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Yk=function(t,e,r){return OP(t,(typeof e>"u"?"undefined":_t(e))!=="symbol"?e+"":e,r)},Qr=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(Qr||{}),$k={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},a2={},UP=function(){return!!globalThis.Zone};function Ey(t){if(a2[t])return a2[t];var e=globalThis[t],r=e.prototype,n=t in $k?$k[t]:void 0,i=!!(n&&n.every(function(u){var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,u))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),s=t in Xk?Xk[t]:void 0,o=!!(s&&s.every(function(u){var d;return typeof r[u]=="function"&&((d=r[u])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o&&!UP())return a2[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?a2[t]=l:r}catch{return r}}var Cy={};function ma(t,e,r){var n,i=t+"."+String(r);if(Cy[i])return Cy[i].call(e);var s=Ey(t),o=(n=Object.getOwnPropertyDescriptor(s,r))==null?void 0:n.get;return o?(Cy[i]=o,o.call(e)):e[r]}var Sy={};function Kk(t,e,r){var n=t+"."+String(r);if(Sy[n])return Sy[n].bind(e);var i=Ey(t),s=i[r];return typeof s!="function"?e[r]:(Sy[n]=s,s.bind(e))}function MP(t){return ma("Node",t,"childNodes")}function PP(t){return ma("Node",t,"parentNode")}function VP(t){return ma("Node",t,"parentElement")}function FP(t){return ma("Node",t,"textContent")}function LP(t,e){return Kk("Node",t,"contains")(e)}function DP(t){return Kk("Node",t,"getRootNode")()}function WP(t){return!t||!("host"in t)?null:ma("ShadowRoot",t,"host")}function ZP(t){return t.styleSheets}function zP(t){return!t||!("shadowRoot"in t)?null:ma("Element",t,"shadowRoot")}function GP(t,e){return ma("Element",t,"querySelector")(e)}function HP(t,e){return ma("Element",t,"querySelectorAll")(e)}function jP(){return Ey("MutationObserver").constructor}var bn={childNodes:MP,parentNode:PP,parentElement:VP,textContent:FP,contains:LP,getRootNode:DP,host:WP,styleSheets:ZP,shadowRoot:zP,querySelector:GP,querySelectorAll:HP,mutationObserver:jP};function qk(t){return t.nodeType===t.ELEMENT_NODE}function Lf(t){var e=t&&"host"in t&&"mode"in t&&bn.host(t)||null;return!!(e&&"shadowRoot"in e&&bn.shadowRoot(e)===t)}function Df(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function QP(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function JP(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function Ay(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(i){return e_(i,r)}).join("");return QP(n)}catch{return null}}function e_(t,e){if($P(t)){var r;try{r=Ay(t.styleSheet)||JP(t)}catch{r=t.cssText}return t.styleSheet.href?c2(r,t.styleSheet.href):r}else{var n=t.cssText;return XP(t)&&t.selectorText.includes(":")&&(n=YP(n)),e?c2(n,e):n}}function YP(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function $P(t){return"styleSheet"in t}function XP(t){return"selectorText"in t}var t_=function(){function t(){Yk(this,"idNodeMap",new Map),Yk(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var i;if(!n)return-1;var s=(i=this.getMeta(n))==null?void 0:i.id;return s??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var i=this,s=this.getId(n);this.idNodeMap.delete(s),n.childNodes&&n.childNodes.forEach(function(o){return i.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,i){var s=i.id;this.idNodeMap.set(s,n),this.nodeMetaMap.set(n,i)},e.replace=function(n,i){var s=this.getNode(n);if(s){var o=this.nodeMetaMap.get(s);o&&this.nodeMetaMap.set(i,o)}this.idNodeMap.set(n,i)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function KP(){return new t_}function Ry(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,i=t.type,s=t.value,o=t.maskInputFn,a=s||"",c=i&&Vc(i);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Vc(t){return t.toLowerCase()}var r_="__rrweb_original__";function qP(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var i=0;i<t.height;i+=r){var s=e.getImageData,o=r_ in s?s[r_]:s,a=new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function Ty(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Vc(e):null}function n_(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n),s;return(s=i==null?void 0:i[1])!=null?s:null}function eV(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var tV=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rV=/^(?:[a-z+]+:)?\/\//i,nV=/^www\..*/i,iV=/^(data:)([^,]*),(.*)/i;function c2(t,e){return(t||"").replace(tV,function(r,n,i,s,o,a){var c=i||o||a,l=n||s||"";if(!c)return r;if(rV.test(c)||nV.test(c)||iV.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(eV(e)+c)+l+")";var u=e.split("/"),d=c.split("/");u.pop();for(var h=He(d),f;!(f=h()).done;){var p=f.value;p!=="."&&(p===".."?u.pop():u.push(p))}return"url("+l+u.join("/")+l+")"})}function Ny(t){return t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function sV(t,e){var r=Array.from(e.childNodes),n=[];if(r.length>1&&t&&typeof t=="string"){for(var i=Ny(t),s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent=="string")for(var o=Ny(r[s].textContent),a=3;a<o.length;a++){var c=o.substring(0,a);if(i.split(c).length===2){for(var l=i.indexOf(c),u=l;u<t.length;u++)if(Ny(t.substring(0,u)).length===l){n.push(t.substring(0,u)),t=t.substring(u);break}break}}}return n.push(t),n}function oV(t,e){return sV(t,e).join("/* rr_split */")}var aV=1,cV=new RegExp("[^a-z0-9-_:]"),Wf=-2;function i_(){return aV++}function lV(t){if(ht(t,HTMLFormElement))return"form";var e=Vc(t.tagName);return cV.test(e)?"div":e}var Zu,s_,uV=/^[^ \t\n\r\u000c]+/,dV=/^[, \t\n\r\u000c]+/;function hV(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,d=l.exec(e.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var i=[];n(dV),!(r>=e.length);){var s=n(uV);if(s.slice(-1)===",")s=zu(t,s.substring(0,s.length-1)),i.push(s);else{var o="";s=zu(t,s);for(var a=!1;;){var c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return i.join(", ")}var o_=new WeakMap;function zu(t,e){return!e||e.trim()===""?e:xy(t,e)}function fV(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function xy(t,e){var r=o_.get(t);if(r||(r=t.createElement("a"),o_.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function a_(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?zu(t,n):r==="srcset"?hV(t,n):r==="style"?c2(n,xy(t)):e==="object"&&r==="data"?zu(t,n):n)}function c_(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function pV(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function l2(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?l2(bn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var i=t.classList[n];if(e.test(i))return!0}return r?l2(bn.parentNode(t),e,r):!1}function l_(t,e,r,n){var i;if(qk(t)){if(i=t,!bn.childNodes(i).length)return!1}else{if(bn.parentElement(t)===null)return!1;i=bn.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest("."+e))return!0}else if(i.classList.contains(e))return!0}else if(l2(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function mV(t,e,r){var n=t.contentWindow;if(n){var i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function gV(t,e,r){var n=!1,i;try{i=t.sheet}catch{return}if(!i){var s=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(s),n=!0,e()})}}function vV(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,d=e.maskInputFn,h=e.dataURLOptions,f=h===void 0?{}:h,p=e.inlineImages,v=e.recordCanvas,m=e.keepIframeSrcFn,w=e.newlyAddedElement,_=w===void 0?!1:w,S=e.cssCaptured,T=S===void 0?!1:S,N=yV(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:Qr.Document,childNodes:[],compatMode:t.compatMode}:{type:Qr.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:Qr.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:N};case t.ELEMENT_NODE:return bV(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,dataURLOptions:f,inlineImages:p,recordCanvas:v,keepIframeSrcFn:m,newlyAddedElement:_,rootId:N});case t.TEXT_NODE:return wV(t,{doc:r,needsMask:o,maskTextFn:u,rootId:N,cssCaptured:T});case t.CDATA_SECTION_NODE:return{type:Qr.CDATA,textContent:"",rootId:N};case t.COMMENT_NODE:return{type:Qr.Comment,textContent:bn.textContent(t)||"",rootId:N};default:return!1}}function yV(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function wV(t,e){var r=e.needsMask,n=e.maskTextFn,i=e.rootId,s=e.cssCaptured,o=bn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":s||(c=bn.textContent(t),l&&c&&(c=c2(c,xy(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,bn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:Qr.Text,textContent:c||"",rootId:i}}function bV(t,e){for(var r=e.doc,n=e.blockClass,i=e.blockSelector,s=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,d=e.inlineImages,h=e.recordCanvas,f=e.keepIframeSrcFn,p=e.newlyAddedElement,v=p===void 0?!1:p,m=e.rootId,w=pV(t,n,i),_=lV(t),S={},T=t.attributes.length,N=0;N<T;N++){var I=t.attributes[N];c_(_,I.name,I.value)||(S[I.name]=a_(r,_,Vc(I.name),I.value))}if(_==="link"&&s){var O=Array.from(r.styleSheets).find(function(Re){return Re.href===t.href}),U=null;O&&(U=Ay(O)),U&&(delete S.rel,delete S.href,S._cssText=U)}if(_==="style"&&t.sheet){var G=Ay(t.sheet);G&&(t.childNodes.length>1&&(G=oV(G,t)),S._cssText=G)}if(_==="input"||_==="textarea"||_==="select"){var D=t.value,M=t.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&D?S.value=Ry({element:t,type:Ty(t),tagName:_,value:D,maskInputOptions:a,maskInputFn:c}):M&&(S.checked=M)}if(_==="option"&&(t.selected&&!a.select?S.selected=!0:delete S.selected),_==="dialog"&&t.open&&(S.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&h){if(t.__context==="2d")qP(t)||(S.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var Z=t.toDataURL(u.type,u.quality),j=r.createElement("canvas");j.width=t.width,j.height=t.height;var $=j.toDataURL(u.type,u.quality);Z!==$&&(S.rr_dataURL=Z)}}if(_==="img"&&d){Zu||(Zu=r.createElement("canvas"),s_=Zu.getContext("2d"));var L=t,z=L.currentSrc||L.getAttribute("src")||"<unknown-src>",X=L.crossOrigin,te=function(){L.removeEventListener("load",te);try{Zu.width=L.naturalWidth,Zu.height=L.naturalHeight,s_.drawImage(L,0,0),S.rr_dataURL=Zu.toDataURL(u.type,u.quality)}catch(Re){if(L.crossOrigin!=="anonymous"){L.crossOrigin="anonymous",L.complete&&L.naturalWidth!==0?te():L.addEventListener("load",te);return}else console.warn("Cannot inline img src="+z+"! Error: "+Re)}L.crossOrigin==="anonymous"&&(X?S.crossOrigin=X:L.removeAttribute("crossorigin"))};L.complete&&L.naturalWidth!==0?te():L.addEventListener("load",te)}if(_==="audio"||_==="video"){var re=S;re.rr_mediaState=t.paused?"paused":"played",re.rr_mediaCurrentTime=t.currentTime,re.rr_mediaPlaybackRate=t.playbackRate,re.rr_mediaMuted=t.muted,re.rr_mediaLoop=t.loop,re.rr_mediaVolume=t.volume}if(v||(t.scrollLeft&&(S.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(S.rr_scrollTop=t.scrollTop)),w){var ne=t.getBoundingClientRect(),ce=ne.width,Se=ne.height;S={class:S.class,rr_width:""+ce+"px",rr_height:""+Se+"px"}}_==="iframe"&&!f(S.src)&&(t.contentDocument||(S.rr_src=S.src),delete S.src);var _e;try{customElements.get(_)&&(_e=!0)}catch{}return{type:Qr.Element,tagName:_,attributes:S,childNodes:[],isSVG:fV(t)||void 0,needBlock:w,rootId:m,isCustom:_e}}function ur(t){return t==null?"":t.toLowerCase()}function kV(t,e){if(e.comment&&t.type===Qr.Comment)return!0;if(t.type===Qr.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&n_(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(ur(t.attributes.name).match(/^msapplication-tile(image|color)$/)||ur(t.attributes.name)==="application-name"||ur(t.attributes.rel)==="icon"||ur(t.attributes.rel)==="apple-touch-icon"||ur(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&ur(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ur(t.attributes.property).match(/^(og|twitter|fb):/)||ur(t.attributes.name).match(/^(og|twitter):/)||ur(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(ur(t.attributes.name)==="robots"||ur(t.attributes.name)==="googlebot"||ur(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(ur(t.attributes.name)==="author"||ur(t.attributes.name)==="generator"||ur(t.attributes.name)==="framework"||ur(t.attributes.name)==="publisher"||ur(t.attributes.name)==="progid"||ur(t.attributes.property).match(/^article:/)||ur(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(ur(t.attributes.name)==="google-site-verification"||ur(t.attributes.name)==="yandex-verification"||ur(t.attributes.name)==="csrf-token"||ur(t.attributes.name)==="p:domain_verify"||ur(t.attributes.name)==="verify-v1"||ur(t.attributes.name)==="verification"||ur(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Gu(t,e){var r=e.doc,n=e.mirror,i=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,d=u===void 0?!0:u,h=e.maskInputOptions,f=h===void 0?{}:h,p=e.maskTextFn,v=e.maskInputFn,m=e.slimDOMOptions,w=e.dataURLOptions,_=w===void 0?{}:w,S=e.inlineImages,T=S===void 0?!1:S,N=e.recordCanvas,I=N===void 0?!1:N,O=e.onSerialize,U=e.onIframeLoad,G=e.iframeLoadTimeout,D=G===void 0?5e3:G,M=e.onStylesheetLoad,Z=e.stylesheetLoadTimeout,j=Z===void 0?5e3:Z,$=e.keepIframeSrcFn,L=$===void 0?function(){return!1}:$,z=e.newlyAddedElement,X=z===void 0?!1:z,te=e.cssCaptured,re=te===void 0?!1:te,ne=e.needsMask,ce=e.preserveWhiteSpace,Se=ce===void 0?!0:ce;if(!ne){var _e=ne===void 0;ne=l_(t,o,a,_e)}var Re=vV(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,dataURLOptions:_,inlineImages:T,recordCanvas:I,keepIframeSrcFn:L,newlyAddedElement:X,cssCaptured:re});if(!Re)return console.warn(t,"not serialized"),null;var be;n.hasNode(t)?be=n.getId(t):kV(Re,m)||!Se&&Re.type===Qr.Text&&!Re.textContent.replace(/^\s+|\s+$/gm,"").length?be=Wf:be=i_();var ve=Object.assign(Re,{id:be});if(n.add(t,ve),be===Wf)return null;O&&O(t);var je=!l;if(ve.type===Qr.Element){je=je&&!ve.needBlock,delete ve.needBlock;var Pe=bn.shadowRoot(t);Pe&&Df(Pe)&&(ve.isShadowHost=!0)}if((ve.type===Qr.Document||ve.type===Qr.Element)&&je){m.headWhitespace&&ve.type===Qr.Element&&ve.tagName==="head"&&(Se=!1);var Ve={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L,cssCaptured:!1};if(!(ve.type===Qr.Element&&ve.tagName==="textarea"&&ve.attributes.value!==void 0)){ve.type===Qr.Element&&ve.attributes._cssText!==void 0&&typeof ve.attributes._cssText=="string"&&(Ve.cssCaptured=!0);for(var Ke=He(Array.from(bn.childNodes(t))),rt;!(rt=Ke()).done;){var vt=rt.value,tt=Gu(vt,Ve);tt&&ve.childNodes.push(tt)}}var ot=null;if(qk(t)&&(ot=bn.shadowRoot(t)))for(var Kt=He(Array.from(bn.childNodes(ot))),Yt;!(Yt=Kt()).done;){var Mt=Yt.value,wr=Gu(Mt,Ve);wr&&(Df(ot)&&(wr.isShadow=!0),ve.childNodes.push(wr))}}var nr=bn.parentNode(t);return nr&&Lf(nr)&&Df(nr)&&(ve.isShadow=!0),ve.type===Qr.Element&&ve.tagName==="iframe"&&mV(t,function(){var qt=t.contentDocument;if(qt&&U){var Je=Gu(qt,{doc:qt,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L});Je&&U(t,Je)}},D),ve.type===Qr.Element&&ve.tagName==="link"&&typeof ve.attributes.rel=="string"&&(ve.attributes.rel==="stylesheet"||ve.attributes.rel==="preload"&&typeof ve.attributes.href=="string"&&n_(ve.attributes.href)==="css")&&gV(t,function(){if(M){var qt=Gu(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:ne,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:_,inlineImages:T,recordCanvas:I,preserveWhiteSpace:Se,onSerialize:O,onIframeLoad:U,iframeLoadTimeout:D,onStylesheetLoad:M,stylesheetLoadTimeout:j,keepIframeSrcFn:L});qt&&M(t,qt)}},j),ve}function _V(t,e){var r=e||{},n=r.mirror,i=n===void 0?new t_:n,s=r.blockClass,o=s===void 0?"rr-block":s,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,d=r.maskTextSelector,h=d===void 0?null:d,f=r.inlineStylesheet,p=f===void 0?!0:f,v=r.inlineImages,m=v===void 0?!1:v,w=r.recordCanvas,_=w===void 0?!1:w,S=r.maskAllInputs,T=S===void 0?!1:S,N=r.maskTextFn,I=r.maskInputFn,O=r.slimDOM,U=O===void 0?!1:O,G=r.dataURLOptions,D=r.preserveWhiteSpace,M=r.onSerialize,Z=r.onIframeLoad,j=r.iframeLoadTimeout,$=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,z=r.keepIframeSrcFn,X=z===void 0?function(){return!1}:z,te=T===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:T===!1?{password:!0}:T,re=U===!0||U==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:U==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:U===!1?{}:U;return Gu(t,{doc:t,mirror:i,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:p,maskInputOptions:te,maskTextFn:N,maskInputFn:I,slimDOMOptions:re,dataURLOptions:G,inlineImages:m,recordCanvas:_,preserveWhiteSpace:D,onSerialize:M,onIframeLoad:Z,iframeLoadTimeout:j,onStylesheetLoad:$,stylesheetLoadTimeout:L,keepIframeSrcFn:X,newlyAddedElement:!1})}function EV(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function CV(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return ht(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var By={exports:{}},hr=String,u_=function(){return{isColorSupported:!1,reset:hr,bold:hr,dim:hr,italic:hr,underline:hr,inverse:hr,hidden:hr,strikethrough:hr,black:hr,red:hr,green:hr,yellow:hr,blue:hr,magenta:hr,cyan:hr,white:hr,gray:hr,bgBlack:hr,bgRed:hr,bgGreen:hr,bgYellow:hr,bgBlue:hr,bgMagenta:hr,bgCyan:hr,bgWhite:hr}};By.exports=u_(),By.exports.createColors=u_;var SV=By.exports,AV={},RV=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),Or=CV(RV),d_=SV,h_=Or,Iy=function(t){wn(e,t);function e(n,i,s,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof i<"u"&&typeof s<"u"&&(typeof i=="number"?(l.line=i,l.column=s):(l.line=i.line,l.column=i.column,l.endLine=s.line,l.endColumn=s.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(i){var s=this;if(!this.source)return"";var o=this.source;i==null&&(i=d_.isColorSupported),h_&&i&&(o=h_(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,d,h;if(i){var f=d_.createColors(!0),p=f.bold,v=f.gray,m=f.red;d=function(w){return p(m(w))},h=function(w){return v(w)}}else d=h=function(w){return w};return a.slice(c,l).map(function(w,_){var S=c+1+_,T=" "+(" "+S).slice(-u)+" | ";if(S===s.line){var N=h(T.replace(/\d/g," "))+w.slice(0,s.column-1).replace(/[^\t]/g," ");return d(">")+h(T)+w+`
|
|
12
12
|
`+N+d("^")}return" "+h(T)+w}).join(`
|
|
13
13
|
`)},r.toString=function(){var i=this.showSourceCode();return i&&(i=`
|
|
14
14
|
|
|
@@ -100,7 +100,7 @@ or you can use record.mirror to access the mirror instance during recording.`,iC
|
|
|
100
100
|
.credenza-toast-container li a:-webkit-any-link {
|
|
101
101
|
color: #fff;
|
|
102
102
|
}
|
|
103
|
-
`,document.head.appendChild(t)}},JH=(t,e="info",r)=>{const{duration:n,centered:i}=r||{},s={theme:{...HH(e),...(i==null?void 0:i.enabled)&&GH(i==null?void 0:i.position)},...n===-1?{initial:0}:{duration:n||1e4}};Zm.push(t,s)};let S0,$c,Ma,Xc,_d;const YH=async()=>{_d==null||_d.$destroy(),S0==null||S0.$destroy(),Ma==null||Ma.$destroy(),Xc=$c=S0=Ma=_d=null},$H=()=>{$c&&($c.style.display="none"),Ot.set(null)},XH=async(t,e)=>{if(e&&bt.set(e),t&&Ot.set(t),$c)$c&&$c.style.removeProperty("display");else{const r=(await Promise.resolve().then(()=>LJ)).default;S0=new r({target:document.body}),$c=document.getElementById("cpui")}},KH=()=>{Xc&&(Xc.style.display="none")},qH=async(t={},e={})=>{if(Xc)Ma==null||Ma.$set({styles:t,navConfig:e}),Xc&&Xc.style.removeProperty("display");else{const r=(await Promise.resolve().then(()=>XJ)).default;Ma=new r({target:document.body,props:{styles:t,navConfig:e}}),Xc=document.getElementById("cpnav")}},ej=(t,e="info",r)=>{_d||(_d=jH()),JH(t,e,r)},sR="openid profile profile.write email phone blockchain.evm.write blockchain.evm";async function tj(t,{forceEmail:e,forcePhone:r}={}){ln.track("cp_login_initiated",{chain:this.config.chainId,clientId:this.config.clientId,provider:t,location:window.location.origin+window.location.pathname});try{if(t===Mf.METAMASK)await yr.evm.metamask.login();else if(t===Mf.OAUTH)await yr.oauth.loginWithRedirect({scope:sR,redirectUrl:window.location.href,...e&&{forceEmail:e},...r&&{forcePhone:r}});else throw new Error("Unknown provider");this.init()}catch(n){throw xt(ft.ERROR,{provider:t,error:n}),n}}async function rj({validatorId:t,idToken:e,accessToken:r}){if(r&&e)throw new Error("Only one of idToken or accessToken should be provided");ln.track("cp_login_initiated",{chain:this.config.chainId,clientId:this.config.clientId,provider:"OAUTH_JWT",location:window.location.origin+window.location.pathname});try{Du.set(!0),await yr.oauth.loginWithJwt({scope:sR,validatorId:t,redirectUrl:window.location.href,...e?{idToken:e}:{accessToken:r}}),await this.init()}catch(n){throw xt(ft.ERROR,{provider:"OAUTH_JWT",error:n}),n}finally{Du.set(!1)}}async function nj({shouldRevokeSession:t=!1}={}){try{const e=ke(lt),r=ke(yn);ln.track("cp_logout",{chain:e.chainId,clientId:e.clientId,address:await Zr(),location:window.location.href,$email:r==null?void 0:r.email,$phone:r==null?void 0:r.phone})}catch{}localStorage.removeItem(Pc.QR_CODE),yi.set(!1),yn.set(null),Fn.set(null),t&&await yr.oauth.revokeSession(),yr.logout(),xt(ft.LOGOUT)}function ij(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var A0={exports:{}};A0.exports;var oR;function sj(){return oR||(oR=1,function(t,e){var r=200,n="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",v="[object Map]",m="[object Number]",w="[object Null]",_="[object Object]",S="[object Proxy]",T="[object RegExp]",N="[object Set]",I="[object String]",O="[object Undefined]",U="[object WeakMap]",G="[object ArrayBuffer]",D="[object DataView]",M="[object Float32Array]",Z="[object Float64Array]",j="[object Int8Array]",$="[object Int16Array]",L="[object Int32Array]",z="[object Uint8Array]",X="[object Uint8ClampedArray]",te="[object Uint16Array]",re="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,Se=/^(?:0|[1-9]\d*)$/,_e={};_e[M]=_e[Z]=_e[j]=_e[$]=_e[L]=_e[z]=_e[X]=_e[te]=_e[re]=!0,_e[a]=_e[c]=_e[G]=_e[u]=_e[D]=_e[d]=_e[h]=_e[f]=_e[v]=_e[m]=_e[_]=_e[T]=_e[N]=_e[I]=_e[U]=!1;var Re=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,be=typeof self=="object"&&self&&self.Object===Object&&self,ve=Re||be||Function("return this")(),je=e&&!e.nodeType&&e,Pe=je&&!0&&t&&!t.nodeType&&t,Ve=Pe&&Pe.exports===je,Ke=Ve&&Re.process,rt=function(){try{var V=Pe&&Pe.require&&Pe.require("util").types;return V||Ke&&Ke.binding&&Ke.binding("util")}catch{}}(),vt=rt&&rt.isTypedArray;function tt(V,Y,ue){switch(ue.length){case 0:return V.call(Y);case 1:return V.call(Y,ue[0]);case 2:return V.call(Y,ue[0],ue[1]);case 3:return V.call(Y,ue[0],ue[1],ue[2])}return V.apply(Y,ue)}function ot(V,Y){for(var ue=-1,Ye=Array(V);++ue<V;)Ye[ue]=Y(ue);return Ye}function Kt(V){return function(Y){return V(Y)}}function Yt(V,Y){return V==null?void 0:V[Y]}function Mt(V,Y){return function(ue){return V(Y(ue))}}var wr=Array.prototype,nr=Function.prototype,qt=Object.prototype,Je=ve["__core-js_shared__"],nt=nr.toString,Pt=qt.hasOwnProperty,Mr=function(){var V=/[^.]+$/.exec(Je&&Je.keys&&Je.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""}(),pt=qt.toString,Sr=nt.call(Object),y=RegExp("^"+nt.call(Pt).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=Ve?ve.Buffer:void 0,x=ve.Symbol,k=ve.Uint8Array;E&&E.allocUnsafe;var g=Mt(Object.getPrototypeOf,Object),b=Object.create,B=qt.propertyIsEnumerable,W=wr.splice,Q=x?x.toStringTag:void 0,ee=function(){try{var V=jb(Object,"defineProperty");return V({},"",{}),V}catch{}}(),he=E?E.isBuffer:void 0,Ie=Math.max,Bt=Date.now,Vt=jb(ve,"Map"),mt=jb(Object,"create"),No=function(){function V(){}return function(Y){if(!sl(Y))return{};if(b)return b(Y);V.prototype=Y;var ue=new V;return V.prototype=void 0,ue}}();function Xi(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function P0(){this.__data__=mt?mt(null):{},this.size=0}function V0(V){var Y=this.has(V)&&delete this.__data__[V];return this.size-=Y?1:0,Y}function Q$(V){var Y=this.__data__;if(mt){var ue=Y[V];return ue===n?void 0:ue}return Pt.call(Y,V)?Y[V]:void 0}function J$(V){var Y=this.__data__;return mt?Y[V]!==void 0:Pt.call(Y,V)}function Y$(V,Y){var ue=this.__data__;return this.size+=this.has(V)?0:1,ue[V]=mt&&Y===void 0?n:Y,this}Xi.prototype.clear=P0,Xi.prototype.delete=V0,Xi.prototype.get=Q$,Xi.prototype.has=J$,Xi.prototype.set=Y$;function xo(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function $$(){this.__data__=[],this.size=0}function X$(V){var Y=this.__data__,ue=eg(Y,V);if(ue<0)return!1;var Ye=Y.length-1;return ue==Ye?Y.pop():W.call(Y,ue,1),--this.size,!0}function K$(V){var Y=this.__data__,ue=eg(Y,V);return ue<0?void 0:Y[ue][1]}function q$(V){return eg(this.__data__,V)>-1}function eX(V,Y){var ue=this.__data__,Ye=eg(ue,V);return Ye<0?(++this.size,ue.push([V,Y])):ue[Ye][1]=Y,this}xo.prototype.clear=$$,xo.prototype.delete=X$,xo.prototype.get=K$,xo.prototype.has=q$,xo.prototype.set=eX;function Id(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function tX(){this.size=0,this.__data__={hash:new Xi,map:new(Vt||xo),string:new Xi}}function rX(V){var Y=rg(this,V).delete(V);return this.size-=Y?1:0,Y}function nX(V){return rg(this,V).get(V)}function iX(V){return rg(this,V).has(V)}function sX(V,Y){var ue=rg(this,V),Ye=ue.size;return ue.set(V,Y),this.size+=ue.size==Ye?0:1,this}Id.prototype.clear=tX,Id.prototype.delete=rX,Id.prototype.get=nX,Id.prototype.has=iX,Id.prototype.set=sX;function Od(V){var Y=this.__data__=new xo(V);this.size=Y.size}function oX(){this.__data__=new xo,this.size=0}function aX(V){var Y=this.__data__,ue=Y.delete(V);return this.size=Y.size,ue}function cX(V){return this.__data__.get(V)}function lX(V){return this.__data__.has(V)}function uX(V,Y){var ue=this.__data__;if(ue instanceof xo){var Ye=ue.__data__;if(!Vt||Ye.length<r-1)return Ye.push([V,Y]),this.size=++ue.size,this;ue=this.__data__=new Id(Ye)}return ue.set(V,Y),this.size=ue.size,this}Od.prototype.clear=oX,Od.prototype.delete=aX,Od.prototype.get=cX,Od.prototype.has=lX,Od.prototype.set=uX;function dX(V,Y){var ue=Yb(V),Ye=!ue&&Jb(V),It=!ue&&!Ye&&QT(V),sr=!ue&&!Ye&&!It&&YT(V),br=ue||Ye||It||sr,Jt=br?ot(V.length,String):[],kr=Jt.length;for(var Ki in V)br&&(Ki=="length"||It&&(Ki=="offset"||Ki=="parent")||sr&&(Ki=="buffer"||Ki=="byteLength"||Ki=="byteOffset")||HT(Ki,kr))||Jt.push(Ki);return Jt}function Gb(V,Y,ue){(ue!==void 0&&!ng(V[Y],ue)||ue===void 0&&!(Y in V))&&Hb(V,Y,ue)}function hX(V,Y,ue){var Ye=V[Y];(!(Pt.call(V,Y)&&ng(Ye,ue))||ue===void 0&&!(Y in V))&&Hb(V,Y,ue)}function eg(V,Y){for(var ue=V.length;ue--;)if(ng(V[ue][0],Y))return ue;return-1}function Hb(V,Y,ue){Y=="__proto__"&&ee?ee(V,Y,{configurable:!0,enumerable:!0,value:ue,writable:!0}):V[Y]=ue}var fX=AX();function tg(V){return V==null?V===void 0?O:w:Q&&Q in Object(V)?RX(V):OX(V)}function zT(V){return F0(V)&&tg(V)==a}function pX(V){if(!sl(V)||BX(V))return!1;var Y=Xb(V)?y:ce;return Y.test(VX(V))}function mX(V){return F0(V)&&JT(V.length)&&!!_e[tg(V)]}function gX(V){if(!sl(V))return IX(V);var Y=jT(V),ue=[];for(var Ye in V)Ye=="constructor"&&(Y||!Pt.call(V,Ye))||ue.push(Ye);return ue}function GT(V,Y,ue,Ye,It){V!==Y&&fX(Y,function(sr,br){if(It||(It=new Od),sl(sr))vX(V,Y,br,ue,GT,Ye,It);else{var Jt=Ye?Ye(Qb(V,br),sr,br+"",V,Y,It):void 0;Jt===void 0&&(Jt=sr),Gb(V,br,Jt)}},$T)}function vX(V,Y,ue,Ye,It,sr,br){var Jt=Qb(V,ue),kr=Qb(Y,ue),Ki=br.get(kr);if(Ki){Gb(V,ue,Ki);return}var ni=sr?sr(Jt,kr,ue+"",V,Y,br):void 0,L0=ni===void 0;if(L0){var Kb=Yb(kr),qb=!Kb&&QT(kr),KT=!Kb&&!qb&&YT(kr);ni=kr,Kb||qb||KT?Yb(Jt)?ni=Jt:FX(Jt)?ni=EX(Jt):qb?(L0=!1,ni=bX(kr)):KT?(L0=!1,ni=_X(kr)):ni=[]:LX(kr)||Jb(kr)?(ni=Jt,Jb(Jt)?ni=DX(Jt):(!sl(Jt)||Xb(Jt))&&(ni=TX(kr))):L0=!1}L0&&(br.set(kr,ni),It(ni,kr,Ye,sr,br),br.delete(kr)),Gb(V,ue,ni)}function yX(V,Y){return MX(UX(V,Y,XT),V+"")}var wX=ee?function(V,Y){return ee(V,"toString",{configurable:!0,enumerable:!1,value:ZX(Y),writable:!0})}:XT;function bX(V,Y){return V.slice()}function kX(V){var Y=new V.constructor(V.byteLength);return new k(Y).set(new k(V)),Y}function _X(V,Y){var ue=kX(V.buffer);return new V.constructor(ue,V.byteOffset,V.length)}function EX(V,Y){var ue=-1,Ye=V.length;for(Y||(Y=Array(Ye));++ue<Ye;)Y[ue]=V[ue];return Y}function CX(V,Y,ue,Ye){var It=!ue;ue||(ue={});for(var sr=-1,br=Y.length;++sr<br;){var Jt=Y[sr],kr=void 0;kr===void 0&&(kr=V[Jt]),It?Hb(ue,Jt,kr):hX(ue,Jt,kr)}return ue}function SX(V){return yX(function(Y,ue){var Ye=-1,It=ue.length,sr=It>1?ue[It-1]:void 0,br=It>2?ue[2]:void 0;for(sr=V.length>3&&typeof sr=="function"?(It--,sr):void 0,br&&NX(ue[0],ue[1],br)&&(sr=It<3?void 0:sr,It=1),Y=Object(Y);++Ye<It;){var Jt=ue[Ye];Jt&&V(Y,Jt,Ye,sr)}return Y})}function AX(V){return function(Y,ue,Ye){for(var It=-1,sr=Object(Y),br=Ye(Y),Jt=br.length;Jt--;){var kr=br[++It];if(ue(sr[kr],kr,sr)===!1)break}return Y}}function rg(V,Y){var ue=V.__data__;return xX(Y)?ue[typeof Y=="string"?"string":"hash"]:ue.map}function jb(V,Y){var ue=Yt(V,Y);return pX(ue)?ue:void 0}function RX(V){var Y=Pt.call(V,Q),ue=V[Q];try{V[Q]=void 0;var Ye=!0}catch{}var It=pt.call(V);return Ye&&(Y?V[Q]=ue:delete V[Q]),It}function TX(V){return typeof V.constructor=="function"&&!jT(V)?No(g(V)):{}}function HT(V,Y){var ue=typeof V;return Y=Y??o,!!Y&&(ue=="number"||ue!="symbol"&&Se.test(V))&&V>-1&&V%1==0&&V<Y}function NX(V,Y,ue){if(!sl(ue))return!1;var Ye=typeof Y;return(Ye=="number"?$b(ue)&&HT(Y,ue.length):Ye=="string"&&Y in ue)?ng(ue[Y],V):!1}function xX(V){var Y=typeof V;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?V!=="__proto__":V===null}function BX(V){return!!Mr&&Mr in V}function jT(V){var Y=V&&V.constructor,ue=typeof Y=="function"&&Y.prototype||qt;return V===ue}function IX(V){var Y=[];if(V!=null)for(var ue in Object(V))Y.push(ue);return Y}function OX(V){return pt.call(V)}function UX(V,Y,ue){return Y=Ie(Y===void 0?V.length-1:Y,0),function(){for(var Ye=arguments,It=-1,sr=Ie(Ye.length-Y,0),br=Array(sr);++It<sr;)br[It]=Ye[Y+It];It=-1;for(var Jt=Array(Y+1);++It<Y;)Jt[It]=Ye[It];return Jt[Y]=ue(br),tt(V,this,Jt)}}function Qb(V,Y){if(!(Y==="constructor"&&typeof V[Y]=="function")&&Y!="__proto__")return V[Y]}var MX=PX(wX);function PX(V){var Y=0,ue=0;return function(){var Ye=Bt(),It=s-(Ye-ue);if(ue=Ye,It>0){if(++Y>=i)return arguments[0]}else Y=0;return V.apply(void 0,arguments)}}function VX(V){if(V!=null){try{return nt.call(V)}catch{}try{return V+""}catch{}}return""}function ng(V,Y){return V===Y||V!==V&&Y!==Y}var Jb=zT(function(){return arguments}())?zT:function(V){return F0(V)&&Pt.call(V,"callee")&&!B.call(V,"callee")},Yb=Array.isArray;function $b(V){return V!=null&&JT(V.length)&&!Xb(V)}function FX(V){return F0(V)&&$b(V)}var QT=he||zX;function Xb(V){if(!sl(V))return!1;var Y=tg(V);return Y==f||Y==p||Y==l||Y==S}function JT(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=o}function sl(V){var Y=typeof V;return V!=null&&(Y=="object"||Y=="function")}function F0(V){return V!=null&&typeof V=="object"}function LX(V){if(!F0(V)||tg(V)!=_)return!1;var Y=g(V);if(Y===null)return!0;var ue=Pt.call(Y,"constructor")&&Y.constructor;return typeof ue=="function"&&ue instanceof ue&&nt.call(ue)==Sr}var YT=vt?Kt(vt):mX;function DX(V){return CX(V,$T(V))}function $T(V){return $b(V)?dX(V):gX(V)}var WX=SX(function(V,Y,ue){GT(V,Y,ue)});function ZX(V){return function(){return V}}function XT(V){return V}function zX(){return!1}t.exports=WX}(A0,A0.exports)),A0.exports}var oj=sj();const aj=ij(oj),cj={testnet:{credenza:{apiUrl:"https://api.testnets.credenza.online",generalWssUrl:"wss://general-staging-staging.up.railway.app",evmWssUrl:"wss://evm-staging-staging.up.railway.app",gitbookUrl:"https://developer.credenza3.com/credenza-sdk-v3.0/",evmApiUrl:"https://evm.staging.credenza3.com",suiApiUrl:"https://sui.staging.credenza3.com",generalApiUrl:"https://api.staging.credenza3.com",accountsApiUrl:"https://accounts.staging.credenza3.com"},stripe:{pk:{DEFAULT:"pk_test_51LJ0nZHfOaPNdSbZUzB3H4D44JoFD0AIfYv4QLSSSxrBs8ch4A5UlpJOXF4OG0fkgppBD2jOrDTCNaGzevnxdH2200rI1wY1cC",OH:"pk_test_51Q88NV09wu09MZ3mFHuhO3j7F0GJqUsFxfOojSXyEmBWyn1XNsSqYpt3qTzlOQCqoWPrZXR4XrQUiS5mnwwkctyT00x50hXVty"}}},mainnet:{credenza:{accountsApiUrl:"https://accounts.credenza3.com",apiUrl:"https://api.credenza.online",generalApiUrl:"https://api.credenza3.com",gitbookUrl:"https://developer.credenza3.com/credenza-sdk-v3.0/",evmApiUrl:"https://evm.credenza3.com",suiApiUrl:"https://sui.credenza3.com",generalWssUrl:"wss://general-prod-prod.up.railway.app",evmWssUrl:"wss://evm-prod-prod.up.railway.app"},stripe:{pk:{DEFAULT:"pk_live_51LJ0nZHfOaPNdSbZpj7gaAUfmbfWylFaORiGxRxyVn8efm1hMTP6Cz2ihL1AhEcUu9AyqTKsUblMQL5m0YU6HTg3001izgq3Fj",OH:"pk_live_51Q88NV09wu09MZ3mt4QLre8zWqEcNDrpBEnnoiJaEA1v5MI3XBEX3iIn83OILmbCr7QrQtB9GIcM1hxmkPfBHRmH00azqgbOQj"}}}},lj=async(t=[],e)=>{if(!(t!=null&&t.length))return!1;const r=ke(Dr),n=await Zr();for(const i of t)if((i==null?void 0:i.type)==="ERC721"){const{erc721MinAbi:s}=await Promise.resolve().then(()=>Kc),o=new lr.Contract(i.address,s,r);for(const a of i.tokens)if(await o.ownerOf(a)===n)return e({loading:!1,active:!1}),!0}else{const{erc1155MinAbi:s}=await Promise.resolve().then(()=>Kc),o=new lr.Contract(i.address,s,r),[a]=await o.balanceOfBatch([n],i.tokens);if(a>0)return e({loading:!1,active:!1}),!0}return!1},uj=async(t=[],e)=>{if(!(t!=null&&t.length))return!1;const{checkMembership:r}=ke(Cr);for(const n of t){const{isMember:i}=await r(n.owner,n.address);if(i)return e({loading:!1,active:!1}),!0}return!1},dj=async(t,e,r)=>{var i;const{payPerArticle:n}=((i=ke(lt))==null?void 0:i.content)||{};for(const s of n||[]){const o=s.uriMasks||[];if(o.length){for(const a of o)if(t.includes(a)&&(yy.set({primaryAction:s.primaryAction,secondaryAction:s.secondaryAction}),e({loading:!0,active:!0}),await lj(s.nfts||[],e)||await uj(s.memberships||[],e)))return;r({loading:!1})}}};let aR=!1;const hj=()=>{if(aR)return;aR=!0;const{update:t,set:e}=vy,r=()=>document.location.pathname+document.location.search,n=()=>ke(Ot);let i=null;const s=new MutationObserver(()=>{const o=r(),a=n();i===o&&a!==Be.PAYMENT_RESULT||(i=o,dj(i,e,c=>t(l=>({...l,...c}))))});Dr.subscribe(o=>{if(!o){s.disconnect();return}s.observe(document.body,{childList:!0,subtree:!0})})},fj={[Ae.POLYGON_AMOY]:{address:"0x2c88F13a02e2798D214A88A8Be3c7fb82aCeA3a7",decimals:6},[Ae.POLYGON]:{address:"0x9dc9421D625b734d339357b97d3480eab95B1423",decimals:6},[Ae.CHILIZ_SPICY]:{address:"0x5619A31C5776c50e4A3f6DD3E07be13f4efa211C",decimals:6},[Ae.CHILIZ]:{address:"0x5619A31C5776c50e4A3f6DD3E07be13f4efa211C",decimals:6},[Ae.AVALANCHE_FUJI]:{address:"0x4f13a1D378c242da9eB7b1Aaaec6241169755642",decimals:6},[Ae.AVALANCHE]:{address:"0xd2Fcd2d5557A786BDeaE4a30D9af299d7B01773d",decimals:6},[Ae.BASE_SEPOLIA]:{address:"0x80C7197fE9E4C1669fdaE0253D5660Dd2689346d",decimals:6},[Ae.BASE]:{address:"0x80C7197fE9E4C1669fdaE0253D5660Dd2689346d",decimals:6}},pj={[Ae.POLYGON_AMOY]:{address:"0x3d549e5078aa0b168e274493a640a718f5e16647"},[Ae.POLYGON]:{address:"0xae7716da2d2d8269466da09d2121ef976c797da9"},[Ae.CHILIZ_SPICY]:{address:"0x1E483507E4842E3C71EC6BcD85c6d2790B63f890"},[Ae.CHILIZ]:{address:"0x0E53B4BFf707d9BE5582D9D2a4e6c00dc5Fca16F"},[Ae.AVALANCHE_FUJI]:{address:"0x6A438192A87419A0D222258DB996DeEaBA45441a"},[Ae.AVALANCHE]:{address:"0x1bAD828934f4a92C886108531ab90A6c9B5eF8Be"},[Ae.BASE_SEPOLIA]:{address:"0x3d549E5078aA0b168e274493A640a718f5E16647"},[Ae.BASE]:{address:"0x3d549E5078aA0b168e274493A640a718f5E16647"}},R0=t=>{switch(t){case"6756b6f8c7d313c0d6ca03f0":case"65a510cd9415d41b1aa933dc":return{currencySymbol:"GH₵",name:"OH",minStoredValueToPurchase:10,maxStoredValueToPurchase:5e3};default:return{currencySymbol:"$",name:"DEFAULT",minStoredValueToPurchase:0,maxStoredValueToPurchase:100}}},mj=async(t,e)=>{const r=await fetch(`${t}/clients/${e}/public`,{method:"get",headers:{"Content-Type":"application/json"}}),n=await r.json();if(!r.ok)throw new Error(n.error);return n.ui_settings=Object.assign({stored_value_alias:"stored value",cred_alias:"CRED"},n.ui_settings),Oc.set(n),n};async function gj(t){this.networkType=zS(t.chainId),this.config={...aj(cj[this.networkType],t.config||{}),chainId:t.chainId,clientId:t.clientId,networkType:this.networkType},this.chainId=this.config.chainId,this.contracts={erc20Cred:this.config.erc20Contract||fj[this.config.chainId],membership:pj[this.config.chainId]},dd.set(this.contracts),lt.set(this.config),await mj(this.config.credenza.accountsApiUrl,this.config.clientId)}async function vj(){try{const{chainId:t,clientId:e}=ke(lt),r=EA(t),n=[];if(window.ethereum){const{MetamaskExtension:o}=await Promise.resolve().then(()=>oY);n.push(new o)}const i=[new Fk({chainConfig:r,extensions:n})],s=SG(e,i,this.networkType);if(yr.on(ft.LOGIN,async()=>await yj(s)),await s,!yr.getAccessToken())return;await KG(),hj()}catch{}xt(ft.INIT),ke(yi)&&this.close()}const yj=async t=>{await t;const e=await yr.account.info(),r=await yr.evm.getEthersProvider(),n=await r.getSigner(),{chainId:i,clientId:s}=ke(lt);ln.track("cp_login",{$email:e.email,$phone:e.phone,chain:i,clientId:s,provider:r,address:await n.getAddress(),location:window.location.href}),xt(ft.LOGIN,{provider:r,user:e})},wj=async({apiUrl:t,eventId:e,contractAddress:r,chainType:n,evmChainId:i})=>{const s=await fetch(`${t}/promo/loyalty/request-points`,{method:"post",body:JSON.stringify({event_id:e,contract_address:r,chain_type:n,...i?{evm_chain_id:+i}:{}}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${ke(Fn)}`}}),o=await s.json();if(!s.ok)throw new Error(`Points request failed. ${o.message}`);return o};async function cR(t="token"){try{const e=await Zr();return await YG({address:e,tokenType:t})}catch(e){throw xt(ft.ERROR,{error:e}),e}}async function bj(){return await cR("nft")}async function kj(t,e){try{const{chainId:r,clientId:n,credenza:i}=ke(lt);await wj({eventId:t,contractAddress:e,chainType:"evm",apiUrl:i.generalApiUrl,evmChainId:r});const s={chain:r,clientId:n,contract:e,eventId:t,from:await Zr()};xt(ft.REQUEST_LOYALTY_POINTS,s),ln.track("cp_request_loyalty",s)}catch(r){throw xt(ft.ERROR,{error:{message:r.statusText,title:"Request loyalty points failed",code:r.status}}),r}}const $i=class $i{constructor(e){if(this.accessToken=null,this.isLoggedIn=!1,this.user=null,this.login=tj,this.jwtLogin=rj,this.logout=nj,this.openUI=XH,this.close=$H,this.toastAlert=ej,this.destroy=YH,this.hideNavigation=KH,this.showNavigation=qH,this.configurePassport=gj,this.init=vj,this.getCREDContract=CA,this.checkMembership=PG,this.sendTokens=LG,this.getWeb3Provider=UG,this.getAddress=Zr,this.sendNft=FG,this.switchChain=MG,this.getBalance=DG,this.requestAirDrop=VG,this.updateProfile=jG,this.confirmAccount=QG,this.getUser=Nm,this.requestLoyaltyPoints=kj,this.getTokens=cR,this.getNfts=bj,this.on=J4,this.once=Q4,this.destroy(),e!=null&&e.chainId&&!Object.values(Ae).includes(e==null?void 0:e.chainId))throw new Error('Unsupported ChainId. Check "Passport.chains" for available chains.');this.ethers=lr,this.configurePassport(e).then(()=>{this.configureStores()}),KZ(this.networkType)}async configureStores(){Cr.set({openUI:this.openUI,close:this.close,toastAlert:(e,r,n)=>{if(this.networkType!==Uc.MAINNET)return this.toastAlert(e,r,n)},logout:this.logout,login:this.login.bind(this),updateProfile:this.updateProfile,confirmAccount:this.confirmAccount,getCREDContract:this.getCREDContract,checkMembership:this.checkMembership,sendTokens:this.sendTokens,getBalance:this.getBalance,requestLoyaltyPoints:this.requestLoyaltyPoints}),Lk.set({requestAirDrop:this.requestAirDrop}),yn.subscribe(e=>this.user=e),yi.subscribe(e=>{this.isLoggedIn=e||!1,qG(this.isLoggedIn,this.openUI)}),Fn.subscribe(e=>this.accessToken=e),Dr.subscribe(e=>this.provider=e),B4.subscribe(e=>{e&&typeof window<"u"&&this.openUI()}),vy.subscribe(({loading:e,active:r})=>{var n,i,s;if(!(!((n=ke(lt).content)!=null&&n.cloak)||ke(B4)||typeof window>"u")){if(r&&e)return void this.openUI(Be.LOADER,{loaderText:"Checking your access..."});if(r&&!e)return void this.openUI(Be.ERROR,{title:"Premium Access Required",description:"To access this page, please consider purchasing our content or subscribing to our service.",shouldRenderBackButton:!1,primaryAction:(i=ke(yy))==null?void 0:i.primaryAction,secondaryAction:(s=ke(yy))==null?void 0:s.secondaryAction});this.close()}})}};$i.version=ii.version,$i.chains=Ae,$i.pages=Be,$i.paymentTypes=r2,$i.themes=ws,$i.navDirections=Mc,$i.navMinimizationTogglerPositions=mo,$i.scanTypes=fa,$i.events=ft;let zm=$i;typeof window<"u"&&(window.CredenzaPassport=zm);const Kc=Object.freeze(Object.defineProperty({__proto__:null,credenzaSellableMinAbi:[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithEther",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getBeneficiaryAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrencyTokenContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceEther",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceFiat",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"addr",type:"address"}],name:"setBeneficiaryAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenContract",type:"address"}],name:"setCurrencyTokenContractAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceEther",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceFiat",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}],erc1155MinAbi:[{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],erc20MinAbi:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}],erc721MinAbi:[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"owner",type:"address"}],stateMutability:"view",type:"function"}],membershipMinAbi:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"target",type:"address"}],name:"MembershipAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"target",type:"address"}],name:"MembershipRemoved",type:"event"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"},{internalType:"string",name:"metadata",type:"string"}],name:"addMembership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithEther",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"confirmMembership",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBeneficiaryAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrencyTokenContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"getMembershipMetadata",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceEther",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceFiat",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"removeMembership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"addr",type:"address"}],name:"setBeneficiaryAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenContract",type:"address"}],name:"setCurrencyTokenContractAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"},{internalType:"string",name:"metadata",type:"string"}],name:"setMembershipMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceEther",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceFiat",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}]},Symbol.toStringTag,{value:"Module"})),_j="5";typeof window<"u"&&((ZT=window.__svelte??(window.__svelte={})).v??(ZT.v=new Set)).add(_j),xN();var Ej=fe("<div></div>");const Cj={hash:"svelte-wttqlc",code:".brand-credenza.svelte-wttqlc {top:8px;left:-1px;}.brand-nhl.svelte-wttqlc {top:2px;}.brand-mlb.full.svelte-wttqlc {top:initial;bottom:8px;left:7px;}"};function lR(t,e){if(new.target)return Ge({component:lR,...t});Le(e,!1),Do(t,Cj);const[r,n]=tn(),i=()=>dt(yi,"$isLoggedInStore",r);let s=ye(e,"brandName",12);var o=Ej();let a;Te(l=>a=Pr(o,1,`crtw-w-1.5 crtw-h-1.5 crtw-rounded-[3px] crtw-absolute crtw-left-0 crtw-top-[8px] brand-${s()}`,"svelte-wttqlc",a,l),[()=>({"crtw-bg-green-500":i(),"crtw-bg-red-500":!i()})],Qe),J(t,o);var c=De({get brandName(){return s()},set brandName(l){s(l),ge()},$set:ze,$on:(l,u)=>Ze(e,l,u)});return n(),c}var Sj=fe("<span><!></span>"),Aj=fe("<div><!></div> <!>",1),Rj=fe('<div role="button"><!> <div class="crtw-flex crtw-items-center crtw-relative crtw-h-full crtw-mx-1.5"><!> <!></div> <!></div>');function qc(t,e){if(new.target)return Ge({component:qc,...t});Le(e,!1);const[r,n]=tn(),i=()=>dt(yi,"$isLoggedInStore",r),s=me();let o=ye(e,"options",12),{title:a,onClick:c,isDisabled:l,theme:u,isMain:d}=o();$e(()=>we(o()),()=>{K(s,o().isMinimized)}),ar(),it();var h=Rj();let f;at(h,"tabindex",0);var p=oe(h);{var v=O=>{var U=Sj();let G;var D=oe(U);{var M=j=>{var $=et(),L=Ne($);Ii(L,e,"default",{}),J(j,$)},Z=j=>{var $=_r();Te(()=>Xe($,a)),J(j,$)};Ce(D,j=>{d?j(M):j(Z,!1)})}ie(U),Te(j=>G=Pr(U,1,`crtw-flex crtw-items-center crtw-justify-center crtw-invisible crtw-bg-white crtw-text-black crtw-text-center crtw-absolute crtw-z-10
|
|
103
|
+
`,document.head.appendChild(t)}},JH=(t,e="info",r)=>{const{duration:n,centered:i}=r||{},s={theme:{...HH(e),...(i==null?void 0:i.enabled)&&GH(i==null?void 0:i.position)},...n===-1?{initial:0}:{duration:n||1e4}};Zm.push(t,s)};let S0,$c,Ma,Xc,_d;const YH=async()=>{_d==null||_d.$destroy(),S0==null||S0.$destroy(),Ma==null||Ma.$destroy(),Xc=$c=S0=Ma=_d=null},$H=()=>{$c&&($c.style.display="none"),Ot.set(null)},XH=async(t,e)=>{if(e&&bt.set(e),t&&Ot.set(t),$c)$c&&$c.style.removeProperty("display");else{const r=(await Promise.resolve().then(()=>LJ)).default;S0=new r({target:document.body}),$c=document.getElementById("cpui")}},KH=()=>{Xc&&(Xc.style.display="none")},qH=async(t={},e={})=>{if(Xc)Ma==null||Ma.$set({styles:t,navConfig:e}),Xc&&Xc.style.removeProperty("display");else{const r=(await Promise.resolve().then(()=>XJ)).default;Ma=new r({target:document.body,props:{styles:t,navConfig:e}}),Xc=document.getElementById("cpnav")}},ej=(t,e="info",r)=>{_d||(_d=jH()),JH(t,e,r)},sR="openid profile profile.write email phone blockchain.evm.write blockchain.evm";async function tj(t,{forceEmail:e,forcePhone:r}={}){ln.track("cp_login_initiated",{chain:this.config.chainId,clientId:this.config.clientId,provider:t,location:window.location.origin+window.location.pathname});try{if(t===Mf.METAMASK)await yr.evm.metamask.login();else if(t===Mf.OAUTH)await yr.oauth.loginWithRedirect({scope:sR,redirectUrl:window.location.href,...e&&{forceEmail:e},...r&&{forcePhone:r}});else throw new Error("Unknown provider");this.init()}catch(n){throw xt(ft.ERROR,{provider:t,error:n}),n}}async function rj({validatorId:t,idToken:e,accessToken:r}){if(r&&e)throw new Error("Only one of idToken or accessToken should be provided");ln.track("cp_login_initiated",{chain:this.config.chainId,clientId:this.config.clientId,provider:"OAUTH_JWT",location:window.location.origin+window.location.pathname});try{Du.set(!0),await yr.oauth.loginWithJwt({scope:sR,validatorId:t,redirectUrl:window.location.href,...e?{idToken:e}:{accessToken:r}}),await this.init()}catch(n){throw xt(ft.ERROR,{provider:"OAUTH_JWT",error:n}),n}finally{Du.set(!1)}}async function nj({shouldRevokeSession:t=!1}={}){try{const e=ke(lt),r=ke(yn);ln.track("cp_logout",{chain:e.chainId,clientId:e.clientId,address:await Zr(),location:window.location.href,$email:r==null?void 0:r.email,$phone:r==null?void 0:r.phone})}catch{}localStorage.removeItem(Pc.QR_CODE),yi.set(!1),yn.set(null),Fn.set(null),t&&await yr.oauth.revokeSession(),yr.logout(),xt(ft.LOGOUT)}function ij(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var A0={exports:{}};A0.exports;var oR;function sj(){return oR||(oR=1,function(t,e){var r=200,n="__lodash_hash_undefined__",i=800,s=16,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",v="[object Map]",m="[object Number]",w="[object Null]",_="[object Object]",S="[object Proxy]",T="[object RegExp]",N="[object Set]",I="[object String]",O="[object Undefined]",U="[object WeakMap]",G="[object ArrayBuffer]",D="[object DataView]",M="[object Float32Array]",Z="[object Float64Array]",j="[object Int8Array]",$="[object Int16Array]",L="[object Int32Array]",z="[object Uint8Array]",X="[object Uint8ClampedArray]",te="[object Uint16Array]",re="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,Se=/^(?:0|[1-9]\d*)$/,_e={};_e[M]=_e[Z]=_e[j]=_e[$]=_e[L]=_e[z]=_e[X]=_e[te]=_e[re]=!0,_e[a]=_e[c]=_e[G]=_e[u]=_e[D]=_e[d]=_e[h]=_e[f]=_e[v]=_e[m]=_e[_]=_e[T]=_e[N]=_e[I]=_e[U]=!1;var Re=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,be=typeof self=="object"&&self&&self.Object===Object&&self,ve=Re||be||Function("return this")(),je=e&&!e.nodeType&&e,Pe=je&&!0&&t&&!t.nodeType&&t,Ve=Pe&&Pe.exports===je,Ke=Ve&&Re.process,rt=function(){try{var V=Pe&&Pe.require&&Pe.require("util").types;return V||Ke&&Ke.binding&&Ke.binding("util")}catch{}}(),vt=rt&&rt.isTypedArray;function tt(V,Y,ue){switch(ue.length){case 0:return V.call(Y);case 1:return V.call(Y,ue[0]);case 2:return V.call(Y,ue[0],ue[1]);case 3:return V.call(Y,ue[0],ue[1],ue[2])}return V.apply(Y,ue)}function ot(V,Y){for(var ue=-1,Ye=Array(V);++ue<V;)Ye[ue]=Y(ue);return Ye}function Kt(V){return function(Y){return V(Y)}}function Yt(V,Y){return V==null?void 0:V[Y]}function Mt(V,Y){return function(ue){return V(Y(ue))}}var wr=Array.prototype,nr=Function.prototype,qt=Object.prototype,Je=ve["__core-js_shared__"],nt=nr.toString,Pt=qt.hasOwnProperty,Mr=function(){var V=/[^.]+$/.exec(Je&&Je.keys&&Je.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""}(),pt=qt.toString,Sr=nt.call(Object),y=RegExp("^"+nt.call(Pt).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=Ve?ve.Buffer:void 0,x=ve.Symbol,k=ve.Uint8Array;E&&E.allocUnsafe;var g=Mt(Object.getPrototypeOf,Object),b=Object.create,B=qt.propertyIsEnumerable,W=wr.splice,Q=x?x.toStringTag:void 0,ee=function(){try{var V=jb(Object,"defineProperty");return V({},"",{}),V}catch{}}(),he=E?E.isBuffer:void 0,Ie=Math.max,Bt=Date.now,Vt=jb(ve,"Map"),mt=jb(Object,"create"),No=function(){function V(){}return function(Y){if(!sl(Y))return{};if(b)return b(Y);V.prototype=Y;var ue=new V;return V.prototype=void 0,ue}}();function Xi(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function P0(){this.__data__=mt?mt(null):{},this.size=0}function V0(V){var Y=this.has(V)&&delete this.__data__[V];return this.size-=Y?1:0,Y}function Q$(V){var Y=this.__data__;if(mt){var ue=Y[V];return ue===n?void 0:ue}return Pt.call(Y,V)?Y[V]:void 0}function J$(V){var Y=this.__data__;return mt?Y[V]!==void 0:Pt.call(Y,V)}function Y$(V,Y){var ue=this.__data__;return this.size+=this.has(V)?0:1,ue[V]=mt&&Y===void 0?n:Y,this}Xi.prototype.clear=P0,Xi.prototype.delete=V0,Xi.prototype.get=Q$,Xi.prototype.has=J$,Xi.prototype.set=Y$;function xo(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function $$(){this.__data__=[],this.size=0}function X$(V){var Y=this.__data__,ue=eg(Y,V);if(ue<0)return!1;var Ye=Y.length-1;return ue==Ye?Y.pop():W.call(Y,ue,1),--this.size,!0}function K$(V){var Y=this.__data__,ue=eg(Y,V);return ue<0?void 0:Y[ue][1]}function q$(V){return eg(this.__data__,V)>-1}function eX(V,Y){var ue=this.__data__,Ye=eg(ue,V);return Ye<0?(++this.size,ue.push([V,Y])):ue[Ye][1]=Y,this}xo.prototype.clear=$$,xo.prototype.delete=X$,xo.prototype.get=K$,xo.prototype.has=q$,xo.prototype.set=eX;function Id(V){var Y=-1,ue=V==null?0:V.length;for(this.clear();++Y<ue;){var Ye=V[Y];this.set(Ye[0],Ye[1])}}function tX(){this.size=0,this.__data__={hash:new Xi,map:new(Vt||xo),string:new Xi}}function rX(V){var Y=rg(this,V).delete(V);return this.size-=Y?1:0,Y}function nX(V){return rg(this,V).get(V)}function iX(V){return rg(this,V).has(V)}function sX(V,Y){var ue=rg(this,V),Ye=ue.size;return ue.set(V,Y),this.size+=ue.size==Ye?0:1,this}Id.prototype.clear=tX,Id.prototype.delete=rX,Id.prototype.get=nX,Id.prototype.has=iX,Id.prototype.set=sX;function Od(V){var Y=this.__data__=new xo(V);this.size=Y.size}function oX(){this.__data__=new xo,this.size=0}function aX(V){var Y=this.__data__,ue=Y.delete(V);return this.size=Y.size,ue}function cX(V){return this.__data__.get(V)}function lX(V){return this.__data__.has(V)}function uX(V,Y){var ue=this.__data__;if(ue instanceof xo){var Ye=ue.__data__;if(!Vt||Ye.length<r-1)return Ye.push([V,Y]),this.size=++ue.size,this;ue=this.__data__=new Id(Ye)}return ue.set(V,Y),this.size=ue.size,this}Od.prototype.clear=oX,Od.prototype.delete=aX,Od.prototype.get=cX,Od.prototype.has=lX,Od.prototype.set=uX;function dX(V,Y){var ue=Yb(V),Ye=!ue&&Jb(V),It=!ue&&!Ye&&QT(V),sr=!ue&&!Ye&&!It&&YT(V),br=ue||Ye||It||sr,Jt=br?ot(V.length,String):[],kr=Jt.length;for(var Ki in V)br&&(Ki=="length"||It&&(Ki=="offset"||Ki=="parent")||sr&&(Ki=="buffer"||Ki=="byteLength"||Ki=="byteOffset")||HT(Ki,kr))||Jt.push(Ki);return Jt}function Gb(V,Y,ue){(ue!==void 0&&!ng(V[Y],ue)||ue===void 0&&!(Y in V))&&Hb(V,Y,ue)}function hX(V,Y,ue){var Ye=V[Y];(!(Pt.call(V,Y)&&ng(Ye,ue))||ue===void 0&&!(Y in V))&&Hb(V,Y,ue)}function eg(V,Y){for(var ue=V.length;ue--;)if(ng(V[ue][0],Y))return ue;return-1}function Hb(V,Y,ue){Y=="__proto__"&&ee?ee(V,Y,{configurable:!0,enumerable:!0,value:ue,writable:!0}):V[Y]=ue}var fX=AX();function tg(V){return V==null?V===void 0?O:w:Q&&Q in Object(V)?RX(V):OX(V)}function zT(V){return F0(V)&&tg(V)==a}function pX(V){if(!sl(V)||BX(V))return!1;var Y=Xb(V)?y:ce;return Y.test(VX(V))}function mX(V){return F0(V)&&JT(V.length)&&!!_e[tg(V)]}function gX(V){if(!sl(V))return IX(V);var Y=jT(V),ue=[];for(var Ye in V)Ye=="constructor"&&(Y||!Pt.call(V,Ye))||ue.push(Ye);return ue}function GT(V,Y,ue,Ye,It){V!==Y&&fX(Y,function(sr,br){if(It||(It=new Od),sl(sr))vX(V,Y,br,ue,GT,Ye,It);else{var Jt=Ye?Ye(Qb(V,br),sr,br+"",V,Y,It):void 0;Jt===void 0&&(Jt=sr),Gb(V,br,Jt)}},$T)}function vX(V,Y,ue,Ye,It,sr,br){var Jt=Qb(V,ue),kr=Qb(Y,ue),Ki=br.get(kr);if(Ki){Gb(V,ue,Ki);return}var ni=sr?sr(Jt,kr,ue+"",V,Y,br):void 0,L0=ni===void 0;if(L0){var Kb=Yb(kr),qb=!Kb&&QT(kr),KT=!Kb&&!qb&&YT(kr);ni=kr,Kb||qb||KT?Yb(Jt)?ni=Jt:FX(Jt)?ni=EX(Jt):qb?(L0=!1,ni=bX(kr)):KT?(L0=!1,ni=_X(kr)):ni=[]:LX(kr)||Jb(kr)?(ni=Jt,Jb(Jt)?ni=DX(Jt):(!sl(Jt)||Xb(Jt))&&(ni=TX(kr))):L0=!1}L0&&(br.set(kr,ni),It(ni,kr,Ye,sr,br),br.delete(kr)),Gb(V,ue,ni)}function yX(V,Y){return MX(UX(V,Y,XT),V+"")}var wX=ee?function(V,Y){return ee(V,"toString",{configurable:!0,enumerable:!1,value:ZX(Y),writable:!0})}:XT;function bX(V,Y){return V.slice()}function kX(V){var Y=new V.constructor(V.byteLength);return new k(Y).set(new k(V)),Y}function _X(V,Y){var ue=kX(V.buffer);return new V.constructor(ue,V.byteOffset,V.length)}function EX(V,Y){var ue=-1,Ye=V.length;for(Y||(Y=Array(Ye));++ue<Ye;)Y[ue]=V[ue];return Y}function CX(V,Y,ue,Ye){var It=!ue;ue||(ue={});for(var sr=-1,br=Y.length;++sr<br;){var Jt=Y[sr],kr=void 0;kr===void 0&&(kr=V[Jt]),It?Hb(ue,Jt,kr):hX(ue,Jt,kr)}return ue}function SX(V){return yX(function(Y,ue){var Ye=-1,It=ue.length,sr=It>1?ue[It-1]:void 0,br=It>2?ue[2]:void 0;for(sr=V.length>3&&typeof sr=="function"?(It--,sr):void 0,br&&NX(ue[0],ue[1],br)&&(sr=It<3?void 0:sr,It=1),Y=Object(Y);++Ye<It;){var Jt=ue[Ye];Jt&&V(Y,Jt,Ye,sr)}return Y})}function AX(V){return function(Y,ue,Ye){for(var It=-1,sr=Object(Y),br=Ye(Y),Jt=br.length;Jt--;){var kr=br[++It];if(ue(sr[kr],kr,sr)===!1)break}return Y}}function rg(V,Y){var ue=V.__data__;return xX(Y)?ue[typeof Y=="string"?"string":"hash"]:ue.map}function jb(V,Y){var ue=Yt(V,Y);return pX(ue)?ue:void 0}function RX(V){var Y=Pt.call(V,Q),ue=V[Q];try{V[Q]=void 0;var Ye=!0}catch{}var It=pt.call(V);return Ye&&(Y?V[Q]=ue:delete V[Q]),It}function TX(V){return typeof V.constructor=="function"&&!jT(V)?No(g(V)):{}}function HT(V,Y){var ue=typeof V;return Y=Y??o,!!Y&&(ue=="number"||ue!="symbol"&&Se.test(V))&&V>-1&&V%1==0&&V<Y}function NX(V,Y,ue){if(!sl(ue))return!1;var Ye=typeof Y;return(Ye=="number"?$b(ue)&&HT(Y,ue.length):Ye=="string"&&Y in ue)?ng(ue[Y],V):!1}function xX(V){var Y=typeof V;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?V!=="__proto__":V===null}function BX(V){return!!Mr&&Mr in V}function jT(V){var Y=V&&V.constructor,ue=typeof Y=="function"&&Y.prototype||qt;return V===ue}function IX(V){var Y=[];if(V!=null)for(var ue in Object(V))Y.push(ue);return Y}function OX(V){return pt.call(V)}function UX(V,Y,ue){return Y=Ie(Y===void 0?V.length-1:Y,0),function(){for(var Ye=arguments,It=-1,sr=Ie(Ye.length-Y,0),br=Array(sr);++It<sr;)br[It]=Ye[Y+It];It=-1;for(var Jt=Array(Y+1);++It<Y;)Jt[It]=Ye[It];return Jt[Y]=ue(br),tt(V,this,Jt)}}function Qb(V,Y){if(!(Y==="constructor"&&typeof V[Y]=="function")&&Y!="__proto__")return V[Y]}var MX=PX(wX);function PX(V){var Y=0,ue=0;return function(){var Ye=Bt(),It=s-(Ye-ue);if(ue=Ye,It>0){if(++Y>=i)return arguments[0]}else Y=0;return V.apply(void 0,arguments)}}function VX(V){if(V!=null){try{return nt.call(V)}catch{}try{return V+""}catch{}}return""}function ng(V,Y){return V===Y||V!==V&&Y!==Y}var Jb=zT(function(){return arguments}())?zT:function(V){return F0(V)&&Pt.call(V,"callee")&&!B.call(V,"callee")},Yb=Array.isArray;function $b(V){return V!=null&&JT(V.length)&&!Xb(V)}function FX(V){return F0(V)&&$b(V)}var QT=he||zX;function Xb(V){if(!sl(V))return!1;var Y=tg(V);return Y==f||Y==p||Y==l||Y==S}function JT(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=o}function sl(V){var Y=typeof V;return V!=null&&(Y=="object"||Y=="function")}function F0(V){return V!=null&&typeof V=="object"}function LX(V){if(!F0(V)||tg(V)!=_)return!1;var Y=g(V);if(Y===null)return!0;var ue=Pt.call(Y,"constructor")&&Y.constructor;return typeof ue=="function"&&ue instanceof ue&&nt.call(ue)==Sr}var YT=vt?Kt(vt):mX;function DX(V){return CX(V,$T(V))}function $T(V){return $b(V)?dX(V):gX(V)}var WX=SX(function(V,Y,ue){GT(V,Y,ue)});function ZX(V){return function(){return V}}function XT(V){return V}function zX(){return!1}t.exports=WX}(A0,A0.exports)),A0.exports}var oj=sj();const aj=ij(oj),cj={testnet:{credenza:{apiUrl:"https://api.testnets.credenza.online",generalWssUrl:"wss://general-staging-staging.up.railway.app",evmWssUrl:"wss://evm-staging-staging.up.railway.app",gitbookUrl:"https://developer.credenza3.com/credenza-sdk-v3.0/",evmApiUrl:"https://evm.staging.credenza3.com",suiApiUrl:"https://sui.staging.credenza3.com",generalApiUrl:"https://api.staging.credenza3.com",accountsApiUrl:"https://accounts.staging.credenza3.com"},stripe:{pk:{DEFAULT:"pk_test_51LJ0nZHfOaPNdSbZUzB3H4D44JoFD0AIfYv4QLSSSxrBs8ch4A5UlpJOXF4OG0fkgppBD2jOrDTCNaGzevnxdH2200rI1wY1cC",OH:"pk_test_51Q88NV09wu09MZ3mFHuhO3j7F0GJqUsFxfOojSXyEmBWyn1XNsSqYpt3qTzlOQCqoWPrZXR4XrQUiS5mnwwkctyT00x50hXVty"}}},mainnet:{credenza:{accountsApiUrl:"https://accounts.credenza3.com",apiUrl:"https://api.credenza.online",generalApiUrl:"https://api.credenza3.com",gitbookUrl:"https://developer.credenza3.com/credenza-sdk-v3.0/",evmApiUrl:"https://evm.credenza3.com",suiApiUrl:"https://sui.credenza3.com",generalWssUrl:"wss://general-prod-prod.up.railway.app",evmWssUrl:"wss://evm-prod-prod.up.railway.app"},stripe:{pk:{DEFAULT:"pk_live_51LJ0nZHfOaPNdSbZpj7gaAUfmbfWylFaORiGxRxyVn8efm1hMTP6Cz2ihL1AhEcUu9AyqTKsUblMQL5m0YU6HTg3001izgq3Fj",OH:"pk_live_51Q88NV09wu09MZ3mt4QLre8zWqEcNDrpBEnnoiJaEA1v5MI3XBEX3iIn83OILmbCr7QrQtB9GIcM1hxmkPfBHRmH00azqgbOQj"}}}},lj=async(t=[],e)=>{if(!(t!=null&&t.length))return!1;const r=ke(Dr),n=await Zr();for(const i of t)if((i==null?void 0:i.type)==="ERC721"){const{erc721MinAbi:s}=await Promise.resolve().then(()=>Kc),o=new lr.Contract(i.address,s,r);for(const a of i.tokens)if(await o.ownerOf(a)===n)return e({loading:!1,active:!1}),!0}else{const{erc1155MinAbi:s}=await Promise.resolve().then(()=>Kc),o=new lr.Contract(i.address,s,r),[a]=await o.balanceOfBatch([n],i.tokens);if(a>0)return e({loading:!1,active:!1}),!0}return!1},uj=async(t=[],e)=>{if(!(t!=null&&t.length))return!1;const{checkMembership:r}=ke(Cr);for(const n of t){const{isMember:i}=await r(n.owner,n.address);if(i)return e({loading:!1,active:!1}),!0}return!1},dj=async(t,e,r)=>{var i;const{payPerArticle:n}=((i=ke(lt))==null?void 0:i.content)||{};for(const s of n||[]){const o=s.uriMasks||[];if(o.length){for(const a of o)if(t.includes(a)&&(yy.set({primaryAction:s.primaryAction,secondaryAction:s.secondaryAction}),e({loading:!0,active:!0}),await lj(s.nfts||[],e)||await uj(s.memberships||[],e)))return;r({loading:!1})}}};let aR=!1;const hj=()=>{if(aR)return;aR=!0;const{update:t,set:e}=vy,r=()=>document.location.pathname+document.location.search,n=()=>ke(Ot);let i=null;const s=new MutationObserver(()=>{const o=r(),a=n();i===o&&a!==Be.PAYMENT_RESULT||(i=o,dj(i,e,c=>t(l=>({...l,...c}))))});Dr.subscribe(o=>{if(!o){s.disconnect();return}s.observe(document.body,{childList:!0,subtree:!0})})},fj={[Ae.POLYGON_AMOY]:{address:"0x2c88F13a02e2798D214A88A8Be3c7fb82aCeA3a7",decimals:6},[Ae.POLYGON]:{address:"0x9dc9421D625b734d339357b97d3480eab95B1423",decimals:6},[Ae.CHILIZ_SPICY]:{address:"0x5619A31C5776c50e4A3f6DD3E07be13f4efa211C",decimals:6},[Ae.CHILIZ]:{address:"0x5619A31C5776c50e4A3f6DD3E07be13f4efa211C",decimals:6},[Ae.AVALANCHE_FUJI]:{address:"0x4f13a1D378c242da9eB7b1Aaaec6241169755642",decimals:6},[Ae.AVALANCHE]:{address:"0xd2Fcd2d5557A786BDeaE4a30D9af299d7B01773d",decimals:6},[Ae.BASE_SEPOLIA]:{address:"0x80C7197fE9E4C1669fdaE0253D5660Dd2689346d",decimals:6},[Ae.BASE]:{address:"0x80C7197fE9E4C1669fdaE0253D5660Dd2689346d",decimals:6}},pj={[Ae.POLYGON_AMOY]:{address:"0x3d549e5078aa0b168e274493a640a718f5e16647"},[Ae.POLYGON]:{address:"0xae7716da2d2d8269466da09d2121ef976c797da9"},[Ae.CHILIZ_SPICY]:{address:"0x1E483507E4842E3C71EC6BcD85c6d2790B63f890"},[Ae.CHILIZ]:{address:"0x0E53B4BFf707d9BE5582D9D2a4e6c00dc5Fca16F"},[Ae.AVALANCHE_FUJI]:{address:"0x6A438192A87419A0D222258DB996DeEaBA45441a"},[Ae.AVALANCHE]:{address:"0x1bAD828934f4a92C886108531ab90A6c9B5eF8Be"},[Ae.BASE_SEPOLIA]:{address:"0x3d549E5078aA0b168e274493A640a718f5E16647"},[Ae.BASE]:{address:"0x3d549E5078aA0b168e274493A640a718f5E16647"}},R0=t=>{switch(t){case"6756b6f8c7d313c0d6ca03f0":case"65a510cd9415d41b1aa933dc":return{currencySymbol:"GH₵",name:"OH",minStoredValueToPurchase:10,maxStoredValueToPurchase:5e3};default:return{currencySymbol:"$",name:"DEFAULT",minStoredValueToPurchase:0,maxStoredValueToPurchase:100}}},mj=async(t,e)=>{const r=await fetch(`${t}/clients/${e}/public`,{method:"get",headers:{"Content-Type":"application/json"}}),n=await r.json();if(!r.ok)throw new Error(n.error);return n.ui_settings=Object.assign({stored_value_alias:"stored value",cred_alias:"CRED"},n.ui_settings),n};async function gj(t){this.networkType=zS(t.chainId),this.config={...aj(cj[this.networkType],t.config||{}),chainId:t.chainId,clientId:t.clientId,networkType:this.networkType},this.chainId=this.config.chainId,this.contracts={erc20Cred:this.config.erc20Contract||fj[this.config.chainId],membership:pj[this.config.chainId]},dd.set(this.contracts),lt.set(this.config)}async function vj(){try{const{chainId:t,clientId:e,credenza:r}=ke(lt),n=await mj(r.accountsApiUrl,e);Oc.set(n);const i=EA(t),s=[];if(window.ethereum){const{MetamaskExtension:c}=await Promise.resolve().then(()=>oY);s.push(new c)}const o=[new Fk({chainConfig:i,extensions:s})],a=SG(e,o,this.networkType);if(yr.on(ft.LOGIN,async()=>await yj(a)),await a,!yr.getAccessToken())return;await KG(),hj()}catch{}xt(ft.INIT),ke(yi)&&this.close()}const yj=async t=>{await t;const e=await yr.account.info(),r=await yr.evm.getEthersProvider(),n=await r.getSigner(),{chainId:i,clientId:s}=ke(lt);ln.track("cp_login",{$email:e.email,$phone:e.phone,chain:i,clientId:s,provider:r,address:await n.getAddress(),location:window.location.href}),xt(ft.LOGIN,{provider:r,user:e})},wj=async({apiUrl:t,eventId:e,contractAddress:r,chainType:n,evmChainId:i})=>{const s=await fetch(`${t}/promo/loyalty/request-points`,{method:"post",body:JSON.stringify({event_id:e,contract_address:r,chain_type:n,...i?{evm_chain_id:+i}:{}}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${ke(Fn)}`}}),o=await s.json();if(!s.ok)throw new Error(`Points request failed. ${o.message}`);return o};async function cR(t="token"){try{const e=await Zr();return await YG({address:e,tokenType:t})}catch(e){throw xt(ft.ERROR,{error:e}),e}}async function bj(){return await cR("nft")}async function kj(t,e){try{const{chainId:r,clientId:n,credenza:i}=ke(lt);await wj({eventId:t,contractAddress:e,chainType:"evm",apiUrl:i.generalApiUrl,evmChainId:r});const s={chain:r,clientId:n,contract:e,eventId:t,from:await Zr()};xt(ft.REQUEST_LOYALTY_POINTS,s),ln.track("cp_request_loyalty",s)}catch(r){throw xt(ft.ERROR,{error:{message:r.statusText,title:"Request loyalty points failed",code:r.status}}),r}}const $i=class $i{constructor(e){if(this.accessToken=null,this.isLoggedIn=!1,this.user=null,this.login=tj,this.jwtLogin=rj,this.logout=nj,this.openUI=XH,this.close=$H,this.toastAlert=ej,this.destroy=YH,this.hideNavigation=KH,this.showNavigation=qH,this.configurePassport=gj,this.init=vj,this.getCREDContract=CA,this.checkMembership=PG,this.sendTokens=LG,this.getWeb3Provider=UG,this.getAddress=Zr,this.sendNft=FG,this.switchChain=MG,this.getBalance=DG,this.requestAirDrop=VG,this.updateProfile=jG,this.confirmAccount=QG,this.getUser=Nm,this.requestLoyaltyPoints=kj,this.getTokens=cR,this.getNfts=bj,this.on=J4,this.once=Q4,this.destroy(),e!=null&&e.chainId&&!Object.values(Ae).includes(e==null?void 0:e.chainId))throw new Error('Unsupported ChainId. Check "Passport.chains" for available chains.');this.ethers=lr,this.configurePassport(e),KZ(this.networkType),Cr.set({openUI:this.openUI,close:this.close,toastAlert:(r,n,i)=>{if(this.networkType!==Uc.MAINNET)return this.toastAlert(r,n,i)},logout:this.logout,login:this.login.bind(this),updateProfile:this.updateProfile,confirmAccount:this.confirmAccount,getCREDContract:this.getCREDContract,checkMembership:this.checkMembership,sendTokens:this.sendTokens,getBalance:this.getBalance,requestLoyaltyPoints:this.requestLoyaltyPoints}),Lk.set({requestAirDrop:this.requestAirDrop}),yn.subscribe(r=>this.user=r),yi.subscribe(r=>{this.isLoggedIn=r||!1,qG(this.isLoggedIn,this.openUI)}),Fn.subscribe(r=>this.accessToken=r),Dr.subscribe(r=>this.provider=r),B4.subscribe(r=>{r&&typeof window<"u"&&this.openUI()}),vy.subscribe(({loading:r,active:n})=>{var i,s,o;if(!(!((i=ke(lt).content)!=null&&i.cloak)||ke(B4)||typeof window>"u")){if(n&&r)return void this.openUI(Be.LOADER,{loaderText:"Checking your access..."});if(n&&!r)return void this.openUI(Be.ERROR,{title:"Premium Access Required",description:"To access this page, please consider purchasing our content or subscribing to our service.",shouldRenderBackButton:!1,primaryAction:(s=ke(yy))==null?void 0:s.primaryAction,secondaryAction:(o=ke(yy))==null?void 0:o.secondaryAction});this.close()}})}};$i.version=ii.version,$i.chains=Ae,$i.pages=Be,$i.paymentTypes=r2,$i.themes=ws,$i.navDirections=Mc,$i.navMinimizationTogglerPositions=mo,$i.scanTypes=fa,$i.events=ft;let zm=$i;typeof window<"u"&&(window.CredenzaPassport=zm);const Kc=Object.freeze(Object.defineProperty({__proto__:null,credenzaSellableMinAbi:[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithEther",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getBeneficiaryAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrencyTokenContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceEther",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceFiat",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address payable",name:"addr",type:"address"}],name:"setBeneficiaryAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenContract",type:"address"}],name:"setCurrencyTokenContractAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceEther",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceFiat",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}],erc1155MinAbi:[{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],erc20MinAbi:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}],erc721MinAbi:[{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"owner",type:"address"}],stateMutability:"view",type:"function"}],membershipMinAbi:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"target",type:"address"}],name:"MembershipAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"target",type:"address"}],name:"MembershipRemoved",type:"event"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"},{internalType:"string",name:"metadata",type:"string"}],name:"addMembership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithEther",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"requestedAmount",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"buyWithToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"confirmMembership",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBeneficiaryAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrencyTokenContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"getMembershipMetadata",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceEther",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceFiat",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"getPriceToken",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"pure",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"}],name:"removeMembership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"addr",type:"address"}],name:"setBeneficiaryAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenContract",type:"address"}],name:"setCurrencyTokenContractAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"customerAddress",type:"address"},{internalType:"string",name:"metadata",type:"string"}],name:"setMembershipMetadata",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceEther",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceFiat",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"price",type:"uint256"}],name:"setPriceToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getTrustedForwarder",outputs:[{internalType:"address",name:"forwarder",type:"address"}],stateMutability:"view",type:"function"}]},Symbol.toStringTag,{value:"Module"})),_j="5";typeof window<"u"&&((ZT=window.__svelte??(window.__svelte={})).v??(ZT.v=new Set)).add(_j),xN();var Ej=fe("<div></div>");const Cj={hash:"svelte-wttqlc",code:".brand-credenza.svelte-wttqlc {top:8px;left:-1px;}.brand-nhl.svelte-wttqlc {top:2px;}.brand-mlb.full.svelte-wttqlc {top:initial;bottom:8px;left:7px;}"};function lR(t,e){if(new.target)return Ge({component:lR,...t});Le(e,!1),Do(t,Cj);const[r,n]=tn(),i=()=>dt(yi,"$isLoggedInStore",r);let s=ye(e,"brandName",12);var o=Ej();let a;Te(l=>a=Pr(o,1,`crtw-w-1.5 crtw-h-1.5 crtw-rounded-[3px] crtw-absolute crtw-left-0 crtw-top-[8px] brand-${s()}`,"svelte-wttqlc",a,l),[()=>({"crtw-bg-green-500":i(),"crtw-bg-red-500":!i()})],Qe),J(t,o);var c=De({get brandName(){return s()},set brandName(l){s(l),ge()},$set:ze,$on:(l,u)=>Ze(e,l,u)});return n(),c}var Sj=fe("<span><!></span>"),Aj=fe("<div><!></div> <!>",1),Rj=fe('<div role="button"><!> <div class="crtw-flex crtw-items-center crtw-relative crtw-h-full crtw-mx-1.5"><!> <!></div> <!></div>');function qc(t,e){if(new.target)return Ge({component:qc,...t});Le(e,!1);const[r,n]=tn(),i=()=>dt(yi,"$isLoggedInStore",r),s=me();let o=ye(e,"options",12),{title:a,onClick:c,isDisabled:l,theme:u,isMain:d}=o();$e(()=>we(o()),()=>{K(s,o().isMinimized)}),ar(),it();var h=Rj();let f;at(h,"tabindex",0);var p=oe(h);{var v=O=>{var U=Sj();let G;var D=oe(U);{var M=j=>{var $=et(),L=Ne($);Ii(L,e,"default",{}),J(j,$)},Z=j=>{var $=_r();Te(()=>Xe($,a)),J(j,$)};Ce(D,j=>{d?j(M):j(Z,!1)})}ie(U),Te(j=>G=Pr(U,1,`crtw-flex crtw-items-center crtw-justify-center crtw-invisible crtw-bg-white crtw-text-black crtw-text-center crtw-absolute crtw-z-10
|
|
104
104
|
crtw-top-0 crtw-bottom-0 crtw-left-0 crtw-right-0 crtw-text-[9px] crtw-rounded crtw-overflow-hidden group-hover:crtw-visible`,null,G,j),[()=>({"crtw-bg-black":u===ws.BLACK,"crtw-text-white":u===ws.BLACK})],Qe),J(O,U)};Ce(p,O=>{C(s)&&i()&&O(v)})}var m=de(p,2),w=oe(m);{var _=O=>{lR(O,{get brandName(){return a}})};Ce(w,O=>{d&&O(_)})}var S=de(w,2);Ii(S,e,"icon",{}),ie(m);var T=de(m,2);{var N=O=>{var U=Aj(),G=Ne(U);let D;var M=oe(G);xg(M,()=>a),ie(G);var Z=de(G,2);Ii(Z,e,"default",{}),Te(j=>D=Pr(G,1,"crtw-flex crtw-flex-col crtw-flex-1 crtw-w-full crtw-ml-1.5 crtw-justify-center",null,D,j),[()=>({"crtw-text-white":l})],Qe),J(O,U)};Ce(T,O=>{C(s)||O(N)})}ie(h),Te(O=>f=Pr(h,1,"crtw-w-full crtw-flex crtw-flex-row crtw-items-center crtw-justify-start crtw-h-11 crtw-relative crtw-box-border crtw-group",null,f,O),[()=>({"crtw-justify-center":C(s),"crtw-w-11":C(s)})],Qe),hn("click",h,c),J(t,h);var I=De({get options(){return o()},set options(O){o(O),ge()},$set:ze,$on:(O,U)=>Ze(e,O,U)});return n(),I}const Tj="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-chevron-up'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M7.646%204.646a.5.5%200%200%201%20.708%200l6%206a.5.5%200%200%201-.708.708L8%205.707l-5.646%205.647a.5.5%200%200%201-.708-.708l6-6z'/%3e%3c/svg%3e";var Nj=fe('<img alt=""/>'),xj=fe('<div slot="icon"><img class="crtw-block crtw-max-w-[30px]" alt=""/></div>');function uR(t,e){if(new.target)return Ge({component:uR,...t});Le(e,!1);const[r,n]=tn(),i=()=>dt(yi,"$isLoggedInStore",r),s=me(),o=me();let a=ye(e,"options",12),{onClick:c,title:l,passIcon:u,theme:d}=a();$e(()=>we(a()),()=>{K(s,a().chevronStyles)}),$e(()=>we(a()),()=>{K(o,a().isMinimized)}),ar(),it();const h=Qe(()=>({title:l,onClick:c,isDisabled:!1,isMinimized:C(o),theme:d,isMain:!0}));qc(t,{get options(){return C(h)},children:(p,v)=>{var m=et(),w=Ne(m);{var _=S=>{var T=Nj();Te(()=>{at(T,"src",Tj),Oi(T,C(s))}),J(S,T)};Ce(w,S=>{i()&&S(_)})}J(p,m)},$$slots:{default:!0,icon:(p,v)=>{var m=xj();Pr(m,1,"crtw-flex crtw-justify-center crtw-items-center crtw-rounded-md");var w=oe(m);ie(m),Te(()=>at(w,"src",u)),J(p,m)}}});var f=De({get options(){return a()},set options(p){a(p),ge()},$set:ze,$on:(p,v)=>Ze(e,p,v)});return n(),f}var Bj=fe('<div role="button"><!></div>');const Ij={hash:"svelte-16c70gs",code:".cpui-minimization-toggler-left.svelte-16c70gs {left:0;border-right:1px solid;}.cpui-minimization-toggler-right.svelte-16c70gs {right:0;border-left:1px solid;}"};function dR(t,e){if(new.target)return Ge({component:dR,...t});Le(e,!1),Do(t,Ij);let r=ye(e,"theme",12),n=ye(e,"navConfig",12),i=ye(e,"isMinimized",12);it();var s=et(),o=Ne(s);{var a=c=>{var l=Bj();at(l,"tabindex",0);let u;var d=oe(l);{var h=p=>{var v=_r();v.nodeValue=">",J(p,v)},f=p=>{var v=_r();v.nodeValue="<",J(p,v)};Ce(d,p=>{we(i()),we(n()),we(mo),le(()=>{var v,m,w,_;return i()&&((m=(v=n().minimization)==null?void 0:v.toggler)==null?void 0:m.position)===mo.RIGHT||!i()&&((_=(w=n().minimization)==null?void 0:w.toggler)==null?void 0:_.position)!==mo.RIGHT})?p(h):p(f,!1)})}ie(l),Te((p,v)=>u=Pr(l,1,p,"svelte-16c70gs",u,v),[()=>(we(n()),we(mo),le(()=>{var p,v,m;return`crtw-flex crtw-items-center crtw-justify-center crtw-w-4 crtw-absolute crtw-top-0 crtw-bottom-0 crtw-border-gray-700 cpui-minimization-toggler-${((m=(v=(p=n().minimization)==null?void 0:p.toggler)==null?void 0:v.position)==null?void 0:m.toLowerCase())??mo.LEFT.toLowerCase()}`})),()=>({"border-white":r()===ws.BLACK})],Qe),hn("click",l,()=>i(!i())),J(c,l)};Ce(o,c=>{we(n()),le(()=>{var l,u;return(u=(l=n().minimization)==null?void 0:l.toggler)==null?void 0:u.enabled})&&c(a)})}return J(t,s),De({get theme(){return r()},set theme(c){r(c),ge()},get navConfig(){return n()},set navConfig(c){n(c),ge()},get isMinimized(){return i()},set isMinimized(c){i(c),ge()},$set:ze,$on:(c,l)=>Ze(e,c,l)})}var Oj=fe('<div class="crdz-ui" id="cpnav"><div><!> <!> <!> <!></div></div>');function hR(t,e){if(new.target)return Ge({component:hR,...t});Le(e,!1);const r=me(),n=me(),i=me(),s=me();let o=ye(e,"options",12),a=ye(e,"navItemOptions",12),c=ye(e,"balanceOptions",12),l=o(),u=l.theme,d=l.cssVarStyles,h=l.navConfig,f=l.navDirection,p=l.iconStyles,v=l.onItemClicked,m=me(l.isMinimized),w=l.expandedNavComponent;$e(()=>we(o()),()=>{K(r,o().isExpanded)}),$e(()=>we(c()),()=>{K(n,c().balance)}),$e(()=>we(c()),()=>{K(i,c().isShown)}),$e(()=>we(a()),()=>{K(s,a().chevronStyles)}),ar(),it();var _=Oj(),S=oe(_);let T;var N=oe(S);dR(N,{get theme(){return u},get navConfig(){return h},get isMinimized(){return C(m)},set isMinimized(Z){K(m,Z)},$$legacy:!0});var I=de(N,2);{var O=Z=>{var j=et(),$=Ne(j);const L=Qe(()=>({isMinimized:C(m),theme:u,iconStyles:p,onClick:v,isShownBalance:C(i),balance:C(n)}));Xr($,()=>w,(z,X)=>{X(z,{get options(){return C(L)}})}),J(Z,j)};Ce(I,Z=>{we(Mc),C(r),le(()=>f===Mc.TOP&&C(r))&&Z(O)})}var U=de(I,2);const G=Qe(()=>(we(a()),C(m),C(s),le(()=>({...a(),theme:u,isMinimized:C(m),chevronStyles:C(s)}))));uR(U,{get options(){return C(G)}});var D=de(U,2);{var M=Z=>{var j=et(),$=Ne(j);const L=Qe(()=>({isMinimized:C(m),theme:u,iconStyles:p,onClick:v,isShownBalance:C(i),balance:C(n)}));Xr($,()=>w,(z,X)=>{X(z,{get options(){return C(L)}})}),J(Z,j)};Ce(D,Z=>{we(Mc),C(r),le(()=>f===Mc.BOTTOM&&C(r))&&Z(M)})}return ie(S),ie(_),Te(Z=>{T=Pr(S,1,`cpnav crtw-fixed crtw-z-50 crtw-w-56 crtw-flex crtw-flex-col crtw-items-center crtw-justify-center crtw-bg-white crtw-text-gray-800
|
|
105
105
|
crtw-font-[poppins] crtw-text-xs crtw-border crtw-border-gray-700 crtw-rounded crtw-cursor-pointer crtw-pr-1.5`,null,T,Z),Oi(S,d)},[()=>{var Z,j,$,L,z,X,te,re;return{"crtw-bg-black":u===ws.BLACK,"crtw-text-white":u===ws.BLACK,"crtw-w-[70px]":C(m),"crtw-pr-5":((j=(Z=h.minimization)==null?void 0:Z.toggler)==null?void 0:j.enabled)&&((L=($=h.minimization)==null?void 0:$.toggler)==null?void 0:L.position)===mo.RIGHT,"crtw-pl-5":((X=(z=h.minimization)==null?void 0:z.toggler)==null?void 0:X.enabled)&&((re=(te=h.minimization)==null?void 0:te.toggler)==null?void 0:re.position)!==mo.RIGHT}}],Qe),J(t,_),De({get options(){return o()},set options(Z){o(Z),ge()},get navItemOptions(){return a()},set navItemOptions(Z){a(Z),ge()},get balanceOptions(){return c()},set balanceOptions(Z){c(Z),ge()},$set:ze,$on:(Z,j)=>Ze(e,Z,j)})}const Uj="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3ctitle%3eClose%3c/title%3e%3cpath%20fill='%23a6a6a6'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.237%207.177a.75.75%200%2010-1.06%201.06L10.939%2012l-3.762%203.763a.75.75%200%20101.06%201.06L12%2013.061l3.763%203.762a.75.75%200%20101.06-1.06L13.061%2012l3.762-3.763a.75.75%200%2000-1.06-1.06L12%2010.939%208.237%207.177z'/%3e%3c/svg%3e";var Mj=fe('<div class="crtw-float-right crtw-cursor-pointer crtw-h-8 crtw-w-8 crtw-absolute crtw-top-0 crtw-right-0 crtw-z-1000001 crtw-m-2 crtw-bg-white crtw-rounded-full sm:crtw-m-4" role="button"><img alt="close-icon" class="crtw-fill-red-500 crtw-w-8 crtw-h-8"/></div>');function fR(t,e){if(new.target)return Ge({component:fR,...t});Le(e,!1);let r=ye(e,"onCloseClick",12),n=ye(e,"isHeaderShown",12);$e(()=>we(n()),()=>{n(n())}),ar();var i=et(),s=Ne(i);{var o=a=>{var c=Mj();at(c,"tabindex",0);var l=oe(c);ie(c),Te(()=>at(l,"src",Uj)),hn("click",c,function(...u){var d;(d=r())==null||d.apply(this,u)}),J(a,c)};Ce(s,a=>{n()&&a(o)})}return J(t,i),De({get onCloseClick(){return r()},set onCloseClick(a){r(a),ge()},get isHeaderShown(){return n()},set isHeaderShown(a){n(a),ge()},$set:ze,$on:(a,c)=>Ze(e,a,c)})}var Pj=fe('<p class="crtw-px-0.5 sm:crtw-px-1.5 crtw-text-textMain crtw-text-[10px] sm:crtw-text-[11px]"><!></p>');function el(t,e){if(new.target)return Ge({component:el,...t});Le(e,!1);var r=Pj(),n=oe(r);return Ii(n,e,"default",{}),ie(r),J(t,r),De({$set:ze,$on:(i,s)=>Ze(e,i,s)})}const Vj="data:image/svg+xml,%3csvg%20id='Layer_1'%20width='100%25'%20xmlns='http://www.w3.org/2000/svg'%20height='100%25'%20viewBox='0%200%20939.84%20194'%20data-name='Layer%201'%3e%3cg%3e%3cg%3e%3cpath%20d='m181,0H13C5.82,0,0,5.82,0,13v168c0,7.18,5.82,13,13,13h154c-2.69-28.49-18.67-54.88-58.91-78.03-28.28-15.89-32.85-6.92-80.75,27.15,39.18-64.25,38.73-56.84-4-116.12,61.46,40.42,56.89,41.25,116.12-4-30.41,50.61-38.32,55.06-19.72,83.12,21.63,32.61,42.77,58.88,74.26,61.05V13c0-7.18-5.82-13-13-13Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m181,194h13v-13c0,7.18-5.82,13-13,13Z'%20style='fill:%20%23fff;'%3e%3c/path%3e%3cpath%20d='m119.74,106.12c-18.6-28.06-10.69-32.51,19.72-83.12-59.23,45.25-54.66,44.42-116.12,4,42.73,59.28,43.18,51.87,4,116.12,47.9-34.07,52.46-43.04,80.75-27.15,40.23,23.15,56.22,49.54,58.91,78.03h14c7.18,0,13-5.82,13-13v-13.83c-31.48-2.17-52.63-28.44-74.26-61.05Z'%20style='fill:%20%23fff;'%3e%3c/path%3e%3c/g%3e%3cpath%20d='m92,142.14c-22.75,17.3-20.76,16.82-44.5,1.67,16.41,22.55,16.66,20.1,1.67,44.5,23.94-17.03,19.64-17.39,44.5-1.67-17.03-23.94-16.86-19.2-1.67-44.5Z'%20style='fill:%20%23fff;'%3e%3c/path%3e%3cpath%20d='m180.28,76.84c-17.73,13.35-16.29,13.13-34.31,1.24,12.83,17.61,12.78,15.39,1.24,34.31,18.52-13.17,15.3-13.63,34.31-1.24-13.17-18.52-12.91-14.86-1.24-34.31Z'%20style='fill:%20%23fff;'%3e%3c/path%3e%3c/g%3e%3cg%20id='Credenza'%3e%3cpath%20d='m699.78,61.6c16.09,19.44,32.17,39.03,49.06,59.57v-58.61h5.58v71.37l-1.43.95c-16.41-19.27-32.17-39.03-49.22-59.42v58.62h-5.41V62.39c.51-.2.99-.47,1.43-.8h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m512.45,73.07h5.41v55.59c10.67-.16,21.19,1.6,31.22-1.91,13.22-4.62,20.71-18.64,18.32-33.93-2.07-14.33-13.38-24.37-28.19-24.85-8.92-.32-17.84,0-26.92,0v-5.58c13.7.63,27.71-2.23,40.94,3.35,14.33,6.21,22.14,21.5,19.91,38.55-2.07,15.61-13.7,27.88-29.47,29.31-10.2.95-20.71.16-31.38.16.16-20.07.16-40.3.16-60.69h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m336.59,101.59h17.68c5.26,0,10.52.16,15.93-.16,10.04-.48,15.93-7.01,15.61-17.21-.16-9.4-6.69-16.25-16.09-16.41-10.83-.16-21.82,0-33.14,0-.16-1.91-.16-3.51-.16-4.78,12.9,0,25.48-.95,37.91.32,10.99.95,17.84,10.67,17.84,21.98s-6.69,18.96-18.16,21.02c-1.28.32-2.55.48-4.62.95,8.29,9.08,16.25,17.52,24.53,26.6-4.46,1.12-7.33.48-10.04-2.71-6.37-7.33-12.9-14.33-19.75-21.34-1.63-1.48-3.7-2.38-5.89-2.55-5.1-.32-10.2-.16-15.77-.16v26.92c-2.07.16-3.66.16-5.58.32-.32-10.83-.32-21.5-.32-32.82v.03Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m834.23,67.65h-43.01v-5.1h53.52c-15.77,22.62-31.7,43.81-47.47,65.95h45.87c.16,2.07.32,3.51.32,5.41h-56.39c15.61-22.62,31.38-43.64,47.15-66.26h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m299.96,72.59c-1.28,1.12-2.39,2.07-3.35,3.03-17.04-11.95-35.84-11.47-46.83.95-10.35,11.79-10.35,32.17.32,43.81,10.99,12.1,29.94,12.43,46.99.32.8,1.12,1.75,2.39,2.71,3.66-12.9,13.86-38.39,14.5-52.25,1.43-14.65-13.7-14.98-39.35-.8-53.68,13.54-14.02,38.87-13.86,53.21.48h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpath%20d='m939.83,133.76c-4.14,1.6-6.06.16-7.64-3.35-8.29-19.11-16.88-37.91-25.33-56.87-.63-1.43-1.43-2.86-2.39-5.1-3.83,8.44-7.33,16.25-10.83,24.05-5.58,12.75-11.47,25.33-16.88,38.07-1.6,3.66-3.66,4.62-7.64,3.18l3.35-7.64c9.08-19.91,18-39.98,27.24-59.9.8-1.75,1.75-3.66,3.66-4.3,3.18-1.12,5.1,2.07,6.06,4.3,9.72,21.67,19.59,43.17,29.31,64.83.5.84.87,1.76,1.12,2.71h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3cpolygon%20style='fill:%20%23262a2e;'%20points='476.77%2095.85%20476.77%20100.62%20432.81%20100.62%20432.81%20128.82%20476.77%20128.82%20476.77%20134.08%20427.07%20134.08%20427.07%2095.85%20476.77%2095.85'%3e%3c/polygon%3e%3cpath%20d='m615.35,128.82h43.64v5.26h-49.38v-38.23h49.38c.16,1.28.32,2.71.48,4.62h-44.12v28.36h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3crect%20x='427.07'%20y='62.56'%20style='fill:%20%23262a2e;'%20width='49.7'%20height='4.94'%3e%3c/rect%3e%3cpath%20d='m659.32,67.65h-49.86v-5.1h49.54c.16,1.6.16,3.03.32,5.1h0Z'%20style='fill:%20%23262a2e;'%3e%3c/path%3e%3c/g%3e%3c/svg%3e";var Fj=fe('<img alt="additional-logo"/>'),Lj=fe('<a class="crtw-text-hightlightColor crtw-no-underline" href="https://www.credenza3.com/company/about" target="_blank" rel="noreferrer">About</a>'),Dj=fe('<a class="crtw-text-hightlightColor crtw-no-underline" href="mailto:info@credenza3.com">Contact</a>'),Wj=fe('<a class="crtw-text-hightlightColor crtw-no-underline" href="https://www.credenza3.com/privacy-policy" target="_blank" rel="noreferrer">Privacy & terms</a>'),Zj=fe(`<section class="crtw-flex crtw-flex-col crtw-items-center crtw-pt-11"><div class="crtw-flex crtw-items-center crtw-justify-center crtw-gap-4"><img alt="credenza-logo" class="crtw-w-[110px]"/> <!></div> <div class="crtw-text-center crtw-text-textMain crtw-text-xs crtw-flex crtw-justify-center
|
|
106
106
|
crtw-items-center crtw-pt-[3px] sm:crtw-pt-2"><a class="crtw-text-hightlightColor crtw-no-underline crtw-mr-1.5 crtw-text-[10px]" href="https://www.credenza3.com" target="_blank" rel="noreferrer">Credenza</a> <!> <!> <!> <!> <!> <!></div></section>`);function pR(t,e){if(new.target)return Ge({component:pR,...t});Le(e,!1);let r=ye(e,"additionalLogo",12,void 0);it();var n=Zj(),i=oe(n),s=oe(i),o=de(s,2);{var a=v=>{var m=Fj();Te(()=>{at(m,"src",(we(r()),le(()=>{var w;return(w=r())==null?void 0:w.img}))),Oi(m,(we(r()),le(()=>{var w;return`width: ${(w=r())==null?void 0:w.width}px`})))}),J(v,m)};Ce(o,v=>{we(r()),le(()=>{var m;return(m=r())==null?void 0:m.img})&&v(a)})}ie(i);var c=de(i,2),l=de(oe(c),2);el(l,{children:(v,m)=>{On();var w=_r("·");J(v,w)},$$slots:{default:!0}});var u=de(l,2);el(u,{children:(v,m)=>{var w=Lj();J(v,w)},$$slots:{default:!0}});var d=de(u,2);el(d,{children:(v,m)=>{On();var w=_r("·");J(v,w)},$$slots:{default:!0}});var h=de(d,2);el(h,{children:(v,m)=>{var w=Dj();J(v,w)},$$slots:{default:!0}});var f=de(h,2);el(f,{children:(v,m)=>{On();var w=_r("·");J(v,w)},$$slots:{default:!0}});var p=de(f,2);return el(p,{children:(v,m)=>{var w=Wj();J(v,w)},$$slots:{default:!0}}),ie(c),ie(n),Te(()=>at(s,"src",Vj)),J(t,n),De({get additionalLogo(){return r()},set additionalLogo(v){r(v),ge()},$set:ze,$on:(v,m)=>Ze(e,v,m)})}var zj=fe("<div><!></div>");function tl(t,e){if(new.target)return Ge({component:tl,...t});const r=qd(e,["children","$$slots","$$events","$$legacy"]);Le(e,!1),it();var n=zj(),i=oe(n);return Ii(i,e,"default",{}),ie(n),Te(()=>Pr(n,1,(we(r),le(()=>r.class+" crtw-w-full crtw-mx-auto crtw-my-0")))),J(t,n),De({$set:ze,$on:(s,o)=>Ze(e,s,o)})}var Gj=fe(`<div class="crtw-flex crtw-flex-col crtw-items-center crtw-justify-center crtw-bg-white crtw-rounded
|