@dcl/top-scenes 1.0.0 → 1.0.1-21068921430.commit-c1a0cb5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{auto-track-BMCQhGIW.js → auto-track-D25ZT_Qc.js} +1 -1
- package/assets/{basic-DIz1oArj.js → basic-B3mssPqY.js} +1 -1
- package/assets/{core-DjaXgvjW.js → core-VKCy62WR.js} +4 -4
- package/assets/{features-BdbK7NZA.js → features-BUSsGsck.js} +1 -1
- package/assets/{fortmatic-BpGMC6Ou.js → fortmatic-GKeBeKRJ.js} +1 -1
- package/assets/{index-D5tL-0mc.js → index-B2mbg_iL.js} +1 -1
- package/assets/{index-CLPmRaSC.js → index-B4Ezcg4D.js} +1 -1
- package/assets/{index-Dk2DBpdO.js → index-Bo8KFBgk.js} +1 -1
- package/assets/{index-C1ZDEqI_.js → index-Br5IV31H.js} +66 -66
- package/assets/{index-DN25oh_r.js → index-BsiMhV6B.js} +2 -2
- package/assets/{index-EtZ8WctA.js → index-CunzE7P_.js} +1 -1
- package/assets/{index-ButGr4iZ.js → index-CySYcCiR.js} +3 -3
- package/assets/{index-DETk5t3j.js → index-DF4Orivt.js} +1 -1
- package/assets/{index-BYKSsuil.js → index-Dv8d1yD3.js} +2 -2
- package/assets/{index-C7oXG5ZF.js → index-yKrl25cv.js} +1 -1
- package/assets/{index.umd-CDy1kH0D.js → index.umd-CVJSTnWx.js} +1 -1
- package/assets/{w3m-modal-BfEoTYp5.js → w3m-modal-CQG34d2Y.js} +1 -1
- package/index.html +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as N,a0 as H,a1 as Xe,a2 as pr,a3 as xe,a4 as M,a5 as Le,a6 as yr,a7 as io,a8 as De,a9 as $a,aa as Ia,ab as Hn,ac as Z,ad as Te,ae as nn,af as Sa,ag as ke,ah as ae,ai as Ta,aj as ka,ak as ge,al as Na,am as Fa,an as mr,ao as Ca,ap as qt,aq as Dn,ar as ts,as as ns,at as rs,au as ss,av as os,aw as is,ax as as,ay as cs,az as qn,aA as kt,aB as us,aC as Ra,aD as Kt,aE as fs,aF as Oa,aG as Vn,aH as ds,aI as ao,aJ as ls,aK as za,aL as co,aM as bs,aN as La,aO as uo,aP as hs,aQ as Ma,aR as ps}from"./core-
|
|
1
|
+
import{$ as N,a0 as H,a1 as Xe,a2 as pr,a3 as xe,a4 as M,a5 as Le,a6 as yr,a7 as io,a8 as De,a9 as $a,aa as Ia,ab as Hn,ac as Z,ad as Te,ae as nn,af as Sa,ag as ke,ah as ae,ai as Ta,aj as ka,ak as ge,al as Na,am as Fa,an as mr,ao as Ca,ap as qt,aq as Dn,ar as ts,as as ns,at as rs,au as ss,av as os,aw as is,ax as as,ay as cs,az as qn,aA as kt,aB as us,aC as Ra,aD as Kt,aE as fs,aF as Oa,aG as Vn,aH as ds,aI as ao,aJ as ls,aK as za,aL as co,aM as bs,aN as La,aO as uo,aP as hs,aQ as Ma,aR as ps}from"./core-VKCy62WR.js";import{b1 as V1,b0 as Z1,b2 as W1,b3 as K1,b4 as Y1,aZ as X1,b5 as J1,b6 as Q1,b7 as eb,b8 as tb,b9 as nb,ba as rb,bb as sb,bc as ob,bd as ib,be as ab,bf as cb,bg as ub,aY as fb,a_ as db,bh as lb,a$ as bb,bi as hb,bj as pb,bk as yb,bl as mb,bm as gb,bn as wb,bo as xb,bq as vb,bp as Eb,aS as Pb,aW as Ab,aT as Bb,aX as $b,aV as Ib,br as Sb,aU as Tb,bs as kb}from"./core-VKCy62WR.js";import{_ as fo}from"./index-Br5IV31H.js";import"./index-CySYcCiR.js";const _a="1.1.0";let te=class Zn extends Error{constructor(t,n={}){var i;const r=n.cause instanceof Zn?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,s=n.cause instanceof Zn&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${_a}`].join(`
|
|
2
2
|
`);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=s,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Ce(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const lo=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,bo=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,ho=/^\(.+?\).*?$/,ys=/^tuple(?<array>(\[(\d*)\])*)$/;function Wn(e){let t=e.type;if(ys.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const o=e.components[s];t+=Wn(o),s<n-1&&(t+=", ")}const r=Ce(ys,e.type);return t+=`)${(r==null?void 0:r.array)??""}`,Wn({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function st(e){let t="";const n=e.length;for(let r=0;r<n;r++){const s=e[r];t+=Wn(s),r!==n-1&&(t+=", ")}return t}function Yt(e){var t;return e.type==="function"?`function ${e.name}(${st(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${st(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${st(e.inputs)})`:e.type==="error"?`error ${e.name}(${st(e.inputs)})`:e.type==="constructor"?`constructor(${st(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const po=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Ua(e){return po.test(e)}function ja(e){return Ce(po,e)}const yo=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Ga(e){return yo.test(e)}function Ha(e){return Ce(yo,e)}const mo=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function Da(e){return mo.test(e)}function qa(e){return Ce(mo,e)}const go=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function rn(e){return go.test(e)}function Va(e){return Ce(go,e)}const wo=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function Za(e){return wo.test(e)}function Wa(e){return Ce(wo,e)}const xo=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function Ka(e){return xo.test(e)}function Ya(e){return Ce(xo,e)}const Xa=/^receive\(\) external payable$/;function Ja(e){return Xa.test(e)}const ms=new Set(["memory","indexed","storage","calldata"]),Qa=new Set(["indexed"]),Kn=new Set(["calldata","memory","storage"]);class ec extends te{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class tc extends te{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class nc extends te{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class rc extends te{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class sc extends te{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class oc extends te{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class ic extends te{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class ac extends te{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class cc extends te{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class pt extends te{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class uc extends te{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class fc extends te{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class dc extends te{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class lc extends te{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function bc(e,t,n){let r="";if(n)for(const s of Object.entries(n)){if(!s)continue;let o="";for(const i of s[1])o+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${s[0]}{${o}})`}return t?`${t}:${e}${r}`:e}const Pn=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Yn(e,t={}){if(Da(e))return hc(e,t);if(Ga(e))return pc(e,t);if(Ua(e))return yc(e,t);if(Za(e))return mc(e,t);if(Ka(e))return gc(e);if(Ja(e))return{type:"receive",stateMutability:"payable"};throw new uc({signature:e})}function hc(e,t={}){const n=qa(e);if(!n)throw new pt({signature:e,type:"function"});const r=ne(n.parameters),s=[],o=r.length;for(let a=0;a<o;a++)s.push(Ne(r[a],{modifiers:Kn,structs:t,type:"function"}));const i=[];if(n.returns){const a=ne(n.returns),c=a.length;for(let u=0;u<c;u++)i.push(Ne(a[u],{modifiers:Kn,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:s,outputs:i}}function pc(e,t={}){const n=Ha(e);if(!n)throw new pt({signature:e,type:"event"});const r=ne(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(Ne(r[i],{modifiers:Qa,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:s}}function yc(e,t={}){const n=ja(e);if(!n)throw new pt({signature:e,type:"error"});const r=ne(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(Ne(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:s}}function mc(e,t={}){const n=Wa(e);if(!n)throw new pt({signature:e,type:"constructor"});const r=ne(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(Ne(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:s}}function gc(e){const t=Ya(e);if(!t)throw new pt({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const wc=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,xc=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,vc=/^u?int$/;function Ne(e,t){var d,l;const n=bc(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(Pn.has(n))return Pn.get(n);const r=ho.test(e),s=Ce(r?xc:wc,e);if(!s)throw new sc({param:e});if(s.name&&Pc(s.name))throw new oc({param:e,name:s.name});const o=s.name?{name:s.name}:{},i=s.modifier==="indexed"?{indexed:!0}:{},a=(t==null?void 0:t.structs)??{};let c,u={};if(r){c="tuple";const b=ne(s.type),p=[],h=b.length;for(let v=0;v<h;v++)p.push(Ne(b[v],{structs:a}));u={components:p}}else if(s.type in a)c="tuple",u={components:a[s.type]};else if(vc.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,(t==null?void 0:t.type)!=="struct"&&!vo(c))throw new nc({type:c});if(s.modifier){if(!((l=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&l.call(d,s.modifier)))throw new ic({param:e,type:t==null?void 0:t.type,modifier:s.modifier});if(Kn.has(s.modifier)&&!Ac(c,!!s.array))throw new ac({param:e,type:t==null?void 0:t.type,modifier:s.modifier})}const f={type:`${c}${s.array??""}`,...o,...i,...u};return Pn.set(n,f),f}function ne(e,t=[],n="",r=0){const s=e.trim().length;for(let o=0;o<s;o++){const i=e[o],a=e.slice(o+1);switch(i){case",":return r===0?ne(a,[...t,n.trim()]):ne(a,t,`${n}${i}`,r);case"(":return ne(a,t,`${n}${i}`,r+1);case")":return ne(a,t,`${n}${i}`,r-1);default:return ne(a,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new lc({current:n,depth:r});return t.push(n.trim()),t}function vo(e){return e==="address"||e==="bool"||e==="function"||e==="string"||lo.test(e)||bo.test(e)}const Ec=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Pc(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||lo.test(e)||bo.test(e)||Ec.test(e)}function Ac(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function gr(e){const t={},n=e.length;for(let i=0;i<n;i++){const a=e[i];if(!rn(a))continue;const c=Va(a);if(!c)throw new pt({signature:a,type:"struct"});const u=c.properties.split(";"),f=[],d=u.length;for(let l=0;l<d;l++){const p=u[l].trim();if(!p)continue;const h=Ne(p,{type:"struct"});f.push(h)}if(!f.length)throw new fc({signature:a});t[c.name]=f}const r={},s=Object.entries(t),o=s.length;for(let i=0;i<o;i++){const[a,c]=s[i];r[a]=Eo(c,t)}return r}const Bc=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Eo(e,t,n=new Set){const r=[],s=e.length;for(let o=0;o<s;o++){const i=e[o];if(ho.test(i.type))r.push(i);else{const c=Ce(Bc,i.type);if(!(c!=null&&c.type))throw new cc({abiParameter:i});const{array:u,type:f}=c;if(f in t){if(n.has(f))throw new dc({type:f});r.push({...i,type:`tuple${u??""}`,components:Eo(t[f]??[],t,new Set([...n,f]))})}else if(vo(f))r.push(i);else throw new tc({type:f})}}return r}function Po(e){const t=gr(e),n=[],r=e.length;for(let s=0;s<r;s++){const o=e[s];rn(o)||n.push(Yn(o,t))}return n}function gs(e){let t;if(typeof e=="string")t=Yn(e);else{const n=gr(e),r=e.length;for(let s=0;s<r;s++){const o=e[s];if(!rn(o)){t=Yn(o,n);break}}}if(!t)throw new ec({signature:e});return t}function ws(e){const t=[];if(typeof e=="string"){const n=ne(e),r=n.length;for(let s=0;s<r;s++)t.push(Ne(n[s],{modifiers:ms}))}else{const n=gr(e),r=e.length;for(let s=0;s<r;s++){const o=e[s];if(rn(o))continue;const i=ne(o),a=i.length;for(let c=0;c<a;c++)t.push(Ne(i[c],{modifiers:ms,structs:n}))}}if(t.length===0)throw new rc({params:e});return t}function L(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:o=>t(e,o)}function fe(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new _c(e.type);return`${e.name}(${sn(e.inputs,{includeName:t})})`}function sn(e,{includeName:t=!1}={}){return e?e.map(n=>$c(n,{includeName:t})).join(t?", ":","):""}function $c(e,{includeName:t}){return e.type.startsWith("tuple")?`(${sn(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Ic extends N{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
3
3
|
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class xs extends N{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
4
4
|
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Ao extends N{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.umd-
|
|
2
|
-
import{_ as n}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.umd-CVJSTnWx.js","assets/index-Br5IV31H.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n}from"./index-Br5IV31H.js";import{d as o,e as a}from"./inherits_browser-Dbwsx_3T.js";function u(e){return o(this,void 0,void 0,function(){var r;return a(this,function(t){switch(t.label){case 0:return[4,n(()=>import("./index.umd-CVJSTnWx.js").then(i=>i.i),__vite__mapDeps([0,1]))];case 1:return r=t.sent(),e._plugins=r,[2]}})})}export{u as loadLegacyVideoPlugins};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as sn,c as te,b as Xc,s as Rh,d as Ch,f as Mh,h as kh,t as xh,e as Ii,a as Ih}from"./index-C1ZDEqI_.js";import{i as Mt,t as Ah}from"./inherits_browser-Dbwsx_3T.js";function Th(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Nh={},Bh=Object.freeze(Object.defineProperty({__proto__:null,default:Nh},Symbol.toStringTag,{value:"Module"})),Io=sn(Bh);var Lh={}.toString,Ph=Array.isArray||function(e){return Lh.call(e)=="[object Array]"},el=Function.prototype.toString,Wr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lo,mi;if(typeof Wr=="function"&&typeof Object.defineProperty=="function")try{lo=Object.defineProperty({},"length",{get:function(){throw mi}}),mi={},Wr(function(){throw 42},null,lo)}catch(e){e!==mi&&(Wr=null)}else Wr=null;var Oh=/^\s*class\b/,uo=function(t){try{var r=el.call(t);return Oh.test(r)}catch{return!1}},As=function(t){try{return uo(t)?!1:(el.call(t),!0)}catch{return!1}},yi=Object.prototype.toString,Fh="[object Object]",Dh="[object Function]",jh="[object GeneratorFunction]",Uh="[object HTMLAllCollection]",$h="[object HTML document.all class]",Hh="[object HTMLCollection]",Wh=typeof Symbol=="function"&&!!Symbol.toStringTag,Vh=!(0 in[,]),ho=function(){return!1};if(typeof document=="object"){var zh=document.all;yi.call(zh)===yi.call(document.all)&&(ho=function(t){if((Vh||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=yi.call(t);return(r===Uh||r===$h||r===Hh||r===Fh)&&t("")==null}catch{}return!1})}var qh=Wr?function(t){if(ho(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Wr(t,null,lo)}catch(r){if(r!==mi)return!1}return!uo(t)&&As(t)}:function(t){if(ho(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(Wh)return As(t);if(uo(t))return!1;var r=yi.call(t);return r!==Dh&&r!==jh&&!/^\[object HTML/.test(r)?!1:As(t)},Gh=qh,Jh=Object.prototype.toString,tl=Object.prototype.hasOwnProperty,Zh=function(t,r,n){for(var i=0,s=t.length;i<s;i++)tl.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},Kh=function(t,r,n){for(var i=0,s=t.length;i<s;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},Qh=function(t,r,n){for(var i in t)tl.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))};function Yh(e){return Jh.call(e)==="[object Array]"}var Xh=function(t,r,n){if(!Gh(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),Yh(t)?Zh(t,r,i):typeof t=="string"?Kh(t,r,i):Qh(t,r,i)},ef=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ts=ef,tf=typeof globalThis>"u"?te:globalThis,rf=function(){for(var t=[],r=0;r<Ts.length;r++)typeof tf[Ts[r]]=="function"&&(t[t.length]=Ts[r]);return t},Si=Xh,nf=rf,ya=kh,Ao=Xc,wi=Ch,ri=Mh,sf=Ao("Object.prototype.toString"),rl=Rh(),wa=typeof globalThis>"u"?te:globalThis,fo=nf(),To=Ao("String.prototype.slice"),of=Ao("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},Ri={__proto__:null};rl&&wi&&ri?Si(fo,function(e){var t=new wa[e];if(Symbol.toStringTag in t&&ri){var r=ri(t),n=wi(r,Symbol.toStringTag);if(!n&&r){var i=ri(r);n=wi(i,Symbol.toStringTag)}Ri["$"+e]=ya(n.get)}}):Si(fo,function(e){var t=new wa[e],r=t.slice||t.set;r&&(Ri["$"+e]=ya(r))});var af=function(t){var r=!1;return Si(Ri,function(n,i){if(!r)try{"$"+n(t)===i&&(r=To(i,1))}catch{}}),r},cf=function(t){var r=!1;return Si(Ri,function(n,i){if(!r)try{n(t),r=To(i,1)}catch{}}),r},lf=function(t){if(!t||typeof t!="object")return!1;if(!rl){var r=To(sf(t),8,-1);return of(fo,r)>-1?r:r!=="Object"?!1:cf(t)}return wi?af(t):null},No={},bn={},Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.walletLogo=void 0;const uf=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};Ai.walletLogo=uf;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.LINK_API_URL=void 0;Ti.LINK_API_URL="https://www.walletlink.org";var X={},Bo={exports:{}};Bo.exports;(function(e){(function(t,r){function n(A,c){if(!A)throw new Error(c||"Assertion failed")}function i(A,c){A.super_=c;var d=function(){};d.prototype=c.prototype,A.prototype=new d,A.prototype.constructor=A}function s(A,c,d){if(s.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((c==="le"||c==="be")&&(d=c,c=10),this._init(A||0,c||10,d||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Io.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,d){return c.cmp(d)>0?c:d},s.min=function(c,d){return c.cmp(d)<0?c:d},s.prototype._init=function(c,d,y){if(typeof c=="number")return this._initNumber(c,d,y);if(typeof c=="object")return this._initArray(c,d,y);d==="hex"&&(d=16),n(d===(d|0)&&d>=2&&d<=36),c=c.toString().replace(/\s+/g,"");var v=0;c[0]==="-"&&(v++,this.negative=1),v<c.length&&(d===16?this._parseHex(c,v,y):(this._parseBase(c,d,v),y==="le"&&this._initArray(this.toArray(),d,y)))},s.prototype._initNumber=function(c,d,y){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),y==="le"&&this._initArray(this.toArray(),d,y)},s.prototype._initArray=function(c,d,y){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 v=0;v<this.length;v++)this.words[v]=0;var S,x,B=0;if(y==="be")for(v=c.length-1,S=0;v>=0;v-=3)x=c[v]|c[v-1]<<8|c[v-2]<<16,this.words[S]|=x<<B&67108863,this.words[S+1]=x>>>26-B&67108863,B+=24,B>=26&&(B-=26,S++);else if(y==="le")for(v=0,S=0;v<c.length;v+=3)x=c[v]|c[v+1]<<8|c[v+2]<<16,this.words[S]|=x<<B&67108863,this.words[S+1]=x>>>26-B&67108863,B+=24,B>=26&&(B-=26,S++);return this._strip()};function o(A,c){var d=A.charCodeAt(c);if(d>=48&&d<=57)return d-48;if(d>=65&&d<=70)return d-55;if(d>=97&&d<=102)return d-87;n(!1,"Invalid character in "+A)}function h(A,c,d){var y=o(A,d);return d-1>=c&&(y|=o(A,d-1)<<4),y}s.prototype._parseHex=function(c,d,y){this.length=Math.ceil((c.length-d)/6),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var S=0,x=0,B;if(y==="be")for(v=c.length-1;v>=d;v-=2)B=h(c,d,v)<<S,this.words[x]|=B&67108863,S>=18?(S-=18,x+=1,this.words[x]|=B>>>26):S+=8;else{var b=c.length-d;for(v=b%2===0?d+1:d;v<c.length;v+=2)B=h(c,d,v)<<S,this.words[x]|=B&67108863,S>=18?(S-=18,x+=1,this.words[x]|=B>>>26):S+=8}this._strip()};function p(A,c,d,y){for(var v=0,S=0,x=Math.min(A.length,d),B=c;B<x;B++){var b=A.charCodeAt(B)-48;v*=y,b>=49?S=b-49+10:b>=17?S=b-17+10:S=b,n(b>=0&&S<y,"Invalid character"),v+=S}return v}s.prototype._parseBase=function(c,d,y){this.words=[0],this.length=1;for(var v=0,S=1;S<=67108863;S*=d)v++;v--,S=S/d|0;for(var x=c.length-y,B=x%v,b=Math.min(x,x-B)+y,u=0,R=y;R<b;R+=v)u=p(c,R,R+v,d),this.imuln(S),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(B!==0){var Q=1;for(u=p(c,R,c.length,d),R=0;R<B;R++)Q*=d;this.imuln(Q),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var d=0;d<this.length;d++)c.words[d]=this.words[d];c.length=this.length,c.negative=this.negative,c.red=this.red};function g(A,c){A.words=c.words,A.length=c.length,A.negative=c.negative,A.red=c.red}if(s.prototype._move=function(c){g(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")]=_}catch{s.prototype.inspect=_}else s.prototype.inspect=_;function _(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var w=["","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"],I=[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],D=[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,d){c=c||10,d=d|0||1;var y;if(c===16||c==="hex"){y="";for(var v=0,S=0,x=0;x<this.length;x++){var B=this.words[x],b=((B<<v|S)&16777215).toString(16);S=B>>>24-v&16777215,v+=2,v>=26&&(v-=26,x--),S!==0||x!==this.length-1?y=w[6-b.length]+b+y:y=b+y}for(S!==0&&(y=S.toString(16)+y);y.length%d!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(c===(c|0)&&c>=2&&c<=36){var u=I[c],R=D[c];y="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var J=Q.modrn(R).toString(c);Q=Q.idivn(R),Q.isZero()?y=J+y:y=w[u-J.length]+J+y}for(this.isZero()&&(y="0"+y);y.length%d!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}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)},a&&(s.prototype.toBuffer=function(c,d){return this.toArrayLike(a,c,d)}),s.prototype.toArray=function(c,d){return this.toArrayLike(Array,c,d)};var F=function(c,d){return c.allocUnsafe?c.allocUnsafe(d):new c(d)};s.prototype.toArrayLike=function(c,d,y){this._strip();var v=this.byteLength(),S=y||Math.max(1,v);n(v<=S,"byte array longer than desired length"),n(S>0,"Requested array length <= 0");var x=F(c,S),B=d==="le"?"LE":"BE";return this["_toArrayLike"+B](x,v),x},s.prototype._toArrayLikeLE=function(c,d){for(var y=0,v=0,S=0,x=0;S<this.length;S++){var B=this.words[S]<<x|v;c[y++]=B&255,y<c.length&&(c[y++]=B>>8&255),y<c.length&&(c[y++]=B>>16&255),x===6?(y<c.length&&(c[y++]=B>>24&255),v=0,x=0):(v=B>>>24,x+=2)}if(y<c.length)for(c[y++]=v;y<c.length;)c[y++]=0},s.prototype._toArrayLikeBE=function(c,d){for(var y=c.length-1,v=0,S=0,x=0;S<this.length;S++){var B=this.words[S]<<x|v;c[y--]=B&255,y>=0&&(c[y--]=B>>8&255),y>=0&&(c[y--]=B>>16&255),x===6?(y>=0&&(c[y--]=B>>24&255),v=0,x=0):(v=B>>>24,x+=2)}if(y>=0)for(c[y--]=v;y>=0;)c[y--]=0},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var d=c,y=0;return d>=4096&&(y+=13,d>>>=13),d>=64&&(y+=7,d>>>=7),d>=8&&(y+=4,d>>>=4),d>=2&&(y+=2,d>>>=2),y+d},s.prototype._zeroBits=function(c){if(c===0)return 26;var d=c,y=0;return d&8191||(y+=13,d>>>=13),d&127||(y+=7,d>>>=7),d&15||(y+=4,d>>>=4),d&3||(y+=2,d>>>=2),d&1||y++,y},s.prototype.bitLength=function(){var c=this.words[this.length-1],d=this._countBits(c);return(this.length-1)*26+d};function O(A){for(var c=new Array(A.bitLength()),d=0;d<c.length;d++){var y=d/26|0,v=d%26;c[d]=A.words[y]>>>v&1}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,d=0;d<this.length;d++){var y=this._zeroBits(this.words[d]);if(c+=y,y!==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 d=0;d<c.length;d++)this.words[d]=this.words[d]|c.words[d];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 d;this.length>c.length?d=c:d=this;for(var y=0;y<d.length;y++)this.words[y]=this.words[y]&c.words[y];return this.length=d.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 d,y;this.length>c.length?(d=this,y=c):(d=c,y=this);for(var v=0;v<y.length;v++)this.words[v]=d.words[v]^y.words[v];if(this!==d)for(;v<d.length;v++)this.words[v]=d.words[v];return this.length=d.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 d=Math.ceil(c/26)|0,y=c%26;this._expand(d),y>0&&d--;for(var v=0;v<d;v++)this.words[v]=~this.words[v]&67108863;return y>0&&(this.words[v]=~this.words[v]&67108863>>26-y),this._strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,d){n(typeof c=="number"&&c>=0);var y=c/26|0,v=c%26;return this._expand(y+1),d?this.words[y]=this.words[y]|1<<v:this.words[y]=this.words[y]&~(1<<v),this._strip()},s.prototype.iadd=function(c){var d;if(this.negative!==0&&c.negative===0)return this.negative=0,d=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,d=this.isub(c),c.negative=1,d._normSign();var y,v;this.length>c.length?(y=this,v=c):(y=c,v=this);for(var S=0,x=0;x<v.length;x++)d=(y.words[x]|0)+(v.words[x]|0)+S,this.words[x]=d&67108863,S=d>>>26;for(;S!==0&&x<y.length;x++)d=(y.words[x]|0)+S,this.words[x]=d&67108863,S=d>>>26;if(this.length=y.length,S!==0)this.words[this.length]=S,this.length++;else if(y!==this)for(;x<y.length;x++)this.words[x]=y.words[x];return this},s.prototype.add=function(c){var d;return c.negative!==0&&this.negative===0?(c.negative=0,d=this.sub(c),c.negative^=1,d):c.negative===0&&this.negative!==0?(this.negative=0,d=c.sub(this),this.negative=1,d):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 d=this.iadd(c);return c.negative=1,d._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var y=this.cmp(c);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,S;y>0?(v=this,S=c):(v=c,S=this);for(var x=0,B=0;B<S.length;B++)d=(v.words[B]|0)-(S.words[B]|0)+x,x=d>>26,this.words[B]=d&67108863;for(;x!==0&&B<v.length;B++)d=(v.words[B]|0)+x,x=d>>26,this.words[B]=d&67108863;if(x===0&&B<v.length&&v!==this)for(;B<v.length;B++)this.words[B]=v.words[B];return this.length=Math.max(this.length,B),v!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function k(A,c,d){d.negative=c.negative^A.negative;var y=A.length+c.length|0;d.length=y,y=y-1|0;var v=A.words[0]|0,S=c.words[0]|0,x=v*S,B=x&67108863,b=x/67108864|0;d.words[0]=B;for(var u=1;u<y;u++){for(var R=b>>>26,Q=b&67108863,J=Math.min(u,c.length-1),N=Math.max(0,u-A.length+1);N<=J;N++){var j=u-N|0;v=A.words[j]|0,S=c.words[N]|0,x=v*S+Q,R+=x/67108864|0,Q=x&67108863}d.words[u]=Q|0,b=R|0}return b!==0?d.words[u]=b|0:d.length--,d._strip()}var T=function(c,d,y){var v=c.words,S=d.words,x=y.words,B=0,b,u,R,Q=v[0]|0,J=Q&8191,N=Q>>>13,j=v[1]|0,V=j&8191,Z=j>>>13,ue=v[2]|0,C=ue&8191,M=ue>>>13,q=v[3]|0,G=q&8191,oe=q>>>13,he=v[4]|0,ne=he&8191,we=he>>>13,pt=v[5]|0,Se=pt&8191,Ee=pt>>>13,Qe=v[6]|0,ve=Qe&8191,Re=Qe>>>13,et=v[7]|0,be=et&8191,m=et>>>13,l=v[8]|0,f=l&8191,E=l>>>13,P=v[9]|0,U=P&8191,H=P>>>13,fe=S[0]|0,ae=fe&8191,se=fe>>>13,Ce=S[1]|0,ie=Ce&8191,xe=Ce>>>13,xr=S[2]|0,Ie=xr&8191,Ae=xr>>>13,Ir=S[3]|0,Te=Ir&8191,Ne=Ir>>>13,Ar=S[4]|0,Be=Ar&8191,Le=Ar>>>13,Tr=S[5]|0,Pe=Tr&8191,Oe=Tr>>>13,Nr=S[6]|0,Fe=Nr&8191,De=Nr>>>13,Br=S[7]|0,je=Br&8191,Ue=Br>>>13,Lr=S[8]|0,$e=Lr&8191,He=Lr>>>13,Pr=S[9]|0,We=Pr&8191,Ve=Pr>>>13;y.negative=c.negative^d.negative,y.length=19,b=Math.imul(J,ae),u=Math.imul(J,se),u=u+Math.imul(N,ae)|0,R=Math.imul(N,se);var Qt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul(V,ae),u=Math.imul(V,se),u=u+Math.imul(Z,ae)|0,R=Math.imul(Z,se),b=b+Math.imul(J,ie)|0,u=u+Math.imul(J,xe)|0,u=u+Math.imul(N,ie)|0,R=R+Math.imul(N,xe)|0;var Yt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,b=Math.imul(C,ae),u=Math.imul(C,se),u=u+Math.imul(M,ae)|0,R=Math.imul(M,se),b=b+Math.imul(V,ie)|0,u=u+Math.imul(V,xe)|0,u=u+Math.imul(Z,ie)|0,R=R+Math.imul(Z,xe)|0,b=b+Math.imul(J,Ie)|0,u=u+Math.imul(J,Ae)|0,u=u+Math.imul(N,Ie)|0,R=R+Math.imul(N,Ae)|0;var Xt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,b=Math.imul(G,ae),u=Math.imul(G,se),u=u+Math.imul(oe,ae)|0,R=Math.imul(oe,se),b=b+Math.imul(C,ie)|0,u=u+Math.imul(C,xe)|0,u=u+Math.imul(M,ie)|0,R=R+Math.imul(M,xe)|0,b=b+Math.imul(V,Ie)|0,u=u+Math.imul(V,Ae)|0,u=u+Math.imul(Z,Ie)|0,R=R+Math.imul(Z,Ae)|0,b=b+Math.imul(J,Te)|0,u=u+Math.imul(J,Ne)|0,u=u+Math.imul(N,Te)|0,R=R+Math.imul(N,Ne)|0;var er=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(er>>>26)|0,er&=67108863,b=Math.imul(ne,ae),u=Math.imul(ne,se),u=u+Math.imul(we,ae)|0,R=Math.imul(we,se),b=b+Math.imul(G,ie)|0,u=u+Math.imul(G,xe)|0,u=u+Math.imul(oe,ie)|0,R=R+Math.imul(oe,xe)|0,b=b+Math.imul(C,Ie)|0,u=u+Math.imul(C,Ae)|0,u=u+Math.imul(M,Ie)|0,R=R+Math.imul(M,Ae)|0,b=b+Math.imul(V,Te)|0,u=u+Math.imul(V,Ne)|0,u=u+Math.imul(Z,Te)|0,R=R+Math.imul(Z,Ne)|0,b=b+Math.imul(J,Be)|0,u=u+Math.imul(J,Le)|0,u=u+Math.imul(N,Be)|0,R=R+Math.imul(N,Le)|0;var tr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(tr>>>26)|0,tr&=67108863,b=Math.imul(Se,ae),u=Math.imul(Se,se),u=u+Math.imul(Ee,ae)|0,R=Math.imul(Ee,se),b=b+Math.imul(ne,ie)|0,u=u+Math.imul(ne,xe)|0,u=u+Math.imul(we,ie)|0,R=R+Math.imul(we,xe)|0,b=b+Math.imul(G,Ie)|0,u=u+Math.imul(G,Ae)|0,u=u+Math.imul(oe,Ie)|0,R=R+Math.imul(oe,Ae)|0,b=b+Math.imul(C,Te)|0,u=u+Math.imul(C,Ne)|0,u=u+Math.imul(M,Te)|0,R=R+Math.imul(M,Ne)|0,b=b+Math.imul(V,Be)|0,u=u+Math.imul(V,Le)|0,u=u+Math.imul(Z,Be)|0,R=R+Math.imul(Z,Le)|0,b=b+Math.imul(J,Pe)|0,u=u+Math.imul(J,Oe)|0,u=u+Math.imul(N,Pe)|0,R=R+Math.imul(N,Oe)|0;var rr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(rr>>>26)|0,rr&=67108863,b=Math.imul(ve,ae),u=Math.imul(ve,se),u=u+Math.imul(Re,ae)|0,R=Math.imul(Re,se),b=b+Math.imul(Se,ie)|0,u=u+Math.imul(Se,xe)|0,u=u+Math.imul(Ee,ie)|0,R=R+Math.imul(Ee,xe)|0,b=b+Math.imul(ne,Ie)|0,u=u+Math.imul(ne,Ae)|0,u=u+Math.imul(we,Ie)|0,R=R+Math.imul(we,Ae)|0,b=b+Math.imul(G,Te)|0,u=u+Math.imul(G,Ne)|0,u=u+Math.imul(oe,Te)|0,R=R+Math.imul(oe,Ne)|0,b=b+Math.imul(C,Be)|0,u=u+Math.imul(C,Le)|0,u=u+Math.imul(M,Be)|0,R=R+Math.imul(M,Le)|0,b=b+Math.imul(V,Pe)|0,u=u+Math.imul(V,Oe)|0,u=u+Math.imul(Z,Pe)|0,R=R+Math.imul(Z,Oe)|0,b=b+Math.imul(J,Fe)|0,u=u+Math.imul(J,De)|0,u=u+Math.imul(N,Fe)|0,R=R+Math.imul(N,De)|0;var nr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(nr>>>26)|0,nr&=67108863,b=Math.imul(be,ae),u=Math.imul(be,se),u=u+Math.imul(m,ae)|0,R=Math.imul(m,se),b=b+Math.imul(ve,ie)|0,u=u+Math.imul(ve,xe)|0,u=u+Math.imul(Re,ie)|0,R=R+Math.imul(Re,xe)|0,b=b+Math.imul(Se,Ie)|0,u=u+Math.imul(Se,Ae)|0,u=u+Math.imul(Ee,Ie)|0,R=R+Math.imul(Ee,Ae)|0,b=b+Math.imul(ne,Te)|0,u=u+Math.imul(ne,Ne)|0,u=u+Math.imul(we,Te)|0,R=R+Math.imul(we,Ne)|0,b=b+Math.imul(G,Be)|0,u=u+Math.imul(G,Le)|0,u=u+Math.imul(oe,Be)|0,R=R+Math.imul(oe,Le)|0,b=b+Math.imul(C,Pe)|0,u=u+Math.imul(C,Oe)|0,u=u+Math.imul(M,Pe)|0,R=R+Math.imul(M,Oe)|0,b=b+Math.imul(V,Fe)|0,u=u+Math.imul(V,De)|0,u=u+Math.imul(Z,Fe)|0,R=R+Math.imul(Z,De)|0,b=b+Math.imul(J,je)|0,u=u+Math.imul(J,Ue)|0,u=u+Math.imul(N,je)|0,R=R+Math.imul(N,Ue)|0;var ir=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ir>>>26)|0,ir&=67108863,b=Math.imul(f,ae),u=Math.imul(f,se),u=u+Math.imul(E,ae)|0,R=Math.imul(E,se),b=b+Math.imul(be,ie)|0,u=u+Math.imul(be,xe)|0,u=u+Math.imul(m,ie)|0,R=R+Math.imul(m,xe)|0,b=b+Math.imul(ve,Ie)|0,u=u+Math.imul(ve,Ae)|0,u=u+Math.imul(Re,Ie)|0,R=R+Math.imul(Re,Ae)|0,b=b+Math.imul(Se,Te)|0,u=u+Math.imul(Se,Ne)|0,u=u+Math.imul(Ee,Te)|0,R=R+Math.imul(Ee,Ne)|0,b=b+Math.imul(ne,Be)|0,u=u+Math.imul(ne,Le)|0,u=u+Math.imul(we,Be)|0,R=R+Math.imul(we,Le)|0,b=b+Math.imul(G,Pe)|0,u=u+Math.imul(G,Oe)|0,u=u+Math.imul(oe,Pe)|0,R=R+Math.imul(oe,Oe)|0,b=b+Math.imul(C,Fe)|0,u=u+Math.imul(C,De)|0,u=u+Math.imul(M,Fe)|0,R=R+Math.imul(M,De)|0,b=b+Math.imul(V,je)|0,u=u+Math.imul(V,Ue)|0,u=u+Math.imul(Z,je)|0,R=R+Math.imul(Z,Ue)|0,b=b+Math.imul(J,$e)|0,u=u+Math.imul(J,He)|0,u=u+Math.imul(N,$e)|0,R=R+Math.imul(N,He)|0;var sr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(sr>>>26)|0,sr&=67108863,b=Math.imul(U,ae),u=Math.imul(U,se),u=u+Math.imul(H,ae)|0,R=Math.imul(H,se),b=b+Math.imul(f,ie)|0,u=u+Math.imul(f,xe)|0,u=u+Math.imul(E,ie)|0,R=R+Math.imul(E,xe)|0,b=b+Math.imul(be,Ie)|0,u=u+Math.imul(be,Ae)|0,u=u+Math.imul(m,Ie)|0,R=R+Math.imul(m,Ae)|0,b=b+Math.imul(ve,Te)|0,u=u+Math.imul(ve,Ne)|0,u=u+Math.imul(Re,Te)|0,R=R+Math.imul(Re,Ne)|0,b=b+Math.imul(Se,Be)|0,u=u+Math.imul(Se,Le)|0,u=u+Math.imul(Ee,Be)|0,R=R+Math.imul(Ee,Le)|0,b=b+Math.imul(ne,Pe)|0,u=u+Math.imul(ne,Oe)|0,u=u+Math.imul(we,Pe)|0,R=R+Math.imul(we,Oe)|0,b=b+Math.imul(G,Fe)|0,u=u+Math.imul(G,De)|0,u=u+Math.imul(oe,Fe)|0,R=R+Math.imul(oe,De)|0,b=b+Math.imul(C,je)|0,u=u+Math.imul(C,Ue)|0,u=u+Math.imul(M,je)|0,R=R+Math.imul(M,Ue)|0,b=b+Math.imul(V,$e)|0,u=u+Math.imul(V,He)|0,u=u+Math.imul(Z,$e)|0,R=R+Math.imul(Z,He)|0,b=b+Math.imul(J,We)|0,u=u+Math.imul(J,Ve)|0,u=u+Math.imul(N,We)|0,R=R+Math.imul(N,Ve)|0;var or=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(or>>>26)|0,or&=67108863,b=Math.imul(U,ie),u=Math.imul(U,xe),u=u+Math.imul(H,ie)|0,R=Math.imul(H,xe),b=b+Math.imul(f,Ie)|0,u=u+Math.imul(f,Ae)|0,u=u+Math.imul(E,Ie)|0,R=R+Math.imul(E,Ae)|0,b=b+Math.imul(be,Te)|0,u=u+Math.imul(be,Ne)|0,u=u+Math.imul(m,Te)|0,R=R+Math.imul(m,Ne)|0,b=b+Math.imul(ve,Be)|0,u=u+Math.imul(ve,Le)|0,u=u+Math.imul(Re,Be)|0,R=R+Math.imul(Re,Le)|0,b=b+Math.imul(Se,Pe)|0,u=u+Math.imul(Se,Oe)|0,u=u+Math.imul(Ee,Pe)|0,R=R+Math.imul(Ee,Oe)|0,b=b+Math.imul(ne,Fe)|0,u=u+Math.imul(ne,De)|0,u=u+Math.imul(we,Fe)|0,R=R+Math.imul(we,De)|0,b=b+Math.imul(G,je)|0,u=u+Math.imul(G,Ue)|0,u=u+Math.imul(oe,je)|0,R=R+Math.imul(oe,Ue)|0,b=b+Math.imul(C,$e)|0,u=u+Math.imul(C,He)|0,u=u+Math.imul(M,$e)|0,R=R+Math.imul(M,He)|0,b=b+Math.imul(V,We)|0,u=u+Math.imul(V,Ve)|0,u=u+Math.imul(Z,We)|0,R=R+Math.imul(Z,Ve)|0;var ar=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ar>>>26)|0,ar&=67108863,b=Math.imul(U,Ie),u=Math.imul(U,Ae),u=u+Math.imul(H,Ie)|0,R=Math.imul(H,Ae),b=b+Math.imul(f,Te)|0,u=u+Math.imul(f,Ne)|0,u=u+Math.imul(E,Te)|0,R=R+Math.imul(E,Ne)|0,b=b+Math.imul(be,Be)|0,u=u+Math.imul(be,Le)|0,u=u+Math.imul(m,Be)|0,R=R+Math.imul(m,Le)|0,b=b+Math.imul(ve,Pe)|0,u=u+Math.imul(ve,Oe)|0,u=u+Math.imul(Re,Pe)|0,R=R+Math.imul(Re,Oe)|0,b=b+Math.imul(Se,Fe)|0,u=u+Math.imul(Se,De)|0,u=u+Math.imul(Ee,Fe)|0,R=R+Math.imul(Ee,De)|0,b=b+Math.imul(ne,je)|0,u=u+Math.imul(ne,Ue)|0,u=u+Math.imul(we,je)|0,R=R+Math.imul(we,Ue)|0,b=b+Math.imul(G,$e)|0,u=u+Math.imul(G,He)|0,u=u+Math.imul(oe,$e)|0,R=R+Math.imul(oe,He)|0,b=b+Math.imul(C,We)|0,u=u+Math.imul(C,Ve)|0,u=u+Math.imul(M,We)|0,R=R+Math.imul(M,Ve)|0;var cr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(cr>>>26)|0,cr&=67108863,b=Math.imul(U,Te),u=Math.imul(U,Ne),u=u+Math.imul(H,Te)|0,R=Math.imul(H,Ne),b=b+Math.imul(f,Be)|0,u=u+Math.imul(f,Le)|0,u=u+Math.imul(E,Be)|0,R=R+Math.imul(E,Le)|0,b=b+Math.imul(be,Pe)|0,u=u+Math.imul(be,Oe)|0,u=u+Math.imul(m,Pe)|0,R=R+Math.imul(m,Oe)|0,b=b+Math.imul(ve,Fe)|0,u=u+Math.imul(ve,De)|0,u=u+Math.imul(Re,Fe)|0,R=R+Math.imul(Re,De)|0,b=b+Math.imul(Se,je)|0,u=u+Math.imul(Se,Ue)|0,u=u+Math.imul(Ee,je)|0,R=R+Math.imul(Ee,Ue)|0,b=b+Math.imul(ne,$e)|0,u=u+Math.imul(ne,He)|0,u=u+Math.imul(we,$e)|0,R=R+Math.imul(we,He)|0,b=b+Math.imul(G,We)|0,u=u+Math.imul(G,Ve)|0,u=u+Math.imul(oe,We)|0,R=R+Math.imul(oe,Ve)|0;var lr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(lr>>>26)|0,lr&=67108863,b=Math.imul(U,Be),u=Math.imul(U,Le),u=u+Math.imul(H,Be)|0,R=Math.imul(H,Le),b=b+Math.imul(f,Pe)|0,u=u+Math.imul(f,Oe)|0,u=u+Math.imul(E,Pe)|0,R=R+Math.imul(E,Oe)|0,b=b+Math.imul(be,Fe)|0,u=u+Math.imul(be,De)|0,u=u+Math.imul(m,Fe)|0,R=R+Math.imul(m,De)|0,b=b+Math.imul(ve,je)|0,u=u+Math.imul(ve,Ue)|0,u=u+Math.imul(Re,je)|0,R=R+Math.imul(Re,Ue)|0,b=b+Math.imul(Se,$e)|0,u=u+Math.imul(Se,He)|0,u=u+Math.imul(Ee,$e)|0,R=R+Math.imul(Ee,He)|0,b=b+Math.imul(ne,We)|0,u=u+Math.imul(ne,Ve)|0,u=u+Math.imul(we,We)|0,R=R+Math.imul(we,Ve)|0;var ur=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ur>>>26)|0,ur&=67108863,b=Math.imul(U,Pe),u=Math.imul(U,Oe),u=u+Math.imul(H,Pe)|0,R=Math.imul(H,Oe),b=b+Math.imul(f,Fe)|0,u=u+Math.imul(f,De)|0,u=u+Math.imul(E,Fe)|0,R=R+Math.imul(E,De)|0,b=b+Math.imul(be,je)|0,u=u+Math.imul(be,Ue)|0,u=u+Math.imul(m,je)|0,R=R+Math.imul(m,Ue)|0,b=b+Math.imul(ve,$e)|0,u=u+Math.imul(ve,He)|0,u=u+Math.imul(Re,$e)|0,R=R+Math.imul(Re,He)|0,b=b+Math.imul(Se,We)|0,u=u+Math.imul(Se,Ve)|0,u=u+Math.imul(Ee,We)|0,R=R+Math.imul(Ee,Ve)|0;var Cs=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,b=Math.imul(U,Fe),u=Math.imul(U,De),u=u+Math.imul(H,Fe)|0,R=Math.imul(H,De),b=b+Math.imul(f,je)|0,u=u+Math.imul(f,Ue)|0,u=u+Math.imul(E,je)|0,R=R+Math.imul(E,Ue)|0,b=b+Math.imul(be,$e)|0,u=u+Math.imul(be,He)|0,u=u+Math.imul(m,$e)|0,R=R+Math.imul(m,He)|0,b=b+Math.imul(ve,We)|0,u=u+Math.imul(ve,Ve)|0,u=u+Math.imul(Re,We)|0,R=R+Math.imul(Re,Ve)|0;var Ms=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,b=Math.imul(U,je),u=Math.imul(U,Ue),u=u+Math.imul(H,je)|0,R=Math.imul(H,Ue),b=b+Math.imul(f,$e)|0,u=u+Math.imul(f,He)|0,u=u+Math.imul(E,$e)|0,R=R+Math.imul(E,He)|0,b=b+Math.imul(be,We)|0,u=u+Math.imul(be,Ve)|0,u=u+Math.imul(m,We)|0,R=R+Math.imul(m,Ve)|0;var ks=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ks>>>26)|0,ks&=67108863,b=Math.imul(U,$e),u=Math.imul(U,He),u=u+Math.imul(H,$e)|0,R=Math.imul(H,He),b=b+Math.imul(f,We)|0,u=u+Math.imul(f,Ve)|0,u=u+Math.imul(E,We)|0,R=R+Math.imul(E,Ve)|0;var xs=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(U,We),u=Math.imul(U,Ve),u=u+Math.imul(H,We)|0,R=Math.imul(H,Ve);var Is=(B+b|0)+((u&8191)<<13)|0;return B=(R+(u>>>13)|0)+(Is>>>26)|0,Is&=67108863,x[0]=Qt,x[1]=Yt,x[2]=Xt,x[3]=er,x[4]=tr,x[5]=rr,x[6]=nr,x[7]=ir,x[8]=sr,x[9]=or,x[10]=ar,x[11]=cr,x[12]=lr,x[13]=ur,x[14]=Cs,x[15]=Ms,x[16]=ks,x[17]=xs,x[18]=Is,B!==0&&(x[19]=B,y.length++),y};Math.imul||(T=k);function L(A,c,d){d.negative=c.negative^A.negative,d.length=A.length+c.length;for(var y=0,v=0,S=0;S<d.length-1;S++){var x=v;v=0;for(var B=y&67108863,b=Math.min(S,c.length-1),u=Math.max(0,S-A.length+1);u<=b;u++){var R=S-u,Q=A.words[R]|0,J=c.words[u]|0,N=Q*J,j=N&67108863;x=x+(N/67108864|0)|0,j=j+B|0,B=j&67108863,x=x+(j>>>26)|0,v+=x>>>26,x&=67108863}d.words[S]=B,y=x,x=v}return y!==0?d.words[S]=y:d.length--,d._strip()}function W(A,c,d){return L(A,c,d)}s.prototype.mulTo=function(c,d){var y,v=this.length+c.length;return this.length===10&&c.length===10?y=T(this,c,d):v<63?y=k(this,c,d):v<1024?y=L(this,c,d):y=W(this,c,d),y},s.prototype.mul=function(c){var d=new s(null);return d.words=new Array(this.length+c.length),this.mulTo(c,d)},s.prototype.mulf=function(c){var d=new s(null);return d.words=new Array(this.length+c.length),W(this,c,d)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){var d=c<0;d&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var y=0,v=0;v<this.length;v++){var S=(this.words[v]|0)*c,x=(S&67108863)+(y&67108863);y>>=26,y+=S/67108864|0,y+=x>>>26,this.words[v]=x&67108863}return y!==0&&(this.words[v]=y,this.length++),this.length=c===0?1:this.length,d?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 d=O(c);if(d.length===0)return new s(1);for(var y=this,v=0;v<d.length&&d[v]===0;v++,y=y.sqr());if(++v<d.length)for(var S=y.sqr();v<d.length;v++,S=S.sqr())d[v]!==0&&(y=y.mul(S));return y},s.prototype.iushln=function(c){n(typeof c=="number"&&c>=0);var d=c%26,y=(c-d)/26,v=67108863>>>26-d<<26-d,S;if(d!==0){var x=0;for(S=0;S<this.length;S++){var B=this.words[S]&v,b=(this.words[S]|0)-B<<d;this.words[S]=b|x,x=B>>>26-d}x&&(this.words[S]=x,this.length++)}if(y!==0){for(S=this.length-1;S>=0;S--)this.words[S+y]=this.words[S];for(S=0;S<y;S++)this.words[S]=0;this.length+=y}return this._strip()},s.prototype.ishln=function(c){return n(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,d,y){n(typeof c=="number"&&c>=0);var v;d?v=(d-d%26)/26:v=0;var S=c%26,x=Math.min((c-S)/26,this.length),B=67108863^67108863>>>S<<S,b=y;if(v-=x,v=Math.max(0,v),b){for(var u=0;u<x;u++)b.words[u]=this.words[u];b.length=x}if(x!==0)if(this.length>x)for(this.length-=x,u=0;u<this.length;u++)this.words[u]=this.words[u+x];else this.words[0]=0,this.length=1;var R=0;for(u=this.length-1;u>=0&&(R!==0||u>=v);u--){var Q=this.words[u]|0;this.words[u]=R<<26-S|Q>>>S,R=Q&B}return b&&R!==0&&(b.words[b.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(c,d,y){return n(this.negative===0),this.iushrn(c,d,y)},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 d=c%26,y=(c-d)/26,v=1<<d;if(this.length<=y)return!1;var S=this.words[y];return!!(S&v)},s.prototype.imaskn=function(c){n(typeof c=="number"&&c>=0);var d=c%26,y=(c-d)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(d!==0&&y++,this.length=Math.min(y,this.length),d!==0){var v=67108863^67108863>>>d<<d;this.words[this.length-1]&=v}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 d=0;d<this.length&&this.words[d]>=67108864;d++)this.words[d]-=67108864,d===this.length-1?this.words[d+1]=1:this.words[d+1]++;return this.length=Math.max(this.length,d+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 d=0;d<this.length&&this.words[d]<0;d++)this.words[d]+=67108864,this.words[d+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,d,y){var v=c.length+y,S;this._expand(v);var x,B=0;for(S=0;S<c.length;S++){x=(this.words[S+y]|0)+B;var b=(c.words[S]|0)*d;x-=b&67108863,B=(x>>26)-(b/67108864|0),this.words[S+y]=x&67108863}for(;S<this.length-y;S++)x=(this.words[S+y]|0)+B,B=x>>26,this.words[S+y]=x&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,S=0;S<this.length;S++)x=-(this.words[S]|0)+B,B=x>>26,this.words[S]=x&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(c,d){var y=this.length-c.length,v=this.clone(),S=c,x=S.words[S.length-1]|0,B=this._countBits(x);y=26-B,y!==0&&(S=S.ushln(y),v.iushln(y),x=S.words[S.length-1]|0);var b=v.length-S.length,u;if(d!=="mod"){u=new s(null),u.length=b+1,u.words=new Array(u.length);for(var R=0;R<u.length;R++)u.words[R]=0}var Q=v.clone()._ishlnsubmul(S,1,b);Q.negative===0&&(v=Q,u&&(u.words[b]=1));for(var J=b-1;J>=0;J--){var N=(v.words[S.length+J]|0)*67108864+(v.words[S.length+J-1]|0);for(N=Math.min(N/x|0,67108863),v._ishlnsubmul(S,N,J);v.negative!==0;)N--,v.negative=0,v._ishlnsubmul(S,1,J),v.isZero()||(v.negative^=1);u&&(u.words[J]=N)}return u&&u._strip(),v._strip(),d!=="div"&&y!==0&&v.iushrn(y),{div:u||null,mod:v}},s.prototype.divmod=function(c,d,y){if(n(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var v,S,x;return this.negative!==0&&c.negative===0?(x=this.neg().divmod(c,d),d!=="mod"&&(v=x.div.neg()),d!=="div"&&(S=x.mod.neg(),y&&S.negative!==0&&S.iadd(c)),{div:v,mod:S}):this.negative===0&&c.negative!==0?(x=this.divmod(c.neg(),d),d!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&c.negative?(x=this.neg().divmod(c.neg(),d),d!=="div"&&(S=x.mod.neg(),y&&S.negative!==0&&S.isub(c)),{div:x.div,mod:S}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?d==="div"?{div:this.divn(c.words[0]),mod:null}:d==="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,d)},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 d=this.divmod(c);if(d.mod.isZero())return d.div;var y=d.div.negative!==0?d.mod.isub(c):d.mod,v=c.ushrn(1),S=c.andln(1),x=y.cmp(v);return x<0||S===1&&x===0?d.div:d.div.negative!==0?d.div.isubn(1):d.div.iaddn(1)},s.prototype.modrn=function(c){var d=c<0;d&&(c=-c),n(c<=67108863);for(var y=(1<<26)%c,v=0,S=this.length-1;S>=0;S--)v=(y*v+(this.words[S]|0))%c;return d?-v:v},s.prototype.modn=function(c){return this.modrn(c)},s.prototype.idivn=function(c){var d=c<0;d&&(c=-c),n(c<=67108863);for(var y=0,v=this.length-1;v>=0;v--){var S=(this.words[v]|0)+y*67108864;this.words[v]=S/c|0,y=S%c}return this._strip(),d?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 d=this,y=c.clone();d.negative!==0?d=d.umod(c):d=d.clone();for(var v=new s(1),S=new s(0),x=new s(0),B=new s(1),b=0;d.isEven()&&y.isEven();)d.iushrn(1),y.iushrn(1),++b;for(var u=y.clone(),R=d.clone();!d.isZero();){for(var Q=0,J=1;!(d.words[0]&J)&&Q<26;++Q,J<<=1);if(Q>0)for(d.iushrn(Q);Q-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(u),S.isub(R)),v.iushrn(1),S.iushrn(1);for(var N=0,j=1;!(y.words[0]&j)&&N<26;++N,j<<=1);if(N>0)for(y.iushrn(N);N-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(u),B.isub(R)),x.iushrn(1),B.iushrn(1);d.cmp(y)>=0?(d.isub(y),v.isub(x),S.isub(B)):(y.isub(d),x.isub(v),B.isub(S))}return{a:x,b:B,gcd:y.iushln(b)}},s.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var d=this,y=c.clone();d.negative!==0?d=d.umod(c):d=d.clone();for(var v=new s(1),S=new s(0),x=y.clone();d.cmpn(1)>0&&y.cmpn(1)>0;){for(var B=0,b=1;!(d.words[0]&b)&&B<26;++B,b<<=1);if(B>0)for(d.iushrn(B);B-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var u=0,R=1;!(y.words[0]&R)&&u<26;++u,R<<=1);if(u>0)for(y.iushrn(u);u-- >0;)S.isOdd()&&S.iadd(x),S.iushrn(1);d.cmp(y)>=0?(d.isub(y),v.isub(S)):(y.isub(d),S.isub(v))}var Q;return d.cmpn(1)===0?Q=v:Q=S,Q.cmpn(0)<0&&Q.iadd(c),Q},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var d=this.clone(),y=c.clone();d.negative=0,y.negative=0;for(var v=0;d.isEven()&&y.isEven();v++)d.iushrn(1),y.iushrn(1);do{for(;d.isEven();)d.iushrn(1);for(;y.isEven();)y.iushrn(1);var S=d.cmp(y);if(S<0){var x=d;d=y,y=x}else if(S===0||y.cmpn(1)===0)break;d.isub(y)}while(!0);return y.iushln(v)},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 d=c%26,y=(c-d)/26,v=1<<d;if(this.length<=y)return this._expand(y+1),this.words[y]|=v,this;for(var S=v,x=y;S!==0&&x<this.length;x++){var B=this.words[x]|0;B+=S,S=B>>>26,B&=67108863,this.words[x]=B}return S!==0&&(this.words[x]=S,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var d=c<0;if(this.negative!==0&&!d)return-1;if(this.negative===0&&d)return 1;this._strip();var y;if(this.length>1)y=1;else{d&&(c=-c),n(c<=67108863,"Number is too big");var v=this.words[0]|0;y=v===c?0:v<c?-1:1}return this.negative!==0?-y|0:y},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var d=this.ucmp(c);return this.negative!==0?-d|0:d},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var d=0,y=this.length-1;y>=0;y--){var v=this.words[y]|0,S=c.words[y]|0;if(v!==S){v<S?d=-1:v>S&&(d=1);break}}return d},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 re(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 $={k256:null,p224:null,p192:null,p25519:null};function z(A,c){this.name=A,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 d=c,y;do this.split(d,this.tmp),d=this.imulK(d),d=d.iadd(this.tmp),y=d.bitLength();while(y>this.n);var v=y<this.n?-1:d.ucmp(this.p);return v===0?(d.words[0]=0,d.length=1):v>0?d.isub(this.p):d.strip!==void 0?d.strip():d._strip(),d},z.prototype.split=function(c,d){c.iushrn(this.n,0,d)},z.prototype.imulK=function(c){return c.imul(this.k)};function ee(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,z),ee.prototype.split=function(c,d){for(var y=4194303,v=Math.min(c.length,9),S=0;S<v;S++)d.words[S]=c.words[S];if(d.length=v,c.length<=9){c.words[0]=0,c.length=1;return}var x=c.words[9];for(d.words[d.length++]=x&y,S=10;S<c.length;S++){var B=c.words[S]|0;c.words[S-10]=(B&y)<<4|x>>>22,x=B}x>>>=22,c.words[S-10]=x,x===0&&c.length>10?c.length-=10:c.length-=9},ee.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var d=0,y=0;y<c.length;y++){var v=c.words[y]|0;d+=v*977,c.words[y]=d&67108863,d=v*64+(d/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(Y,z);function K(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(K,z);function de(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(de,z),de.prototype.imulK=function(c){for(var d=0,y=0;y<c.length;y++){var v=(c.words[y]|0)*19+d,S=v&67108863;v>>>=26,c.words[y]=S,d=v}return d!==0&&(c.words[c.length++]=d),c},s._prime=function(c){if($[c])return $[c];var d;if(c==="k256")d=new ee;else if(c==="p224")d=new Y;else if(c==="p192")d=new K;else if(c==="p25519")d=new de;else throw new Error("Unknown prime "+c);return $[c]=d,d};function re(A){if(typeof A=="string"){var c=s._prime(A);this.m=c.p,this.prime=c}else n(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}re.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},re.prototype._verify2=function(c,d){n((c.negative|d.negative)===0,"red works only with positives"),n(c.red&&c.red===d.red,"red works only with red numbers")},re.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(g(c,c.umod(this.m)._forceRed(this)),c)},re.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},re.prototype.add=function(c,d){this._verify2(c,d);var y=c.add(d);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},re.prototype.iadd=function(c,d){this._verify2(c,d);var y=c.iadd(d);return y.cmp(this.m)>=0&&y.isub(this.m),y},re.prototype.sub=function(c,d){this._verify2(c,d);var y=c.sub(d);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},re.prototype.isub=function(c,d){this._verify2(c,d);var y=c.isub(d);return y.cmpn(0)<0&&y.iadd(this.m),y},re.prototype.shl=function(c,d){return this._verify1(c),this.imod(c.ushln(d))},re.prototype.imul=function(c,d){return this._verify2(c,d),this.imod(c.imul(d))},re.prototype.mul=function(c,d){return this._verify2(c,d),this.imod(c.mul(d))},re.prototype.isqr=function(c){return this.imul(c,c.clone())},re.prototype.sqr=function(c){return this.mul(c,c)},re.prototype.sqrt=function(c){if(c.isZero())return c.clone();var d=this.m.andln(3);if(n(d%2===1),d===3){var y=this.m.add(new s(1)).iushrn(2);return this.pow(c,y)}for(var v=this.m.subn(1),S=0;!v.isZero()&&v.andln(1)===0;)S++,v.iushrn(1);n(!v.isZero());var x=new s(1).toRed(this),B=x.redNeg(),b=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);this.pow(u,b).cmp(B)!==0;)u.redIAdd(B);for(var R=this.pow(u,v),Q=this.pow(c,v.addn(1).iushrn(1)),J=this.pow(c,v),N=S;J.cmp(x)!==0;){for(var j=J,V=0;j.cmp(x)!==0;V++)j=j.redSqr();n(V<N);var Z=this.pow(R,new s(1).iushln(N-V-1));Q=Q.redMul(Z),R=Z.redSqr(),J=J.redMul(R),N=V}return Q},re.prototype.invm=function(c){var d=c._invmp(this.m);return d.negative!==0?(d.negative=0,this.imod(d).redNeg()):this.imod(d)},re.prototype.pow=function(c,d){if(d.isZero())return new s(1).toRed(this);if(d.cmpn(1)===0)return c.clone();var y=4,v=new Array(1<<y);v[0]=new s(1).toRed(this),v[1]=c;for(var S=2;S<v.length;S++)v[S]=this.mul(v[S-1],c);var x=v[0],B=0,b=0,u=d.bitLength()%26;for(u===0&&(u=26),S=d.length-1;S>=0;S--){for(var R=d.words[S],Q=u-1;Q>=0;Q--){var J=R>>Q&1;if(x!==v[0]&&(x=this.sqr(x)),J===0&&B===0){b=0;continue}B<<=1,B|=J,b++,!(b!==y&&(S!==0||Q!==0))&&(x=this.mul(x,v[B]),b=0,B=0)}u=26}return x},re.prototype.convertTo=function(c){var d=c.umod(this.m);return d===c?d.clone():d},re.prototype.convertFrom=function(c){var d=c.clone();return d.red=null,d},s.mont=function(c){return new ce(c)};function ce(A){re.call(this,A),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(ce,re),ce.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},ce.prototype.convertFrom=function(c){var d=this.imod(c.mul(this.rinv));return d.red=null,d},ce.prototype.imul=function(c,d){if(c.isZero()||d.isZero())return c.words[0]=0,c.length=1,c;var y=c.imul(d),v=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=y.isub(v).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},ce.prototype.mul=function(c,d){if(c.isZero()||d.isZero())return new s(0)._forceRed(this);var y=c.mul(d),v=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=y.isub(v).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},ce.prototype.invm=function(c){var d=this.imod(c._invmp(this.m).mul(this.r2));return d._forceRed(this)}})(e,te)})(Bo);var Ni=Bo.exports,Mn={},$t={};Object.defineProperty($t,"__esModule",{value:!0});$t.errorValues=$t.standardErrorCodes=void 0;$t.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};$t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var Bi={},Li={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=$t,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(w,I=r){if(w&&Number.isInteger(w)){const D=w.toString();if(g(t.errorValues,D))return t.errorValues[D].message;if(h(w))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return I}e.getMessageFromCode=n;function i(w){if(!Number.isInteger(w))return!1;const I=w.toString();return!!(t.errorValues[I]||h(w))}e.isValidCode=i;function s(w){var I;if(typeof w=="number")return w;if(a(w))return(I=w.code)!==null&&I!==void 0?I:w.errorCode}e.getErrorCode=s;function a(w){return typeof w=="object"&&w!==null&&(typeof w.code=="number"||typeof w.errorCode=="number")}function o(w,{shouldIncludeStack:I=!1}={}){const D={};if(w&&typeof w=="object"&&!Array.isArray(w)&&g(w,"code")&&i(w.code)){const F=w;D.code=F.code,F.message&&typeof F.message=="string"?(D.message=F.message,g(F,"data")&&(D.data=F.data)):(D.message=n(D.code),D.data={originalError:p(w)})}else D.code=t.standardErrorCodes.rpc.internal,D.message=_(w,"message")?w.message:r,D.data={originalError:p(w)};return I&&(D.stack=_(w,"stack")?w.stack:void 0),D}e.serialize=o;function h(w){return w>=-32099&&w<=-32e3}function p(w){return w&&typeof w=="object"&&!Array.isArray(w)?Object.assign({},w):w}function g(w,I){return Object.prototype.hasOwnProperty.call(w,I)}function _(w,I){return typeof w=="object"&&w!==null&&I in w&&typeof w[I]=="string"}})(Li);Object.defineProperty(Bi,"__esModule",{value:!0});Bi.standardErrors=void 0;const nt=$t,nl=Li;Bi.standardErrors={rpc:{parse:e=>gt(nt.standardErrorCodes.rpc.parse,e),invalidRequest:e=>gt(nt.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>gt(nt.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>gt(nt.standardErrorCodes.rpc.methodNotFound,e),internal:e=>gt(nt.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return gt(t,e)},invalidInput:e=>gt(nt.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>gt(nt.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>gt(nt.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>gt(nt.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>gt(nt.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>gt(nt.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Or(nt.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>Or(nt.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>Or(nt.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>Or(nt.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>Or(nt.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>Or(nt.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ol(t,r,n)}}};function gt(e,t){const[r,n]=il(t);return new sl(e,r||(0,nl.getMessageFromCode)(e),n)}function Or(e,t){const[r,n]=il(t);return new ol(e,r||(0,nl.getMessageFromCode)(e),n)}function il(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let sl=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))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=t,n!==void 0&&(this.data=n)}},ol=class extends sl{constructor(t,r,n){if(!hf(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function hf(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var Pi={},on={};Object.defineProperty(on,"__esModule",{value:!0});on.isErrorResponse=void 0;function ff(e){return e.errorMessage!==void 0}on.isErrorResponse=ff;var an={};Object.defineProperty(an,"__esModule",{value:!0});an.LIB_VERSION=void 0;an.LIB_VERSION="3.9.3";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.serializeError=void 0;const df=on,pf=an,gf=$t,_f=Li;function mf(e,t){const r=(0,_f.serialize)(yf(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",pf.LIB_VERSION),n.searchParams.set("code",r.code.toString());const i=wf(r.data,t);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}Pi.serializeError=mf;function yf(e){return typeof e=="string"?{message:e,code:gf.standardErrorCodes.rpc.internal}:(0,df.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function wf(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=$t;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=Bi;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=Pi;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=Li;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(Mn);var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ProviderType=Ye.RegExpString=Ye.IntNumber=Ye.BigIntString=Ye.AddressString=Ye.HexString=Ye.OpaqueType=void 0;function kn(){return e=>e}Ye.OpaqueType=kn;Ye.HexString=kn();Ye.AddressString=kn();Ye.BigIntString=kn();function vf(e){return Math.floor(e)}Ye.IntNumber=vf;Ye.RegExpString=kn();var va;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(va||(Ye.ProviderType=va={}));var bf=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});X.isMobileWeb=X.getLocation=X.isInIFrame=X.createQrUrl=X.getFavicon=X.range=X.isBigNumber=X.ensureParsedJSONObject=X.ensureBN=X.ensureRegExpString=X.ensureIntNumber=X.ensureBuffer=X.ensureAddressString=X.ensureEvenLengthHexString=X.ensureHexString=X.isHexString=X.prepend0x=X.strip0x=X.has0xPrefix=X.hexStringFromIntNumber=X.intNumberFromHexString=X.bigIntStringFromBN=X.hexStringFromBuffer=X.hexStringToUint8Array=X.uint8ArrayToHex=X.randomBytesHex=void 0;const Gt=bf(Ni),Sr=Mn,vt=Ye,al=/^[0-9]*$/,cl=/^[a-f0-9]*$/;function Ef(e){return ll(crypto.getRandomValues(new Uint8Array(e)))}X.randomBytesHex=Ef;function ll(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}X.uint8ArrayToHex=ll;function Sf(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}X.hexStringToUint8Array=Sf;function Rf(e,t=!1){const r=e.toString("hex");return(0,vt.HexString)(t?`0x${r}`:r)}X.hexStringFromBuffer=Rf;function Cf(e){return(0,vt.BigIntString)(e.toString(10))}X.bigIntStringFromBN=Cf;function Mf(e){return(0,vt.IntNumber)(new Gt.default(In(e,!1),16).toNumber())}X.intNumberFromHexString=Mf;function kf(e){return(0,vt.HexString)(`0x${new Gt.default(e).toString(16)}`)}X.hexStringFromIntNumber=kf;function Lo(e){return e.startsWith("0x")||e.startsWith("0X")}X.has0xPrefix=Lo;function Oi(e){return Lo(e)?e.slice(2):e}X.strip0x=Oi;function ul(e){return Lo(e)?`0x${e.slice(2)}`:`0x${e}`}X.prepend0x=ul;function xn(e){if(typeof e!="string")return!1;const t=Oi(e).toLowerCase();return cl.test(t)}X.isHexString=xn;function hl(e,t=!1){if(typeof e=="string"){const r=Oi(e).toLowerCase();if(cl.test(r))return(0,vt.HexString)(t?`0x${r}`:r)}throw Sr.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}X.ensureHexString=hl;function In(e,t=!1){let r=hl(e,!1);return r.length%2===1&&(r=(0,vt.HexString)(`0${r}`)),t?(0,vt.HexString)(`0x${r}`):r}X.ensureEvenLengthHexString=In;function xf(e){if(typeof e=="string"){const t=Oi(e).toLowerCase();if(xn(t)&&t.length===40)return(0,vt.AddressString)(ul(t))}throw Sr.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}X.ensureAddressString=xf;function If(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(xn(e)){const t=In(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw Sr.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}X.ensureBuffer=If;function fl(e){if(typeof e=="number"&&Number.isInteger(e))return(0,vt.IntNumber)(e);if(typeof e=="string"){if(al.test(e))return(0,vt.IntNumber)(Number(e));if(xn(e))return(0,vt.IntNumber)(new Gt.default(In(e,!1),16).toNumber())}throw Sr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}X.ensureIntNumber=fl;function Af(e){if(e instanceof RegExp)return(0,vt.RegExpString)(e.toString());throw Sr.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}X.ensureRegExpString=Af;function Tf(e){if(e!==null&&(Gt.default.isBN(e)||dl(e)))return new Gt.default(e.toString(10),10);if(typeof e=="number")return new Gt.default(fl(e));if(typeof e=="string"){if(al.test(e))return new Gt.default(e,10);if(xn(e))return new Gt.default(In(e,!1),16)}throw Sr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}X.ensureBN=Tf;function Nf(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw Sr.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}X.ensureParsedJSONObject=Nf;function dl(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}X.isBigNumber=dl;function Bf(e,t){return Array.from({length:t-e},(r,n)=>e+n)}X.range=Bf;function Lf(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}X.getFavicon=Lf;function Pf(e,t,r,n,i,s){const a=n?"parent-id":"id",o=new URLSearchParams({[a]:e,secret:t,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${o}`}X.createQrUrl=Pf;function pl(){try{return window.frameElement!==null}catch{return!1}}X.isInIFrame=pl;function Of(){try{return pl()&&window.top?window.top.location:window.location}catch{return window.location}}X.getLocation=Of;function Ff(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}X.isMobileWeb=Ff;var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ScopedLocalStorage=void 0;class Df{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(t)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}Fi.ScopedLocalStorage=Df;var Zr={},gl={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,p,g){this.fn=h,this.context=p,this.once=g||!1}function s(h,p,g,_,w){if(typeof g!="function")throw new TypeError("The listener must be a function");var I=new i(g,_||h,w),D=r?r+p:p;return h._events[D]?h._events[D].fn?h._events[D]=[h._events[D],I]:h._events[D].push(I):(h._events[D]=I,h._eventsCount++),h}function a(h,p){--h._eventsCount===0?h._events=new n:delete h._events[p]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var p=[],g,_;if(this._eventsCount===0)return p;for(_ in g=this._events)t.call(g,_)&&p.push(r?_.slice(1):_);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},o.prototype.listeners=function(p){var g=r?r+p:p,_=this._events[g];if(!_)return[];if(_.fn)return[_.fn];for(var w=0,I=_.length,D=new Array(I);w<I;w++)D[w]=_[w].fn;return D},o.prototype.listenerCount=function(p){var g=r?r+p:p,_=this._events[g];return _?_.fn?1:_.length:0},o.prototype.emit=function(p,g,_,w,I,D){var F=r?r+p:p;if(!this._events[F])return!1;var O=this._events[F],k=arguments.length,T,L;if(O.fn){switch(O.once&&this.removeListener(p,O.fn,void 0,!0),k){case 1:return O.fn.call(O.context),!0;case 2:return O.fn.call(O.context,g),!0;case 3:return O.fn.call(O.context,g,_),!0;case 4:return O.fn.call(O.context,g,_,w),!0;case 5:return O.fn.call(O.context,g,_,w,I),!0;case 6:return O.fn.call(O.context,g,_,w,I,D),!0}for(L=1,T=new Array(k-1);L<k;L++)T[L-1]=arguments[L];O.fn.apply(O.context,T)}else{var W=O.length,$;for(L=0;L<W;L++)switch(O[L].once&&this.removeListener(p,O[L].fn,void 0,!0),k){case 1:O[L].fn.call(O[L].context);break;case 2:O[L].fn.call(O[L].context,g);break;case 3:O[L].fn.call(O[L].context,g,_);break;case 4:O[L].fn.call(O[L].context,g,_,w);break;default:if(!T)for($=1,T=new Array(k-1);$<k;$++)T[$-1]=arguments[$];O[L].fn.apply(O[L].context,T)}}return!0},o.prototype.on=function(p,g,_){return s(this,p,g,_,!1)},o.prototype.once=function(p,g,_){return s(this,p,g,_,!0)},o.prototype.removeListener=function(p,g,_,w){var I=r?r+p:p;if(!this._events[I])return this;if(!g)return a(this,I),this;var D=this._events[I];if(D.fn)D.fn===g&&(!w||D.once)&&(!_||D.context===_)&&a(this,I);else{for(var F=0,O=[],k=D.length;F<k;F++)(D[F].fn!==g||w&&!D[F].once||_&&D[F].context!==_)&&O.push(D[F]);O.length?this._events[I]=O.length===1?O[0]:O:a(this,I)}return this},o.prototype.removeAllListeners=function(p){var g;return p?(g=r?r+p:p,this._events[g]&&a(this,g)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(gl);var jf=gl.exports,An={},Tn={},cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.EVENTS=void 0;cn.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.RelayAbstract=wt.APP_VERSION_KEY=wt.LOCAL_STORAGE_ADDRESSES_KEY=wt.WALLET_USER_NAME_KEY=void 0;const ba=Mn;wt.WALLET_USER_NAME_KEY="walletUsername";wt.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";wt.APP_VERSION_KEY="AppVersion";class Uf{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw ba.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,ba.serializeError)(s,t.method);return i})}}wt.RelayAbstract=Uf;var ln={},_l={exports:{}},po={exports:{}},Nn={},Di={};Di.byteLength=Wf;Di.toByteArray=zf;Di.fromByteArray=Jf;var Bt=[],yt=[],$f=typeof Uint8Array<"u"?Uint8Array:Array,Ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Fr=0,Hf=Ns.length;Fr<Hf;++Fr)Bt[Fr]=Ns[Fr],yt[Ns.charCodeAt(Fr)]=Fr;yt[45]=62;yt[95]=63;function ml(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Wf(e){var t=ml(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Vf(e,t,r){return(t+r)*3/4-r}function zf(e){var t,r=ml(e),n=r[0],i=r[1],s=new $f(Vf(e,n,i)),a=0,o=i>0?n-4:n,h;for(h=0;h<o;h+=4)t=yt[e.charCodeAt(h)]<<18|yt[e.charCodeAt(h+1)]<<12|yt[e.charCodeAt(h+2)]<<6|yt[e.charCodeAt(h+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=t&255;return i===2&&(t=yt[e.charCodeAt(h)]<<2|yt[e.charCodeAt(h+1)]>>4,s[a++]=t&255),i===1&&(t=yt[e.charCodeAt(h)]<<10|yt[e.charCodeAt(h+1)]<<4|yt[e.charCodeAt(h+2)]>>2,s[a++]=t>>8&255,s[a++]=t&255),s}function qf(e){return Bt[e>>18&63]+Bt[e>>12&63]+Bt[e>>6&63]+Bt[e&63]}function Gf(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(qf(n));return i.join("")}function Jf(e){for(var t,r=e.length,n=r%3,i=[],s=16383,a=0,o=r-n;a<o;a+=s)i.push(Gf(e,a,a+s>o?o:a+s));return n===1?(t=e[r-1],i.push(Bt[t>>2]+Bt[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Bt[t>>10]+Bt[t>>4&63]+Bt[t<<2&63]+"=")),i.join("")}var Po={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Po.read=function(e,t,r,n,i){var s,a,o=i*8-n-1,h=(1<<o)-1,p=h>>1,g=-7,_=r?i-1:0,w=r?-1:1,I=e[t+_];for(_+=w,s=I&(1<<-g)-1,I>>=-g,g+=o;g>0;s=s*256+e[t+_],_+=w,g-=8);for(a=s&(1<<-g)-1,s>>=-g,g+=n;g>0;a=a*256+e[t+_],_+=w,g-=8);if(s===0)s=1-p;else{if(s===h)return a?NaN:(I?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-p}return(I?-1:1)*a*Math.pow(2,s-n)};Po.write=function(e,t,r,n,i,s){var a,o,h,p=s*8-i-1,g=(1<<p)-1,_=g>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=n?0:s-1,D=n?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=g):(a=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+_>=1?t+=w/h:t+=w*Math.pow(2,1-_),t*h>=2&&(a++,h/=2),a+_>=g?(o=0,a=g):a+_>=1?(o=(t*h-1)*Math.pow(2,i),a=a+_):(o=t*Math.pow(2,_-1)*Math.pow(2,i),a=0));i>=8;e[r+I]=o&255,I+=D,o/=256,i-=8);for(a=a<<i|o,p+=i;p>0;e[r+I]=a&255,I+=D,a/=256,p-=8);e[r+I-D]|=F*128};/*!
|
|
1
|
+
import{g as sn,c as te,b as Xc,s as Rh,d as Ch,f as Mh,h as kh,t as xh,e as Ii,a as Ih}from"./index-Br5IV31H.js";import{i as Mt,t as Ah}from"./inherits_browser-Dbwsx_3T.js";function Th(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Nh={},Bh=Object.freeze(Object.defineProperty({__proto__:null,default:Nh},Symbol.toStringTag,{value:"Module"})),Io=sn(Bh);var Lh={}.toString,Ph=Array.isArray||function(e){return Lh.call(e)=="[object Array]"},el=Function.prototype.toString,Wr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lo,mi;if(typeof Wr=="function"&&typeof Object.defineProperty=="function")try{lo=Object.defineProperty({},"length",{get:function(){throw mi}}),mi={},Wr(function(){throw 42},null,lo)}catch(e){e!==mi&&(Wr=null)}else Wr=null;var Oh=/^\s*class\b/,uo=function(t){try{var r=el.call(t);return Oh.test(r)}catch{return!1}},As=function(t){try{return uo(t)?!1:(el.call(t),!0)}catch{return!1}},yi=Object.prototype.toString,Fh="[object Object]",Dh="[object Function]",jh="[object GeneratorFunction]",Uh="[object HTMLAllCollection]",$h="[object HTML document.all class]",Hh="[object HTMLCollection]",Wh=typeof Symbol=="function"&&!!Symbol.toStringTag,Vh=!(0 in[,]),ho=function(){return!1};if(typeof document=="object"){var zh=document.all;yi.call(zh)===yi.call(document.all)&&(ho=function(t){if((Vh||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=yi.call(t);return(r===Uh||r===$h||r===Hh||r===Fh)&&t("")==null}catch{}return!1})}var qh=Wr?function(t){if(ho(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Wr(t,null,lo)}catch(r){if(r!==mi)return!1}return!uo(t)&&As(t)}:function(t){if(ho(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(Wh)return As(t);if(uo(t))return!1;var r=yi.call(t);return r!==Dh&&r!==jh&&!/^\[object HTML/.test(r)?!1:As(t)},Gh=qh,Jh=Object.prototype.toString,tl=Object.prototype.hasOwnProperty,Zh=function(t,r,n){for(var i=0,s=t.length;i<s;i++)tl.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},Kh=function(t,r,n){for(var i=0,s=t.length;i<s;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},Qh=function(t,r,n){for(var i in t)tl.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))};function Yh(e){return Jh.call(e)==="[object Array]"}var Xh=function(t,r,n){if(!Gh(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),Yh(t)?Zh(t,r,i):typeof t=="string"?Kh(t,r,i):Qh(t,r,i)},ef=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ts=ef,tf=typeof globalThis>"u"?te:globalThis,rf=function(){for(var t=[],r=0;r<Ts.length;r++)typeof tf[Ts[r]]=="function"&&(t[t.length]=Ts[r]);return t},Si=Xh,nf=rf,ya=kh,Ao=Xc,wi=Ch,ri=Mh,sf=Ao("Object.prototype.toString"),rl=Rh(),wa=typeof globalThis>"u"?te:globalThis,fo=nf(),To=Ao("String.prototype.slice"),of=Ao("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},Ri={__proto__:null};rl&&wi&&ri?Si(fo,function(e){var t=new wa[e];if(Symbol.toStringTag in t&&ri){var r=ri(t),n=wi(r,Symbol.toStringTag);if(!n&&r){var i=ri(r);n=wi(i,Symbol.toStringTag)}Ri["$"+e]=ya(n.get)}}):Si(fo,function(e){var t=new wa[e],r=t.slice||t.set;r&&(Ri["$"+e]=ya(r))});var af=function(t){var r=!1;return Si(Ri,function(n,i){if(!r)try{"$"+n(t)===i&&(r=To(i,1))}catch{}}),r},cf=function(t){var r=!1;return Si(Ri,function(n,i){if(!r)try{n(t),r=To(i,1)}catch{}}),r},lf=function(t){if(!t||typeof t!="object")return!1;if(!rl){var r=To(sf(t),8,-1);return of(fo,r)>-1?r:r!=="Object"?!1:cf(t)}return wi?af(t):null},No={},bn={},Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.walletLogo=void 0;const uf=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' 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=t,`data:image/svg+xml,%3Csvg width='${t}' 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 `}};Ai.walletLogo=uf;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.LINK_API_URL=void 0;Ti.LINK_API_URL="https://www.walletlink.org";var X={},Bo={exports:{}};Bo.exports;(function(e){(function(t,r){function n(A,c){if(!A)throw new Error(c||"Assertion failed")}function i(A,c){A.super_=c;var d=function(){};d.prototype=c.prototype,A.prototype=new d,A.prototype.constructor=A}function s(A,c,d){if(s.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,A!==null&&((c==="le"||c==="be")&&(d=c,c=10),this._init(A||0,c||10,d||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Io.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,d){return c.cmp(d)>0?c:d},s.min=function(c,d){return c.cmp(d)<0?c:d},s.prototype._init=function(c,d,y){if(typeof c=="number")return this._initNumber(c,d,y);if(typeof c=="object")return this._initArray(c,d,y);d==="hex"&&(d=16),n(d===(d|0)&&d>=2&&d<=36),c=c.toString().replace(/\s+/g,"");var v=0;c[0]==="-"&&(v++,this.negative=1),v<c.length&&(d===16?this._parseHex(c,v,y):(this._parseBase(c,d,v),y==="le"&&this._initArray(this.toArray(),d,y)))},s.prototype._initNumber=function(c,d,y){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),y==="le"&&this._initArray(this.toArray(),d,y)},s.prototype._initArray=function(c,d,y){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 v=0;v<this.length;v++)this.words[v]=0;var S,x,B=0;if(y==="be")for(v=c.length-1,S=0;v>=0;v-=3)x=c[v]|c[v-1]<<8|c[v-2]<<16,this.words[S]|=x<<B&67108863,this.words[S+1]=x>>>26-B&67108863,B+=24,B>=26&&(B-=26,S++);else if(y==="le")for(v=0,S=0;v<c.length;v+=3)x=c[v]|c[v+1]<<8|c[v+2]<<16,this.words[S]|=x<<B&67108863,this.words[S+1]=x>>>26-B&67108863,B+=24,B>=26&&(B-=26,S++);return this._strip()};function o(A,c){var d=A.charCodeAt(c);if(d>=48&&d<=57)return d-48;if(d>=65&&d<=70)return d-55;if(d>=97&&d<=102)return d-87;n(!1,"Invalid character in "+A)}function h(A,c,d){var y=o(A,d);return d-1>=c&&(y|=o(A,d-1)<<4),y}s.prototype._parseHex=function(c,d,y){this.length=Math.ceil((c.length-d)/6),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var S=0,x=0,B;if(y==="be")for(v=c.length-1;v>=d;v-=2)B=h(c,d,v)<<S,this.words[x]|=B&67108863,S>=18?(S-=18,x+=1,this.words[x]|=B>>>26):S+=8;else{var b=c.length-d;for(v=b%2===0?d+1:d;v<c.length;v+=2)B=h(c,d,v)<<S,this.words[x]|=B&67108863,S>=18?(S-=18,x+=1,this.words[x]|=B>>>26):S+=8}this._strip()};function p(A,c,d,y){for(var v=0,S=0,x=Math.min(A.length,d),B=c;B<x;B++){var b=A.charCodeAt(B)-48;v*=y,b>=49?S=b-49+10:b>=17?S=b-17+10:S=b,n(b>=0&&S<y,"Invalid character"),v+=S}return v}s.prototype._parseBase=function(c,d,y){this.words=[0],this.length=1;for(var v=0,S=1;S<=67108863;S*=d)v++;v--,S=S/d|0;for(var x=c.length-y,B=x%v,b=Math.min(x,x-B)+y,u=0,R=y;R<b;R+=v)u=p(c,R,R+v,d),this.imuln(S),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(B!==0){var Q=1;for(u=p(c,R,c.length,d),R=0;R<B;R++)Q*=d;this.imuln(Q),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},s.prototype.copy=function(c){c.words=new Array(this.length);for(var d=0;d<this.length;d++)c.words[d]=this.words[d];c.length=this.length,c.negative=this.negative,c.red=this.red};function g(A,c){A.words=c.words,A.length=c.length,A.negative=c.negative,A.red=c.red}if(s.prototype._move=function(c){g(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")]=_}catch{s.prototype.inspect=_}else s.prototype.inspect=_;function _(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var w=["","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"],I=[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],D=[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,d){c=c||10,d=d|0||1;var y;if(c===16||c==="hex"){y="";for(var v=0,S=0,x=0;x<this.length;x++){var B=this.words[x],b=((B<<v|S)&16777215).toString(16);S=B>>>24-v&16777215,v+=2,v>=26&&(v-=26,x--),S!==0||x!==this.length-1?y=w[6-b.length]+b+y:y=b+y}for(S!==0&&(y=S.toString(16)+y);y.length%d!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(c===(c|0)&&c>=2&&c<=36){var u=I[c],R=D[c];y="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var J=Q.modrn(R).toString(c);Q=Q.idivn(R),Q.isZero()?y=J+y:y=w[u-J.length]+J+y}for(this.isZero()&&(y="0"+y);y.length%d!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}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)},a&&(s.prototype.toBuffer=function(c,d){return this.toArrayLike(a,c,d)}),s.prototype.toArray=function(c,d){return this.toArrayLike(Array,c,d)};var F=function(c,d){return c.allocUnsafe?c.allocUnsafe(d):new c(d)};s.prototype.toArrayLike=function(c,d,y){this._strip();var v=this.byteLength(),S=y||Math.max(1,v);n(v<=S,"byte array longer than desired length"),n(S>0,"Requested array length <= 0");var x=F(c,S),B=d==="le"?"LE":"BE";return this["_toArrayLike"+B](x,v),x},s.prototype._toArrayLikeLE=function(c,d){for(var y=0,v=0,S=0,x=0;S<this.length;S++){var B=this.words[S]<<x|v;c[y++]=B&255,y<c.length&&(c[y++]=B>>8&255),y<c.length&&(c[y++]=B>>16&255),x===6?(y<c.length&&(c[y++]=B>>24&255),v=0,x=0):(v=B>>>24,x+=2)}if(y<c.length)for(c[y++]=v;y<c.length;)c[y++]=0},s.prototype._toArrayLikeBE=function(c,d){for(var y=c.length-1,v=0,S=0,x=0;S<this.length;S++){var B=this.words[S]<<x|v;c[y--]=B&255,y>=0&&(c[y--]=B>>8&255),y>=0&&(c[y--]=B>>16&255),x===6?(y>=0&&(c[y--]=B>>24&255),v=0,x=0):(v=B>>>24,x+=2)}if(y>=0)for(c[y--]=v;y>=0;)c[y--]=0},Math.clz32?s.prototype._countBits=function(c){return 32-Math.clz32(c)}:s.prototype._countBits=function(c){var d=c,y=0;return d>=4096&&(y+=13,d>>>=13),d>=64&&(y+=7,d>>>=7),d>=8&&(y+=4,d>>>=4),d>=2&&(y+=2,d>>>=2),y+d},s.prototype._zeroBits=function(c){if(c===0)return 26;var d=c,y=0;return d&8191||(y+=13,d>>>=13),d&127||(y+=7,d>>>=7),d&15||(y+=4,d>>>=4),d&3||(y+=2,d>>>=2),d&1||y++,y},s.prototype.bitLength=function(){var c=this.words[this.length-1],d=this._countBits(c);return(this.length-1)*26+d};function O(A){for(var c=new Array(A.bitLength()),d=0;d<c.length;d++){var y=d/26|0,v=d%26;c[d]=A.words[y]>>>v&1}return c}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,d=0;d<this.length;d++){var y=this._zeroBits(this.words[d]);if(c+=y,y!==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 d=0;d<c.length;d++)this.words[d]=this.words[d]|c.words[d];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 d;this.length>c.length?d=c:d=this;for(var y=0;y<d.length;y++)this.words[y]=this.words[y]&c.words[y];return this.length=d.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 d,y;this.length>c.length?(d=this,y=c):(d=c,y=this);for(var v=0;v<y.length;v++)this.words[v]=d.words[v]^y.words[v];if(this!==d)for(;v<d.length;v++)this.words[v]=d.words[v];return this.length=d.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 d=Math.ceil(c/26)|0,y=c%26;this._expand(d),y>0&&d--;for(var v=0;v<d;v++)this.words[v]=~this.words[v]&67108863;return y>0&&(this.words[v]=~this.words[v]&67108863>>26-y),this._strip()},s.prototype.notn=function(c){return this.clone().inotn(c)},s.prototype.setn=function(c,d){n(typeof c=="number"&&c>=0);var y=c/26|0,v=c%26;return this._expand(y+1),d?this.words[y]=this.words[y]|1<<v:this.words[y]=this.words[y]&~(1<<v),this._strip()},s.prototype.iadd=function(c){var d;if(this.negative!==0&&c.negative===0)return this.negative=0,d=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,d=this.isub(c),c.negative=1,d._normSign();var y,v;this.length>c.length?(y=this,v=c):(y=c,v=this);for(var S=0,x=0;x<v.length;x++)d=(y.words[x]|0)+(v.words[x]|0)+S,this.words[x]=d&67108863,S=d>>>26;for(;S!==0&&x<y.length;x++)d=(y.words[x]|0)+S,this.words[x]=d&67108863,S=d>>>26;if(this.length=y.length,S!==0)this.words[this.length]=S,this.length++;else if(y!==this)for(;x<y.length;x++)this.words[x]=y.words[x];return this},s.prototype.add=function(c){var d;return c.negative!==0&&this.negative===0?(c.negative=0,d=this.sub(c),c.negative^=1,d):c.negative===0&&this.negative!==0?(this.negative=0,d=c.sub(this),this.negative=1,d):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 d=this.iadd(c);return c.negative=1,d._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var y=this.cmp(c);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,S;y>0?(v=this,S=c):(v=c,S=this);for(var x=0,B=0;B<S.length;B++)d=(v.words[B]|0)-(S.words[B]|0)+x,x=d>>26,this.words[B]=d&67108863;for(;x!==0&&B<v.length;B++)d=(v.words[B]|0)+x,x=d>>26,this.words[B]=d&67108863;if(x===0&&B<v.length&&v!==this)for(;B<v.length;B++)this.words[B]=v.words[B];return this.length=Math.max(this.length,B),v!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(c){return this.clone().isub(c)};function k(A,c,d){d.negative=c.negative^A.negative;var y=A.length+c.length|0;d.length=y,y=y-1|0;var v=A.words[0]|0,S=c.words[0]|0,x=v*S,B=x&67108863,b=x/67108864|0;d.words[0]=B;for(var u=1;u<y;u++){for(var R=b>>>26,Q=b&67108863,J=Math.min(u,c.length-1),N=Math.max(0,u-A.length+1);N<=J;N++){var j=u-N|0;v=A.words[j]|0,S=c.words[N]|0,x=v*S+Q,R+=x/67108864|0,Q=x&67108863}d.words[u]=Q|0,b=R|0}return b!==0?d.words[u]=b|0:d.length--,d._strip()}var T=function(c,d,y){var v=c.words,S=d.words,x=y.words,B=0,b,u,R,Q=v[0]|0,J=Q&8191,N=Q>>>13,j=v[1]|0,V=j&8191,Z=j>>>13,ue=v[2]|0,C=ue&8191,M=ue>>>13,q=v[3]|0,G=q&8191,oe=q>>>13,he=v[4]|0,ne=he&8191,we=he>>>13,pt=v[5]|0,Se=pt&8191,Ee=pt>>>13,Qe=v[6]|0,ve=Qe&8191,Re=Qe>>>13,et=v[7]|0,be=et&8191,m=et>>>13,l=v[8]|0,f=l&8191,E=l>>>13,P=v[9]|0,U=P&8191,H=P>>>13,fe=S[0]|0,ae=fe&8191,se=fe>>>13,Ce=S[1]|0,ie=Ce&8191,xe=Ce>>>13,xr=S[2]|0,Ie=xr&8191,Ae=xr>>>13,Ir=S[3]|0,Te=Ir&8191,Ne=Ir>>>13,Ar=S[4]|0,Be=Ar&8191,Le=Ar>>>13,Tr=S[5]|0,Pe=Tr&8191,Oe=Tr>>>13,Nr=S[6]|0,Fe=Nr&8191,De=Nr>>>13,Br=S[7]|0,je=Br&8191,Ue=Br>>>13,Lr=S[8]|0,$e=Lr&8191,He=Lr>>>13,Pr=S[9]|0,We=Pr&8191,Ve=Pr>>>13;y.negative=c.negative^d.negative,y.length=19,b=Math.imul(J,ae),u=Math.imul(J,se),u=u+Math.imul(N,ae)|0,R=Math.imul(N,se);var Qt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,b=Math.imul(V,ae),u=Math.imul(V,se),u=u+Math.imul(Z,ae)|0,R=Math.imul(Z,se),b=b+Math.imul(J,ie)|0,u=u+Math.imul(J,xe)|0,u=u+Math.imul(N,ie)|0,R=R+Math.imul(N,xe)|0;var Yt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,b=Math.imul(C,ae),u=Math.imul(C,se),u=u+Math.imul(M,ae)|0,R=Math.imul(M,se),b=b+Math.imul(V,ie)|0,u=u+Math.imul(V,xe)|0,u=u+Math.imul(Z,ie)|0,R=R+Math.imul(Z,xe)|0,b=b+Math.imul(J,Ie)|0,u=u+Math.imul(J,Ae)|0,u=u+Math.imul(N,Ie)|0,R=R+Math.imul(N,Ae)|0;var Xt=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,b=Math.imul(G,ae),u=Math.imul(G,se),u=u+Math.imul(oe,ae)|0,R=Math.imul(oe,se),b=b+Math.imul(C,ie)|0,u=u+Math.imul(C,xe)|0,u=u+Math.imul(M,ie)|0,R=R+Math.imul(M,xe)|0,b=b+Math.imul(V,Ie)|0,u=u+Math.imul(V,Ae)|0,u=u+Math.imul(Z,Ie)|0,R=R+Math.imul(Z,Ae)|0,b=b+Math.imul(J,Te)|0,u=u+Math.imul(J,Ne)|0,u=u+Math.imul(N,Te)|0,R=R+Math.imul(N,Ne)|0;var er=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(er>>>26)|0,er&=67108863,b=Math.imul(ne,ae),u=Math.imul(ne,se),u=u+Math.imul(we,ae)|0,R=Math.imul(we,se),b=b+Math.imul(G,ie)|0,u=u+Math.imul(G,xe)|0,u=u+Math.imul(oe,ie)|0,R=R+Math.imul(oe,xe)|0,b=b+Math.imul(C,Ie)|0,u=u+Math.imul(C,Ae)|0,u=u+Math.imul(M,Ie)|0,R=R+Math.imul(M,Ae)|0,b=b+Math.imul(V,Te)|0,u=u+Math.imul(V,Ne)|0,u=u+Math.imul(Z,Te)|0,R=R+Math.imul(Z,Ne)|0,b=b+Math.imul(J,Be)|0,u=u+Math.imul(J,Le)|0,u=u+Math.imul(N,Be)|0,R=R+Math.imul(N,Le)|0;var tr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(tr>>>26)|0,tr&=67108863,b=Math.imul(Se,ae),u=Math.imul(Se,se),u=u+Math.imul(Ee,ae)|0,R=Math.imul(Ee,se),b=b+Math.imul(ne,ie)|0,u=u+Math.imul(ne,xe)|0,u=u+Math.imul(we,ie)|0,R=R+Math.imul(we,xe)|0,b=b+Math.imul(G,Ie)|0,u=u+Math.imul(G,Ae)|0,u=u+Math.imul(oe,Ie)|0,R=R+Math.imul(oe,Ae)|0,b=b+Math.imul(C,Te)|0,u=u+Math.imul(C,Ne)|0,u=u+Math.imul(M,Te)|0,R=R+Math.imul(M,Ne)|0,b=b+Math.imul(V,Be)|0,u=u+Math.imul(V,Le)|0,u=u+Math.imul(Z,Be)|0,R=R+Math.imul(Z,Le)|0,b=b+Math.imul(J,Pe)|0,u=u+Math.imul(J,Oe)|0,u=u+Math.imul(N,Pe)|0,R=R+Math.imul(N,Oe)|0;var rr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(rr>>>26)|0,rr&=67108863,b=Math.imul(ve,ae),u=Math.imul(ve,se),u=u+Math.imul(Re,ae)|0,R=Math.imul(Re,se),b=b+Math.imul(Se,ie)|0,u=u+Math.imul(Se,xe)|0,u=u+Math.imul(Ee,ie)|0,R=R+Math.imul(Ee,xe)|0,b=b+Math.imul(ne,Ie)|0,u=u+Math.imul(ne,Ae)|0,u=u+Math.imul(we,Ie)|0,R=R+Math.imul(we,Ae)|0,b=b+Math.imul(G,Te)|0,u=u+Math.imul(G,Ne)|0,u=u+Math.imul(oe,Te)|0,R=R+Math.imul(oe,Ne)|0,b=b+Math.imul(C,Be)|0,u=u+Math.imul(C,Le)|0,u=u+Math.imul(M,Be)|0,R=R+Math.imul(M,Le)|0,b=b+Math.imul(V,Pe)|0,u=u+Math.imul(V,Oe)|0,u=u+Math.imul(Z,Pe)|0,R=R+Math.imul(Z,Oe)|0,b=b+Math.imul(J,Fe)|0,u=u+Math.imul(J,De)|0,u=u+Math.imul(N,Fe)|0,R=R+Math.imul(N,De)|0;var nr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(nr>>>26)|0,nr&=67108863,b=Math.imul(be,ae),u=Math.imul(be,se),u=u+Math.imul(m,ae)|0,R=Math.imul(m,se),b=b+Math.imul(ve,ie)|0,u=u+Math.imul(ve,xe)|0,u=u+Math.imul(Re,ie)|0,R=R+Math.imul(Re,xe)|0,b=b+Math.imul(Se,Ie)|0,u=u+Math.imul(Se,Ae)|0,u=u+Math.imul(Ee,Ie)|0,R=R+Math.imul(Ee,Ae)|0,b=b+Math.imul(ne,Te)|0,u=u+Math.imul(ne,Ne)|0,u=u+Math.imul(we,Te)|0,R=R+Math.imul(we,Ne)|0,b=b+Math.imul(G,Be)|0,u=u+Math.imul(G,Le)|0,u=u+Math.imul(oe,Be)|0,R=R+Math.imul(oe,Le)|0,b=b+Math.imul(C,Pe)|0,u=u+Math.imul(C,Oe)|0,u=u+Math.imul(M,Pe)|0,R=R+Math.imul(M,Oe)|0,b=b+Math.imul(V,Fe)|0,u=u+Math.imul(V,De)|0,u=u+Math.imul(Z,Fe)|0,R=R+Math.imul(Z,De)|0,b=b+Math.imul(J,je)|0,u=u+Math.imul(J,Ue)|0,u=u+Math.imul(N,je)|0,R=R+Math.imul(N,Ue)|0;var ir=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ir>>>26)|0,ir&=67108863,b=Math.imul(f,ae),u=Math.imul(f,se),u=u+Math.imul(E,ae)|0,R=Math.imul(E,se),b=b+Math.imul(be,ie)|0,u=u+Math.imul(be,xe)|0,u=u+Math.imul(m,ie)|0,R=R+Math.imul(m,xe)|0,b=b+Math.imul(ve,Ie)|0,u=u+Math.imul(ve,Ae)|0,u=u+Math.imul(Re,Ie)|0,R=R+Math.imul(Re,Ae)|0,b=b+Math.imul(Se,Te)|0,u=u+Math.imul(Se,Ne)|0,u=u+Math.imul(Ee,Te)|0,R=R+Math.imul(Ee,Ne)|0,b=b+Math.imul(ne,Be)|0,u=u+Math.imul(ne,Le)|0,u=u+Math.imul(we,Be)|0,R=R+Math.imul(we,Le)|0,b=b+Math.imul(G,Pe)|0,u=u+Math.imul(G,Oe)|0,u=u+Math.imul(oe,Pe)|0,R=R+Math.imul(oe,Oe)|0,b=b+Math.imul(C,Fe)|0,u=u+Math.imul(C,De)|0,u=u+Math.imul(M,Fe)|0,R=R+Math.imul(M,De)|0,b=b+Math.imul(V,je)|0,u=u+Math.imul(V,Ue)|0,u=u+Math.imul(Z,je)|0,R=R+Math.imul(Z,Ue)|0,b=b+Math.imul(J,$e)|0,u=u+Math.imul(J,He)|0,u=u+Math.imul(N,$e)|0,R=R+Math.imul(N,He)|0;var sr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(sr>>>26)|0,sr&=67108863,b=Math.imul(U,ae),u=Math.imul(U,se),u=u+Math.imul(H,ae)|0,R=Math.imul(H,se),b=b+Math.imul(f,ie)|0,u=u+Math.imul(f,xe)|0,u=u+Math.imul(E,ie)|0,R=R+Math.imul(E,xe)|0,b=b+Math.imul(be,Ie)|0,u=u+Math.imul(be,Ae)|0,u=u+Math.imul(m,Ie)|0,R=R+Math.imul(m,Ae)|0,b=b+Math.imul(ve,Te)|0,u=u+Math.imul(ve,Ne)|0,u=u+Math.imul(Re,Te)|0,R=R+Math.imul(Re,Ne)|0,b=b+Math.imul(Se,Be)|0,u=u+Math.imul(Se,Le)|0,u=u+Math.imul(Ee,Be)|0,R=R+Math.imul(Ee,Le)|0,b=b+Math.imul(ne,Pe)|0,u=u+Math.imul(ne,Oe)|0,u=u+Math.imul(we,Pe)|0,R=R+Math.imul(we,Oe)|0,b=b+Math.imul(G,Fe)|0,u=u+Math.imul(G,De)|0,u=u+Math.imul(oe,Fe)|0,R=R+Math.imul(oe,De)|0,b=b+Math.imul(C,je)|0,u=u+Math.imul(C,Ue)|0,u=u+Math.imul(M,je)|0,R=R+Math.imul(M,Ue)|0,b=b+Math.imul(V,$e)|0,u=u+Math.imul(V,He)|0,u=u+Math.imul(Z,$e)|0,R=R+Math.imul(Z,He)|0,b=b+Math.imul(J,We)|0,u=u+Math.imul(J,Ve)|0,u=u+Math.imul(N,We)|0,R=R+Math.imul(N,Ve)|0;var or=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(or>>>26)|0,or&=67108863,b=Math.imul(U,ie),u=Math.imul(U,xe),u=u+Math.imul(H,ie)|0,R=Math.imul(H,xe),b=b+Math.imul(f,Ie)|0,u=u+Math.imul(f,Ae)|0,u=u+Math.imul(E,Ie)|0,R=R+Math.imul(E,Ae)|0,b=b+Math.imul(be,Te)|0,u=u+Math.imul(be,Ne)|0,u=u+Math.imul(m,Te)|0,R=R+Math.imul(m,Ne)|0,b=b+Math.imul(ve,Be)|0,u=u+Math.imul(ve,Le)|0,u=u+Math.imul(Re,Be)|0,R=R+Math.imul(Re,Le)|0,b=b+Math.imul(Se,Pe)|0,u=u+Math.imul(Se,Oe)|0,u=u+Math.imul(Ee,Pe)|0,R=R+Math.imul(Ee,Oe)|0,b=b+Math.imul(ne,Fe)|0,u=u+Math.imul(ne,De)|0,u=u+Math.imul(we,Fe)|0,R=R+Math.imul(we,De)|0,b=b+Math.imul(G,je)|0,u=u+Math.imul(G,Ue)|0,u=u+Math.imul(oe,je)|0,R=R+Math.imul(oe,Ue)|0,b=b+Math.imul(C,$e)|0,u=u+Math.imul(C,He)|0,u=u+Math.imul(M,$e)|0,R=R+Math.imul(M,He)|0,b=b+Math.imul(V,We)|0,u=u+Math.imul(V,Ve)|0,u=u+Math.imul(Z,We)|0,R=R+Math.imul(Z,Ve)|0;var ar=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ar>>>26)|0,ar&=67108863,b=Math.imul(U,Ie),u=Math.imul(U,Ae),u=u+Math.imul(H,Ie)|0,R=Math.imul(H,Ae),b=b+Math.imul(f,Te)|0,u=u+Math.imul(f,Ne)|0,u=u+Math.imul(E,Te)|0,R=R+Math.imul(E,Ne)|0,b=b+Math.imul(be,Be)|0,u=u+Math.imul(be,Le)|0,u=u+Math.imul(m,Be)|0,R=R+Math.imul(m,Le)|0,b=b+Math.imul(ve,Pe)|0,u=u+Math.imul(ve,Oe)|0,u=u+Math.imul(Re,Pe)|0,R=R+Math.imul(Re,Oe)|0,b=b+Math.imul(Se,Fe)|0,u=u+Math.imul(Se,De)|0,u=u+Math.imul(Ee,Fe)|0,R=R+Math.imul(Ee,De)|0,b=b+Math.imul(ne,je)|0,u=u+Math.imul(ne,Ue)|0,u=u+Math.imul(we,je)|0,R=R+Math.imul(we,Ue)|0,b=b+Math.imul(G,$e)|0,u=u+Math.imul(G,He)|0,u=u+Math.imul(oe,$e)|0,R=R+Math.imul(oe,He)|0,b=b+Math.imul(C,We)|0,u=u+Math.imul(C,Ve)|0,u=u+Math.imul(M,We)|0,R=R+Math.imul(M,Ve)|0;var cr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(cr>>>26)|0,cr&=67108863,b=Math.imul(U,Te),u=Math.imul(U,Ne),u=u+Math.imul(H,Te)|0,R=Math.imul(H,Ne),b=b+Math.imul(f,Be)|0,u=u+Math.imul(f,Le)|0,u=u+Math.imul(E,Be)|0,R=R+Math.imul(E,Le)|0,b=b+Math.imul(be,Pe)|0,u=u+Math.imul(be,Oe)|0,u=u+Math.imul(m,Pe)|0,R=R+Math.imul(m,Oe)|0,b=b+Math.imul(ve,Fe)|0,u=u+Math.imul(ve,De)|0,u=u+Math.imul(Re,Fe)|0,R=R+Math.imul(Re,De)|0,b=b+Math.imul(Se,je)|0,u=u+Math.imul(Se,Ue)|0,u=u+Math.imul(Ee,je)|0,R=R+Math.imul(Ee,Ue)|0,b=b+Math.imul(ne,$e)|0,u=u+Math.imul(ne,He)|0,u=u+Math.imul(we,$e)|0,R=R+Math.imul(we,He)|0,b=b+Math.imul(G,We)|0,u=u+Math.imul(G,Ve)|0,u=u+Math.imul(oe,We)|0,R=R+Math.imul(oe,Ve)|0;var lr=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(lr>>>26)|0,lr&=67108863,b=Math.imul(U,Be),u=Math.imul(U,Le),u=u+Math.imul(H,Be)|0,R=Math.imul(H,Le),b=b+Math.imul(f,Pe)|0,u=u+Math.imul(f,Oe)|0,u=u+Math.imul(E,Pe)|0,R=R+Math.imul(E,Oe)|0,b=b+Math.imul(be,Fe)|0,u=u+Math.imul(be,De)|0,u=u+Math.imul(m,Fe)|0,R=R+Math.imul(m,De)|0,b=b+Math.imul(ve,je)|0,u=u+Math.imul(ve,Ue)|0,u=u+Math.imul(Re,je)|0,R=R+Math.imul(Re,Ue)|0,b=b+Math.imul(Se,$e)|0,u=u+Math.imul(Se,He)|0,u=u+Math.imul(Ee,$e)|0,R=R+Math.imul(Ee,He)|0,b=b+Math.imul(ne,We)|0,u=u+Math.imul(ne,Ve)|0,u=u+Math.imul(we,We)|0,R=R+Math.imul(we,Ve)|0;var ur=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ur>>>26)|0,ur&=67108863,b=Math.imul(U,Pe),u=Math.imul(U,Oe),u=u+Math.imul(H,Pe)|0,R=Math.imul(H,Oe),b=b+Math.imul(f,Fe)|0,u=u+Math.imul(f,De)|0,u=u+Math.imul(E,Fe)|0,R=R+Math.imul(E,De)|0,b=b+Math.imul(be,je)|0,u=u+Math.imul(be,Ue)|0,u=u+Math.imul(m,je)|0,R=R+Math.imul(m,Ue)|0,b=b+Math.imul(ve,$e)|0,u=u+Math.imul(ve,He)|0,u=u+Math.imul(Re,$e)|0,R=R+Math.imul(Re,He)|0,b=b+Math.imul(Se,We)|0,u=u+Math.imul(Se,Ve)|0,u=u+Math.imul(Ee,We)|0,R=R+Math.imul(Ee,Ve)|0;var Cs=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,b=Math.imul(U,Fe),u=Math.imul(U,De),u=u+Math.imul(H,Fe)|0,R=Math.imul(H,De),b=b+Math.imul(f,je)|0,u=u+Math.imul(f,Ue)|0,u=u+Math.imul(E,je)|0,R=R+Math.imul(E,Ue)|0,b=b+Math.imul(be,$e)|0,u=u+Math.imul(be,He)|0,u=u+Math.imul(m,$e)|0,R=R+Math.imul(m,He)|0,b=b+Math.imul(ve,We)|0,u=u+Math.imul(ve,Ve)|0,u=u+Math.imul(Re,We)|0,R=R+Math.imul(Re,Ve)|0;var Ms=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,b=Math.imul(U,je),u=Math.imul(U,Ue),u=u+Math.imul(H,je)|0,R=Math.imul(H,Ue),b=b+Math.imul(f,$e)|0,u=u+Math.imul(f,He)|0,u=u+Math.imul(E,$e)|0,R=R+Math.imul(E,He)|0,b=b+Math.imul(be,We)|0,u=u+Math.imul(be,Ve)|0,u=u+Math.imul(m,We)|0,R=R+Math.imul(m,Ve)|0;var ks=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(ks>>>26)|0,ks&=67108863,b=Math.imul(U,$e),u=Math.imul(U,He),u=u+Math.imul(H,$e)|0,R=Math.imul(H,He),b=b+Math.imul(f,We)|0,u=u+Math.imul(f,Ve)|0,u=u+Math.imul(E,We)|0,R=R+Math.imul(E,Ve)|0;var xs=(B+b|0)+((u&8191)<<13)|0;B=(R+(u>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(U,We),u=Math.imul(U,Ve),u=u+Math.imul(H,We)|0,R=Math.imul(H,Ve);var Is=(B+b|0)+((u&8191)<<13)|0;return B=(R+(u>>>13)|0)+(Is>>>26)|0,Is&=67108863,x[0]=Qt,x[1]=Yt,x[2]=Xt,x[3]=er,x[4]=tr,x[5]=rr,x[6]=nr,x[7]=ir,x[8]=sr,x[9]=or,x[10]=ar,x[11]=cr,x[12]=lr,x[13]=ur,x[14]=Cs,x[15]=Ms,x[16]=ks,x[17]=xs,x[18]=Is,B!==0&&(x[19]=B,y.length++),y};Math.imul||(T=k);function L(A,c,d){d.negative=c.negative^A.negative,d.length=A.length+c.length;for(var y=0,v=0,S=0;S<d.length-1;S++){var x=v;v=0;for(var B=y&67108863,b=Math.min(S,c.length-1),u=Math.max(0,S-A.length+1);u<=b;u++){var R=S-u,Q=A.words[R]|0,J=c.words[u]|0,N=Q*J,j=N&67108863;x=x+(N/67108864|0)|0,j=j+B|0,B=j&67108863,x=x+(j>>>26)|0,v+=x>>>26,x&=67108863}d.words[S]=B,y=x,x=v}return y!==0?d.words[S]=y:d.length--,d._strip()}function W(A,c,d){return L(A,c,d)}s.prototype.mulTo=function(c,d){var y,v=this.length+c.length;return this.length===10&&c.length===10?y=T(this,c,d):v<63?y=k(this,c,d):v<1024?y=L(this,c,d):y=W(this,c,d),y},s.prototype.mul=function(c){var d=new s(null);return d.words=new Array(this.length+c.length),this.mulTo(c,d)},s.prototype.mulf=function(c){var d=new s(null);return d.words=new Array(this.length+c.length),W(this,c,d)},s.prototype.imul=function(c){return this.clone().mulTo(c,this)},s.prototype.imuln=function(c){var d=c<0;d&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var y=0,v=0;v<this.length;v++){var S=(this.words[v]|0)*c,x=(S&67108863)+(y&67108863);y>>=26,y+=S/67108864|0,y+=x>>>26,this.words[v]=x&67108863}return y!==0&&(this.words[v]=y,this.length++),this.length=c===0?1:this.length,d?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 d=O(c);if(d.length===0)return new s(1);for(var y=this,v=0;v<d.length&&d[v]===0;v++,y=y.sqr());if(++v<d.length)for(var S=y.sqr();v<d.length;v++,S=S.sqr())d[v]!==0&&(y=y.mul(S));return y},s.prototype.iushln=function(c){n(typeof c=="number"&&c>=0);var d=c%26,y=(c-d)/26,v=67108863>>>26-d<<26-d,S;if(d!==0){var x=0;for(S=0;S<this.length;S++){var B=this.words[S]&v,b=(this.words[S]|0)-B<<d;this.words[S]=b|x,x=B>>>26-d}x&&(this.words[S]=x,this.length++)}if(y!==0){for(S=this.length-1;S>=0;S--)this.words[S+y]=this.words[S];for(S=0;S<y;S++)this.words[S]=0;this.length+=y}return this._strip()},s.prototype.ishln=function(c){return n(this.negative===0),this.iushln(c)},s.prototype.iushrn=function(c,d,y){n(typeof c=="number"&&c>=0);var v;d?v=(d-d%26)/26:v=0;var S=c%26,x=Math.min((c-S)/26,this.length),B=67108863^67108863>>>S<<S,b=y;if(v-=x,v=Math.max(0,v),b){for(var u=0;u<x;u++)b.words[u]=this.words[u];b.length=x}if(x!==0)if(this.length>x)for(this.length-=x,u=0;u<this.length;u++)this.words[u]=this.words[u+x];else this.words[0]=0,this.length=1;var R=0;for(u=this.length-1;u>=0&&(R!==0||u>=v);u--){var Q=this.words[u]|0;this.words[u]=R<<26-S|Q>>>S,R=Q&B}return b&&R!==0&&(b.words[b.length++]=R),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(c,d,y){return n(this.negative===0),this.iushrn(c,d,y)},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 d=c%26,y=(c-d)/26,v=1<<d;if(this.length<=y)return!1;var S=this.words[y];return!!(S&v)},s.prototype.imaskn=function(c){n(typeof c=="number"&&c>=0);var d=c%26,y=(c-d)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(d!==0&&y++,this.length=Math.min(y,this.length),d!==0){var v=67108863^67108863>>>d<<d;this.words[this.length-1]&=v}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 d=0;d<this.length&&this.words[d]>=67108864;d++)this.words[d]-=67108864,d===this.length-1?this.words[d+1]=1:this.words[d+1]++;return this.length=Math.max(this.length,d+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 d=0;d<this.length&&this.words[d]<0;d++)this.words[d]+=67108864,this.words[d+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,d,y){var v=c.length+y,S;this._expand(v);var x,B=0;for(S=0;S<c.length;S++){x=(this.words[S+y]|0)+B;var b=(c.words[S]|0)*d;x-=b&67108863,B=(x>>26)-(b/67108864|0),this.words[S+y]=x&67108863}for(;S<this.length-y;S++)x=(this.words[S+y]|0)+B,B=x>>26,this.words[S+y]=x&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,S=0;S<this.length;S++)x=-(this.words[S]|0)+B,B=x>>26,this.words[S]=x&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(c,d){var y=this.length-c.length,v=this.clone(),S=c,x=S.words[S.length-1]|0,B=this._countBits(x);y=26-B,y!==0&&(S=S.ushln(y),v.iushln(y),x=S.words[S.length-1]|0);var b=v.length-S.length,u;if(d!=="mod"){u=new s(null),u.length=b+1,u.words=new Array(u.length);for(var R=0;R<u.length;R++)u.words[R]=0}var Q=v.clone()._ishlnsubmul(S,1,b);Q.negative===0&&(v=Q,u&&(u.words[b]=1));for(var J=b-1;J>=0;J--){var N=(v.words[S.length+J]|0)*67108864+(v.words[S.length+J-1]|0);for(N=Math.min(N/x|0,67108863),v._ishlnsubmul(S,N,J);v.negative!==0;)N--,v.negative=0,v._ishlnsubmul(S,1,J),v.isZero()||(v.negative^=1);u&&(u.words[J]=N)}return u&&u._strip(),v._strip(),d!=="div"&&y!==0&&v.iushrn(y),{div:u||null,mod:v}},s.prototype.divmod=function(c,d,y){if(n(!c.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var v,S,x;return this.negative!==0&&c.negative===0?(x=this.neg().divmod(c,d),d!=="mod"&&(v=x.div.neg()),d!=="div"&&(S=x.mod.neg(),y&&S.negative!==0&&S.iadd(c)),{div:v,mod:S}):this.negative===0&&c.negative!==0?(x=this.divmod(c.neg(),d),d!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&c.negative?(x=this.neg().divmod(c.neg(),d),d!=="div"&&(S=x.mod.neg(),y&&S.negative!==0&&S.isub(c)),{div:x.div,mod:S}):c.length>this.length||this.cmp(c)<0?{div:new s(0),mod:this}:c.length===1?d==="div"?{div:this.divn(c.words[0]),mod:null}:d==="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,d)},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 d=this.divmod(c);if(d.mod.isZero())return d.div;var y=d.div.negative!==0?d.mod.isub(c):d.mod,v=c.ushrn(1),S=c.andln(1),x=y.cmp(v);return x<0||S===1&&x===0?d.div:d.div.negative!==0?d.div.isubn(1):d.div.iaddn(1)},s.prototype.modrn=function(c){var d=c<0;d&&(c=-c),n(c<=67108863);for(var y=(1<<26)%c,v=0,S=this.length-1;S>=0;S--)v=(y*v+(this.words[S]|0))%c;return d?-v:v},s.prototype.modn=function(c){return this.modrn(c)},s.prototype.idivn=function(c){var d=c<0;d&&(c=-c),n(c<=67108863);for(var y=0,v=this.length-1;v>=0;v--){var S=(this.words[v]|0)+y*67108864;this.words[v]=S/c|0,y=S%c}return this._strip(),d?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 d=this,y=c.clone();d.negative!==0?d=d.umod(c):d=d.clone();for(var v=new s(1),S=new s(0),x=new s(0),B=new s(1),b=0;d.isEven()&&y.isEven();)d.iushrn(1),y.iushrn(1),++b;for(var u=y.clone(),R=d.clone();!d.isZero();){for(var Q=0,J=1;!(d.words[0]&J)&&Q<26;++Q,J<<=1);if(Q>0)for(d.iushrn(Q);Q-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(u),S.isub(R)),v.iushrn(1),S.iushrn(1);for(var N=0,j=1;!(y.words[0]&j)&&N<26;++N,j<<=1);if(N>0)for(y.iushrn(N);N-- >0;)(x.isOdd()||B.isOdd())&&(x.iadd(u),B.isub(R)),x.iushrn(1),B.iushrn(1);d.cmp(y)>=0?(d.isub(y),v.isub(x),S.isub(B)):(y.isub(d),x.isub(v),B.isub(S))}return{a:x,b:B,gcd:y.iushln(b)}},s.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var d=this,y=c.clone();d.negative!==0?d=d.umod(c):d=d.clone();for(var v=new s(1),S=new s(0),x=y.clone();d.cmpn(1)>0&&y.cmpn(1)>0;){for(var B=0,b=1;!(d.words[0]&b)&&B<26;++B,b<<=1);if(B>0)for(d.iushrn(B);B-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var u=0,R=1;!(y.words[0]&R)&&u<26;++u,R<<=1);if(u>0)for(y.iushrn(u);u-- >0;)S.isOdd()&&S.iadd(x),S.iushrn(1);d.cmp(y)>=0?(d.isub(y),v.isub(S)):(y.isub(d),S.isub(v))}var Q;return d.cmpn(1)===0?Q=v:Q=S,Q.cmpn(0)<0&&Q.iadd(c),Q},s.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var d=this.clone(),y=c.clone();d.negative=0,y.negative=0;for(var v=0;d.isEven()&&y.isEven();v++)d.iushrn(1),y.iushrn(1);do{for(;d.isEven();)d.iushrn(1);for(;y.isEven();)y.iushrn(1);var S=d.cmp(y);if(S<0){var x=d;d=y,y=x}else if(S===0||y.cmpn(1)===0)break;d.isub(y)}while(!0);return y.iushln(v)},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 d=c%26,y=(c-d)/26,v=1<<d;if(this.length<=y)return this._expand(y+1),this.words[y]|=v,this;for(var S=v,x=y;S!==0&&x<this.length;x++){var B=this.words[x]|0;B+=S,S=B>>>26,B&=67108863,this.words[x]=B}return S!==0&&(this.words[x]=S,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(c){var d=c<0;if(this.negative!==0&&!d)return-1;if(this.negative===0&&d)return 1;this._strip();var y;if(this.length>1)y=1;else{d&&(c=-c),n(c<=67108863,"Number is too big");var v=this.words[0]|0;y=v===c?0:v<c?-1:1}return this.negative!==0?-y|0:y},s.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var d=this.ucmp(c);return this.negative!==0?-d|0:d},s.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var d=0,y=this.length-1;y>=0;y--){var v=this.words[y]|0,S=c.words[y]|0;if(v!==S){v<S?d=-1:v>S&&(d=1);break}}return d},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 re(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 $={k256:null,p224:null,p192:null,p25519:null};function z(A,c){this.name=A,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 d=c,y;do this.split(d,this.tmp),d=this.imulK(d),d=d.iadd(this.tmp),y=d.bitLength();while(y>this.n);var v=y<this.n?-1:d.ucmp(this.p);return v===0?(d.words[0]=0,d.length=1):v>0?d.isub(this.p):d.strip!==void 0?d.strip():d._strip(),d},z.prototype.split=function(c,d){c.iushrn(this.n,0,d)},z.prototype.imulK=function(c){return c.imul(this.k)};function ee(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,z),ee.prototype.split=function(c,d){for(var y=4194303,v=Math.min(c.length,9),S=0;S<v;S++)d.words[S]=c.words[S];if(d.length=v,c.length<=9){c.words[0]=0,c.length=1;return}var x=c.words[9];for(d.words[d.length++]=x&y,S=10;S<c.length;S++){var B=c.words[S]|0;c.words[S-10]=(B&y)<<4|x>>>22,x=B}x>>>=22,c.words[S-10]=x,x===0&&c.length>10?c.length-=10:c.length-=9},ee.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var d=0,y=0;y<c.length;y++){var v=c.words[y]|0;d+=v*977,c.words[y]=d&67108863,d=v*64+(d/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function Y(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(Y,z);function K(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(K,z);function de(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(de,z),de.prototype.imulK=function(c){for(var d=0,y=0;y<c.length;y++){var v=(c.words[y]|0)*19+d,S=v&67108863;v>>>=26,c.words[y]=S,d=v}return d!==0&&(c.words[c.length++]=d),c},s._prime=function(c){if($[c])return $[c];var d;if(c==="k256")d=new ee;else if(c==="p224")d=new Y;else if(c==="p192")d=new K;else if(c==="p25519")d=new de;else throw new Error("Unknown prime "+c);return $[c]=d,d};function re(A){if(typeof A=="string"){var c=s._prime(A);this.m=c.p,this.prime=c}else n(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}re.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},re.prototype._verify2=function(c,d){n((c.negative|d.negative)===0,"red works only with positives"),n(c.red&&c.red===d.red,"red works only with red numbers")},re.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(g(c,c.umod(this.m)._forceRed(this)),c)},re.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},re.prototype.add=function(c,d){this._verify2(c,d);var y=c.add(d);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},re.prototype.iadd=function(c,d){this._verify2(c,d);var y=c.iadd(d);return y.cmp(this.m)>=0&&y.isub(this.m),y},re.prototype.sub=function(c,d){this._verify2(c,d);var y=c.sub(d);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},re.prototype.isub=function(c,d){this._verify2(c,d);var y=c.isub(d);return y.cmpn(0)<0&&y.iadd(this.m),y},re.prototype.shl=function(c,d){return this._verify1(c),this.imod(c.ushln(d))},re.prototype.imul=function(c,d){return this._verify2(c,d),this.imod(c.imul(d))},re.prototype.mul=function(c,d){return this._verify2(c,d),this.imod(c.mul(d))},re.prototype.isqr=function(c){return this.imul(c,c.clone())},re.prototype.sqr=function(c){return this.mul(c,c)},re.prototype.sqrt=function(c){if(c.isZero())return c.clone();var d=this.m.andln(3);if(n(d%2===1),d===3){var y=this.m.add(new s(1)).iushrn(2);return this.pow(c,y)}for(var v=this.m.subn(1),S=0;!v.isZero()&&v.andln(1)===0;)S++,v.iushrn(1);n(!v.isZero());var x=new s(1).toRed(this),B=x.redNeg(),b=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);this.pow(u,b).cmp(B)!==0;)u.redIAdd(B);for(var R=this.pow(u,v),Q=this.pow(c,v.addn(1).iushrn(1)),J=this.pow(c,v),N=S;J.cmp(x)!==0;){for(var j=J,V=0;j.cmp(x)!==0;V++)j=j.redSqr();n(V<N);var Z=this.pow(R,new s(1).iushln(N-V-1));Q=Q.redMul(Z),R=Z.redSqr(),J=J.redMul(R),N=V}return Q},re.prototype.invm=function(c){var d=c._invmp(this.m);return d.negative!==0?(d.negative=0,this.imod(d).redNeg()):this.imod(d)},re.prototype.pow=function(c,d){if(d.isZero())return new s(1).toRed(this);if(d.cmpn(1)===0)return c.clone();var y=4,v=new Array(1<<y);v[0]=new s(1).toRed(this),v[1]=c;for(var S=2;S<v.length;S++)v[S]=this.mul(v[S-1],c);var x=v[0],B=0,b=0,u=d.bitLength()%26;for(u===0&&(u=26),S=d.length-1;S>=0;S--){for(var R=d.words[S],Q=u-1;Q>=0;Q--){var J=R>>Q&1;if(x!==v[0]&&(x=this.sqr(x)),J===0&&B===0){b=0;continue}B<<=1,B|=J,b++,!(b!==y&&(S!==0||Q!==0))&&(x=this.mul(x,v[B]),b=0,B=0)}u=26}return x},re.prototype.convertTo=function(c){var d=c.umod(this.m);return d===c?d.clone():d},re.prototype.convertFrom=function(c){var d=c.clone();return d.red=null,d},s.mont=function(c){return new ce(c)};function ce(A){re.call(this,A),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(ce,re),ce.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},ce.prototype.convertFrom=function(c){var d=this.imod(c.mul(this.rinv));return d.red=null,d},ce.prototype.imul=function(c,d){if(c.isZero()||d.isZero())return c.words[0]=0,c.length=1,c;var y=c.imul(d),v=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=y.isub(v).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},ce.prototype.mul=function(c,d){if(c.isZero()||d.isZero())return new s(0)._forceRed(this);var y=c.mul(d),v=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=y.isub(v).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},ce.prototype.invm=function(c){var d=this.imod(c._invmp(this.m).mul(this.r2));return d._forceRed(this)}})(e,te)})(Bo);var Ni=Bo.exports,Mn={},$t={};Object.defineProperty($t,"__esModule",{value:!0});$t.errorValues=$t.standardErrorCodes=void 0;$t.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};$t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var Bi={},Li={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=$t,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(w,I=r){if(w&&Number.isInteger(w)){const D=w.toString();if(g(t.errorValues,D))return t.errorValues[D].message;if(h(w))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return I}e.getMessageFromCode=n;function i(w){if(!Number.isInteger(w))return!1;const I=w.toString();return!!(t.errorValues[I]||h(w))}e.isValidCode=i;function s(w){var I;if(typeof w=="number")return w;if(a(w))return(I=w.code)!==null&&I!==void 0?I:w.errorCode}e.getErrorCode=s;function a(w){return typeof w=="object"&&w!==null&&(typeof w.code=="number"||typeof w.errorCode=="number")}function o(w,{shouldIncludeStack:I=!1}={}){const D={};if(w&&typeof w=="object"&&!Array.isArray(w)&&g(w,"code")&&i(w.code)){const F=w;D.code=F.code,F.message&&typeof F.message=="string"?(D.message=F.message,g(F,"data")&&(D.data=F.data)):(D.message=n(D.code),D.data={originalError:p(w)})}else D.code=t.standardErrorCodes.rpc.internal,D.message=_(w,"message")?w.message:r,D.data={originalError:p(w)};return I&&(D.stack=_(w,"stack")?w.stack:void 0),D}e.serialize=o;function h(w){return w>=-32099&&w<=-32e3}function p(w){return w&&typeof w=="object"&&!Array.isArray(w)?Object.assign({},w):w}function g(w,I){return Object.prototype.hasOwnProperty.call(w,I)}function _(w,I){return typeof w=="object"&&w!==null&&I in w&&typeof w[I]=="string"}})(Li);Object.defineProperty(Bi,"__esModule",{value:!0});Bi.standardErrors=void 0;const nt=$t,nl=Li;Bi.standardErrors={rpc:{parse:e=>gt(nt.standardErrorCodes.rpc.parse,e),invalidRequest:e=>gt(nt.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>gt(nt.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>gt(nt.standardErrorCodes.rpc.methodNotFound,e),internal:e=>gt(nt.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return gt(t,e)},invalidInput:e=>gt(nt.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>gt(nt.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>gt(nt.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>gt(nt.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>gt(nt.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>gt(nt.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Or(nt.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>Or(nt.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>Or(nt.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>Or(nt.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>Or(nt.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>Or(nt.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ol(t,r,n)}}};function gt(e,t){const[r,n]=il(t);return new sl(e,r||(0,nl.getMessageFromCode)(e),n)}function Or(e,t){const[r,n]=il(t);return new ol(e,r||(0,nl.getMessageFromCode)(e),n)}function il(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let sl=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))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=t,n!==void 0&&(this.data=n)}},ol=class extends sl{constructor(t,r,n){if(!hf(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function hf(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var Pi={},on={};Object.defineProperty(on,"__esModule",{value:!0});on.isErrorResponse=void 0;function ff(e){return e.errorMessage!==void 0}on.isErrorResponse=ff;var an={};Object.defineProperty(an,"__esModule",{value:!0});an.LIB_VERSION=void 0;an.LIB_VERSION="3.9.3";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.serializeError=void 0;const df=on,pf=an,gf=$t,_f=Li;function mf(e,t){const r=(0,_f.serialize)(yf(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",pf.LIB_VERSION),n.searchParams.set("code",r.code.toString());const i=wf(r.data,t);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}Pi.serializeError=mf;function yf(e){return typeof e=="string"?{message:e,code:gf.standardErrorCodes.rpc.internal}:(0,df.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function wf(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=$t;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=Bi;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=Pi;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=Li;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(Mn);var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.ProviderType=Ye.RegExpString=Ye.IntNumber=Ye.BigIntString=Ye.AddressString=Ye.HexString=Ye.OpaqueType=void 0;function kn(){return e=>e}Ye.OpaqueType=kn;Ye.HexString=kn();Ye.AddressString=kn();Ye.BigIntString=kn();function vf(e){return Math.floor(e)}Ye.IntNumber=vf;Ye.RegExpString=kn();var va;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(va||(Ye.ProviderType=va={}));var bf=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});X.isMobileWeb=X.getLocation=X.isInIFrame=X.createQrUrl=X.getFavicon=X.range=X.isBigNumber=X.ensureParsedJSONObject=X.ensureBN=X.ensureRegExpString=X.ensureIntNumber=X.ensureBuffer=X.ensureAddressString=X.ensureEvenLengthHexString=X.ensureHexString=X.isHexString=X.prepend0x=X.strip0x=X.has0xPrefix=X.hexStringFromIntNumber=X.intNumberFromHexString=X.bigIntStringFromBN=X.hexStringFromBuffer=X.hexStringToUint8Array=X.uint8ArrayToHex=X.randomBytesHex=void 0;const Gt=bf(Ni),Sr=Mn,vt=Ye,al=/^[0-9]*$/,cl=/^[a-f0-9]*$/;function Ef(e){return ll(crypto.getRandomValues(new Uint8Array(e)))}X.randomBytesHex=Ef;function ll(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}X.uint8ArrayToHex=ll;function Sf(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}X.hexStringToUint8Array=Sf;function Rf(e,t=!1){const r=e.toString("hex");return(0,vt.HexString)(t?`0x${r}`:r)}X.hexStringFromBuffer=Rf;function Cf(e){return(0,vt.BigIntString)(e.toString(10))}X.bigIntStringFromBN=Cf;function Mf(e){return(0,vt.IntNumber)(new Gt.default(In(e,!1),16).toNumber())}X.intNumberFromHexString=Mf;function kf(e){return(0,vt.HexString)(`0x${new Gt.default(e).toString(16)}`)}X.hexStringFromIntNumber=kf;function Lo(e){return e.startsWith("0x")||e.startsWith("0X")}X.has0xPrefix=Lo;function Oi(e){return Lo(e)?e.slice(2):e}X.strip0x=Oi;function ul(e){return Lo(e)?`0x${e.slice(2)}`:`0x${e}`}X.prepend0x=ul;function xn(e){if(typeof e!="string")return!1;const t=Oi(e).toLowerCase();return cl.test(t)}X.isHexString=xn;function hl(e,t=!1){if(typeof e=="string"){const r=Oi(e).toLowerCase();if(cl.test(r))return(0,vt.HexString)(t?`0x${r}`:r)}throw Sr.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}X.ensureHexString=hl;function In(e,t=!1){let r=hl(e,!1);return r.length%2===1&&(r=(0,vt.HexString)(`0${r}`)),t?(0,vt.HexString)(`0x${r}`):r}X.ensureEvenLengthHexString=In;function xf(e){if(typeof e=="string"){const t=Oi(e).toLowerCase();if(xn(t)&&t.length===40)return(0,vt.AddressString)(ul(t))}throw Sr.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}X.ensureAddressString=xf;function If(e){if(Buffer.isBuffer(e))return e;if(typeof e=="string"){if(xn(e)){const t=In(e,!1);return Buffer.from(t,"hex")}return Buffer.from(e,"utf8")}throw Sr.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}X.ensureBuffer=If;function fl(e){if(typeof e=="number"&&Number.isInteger(e))return(0,vt.IntNumber)(e);if(typeof e=="string"){if(al.test(e))return(0,vt.IntNumber)(Number(e));if(xn(e))return(0,vt.IntNumber)(new Gt.default(In(e,!1),16).toNumber())}throw Sr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}X.ensureIntNumber=fl;function Af(e){if(e instanceof RegExp)return(0,vt.RegExpString)(e.toString());throw Sr.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}X.ensureRegExpString=Af;function Tf(e){if(e!==null&&(Gt.default.isBN(e)||dl(e)))return new Gt.default(e.toString(10),10);if(typeof e=="number")return new Gt.default(fl(e));if(typeof e=="string"){if(al.test(e))return new Gt.default(e,10);if(xn(e))return new Gt.default(In(e,!1),16)}throw Sr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}X.ensureBN=Tf;function Nf(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw Sr.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}X.ensureParsedJSONObject=Nf;function dl(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}X.isBigNumber=dl;function Bf(e,t){return Array.from({length:t-e},(r,n)=>e+n)}X.range=Bf;function Lf(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}X.getFavicon=Lf;function Pf(e,t,r,n,i,s){const a=n?"parent-id":"id",o=new URLSearchParams({[a]:e,secret:t,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${o}`}X.createQrUrl=Pf;function pl(){try{return window.frameElement!==null}catch{return!1}}X.isInIFrame=pl;function Of(){try{return pl()&&window.top?window.top.location:window.location}catch{return window.location}}X.getLocation=Of;function Ff(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}X.isMobileWeb=Ff;var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ScopedLocalStorage=void 0;class Df{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(t)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}Fi.ScopedLocalStorage=Df;var Zr={},gl={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,p,g){this.fn=h,this.context=p,this.once=g||!1}function s(h,p,g,_,w){if(typeof g!="function")throw new TypeError("The listener must be a function");var I=new i(g,_||h,w),D=r?r+p:p;return h._events[D]?h._events[D].fn?h._events[D]=[h._events[D],I]:h._events[D].push(I):(h._events[D]=I,h._eventsCount++),h}function a(h,p){--h._eventsCount===0?h._events=new n:delete h._events[p]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var p=[],g,_;if(this._eventsCount===0)return p;for(_ in g=this._events)t.call(g,_)&&p.push(r?_.slice(1):_);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},o.prototype.listeners=function(p){var g=r?r+p:p,_=this._events[g];if(!_)return[];if(_.fn)return[_.fn];for(var w=0,I=_.length,D=new Array(I);w<I;w++)D[w]=_[w].fn;return D},o.prototype.listenerCount=function(p){var g=r?r+p:p,_=this._events[g];return _?_.fn?1:_.length:0},o.prototype.emit=function(p,g,_,w,I,D){var F=r?r+p:p;if(!this._events[F])return!1;var O=this._events[F],k=arguments.length,T,L;if(O.fn){switch(O.once&&this.removeListener(p,O.fn,void 0,!0),k){case 1:return O.fn.call(O.context),!0;case 2:return O.fn.call(O.context,g),!0;case 3:return O.fn.call(O.context,g,_),!0;case 4:return O.fn.call(O.context,g,_,w),!0;case 5:return O.fn.call(O.context,g,_,w,I),!0;case 6:return O.fn.call(O.context,g,_,w,I,D),!0}for(L=1,T=new Array(k-1);L<k;L++)T[L-1]=arguments[L];O.fn.apply(O.context,T)}else{var W=O.length,$;for(L=0;L<W;L++)switch(O[L].once&&this.removeListener(p,O[L].fn,void 0,!0),k){case 1:O[L].fn.call(O[L].context);break;case 2:O[L].fn.call(O[L].context,g);break;case 3:O[L].fn.call(O[L].context,g,_);break;case 4:O[L].fn.call(O[L].context,g,_,w);break;default:if(!T)for($=1,T=new Array(k-1);$<k;$++)T[$-1]=arguments[$];O[L].fn.apply(O[L].context,T)}}return!0},o.prototype.on=function(p,g,_){return s(this,p,g,_,!1)},o.prototype.once=function(p,g,_){return s(this,p,g,_,!0)},o.prototype.removeListener=function(p,g,_,w){var I=r?r+p:p;if(!this._events[I])return this;if(!g)return a(this,I),this;var D=this._events[I];if(D.fn)D.fn===g&&(!w||D.once)&&(!_||D.context===_)&&a(this,I);else{for(var F=0,O=[],k=D.length;F<k;F++)(D[F].fn!==g||w&&!D[F].once||_&&D[F].context!==_)&&O.push(D[F]);O.length?this._events[I]=O.length===1?O[0]:O:a(this,I)}return this},o.prototype.removeAllListeners=function(p){var g;return p?(g=r?r+p:p,this._events[g]&&a(this,g)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(gl);var jf=gl.exports,An={},Tn={},cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.EVENTS=void 0;cn.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.RelayAbstract=wt.APP_VERSION_KEY=wt.LOCAL_STORAGE_ADDRESSES_KEY=wt.WALLET_USER_NAME_KEY=void 0;const ba=Mn;wt.WALLET_USER_NAME_KEY="walletUsername";wt.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";wt.APP_VERSION_KEY="AppVersion";class Uf{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw ba.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,ba.serializeError)(s,t.method);return i})}}wt.RelayAbstract=Uf;var ln={},_l={exports:{}},po={exports:{}},Nn={},Di={};Di.byteLength=Wf;Di.toByteArray=zf;Di.fromByteArray=Jf;var Bt=[],yt=[],$f=typeof Uint8Array<"u"?Uint8Array:Array,Ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Fr=0,Hf=Ns.length;Fr<Hf;++Fr)Bt[Fr]=Ns[Fr],yt[Ns.charCodeAt(Fr)]=Fr;yt[45]=62;yt[95]=63;function ml(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Wf(e){var t=ml(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Vf(e,t,r){return(t+r)*3/4-r}function zf(e){var t,r=ml(e),n=r[0],i=r[1],s=new $f(Vf(e,n,i)),a=0,o=i>0?n-4:n,h;for(h=0;h<o;h+=4)t=yt[e.charCodeAt(h)]<<18|yt[e.charCodeAt(h+1)]<<12|yt[e.charCodeAt(h+2)]<<6|yt[e.charCodeAt(h+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=t&255;return i===2&&(t=yt[e.charCodeAt(h)]<<2|yt[e.charCodeAt(h+1)]>>4,s[a++]=t&255),i===1&&(t=yt[e.charCodeAt(h)]<<10|yt[e.charCodeAt(h+1)]<<4|yt[e.charCodeAt(h+2)]>>2,s[a++]=t>>8&255,s[a++]=t&255),s}function qf(e){return Bt[e>>18&63]+Bt[e>>12&63]+Bt[e>>6&63]+Bt[e&63]}function Gf(e,t,r){for(var n,i=[],s=t;s<r;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(qf(n));return i.join("")}function Jf(e){for(var t,r=e.length,n=r%3,i=[],s=16383,a=0,o=r-n;a<o;a+=s)i.push(Gf(e,a,a+s>o?o:a+s));return n===1?(t=e[r-1],i.push(Bt[t>>2]+Bt[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Bt[t>>10]+Bt[t>>4&63]+Bt[t<<2&63]+"=")),i.join("")}var Po={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Po.read=function(e,t,r,n,i){var s,a,o=i*8-n-1,h=(1<<o)-1,p=h>>1,g=-7,_=r?i-1:0,w=r?-1:1,I=e[t+_];for(_+=w,s=I&(1<<-g)-1,I>>=-g,g+=o;g>0;s=s*256+e[t+_],_+=w,g-=8);for(a=s&(1<<-g)-1,s>>=-g,g+=n;g>0;a=a*256+e[t+_],_+=w,g-=8);if(s===0)s=1-p;else{if(s===h)return a?NaN:(I?-1:1)*(1/0);a=a+Math.pow(2,n),s=s-p}return(I?-1:1)*a*Math.pow(2,s-n)};Po.write=function(e,t,r,n,i,s){var a,o,h,p=s*8-i-1,g=(1<<p)-1,_=g>>1,w=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=n?0:s-1,D=n?1:-1,F=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=g):(a=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+_>=1?t+=w/h:t+=w*Math.pow(2,1-_),t*h>=2&&(a++,h/=2),a+_>=g?(o=0,a=g):a+_>=1?(o=(t*h-1)*Math.pow(2,i),a=a+_):(o=t*Math.pow(2,_-1)*Math.pow(2,i),a=0));i>=8;e[r+I]=o&255,I+=D,o/=256,i-=8);for(a=a<<i|o,p+=i;p>0;e[r+I]=a&255,I+=D,a/=256,p-=8);e[r+I-D]|=F*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./index-C1ZDEqI_.js";function I(g,S){for(var y=0;y<S.length;y++){const l=S[y];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in g)){const i=Object.getOwnPropertyDescriptor(l,o);i&&Object.defineProperty(g,o,i.get?i:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(g,S){(function(y,l){g.exports=l()})(window,function(){return function(y){var l={};function o(i){if(l[i])return l[i].exports;var u=l[i]={i,l:!1,exports:{}};return y[i].call(u.exports,u,u.exports,o),u.l=!0,u.exports}return o.m=y,o.c=l,o.d=function(i,u,c){o.o(i,u)||Object.defineProperty(i,u,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,u){if(1&u&&(i=o(i)),8&u||4&u&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&u&&typeof i!="string")for(var d in i)o.d(c,d,(function(f){return i[f]}).bind(null,d));return c},o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,"a",u),u},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.p="",o(o.s=2)}([function(y,l,o){o.r(l);var i=typeof fetch=="function"?fetch.bind():function(u,c){return c=c||{},new Promise(function(d,f){var r=new XMLHttpRequest;for(var a in r.open(c.method||"get",u,!0),c.headers)r.setRequestHeader(a,c.headers[a]);function t(){var e,n=[],s=[],p={};return r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,m,b){n.push(m=m.toLowerCase()),s.push([m,b]),e=p[m],p[m]=e?e+","+b:b}),{ok:(r.status/100|0)==2,status:r.status,statusText:r.statusText,url:r.responseURL,clone:t,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return n},entries:function(){return s},get:function(h){return p[h.toLowerCase()]},has:function(h){return h.toLowerCase()in p}}}}r.withCredentials=c.credentials=="include",r.onload=function(){d(t())},r.onerror=f,r.send(c.body)})};l.default=i},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function c(d,f){for(var r=0;r<f.length;r++){var a=f[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,f,r){return f&&c(d.prototype,f),r&&c(d,r),d}}(),u=function(){function c(d,f){(function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")})(this,c),this.pluginName=d}return i(c,[{key:"track",value:function(d,f){window.analytics.track(d,f,{integration:{name:this.pluginName}})}}]),c}();l.default=u},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0}),l.YouTubeAnalytics=l.VimeoAnalytics=void 0;var i=c(o(3)),u=c(o(4));function c(d){return d&&d.__esModule?d:{default:d}}l.VimeoAnalytics=i.default,l.YouTubeAnalytics=u.default},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function f(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,a,t){return a&&f(r.prototype,a),t&&f(r,t),r}}(),u=c(o(0));function c(f){return f&&f.__esModule?f:{default:f}}var d=function(f){function r(a,t){(function(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r);var e=function(n,s){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||typeof s!="object"&&typeof s!="function"?n:s}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,"VimeoAnalytics"));return e.authToken=t,e.player=a,e.metadata={content:{},playback:{videoPlayer:"Vimeo"}},e.mostRecentHeartbeat=0,e.isPaused=!1,e}return function(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(a,t):a.__proto__=t)}(r,f),i(r,[{key:"initialize",value:function(){var a=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var e in t)this.registerHandler(e,t[e]);this.player.getVideoId().then(function(n){a.retrieveMetadata({id:n})}).catch(console.error)}},{key:"registerHandler",value:function(a,t){var e=this;this.player.on(a,function(n){e.updateMetadata(n),t.call(e,n)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var a=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==a&&t-a>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(a){var t=this;return new Promise(function(e,n){var s=a.id;(0,u.default)("https://api.vimeo.com/videos/"+s,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(p){return p.ok?p.json():n(p)}).then(function(p){t.metadata.content.title=p.name,t.metadata.content.description=p.description,t.metadata.content.publisher=p.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=p.duration}).catch(function(p){return console.error("Request to Vimeo API Failed with: ",p),n(p)})})}},{key:"updateMetadata",value:function(a){var t=this;return new Promise(function(e,n){t.player.getVolume().then(function(s){s&&(t.metadata.playback.sound=100*s),t.metadata.playback.position=a.seconds,e()}).catch(n)})}}]),r}(c(o(1)).default);l.default=d},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function a(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),u=d(o(0)),c=d(o(1));function d(a){return a&&a.__esModule?a:{default:a}}var f=function(a){function t(e,n){(function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t);var s=function(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!h||typeof h!="object"&&typeof h!="function"?p:h}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return s.player=e,s.apiKey=n,s.playerLoaded=!1,s.playbackStarted=!1,s.contentStarted=!1,s.isPaused=!1,s.isBuffering=!1,s.isSeeking=!1,s.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},s.metadata=[{playback:{video_player:"youtube"},content:{}}],s.playlistIndex=0,s}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,a),i(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var n=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=n,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(n,s){var p=e.player.getVideoData(),h=e.player.getPlaylist()||[p.video_id],m=h.join();(0,u.default)("https://www.googleapis.com/youtube/v3/videos?id="+m+"&part=snippet,contentDetails&key="+e.apiKey).then(function(b){if(!b.ok){var v=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw v.response=b,v}return b.json()}).then(function(b){e.metadata=[];for(var v=0,k=0;k<h.length;k++){var P=b.items[k];e.metadata.push({content:{title:P.snippet.title,description:P.snippet.description,keywords:P.snippet.tags,channel:P.snippet.channelTitle,airdate:P.snippet.publishedAt}}),v+=r(P.contentDetails.duration)}for(k=0;k<h.length;k++)e.metadata[k].playback={total_length:v,video_player:"youtube"};n()}).catch(function(b){e.metadata=h.map(function(v){return{playback:{video_player:"youtube"},content:{}}}),s(b)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var n=this.player.getPlaylist();n&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===n.length-1&&this.player.getPlaylistIndex()===0&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),n=this.player.getPlaylist();(n&&e===n.length-1||e===-1)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,n=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-n)>2e3}}]),t}(c.default);function r(a){var t=a.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(e!=null)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}l.default=f}])})})(w);var x=w.exports;const O=_(x),C=I({__proto__:null,default:O},[x]);export{C as i};
|
|
1
|
+
import{a as _}from"./index-Br5IV31H.js";function I(g,S){for(var y=0;y<S.length;y++){const l=S[y];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in g)){const i=Object.getOwnPropertyDescriptor(l,o);i&&Object.defineProperty(g,o,i.get?i:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(g,S){(function(y,l){g.exports=l()})(window,function(){return function(y){var l={};function o(i){if(l[i])return l[i].exports;var u=l[i]={i,l:!1,exports:{}};return y[i].call(u.exports,u,u.exports,o),u.l=!0,u.exports}return o.m=y,o.c=l,o.d=function(i,u,c){o.o(i,u)||Object.defineProperty(i,u,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,u){if(1&u&&(i=o(i)),8&u||4&u&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&u&&typeof i!="string")for(var d in i)o.d(c,d,(function(f){return i[f]}).bind(null,d));return c},o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,"a",u),u},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.p="",o(o.s=2)}([function(y,l,o){o.r(l);var i=typeof fetch=="function"?fetch.bind():function(u,c){return c=c||{},new Promise(function(d,f){var r=new XMLHttpRequest;for(var a in r.open(c.method||"get",u,!0),c.headers)r.setRequestHeader(a,c.headers[a]);function t(){var e,n=[],s=[],p={};return r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,m,b){n.push(m=m.toLowerCase()),s.push([m,b]),e=p[m],p[m]=e?e+","+b:b}),{ok:(r.status/100|0)==2,status:r.status,statusText:r.statusText,url:r.responseURL,clone:t,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return n},entries:function(){return s},get:function(h){return p[h.toLowerCase()]},has:function(h){return h.toLowerCase()in p}}}}r.withCredentials=c.credentials=="include",r.onload=function(){d(t())},r.onerror=f,r.send(c.body)})};l.default=i},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function c(d,f){for(var r=0;r<f.length;r++){var a=f[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,f,r){return f&&c(d.prototype,f),r&&c(d,r),d}}(),u=function(){function c(d,f){(function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")})(this,c),this.pluginName=d}return i(c,[{key:"track",value:function(d,f){window.analytics.track(d,f,{integration:{name:this.pluginName}})}}]),c}();l.default=u},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0}),l.YouTubeAnalytics=l.VimeoAnalytics=void 0;var i=c(o(3)),u=c(o(4));function c(d){return d&&d.__esModule?d:{default:d}}l.VimeoAnalytics=i.default,l.YouTubeAnalytics=u.default},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function f(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,a,t){return a&&f(r.prototype,a),t&&f(r,t),r}}(),u=c(o(0));function c(f){return f&&f.__esModule?f:{default:f}}var d=function(f){function r(a,t){(function(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")})(this,r);var e=function(n,s){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!s||typeof s!="object"&&typeof s!="function"?n:s}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,"VimeoAnalytics"));return e.authToken=t,e.player=a,e.metadata={content:{},playback:{videoPlayer:"Vimeo"}},e.mostRecentHeartbeat=0,e.isPaused=!1,e}return function(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(a,t):a.__proto__=t)}(r,f),i(r,[{key:"initialize",value:function(){var a=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var e in t)this.registerHandler(e,t[e]);this.player.getVideoId().then(function(n){a.retrieveMetadata({id:n})}).catch(console.error)}},{key:"registerHandler",value:function(a,t){var e=this;this.player.on(a,function(n){e.updateMetadata(n),t.call(e,n)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var a=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==a&&t-a>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(a){var t=this;return new Promise(function(e,n){var s=a.id;(0,u.default)("https://api.vimeo.com/videos/"+s,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(p){return p.ok?p.json():n(p)}).then(function(p){t.metadata.content.title=p.name,t.metadata.content.description=p.description,t.metadata.content.publisher=p.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=p.duration}).catch(function(p){return console.error("Request to Vimeo API Failed with: ",p),n(p)})})}},{key:"updateMetadata",value:function(a){var t=this;return new Promise(function(e,n){t.player.getVolume().then(function(s){s&&(t.metadata.playback.sound=100*s),t.metadata.playback.position=a.seconds,e()}).catch(n)})}}]),r}(c(o(1)).default);l.default=d},function(y,l,o){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function a(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),u=d(o(0)),c=d(o(1));function d(a){return a&&a.__esModule?a:{default:a}}var f=function(a){function t(e,n){(function(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t);var s=function(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!h||typeof h!="object"&&typeof h!="function"?p:h}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return s.player=e,s.apiKey=n,s.playerLoaded=!1,s.playbackStarted=!1,s.contentStarted=!1,s.isPaused=!1,s.isBuffering=!1,s.isSeeking=!1,s.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},s.metadata=[{playback:{video_player:"youtube"},content:{}}],s.playlistIndex=0,s}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,a),i(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var n=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=n,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(n,s){var p=e.player.getVideoData(),h=e.player.getPlaylist()||[p.video_id],m=h.join();(0,u.default)("https://www.googleapis.com/youtube/v3/videos?id="+m+"&part=snippet,contentDetails&key="+e.apiKey).then(function(b){if(!b.ok){var v=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw v.response=b,v}return b.json()}).then(function(b){e.metadata=[];for(var v=0,k=0;k<h.length;k++){var P=b.items[k];e.metadata.push({content:{title:P.snippet.title,description:P.snippet.description,keywords:P.snippet.tags,channel:P.snippet.channelTitle,airdate:P.snippet.publishedAt}}),v+=r(P.contentDetails.duration)}for(k=0;k<h.length;k++)e.metadata[k].playback={total_length:v,video_player:"youtube"};n()}).catch(function(b){e.metadata=h.map(function(v){return{playback:{video_player:"youtube"},content:{}}}),s(b)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var n=this.player.getPlaylist();n&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===n.length-1&&this.player.getPlaylistIndex()===0&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),n=this.player.getPlaylist();(n&&e===n.length-1||e===-1)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,n=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-n)>2e3}}]),t}(c.default);function r(a){var t=a.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(e!=null)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}l.default=f}])})})(w);var x=w.exports;const O=_(x),C=I({__proto__:null,default:O},[x]);export{C as i};
|