@dcl/auth-site 0.1.3-7252677610.commit-a5dc0e2 → 0.1.3-7302835620.commit-a50400e
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Zu,r as yo,c as te,g as mi,_ as J,a as bo,b as xg}from"./index-82c41159.js";function Mg(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Qu={},Zi={},vo={};Object.defineProperty(vo,"__esModule",{value:!0});vo.walletLogo=void 0;const Cg=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};vo.walletLogo=Cg;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.LINK_API_URL=void 0;mo.LINK_API_URL="https://www.walletlink.org";var wo={};Object.defineProperty(wo,"__esModule",{value:!0});wo.ScopedLocalStorage=void 0;class Ig{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}wo.ScopedLocalStorage=Ig;var ni={},_n={};Object.defineProperty(_n,"__esModule",{value:!0});const Rg=Zu;function fl(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Ag(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let Tg=class extends Rg.EventEmitter{emit(e,...r){let n=e==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")fl(s,this,r);else{const o=s.length,a=Ag(s);for(let u=0;u<o;u+=1)fl(a[u],this,r)}return!0}};_n.default=Tg;var Yu={exports:{}};Yu.exports;(function(t){(function(e,r){function n(w,c){if(!w)throw new Error(c||"Assertion failed")}function i(w,c){w.super_=c;var y=function(){};y.prototype=c.prototype,w.prototype=new y,w.prototype.constructor=w}function s(w,c,y){if(s.isBN(w))return w;this.negative=0,this.words=null,this.length=0,this.red=null,w!==null&&((c==="le"||c==="be")&&(y=c,c=10),this._init(w||0,c||10,y||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=yo.Buffer}catch{}s.isBN=function(c){return c instanceof s?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===s.wordSize&&Array.isArray(c.words)},s.max=function(c,y){return c.cmp(y)>0?c:y},s.min=function(c,y){return c.cmp(y)<0?c:y},s.prototype._init=function(c,y,v){if(typeof c=="number")return this._initNumber(c,y,v);if(typeof c=="object")return this._initArray(c,y,v);y==="hex"&&(y=16),n(y===(y|0)&&y>=2&&y<=36),c=c.toString().replace(/\s+/g,"");var S=0;c[0]==="-"&&(S++,this.negative=1),S<c.length&&(y===16?this._parseHex(c,S,v):(this._parseBase(c,y,S),v==="le"&&this._initArray(this.toArray(),y,v)))},s.prototype._initNumber=function(c,y,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(n(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),y,v)},s.prototype._initArray=function(c,y,v){if(n(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var E,k,L=0;if(v==="be")for(S=c.length-1,E=0;S>=0;S-=3)k=c[S]|c[S-1]<<8|c[S-2]<<16,this.words[E]|=k<<L&67108863,this.words[E+1]=k>>>26-L&67108863,L+=24,L>=26&&(L-=26,E++);else if(v==="le")for(S=0,E=0;S<c.length;S+=3)k=c[S]|c[S+1]<<8|c[S+2]<<16,this.words[E]|=k<<L&67108863,this.words[E+1]=k>>>26-L&67108863,L+=24,L>=26&&(L-=26,E++);return this._strip()};function a(w,c){var y=w.charCodeAt(c);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;n(!1,"Invalid character in "+w)}function u(w,c,y){var v=a(w,y);return y-1>=c&&(v|=a(w,y-1)<<4),v}s.prototype._parseHex=function(c,y,v){this.length=Math.ceil((c.length-y)/6),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var E=0,k=0,L;if(v==="be")for(S=c.length-1;S>=y;S-=2)L=u(c,y,S)<<E,this.words[k]|=L&67108863,E>=18?(E-=18,k+=1,this.words[k]|=L>>>26):E+=8;else{var _=c.length-y;for(S=_%2===0?y+1:y;S<c.length;S+=2)L=u(c,y,S)<<E,this.words[k]|=L&67108863,E>=18?(E-=18,k+=1,this.words[k]|=L>>>26):E+=8}this._strip()};function l(w,c,y,v){for(var S=0,E=0,k=Math.min(w.length,y),L=c;L<k;L++){var _=w.charCodeAt(L)-48;S*=v,_>=49?E=_-49+10:_>=17?E=_-17+10:E=_,n(_>=0&&E<v,"Invalid character"),S+=E}return S}s.prototype._parseBase=function(c,y,v){this.words=[0],this.length=1;for(var S=0,E=1;E<=67108863;E*=y)S++;S--,E=E/y|0;for(var k=c.length-v,L=k%S,_=Math.min(k,k-L)+v,d=0,A=v;A<_;A+=S)d=l(c,A,A+S,y),this.imuln(E),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(L!==0){var Y=1;for(d=l(c,A,c.length,y),A=0;A<L;A++)Y*=y;this.imuln(Y),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this._strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var y=0;y<this.length;y++)c.words[y]=this.words[y];c.length=this.length,c.negative=this.negative,c.red=this.red};function p(w,c){w.words=c.words,w.length=c.length,w.negative=c.negative,w.red=c.red}if(s.prototype._move=function(c){p(c,this)},s.prototype.clone=function(){var c=new s(null);return this.copy(c),c},s.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{s.prototype.inspect=g}else s.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(c,y){c=c||10,y=y|0||1;var v;if(c===16||c==="hex"){v="";for(var S=0,E=0,k=0;k<this.length;k++){var L=this.words[k],_=((L<<S|E)&16777215).toString(16);E=L>>>24-S&16777215,S+=2,S>=26&&(S-=26,k--),E!==0||k!==this.length-1?v=m[6-_.length]+_+v:v=_+v}for(E!==0&&(v=E.toString(16)+v);v.length%y!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var d=C[c],A=T[c];v="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var ee=Y.modrn(A).toString(c);Y=Y.idivn(A),Y.isZero()?v=ee+v:v=m[d-ee.length]+ee+v}for(this.isZero()&&(v="0"+v);v.length%y!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(c,y){return this.toArrayLike(o,c,y)}),s.prototype.toArray=function(c,y){return this.toArrayLike(Array,c,y)};var P=function(c,y){return c.allocUnsafe?c.allocUnsafe(y):new c(y)};s.prototype.toArrayLike=function(c,y,v){this._strip();var S=this.byteLength(),E=v||Math.max(1,S);n(S<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=P(c,E),L=y==="le"?"LE":"BE";return this["_toArrayLike"+L](k,S),k},s.prototype._toArrayLikeLE=function(c,y){for(var v=0,S=0,E=0,k=0;E<this.length;E++){var L=this.words[E]<<k|S;c[v++]=L&255,v<c.length&&(c[v++]=L>>8&255),v<c.length&&(c[v++]=L>>16&255),k===6?(v<c.length&&(c[v++]=L>>24&255),S=0,k=0):(S=L>>>24,k+=2)}if(v<c.length)for(c[v++]=S;v<c.length;)c[v++]=0},s.prototype._toArrayLikeBE=function(c,y){for(var v=c.length-1,S=0,E=0,k=0;E<this.length;E++){var L=this.words[E]<<k|S;c[v--]=L&255,v>=0&&(c[v--]=L>>8&255),v>=0&&(c[v--]=L>>16&255),k===6?(v>=0&&(c[v--]=L>>24&255),S=0,k=0):(S=L>>>24,k+=2)}if(v>=0)for(c[v--]=S;v>=0;)c[v--]=0},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var y=c,v=0;return y>=4096&&(v+=13,y>>>=13),y>=64&&(v+=7,y>>>=7),y>=8&&(v+=4,y>>>=4),y>=2&&(v+=2,y>>>=2),v+y},s.prototype._zeroBits=function(c){if(c===0)return 26;var y=c,v=0;return y&8191||(v+=13,y>>>=13),y&127||(v+=7,y>>>=7),y&15||(v+=4,y>>>=4),y&3||(v+=2,y>>>=2),y&1||v++,v},s.prototype.bitLength=function(){var c=this.words[this.length-1],y=this._countBits(c);return(this.length-1)*26+y};function U(w){for(var c=new Array(w.bitLength()),y=0;y<c.length;y++){var v=y/26|0,S=y%26;c[y]=w.words[v]>>>S&1}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,y=0;y<this.length;y++){var v=this._zeroBits(this.words[y]);if(c+=v,v!==26)break}return c},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},s.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var y=0;y<c.length;y++)this.words[y]=this.words[y]|c.words[y];return this._strip()},s.prototype.ior=function(c){return n((this.negative|c.negative)===0),this.iuor(c)},s.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},s.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},s.prototype.iuand=function(c){var y;this.length>c.length?y=c:y=this;for(var v=0;v<y.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=y.length,this._strip()},s.prototype.iand=function(c){return n((this.negative|c.negative)===0),this.iuand(c)},s.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},s.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},s.prototype.iuxor=function(c){var y,v;this.length>c.length?(y=this,v=c):(y=c,v=this);for(var S=0;S<v.length;S++)this.words[S]=y.words[S]^v.words[S];if(this!==y)for(;S<y.length;S++)this.words[S]=y.words[S];return this.length=y.length,this._strip()},s.prototype.ixor=function(c){return n((this.negative|c.negative)===0),this.iuxor(c)},s.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},s.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},s.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var y=Math.ceil(c/26)|0,v=c%26;this._expand(y),v>0&&y--;for(var S=0;S<y;S++)this.words[S]=~this.words[S]&67108863;return v>0&&(this.words[S]=~this.words[S]&67108863>>26-v),this._strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,y){n(typeof c=="number"&&c>=0);var v=c/26|0,S=c%26;return this._expand(v+1),y?this.words[v]=this.words[v]|1<<S:this.words[v]=this.words[v]&~(1<<S),this._strip()},s.prototype.iadd=function(c){var y;if(this.negative!==0&&c.negative===0)return this.negative=0,y=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,y=this.isub(c),c.negative=1,y._normSign();var v,S;this.length>c.length?(v=this,S=c):(v=c,S=this);for(var E=0,k=0;k<S.length;k++)y=(v.words[k]|0)+(S.words[k]|0)+E,this.words[k]=y&67108863,E=y>>>26;for(;E!==0&&k<v.length;k++)y=(v.words[k]|0)+E,this.words[k]=y&67108863,E=y>>>26;if(this.length=v.length,E!==0)this.words[this.length]=E,this.length++;else if(v!==this)for(;k<v.length;k++)this.words[k]=v.words[k];return this},s.prototype.add=function(c){var y;return c.negative!==0&&this.negative===0?(c.negative=0,y=this.sub(c),c.negative^=1,y):c.negative===0&&this.negative!==0?(this.negative=0,y=c.sub(this),this.negative=1,y):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},s.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var y=this.iadd(c);return c.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,E;v>0?(S=this,E=c):(S=c,E=this);for(var k=0,L=0;L<E.length;L++)y=(S.words[L]|0)-(E.words[L]|0)+k,k=y>>26,this.words[L]=y&67108863;for(;k!==0&&L<S.length;L++)y=(S.words[L]|0)+k,k=y>>26,this.words[L]=y&67108863;if(k===0&&L<S.length&&S!==this)for(;L<S.length;L++)this.words[L]=S.words[L];return this.length=Math.max(this.length,L),S!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function M(w,c,y){y.negative=c.negative^w.negative;var v=w.length+c.length|0;y.length=v,v=v-1|0;var S=w.words[0]|0,E=c.words[0]|0,k=S*E,L=k&67108863,_=k/67108864|0;y.words[0]=L;for(var d=1;d<v;d++){for(var A=_>>>26,Y=_&67108863,ee=Math.min(d,c.length-1),N=Math.max(0,d-w.length+1);N<=ee;N++){var $=d-N|0;S=w.words[$]|0,E=c.words[N]|0,k=S*E+Y,A+=k/67108864|0,Y=k&67108863}y.words[d]=Y|0,_=A|0}return _!==0?y.words[d]=_|0:y.length--,y._strip()}var O=function(c,y,v){var S=c.words,E=y.words,k=v.words,L=0,_,d,A,Y=S[0]|0,ee=Y&8191,N=Y>>>13,$=S[1]|0,V=$&8191,Q=$>>>13,ge=S[2]|0,I=ge&8191,R=ge>>>13,q=S[3]|0,Z=q&8191,fe=q>>>13,ye=S[4]|0,ae=ye&8191,xe=ye>>>13,Pt=S[5]|0,Te=Pt&8191,Re=Pt>>>13,ut=S[6]|0,Ce=ut&8191,ke=ut>>>13,ft=S[7]|0,Ie=ft&8191,b=ft>>>13,f=S[8]|0,h=f&8191,x=f>>>13,B=S[9]|0,F=B&8191,H=B>>>13,de=E[0]|0,he=de&8191,ce=de>>>13,Oe=E[1]|0,ue=Oe&8191,Pe=Oe>>>13,Tn=E[2]|0,$e=Tn&8191,De=Tn>>>13,kn=E[3]|0,Fe=kn&8191,je=kn>>>13,On=E[4]|0,Ue=On&8191,We=On>>>13,Nn=E[5]|0,He=Nn&8191,Ve=Nn>>>13,Ln=E[6]|0,ze=Ln&8191,qe=Ln>>>13,Bn=E[7]|0,Ge=Bn&8191,Je=Bn>>>13,Pn=E[8]|0,Ze=Pn&8191,Qe=Pn>>>13,$n=E[9]|0,Ye=$n&8191,Ke=$n>>>13;v.negative=c.negative^y.negative,v.length=19,_=Math.imul(ee,he),d=Math.imul(ee,ce),d=d+Math.imul(N,he)|0,A=Math.imul(N,ce);var Wr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(V,he),d=Math.imul(V,ce),d=d+Math.imul(Q,he)|0,A=Math.imul(Q,ce),_=_+Math.imul(ee,ue)|0,d=d+Math.imul(ee,Pe)|0,d=d+Math.imul(N,ue)|0,A=A+Math.imul(N,Pe)|0;var Hr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,_=Math.imul(I,he),d=Math.imul(I,ce),d=d+Math.imul(R,he)|0,A=Math.imul(R,ce),_=_+Math.imul(V,ue)|0,d=d+Math.imul(V,Pe)|0,d=d+Math.imul(Q,ue)|0,A=A+Math.imul(Q,Pe)|0,_=_+Math.imul(ee,$e)|0,d=d+Math.imul(ee,De)|0,d=d+Math.imul(N,$e)|0,A=A+Math.imul(N,De)|0;var Vr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(Z,he),d=Math.imul(Z,ce),d=d+Math.imul(fe,he)|0,A=Math.imul(fe,ce),_=_+Math.imul(I,ue)|0,d=d+Math.imul(I,Pe)|0,d=d+Math.imul(R,ue)|0,A=A+Math.imul(R,Pe)|0,_=_+Math.imul(V,$e)|0,d=d+Math.imul(V,De)|0,d=d+Math.imul(Q,$e)|0,A=A+Math.imul(Q,De)|0,_=_+Math.imul(ee,Fe)|0,d=d+Math.imul(ee,je)|0,d=d+Math.imul(N,Fe)|0,A=A+Math.imul(N,je)|0;var zr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(ae,he),d=Math.imul(ae,ce),d=d+Math.imul(xe,he)|0,A=Math.imul(xe,ce),_=_+Math.imul(Z,ue)|0,d=d+Math.imul(Z,Pe)|0,d=d+Math.imul(fe,ue)|0,A=A+Math.imul(fe,Pe)|0,_=_+Math.imul(I,$e)|0,d=d+Math.imul(I,De)|0,d=d+Math.imul(R,$e)|0,A=A+Math.imul(R,De)|0,_=_+Math.imul(V,Fe)|0,d=d+Math.imul(V,je)|0,d=d+Math.imul(Q,Fe)|0,A=A+Math.imul(Q,je)|0,_=_+Math.imul(ee,Ue)|0,d=d+Math.imul(ee,We)|0,d=d+Math.imul(N,Ue)|0,A=A+Math.imul(N,We)|0;var qr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(qr>>>26)|0,qr&=67108863,_=Math.imul(Te,he),d=Math.imul(Te,ce),d=d+Math.imul(Re,he)|0,A=Math.imul(Re,ce),_=_+Math.imul(ae,ue)|0,d=d+Math.imul(ae,Pe)|0,d=d+Math.imul(xe,ue)|0,A=A+Math.imul(xe,Pe)|0,_=_+Math.imul(Z,$e)|0,d=d+Math.imul(Z,De)|0,d=d+Math.imul(fe,$e)|0,A=A+Math.imul(fe,De)|0,_=_+Math.imul(I,Fe)|0,d=d+Math.imul(I,je)|0,d=d+Math.imul(R,Fe)|0,A=A+Math.imul(R,je)|0,_=_+Math.imul(V,Ue)|0,d=d+Math.imul(V,We)|0,d=d+Math.imul(Q,Ue)|0,A=A+Math.imul(Q,We)|0,_=_+Math.imul(ee,He)|0,d=d+Math.imul(ee,Ve)|0,d=d+Math.imul(N,He)|0,A=A+Math.imul(N,Ve)|0;var Gr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(Ce,he),d=Math.imul(Ce,ce),d=d+Math.imul(ke,he)|0,A=Math.imul(ke,ce),_=_+Math.imul(Te,ue)|0,d=d+Math.imul(Te,Pe)|0,d=d+Math.imul(Re,ue)|0,A=A+Math.imul(Re,Pe)|0,_=_+Math.imul(ae,$e)|0,d=d+Math.imul(ae,De)|0,d=d+Math.imul(xe,$e)|0,A=A+Math.imul(xe,De)|0,_=_+Math.imul(Z,Fe)|0,d=d+Math.imul(Z,je)|0,d=d+Math.imul(fe,Fe)|0,A=A+Math.imul(fe,je)|0,_=_+Math.imul(I,Ue)|0,d=d+Math.imul(I,We)|0,d=d+Math.imul(R,Ue)|0,A=A+Math.imul(R,We)|0,_=_+Math.imul(V,He)|0,d=d+Math.imul(V,Ve)|0,d=d+Math.imul(Q,He)|0,A=A+Math.imul(Q,Ve)|0,_=_+Math.imul(ee,ze)|0,d=d+Math.imul(ee,qe)|0,d=d+Math.imul(N,ze)|0,A=A+Math.imul(N,qe)|0;var Jr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(Ie,he),d=Math.imul(Ie,ce),d=d+Math.imul(b,he)|0,A=Math.imul(b,ce),_=_+Math.imul(Ce,ue)|0,d=d+Math.imul(Ce,Pe)|0,d=d+Math.imul(ke,ue)|0,A=A+Math.imul(ke,Pe)|0,_=_+Math.imul(Te,$e)|0,d=d+Math.imul(Te,De)|0,d=d+Math.imul(Re,$e)|0,A=A+Math.imul(Re,De)|0,_=_+Math.imul(ae,Fe)|0,d=d+Math.imul(ae,je)|0,d=d+Math.imul(xe,Fe)|0,A=A+Math.imul(xe,je)|0,_=_+Math.imul(Z,Ue)|0,d=d+Math.imul(Z,We)|0,d=d+Math.imul(fe,Ue)|0,A=A+Math.imul(fe,We)|0,_=_+Math.imul(I,He)|0,d=d+Math.imul(I,Ve)|0,d=d+Math.imul(R,He)|0,A=A+Math.imul(R,Ve)|0,_=_+Math.imul(V,ze)|0,d=d+Math.imul(V,qe)|0,d=d+Math.imul(Q,ze)|0,A=A+Math.imul(Q,qe)|0,_=_+Math.imul(ee,Ge)|0,d=d+Math.imul(ee,Je)|0,d=d+Math.imul(N,Ge)|0,A=A+Math.imul(N,Je)|0;var Zr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(h,he),d=Math.imul(h,ce),d=d+Math.imul(x,he)|0,A=Math.imul(x,ce),_=_+Math.imul(Ie,ue)|0,d=d+Math.imul(Ie,Pe)|0,d=d+Math.imul(b,ue)|0,A=A+Math.imul(b,Pe)|0,_=_+Math.imul(Ce,$e)|0,d=d+Math.imul(Ce,De)|0,d=d+Math.imul(ke,$e)|0,A=A+Math.imul(ke,De)|0,_=_+Math.imul(Te,Fe)|0,d=d+Math.imul(Te,je)|0,d=d+Math.imul(Re,Fe)|0,A=A+Math.imul(Re,je)|0,_=_+Math.imul(ae,Ue)|0,d=d+Math.imul(ae,We)|0,d=d+Math.imul(xe,Ue)|0,A=A+Math.imul(xe,We)|0,_=_+Math.imul(Z,He)|0,d=d+Math.imul(Z,Ve)|0,d=d+Math.imul(fe,He)|0,A=A+Math.imul(fe,Ve)|0,_=_+Math.imul(I,ze)|0,d=d+Math.imul(I,qe)|0,d=d+Math.imul(R,ze)|0,A=A+Math.imul(R,qe)|0,_=_+Math.imul(V,Ge)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(Q,Ge)|0,A=A+Math.imul(Q,Je)|0,_=_+Math.imul(ee,Ze)|0,d=d+Math.imul(ee,Qe)|0,d=d+Math.imul(N,Ze)|0,A=A+Math.imul(N,Qe)|0;var Qr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(F,he),d=Math.imul(F,ce),d=d+Math.imul(H,he)|0,A=Math.imul(H,ce),_=_+Math.imul(h,ue)|0,d=d+Math.imul(h,Pe)|0,d=d+Math.imul(x,ue)|0,A=A+Math.imul(x,Pe)|0,_=_+Math.imul(Ie,$e)|0,d=d+Math.imul(Ie,De)|0,d=d+Math.imul(b,$e)|0,A=A+Math.imul(b,De)|0,_=_+Math.imul(Ce,Fe)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(ke,Fe)|0,A=A+Math.imul(ke,je)|0,_=_+Math.imul(Te,Ue)|0,d=d+Math.imul(Te,We)|0,d=d+Math.imul(Re,Ue)|0,A=A+Math.imul(Re,We)|0,_=_+Math.imul(ae,He)|0,d=d+Math.imul(ae,Ve)|0,d=d+Math.imul(xe,He)|0,A=A+Math.imul(xe,Ve)|0,_=_+Math.imul(Z,ze)|0,d=d+Math.imul(Z,qe)|0,d=d+Math.imul(fe,ze)|0,A=A+Math.imul(fe,qe)|0,_=_+Math.imul(I,Ge)|0,d=d+Math.imul(I,Je)|0,d=d+Math.imul(R,Ge)|0,A=A+Math.imul(R,Je)|0,_=_+Math.imul(V,Ze)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(Q,Ze)|0,A=A+Math.imul(Q,Qe)|0,_=_+Math.imul(ee,Ye)|0,d=d+Math.imul(ee,Ke)|0,d=d+Math.imul(N,Ye)|0,A=A+Math.imul(N,Ke)|0;var Yr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(F,ue),d=Math.imul(F,Pe),d=d+Math.imul(H,ue)|0,A=Math.imul(H,Pe),_=_+Math.imul(h,$e)|0,d=d+Math.imul(h,De)|0,d=d+Math.imul(x,$e)|0,A=A+Math.imul(x,De)|0,_=_+Math.imul(Ie,Fe)|0,d=d+Math.imul(Ie,je)|0,d=d+Math.imul(b,Fe)|0,A=A+Math.imul(b,je)|0,_=_+Math.imul(Ce,Ue)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(ke,Ue)|0,A=A+Math.imul(ke,We)|0,_=_+Math.imul(Te,He)|0,d=d+Math.imul(Te,Ve)|0,d=d+Math.imul(Re,He)|0,A=A+Math.imul(Re,Ve)|0,_=_+Math.imul(ae,ze)|0,d=d+Math.imul(ae,qe)|0,d=d+Math.imul(xe,ze)|0,A=A+Math.imul(xe,qe)|0,_=_+Math.imul(Z,Ge)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(fe,Ge)|0,A=A+Math.imul(fe,Je)|0,_=_+Math.imul(I,Ze)|0,d=d+Math.imul(I,Qe)|0,d=d+Math.imul(R,Ze)|0,A=A+Math.imul(R,Qe)|0,_=_+Math.imul(V,Ye)|0,d=d+Math.imul(V,Ke)|0,d=d+Math.imul(Q,Ye)|0,A=A+Math.imul(Q,Ke)|0;var Kr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(F,$e),d=Math.imul(F,De),d=d+Math.imul(H,$e)|0,A=Math.imul(H,De),_=_+Math.imul(h,Fe)|0,d=d+Math.imul(h,je)|0,d=d+Math.imul(x,Fe)|0,A=A+Math.imul(x,je)|0,_=_+Math.imul(Ie,Ue)|0,d=d+Math.imul(Ie,We)|0,d=d+Math.imul(b,Ue)|0,A=A+Math.imul(b,We)|0,_=_+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,Ve)|0,d=d+Math.imul(ke,He)|0,A=A+Math.imul(ke,Ve)|0,_=_+Math.imul(Te,ze)|0,d=d+Math.imul(Te,qe)|0,d=d+Math.imul(Re,ze)|0,A=A+Math.imul(Re,qe)|0,_=_+Math.imul(ae,Ge)|0,d=d+Math.imul(ae,Je)|0,d=d+Math.imul(xe,Ge)|0,A=A+Math.imul(xe,Je)|0,_=_+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(fe,Ze)|0,A=A+Math.imul(fe,Qe)|0,_=_+Math.imul(I,Ye)|0,d=d+Math.imul(I,Ke)|0,d=d+Math.imul(R,Ye)|0,A=A+Math.imul(R,Ke)|0;var Xr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(F,Fe),d=Math.imul(F,je),d=d+Math.imul(H,Fe)|0,A=Math.imul(H,je),_=_+Math.imul(h,Ue)|0,d=d+Math.imul(h,We)|0,d=d+Math.imul(x,Ue)|0,A=A+Math.imul(x,We)|0,_=_+Math.imul(Ie,He)|0,d=d+Math.imul(Ie,Ve)|0,d=d+Math.imul(b,He)|0,A=A+Math.imul(b,Ve)|0,_=_+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,qe)|0,d=d+Math.imul(ke,ze)|0,A=A+Math.imul(ke,qe)|0,_=_+Math.imul(Te,Ge)|0,d=d+Math.imul(Te,Je)|0,d=d+Math.imul(Re,Ge)|0,A=A+Math.imul(Re,Je)|0,_=_+Math.imul(ae,Ze)|0,d=d+Math.imul(ae,Qe)|0,d=d+Math.imul(xe,Ze)|0,A=A+Math.imul(xe,Qe)|0,_=_+Math.imul(Z,Ye)|0,d=d+Math.imul(Z,Ke)|0,d=d+Math.imul(fe,Ye)|0,A=A+Math.imul(fe,Ke)|0;var en=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(en>>>26)|0,en&=67108863,_=Math.imul(F,Ue),d=Math.imul(F,We),d=d+Math.imul(H,Ue)|0,A=Math.imul(H,We),_=_+Math.imul(h,He)|0,d=d+Math.imul(h,Ve)|0,d=d+Math.imul(x,He)|0,A=A+Math.imul(x,Ve)|0,_=_+Math.imul(Ie,ze)|0,d=d+Math.imul(Ie,qe)|0,d=d+Math.imul(b,ze)|0,A=A+Math.imul(b,qe)|0,_=_+Math.imul(Ce,Ge)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(ke,Ge)|0,A=A+Math.imul(ke,Je)|0,_=_+Math.imul(Te,Ze)|0,d=d+Math.imul(Te,Qe)|0,d=d+Math.imul(Re,Ze)|0,A=A+Math.imul(Re,Qe)|0,_=_+Math.imul(ae,Ye)|0,d=d+Math.imul(ae,Ke)|0,d=d+Math.imul(xe,Ye)|0,A=A+Math.imul(xe,Ke)|0;var tn=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(tn>>>26)|0,tn&=67108863,_=Math.imul(F,He),d=Math.imul(F,Ve),d=d+Math.imul(H,He)|0,A=Math.imul(H,Ve),_=_+Math.imul(h,ze)|0,d=d+Math.imul(h,qe)|0,d=d+Math.imul(x,ze)|0,A=A+Math.imul(x,qe)|0,_=_+Math.imul(Ie,Ge)|0,d=d+Math.imul(Ie,Je)|0,d=d+Math.imul(b,Ge)|0,A=A+Math.imul(b,Je)|0,_=_+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,Qe)|0,d=d+Math.imul(ke,Ze)|0,A=A+Math.imul(ke,Qe)|0,_=_+Math.imul(Te,Ye)|0,d=d+Math.imul(Te,Ke)|0,d=d+Math.imul(Re,Ye)|0,A=A+Math.imul(Re,Ke)|0;var Ea=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,_=Math.imul(F,ze),d=Math.imul(F,qe),d=d+Math.imul(H,ze)|0,A=Math.imul(H,qe),_=_+Math.imul(h,Ge)|0,d=d+Math.imul(h,Je)|0,d=d+Math.imul(x,Ge)|0,A=A+Math.imul(x,Je)|0,_=_+Math.imul(Ie,Ze)|0,d=d+Math.imul(Ie,Qe)|0,d=d+Math.imul(b,Ze)|0,A=A+Math.imul(b,Qe)|0,_=_+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(ke,Ye)|0,A=A+Math.imul(ke,Ke)|0;var xa=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(xa>>>26)|0,xa&=67108863,_=Math.imul(F,Ge),d=Math.imul(F,Je),d=d+Math.imul(H,Ge)|0,A=Math.imul(H,Je),_=_+Math.imul(h,Ze)|0,d=d+Math.imul(h,Qe)|0,d=d+Math.imul(x,Ze)|0,A=A+Math.imul(x,Qe)|0,_=_+Math.imul(Ie,Ye)|0,d=d+Math.imul(Ie,Ke)|0,d=d+Math.imul(b,Ye)|0,A=A+Math.imul(b,Ke)|0;var Ma=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,_=Math.imul(F,Ze),d=Math.imul(F,Qe),d=d+Math.imul(H,Ze)|0,A=Math.imul(H,Qe),_=_+Math.imul(h,Ye)|0,d=d+Math.imul(h,Ke)|0,d=d+Math.imul(x,Ye)|0,A=A+Math.imul(x,Ke)|0;var Ca=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,_=Math.imul(F,Ye),d=Math.imul(F,Ke),d=d+Math.imul(H,Ye)|0,A=Math.imul(H,Ke);var Ia=(L+_|0)+((d&8191)<<13)|0;return L=(A+(d>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,k[0]=Wr,k[1]=Hr,k[2]=Vr,k[3]=zr,k[4]=qr,k[5]=Gr,k[6]=Jr,k[7]=Zr,k[8]=Qr,k[9]=Yr,k[10]=Kr,k[11]=Xr,k[12]=en,k[13]=tn,k[14]=Ea,k[15]=xa,k[16]=Ma,k[17]=Ca,k[18]=Ia,L!==0&&(k[19]=L,v.length++),v};Math.imul||(O=M);function D(w,c,y){y.negative=c.negative^w.negative,y.length=w.length+c.length;for(var v=0,S=0,E=0;E<y.length-1;E++){var k=S;S=0;for(var L=v&67108863,_=Math.min(E,c.length-1),d=Math.max(0,E-w.length+1);d<=_;d++){var A=E-d,Y=w.words[A]|0,ee=c.words[d]|0,N=Y*ee,$=N&67108863;k=k+(N/67108864|0)|0,$=$+L|0,L=$&67108863,k=k+($>>>26)|0,S+=k>>>26,k&=67108863}y.words[E]=L,v=k,k=S}return v!==0?y.words[E]=v:y.length--,y._strip()}function W(w,c,y){return D(w,c,y)}s.prototype.mulTo=function(c,y){var v,S=this.length+c.length;return this.length===10&&c.length===10?v=O(this,c,y):S<63?v=M(this,c,y):S<1024?v=D(this,c,y):v=W(this,c,y),v},s.prototype.mul=function(c){var y=new s(null);return y.words=new Array(this.length+c.length),this.mulTo(c,y)},s.prototype.mulf=function(c){var y=new s(null);return y.words=new Array(this.length+c.length),W(this,c,y)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){var y=c<0;y&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var v=0,S=0;S<this.length;S++){var E=(this.words[S]|0)*c,k=(E&67108863)+(v&67108863);v>>=26,v+=E/67108864|0,v+=k>>>26,this.words[S]=k&67108863}return v!==0&&(this.words[S]=v,this.length++),y?this.ineg():this},s.prototype.muln=function(c){return this.clone().imuln(c)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(c){var y=U(c);if(y.length===0)return new s(1);for(var v=this,S=0;S<y.length&&y[S]===0;S++,v=v.sqr());if(++S<y.length)for(var E=v.sqr();S<y.length;S++,E=E.sqr())y[S]!==0&&(v=v.mul(E));return v},s.prototype.iushln=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26,S=67108863>>>26-y<<26-y,E;if(y!==0){var k=0;for(E=0;E<this.length;E++){var L=this.words[E]&S,_=(this.words[E]|0)-L<<y;this.words[E]=_|k,k=L>>>26-y}k&&(this.words[E]=k,this.length++)}if(v!==0){for(E=this.length-1;E>=0;E--)this.words[E+v]=this.words[E];for(E=0;E<v;E++)this.words[E]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(c){return n(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,y,v){n(typeof c=="number"&&c>=0);var S;y?S=(y-y%26)/26:S=0;var E=c%26,k=Math.min((c-E)/26,this.length),L=67108863^67108863>>>E<<E,_=v;if(S-=k,S=Math.max(0,S),_){for(var d=0;d<k;d++)_.words[d]=this.words[d];_.length=k}if(k!==0)if(this.length>k)for(this.length-=k,d=0;d<this.length;d++)this.words[d]=this.words[d+k];else this.words[0]=0,this.length=1;var A=0;for(d=this.length-1;d>=0&&(A!==0||d>=S);d--){var Y=this.words[d]|0;this.words[d]=A<<26-E|Y>>>E,A=Y&L}return _&&A!==0&&(_.words[_.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(c,y,v){return n(this.negative===0),this.iushrn(c,y,v)},s.prototype.shln=function(c){return this.clone().ishln(c)},s.prototype.ushln=function(c){return this.clone().iushln(c)},s.prototype.shrn=function(c){return this.clone().ishrn(c)},s.prototype.ushrn=function(c){return this.clone().iushrn(c)},s.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26,S=1<<y;if(this.length<=v)return!1;var E=this.words[v];return!!(E&S)},s.prototype.imaskn=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(y!==0&&v++,this.length=Math.min(v,this.length),y!==0){var S=67108863^67108863>>>y<<y;this.words[this.length-1]&=S}return this._strip()},s.prototype.maskn=function(c){return this.clone().imaskn(c)},s.prototype.iaddn=function(c){return n(typeof c=="number"),n(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<=c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},s.prototype._iaddn=function(c){this.words[0]+=c;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},s.prototype.isubn=function(c){if(n(typeof c=="number"),n(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this._strip()},s.prototype.addn=function(c){return this.clone().iaddn(c)},s.prototype.subn=function(c){return this.clone().isubn(c)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(c,y,v){var S=c.length+v,E;this._expand(S);var k,L=0;for(E=0;E<c.length;E++){k=(this.words[E+v]|0)+L;var _=(c.words[E]|0)*y;k-=_&67108863,L=(k>>26)-(_/67108864|0),this.words[E+v]=k&67108863}for(;E<this.length-v;E++)k=(this.words[E+v]|0)+L,L=k>>26,this.words[E+v]=k&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,E=0;E<this.length;E++)k=-(this.words[E]|0)+L,L=k>>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(c,y){var v=this.length-c.length,S=this.clone(),E=c,k=E.words[E.length-1]|0,L=this._countBits(k);v=26-L,v!==0&&(E=E.ushln(v),S.iushln(v),k=E.words[E.length-1]|0);var _=S.length-E.length,d;if(y!=="mod"){d=new s(null),d.length=_+1,d.words=new Array(d.length);for(var A=0;A<d.length;A++)d.words[A]=0}var Y=S.clone()._ishlnsubmul(E,1,_);Y.negative===0&&(S=Y,d&&(d.words[_]=1));for(var ee=_-1;ee>=0;ee--){var N=(S.words[E.length+ee]|0)*67108864+(S.words[E.length+ee-1]|0);for(N=Math.min(N/k|0,67108863),S._ishlnsubmul(E,N,ee);S.negative!==0;)N--,S.negative=0,S._ishlnsubmul(E,1,ee),S.isZero()||(S.negative^=1);d&&(d.words[ee]=N)}return d&&d._strip(),S._strip(),y!=="div"&&v!==0&&S.iushrn(v),{div:d||null,mod:S}},s.prototype.divmod=function(c,y,v){if(n(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var S,E,k;return this.negative!==0&&c.negative===0?(k=this.neg().divmod(c,y),y!=="mod"&&(S=k.div.neg()),y!=="div"&&(E=k.mod.neg(),v&&E.negative!==0&&E.iadd(c)),{div:S,mod:E}):this.negative===0&&c.negative!==0?(k=this.divmod(c.neg(),y),y!=="mod"&&(S=k.div.neg()),{div:S,mod:k.mod}):this.negative&c.negative?(k=this.neg().divmod(c.neg(),y),y!=="div"&&(E=k.mod.neg(),v&&E.negative!==0&&E.isub(c)),{div:k.div,mod:E}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?y==="div"?{div:this.divn(c.words[0]),mod:null}:y==="mod"?{div:null,mod:new s(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new s(this.modrn(c.words[0]))}:this._wordDiv(c,y)},s.prototype.div=function(c){return this.divmod(c,"div",!1).div},s.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},s.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},s.prototype.divRound=function(c){var y=this.divmod(c);if(y.mod.isZero())return y.div;var v=y.div.negative!==0?y.mod.isub(c):y.mod,S=c.ushrn(1),E=c.andln(1),k=v.cmp(S);return k<0||E===1&&k===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},s.prototype.modrn=function(c){var y=c<0;y&&(c=-c),n(c<=67108863);for(var v=(1<<26)%c,S=0,E=this.length-1;E>=0;E--)S=(v*S+(this.words[E]|0))%c;return y?-S:S},s.prototype.modn=function(c){return this.modrn(c)},s.prototype.idivn=function(c){var y=c<0;y&&(c=-c),n(c<=67108863);for(var v=0,S=this.length-1;S>=0;S--){var E=(this.words[S]|0)+v*67108864;this.words[S]=E/c|0,v=E%c}return this._strip(),y?this.ineg():this},s.prototype.divn=function(c){return this.clone().idivn(c)},s.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var y=this,v=c.clone();y.negative!==0?y=y.umod(c):y=y.clone();for(var S=new s(1),E=new s(0),k=new s(0),L=new s(1),_=0;y.isEven()&&v.isEven();)y.iushrn(1),v.iushrn(1),++_;for(var d=v.clone(),A=y.clone();!y.isZero();){for(var Y=0,ee=1;!(y.words[0]&ee)&&Y<26;++Y,ee<<=1);if(Y>0)for(y.iushrn(Y);Y-- >0;)(S.isOdd()||E.isOdd())&&(S.iadd(d),E.isub(A)),S.iushrn(1),E.iushrn(1);for(var N=0,$=1;!(v.words[0]&$)&&N<26;++N,$<<=1);if(N>0)for(v.iushrn(N);N-- >0;)(k.isOdd()||L.isOdd())&&(k.iadd(d),L.isub(A)),k.iushrn(1),L.iushrn(1);y.cmp(v)>=0?(y.isub(v),S.isub(k),E.isub(L)):(v.isub(y),k.isub(S),L.isub(E))}return{a:k,b:L,gcd:v.iushln(_)}},s.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var y=this,v=c.clone();y.negative!==0?y=y.umod(c):y=y.clone();for(var S=new s(1),E=new s(0),k=v.clone();y.cmpn(1)>0&&v.cmpn(1)>0;){for(var L=0,_=1;!(y.words[0]&_)&&L<26;++L,_<<=1);if(L>0)for(y.iushrn(L);L-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);for(var d=0,A=1;!(v.words[0]&A)&&d<26;++d,A<<=1);if(d>0)for(v.iushrn(d);d-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);y.cmp(v)>=0?(y.isub(v),S.isub(E)):(v.isub(y),E.isub(S))}var Y;return y.cmpn(1)===0?Y=S:Y=E,Y.cmpn(0)<0&&Y.iadd(c),Y},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var y=this.clone(),v=c.clone();y.negative=0,v.negative=0;for(var S=0;y.isEven()&&v.isEven();S++)y.iushrn(1),v.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;v.isEven();)v.iushrn(1);var E=y.cmp(v);if(E<0){var k=y;y=v,v=k}else if(E===0||v.cmpn(1)===0)break;y.isub(v)}while(!0);return v.iushln(S)},s.prototype.invm=function(c){return this.egcd(c).a.umod(c)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(c){return this.words[0]&c},s.prototype.bincn=function(c){n(typeof c=="number");var y=c%26,v=(c-y)/26,S=1<<y;if(this.length<=v)return this._expand(v+1),this.words[v]|=S,this;for(var E=S,k=v;E!==0&&k<this.length;k++){var L=this.words[k]|0;L+=E,E=L>>>26,L&=67108863,this.words[k]=L}return E!==0&&(this.words[k]=E,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var y=c<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var v;if(this.length>1)v=1;else{y&&(c=-c),n(c<=67108863,"Number is too big");var S=this.words[0]|0;v=S===c?0:S<c?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var y=this.ucmp(c);return this.negative!==0?-y|0:y},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var y=0,v=this.length-1;v>=0;v--){var S=this.words[v]|0,E=c.words[v]|0;if(S!==E){S<E?y=-1:S>E&&(y=1);break}}return y},s.prototype.gtn=function(c){return this.cmpn(c)===1},s.prototype.gt=function(c){return this.cmp(c)===1},s.prototype.gten=function(c){return this.cmpn(c)>=0},s.prototype.gte=function(c){return this.cmp(c)>=0},s.prototype.ltn=function(c){return this.cmpn(c)===-1},s.prototype.lt=function(c){return this.cmp(c)===-1},s.prototype.lten=function(c){return this.cmpn(c)<=0},s.prototype.lte=function(c){return this.cmp(c)<=0},s.prototype.eqn=function(c){return this.cmpn(c)===0},s.prototype.eq=function(c){return this.cmp(c)===0},s.red=function(c){return new ie(c)},s.prototype.toRed=function(c){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(c){return this.red=c,this},s.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},s.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},s.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},s.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},s.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},s.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},s.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},s.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(c){return n(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var j={k256:null,p224:null,p192:null,p25519:null};function z(w,c){this.name=w,this.p=new s(c,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var c=new s(null);return c.words=new Array(Math.ceil(this.n/13)),c},z.prototype.ireduce=function(c){var y=c,v;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),v=y.bitLength();while(v>this.n);var S=v<this.n?-1:y.ucmp(this.p);return S===0?(y.words[0]=0,y.length=1):S>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},z.prototype.split=function(c,y){c.iushrn(this.n,0,y)},z.prototype.imulK=function(c){return c.imul(this.k)};function K(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(K,z),K.prototype.split=function(c,y){for(var v=4194303,S=Math.min(c.length,9),E=0;E<S;E++)y.words[E]=c.words[E];if(y.length=S,c.length<=9){c.words[0]=0,c.length=1;return}var k=c.words[9];for(y.words[y.length++]=k&v,E=10;E<c.length;E++){var L=c.words[E]|0;c.words[E-10]=(L&v)<<4|k>>>22,k=L}k>>>=22,c.words[E-10]=k,k===0&&c.length>10?c.length-=10:c.length-=9},K.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var y=0,v=0;v<c.length;v++){var S=c.words[v]|0;y+=S*977,c.words[v]=y&67108863,y=S*64+(y/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function X(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(X,z);function G(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(G,z);function re(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(re,z),re.prototype.imulK=function(c){for(var y=0,v=0;v<c.length;v++){var S=(c.words[v]|0)*19+y,E=S&67108863;S>>>=26,c.words[v]=E,y=S}return y!==0&&(c.words[c.length++]=y),c},s._prime=function(c){if(j[c])return j[c];var y;if(c==="k256")y=new K;else if(c==="p224")y=new X;else if(c==="p192")y=new G;else if(c==="p25519")y=new re;else throw new Error("Unknown prime "+c);return j[c]=y,y};function ie(w){if(typeof w=="string"){var c=s._prime(w);this.m=c.p,this.prime=c}else n(w.gtn(1),"modulus must be greater than 1"),this.m=w,this.prime=null}ie.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},ie.prototype._verify2=function(c,y){n((c.negative|y.negative)===0,"red works only with positives"),n(c.red&&c.red===y.red,"red works only with red numbers")},ie.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(p(c,c.umod(this.m)._forceRed(this)),c)},ie.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},ie.prototype.add=function(c,y){this._verify2(c,y);var v=c.add(y);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},ie.prototype.iadd=function(c,y){this._verify2(c,y);var v=c.iadd(y);return v.cmp(this.m)>=0&&v.isub(this.m),v},ie.prototype.sub=function(c,y){this._verify2(c,y);var v=c.sub(y);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},ie.prototype.isub=function(c,y){this._verify2(c,y);var v=c.isub(y);return v.cmpn(0)<0&&v.iadd(this.m),v},ie.prototype.shl=function(c,y){return this._verify1(c),this.imod(c.ushln(y))},ie.prototype.imul=function(c,y){return this._verify2(c,y),this.imod(c.imul(y))},ie.prototype.mul=function(c,y){return this._verify2(c,y),this.imod(c.mul(y))},ie.prototype.isqr=function(c){return this.imul(c,c.clone())},ie.prototype.sqr=function(c){return this.mul(c,c)},ie.prototype.sqrt=function(c){if(c.isZero())return c.clone();var y=this.m.andln(3);if(n(y%2===1),y===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(c,v)}for(var S=this.m.subn(1),E=0;!S.isZero()&&S.andln(1)===0;)E++,S.iushrn(1);n(!S.isZero());var k=new s(1).toRed(this),L=k.redNeg(),_=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,_).cmp(L)!==0;)d.redIAdd(L);for(var A=this.pow(d,S),Y=this.pow(c,S.addn(1).iushrn(1)),ee=this.pow(c,S),N=E;ee.cmp(k)!==0;){for(var $=ee,V=0;$.cmp(k)!==0;V++)$=$.redSqr();n(V<N);var Q=this.pow(A,new s(1).iushln(N-V-1));Y=Y.redMul(Q),A=Q.redSqr(),ee=ee.redMul(A),N=V}return Y},ie.prototype.invm=function(c){var y=c._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},ie.prototype.pow=function(c,y){if(y.isZero())return new s(1).toRed(this);if(y.cmpn(1)===0)return c.clone();var v=4,S=new Array(1<<v);S[0]=new s(1).toRed(this),S[1]=c;for(var E=2;E<S.length;E++)S[E]=this.mul(S[E-1],c);var k=S[0],L=0,_=0,d=y.bitLength()%26;for(d===0&&(d=26),E=y.length-1;E>=0;E--){for(var A=y.words[E],Y=d-1;Y>=0;Y--){var ee=A>>Y&1;if(k!==S[0]&&(k=this.sqr(k)),ee===0&&L===0){_=0;continue}L<<=1,L|=ee,_++,!(_!==v&&(E!==0||Y!==0))&&(k=this.mul(k,S[L]),_=0,L=0)}d=26}return k},ie.prototype.convertTo=function(c){var y=c.umod(this.m);return y===c?y.clone():y},ie.prototype.convertFrom=function(c){var y=c.clone();return y.red=null,y},s.mont=function(c){return new oe(c)};function oe(w){ie.call(this,w),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(oe,ie),oe.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},oe.prototype.convertFrom=function(c){var y=this.imod(c.mul(this.rinv));return y.red=null,y},oe.prototype.imul=function(c,y){if(c.isZero()||y.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(y),S=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(S).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},oe.prototype.mul=function(c,y){if(c.isZero()||y.isZero())return new s(0)._forceRed(this);var v=c.mul(y),S=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(S).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},oe.prototype.invm=function(c){var y=this.imod(c._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(t,te)})(Yu);var _o=Yu.exports,wi={};Object.defineProperty(wi,"__esModule",{value:!0});wi.EVENTS=void 0;wi.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var ns={},Ku={},Br={},kg=Qi;Qi.default=Qi;Qi.stable=jh;Qi.stableStringify=jh;var Ks="[...]",Dh="[Circular]",yn=[],fn=[];function Fh(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Qi(t,e,r,n){typeof n>"u"&&(n=Fh()),vu(t,"",0,[],void 0,0,n);var i;try{fn.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Uh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;yn.length!==0;){var s=yn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Qn(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),yn.push([n,r,e,i])):fn.push([e,r,t]):(n[r]=t,yn.push([n,r,e]))}function vu(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Qn(Dh,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Qn(Ks,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Qn(Ks,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)vu(t[a],a,a,n,t,s,o);else{var u=Object.keys(t);for(a=0;a<u.length;a++){var l=u[a];vu(t[l],l,a,n,t,s,o)}}n.pop()}}function Og(t,e){return t<e?-1:t>e?1:0}function jh(t,e,r,n){typeof n>"u"&&(n=Fh());var i=mu(t,"",0,[],void 0,0,n)||t,s;try{fn.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Uh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;yn.length!==0;){var o=yn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function mu(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Qn(Dh,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Qn(Ks,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Qn(Ks,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)mu(t[a],a,a,n,t,s,o);else{var u={},l=Object.keys(t).sort(Og);for(a=0;a<l.length;a++){var p=l[a];mu(t[p],p,a,n,t,s,o),u[p]=t[p]}if(typeof i<"u")yn.push([i,e,t]),i[e]=u;else return u}n.pop()}}function Uh(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(fn.length>0)for(var n=0;n<fn.length;n++){var i=fn[n];if(i[1]===e&&i[0]===r){r=i[2],fn.splice(n,1);break}}return t.call(this,e,r)}}Object.defineProperty(Br,"__esModule",{value:!0});Br.EthereumProviderError=Br.EthereumRpcError=void 0;const Ng=kg;class Wh extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return Ng.default(this.serialize(),Pg,2)}}Br.EthereumRpcError=Wh;class Lg extends Wh{constructor(e,r,n){if(!Bg(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}Br.EthereumProviderError=Lg;function Bg(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Pg(t,e){if(e!=="[Circular]")return e}var Xu={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.errorValues=Pr.errorCodes=void 0;Pr.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Pr.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Pr,r=Br,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(m,C=i){if(Number.isInteger(m)){const T=m.toString();if(g(e.errorValues,T))return e.errorValues[T].message;if(l(m))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return C}t.getMessageFromCode=o;function a(m){if(!Number.isInteger(m))return!1;const C=m.toString();return!!(e.errorValues[C]||l(m))}t.isValidCode=a;function u(m,{fallbackError:C=s,shouldIncludeStack:T=!1}={}){var P,U;if(!C||!Number.isInteger(C.code)||typeof C.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(m instanceof r.EthereumRpcError)return m.serialize();const M={};if(m&&typeof m=="object"&&!Array.isArray(m)&&g(m,"code")&&a(m.code)){const D=m;M.code=D.code,D.message&&typeof D.message=="string"?(M.message=D.message,g(D,"data")&&(M.data=D.data)):(M.message=o(M.code),M.data={originalError:p(m)})}else{M.code=C.code;const D=(P=m)===null||P===void 0?void 0:P.message;M.message=D&&typeof D=="string"?D:C.message,M.data={originalError:p(m)}}const O=(U=m)===null||U===void 0?void 0:U.stack;return T&&m&&O&&typeof O=="string"&&(M.stack=O),M}t.serializeError=u;function l(m){return m>=-32099&&m<=-32e3}function p(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function g(m,C){return Object.prototype.hasOwnProperty.call(m,C)}})(Xu);var So={};Object.defineProperty(So,"__esModule",{value:!0});So.ethErrors=void 0;const ec=Br,Hh=Xu,_t=Pr;So.ethErrors={rpc:{parse:t=>$t(_t.errorCodes.rpc.parse,t),invalidRequest:t=>$t(_t.errorCodes.rpc.invalidRequest,t),invalidParams:t=>$t(_t.errorCodes.rpc.invalidParams,t),methodNotFound:t=>$t(_t.errorCodes.rpc.methodNotFound,t),internal:t=>$t(_t.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return $t(e,t)},invalidInput:t=>$t(_t.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>$t(_t.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>$t(_t.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>$t(_t.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>$t(_t.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>$t(_t.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Ni(_t.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Ni(_t.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Ni(_t.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Ni(_t.errorCodes.provider.disconnected,t),chainDisconnected:t=>Ni(_t.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ec.EthereumProviderError(e,r,n)}}};function $t(t,e){const[r,n]=Vh(e);return new ec.EthereumRpcError(t,r||Hh.getMessageFromCode(t),n)}function Ni(t,e){const[r,n]=Vh(e);return new ec.EthereumProviderError(t,r||Hh.getMessageFromCode(t),n)}function Vh(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Br;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Xu;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=So;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Pr;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Ku);var Be={},Eo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(Eo);Object.defineProperty(Be,"__esModule",{value:!0});Be.EthereumAddressFromSignedMessageResponse=Be.SubmitEthereumTransactionResponse=Be.SignEthereumTransactionResponse=Be.SignEthereumMessageResponse=Be.isRequestEthereumAccountsResponse=Be.SelectProviderResponse=Be.WatchAssetReponse=Be.RequestEthereumAccountsResponse=Be.SwitchEthereumChainResponse=Be.AddEthereumChainResponse=Be.isErrorResponse=void 0;const yr=Eo;function $g(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}Be.isErrorResponse=$g;function Dg(t){return{method:yr.Web3Method.addEthereumChain,result:t}}Be.AddEthereumChainResponse=Dg;function Fg(t){return{method:yr.Web3Method.switchEthereumChain,result:t}}Be.SwitchEthereumChainResponse=Fg;function jg(t){return{method:yr.Web3Method.requestEthereumAccounts,result:t}}Be.RequestEthereumAccountsResponse=jg;function Ug(t){return{method:yr.Web3Method.watchAsset,result:t}}Be.WatchAssetReponse=Ug;function Wg(t){return{method:yr.Web3Method.selectProvider,result:t}}Be.SelectProviderResponse=Wg;function Hg(t){return t&&t.method===yr.Web3Method.requestEthereumAccounts}Be.isRequestEthereumAccountsResponse=Hg;function Vg(t){return{method:yr.Web3Method.signEthereumMessage,result:t}}Be.SignEthereumMessageResponse=Vg;function zg(t){return{method:yr.Web3Method.signEthereumTransaction,result:t}}Be.SignEthereumTransactionResponse=zg;function qg(t){return{method:yr.Web3Method.submitEthereumTransaction,result:t}}Be.SubmitEthereumTransactionResponse=qg;function Gg(t){return{method:yr.Web3Method.ethereumAddressFromSignedMessage,result:t}}Be.EthereumAddressFromSignedMessageResponse=Gg;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});_i.LIB_VERSION=void 0;_i.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Ku,r=Be,n=_i;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(p){return p!==void 0?(0,e.getMessageFromCode)(p):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(p="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${p}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(p,g){const m=(0,e.serializeError)(o(p),{shouldIncludeStack:!0}),C=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");C.searchParams.set("version",n.LIB_VERSION),C.searchParams.set("code",m.code.toString());const T=a(m.data,g);return T&&C.searchParams.set("method",T),C.searchParams.set("message",m.message),Object.assign(Object.assign({},m),{docUrl:C.href})}t.serializeError=s;function o(p){return typeof p=="string"?{message:p,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(p)?Object.assign(Object.assign({},p),{message:p.errorMessage,code:p.errorCode,data:{method:p.method,result:p.result}}):p}function a(p,g){var m;const C=(m=p)===null||m===void 0?void 0:m.method;if(C)return C;if(g!==void 0)return typeof g=="string"?g:Array.isArray(g)?g.length>0?g[0].method:void 0:g.method}function u(p){var g;if(typeof p=="number")return p;if(l(p))return(g=p.code)!==null&&g!==void 0?g:p.errorCode}t.getErrorCode=u;function l(p){return typeof p=="object"&&p!==null&&(typeof p.code=="number"||typeof p.errorCode=="number")}})(ns);var Si={},zh={exports:{}},wu={exports:{}};typeof Object.create=="function"?wu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wu.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var er=wu.exports,_u={exports:{}},is={},xo={};xo.byteLength=Qg;xo.toByteArray=Kg;xo.fromByteArray=ty;var lr=[],jt=[],Jg=typeof Uint8Array<"u"?Uint8Array:Array,Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Dn=0,Zg=Ra.length;Dn<Zg;++Dn)lr[Dn]=Ra[Dn],jt[Ra.charCodeAt(Dn)]=Dn;jt["-".charCodeAt(0)]=62;jt["_".charCodeAt(0)]=63;function qh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Qg(t){var e=qh(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Yg(t,e,r){return(e+r)*3/4-r}function Kg(t){var e,r=qh(t),n=r[0],i=r[1],s=new Jg(Yg(t,n,i)),o=0,a=i>0?n-4:n,u;for(u=0;u<a;u+=4)e=jt[t.charCodeAt(u)]<<18|jt[t.charCodeAt(u+1)]<<12|jt[t.charCodeAt(u+2)]<<6|jt[t.charCodeAt(u+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=jt[t.charCodeAt(u)]<<2|jt[t.charCodeAt(u+1)]>>4,s[o++]=e&255),i===1&&(e=jt[t.charCodeAt(u)]<<10|jt[t.charCodeAt(u+1)]<<4|jt[t.charCodeAt(u+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function Xg(t){return lr[t>>18&63]+lr[t>>12&63]+lr[t>>6&63]+lr[t&63]}function ey(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(Xg(n));return i.join("")}function ty(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(ey(t,o,o+s>a?a:o+s));return n===1?(e=t[r-1],i.push(lr[e>>2]+lr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(lr[e>>10]+lr[e>>4&63]+lr[e<<2&63]+"=")),i.join("")}var tc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */tc.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,u=(1<<a)-1,l=u>>1,p=-7,g=r?i-1:0,m=r?-1:1,C=t[e+g];for(g+=m,s=C&(1<<-p)-1,C>>=-p,p+=a;p>0;s=s*256+t[e+g],g+=m,p-=8);for(o=s&(1<<-p)-1,s>>=-p,p+=n;p>0;o=o*256+t[e+g],g+=m,p-=8);if(s===0)s=1-l;else{if(s===u)return o?NaN:(C?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(C?-1:1)*o*Math.pow(2,s-n)};tc.write=function(t,e,r,n,i,s){var o,a,u,l=s*8-i-1,p=(1<<l)-1,g=p>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:s-1,T=n?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=p):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+g>=1?e+=m/u:e+=m*Math.pow(2,1-g),e*u>=2&&(o++,u/=2),o+g>=p?(a=0,o=p):o+g>=1?(a=(e*u-1)*Math.pow(2,i),o=o+g):(a=e*Math.pow(2,g-1)*Math.pow(2,i),o=0));i>=8;t[r+C]=a&255,C+=T,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+C]=o&255,C+=T,o/=256,l-=8);t[r+C-T]|=P*128};/*!
|
|
1
|
+
import{e as Zu,r as yo,c as te,g as mi,_ as J,a as bo,b as xg}from"./index-401f0eba.js";function Mg(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Qu={},Zi={},vo={};Object.defineProperty(vo,"__esModule",{value:!0});vo.walletLogo=void 0;const Cg=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};vo.walletLogo=Cg;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.LINK_API_URL=void 0;mo.LINK_API_URL="https://www.walletlink.org";var wo={};Object.defineProperty(wo,"__esModule",{value:!0});wo.ScopedLocalStorage=void 0;class Ig{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){const e=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(e)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}}wo.ScopedLocalStorage=Ig;var ni={},_n={};Object.defineProperty(_n,"__esModule",{value:!0});const Rg=Zu;function fl(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function Ag(t){const e=t.length,r=new Array(e);for(let n=0;n<e;n+=1)r[n]=t[n];return r}let Tg=class extends Rg.EventEmitter{emit(e,...r){let n=e==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let o;if(r.length>0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const s=i[e];if(s===void 0)return!1;if(typeof s=="function")fl(s,this,r);else{const o=s.length,a=Ag(s);for(let u=0;u<o;u+=1)fl(a[u],this,r)}return!0}};_n.default=Tg;var Yu={exports:{}};Yu.exports;(function(t){(function(e,r){function n(w,c){if(!w)throw new Error(c||"Assertion failed")}function i(w,c){w.super_=c;var y=function(){};y.prototype=c.prototype,w.prototype=new y,w.prototype.constructor=w}function s(w,c,y){if(s.isBN(w))return w;this.negative=0,this.words=null,this.length=0,this.red=null,w!==null&&((c==="le"||c==="be")&&(y=c,c=10),this._init(w||0,c||10,y||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=yo.Buffer}catch{}s.isBN=function(c){return c instanceof s?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===s.wordSize&&Array.isArray(c.words)},s.max=function(c,y){return c.cmp(y)>0?c:y},s.min=function(c,y){return c.cmp(y)<0?c:y},s.prototype._init=function(c,y,v){if(typeof c=="number")return this._initNumber(c,y,v);if(typeof c=="object")return this._initArray(c,y,v);y==="hex"&&(y=16),n(y===(y|0)&&y>=2&&y<=36),c=c.toString().replace(/\s+/g,"");var S=0;c[0]==="-"&&(S++,this.negative=1),S<c.length&&(y===16?this._parseHex(c,S,v):(this._parseBase(c,y,S),v==="le"&&this._initArray(this.toArray(),y,v)))},s.prototype._initNumber=function(c,y,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(n(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),y,v)},s.prototype._initArray=function(c,y,v){if(n(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var E,k,L=0;if(v==="be")for(S=c.length-1,E=0;S>=0;S-=3)k=c[S]|c[S-1]<<8|c[S-2]<<16,this.words[E]|=k<<L&67108863,this.words[E+1]=k>>>26-L&67108863,L+=24,L>=26&&(L-=26,E++);else if(v==="le")for(S=0,E=0;S<c.length;S+=3)k=c[S]|c[S+1]<<8|c[S+2]<<16,this.words[E]|=k<<L&67108863,this.words[E+1]=k>>>26-L&67108863,L+=24,L>=26&&(L-=26,E++);return this._strip()};function a(w,c){var y=w.charCodeAt(c);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;n(!1,"Invalid character in "+w)}function u(w,c,y){var v=a(w,y);return y-1>=c&&(v|=a(w,y-1)<<4),v}s.prototype._parseHex=function(c,y,v){this.length=Math.ceil((c.length-y)/6),this.words=new Array(this.length);for(var S=0;S<this.length;S++)this.words[S]=0;var E=0,k=0,L;if(v==="be")for(S=c.length-1;S>=y;S-=2)L=u(c,y,S)<<E,this.words[k]|=L&67108863,E>=18?(E-=18,k+=1,this.words[k]|=L>>>26):E+=8;else{var _=c.length-y;for(S=_%2===0?y+1:y;S<c.length;S+=2)L=u(c,y,S)<<E,this.words[k]|=L&67108863,E>=18?(E-=18,k+=1,this.words[k]|=L>>>26):E+=8}this._strip()};function l(w,c,y,v){for(var S=0,E=0,k=Math.min(w.length,y),L=c;L<k;L++){var _=w.charCodeAt(L)-48;S*=v,_>=49?E=_-49+10:_>=17?E=_-17+10:E=_,n(_>=0&&E<v,"Invalid character"),S+=E}return S}s.prototype._parseBase=function(c,y,v){this.words=[0],this.length=1;for(var S=0,E=1;E<=67108863;E*=y)S++;S--,E=E/y|0;for(var k=c.length-v,L=k%S,_=Math.min(k,k-L)+v,d=0,A=v;A<_;A+=S)d=l(c,A,A+S,y),this.imuln(E),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(L!==0){var Y=1;for(d=l(c,A,c.length,y),A=0;A<L;A++)Y*=y;this.imuln(Y),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this._strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var y=0;y<this.length;y++)c.words[y]=this.words[y];c.length=this.length,c.negative=this.negative,c.red=this.red};function p(w,c){w.words=c.words,w.length=c.length,w.negative=c.negative,w.red=c.red}if(s.prototype._move=function(c){p(c,this)},s.prototype.clone=function(){var c=new s(null);return this.copy(c),c},s.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{s.prototype.inspect=g}else s.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],C=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(c,y){c=c||10,y=y|0||1;var v;if(c===16||c==="hex"){v="";for(var S=0,E=0,k=0;k<this.length;k++){var L=this.words[k],_=((L<<S|E)&16777215).toString(16);E=L>>>24-S&16777215,S+=2,S>=26&&(S-=26,k--),E!==0||k!==this.length-1?v=m[6-_.length]+_+v:v=_+v}for(E!==0&&(v=E.toString(16)+v);v.length%y!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var d=C[c],A=T[c];v="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var ee=Y.modrn(A).toString(c);Y=Y.idivn(A),Y.isZero()?v=ee+v:v=m[d-ee.length]+ee+v}for(this.isZero()&&(v="0"+v);v.length%y!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(c,y){return this.toArrayLike(o,c,y)}),s.prototype.toArray=function(c,y){return this.toArrayLike(Array,c,y)};var P=function(c,y){return c.allocUnsafe?c.allocUnsafe(y):new c(y)};s.prototype.toArrayLike=function(c,y,v){this._strip();var S=this.byteLength(),E=v||Math.max(1,S);n(S<=E,"byte array longer than desired length"),n(E>0,"Requested array length <= 0");var k=P(c,E),L=y==="le"?"LE":"BE";return this["_toArrayLike"+L](k,S),k},s.prototype._toArrayLikeLE=function(c,y){for(var v=0,S=0,E=0,k=0;E<this.length;E++){var L=this.words[E]<<k|S;c[v++]=L&255,v<c.length&&(c[v++]=L>>8&255),v<c.length&&(c[v++]=L>>16&255),k===6?(v<c.length&&(c[v++]=L>>24&255),S=0,k=0):(S=L>>>24,k+=2)}if(v<c.length)for(c[v++]=S;v<c.length;)c[v++]=0},s.prototype._toArrayLikeBE=function(c,y){for(var v=c.length-1,S=0,E=0,k=0;E<this.length;E++){var L=this.words[E]<<k|S;c[v--]=L&255,v>=0&&(c[v--]=L>>8&255),v>=0&&(c[v--]=L>>16&255),k===6?(v>=0&&(c[v--]=L>>24&255),S=0,k=0):(S=L>>>24,k+=2)}if(v>=0)for(c[v--]=S;v>=0;)c[v--]=0},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var y=c,v=0;return y>=4096&&(v+=13,y>>>=13),y>=64&&(v+=7,y>>>=7),y>=8&&(v+=4,y>>>=4),y>=2&&(v+=2,y>>>=2),v+y},s.prototype._zeroBits=function(c){if(c===0)return 26;var y=c,v=0;return y&8191||(v+=13,y>>>=13),y&127||(v+=7,y>>>=7),y&15||(v+=4,y>>>=4),y&3||(v+=2,y>>>=2),y&1||v++,v},s.prototype.bitLength=function(){var c=this.words[this.length-1],y=this._countBits(c);return(this.length-1)*26+y};function U(w){for(var c=new Array(w.bitLength()),y=0;y<c.length;y++){var v=y/26|0,S=y%26;c[y]=w.words[v]>>>S&1}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,y=0;y<this.length;y++){var v=this._zeroBits(this.words[y]);if(c+=v,v!==26)break}return c},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},s.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var y=0;y<c.length;y++)this.words[y]=this.words[y]|c.words[y];return this._strip()},s.prototype.ior=function(c){return n((this.negative|c.negative)===0),this.iuor(c)},s.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},s.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},s.prototype.iuand=function(c){var y;this.length>c.length?y=c:y=this;for(var v=0;v<y.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=y.length,this._strip()},s.prototype.iand=function(c){return n((this.negative|c.negative)===0),this.iuand(c)},s.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},s.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},s.prototype.iuxor=function(c){var y,v;this.length>c.length?(y=this,v=c):(y=c,v=this);for(var S=0;S<v.length;S++)this.words[S]=y.words[S]^v.words[S];if(this!==y)for(;S<y.length;S++)this.words[S]=y.words[S];return this.length=y.length,this._strip()},s.prototype.ixor=function(c){return n((this.negative|c.negative)===0),this.iuxor(c)},s.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},s.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},s.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var y=Math.ceil(c/26)|0,v=c%26;this._expand(y),v>0&&y--;for(var S=0;S<y;S++)this.words[S]=~this.words[S]&67108863;return v>0&&(this.words[S]=~this.words[S]&67108863>>26-v),this._strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,y){n(typeof c=="number"&&c>=0);var v=c/26|0,S=c%26;return this._expand(v+1),y?this.words[v]=this.words[v]|1<<S:this.words[v]=this.words[v]&~(1<<S),this._strip()},s.prototype.iadd=function(c){var y;if(this.negative!==0&&c.negative===0)return this.negative=0,y=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,y=this.isub(c),c.negative=1,y._normSign();var v,S;this.length>c.length?(v=this,S=c):(v=c,S=this);for(var E=0,k=0;k<S.length;k++)y=(v.words[k]|0)+(S.words[k]|0)+E,this.words[k]=y&67108863,E=y>>>26;for(;E!==0&&k<v.length;k++)y=(v.words[k]|0)+E,this.words[k]=y&67108863,E=y>>>26;if(this.length=v.length,E!==0)this.words[this.length]=E,this.length++;else if(v!==this)for(;k<v.length;k++)this.words[k]=v.words[k];return this},s.prototype.add=function(c){var y;return c.negative!==0&&this.negative===0?(c.negative=0,y=this.sub(c),c.negative^=1,y):c.negative===0&&this.negative!==0?(this.negative=0,y=c.sub(this),this.negative=1,y):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},s.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var y=this.iadd(c);return c.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,E;v>0?(S=this,E=c):(S=c,E=this);for(var k=0,L=0;L<E.length;L++)y=(S.words[L]|0)-(E.words[L]|0)+k,k=y>>26,this.words[L]=y&67108863;for(;k!==0&&L<S.length;L++)y=(S.words[L]|0)+k,k=y>>26,this.words[L]=y&67108863;if(k===0&&L<S.length&&S!==this)for(;L<S.length;L++)this.words[L]=S.words[L];return this.length=Math.max(this.length,L),S!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function M(w,c,y){y.negative=c.negative^w.negative;var v=w.length+c.length|0;y.length=v,v=v-1|0;var S=w.words[0]|0,E=c.words[0]|0,k=S*E,L=k&67108863,_=k/67108864|0;y.words[0]=L;for(var d=1;d<v;d++){for(var A=_>>>26,Y=_&67108863,ee=Math.min(d,c.length-1),N=Math.max(0,d-w.length+1);N<=ee;N++){var $=d-N|0;S=w.words[$]|0,E=c.words[N]|0,k=S*E+Y,A+=k/67108864|0,Y=k&67108863}y.words[d]=Y|0,_=A|0}return _!==0?y.words[d]=_|0:y.length--,y._strip()}var O=function(c,y,v){var S=c.words,E=y.words,k=v.words,L=0,_,d,A,Y=S[0]|0,ee=Y&8191,N=Y>>>13,$=S[1]|0,V=$&8191,Q=$>>>13,ge=S[2]|0,I=ge&8191,R=ge>>>13,q=S[3]|0,Z=q&8191,fe=q>>>13,ye=S[4]|0,ae=ye&8191,xe=ye>>>13,Pt=S[5]|0,Te=Pt&8191,Re=Pt>>>13,ut=S[6]|0,Ce=ut&8191,ke=ut>>>13,ft=S[7]|0,Ie=ft&8191,b=ft>>>13,f=S[8]|0,h=f&8191,x=f>>>13,B=S[9]|0,F=B&8191,H=B>>>13,de=E[0]|0,he=de&8191,ce=de>>>13,Oe=E[1]|0,ue=Oe&8191,Pe=Oe>>>13,Tn=E[2]|0,$e=Tn&8191,De=Tn>>>13,kn=E[3]|0,Fe=kn&8191,je=kn>>>13,On=E[4]|0,Ue=On&8191,We=On>>>13,Nn=E[5]|0,He=Nn&8191,Ve=Nn>>>13,Ln=E[6]|0,ze=Ln&8191,qe=Ln>>>13,Bn=E[7]|0,Ge=Bn&8191,Je=Bn>>>13,Pn=E[8]|0,Ze=Pn&8191,Qe=Pn>>>13,$n=E[9]|0,Ye=$n&8191,Ke=$n>>>13;v.negative=c.negative^y.negative,v.length=19,_=Math.imul(ee,he),d=Math.imul(ee,ce),d=d+Math.imul(N,he)|0,A=Math.imul(N,ce);var Wr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(V,he),d=Math.imul(V,ce),d=d+Math.imul(Q,he)|0,A=Math.imul(Q,ce),_=_+Math.imul(ee,ue)|0,d=d+Math.imul(ee,Pe)|0,d=d+Math.imul(N,ue)|0,A=A+Math.imul(N,Pe)|0;var Hr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,_=Math.imul(I,he),d=Math.imul(I,ce),d=d+Math.imul(R,he)|0,A=Math.imul(R,ce),_=_+Math.imul(V,ue)|0,d=d+Math.imul(V,Pe)|0,d=d+Math.imul(Q,ue)|0,A=A+Math.imul(Q,Pe)|0,_=_+Math.imul(ee,$e)|0,d=d+Math.imul(ee,De)|0,d=d+Math.imul(N,$e)|0,A=A+Math.imul(N,De)|0;var Vr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(Z,he),d=Math.imul(Z,ce),d=d+Math.imul(fe,he)|0,A=Math.imul(fe,ce),_=_+Math.imul(I,ue)|0,d=d+Math.imul(I,Pe)|0,d=d+Math.imul(R,ue)|0,A=A+Math.imul(R,Pe)|0,_=_+Math.imul(V,$e)|0,d=d+Math.imul(V,De)|0,d=d+Math.imul(Q,$e)|0,A=A+Math.imul(Q,De)|0,_=_+Math.imul(ee,Fe)|0,d=d+Math.imul(ee,je)|0,d=d+Math.imul(N,Fe)|0,A=A+Math.imul(N,je)|0;var zr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(ae,he),d=Math.imul(ae,ce),d=d+Math.imul(xe,he)|0,A=Math.imul(xe,ce),_=_+Math.imul(Z,ue)|0,d=d+Math.imul(Z,Pe)|0,d=d+Math.imul(fe,ue)|0,A=A+Math.imul(fe,Pe)|0,_=_+Math.imul(I,$e)|0,d=d+Math.imul(I,De)|0,d=d+Math.imul(R,$e)|0,A=A+Math.imul(R,De)|0,_=_+Math.imul(V,Fe)|0,d=d+Math.imul(V,je)|0,d=d+Math.imul(Q,Fe)|0,A=A+Math.imul(Q,je)|0,_=_+Math.imul(ee,Ue)|0,d=d+Math.imul(ee,We)|0,d=d+Math.imul(N,Ue)|0,A=A+Math.imul(N,We)|0;var qr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(qr>>>26)|0,qr&=67108863,_=Math.imul(Te,he),d=Math.imul(Te,ce),d=d+Math.imul(Re,he)|0,A=Math.imul(Re,ce),_=_+Math.imul(ae,ue)|0,d=d+Math.imul(ae,Pe)|0,d=d+Math.imul(xe,ue)|0,A=A+Math.imul(xe,Pe)|0,_=_+Math.imul(Z,$e)|0,d=d+Math.imul(Z,De)|0,d=d+Math.imul(fe,$e)|0,A=A+Math.imul(fe,De)|0,_=_+Math.imul(I,Fe)|0,d=d+Math.imul(I,je)|0,d=d+Math.imul(R,Fe)|0,A=A+Math.imul(R,je)|0,_=_+Math.imul(V,Ue)|0,d=d+Math.imul(V,We)|0,d=d+Math.imul(Q,Ue)|0,A=A+Math.imul(Q,We)|0,_=_+Math.imul(ee,He)|0,d=d+Math.imul(ee,Ve)|0,d=d+Math.imul(N,He)|0,A=A+Math.imul(N,Ve)|0;var Gr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(Ce,he),d=Math.imul(Ce,ce),d=d+Math.imul(ke,he)|0,A=Math.imul(ke,ce),_=_+Math.imul(Te,ue)|0,d=d+Math.imul(Te,Pe)|0,d=d+Math.imul(Re,ue)|0,A=A+Math.imul(Re,Pe)|0,_=_+Math.imul(ae,$e)|0,d=d+Math.imul(ae,De)|0,d=d+Math.imul(xe,$e)|0,A=A+Math.imul(xe,De)|0,_=_+Math.imul(Z,Fe)|0,d=d+Math.imul(Z,je)|0,d=d+Math.imul(fe,Fe)|0,A=A+Math.imul(fe,je)|0,_=_+Math.imul(I,Ue)|0,d=d+Math.imul(I,We)|0,d=d+Math.imul(R,Ue)|0,A=A+Math.imul(R,We)|0,_=_+Math.imul(V,He)|0,d=d+Math.imul(V,Ve)|0,d=d+Math.imul(Q,He)|0,A=A+Math.imul(Q,Ve)|0,_=_+Math.imul(ee,ze)|0,d=d+Math.imul(ee,qe)|0,d=d+Math.imul(N,ze)|0,A=A+Math.imul(N,qe)|0;var Jr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(Ie,he),d=Math.imul(Ie,ce),d=d+Math.imul(b,he)|0,A=Math.imul(b,ce),_=_+Math.imul(Ce,ue)|0,d=d+Math.imul(Ce,Pe)|0,d=d+Math.imul(ke,ue)|0,A=A+Math.imul(ke,Pe)|0,_=_+Math.imul(Te,$e)|0,d=d+Math.imul(Te,De)|0,d=d+Math.imul(Re,$e)|0,A=A+Math.imul(Re,De)|0,_=_+Math.imul(ae,Fe)|0,d=d+Math.imul(ae,je)|0,d=d+Math.imul(xe,Fe)|0,A=A+Math.imul(xe,je)|0,_=_+Math.imul(Z,Ue)|0,d=d+Math.imul(Z,We)|0,d=d+Math.imul(fe,Ue)|0,A=A+Math.imul(fe,We)|0,_=_+Math.imul(I,He)|0,d=d+Math.imul(I,Ve)|0,d=d+Math.imul(R,He)|0,A=A+Math.imul(R,Ve)|0,_=_+Math.imul(V,ze)|0,d=d+Math.imul(V,qe)|0,d=d+Math.imul(Q,ze)|0,A=A+Math.imul(Q,qe)|0,_=_+Math.imul(ee,Ge)|0,d=d+Math.imul(ee,Je)|0,d=d+Math.imul(N,Ge)|0,A=A+Math.imul(N,Je)|0;var Zr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(h,he),d=Math.imul(h,ce),d=d+Math.imul(x,he)|0,A=Math.imul(x,ce),_=_+Math.imul(Ie,ue)|0,d=d+Math.imul(Ie,Pe)|0,d=d+Math.imul(b,ue)|0,A=A+Math.imul(b,Pe)|0,_=_+Math.imul(Ce,$e)|0,d=d+Math.imul(Ce,De)|0,d=d+Math.imul(ke,$e)|0,A=A+Math.imul(ke,De)|0,_=_+Math.imul(Te,Fe)|0,d=d+Math.imul(Te,je)|0,d=d+Math.imul(Re,Fe)|0,A=A+Math.imul(Re,je)|0,_=_+Math.imul(ae,Ue)|0,d=d+Math.imul(ae,We)|0,d=d+Math.imul(xe,Ue)|0,A=A+Math.imul(xe,We)|0,_=_+Math.imul(Z,He)|0,d=d+Math.imul(Z,Ve)|0,d=d+Math.imul(fe,He)|0,A=A+Math.imul(fe,Ve)|0,_=_+Math.imul(I,ze)|0,d=d+Math.imul(I,qe)|0,d=d+Math.imul(R,ze)|0,A=A+Math.imul(R,qe)|0,_=_+Math.imul(V,Ge)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(Q,Ge)|0,A=A+Math.imul(Q,Je)|0,_=_+Math.imul(ee,Ze)|0,d=d+Math.imul(ee,Qe)|0,d=d+Math.imul(N,Ze)|0,A=A+Math.imul(N,Qe)|0;var Qr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(F,he),d=Math.imul(F,ce),d=d+Math.imul(H,he)|0,A=Math.imul(H,ce),_=_+Math.imul(h,ue)|0,d=d+Math.imul(h,Pe)|0,d=d+Math.imul(x,ue)|0,A=A+Math.imul(x,Pe)|0,_=_+Math.imul(Ie,$e)|0,d=d+Math.imul(Ie,De)|0,d=d+Math.imul(b,$e)|0,A=A+Math.imul(b,De)|0,_=_+Math.imul(Ce,Fe)|0,d=d+Math.imul(Ce,je)|0,d=d+Math.imul(ke,Fe)|0,A=A+Math.imul(ke,je)|0,_=_+Math.imul(Te,Ue)|0,d=d+Math.imul(Te,We)|0,d=d+Math.imul(Re,Ue)|0,A=A+Math.imul(Re,We)|0,_=_+Math.imul(ae,He)|0,d=d+Math.imul(ae,Ve)|0,d=d+Math.imul(xe,He)|0,A=A+Math.imul(xe,Ve)|0,_=_+Math.imul(Z,ze)|0,d=d+Math.imul(Z,qe)|0,d=d+Math.imul(fe,ze)|0,A=A+Math.imul(fe,qe)|0,_=_+Math.imul(I,Ge)|0,d=d+Math.imul(I,Je)|0,d=d+Math.imul(R,Ge)|0,A=A+Math.imul(R,Je)|0,_=_+Math.imul(V,Ze)|0,d=d+Math.imul(V,Qe)|0,d=d+Math.imul(Q,Ze)|0,A=A+Math.imul(Q,Qe)|0,_=_+Math.imul(ee,Ye)|0,d=d+Math.imul(ee,Ke)|0,d=d+Math.imul(N,Ye)|0,A=A+Math.imul(N,Ke)|0;var Yr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(F,ue),d=Math.imul(F,Pe),d=d+Math.imul(H,ue)|0,A=Math.imul(H,Pe),_=_+Math.imul(h,$e)|0,d=d+Math.imul(h,De)|0,d=d+Math.imul(x,$e)|0,A=A+Math.imul(x,De)|0,_=_+Math.imul(Ie,Fe)|0,d=d+Math.imul(Ie,je)|0,d=d+Math.imul(b,Fe)|0,A=A+Math.imul(b,je)|0,_=_+Math.imul(Ce,Ue)|0,d=d+Math.imul(Ce,We)|0,d=d+Math.imul(ke,Ue)|0,A=A+Math.imul(ke,We)|0,_=_+Math.imul(Te,He)|0,d=d+Math.imul(Te,Ve)|0,d=d+Math.imul(Re,He)|0,A=A+Math.imul(Re,Ve)|0,_=_+Math.imul(ae,ze)|0,d=d+Math.imul(ae,qe)|0,d=d+Math.imul(xe,ze)|0,A=A+Math.imul(xe,qe)|0,_=_+Math.imul(Z,Ge)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(fe,Ge)|0,A=A+Math.imul(fe,Je)|0,_=_+Math.imul(I,Ze)|0,d=d+Math.imul(I,Qe)|0,d=d+Math.imul(R,Ze)|0,A=A+Math.imul(R,Qe)|0,_=_+Math.imul(V,Ye)|0,d=d+Math.imul(V,Ke)|0,d=d+Math.imul(Q,Ye)|0,A=A+Math.imul(Q,Ke)|0;var Kr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(F,$e),d=Math.imul(F,De),d=d+Math.imul(H,$e)|0,A=Math.imul(H,De),_=_+Math.imul(h,Fe)|0,d=d+Math.imul(h,je)|0,d=d+Math.imul(x,Fe)|0,A=A+Math.imul(x,je)|0,_=_+Math.imul(Ie,Ue)|0,d=d+Math.imul(Ie,We)|0,d=d+Math.imul(b,Ue)|0,A=A+Math.imul(b,We)|0,_=_+Math.imul(Ce,He)|0,d=d+Math.imul(Ce,Ve)|0,d=d+Math.imul(ke,He)|0,A=A+Math.imul(ke,Ve)|0,_=_+Math.imul(Te,ze)|0,d=d+Math.imul(Te,qe)|0,d=d+Math.imul(Re,ze)|0,A=A+Math.imul(Re,qe)|0,_=_+Math.imul(ae,Ge)|0,d=d+Math.imul(ae,Je)|0,d=d+Math.imul(xe,Ge)|0,A=A+Math.imul(xe,Je)|0,_=_+Math.imul(Z,Ze)|0,d=d+Math.imul(Z,Qe)|0,d=d+Math.imul(fe,Ze)|0,A=A+Math.imul(fe,Qe)|0,_=_+Math.imul(I,Ye)|0,d=d+Math.imul(I,Ke)|0,d=d+Math.imul(R,Ye)|0,A=A+Math.imul(R,Ke)|0;var Xr=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(F,Fe),d=Math.imul(F,je),d=d+Math.imul(H,Fe)|0,A=Math.imul(H,je),_=_+Math.imul(h,Ue)|0,d=d+Math.imul(h,We)|0,d=d+Math.imul(x,Ue)|0,A=A+Math.imul(x,We)|0,_=_+Math.imul(Ie,He)|0,d=d+Math.imul(Ie,Ve)|0,d=d+Math.imul(b,He)|0,A=A+Math.imul(b,Ve)|0,_=_+Math.imul(Ce,ze)|0,d=d+Math.imul(Ce,qe)|0,d=d+Math.imul(ke,ze)|0,A=A+Math.imul(ke,qe)|0,_=_+Math.imul(Te,Ge)|0,d=d+Math.imul(Te,Je)|0,d=d+Math.imul(Re,Ge)|0,A=A+Math.imul(Re,Je)|0,_=_+Math.imul(ae,Ze)|0,d=d+Math.imul(ae,Qe)|0,d=d+Math.imul(xe,Ze)|0,A=A+Math.imul(xe,Qe)|0,_=_+Math.imul(Z,Ye)|0,d=d+Math.imul(Z,Ke)|0,d=d+Math.imul(fe,Ye)|0,A=A+Math.imul(fe,Ke)|0;var en=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(en>>>26)|0,en&=67108863,_=Math.imul(F,Ue),d=Math.imul(F,We),d=d+Math.imul(H,Ue)|0,A=Math.imul(H,We),_=_+Math.imul(h,He)|0,d=d+Math.imul(h,Ve)|0,d=d+Math.imul(x,He)|0,A=A+Math.imul(x,Ve)|0,_=_+Math.imul(Ie,ze)|0,d=d+Math.imul(Ie,qe)|0,d=d+Math.imul(b,ze)|0,A=A+Math.imul(b,qe)|0,_=_+Math.imul(Ce,Ge)|0,d=d+Math.imul(Ce,Je)|0,d=d+Math.imul(ke,Ge)|0,A=A+Math.imul(ke,Je)|0,_=_+Math.imul(Te,Ze)|0,d=d+Math.imul(Te,Qe)|0,d=d+Math.imul(Re,Ze)|0,A=A+Math.imul(Re,Qe)|0,_=_+Math.imul(ae,Ye)|0,d=d+Math.imul(ae,Ke)|0,d=d+Math.imul(xe,Ye)|0,A=A+Math.imul(xe,Ke)|0;var tn=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(tn>>>26)|0,tn&=67108863,_=Math.imul(F,He),d=Math.imul(F,Ve),d=d+Math.imul(H,He)|0,A=Math.imul(H,Ve),_=_+Math.imul(h,ze)|0,d=d+Math.imul(h,qe)|0,d=d+Math.imul(x,ze)|0,A=A+Math.imul(x,qe)|0,_=_+Math.imul(Ie,Ge)|0,d=d+Math.imul(Ie,Je)|0,d=d+Math.imul(b,Ge)|0,A=A+Math.imul(b,Je)|0,_=_+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,Qe)|0,d=d+Math.imul(ke,Ze)|0,A=A+Math.imul(ke,Qe)|0,_=_+Math.imul(Te,Ye)|0,d=d+Math.imul(Te,Ke)|0,d=d+Math.imul(Re,Ye)|0,A=A+Math.imul(Re,Ke)|0;var Ea=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ea>>>26)|0,Ea&=67108863,_=Math.imul(F,ze),d=Math.imul(F,qe),d=d+Math.imul(H,ze)|0,A=Math.imul(H,qe),_=_+Math.imul(h,Ge)|0,d=d+Math.imul(h,Je)|0,d=d+Math.imul(x,Ge)|0,A=A+Math.imul(x,Je)|0,_=_+Math.imul(Ie,Ze)|0,d=d+Math.imul(Ie,Qe)|0,d=d+Math.imul(b,Ze)|0,A=A+Math.imul(b,Qe)|0,_=_+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,Ke)|0,d=d+Math.imul(ke,Ye)|0,A=A+Math.imul(ke,Ke)|0;var xa=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(xa>>>26)|0,xa&=67108863,_=Math.imul(F,Ge),d=Math.imul(F,Je),d=d+Math.imul(H,Ge)|0,A=Math.imul(H,Je),_=_+Math.imul(h,Ze)|0,d=d+Math.imul(h,Qe)|0,d=d+Math.imul(x,Ze)|0,A=A+Math.imul(x,Qe)|0,_=_+Math.imul(Ie,Ye)|0,d=d+Math.imul(Ie,Ke)|0,d=d+Math.imul(b,Ye)|0,A=A+Math.imul(b,Ke)|0;var Ma=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,_=Math.imul(F,Ze),d=Math.imul(F,Qe),d=d+Math.imul(H,Ze)|0,A=Math.imul(H,Qe),_=_+Math.imul(h,Ye)|0,d=d+Math.imul(h,Ke)|0,d=d+Math.imul(x,Ye)|0,A=A+Math.imul(x,Ke)|0;var Ca=(L+_|0)+((d&8191)<<13)|0;L=(A+(d>>>13)|0)+(Ca>>>26)|0,Ca&=67108863,_=Math.imul(F,Ye),d=Math.imul(F,Ke),d=d+Math.imul(H,Ye)|0,A=Math.imul(H,Ke);var Ia=(L+_|0)+((d&8191)<<13)|0;return L=(A+(d>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,k[0]=Wr,k[1]=Hr,k[2]=Vr,k[3]=zr,k[4]=qr,k[5]=Gr,k[6]=Jr,k[7]=Zr,k[8]=Qr,k[9]=Yr,k[10]=Kr,k[11]=Xr,k[12]=en,k[13]=tn,k[14]=Ea,k[15]=xa,k[16]=Ma,k[17]=Ca,k[18]=Ia,L!==0&&(k[19]=L,v.length++),v};Math.imul||(O=M);function D(w,c,y){y.negative=c.negative^w.negative,y.length=w.length+c.length;for(var v=0,S=0,E=0;E<y.length-1;E++){var k=S;S=0;for(var L=v&67108863,_=Math.min(E,c.length-1),d=Math.max(0,E-w.length+1);d<=_;d++){var A=E-d,Y=w.words[A]|0,ee=c.words[d]|0,N=Y*ee,$=N&67108863;k=k+(N/67108864|0)|0,$=$+L|0,L=$&67108863,k=k+($>>>26)|0,S+=k>>>26,k&=67108863}y.words[E]=L,v=k,k=S}return v!==0?y.words[E]=v:y.length--,y._strip()}function W(w,c,y){return D(w,c,y)}s.prototype.mulTo=function(c,y){var v,S=this.length+c.length;return this.length===10&&c.length===10?v=O(this,c,y):S<63?v=M(this,c,y):S<1024?v=D(this,c,y):v=W(this,c,y),v},s.prototype.mul=function(c){var y=new s(null);return y.words=new Array(this.length+c.length),this.mulTo(c,y)},s.prototype.mulf=function(c){var y=new s(null);return y.words=new Array(this.length+c.length),W(this,c,y)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){var y=c<0;y&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var v=0,S=0;S<this.length;S++){var E=(this.words[S]|0)*c,k=(E&67108863)+(v&67108863);v>>=26,v+=E/67108864|0,v+=k>>>26,this.words[S]=k&67108863}return v!==0&&(this.words[S]=v,this.length++),y?this.ineg():this},s.prototype.muln=function(c){return this.clone().imuln(c)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(c){var y=U(c);if(y.length===0)return new s(1);for(var v=this,S=0;S<y.length&&y[S]===0;S++,v=v.sqr());if(++S<y.length)for(var E=v.sqr();S<y.length;S++,E=E.sqr())y[S]!==0&&(v=v.mul(E));return v},s.prototype.iushln=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26,S=67108863>>>26-y<<26-y,E;if(y!==0){var k=0;for(E=0;E<this.length;E++){var L=this.words[E]&S,_=(this.words[E]|0)-L<<y;this.words[E]=_|k,k=L>>>26-y}k&&(this.words[E]=k,this.length++)}if(v!==0){for(E=this.length-1;E>=0;E--)this.words[E+v]=this.words[E];for(E=0;E<v;E++)this.words[E]=0;this.length+=v}return this._strip()},s.prototype.ishln=function(c){return n(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,y,v){n(typeof c=="number"&&c>=0);var S;y?S=(y-y%26)/26:S=0;var E=c%26,k=Math.min((c-E)/26,this.length),L=67108863^67108863>>>E<<E,_=v;if(S-=k,S=Math.max(0,S),_){for(var d=0;d<k;d++)_.words[d]=this.words[d];_.length=k}if(k!==0)if(this.length>k)for(this.length-=k,d=0;d<this.length;d++)this.words[d]=this.words[d+k];else this.words[0]=0,this.length=1;var A=0;for(d=this.length-1;d>=0&&(A!==0||d>=S);d--){var Y=this.words[d]|0;this.words[d]=A<<26-E|Y>>>E,A=Y&L}return _&&A!==0&&(_.words[_.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(c,y,v){return n(this.negative===0),this.iushrn(c,y,v)},s.prototype.shln=function(c){return this.clone().ishln(c)},s.prototype.ushln=function(c){return this.clone().iushln(c)},s.prototype.shrn=function(c){return this.clone().ishrn(c)},s.prototype.ushrn=function(c){return this.clone().iushrn(c)},s.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26,S=1<<y;if(this.length<=v)return!1;var E=this.words[v];return!!(E&S)},s.prototype.imaskn=function(c){n(typeof c=="number"&&c>=0);var y=c%26,v=(c-y)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(y!==0&&v++,this.length=Math.min(v,this.length),y!==0){var S=67108863^67108863>>>y<<y;this.words[this.length-1]&=S}return this._strip()},s.prototype.maskn=function(c){return this.clone().imaskn(c)},s.prototype.iaddn=function(c){return n(typeof c=="number"),n(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<=c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},s.prototype._iaddn=function(c){this.words[0]+=c;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},s.prototype.isubn=function(c){if(n(typeof c=="number"),n(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this._strip()},s.prototype.addn=function(c){return this.clone().iaddn(c)},s.prototype.subn=function(c){return this.clone().isubn(c)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(c,y,v){var S=c.length+v,E;this._expand(S);var k,L=0;for(E=0;E<c.length;E++){k=(this.words[E+v]|0)+L;var _=(c.words[E]|0)*y;k-=_&67108863,L=(k>>26)-(_/67108864|0),this.words[E+v]=k&67108863}for(;E<this.length-v;E++)k=(this.words[E+v]|0)+L,L=k>>26,this.words[E+v]=k&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,E=0;E<this.length;E++)k=-(this.words[E]|0)+L,L=k>>26,this.words[E]=k&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(c,y){var v=this.length-c.length,S=this.clone(),E=c,k=E.words[E.length-1]|0,L=this._countBits(k);v=26-L,v!==0&&(E=E.ushln(v),S.iushln(v),k=E.words[E.length-1]|0);var _=S.length-E.length,d;if(y!=="mod"){d=new s(null),d.length=_+1,d.words=new Array(d.length);for(var A=0;A<d.length;A++)d.words[A]=0}var Y=S.clone()._ishlnsubmul(E,1,_);Y.negative===0&&(S=Y,d&&(d.words[_]=1));for(var ee=_-1;ee>=0;ee--){var N=(S.words[E.length+ee]|0)*67108864+(S.words[E.length+ee-1]|0);for(N=Math.min(N/k|0,67108863),S._ishlnsubmul(E,N,ee);S.negative!==0;)N--,S.negative=0,S._ishlnsubmul(E,1,ee),S.isZero()||(S.negative^=1);d&&(d.words[ee]=N)}return d&&d._strip(),S._strip(),y!=="div"&&v!==0&&S.iushrn(v),{div:d||null,mod:S}},s.prototype.divmod=function(c,y,v){if(n(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var S,E,k;return this.negative!==0&&c.negative===0?(k=this.neg().divmod(c,y),y!=="mod"&&(S=k.div.neg()),y!=="div"&&(E=k.mod.neg(),v&&E.negative!==0&&E.iadd(c)),{div:S,mod:E}):this.negative===0&&c.negative!==0?(k=this.divmod(c.neg(),y),y!=="mod"&&(S=k.div.neg()),{div:S,mod:k.mod}):this.negative&c.negative?(k=this.neg().divmod(c.neg(),y),y!=="div"&&(E=k.mod.neg(),v&&E.negative!==0&&E.isub(c)),{div:k.div,mod:E}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?y==="div"?{div:this.divn(c.words[0]),mod:null}:y==="mod"?{div:null,mod:new s(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new s(this.modrn(c.words[0]))}:this._wordDiv(c,y)},s.prototype.div=function(c){return this.divmod(c,"div",!1).div},s.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},s.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},s.prototype.divRound=function(c){var y=this.divmod(c);if(y.mod.isZero())return y.div;var v=y.div.negative!==0?y.mod.isub(c):y.mod,S=c.ushrn(1),E=c.andln(1),k=v.cmp(S);return k<0||E===1&&k===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},s.prototype.modrn=function(c){var y=c<0;y&&(c=-c),n(c<=67108863);for(var v=(1<<26)%c,S=0,E=this.length-1;E>=0;E--)S=(v*S+(this.words[E]|0))%c;return y?-S:S},s.prototype.modn=function(c){return this.modrn(c)},s.prototype.idivn=function(c){var y=c<0;y&&(c=-c),n(c<=67108863);for(var v=0,S=this.length-1;S>=0;S--){var E=(this.words[S]|0)+v*67108864;this.words[S]=E/c|0,v=E%c}return this._strip(),y?this.ineg():this},s.prototype.divn=function(c){return this.clone().idivn(c)},s.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var y=this,v=c.clone();y.negative!==0?y=y.umod(c):y=y.clone();for(var S=new s(1),E=new s(0),k=new s(0),L=new s(1),_=0;y.isEven()&&v.isEven();)y.iushrn(1),v.iushrn(1),++_;for(var d=v.clone(),A=y.clone();!y.isZero();){for(var Y=0,ee=1;!(y.words[0]&ee)&&Y<26;++Y,ee<<=1);if(Y>0)for(y.iushrn(Y);Y-- >0;)(S.isOdd()||E.isOdd())&&(S.iadd(d),E.isub(A)),S.iushrn(1),E.iushrn(1);for(var N=0,$=1;!(v.words[0]&$)&&N<26;++N,$<<=1);if(N>0)for(v.iushrn(N);N-- >0;)(k.isOdd()||L.isOdd())&&(k.iadd(d),L.isub(A)),k.iushrn(1),L.iushrn(1);y.cmp(v)>=0?(y.isub(v),S.isub(k),E.isub(L)):(v.isub(y),k.isub(S),L.isub(E))}return{a:k,b:L,gcd:v.iushln(_)}},s.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var y=this,v=c.clone();y.negative!==0?y=y.umod(c):y=y.clone();for(var S=new s(1),E=new s(0),k=v.clone();y.cmpn(1)>0&&v.cmpn(1)>0;){for(var L=0,_=1;!(y.words[0]&_)&&L<26;++L,_<<=1);if(L>0)for(y.iushrn(L);L-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);for(var d=0,A=1;!(v.words[0]&A)&&d<26;++d,A<<=1);if(d>0)for(v.iushrn(d);d-- >0;)E.isOdd()&&E.iadd(k),E.iushrn(1);y.cmp(v)>=0?(y.isub(v),S.isub(E)):(v.isub(y),E.isub(S))}var Y;return y.cmpn(1)===0?Y=S:Y=E,Y.cmpn(0)<0&&Y.iadd(c),Y},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var y=this.clone(),v=c.clone();y.negative=0,v.negative=0;for(var S=0;y.isEven()&&v.isEven();S++)y.iushrn(1),v.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;v.isEven();)v.iushrn(1);var E=y.cmp(v);if(E<0){var k=y;y=v,v=k}else if(E===0||v.cmpn(1)===0)break;y.isub(v)}while(!0);return v.iushln(S)},s.prototype.invm=function(c){return this.egcd(c).a.umod(c)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(c){return this.words[0]&c},s.prototype.bincn=function(c){n(typeof c=="number");var y=c%26,v=(c-y)/26,S=1<<y;if(this.length<=v)return this._expand(v+1),this.words[v]|=S,this;for(var E=S,k=v;E!==0&&k<this.length;k++){var L=this.words[k]|0;L+=E,E=L>>>26,L&=67108863,this.words[k]=L}return E!==0&&(this.words[k]=E,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var y=c<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this._strip();var v;if(this.length>1)v=1;else{y&&(c=-c),n(c<=67108863,"Number is too big");var S=this.words[0]|0;v=S===c?0:S<c?-1:1}return this.negative!==0?-v|0:v},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var y=this.ucmp(c);return this.negative!==0?-y|0:y},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var y=0,v=this.length-1;v>=0;v--){var S=this.words[v]|0,E=c.words[v]|0;if(S!==E){S<E?y=-1:S>E&&(y=1);break}}return y},s.prototype.gtn=function(c){return this.cmpn(c)===1},s.prototype.gt=function(c){return this.cmp(c)===1},s.prototype.gten=function(c){return this.cmpn(c)>=0},s.prototype.gte=function(c){return this.cmp(c)>=0},s.prototype.ltn=function(c){return this.cmpn(c)===-1},s.prototype.lt=function(c){return this.cmp(c)===-1},s.prototype.lten=function(c){return this.cmpn(c)<=0},s.prototype.lte=function(c){return this.cmp(c)<=0},s.prototype.eqn=function(c){return this.cmpn(c)===0},s.prototype.eq=function(c){return this.cmp(c)===0},s.red=function(c){return new ie(c)},s.prototype.toRed=function(c){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(c){return this.red=c,this},s.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},s.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},s.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},s.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},s.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},s.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},s.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},s.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(c){return n(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var j={k256:null,p224:null,p192:null,p25519:null};function z(w,c){this.name=w,this.p=new s(c,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var c=new s(null);return c.words=new Array(Math.ceil(this.n/13)),c},z.prototype.ireduce=function(c){var y=c,v;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),v=y.bitLength();while(v>this.n);var S=v<this.n?-1:y.ucmp(this.p);return S===0?(y.words[0]=0,y.length=1):S>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},z.prototype.split=function(c,y){c.iushrn(this.n,0,y)},z.prototype.imulK=function(c){return c.imul(this.k)};function K(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(K,z),K.prototype.split=function(c,y){for(var v=4194303,S=Math.min(c.length,9),E=0;E<S;E++)y.words[E]=c.words[E];if(y.length=S,c.length<=9){c.words[0]=0,c.length=1;return}var k=c.words[9];for(y.words[y.length++]=k&v,E=10;E<c.length;E++){var L=c.words[E]|0;c.words[E-10]=(L&v)<<4|k>>>22,k=L}k>>>=22,c.words[E-10]=k,k===0&&c.length>10?c.length-=10:c.length-=9},K.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var y=0,v=0;v<c.length;v++){var S=c.words[v]|0;y+=S*977,c.words[v]=y&67108863,y=S*64+(y/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function X(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(X,z);function G(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(G,z);function re(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(re,z),re.prototype.imulK=function(c){for(var y=0,v=0;v<c.length;v++){var S=(c.words[v]|0)*19+y,E=S&67108863;S>>>=26,c.words[v]=E,y=S}return y!==0&&(c.words[c.length++]=y),c},s._prime=function(c){if(j[c])return j[c];var y;if(c==="k256")y=new K;else if(c==="p224")y=new X;else if(c==="p192")y=new G;else if(c==="p25519")y=new re;else throw new Error("Unknown prime "+c);return j[c]=y,y};function ie(w){if(typeof w=="string"){var c=s._prime(w);this.m=c.p,this.prime=c}else n(w.gtn(1),"modulus must be greater than 1"),this.m=w,this.prime=null}ie.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},ie.prototype._verify2=function(c,y){n((c.negative|y.negative)===0,"red works only with positives"),n(c.red&&c.red===y.red,"red works only with red numbers")},ie.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(p(c,c.umod(this.m)._forceRed(this)),c)},ie.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},ie.prototype.add=function(c,y){this._verify2(c,y);var v=c.add(y);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},ie.prototype.iadd=function(c,y){this._verify2(c,y);var v=c.iadd(y);return v.cmp(this.m)>=0&&v.isub(this.m),v},ie.prototype.sub=function(c,y){this._verify2(c,y);var v=c.sub(y);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},ie.prototype.isub=function(c,y){this._verify2(c,y);var v=c.isub(y);return v.cmpn(0)<0&&v.iadd(this.m),v},ie.prototype.shl=function(c,y){return this._verify1(c),this.imod(c.ushln(y))},ie.prototype.imul=function(c,y){return this._verify2(c,y),this.imod(c.imul(y))},ie.prototype.mul=function(c,y){return this._verify2(c,y),this.imod(c.mul(y))},ie.prototype.isqr=function(c){return this.imul(c,c.clone())},ie.prototype.sqr=function(c){return this.mul(c,c)},ie.prototype.sqrt=function(c){if(c.isZero())return c.clone();var y=this.m.andln(3);if(n(y%2===1),y===3){var v=this.m.add(new s(1)).iushrn(2);return this.pow(c,v)}for(var S=this.m.subn(1),E=0;!S.isZero()&&S.andln(1)===0;)E++,S.iushrn(1);n(!S.isZero());var k=new s(1).toRed(this),L=k.redNeg(),_=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,_).cmp(L)!==0;)d.redIAdd(L);for(var A=this.pow(d,S),Y=this.pow(c,S.addn(1).iushrn(1)),ee=this.pow(c,S),N=E;ee.cmp(k)!==0;){for(var $=ee,V=0;$.cmp(k)!==0;V++)$=$.redSqr();n(V<N);var Q=this.pow(A,new s(1).iushln(N-V-1));Y=Y.redMul(Q),A=Q.redSqr(),ee=ee.redMul(A),N=V}return Y},ie.prototype.invm=function(c){var y=c._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},ie.prototype.pow=function(c,y){if(y.isZero())return new s(1).toRed(this);if(y.cmpn(1)===0)return c.clone();var v=4,S=new Array(1<<v);S[0]=new s(1).toRed(this),S[1]=c;for(var E=2;E<S.length;E++)S[E]=this.mul(S[E-1],c);var k=S[0],L=0,_=0,d=y.bitLength()%26;for(d===0&&(d=26),E=y.length-1;E>=0;E--){for(var A=y.words[E],Y=d-1;Y>=0;Y--){var ee=A>>Y&1;if(k!==S[0]&&(k=this.sqr(k)),ee===0&&L===0){_=0;continue}L<<=1,L|=ee,_++,!(_!==v&&(E!==0||Y!==0))&&(k=this.mul(k,S[L]),_=0,L=0)}d=26}return k},ie.prototype.convertTo=function(c){var y=c.umod(this.m);return y===c?y.clone():y},ie.prototype.convertFrom=function(c){var y=c.clone();return y.red=null,y},s.mont=function(c){return new oe(c)};function oe(w){ie.call(this,w),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(oe,ie),oe.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},oe.prototype.convertFrom=function(c){var y=this.imod(c.mul(this.rinv));return y.red=null,y},oe.prototype.imul=function(c,y){if(c.isZero()||y.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(y),S=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(S).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},oe.prototype.mul=function(c,y){if(c.isZero()||y.isZero())return new s(0)._forceRed(this);var v=c.mul(y),S=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),E=v.isub(S).iushrn(this.shift),k=E;return E.cmp(this.m)>=0?k=E.isub(this.m):E.cmpn(0)<0&&(k=E.iadd(this.m)),k._forceRed(this)},oe.prototype.invm=function(c){var y=this.imod(c._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(t,te)})(Yu);var _o=Yu.exports,wi={};Object.defineProperty(wi,"__esModule",{value:!0});wi.EVENTS=void 0;wi.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var ns={},Ku={},Br={},kg=Qi;Qi.default=Qi;Qi.stable=jh;Qi.stableStringify=jh;var Ks="[...]",Dh="[Circular]",yn=[],fn=[];function Fh(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Qi(t,e,r,n){typeof n>"u"&&(n=Fh()),vu(t,"",0,[],void 0,0,n);var i;try{fn.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,Uh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;yn.length!==0;){var s=yn.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Qn(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),yn.push([n,r,e,i])):fn.push([e,r,t]):(n[r]=t,yn.push([n,r,e]))}function vu(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Qn(Dh,t,e,i);return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Qn(Ks,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Qn(Ks,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)vu(t[a],a,a,n,t,s,o);else{var u=Object.keys(t);for(a=0;a<u.length;a++){var l=u[a];vu(t[l],l,a,n,t,s,o)}}n.pop()}}function Og(t,e){return t<e?-1:t>e?1:0}function jh(t,e,r,n){typeof n>"u"&&(n=Fh());var i=mu(t,"",0,[],void 0,0,n)||t,s;try{fn.length===0?s=JSON.stringify(i,e,r):s=JSON.stringify(i,Uh(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;yn.length!==0;){var o=yn.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return s}function mu(t,e,r,n,i,s,o){s+=1;var a;if(typeof t=="object"&&t!==null){for(a=0;a<n.length;a++)if(n[a]===t){Qn(Dh,t,e,i);return}try{if(typeof t.toJSON=="function")return}catch{return}if(typeof o.depthLimit<"u"&&s>o.depthLimit){Qn(Ks,t,e,i);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Qn(Ks,t,e,i);return}if(n.push(t),Array.isArray(t))for(a=0;a<t.length;a++)mu(t[a],a,a,n,t,s,o);else{var u={},l=Object.keys(t).sort(Og);for(a=0;a<l.length;a++){var p=l[a];mu(t[p],p,a,n,t,s,o),u[p]=t[p]}if(typeof i<"u")yn.push([i,e,t]),i[e]=u;else return u}n.pop()}}function Uh(t){return t=typeof t<"u"?t:function(e,r){return r},function(e,r){if(fn.length>0)for(var n=0;n<fn.length;n++){var i=fn[n];if(i[1]===e&&i[0]===r){r=i[2],fn.splice(n,1);break}}return t.call(this,e,r)}}Object.defineProperty(Br,"__esModule",{value:!0});Br.EthereumProviderError=Br.EthereumRpcError=void 0;const Ng=kg;class Wh extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return Ng.default(this.serialize(),Pg,2)}}Br.EthereumRpcError=Wh;class Lg extends Wh{constructor(e,r,n){if(!Bg(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}}Br.EthereumProviderError=Lg;function Bg(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function Pg(t,e){if(e!=="[Circular]")return e}var Xu={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.errorValues=Pr.errorCodes=void 0;Pr.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Pr.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const e=Pr,r=Br,n=e.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:o(n)};t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(m,C=i){if(Number.isInteger(m)){const T=m.toString();if(g(e.errorValues,T))return e.errorValues[T].message;if(l(m))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return C}t.getMessageFromCode=o;function a(m){if(!Number.isInteger(m))return!1;const C=m.toString();return!!(e.errorValues[C]||l(m))}t.isValidCode=a;function u(m,{fallbackError:C=s,shouldIncludeStack:T=!1}={}){var P,U;if(!C||!Number.isInteger(C.code)||typeof C.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(m instanceof r.EthereumRpcError)return m.serialize();const M={};if(m&&typeof m=="object"&&!Array.isArray(m)&&g(m,"code")&&a(m.code)){const D=m;M.code=D.code,D.message&&typeof D.message=="string"?(M.message=D.message,g(D,"data")&&(M.data=D.data)):(M.message=o(M.code),M.data={originalError:p(m)})}else{M.code=C.code;const D=(P=m)===null||P===void 0?void 0:P.message;M.message=D&&typeof D=="string"?D:C.message,M.data={originalError:p(m)}}const O=(U=m)===null||U===void 0?void 0:U.stack;return T&&m&&O&&typeof O=="string"&&(M.stack=O),M}t.serializeError=u;function l(m){return m>=-32099&&m<=-32e3}function p(m){return m&&typeof m=="object"&&!Array.isArray(m)?Object.assign({},m):m}function g(m,C){return Object.prototype.hasOwnProperty.call(m,C)}})(Xu);var So={};Object.defineProperty(So,"__esModule",{value:!0});So.ethErrors=void 0;const ec=Br,Hh=Xu,_t=Pr;So.ethErrors={rpc:{parse:t=>$t(_t.errorCodes.rpc.parse,t),invalidRequest:t=>$t(_t.errorCodes.rpc.invalidRequest,t),invalidParams:t=>$t(_t.errorCodes.rpc.invalidParams,t),methodNotFound:t=>$t(_t.errorCodes.rpc.methodNotFound,t),internal:t=>$t(_t.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return $t(e,t)},invalidInput:t=>$t(_t.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>$t(_t.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>$t(_t.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>$t(_t.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>$t(_t.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>$t(_t.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>Ni(_t.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>Ni(_t.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>Ni(_t.errorCodes.provider.unsupportedMethod,t),disconnected:t=>Ni(_t.errorCodes.provider.disconnected,t),chainDisconnected:t=>Ni(_t.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ec.EthereumProviderError(e,r,n)}}};function $t(t,e){const[r,n]=Vh(e);return new ec.EthereumRpcError(t,r||Hh.getMessageFromCode(t),n)}function Ni(t,e){const[r,n]=Vh(e);return new ec.EthereumProviderError(t,r||Hh.getMessageFromCode(t),n)}function Vh(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){const{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getMessageFromCode=t.serializeError=t.EthereumProviderError=t.EthereumRpcError=t.ethErrors=t.errorCodes=void 0;const e=Br;Object.defineProperty(t,"EthereumRpcError",{enumerable:!0,get:function(){return e.EthereumRpcError}}),Object.defineProperty(t,"EthereumProviderError",{enumerable:!0,get:function(){return e.EthereumProviderError}});const r=Xu;Object.defineProperty(t,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(t,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=So;Object.defineProperty(t,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Pr;Object.defineProperty(t,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(Ku);var Be={},Eo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Method=void 0,function(e){e.requestEthereumAccounts="requestEthereumAccounts",e.signEthereumMessage="signEthereumMessage",e.signEthereumTransaction="signEthereumTransaction",e.submitEthereumTransaction="submitEthereumTransaction",e.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",e.scanQRCode="scanQRCode",e.generic="generic",e.childRequestEthereumAccounts="childRequestEthereumAccounts",e.addEthereumChain="addEthereumChain",e.switchEthereumChain="switchEthereumChain",e.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",e.watchAsset="watchAsset",e.selectProvider="selectProvider"}(t.Web3Method||(t.Web3Method={}))})(Eo);Object.defineProperty(Be,"__esModule",{value:!0});Be.EthereumAddressFromSignedMessageResponse=Be.SubmitEthereumTransactionResponse=Be.SignEthereumTransactionResponse=Be.SignEthereumMessageResponse=Be.isRequestEthereumAccountsResponse=Be.SelectProviderResponse=Be.WatchAssetReponse=Be.RequestEthereumAccountsResponse=Be.SwitchEthereumChainResponse=Be.AddEthereumChainResponse=Be.isErrorResponse=void 0;const yr=Eo;function $g(t){var e,r;return((e=t)===null||e===void 0?void 0:e.method)!==void 0&&((r=t)===null||r===void 0?void 0:r.errorMessage)!==void 0}Be.isErrorResponse=$g;function Dg(t){return{method:yr.Web3Method.addEthereumChain,result:t}}Be.AddEthereumChainResponse=Dg;function Fg(t){return{method:yr.Web3Method.switchEthereumChain,result:t}}Be.SwitchEthereumChainResponse=Fg;function jg(t){return{method:yr.Web3Method.requestEthereumAccounts,result:t}}Be.RequestEthereumAccountsResponse=jg;function Ug(t){return{method:yr.Web3Method.watchAsset,result:t}}Be.WatchAssetReponse=Ug;function Wg(t){return{method:yr.Web3Method.selectProvider,result:t}}Be.SelectProviderResponse=Wg;function Hg(t){return t&&t.method===yr.Web3Method.requestEthereumAccounts}Be.isRequestEthereumAccountsResponse=Hg;function Vg(t){return{method:yr.Web3Method.signEthereumMessage,result:t}}Be.SignEthereumMessageResponse=Vg;function zg(t){return{method:yr.Web3Method.signEthereumTransaction,result:t}}Be.SignEthereumTransactionResponse=zg;function qg(t){return{method:yr.Web3Method.submitEthereumTransaction,result:t}}Be.SubmitEthereumTransactionResponse=qg;function Gg(t){return{method:yr.Web3Method.ethereumAddressFromSignedMessage,result:t}}Be.EthereumAddressFromSignedMessageResponse=Gg;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});_i.LIB_VERSION=void 0;_i.LIB_VERSION="3.7.2";(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCode=t.serializeError=t.standardErrors=t.standardErrorMessage=t.standardErrorCodes=void 0;const e=Ku,r=Be,n=_i;t.standardErrorCodes=Object.freeze(Object.assign(Object.assign({},e.errorCodes),{provider:Object.freeze(Object.assign(Object.assign({},e.errorCodes.provider),{unsupportedChain:4902}))}));function i(p){return p!==void 0?(0,e.getMessageFromCode)(p):"Unknown error"}t.standardErrorMessage=i,t.standardErrors=Object.freeze(Object.assign(Object.assign({},e.ethErrors),{provider:Object.freeze(Object.assign(Object.assign({},e.ethErrors.provider),{unsupportedChain:(p="")=>e.ethErrors.provider.custom({code:t.standardErrorCodes.provider.unsupportedChain,message:`Unrecognized chain ID ${p}. Try adding the chain using wallet_addEthereumChain first.`})}))}));function s(p,g){const m=(0,e.serializeError)(o(p),{shouldIncludeStack:!0}),C=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");C.searchParams.set("version",n.LIB_VERSION),C.searchParams.set("code",m.code.toString());const T=a(m.data,g);return T&&C.searchParams.set("method",T),C.searchParams.set("message",m.message),Object.assign(Object.assign({},m),{docUrl:C.href})}t.serializeError=s;function o(p){return typeof p=="string"?{message:p,code:t.standardErrorCodes.rpc.internal}:(0,r.isErrorResponse)(p)?Object.assign(Object.assign({},p),{message:p.errorMessage,code:p.errorCode,data:{method:p.method,result:p.result}}):p}function a(p,g){var m;const C=(m=p)===null||m===void 0?void 0:m.method;if(C)return C;if(g!==void 0)return typeof g=="string"?g:Array.isArray(g)?g.length>0?g[0].method:void 0:g.method}function u(p){var g;if(typeof p=="number")return p;if(l(p))return(g=p.code)!==null&&g!==void 0?g:p.errorCode}t.getErrorCode=u;function l(p){return typeof p=="object"&&p!==null&&(typeof p.code=="number"||typeof p.errorCode=="number")}})(ns);var Si={},zh={exports:{}},wu={exports:{}};typeof Object.create=="function"?wu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wu.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var er=wu.exports,_u={exports:{}},is={},xo={};xo.byteLength=Qg;xo.toByteArray=Kg;xo.fromByteArray=ty;var lr=[],jt=[],Jg=typeof Uint8Array<"u"?Uint8Array:Array,Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Dn=0,Zg=Ra.length;Dn<Zg;++Dn)lr[Dn]=Ra[Dn],jt[Ra.charCodeAt(Dn)]=Dn;jt["-".charCodeAt(0)]=62;jt["_".charCodeAt(0)]=63;function qh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Qg(t){var e=qh(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Yg(t,e,r){return(e+r)*3/4-r}function Kg(t){var e,r=qh(t),n=r[0],i=r[1],s=new Jg(Yg(t,n,i)),o=0,a=i>0?n-4:n,u;for(u=0;u<a;u+=4)e=jt[t.charCodeAt(u)]<<18|jt[t.charCodeAt(u+1)]<<12|jt[t.charCodeAt(u+2)]<<6|jt[t.charCodeAt(u+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=jt[t.charCodeAt(u)]<<2|jt[t.charCodeAt(u+1)]>>4,s[o++]=e&255),i===1&&(e=jt[t.charCodeAt(u)]<<10|jt[t.charCodeAt(u+1)]<<4|jt[t.charCodeAt(u+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function Xg(t){return lr[t>>18&63]+lr[t>>12&63]+lr[t>>6&63]+lr[t&63]}function ey(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(Xg(n));return i.join("")}function ty(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,a=r-n;o<a;o+=s)i.push(ey(t,o,o+s>a?a:o+s));return n===1?(e=t[r-1],i.push(lr[e>>2]+lr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(lr[e>>10]+lr[e>>4&63]+lr[e<<2&63]+"=")),i.join("")}var tc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */tc.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,u=(1<<a)-1,l=u>>1,p=-7,g=r?i-1:0,m=r?-1:1,C=t[e+g];for(g+=m,s=C&(1<<-p)-1,C>>=-p,p+=a;p>0;s=s*256+t[e+g],g+=m,p-=8);for(o=s&(1<<-p)-1,s>>=-p,p+=n;p>0;o=o*256+t[e+g],g+=m,p-=8);if(s===0)s=1-l;else{if(s===u)return o?NaN:(C?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(C?-1:1)*o*Math.pow(2,s-n)};tc.write=function(t,e,r,n,i,s){var o,a,u,l=s*8-i-1,p=(1<<l)-1,g=p>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:s-1,T=n?1:-1,P=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=p):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+g>=1?e+=m/u:e+=m*Math.pow(2,1-g),e*u>=2&&(o++,u/=2),o+g>=p?(a=0,o=p):o+g>=1?(a=(e*u-1)*Math.pow(2,i),o=o+g):(a=e*Math.pow(2,g-1)*Math.pow(2,i),o=0));i>=8;t[r+C]=a&255,C+=T,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[r+C]=o&255,C+=T,o/=256,l-=8);t[r+C-T]|=P*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|