PageSourceSearch

https://onchaingm.com/assets/dist-DBLjVZfu.js

js onchaingm.com collected 2026-09-30 09:43:36 UTC 372,910 bytes, 7 lines download raw bytes

1import{n as Vt,o as oe,r as zt,s as Qn,t as F}from"./rolldown-runtime-aoxQmdZa.js";import{_ as Yn,g as Xn}from"./charts-CkvlCfgD.js";import{c as Gt,l as Jt,m as qe,p as $e}from"./react-vendor-DkwPbUPX.js";import{Tn as Zt}from"./web3-vendor-D6dMxBvH.js";import{t as Ot}from"./index-DiBsi3YD.js";var ei=F(((e,a)=>{var t=1e3,r=t*60,n=r*60,i=n*24,o=i*7,h=i*365.25;a.exports=function(s,y){y=y||{};var f=typeof s;if(f==="string"&&s.length>0)return p(s);if(f==="number"&&isFinite(s))return y.long?m(s):d(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function p(s){if(s=String(s),!(s.length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(y){var f=parseFloat(y[1]);switch((y[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return f*h;case"weeks":case"week":case"w":return f*o;case"days":case"day":case"d":return f*i;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*r;case"seconds":case"second":case"secs":case"sec":case"s":return f*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function d(s){var y=Math.abs(s);return y>=i?Math.round(s/i)+"d":y>=n?Math.round(s/n)+"h":y>=r?Math.round(s/r)+"m":y>=t?Math.round(s/t)+"s":s+"ms"}function m(s){var y=Math.abs(s);return y>=i?v(s,y,i,"day"):y>=n?v(s,y,n,"hour"):y>=r?v(s,y,r,"minute"):y>=t?v(s,y,t,"second"):s+" ms"}function v(s,y,f,g){var w=y>=f*1.5;return Math.round(s/f)+" "+g+(w?"s":"")}})),ti=F(((e,a)=>{function t(r){i.debug=i,i.default=i,i.coerce=v,i.disable=d,i.enable=h,i.enabled=m,i.humanize=ei(),i.destroy=s,Object.keys(r).forEach(y=>{i[y]=r[y]}),i.names=[],i.skips=[],i.formatters={};function n(y){let f=0;for(let g=0;g<y.length;g++)f=(f<<5)-f+y.charCodeAt(g),f|=0;return i.colors[Math.abs(f)%i.colors.length]}i.selectColor=n;function i(y){let f,g=null,w,u;function l(...b){if(!l.enabled)return;const M=l,k=Number(new Date);M.diff=k-(f||k),M.prev=f,M.curr=k,f=k,b[0]=i.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let P=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,($,B)=>{if($==="%%")return"%";P++;const j=i.formatters[B];if(typeof j=="function"){const U=b[P];$=j.call(M,U),b.splice(P,1),P--}return $}),i.formatArgs.call(M,b),(M.log||i.log).apply(M,b)}return l.namespace=y,l.useColors=i.useColors(),l.color=i.selectColor(y),l.extend=o,l.destroy=i.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(w!==i.namespaces&&(w=i.namespaces,u=i.enabled(y)),u),set:b=>{g=b}}),typeof i.init=="function"&&i.init(l),l}function o(y,f){const g=i(this.namespace+(typeof f>"u"?":":f)+y);return g.log=this.log,g}function h(y){i.save(y),i.namespaces=y,i.names=[],i.skips=[];const f=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const g of f)g[0]==="-"?i.skips.push(g.slice(1)):i.names.push(g)}function p(y,f){let g=0,w=0,u=-1,l=0;for(;g<y.length;)if(w<f.length&&(f[w]===y[g]||f[w]==="*"))f[w]==="*"?(u=w,l=g,w++):(g++,w++);else if(u!==-1)w=u+1,l++,g=l;else return!1;for(;w<f.length&&f[w]==="*";)w++;return w===f.length}function d(){const y=[...i.names,...i.skips.map(f=>"-"+f)].join(",");return i.enable(""),y}function m(y){for(const f of i.skips)if(p(y,f))return!1;for(const f of i.names)if(p(y,f))return!0;return!1}function v(y){return y instanceof Error?y.stack||y.message:y}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return i.enable(i.load()),i}a.exports=t})),ri=F(((e,a)=>{e.formatArgs=r,e.save=n,e.load=i,e.useColors=t,e.storage=o(),e.destroy=(()=>{let p=!1;return()=>{p||(p=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33
1CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let p;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(p=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(p[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(p){if(p[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+p[0]+(this.useColors?"%c ":" ")+"+"+a.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;p.splice(1,0,d,"color: inherit");let m=0,v=0;p[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(m++,s==="%c"&&(v=m))}),p.splice(v,0,d)}e.log=console.debug||console.log||(()=>{});function n(p){try{p?e.storage.setItem("debug",p):e.storage.removeItem("debug")}catch{}}function i(){let p;try{p=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!p&&typeof process<"u"&&"env"in process&&(p={}.DEBUG),p}function o(){try{return localStorage}catch{}}a.exports=ti()(e);var{formatters:h}=a.exports;h.j=function(p){try{return JSON.stringify(p)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})),ni=F(((e,a)=>{a.exports=h,h.default=h,h.stable=v,h.stableStringify=v;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function h(f,g,w,u){typeof u>"u"&&(u=o()),d(f,"",0,[],void 0,0,u);var l;try{i.length===0?l=JSON.stringify(f,g,w):l=JSON.stringify(f,y(g),w)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var b=n.pop();b.length===4?Object.defineProperty(b[0],b[1],b[3]):b[0][b[1]]=b[2]}}return l}function p(f,g,w,u){var l=Object.getOwnPropertyDescriptor(u,w);l.get!==void 0?l.configurable?(Object.defineProperty(u,w,{value:f}),n.push([u,w,g,l])):i.push([g,w,f]):(u[w]=f,n.push([u,w,g]))}function d(f,g,w,u,l,b,M){b+=1;var k;if(typeof f=="object"&&f!==null){for(k=0;k<u.length;k++)if(u[k]===f){p(r,f,g,l);return}if(typeof M.depthLimit<"u"&&b>M.depthLimit){p(t,f,g,l);return}if(typeof M.edgesLimit<"u"&&w+1>M.edgesLimit){p(t,f,g,l);return}if(u.push(f),Array.isArray(f))for(k=0;k<f.length;k++)d(f[k],k,k,u,f,b,M);else{var P=Object.keys(f);for(k=0;k<P.length;k++){var $=P[k];d(f[$],$,k,u,f,b,M)}}u.pop()}}function m(f,g){return f<g?-1:f>g?1:0}function v(f,g,w,u){typeof u>"u"&&(u=o());var l=s(f,"",0,[],void 0,0,u)||f,b;try{i.length===0?b=JSON.stringify(l,g,w):b=JSON.stringify(l,y(g),w)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;n.length!==0;){var M=n.pop();M.length===4?Object.defineProperty(M[0],M[1],M[3]):M[0][M[1]]=M[2]}}return b}function s(f,g,w,u,l,b,M){b+=1;var k;if(typeof f=="object"&&f!==null){for(k=0;k<u.length;k++)if(u[k]===f){p(r,f,g,l);return}try{if(typeof f.toJSON=="function")return}catch{return}if(typeof M.depthLimit<"u"&&b>M.depthLimit){p(t,f,g,l);return}if(typeof M.edgesLimit<"u"&&w+1>M.edgesLimit){p(t,f,g,l);return}if(u.push(f),Array.isArray(f))for(k=0;k<f.length;k++)s(f[k],k,k,u,f,b,M);else{var P={},$=Object.keys(f).sort(m);for(k=0;k<$.length;k++){var B=$[k];s(f[B],B,k,u,f,b,M),P[B]=f[B]}if(typeof l<"u")n.push([l,g,f]),l[g]=P;else return P}u.pop()}}function y(f){return f=typeof f<"u"?f:function(g,w){return w},function(g,w){if(i.length>0)for(var u=0;u<i.length;u++){var l=i[u];if(l[1]===g&&l[0]===w){w=l[2],i.splice(u,1);break}}return f.call(this,g,w)}}})),ii=F((e=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.walletLogo=void 0;var a=(t,r)=>{let n;switch(t){case"standard":return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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 n=r,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r}' height='${n}' 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 n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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.7
1h-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 n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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 n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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 n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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.8
11,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' 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 `}};e.walletLogo=a})),si=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LINK_API_URL=void 0,e.LINK_API_URL="https://www.walletlink.org"})),Kt=F(((e,a)=>{(function(t,r){"use strict";function n(I,c){if(!I)throw new Error(c||"Assertion failed")}function i(I,c){I.super_=c;var _=function(){};_.prototype=c.prototype,I.prototype=new _,I.prototype.constructor=I}function o(I,c,_){if(o.isBN(I))return I;this.negative=0,this.words=null,this.length=0,this.red=null,I!==null&&((c==="le"||c==="be")&&(_=c,c=10),this._init(I||0,c||10,_||"be"))}typeof t=="object"?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var h;try{typeof window<"u"&&typeof window.Buffer<"u"?h=window.Buffer:h=Ot().Buffer}catch{}o.isBN=function(c){return c instanceof o?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===o.wordSize&&Array.isArray(c.words)},o.max=function(c,_){return c.cmp(_)>0?c:_},o.min=function(c,_){return c.cmp(_)<0?c:_},o.prototype._init=function(c,_,S){if(typeof c=="number")return this._initNumber(c,_,S);if(typeof c=="object")return this._initArray(c,_,S);_==="hex"&&(_=16),n(_===(_|0)&&_>=2&&_<=36),c=c.toString().replace(/\s+/g,"");var R=0;c[0]==="-"&&(R++,this.negative=1),R<c.length&&(_===16?this._parseHex(c,R,S):(this._parseBase(c,_,R),S==="le"&&this._initArray(this.toArray(),_,S)))},o.prototype._initNumber=function(c,_,S){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),S==="le"&&this._initArray(this.toArray(),_,S)},o.prototype._initArray=function(c,_,S){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 R=0;R<this.length;R++)this.words[R]=0;var C,O,D=0;if(S==="be")for(R=c.length-1,C=0;R>=0;R-=3)O=c[R]|c[R-1]<<8|c[R-2]<<16,this.words[C]|=O<<D&67108863,this.words[C+1]=O>>>26-D&67108863,D+=24,D>=26&&(D-=26,C++);else if(S==="le")for(R=0,C=0;R<c.length;R+=3)O=c[R]|c[R+1]<<8|c[R+2]<<16,this.words[C]|=O<<D&67108863,this.words[C+1]=O>>>26-D&67108863,D+=24,D>=26&&(D-=26,C++);return this._strip()};function p(I,c){var _=I.charCodeAt(c);if(_>=48&&_<=57)return _-48;if(_>=65&&_<=70)return _-55;if(_>=97&&_<=102)return _-87;n(!1,"Invalid character in "+I)}function d(I,c,_){var S=p(I,_);return _-1>=c&&(S|=p(I,_-1)<<4),S}o.prototype._parseHex=function(c,_,S){this.length=Math.ceil((c.length-_)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var C=0,O=0,D;if(S==="be")for(R=c.length-1;R>=_;R-=2)D=d(c,_,R)<<C,this.words[O]|=D&67108863,C>=18?(C-=18,O+=1,this.words[O]|=D>>>26):C+=8;else for(R=(c.length-_)%2===0?_+1:_;R<c.length;R+=2)D=d(c,_,R)<<C,this.words[O]|=D&67108863,C>=18?(C-=18,O+=1,this.words[O]|=D>>>26):C+=8;this._strip()};function m(I,c,_,S){for(var R=0,C=0,O=Math.min(I.length,_),D=c;D<O;D++){var A=I.charCodeAt(D)-48;R*=S,A>=49?C=A-49+10:A>=17?C=A-17+10:C=A,n(A>=0&&C<S,"Invalid character"),R+=C}return R}o.prototype._parseBase=function(c,_,S){this.words=[0],this.length=1;for(var R=0,C=1;C<=67108863;C*=_)R++;R--,C=C/_|0;for(var O=c.length-S,D=O%R,A=Math.min(O,O-D)+S,E=0,N=S;N<A;N+=R)E=m(c,N,N+R,_),this.imuln(C),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(D!==0){var z=1;for(E=m(c,N,c.length,_),N=0;N<D;N++)z*=_;this.imuln(z),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},o.prototype.copy=function(c){c.words=new Array(this.length);for(var _=0;_<this.length;_++)c.words[_]=this.words[_];c.length=this.length,c.negative=this.negative,c.red=this.red};function v(I,c){I.words=c.words,I.length=c.length,I.negative=c.negative,I.red=c.red}if(o.prototype._move=function(c){v(c,this)},o.prototype.clone=function(){var c=new o(null);return this.copy(c),c},o.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch{o.prototype.inspect=s}else o.prototype.inspect=s;function s(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16
vendor: 11,846 bytes, line 1
1777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(c,_){c=c||10,_=_|0||1;var S;if(c===16||c==="hex"){S="";for(var R=0,C=0,O=0;O<this.length;O++){var D=this.words[O],A=((D<<R|C)&16777215).toString(16);C=D>>>24-R&16777215,R+=2,R>=26&&(R-=26,O--),C!==0||O!==this.length-1?S=y[6-A.length]+A+S:S=A+S}for(C!==0&&(S=C.toString(16)+S);S.length%_!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(c===(c|0)&&c>=2&&c<=36){var E=f[c],N=g[c];S="";var z=this.clone();for(z.negative=0;!z.isZero();){var x=z.modrn(N).toString(c);z=z.idivn(N),z.isZero()?S=x+S:S=y[E-x.length]+x+S}for(this.isZero()&&(S="0"+S);S.length%_!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}n(!1,"Base should be between 2 and 36")},o.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},o.prototype.toJSON=function(){return this.toString(16,2)},h&&(o.prototype.toBuffer=function(c,_){return this.toArrayLike(h,c,_)}),o.prototype.toArray=function(c,_){return this.toArrayLike(Array,c,_)};var w=function(c,_){return c.allocUnsafe?c.allocUnsafe(_):new c(_)};o.prototype.toArrayLike=function(c,_,S){this._strip();var R=this.byteLength(),C=S||Math.max(1,R);n(R<=C,"byte array longer than desired length"),n(C>0,"Requested array length <= 0");var O=w(c,C);return this["_toArrayLike"+(_==="le"?"LE":"BE")](O,R),O},o.prototype._toArrayLikeLE=function(c,_){for(var S=0,R=0,C=0,O=0;C<this.length;C++){var D=this.words[C]<<O|R;c[S++]=D&255,S<c.length&&(c[S++]=D>>8&255),S<c.length&&(c[S++]=D>>16&255),O===6?(S<c.length&&(c[S++]=D>>24&255),R=0,O=0):(R=D>>>24,O+=2)}if(S<c.length)for(c[S++]=R;S<c.length;)c[S++]=0},o.prototype._toArrayLikeBE=function(c,_){for(var S=c.length-1,R=0,C=0,O=0;C<this.length;C++){var D=this.words[C]<<O|R;c[S--]=D&255,S>=0&&(c[S--]=D>>8&255),S>=0&&(c[S--]=D>>16&255),O===6?(S>=0&&(c[S--]=D>>24&255),R=0,O=0):(R=D>>>24,O+=2)}if(S>=0)for(c[S--]=R;S>=0;)c[S--]=0},Math.clz32?o.prototype._countBits=function(c){return 32-Math.clz32(c)}:o.prototype._countBits=function(c){var _=c,S=0;return _>=4096&&(S+=13,_>>>=13),_>=64&&(S+=7,_>>>=7),_>=8&&(S+=4,_>>>=4),_>=2&&(S+=2,_>>>=2),S+_},o.prototype._zeroBits=function(c){if(c===0)return 26;var _=c,S=0;return(_&8191)===0&&(S+=13,_>>>=13),(_&127)===0&&(S+=7,_>>>=7),(_&15)===0&&(S+=4,_>>>=4),(_&3)===0&&(S+=2,_>>>=2),(_&1)===0&&S++,S},o.prototype.bitLength=function(){var c=this.words[this.length-1],_=this._countBits(c);return(this.length-1)*26+_};function u(I){for(var c=new Array(I.bitLength()),_=0;_<c.length;_++){var S=_/26|0,R=_%26;c[_]=I.words[S]>>>R&1}return c}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,_=0;_<this.length;_++){var S=this._zeroBits(this.words[_]);if(c+=S,S!==26)break}return c},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},o.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var _=0;_<c.length;_++)this.words[_]=this.words[_]|c.words[_];return this._strip()},o.prototype.ior=function(c){return n((this.negative|c.negative)===0),this.iuor(c)},o.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},o.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},o.prototype.iuand=function(c){var _;this.length>c.length?_=c:_=this;for(var S=0;S<_.length;S++)this.words[S]=this.words[S]&c.words[S];return this.length=_.length,this._strip()},o.prototype.iand=function(c){return n((this.negative|c.negative)===0),this.iuand(c)},o.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},o.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},o.prototype.iuxor=function(c){var _,S;this.length>c.length?(_=this,S=c):(_=c,S=this);for(var R=0;R<S.length;R++)this.words[R]=_.words[R]^S.words[R];if(this!==_)for(;R<_.length;R++)this.words[R]=_.words[R];return this.length=_.length,this._strip()},o.prototype.ixor=function(c){return n((this.negative|c.negative)===0),this.iuxor(c)},o.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},o.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},o.prototype.inotn=function(c){n(typeof c=="number"&&c>=0);var _=Math.ceil(c/26)|0,S=c%26;this._expand(_),S>0&&_--;for(var R=0;R<_;R++)this.words[R]=~this.words[R]&67108863;return S>0&&(this.words[R]=~this.words[R]&67108863>>26-S),this._strip()},o.prototype.notn=function(c){return this.clone().inotn(c)},o.prototype.setn=function(c,_){n(typeof c=="number"&&c>=0);var S=c/26|0,R=c%26;return this._expand(S+1),_?this.words[S]=this.words[S]|1<<R:this.words[S]=this.words[S]&~(1<<R),this._strip()},o.prototype.iadd=function(c){var _;if(this.negative!==0&&c.negative===0)return this.negative=0,_=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,_=this.isub(c),c.negative=1,_._normSign();var S,R;this.length>c.length?(S=this,R=c):(S=c,R=this);for(var C=0,O=0;O<R.length;O++)_=(S.words[O]|0)+(R.words[O]|0)+C,this.words[O]=_&67108863,C=_>>>26;for(;C!==0&&O<S.length;O++)_=(S.words[O]|0)+C,this.words[O]=_&67108863,C=_>>>26;if(this.length=S.length,C!==0)this.words[this.length]=C,this.length++;else if(S!==this)for(;O<S.length;O++)this.words[O]=S.words[O];return this},o.prototype.add=function(c){var _;return c.negative!==0&&this.negative===0?(c.negative=0,_=this.sub(c),c.negative^=1,_):c.negative===0&&this.negative!==0?(this.negative=0,_=c.sub(this),this.negative=1,_):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},o.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var _=this.iadd(c);return c.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var S=this.cmp(c);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,C;S>0?(R=this,C=c):(R=c,C=this);for(var O=0,D=0;D<C.length;D++)_=(R.words[D]|0)-(C.words[D]|0)+O,O=_>>26,this.words[D]=_&67108863;for(;O!==0&&D<R.length;D++)_=(R.words[D]|0)+O,O=_>>26,this.words[D]=_&67108863;if(O===0&&D<R.length&&R!==this)for(;D<R.length;D++)this.words[D]=R.words[D];return this.length=Math.max(this.length,D),R!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(c){return this.clone().isub(c)};function l(I,c,_){_.negative=c.negative^I.negative;var S=I.length+c.length|0;_.length=S,S=S-1|0;var R=I.words[0]|0,C=c.words[0]|0,O=R*C,D=O&67108863,A=O/67108864|0;_.words[0]=D;for(var E=1;E<S;E++){for(var N=A>>>26,z=A&67108863,x=Math.min(E,c.length-1),q=Math.max(0,E-I.length+1);q<=x;q++){var W=E-q|0;R=I.words[W]|0,C=c.words[q]|0,O=R*C+z,N+=O/67108864|0,z=O&67108863}_.words[E]=z|0,A=N|0}return A!==0?_.words[E]=A|0:_.length--,_._strip()}var b=function(c,_,S){var R=c.words,C=_.words,O=S.words,D=0,A,E,N,z=R[0]|0,x=z&8191,q=z>>>13,W=R[1]|0,V=W&8191,G=W>>>13,L=R[2]|0,T=L&8191,H=L>>>13,J=R[3]|0,ee=J&8191,Z=J>>>13,ne=R[4]|0,ie=ne&8191,se=ne>>>13,xe=R[5]|0,re=xe&8191,te=xe>>>13,Oe=R[6]|0,ae=Oe&8191,le=Oe>>>13,He=R[7]|0,ce=He&8191,Be=He>>>13,mt=R[8]|0,ue=mt&8191,he=mt>>>13,yt=R[9]|0,de=yt&8191,fe=yt>>>13,_t=C[0]|0,pe=_t&8191,ge=_t>>>13,bt=C[1]|0,ve=bt&8191,me=bt>>>13,wt=C[2]|0,ye=wt&8191,_e=wt>>>13,Et=C[3]|0,be=Et&8191,we=Et>>>13,St=C[4]|0,Ee=St&8191,Se=St>>>13,Rt=C[5]|0,Re=Rt&8191,Me=Rt>>>13,Mt=C[6]|0,ke=Mt&8191,Ce=Mt>>>13,kt=C[7]|0,Ie=kt&8191,Ae=kt>>>13,Ct=C[8]|0,Te=Ct&8191,Ne=Ct>>>13,It=C[9]|0,Le=It&8191,Pe=It>>>13;S.negative=c.negative^_.negative,S.length=19,A=Math.imul(x,pe),E=Math.imul(x,ge),E=E+Math.imul(q,pe)|0,N=Math.imul(q,ge);var Xe=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,A=Math.imul(V,pe),E=Math.imul(V,ge),E=E+Math.imul(G,pe)|0,N=Math.imul(G,ge),A=A+Math.imul(x,ve)|0,E=E+Math.imul(x,me)|0,E=E+Math.imul(q,ve)|0,N=N+Math.imul(q,me)|0;var et=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(et>>>26)|0,et&=67108863,A=Math.imul(T,pe),E=Math.imul(T,ge),E=E+Math.imul(H,pe)|0,N=Math.imul(H,ge),A=A+Math.imul(V,ve)|0,E=E+Math.imul(V,me)|0,E=E+Math.imul(G,ve)|0,N=N+Math.imul(G,me)|0,A=A+Math.imul(x,ye)|0,E=E+Math.imul(x,_e)|0,E=E+Math.imul(q,ye)|0,N=N+Math.imul(q,_e)|0;var tt=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(tt>>>26)|0,tt&=67108863,A=Math.imul(ee,pe),E=Math.imul(ee,ge),E=E+Math.imul(Z,pe)|0,N=Math.imul(Z,ge),A=A+Math.imul(T,ve)|0,E=E+Math.imul(T,me)|0,E=E+Math.imul(H,ve)|0,N=N+Math.imul(H,me)|0,A=A+Math.imul(V,ye)|0,E=E+Math.imul(V,_e)|0,E=E+Math.imul(G,ye)|0,N=N+Math.imul(G,_e)|0,A=A+Math.imul(x,be)|0,E=E+Math.imul(x,we)|0,E=E+Math.imul(q,be)|0,N=N+Math.imul(q,we)|0;var rt=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(rt>>>26)|0,rt&=67108863,A=Math.imul(ie,pe),E=Math.imul(ie,ge),E=E+Math.imul(se,pe)|0,N=Math.imul(se,ge),A=A+Math.imul(ee,ve)|0,E=E+Math.imul(ee,me)|0,E=E+Math.imul(Z,ve)|0,N=N+Math.imul(Z,me)|0,A=A+Math.imul(T,ye)|0,E=E+Math.imul(T,_e)|0,E=E+Math.imul(H,ye)|0,N=N+Math.imul(H,_e)|0,A=A+Math.imul(V,be)|0,E=E+Math.imul(V,we)|0,E=E+Math.imul(G,be)|0,N=N+Math.imul(G,we)|0,A=A+Math.imul(x,Ee)|0,E=E+Math.imul(x,Se)|0,E=E+Math.imul(q,Ee)|0,N=N+Math.imul(q,Se)|0;var nt=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(nt>>>26)|0,nt&=67108863,A=Math.imul(re,pe),E=Math.imul(re,ge),E=E+Math.imul(te,pe)|0,N=Math.imul(te,ge),A=A+Math.imul(ie,ve)|0,E=E+Math.imul(ie,me)|0,E=E+Math.imul(se,ve)|0,N=N+Math.imul(se,me)|0,A=A+Math.imul(ee,ye)|0,E=E+Math.imul(ee,_e)|0,E=E+Math.imul(Z,ye)|0,N=N+Math.imul(Z,_e)|0,A=A+Math.imul(T,be)|0,E=E+Math.imul(T,we)|0,E=E+Math.imul(H,be)|0,N=N+Math.imul(H,we)|0,A=A+Math.imul(V,Ee)|0,E=E+Math.imul(V,Se)|0,E=E+Math.imul(G,Ee)|0,N=N+Math.imul(G,Se)|0,A=A+Math.imul(x,Re)|0,E=E+Math.imul(x,Me)|0,E=E+Math.imul(q,Re)|0,N=N+Math.imul(q,Me)|0;var it=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(it>>>26)|0,it&=67108863,A=Math.imul(ae,pe),E=Math.imul(ae,ge),E=E+Math.imul(le,pe)|0,N=Math.imul(le,ge),A=A+Math.imul(re,ve)|0,E=E+Math.imul(re,me)|0,E=E+Math.imul(te,ve)|0,N=N+Math.imul(te,me)|0,A=A+Math.imul(ie,ye)|0,E=E+Math.imul(ie,_e)|0,E=E+Math.imul(se,ye)|0,N=N+Math.imul(se,_e)|0,A=A+Math.imul(ee,be)|0,E=E+Math.imul(ee,we)|0,E=E+Math.imul(Z,be)|0,N=N+Math.imul(Z,we)|0,A=A+Math.imul(T,Ee)|0,E=E+Math.imul(T,Se)|0,E=E+Math.imul(H,Ee)|0,N=N+Math.imul(H,Se)|0,A=A+Math.imul(V,Re)|0,E=E+Math.imul(V,Me)|0,E=E+Math.imul(G,Re)|0,N=N+Math.imul(G,Me)|0,A=A+Math.imul(x,ke)|0,E=E+Math.imul(x,Ce)|0,E=E+Math.imul(q,ke)|0,N=N+Math.imul(q,Ce)|0;var st=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(st>>>26)|0,st&=67108863,A=Math.imul(ce,pe),E=Math.imul(ce,ge),E=E+Math.imul(Be,pe)|0,N=Math.imul(Be,ge),A=A+Math.imul(ae,ve)|0,E=E+Math.imul(ae,me)|0,E=E+Math.imul(le,ve)|0,N=N+Math.imul(le,me)|0,A=A+Math.imul(re,ye)|0,E=E+Math.imul(re,_e)|0,E=E+Math.imul(te,ye)|0,N=N+Math.imul(te,_e)|0,A=A+Math.imul(ie,be)|0,E=E+Math.imul(ie,we)|0,E=E+Math.imul(se,be)|0,N=N+Math.imul(se,we)|0,A=A+Math.imul(ee,Ee)|0,E=E+Math.imul(ee,Se)|0,E=E+Math.imul(Z,Ee)|0,N=N+Math.imul(Z,Se)|0,A=A+Math.imul(T,Re)|0,E=E+Math.imul(T,Me)|0,E=E+Math.imul(H,Re)|0,N=N+Math.imul(H,Me)|0,A=A+Math.imul(V,ke)|0,E=E+Math.imul(V,Ce)|0,E=E+Math.imul(G,ke)|0,N=N+Math.imul(G,Ce)|0,A=A+Math.imul(x,Ie)|0,E=E+Math.imul(x,Ae)|0,E=E+Math.imul(q,Ie)|0,N=N+Math.imul(q,Ae)|0;
1var at=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(at>>>26)|0,at&=67108863,A=Math.imul(ue,pe),E=Math.imul(ue,ge),E=E+Math.imul(he,pe)|0,N=Math.imul(he,ge),A=A+Math.imul(ce,ve)|0,E=E+Math.imul(ce,me)|0,E=E+Math.imul(Be,ve)|0,N=N+Math.imul(Be,me)|0,A=A+Math.imul(ae,ye)|0,E=E+Math.imul(ae,_e)|0,E=E+Math.imul(le,ye)|0,N=N+Math.imul(le,_e)|0,A=A+Math.imul(re,be)|0,E=E+Math.imul(re,we)|0,E=E+Math.imul(te,be)|0,N=N+Math.imul(te,we)|0,A=A+Math.imul(ie,Ee)|0,E=E+Math.imul(ie,Se)|0,E=E+Math.imul(se,Ee)|0,N=N+Math.imul(se,Se)|0,A=A+Math.imul(ee,Re)|0,E=E+Math.imul(ee,Me)|0,E=E+Math.imul(Z,Re)|0,N=N+Math.imul(Z,Me)|0,A=A+Math.imul(T,ke)|0,E=E+Math.imul(T,Ce)|0,E=E+Math.imul(H,ke)|0,N=N+Math.imul(H,Ce)|0,A=A+Math.imul(V,Ie)|0,E=E+Math.imul(V,Ae)|0,E=E+Math.imul(G,Ie)|0,N=N+Math.imul(G,Ae)|0,A=A+Math.imul(x,Te)|0,E=E+Math.imul(x,Ne)|0,E=E+Math.imul(q,Te)|0,N=N+Math.imul(q,Ne)|0;var ot=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(ot>>>26)|0,ot&=67108863,A=Math.imul(de,pe),E=Math.imul(de,ge),E=E+Math.imul(fe,pe)|0,N=Math.imul(fe,ge),A=A+Math.imul(ue,ve)|0,E=E+Math.imul(ue,me)|0,E=E+Math.imul(he,ve)|0,N=N+Math.imul(he,me)|0,A=A+Math.imul(ce,ye)|0,E=E+Math.imul(ce,_e)|0,E=E+Math.imul(Be,ye)|0,N=N+Math.imul(Be,_e)|0,A=A+Math.imul(ae,be)|0,E=E+Math.imul(ae,we)|0,E=E+Math.imul(le,be)|0,N=N+Math.imul(le,we)|0,A=A+Math.imul(re,Ee)|0,E=E+Math.imul(re,Se)|0,E=E+Math.imul(te,Ee)|0,N=N+Math.imul(te,Se)|0,A=A+Math.imul(ie,Re)|0,E=E+Math.imul(ie,Me)|0,E=E+Math.imul(se,Re)|0,N=N+Math.imul(se,Me)|0,A=A+Math.imul(ee,ke)|0,E=E+Math.imul(ee,Ce)|0,E=E+Math.imul(Z,ke)|0,N=N+Math.imul(Z,Ce)|0,A=A+Math.imul(T,Ie)|0,E=E+Math.imul(T,Ae)|0,E=E+Math.imul(H,Ie)|0,N=N+Math.imul(H,Ae)|0,A=A+Math.imul(V,Te)|0,E=E+Math.imul(V,Ne)|0,E=E+Math.imul(G,Te)|0,N=N+Math.imul(G,Ne)|0,A=A+Math.imul(x,Le)|0,E=E+Math.imul(x,Pe)|0,E=E+Math.imul(q,Le)|0,N=N+Math.imul(q,Pe)|0;var lt=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(lt>>>26)|0,lt&=67108863,A=Math.imul(de,ve),E=Math.imul(de,me),E=E+Math.imul(fe,ve)|0,N=Math.imul(fe,me),A=A+Math.imul(ue,ye)|0,E=E+Math.imul(ue,_e)|0,E=E+Math.imul(he,ye)|0,N=N+Math.imul(he,_e)|0,A=A+Math.imul(ce,be)|0,E=E+Math.imul(ce,we)|0,E=E+Math.imul(Be,be)|0,N=N+Math.imul(Be,we)|0,A=A+Math.imul(ae,Ee)|0,E=E+Math.imul(ae,Se)|0,E=E+Math.imul(le,Ee)|0,N=N+Math.imul(le,Se)|0,A=A+Math.imul(re,Re)|0,E=E+Math.imul(re,Me)|0,E=E+Math.imul(te,Re)|0,N=N+Math.imul(te,Me)|0,A=A+Math.imul(ie,ke)|0,E=E+Math.imul(ie,Ce)|0,E=E+Math.imul(se,ke)|0,N=N+Math.imul(se,Ce)|0,A=A+Math.imul(ee,Ie)|0,E=E+Math.imul(ee,Ae)|0,E=E+Math.imul(Z,Ie)|0,N=N+Math.imul(Z,Ae)|0,A=A+Math.imul(T,Te)|0,E=E+Math.imul(T,Ne)|0,E=E+Math.imul(H,Te)|0,N=N+Math.imul(H,Ne)|0,A=A+Math.imul(V,Le)|0,E=E+Math.imul(V,Pe)|0,E=E+Math.imul(G,Le)|0,N=N+Math.imul(G,Pe)|0;var ct=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(ct>>>26)|0,ct&=67108863,A=Math.imul(de,ye),E=Math.imul(de,_e),E=E+Math.imul(fe,ye)|0,N=Math.imul(fe,_e),A=A+Math.imul(ue,be)|0,E=E+Math.imul(ue,we)|0,E=E+Math.imul(he,be)|0,N=N+Math.imul(he,we)|0,A=A+Math.imul(ce,Ee)|0,E=E+Math.imul(ce,Se)|0,E=E+Math.imul(Be,Ee)|0,N=N+Math.imul(Be,Se)|0,A=A+Math.imul(ae,Re)|0,E=E+Math.imul(ae,Me)|0,E=E+Math.imul(le,Re)|0,N=N+Math.imul(le,Me)|0,A=A+Math.imul(re,ke)|0,E=E+Math.imul(re,Ce)|0,E=E+Math.imul(te,ke)|0,N=N+Math.imul(te,Ce)|0,A=A+Math.imul(ie,Ie)|0,E=E+Math.imul(ie,Ae)|0,E=E+Math.imul(se,Ie)|0,N=N+Math.imul(se,Ae)|0,A=A+Math.imul(ee,Te)|0,E=E+Math.imul(ee,Ne)|0,E=E+Math.imul(Z,Te)|0,N=N+Math.imul(Z,Ne)|0,A=A+Math.imul(T,Le)|0,E=E+Math.imul(T,Pe)|0,E=E+Math.imul(H,Le)|0,N=N+Math.imul(H,Pe)|0;var ut=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(ut>>>26)|0,ut&=67108863,A=Math.imul(de,be),E=Math.imul(de,we),E=E+Math.imul(fe,be)|0,N=Math.imul(fe,we),A=A+Math.imul(ue,Ee)|0,E=E+Math.imul(ue,Se)|0,E=E+Math.imul(he,Ee)|0,N=N+Math.imul(he,Se)|0,A=A+Math.imul(ce,Re)|0,E=E+Math.imul(ce,Me)|0,E=E+Math.imul(Be,Re)|0,N=N+Math.imul(Be,Me)|0,A=A+Math.imul(ae,ke)|0,E=E+Math.imul(ae,Ce)|0,E=E+Math.imul(le,ke)|0,N=N+Math.imul(le,Ce)|0,A=A+Math.imul(re,Ie)|0,E=E+Math.imul(re,Ae)|0,E=E+Math.imul(te,Ie)|0,N=N+Math.imul(te,Ae)|0,A=A+Math.imul(ie,Te)|0,E=E+Math.imul(ie,Ne)|0,E=E+Math.imul(se,Te)|0,N=N+Math.imul(se,Ne)|0,A=A+Math.imul(ee,Le)|0,E=E+Math.imul(ee,Pe)|0,E=E+Math.imul(Z,Le)|0,N=N+Math.imul(Z,Pe)|0;
vendor: 23,930 bytes, line 1
1var ht=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(ht>>>26)|0,ht&=67108863,A=Math.imul(de,Ee),E=Math.imul(de,Se),E=E+Math.imul(fe,Ee)|0,N=Math.imul(fe,Se),A=A+Math.imul(ue,Re)|0,E=E+Math.imul(ue,Me)|0,E=E+Math.imul(he,Re)|0,N=N+Math.imul(he,Me)|0,A=A+Math.imul(ce,ke)|0,E=E+Math.imul(ce,Ce)|0,E=E+Math.imul(Be,ke)|0,N=N+Math.imul(Be,Ce)|0,A=A+Math.imul(ae,Ie)|0,E=E+Math.imul(ae,Ae)|0,E=E+Math.imul(le,Ie)|0,N=N+Math.imul(le,Ae)|0,A=A+Math.imul(re,Te)|0,E=E+Math.imul(re,Ne)|0,E=E+Math.imul(te,Te)|0,N=N+Math.imul(te,Ne)|0,A=A+Math.imul(ie,Le)|0,E=E+Math.imul(ie,Pe)|0,E=E+Math.imul(se,Le)|0,N=N+Math.imul(se,Pe)|0;var dt=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(dt>>>26)|0,dt&=67108863,A=Math.imul(de,Re),E=Math.imul(de,Me),E=E+Math.imul(fe,Re)|0,N=Math.imul(fe,Me),A=A+Math.imul(ue,ke)|0,E=E+Math.imul(ue,Ce)|0,E=E+Math.imul(he,ke)|0,N=N+Math.imul(he,Ce)|0,A=A+Math.imul(ce,Ie)|0,E=E+Math.imul(ce,Ae)|0,E=E+Math.imul(Be,Ie)|0,N=N+Math.imul(Be,Ae)|0,A=A+Math.imul(ae,Te)|0,E=E+Math.imul(ae,Ne)|0,E=E+Math.imul(le,Te)|0,N=N+Math.imul(le,Ne)|0,A=A+Math.imul(re,Le)|0,E=E+Math.imul(re,Pe)|0,E=E+Math.imul(te,Le)|0,N=N+Math.imul(te,Pe)|0;var or=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(or>>>26)|0,or&=67108863,A=Math.imul(de,ke),E=Math.imul(de,Ce),E=E+Math.imul(fe,ke)|0,N=Math.imul(fe,Ce),A=A+Math.imul(ue,Ie)|0,E=E+Math.imul(ue,Ae)|0,E=E+Math.imul(he,Ie)|0,N=N+Math.imul(he,Ae)|0,A=A+Math.imul(ce,Te)|0,E=E+Math.imul(ce,Ne)|0,E=E+Math.imul(Be,Te)|0,N=N+Math.imul(Be,Ne)|0,A=A+Math.imul(ae,Le)|0,E=E+Math.imul(ae,Pe)|0,E=E+Math.imul(le,Le)|0,N=N+Math.imul(le,Pe)|0;var lr=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(lr>>>26)|0,lr&=67108863,A=Math.imul(de,Ie),E=Math.imul(de,Ae),E=E+Math.imul(fe,Ie)|0,N=Math.imul(fe,Ae),A=A+Math.imul(ue,Te)|0,E=E+Math.imul(ue,Ne)|0,E=E+Math.imul(he,Te)|0,N=N+Math.imul(he,Ne)|0,A=A+Math.imul(ce,Le)|0,E=E+Math.imul(ce,Pe)|0,E=E+Math.imul(Be,Le)|0,N=N+Math.imul(Be,Pe)|0;var cr=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(cr>>>26)|0,cr&=67108863,A=Math.imul(de,Te),E=Math.imul(de,Ne),E=E+Math.imul(fe,Te)|0,N=Math.imul(fe,Ne),A=A+Math.imul(ue,Le)|0,E=E+Math.imul(ue,Pe)|0,E=E+Math.imul(he,Le)|0,N=N+Math.imul(he,Pe)|0;var ur=(D+A|0)+((E&8191)<<13)|0;D=(N+(E>>>13)|0)+(ur>>>26)|0,ur&=67108863,A=Math.imul(de,Le),E=Math.imul(de,Pe),E=E+Math.imul(fe,Le)|0,N=Math.imul(fe,Pe);var hr=(D+A|0)+((E&8191)<<13)|0;return D=(N+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,O[0]=Xe,O[1]=et,O[2]=tt,O[3]=rt,O[4]=nt,O[5]=it,O[6]=st,O[7]=at,O[8]=ot,O[9]=lt,O[10]=ct,O[11]=ut,O[12]=ht,O[13]=dt,O[14]=or,O[15]=lr,O[16]=cr,O[17]=ur,O[18]=hr,D!==0&&(O[19]=D,S.length++),S};Math.imul||(b=l);function M(I,c,_){_.negative=c.negative^I.negative,_.length=I.length+c.length;for(var S=0,R=0,C=0;C<_.length-1;C++){var O=R;R=0;for(var D=S&67108863,A=Math.min(C,c.length-1),E=Math.max(0,C-I.length+1);E<=A;E++){var N=C-E,z=(I.words[N]|0)*(c.words[E]|0),x=z&67108863;O=O+(z/67108864|0)|0,x=x+D|0,D=x&67108863,O=O+(x>>>26)|0,R+=O>>>26,O&=67108863}_.words[C]=D,S=O,O=R}return S!==0?_.words[C]=S:_.length--,_._strip()}function k(I,c,_){return M(I,c,_)}o.prototype.mulTo=function(c,_){var S,R=this.length+c.length;return this.length===10&&c.length===10?S=b(this,c,_):R<63?S=l(this,c,_):R<1024?S=M(this,c,_):S=k(this,c,_),S};function P(I,c){this.x=I,this.y=c}P.prototype.makeRBT=function(c){for(var _=new Array(c),S=o.prototype._countBits(c)-1,R=0;R<c;R++)_[R]=this.revBin(R,S,c);return _},P.prototype.revBin=function(c,_,S){if(c===0||c===S-1)return c;for(var R=0,C=0;C<_;C++)R|=(c&1)<<_-C-1,c>>=1;return R},P.prototype.permute=function(c,_,S,R,C,O){for(var D=0;D<O;D++)R[D]=_[c[D]],C[D]=S[c[D]]},P.prototype.transform=function(c,_,S,R,C,O){this.permute(O,c,_,S,R,C);for(var D=1;D<C;D<<=1)for(var A=D<<1,E=Math.cos(2*Math.PI/A),N=Math.sin(2*Math.PI/A),z=0;z<C;z+=A)for(var x=E,q=N,W=0;W<D;W++){var V=S[z+W],G=R[z+W],L=S[z+W+D],T=R[z+W+D],H=x*L-q*T;T=x*T+q*L,L=H,S[z+W]=V+L,R[z+W]=G+T,S[z+W+D]=V-L,R[z+W+D]=G-T,W!==A&&(H=E*x-N*q,q=E*q+N*x,x=H)}},P.prototype.guessLen13b=function(c,_){var S=Math.max(_,c)|1,R=S&1,C=0;for(S=S/2|0;S;S=S>>>1)C++;return 1<<C+1+R},P.prototype.conjugate=function(c,_,S){if(!(S<=1))for(var R=0;R<S/2;R++){var C=c[R];c[R]=c[S-R-1],c[S-R-1]=C,C=_[R],_[R]=-_[S-R-1],_[S-R-1]=-C}},P.prototype.normalize13b=function(c,_){for(var S=0,R=0;R<_/2;R++){var C=Math.round(c[2*R+1]/_)*8192+Math.round(c[2*R]/_)+S;c[R]=C&67108863,C<67108864?S=0:S=C/67108864|0}return c},P.prototype.convert13b=function(c,_,S,R){for(var C=0,O=0;O<_;O++)C=C+(c[O]|0),S[2*O]=C&8191,C=C>>>13,S[2*O+1]=C&8191,C=C>>>13;for(O=2*_;O<R;++O)S[O]=0;n(C===0),n((C&-8192)===0)},P.prototype.stub=function(c){for(var _=new Array(c),S=0;S<c;S++)_[S]=0;return _},P.prototype.mulp=function(c,_,S){var R=2*this.guessLen13b(c.length,_.length),C=this.makeRBT(R),O=this.stub(R),D=new Array(R),A=new Array(R),E=new Array(R),N=new Array(R),z=new Array(R),x=new Array(R),q=S.words;q.length=R,this.convert13b(c.words,c.length,D,R),this.convert13b(_.words,_.length,N,R),this.transform(D,O,A,E,R,C),this.transform(N,O,z,x,R,C);for(var W=0;W<R;W++){var V=A[W]*z[W]-E[W]*x[W];E[W]=A[W]*x[W]+E[W]*z[W],A[W]=V}return this.conjugate(A,E,R),this.transform(A,E,q,O,R,C),this.conjugate(q,O,R),this.normalize13b(q,R),S.negative=c.negative^_.negative,S.length=c.length+_.length,S._strip()},o.prototype.mul=function(c){var _=new o(null);return _.words=new Array(this.length+c.length),this.mulTo(c,_)},o.prototype.mulf=function(c){var _=new o(null);return _.words=new Array(this.length+c.length),k(this,c,_)},o.prototype.imul=function(c){return this.clone().mulTo(c,this)},o.prototype.imuln=function(c){var _=c<0;_&&(c=-c),n(typeof c=="number"),n(c<67108864);for(var S=0,R=0;R<this.length;R++){var C=(this.words[R]|0)*c,O=(C&67108863)+(S&67108863);S>>=26,S+=C/67108864|0,S+=O>>>26,this.words[R]=O&67108863}return S!==0&&(this.words[R]=S,this.length++),this.length=c===0?1:this.length,_?this.ineg():this},o.prototype.muln=function(c){return this.clone().imuln(c)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(c){var _=u(c);if(_.length===0)return new o(1);for(var S=this,R=0;R<_.length&&_[R]===0;R++,S=S.sqr());if(++R<_.length)for(var C=S.sqr();R<_.length;R++,C=C.sqr())_[R]!==0&&(S=S.mul(C));return S},o.prototype.iushln=function(c){n(typeof c=="number"&&c>=0);var _=c%26,S=(c-_)/26,R=67108863>>>26-_<<26-_,C;if(_!==0){var O=0;for(C=0;C<this.length;C++){var D=this.words[C]&R,A=(this.words[C]|0)-D<<_;this.words[C]=A|O,O=D>>>26-_}O&&(this.words[C]=O,this.length++)}if(S!==0){for(C=this.length-1;C>=0;C--)this.words[C+S]=this.words[C];for(C=0;C<S;C++)this.words[C]=0;this.length+=S}return this._strip()},o.prototype.ishln=function(c){return n(this.negative===0),this.iushln(c)},o.prototype.iushrn=function(c,_,S){n(typeof c=="number"&&c>=0);var R;_?R=(_-_%26)/26:R=0;var C=c%26,O=Math.min((c-C)/26,this.length),D=67108863^67108863>>>C<<C,A=S;if(R-=O,R=Math.max(0,R),A){for(var E=0;E<O;E++)A.words[E]=this.words[E];A.length=O}if(O!==0)if(this.length>O)for(this.length-=O,E=0;E<this.length;E++)this.words[E]=this.words[E+O];else this.words[0]=0,this.length=1;var N=0;for(E=this.length-1;E>=0&&(N!==0||E>=R);E--){var z=this.words[E]|0;this.words[E]=N<<26-C|z>>>C,N=z&D}return A&&N!==0&&(A.words[A.length++]=N),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(c,_,S){return n(this.negative===0),this.iushrn(c,_,S)},o.prototype.shln=function(c){return this.clone().ishln(c)},o.prototype.ushln=function(c){return this.clone().iushln(c)},o.prototype.shrn=function(c){return this.clone().ishrn(c)},o.prototype.ushrn=function(c){return this.clone().iushrn(c)},o.prototype.testn=function(c){n(typeof c=="number"&&c>=0);var _=c%26,S=(c-_)/26,R=1<<_;return this.length<=S?!1:!!(this.words[S]&R)},o.prototype.imaskn=function(c){n(typeof c=="number"&&c>=0);var _=c%26,S=(c-_)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(_!==0&&S++,this.length=Math.min(S,this.length),_!==0){var R=67108863^67108863>>>_<<_;this.words[this.length-1]&=R}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.maskn=function(c){return this.clone().imaskn(c)},o.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)},o.prototype._iaddn=function(c){this.words[0]+=c;for(var _=0;_<this.length&&this.words[_]>=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},o.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 _=0;_<this.length&&this.words[_]<0;_++)this.words[_]+=67108864,this.words[_+1]-=1;return this._strip()},o.prototype.addn=function(c){return this.clone().iaddn(c)},o.prototype.subn=function(c){return this.clone().isubn(c)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(c,_,S){var R=c.length+S,C;this._expand(R);var O,D=0;for(C=0;C<c.length;C++){O=(this.words[C+S]|0)+D;var A=(c.words[C]|0)*_;O-=A&67108863,D=(O>>26)-(A/67108864|0),this.words[C+S]=O&67108863}for(;C<this.length-S;C++)O=(this.words[C+S]|0)+D,D=O>>26,this.words[C+S]=O&67108863;if(D===0)return this._strip();for(n(D===-1),D=0,C=0;C<this.length;C++)O=-(this.words[C]|0)+D,D=O>>26,this.words[C]=O&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(c,_){var S=this.length-c.length,R=this.clone(),C=c,O=C.words[C.length-1]|0;S=26-this._countBits(O),S!==0&&(C=C.ushln(S),R.iushln(S),O=C.words[C.length-1]|0);var D=R.length-C.length,A;if(_!=="mod"){A=new o(null),A.length=D+1,A.words=new Array(A.length);for(var E=0;E<A.length;E++)A.words[E]=0}var N=R.clone()._ishlnsubmul(C,1,D);N.negative===0&&(R=N,A&&(A.words[D]=1));for(var z=D-1;z>=0;z--){var x=(R.words[C.length+z]|0)*67108864+(R.words[C.length+z-1]|0);for(x=Math.min(x/O|0,67108863),R._ishlnsubmul(C,x,z);R.negative!==0;)x--,R.negative=0,R._ishlnsubmul(C,1,z),R.isZero()||(R.negative^=1);A&&(A.words[z]=x)}return A&&A._strip(),R._strip(),_!=="div"&&S!==0&&R.iushrn(S),{div:A||null,mod:R}},o.prototype.divmod=function(c,_,S){if(n(!c.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var R,C,O;return this.negative!==0&&c.negative===0?(O=this.neg().divmod(c,_),_!=="mod"&&(R=O.div.neg()),_!=="div"&&(C=O.mod.neg(),S&&C.negative!==0&&C.iadd(c)),{div:R,mod:C}):this.negative===0&&c.negative!==0?(O=this.divmod(c.neg(),_),_!=="mod"&&(R=O.div.neg()),{div:R,mod:O.mod}):(this.negative&c.negative)!==0?(O=this.neg().divmod(c.neg(),_),_!=="div"&&(C=O.mod.neg(),S&&C.negative!==0&&C.isub(c)),{div:O.div,mod:C}):c.length>this.length||this.cmp(c)<0?{div:new o(0),mod:this}:c.length===1?_==="div"?{div:this.divn(c.words[0]),mod:null}:_==="mod"?{div:null,mod:new o(this.modrn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new o(this.modrn(c.words[0]))}:this._wordDiv(c,_)},o.prototype.div=function(c){return this.divmod(c,"div",!1).div},o.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},o.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},o.prototype.divRound=function(c){var _=this.divmod(c);if(_.mod.isZero())return _.div;var S=_.div.negative!==0?_.mod.isub(c):_.mod,R=c.ushrn(1),C=c.andln(1),O=S.cmp(R);return O<0||C===1&&O===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},o.prototype.modrn=function(c){var _=c<0;_&&(c=-c),n(c<=67108863);for(var S=(1<<26)%c,R=0,C=this.length-1;C>=0;C--)R=(S*R+(this.words[C]|0))%c;return _?-R:R},o.prototype.modn=function(c){return this.modrn(c)},o.prototype.idivn=function(c){var _=c<0;_&&(c=-c),n(c<=67108863);for(var S=0,R=this.length-1;R>=0;R--){var C=(this.words[R]|0)+S*67108864;this.words[R]=C/c|0,S=C%c}return this._strip(),_?this.ineg():this},o.prototype.divn=function(c){return this.clone().idivn(c)},o.prototype.egcd=function(c){n(c.negative===0),n(!c.isZero());var _=this,S=c.clone();_.negative!==0?_=_.umod(c):_=_.clone();for(var R=new o(1),C=new o(0),O=new o(0),D=new o(1),A=0;_.isEven()&&S.isEven();)_.iushrn(1),S.iushrn(1),++A;for(var E=S.clone(),N=_.clone();!_.isZero();){for(var z=0,x=1;(_.words[0]&x)===0&&z<26;++z,x<<=1);if(z>0)for(_.iushrn(z);z-- >0;)(R.isOdd()||C.isOdd())&&(R.iadd(E),C.isub(N)),R.iushrn(1),C.iushrn(1);for(var q=0,W=1;(S.words[0]&W)===0&&q<26;++q,W<<=1);if(q>0)for(S.iushrn(q);q-- >0;)(O.isOdd()||D.isOdd())&&(O.iadd(E),D.isub(N)),O.iushrn(1),D.iushrn(1);_.cmp(S)>=0?(_.isub(S),R.isub(O),C.isub(D)):(S.isub(_),O.isub(R),D.isub(C))}return{a:O,b:D,gcd:S.iushln(A)}},o.prototype._invmp=function(c){n(c.negative===0),n(!c.isZero());var _=this,S=c.clone();_.negative!==0?_=_.umod(c):_=_.clone();for(var R=new o(1),C=new o(0),O=S.clone();_.cmpn(1)>0&&S.cmpn(1)>0;){for(var D=0,A=1;(_.words[0]&A)===0&&D<26;++D,A<<=1);if(D>0)for(_.iushrn(D);D-- >0;)R.isOdd()&&R.iadd(O),R.iushrn(1);for(var E=0,N=1;(S.words[0]&N)===0&&E<26;++E,N<<=1);if(E>0)for(S.iushrn(E);E-- >0;)C.isOdd()&&C.iadd(O),C.iushrn(1);_.cmp(S)>=0?(_.isub(S),R.isub(C)):(S.isub(_),C.isub(R))}var z;return _.cmpn(1)===0?z=R:z=C,z.cmpn(0)<0&&z.iadd(c),z},o.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var _=this.clone(),S=c.clone();_.negative=0,S.negative=0;for(var R=0;_.isEven()&&S.isEven();R++)_.iushrn(1),S.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;S.isEven();)S.iushrn(1);var C=_.cmp(S);if(C<0){var O=_;_=S,S=O}else if(C===0||S.cmpn(1)===0)break;_.isub(S)}while(!0);return S.iushln(R)},o.prototype.invm=function(c){return this.egcd(c).a.umod(c)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(c){return this.words[0]&c},o.prototype.bincn=function(c){n(typeof c=="number");var _=c%26,S=(c-_)/26,R=1<<_;if(this.length<=S)return this._expand(S+1),this.words[S]|=R,this;for(var C=R,O=S;C!==0&&O<this.length;O++){var D=this.words[O]|0;D+=C,C=D>>>26,D&=67108863,this.words[O]=D}return C!==0&&(this.words[O]=C,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(c){var _=c<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;this._strip();var S;if(this.length>1)S=1;else{_&&(c=-c),n(c<=67108863,"Number is too big");var R=this.words[0]|0;S=R===c?0:R<c?-1:1}return this.negative!==0?-S|0:S},o.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var _=this.ucmp(c);return this.negative!==0?-_|0:_},o.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var _=0,S=this.length-1;S>=0;S--){var R=this.words[S]|0,C=c.words[S]|0;if(R!==C){R<C?_=-1:R>C&&(_=1);break}}return _},o.prototype.gtn=function(c){return this.cmpn(c)===1},o.prototype.gt=function(c){return this.cmp(c)===1},o.prototype.gten=function(c){return this.cmpn(c)>=0},o.prototype.gte=function(c){return this.cmp(c)>=0},o.prototype.ltn=function(c){return this.cmpn(c)===-1},o.prototype.lt=function(c){return this.cmp(c)===-1},o.prototype.lten=function(c){return this.cmpn(c)<=0},o.prototype.lte=function(c){return this.cmp(c)<=0},o.prototype.eqn=function(c){return this.cmpn(c)===0},o.prototype.eq=function(c){return this.cmp(c)===0},o.red=function(c){return new K(c)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(c){return this.red=c,this},o.prototype.forceRed=function(c){return n(!this.red,"Already a number in reduction context"),this._forceRed(c)},o.prototype.redAdd=function(c){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},o.prototype.redIAdd=function(c){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},o.prototype.redSub=function(c){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},o.prototype.redISub=function(c){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},o.prototype.redShl=function(c){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},o.prototype.redMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},o.prototype.redIMul=function(c){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(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 B(I,c){this.name=I,this.p=new o(c,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var c=new o(null);return c.words=new Array(Math.ceil(this.n/13)),c},B.prototype.ireduce=function(c){var _=c,S;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),S=_.bitLength();while(S>this.n);var R=S<this.n?-1:_.ucmp(this.p);return R===0?(_.words[0]=0,_.length=1):R>0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},B.prototype.split=function(c,_){c.iushrn(this.n,0,_)},B.prototype.imulK=function(c){return c.imul(this.k)};function j(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(j,B),j.prototype.split=function(c,_){for(var S=4194303,R=Math.min(c.length,9),C=0;C<R;C++)_.words[C]=c.words[C];if(_.length=R,c.length<=9){c.words[0]=0,c.length=1;return}var O=c.words[9];for(_.words[_.length++]=O&S,C=10;C<c.length;C++){var D=c.words[C]|0;c.words[C-10]=(D&S)<<4|O>>>22,O=D}O>>>=22,c.words[C-10]=O,O===0&&c.length>10?c.length-=10:c.length-=9},j.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var _=0,S=0;S<c.length;S++){var R=c.words[S]|0;_+=R*977,c.words[S]=_&67108863,_=R*64+(_/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function U(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(U,B);function Q(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Q,B);function Y(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Y,B),Y.prototype.imulK=function(c){for(var _=0,S=0;S<c.length;S++){var R=(c.words[S]|0)*19+_,C=R&67108863;R>>>=26,c.words[S]=C,_=R}return _!==0&&(c.words[c.length++]=_),c},o._prime=function(c){if($[c])return $[c];var _;if(c==="k256")_=new j;else if(c==="p224")_=new U;else if(c==="p192")_=new Q;else if(c==="p25519")_=new Y;else throw new Error("Unknown prime "+c);return $[c]=_,_};function K(I){if(typeof I=="string"){var c=o._prime(I);this.m=c.p,this.prime=c}else n(I.gtn(1),"modulus must be greater than 1"),this.m=I,this.prime=null}K.prototype._verify1=function(c){n(c.negative===0,"red works only with positives"),n(c.red,"red works only with red numbers")},K.prototype._verify2=function(c,_){n((c.negative|_.negative)===0,"red works only with positives"),n(c.red&&c.red===_.red,"red works only with red numbers")},K.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):(v(c,c.umod(this.m)._forceRed(this)),c)},K.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},K.prototype.add=function(c,_){this._verify2(c,_);var S=c.add(_);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},K.prototype.iadd=function(c,_){this._verify2(c,_);var S=c.iadd(_);return S.cmp(this.m)>=0&&S.isub(this.m),S},K.prototype.sub=function(c,_){this._verify2(c,_);var S=c.sub(_);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},K.prototype.isub=function(c,_){this._verify2(c,_);var S=c.isub(_);return S.cmpn(0)<0&&S.iadd(this.m),S},K.prototype.shl=function(c,_){return this._verify1(c),this.imod(c.ushln(_))},K.prototype.imul=function(c,_){return this._verify2(c,_),this.imod(c.imul(_))},K.prototype.mul=function(c,_){return this._verify2(c,_),this.imod(c.mul(_))},K.prototype.isqr=function(c){return this.imul(c,c.clone())},K.prototype.sqr=function(c){return this.mul(c,c)},K.prototype.sqrt=function(c){if(c.isZero())return c.clone();var _=this.m.andln(3);if(n(_%2===1),_===3){var S=this.m.add(new o(1)).iushrn(2);return this.pow(c,S)}for(var R=this.m.subn(1),C=0;!R.isZero()&&R.andln(1)===0;)C++,R.iushrn(1);n(!R.isZero());var O=new o(1).toRed(this),D=O.redNeg(),A=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new o(2*E*E).toRed(this);this.pow(E,A).cmp(D)!==0;)E.redIAdd(D);for(var N=this.pow(E,R),z=this.pow(c,R.addn(1).iushrn(1)),x=this.pow(c,R),q=C;x.cmp(O)!==0;){for(var W=x,V=0;W.cmp(O)!==0;V++)W=W.redSqr();n(V<q);var G=this.pow(N,new o(1).iushln(q-V-1));z=z.redMul(G),N=G.redSqr(),x=x.redMul(N),q=V}return z},K.prototype.invm=function(c){var _=c._invmp(this.m);return _.negative!==0?(_.negative=0,this.imod(_).redNeg()):this.imod(_)},K.prototype.pow=function(c,_){if(_.isZero())return new o(1).toRed(this);if(_.cmpn(1)===0)return c.clone();var S=4,R=new Array(1<<S);R[0]=new o(1).toRed(this),R[1]=c;for(var C=2;C<R.length;C++)R[C]=this.mul(R[C-1],c);var O=R[0],D=0,A=0,E=_.bitLength()%26;for(E===0&&(E=26),C=_.length-1;C>=0;C--){for(var N=_.words[C],z=E-1;z>=0;z--){var x=N>>z&1;if(O!==R[0]&&(O=this.sqr(O)),x===0&&D===0){A=0;continue}D<<=1,D|=x,A++,!(A!==S&&(C!==0||z!==0))&&(O=this.mul(O,R[D]),A=0,D=0)}E=26}return O},K.prototype.convertTo=function(c){var _=c.umod(this.m);return _===c?_.clone():_},K.prototype.convertFrom=function(c){var _=c.clone();return _.red=null,_},o.mont=function(c){return new X(c)};function X(I){K.call(this,I),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(X,K),X.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},X.prototype.convertFrom=function(c){var _=this.imod(c.mul(this.rinv));return _.red=null,_},X.prototype.imul=function(c,_){if(c.isZero()||_.isZero())return c.words[0]=0,c.length=1,c;var S=c.imul(_),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(R).iushrn(this.shift),O=C;return C.cmp(this.m)>=0?O=C.isub(this.m):C.cmpn(0)<0&&(O=C.iadd(this.m)),O._forceRed(this)},X.prototype.mul=function(c,_){if(c.isZero()||_.isZero())return new o(0)._forceRed(this);var S=c.mul(_),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(R).iushrn(this.shift),O=C;return C.cmp(this.m)>=0?O=C.isub(this.m):C.cmpn(0)<0&&(O=C.iadd(this.m)),O._forceRed(this)},X.prototype.invm=function(c){return this.imod(c._invmp(this.m).mul(this.r2))._forceRed(this)}})(typeof a>"u"||a,e)})),Qt=F((e=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.standardErrorCodes=void 0,e.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}},e.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."}}})),mr=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var a=Qt(),t="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(s,y=t){if(s&&Number.isInteger(s)){const f=s.toString();if(m(a.errorValues,f))return a.errorValues[f].message;if(p(s))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return y}e.getMessageFromCode=r;function n(s){if(!Number.isInteger(s))return!1;const y=s.toString();return!!(a.errorValues[y]||p(s))}e.isValidCode=n;function i(s){var y;if(typeof s=="number")return s;if(o(s))return(y=s.code)!==null&&y!==void 0?y:s.errorCode}e.getErrorCode=i;function o(s){return typeof s=="object"&&s!==null&&(typeof s.code=="number"||typeof s.errorCode=="number")}function h(s,{shouldIncludeStack:y=!1}={}){const f={};if(s&&typeof s=="object"&&!Array.isArray(s)&&m(s,"code")&&n(s.code)){const g=s;f.code=g.code,g.message&&typeof g.message=="string"?(f.message=g.message,m(g,"data")&&(f.data=g.data)):(f.message=r(f.code),f.data={originalError:d(s)})}else f.code=a.standardErrorCodes.rpc.internal,f.message=v(s,"message")?s.message:t,f.data={originalError:d(s)};return y&&(f.stack=v(s,"stack")?s.stack:void 0),f}e.serialize=h;function p(s){return s>=-32099&&s<=-32e3}function d(s){return s&&typeof s=="object"&&!Array.isArray(s)?Object.assign({},s):s}function m(s,y){return Object.prototype.hasOwnProperty.call(s,y)}function v(s,y){return typeof s=="object"&&s!==null&&y in s&&typeof s[y]=="string"}})),ai=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=void 0;var a=Qt(),t=mr();e.standardErrors={rpc:{parse:d=>r(a.standardErrorCodes.rpc.parse,d),invalidRequest:d=>r(a.standardErrorCodes.rpc.invalidRequest,d),invalidParams:d=>r(a.standardErrorCodes.rpc.invalidParams,d),methodNotFound:d=>r(a.standardErrorCodes.rpc.methodNotFound,d),internal:d=>r(a.standardErrorCodes.rpc.internal,d),server:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:m}=d;if(!Number.isInteger(m)||m>-32005||m<-32099)throw new Error('"code" must be an integer such that: -32099 <= code 
1<= -32005');return r(m,d)},invalidInput:d=>r(a.standardErrorCodes.rpc.invalidInput,d),resourceNotFound:d=>r(a.standardErrorCodes.rpc.resourceNotFound,d),resourceUnavailable:d=>r(a.standardErrorCodes.rpc.resourceUnavailable,d),transactionRejected:d=>r(a.standardErrorCodes.rpc.transactionRejected,d),methodNotSupported:d=>r(a.standardErrorCodes.rpc.methodNotSupported,d),limitExceeded:d=>r(a.standardErrorCodes.rpc.limitExceeded,d)},provider:{userRejectedRequest:d=>n(a.standardErrorCodes.provider.userRejectedRequest,d),unauthorized:d=>n(a.standardErrorCodes.provider.unauthorized,d),unsupportedMethod:d=>n(a.standardErrorCodes.provider.unsupportedMethod,d),disconnected:d=>n(a.standardErrorCodes.provider.disconnected,d),chainDisconnected:d=>n(a.standardErrorCodes.provider.chainDisconnected,d),unsupportedChain:d=>n(a.standardErrorCodes.provider.unsupportedChain,d),custom:d=>{if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:m,message:v,data:s}=d;if(!v||typeof v!="string")throw new Error('"message" must be a nonempty string');return new h(m,v,s)}}};function r(d,m){const[v,s]=i(m);return new o(d,v||(0,t.getMessageFromCode)(d),s)}function n(d,m){const[v,s]=i(m);return new h(d,v||(0,t.getMessageFromCode)(d),s)}function i(d){if(d){if(typeof d=="string")return[d];if(typeof d=="object"&&!Array.isArray(d)){const{message:m,data:v}=d;
1if(m&&typeof m!="string")throw new Error("Must specify string message.");return[m||void 0,v]}}return[]}var o=class extends Error{constructor(d,m,v){if(!Number.isInteger(d))throw new Error('"code" must be an integer.');if(!m||typeof m!="string")throw new Error('"message" must be a nonempty string.');super(m),this.code=d,v!==void 0&&(this.data=v)}},h=class extends o{constructor(d,m,v){if(!p(d))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(d,m,v)}};function p(d){return Number.isInteger(d)&&d>=1e3&&d<=4999}})),yr=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isErrorResponse=void 0;function a(t){return t.errorMessage!==void 0}e.isErrorResponse=a})),_r=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.9.3"})),oi=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=void 0;var a=yr(),t=_r(),r=Qt(),n=mr();function i(p,d){const m=(0,n.serialize)(o(p),{shouldIncludeStack:!0}),v=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");v.searchParams.set("version",t.LIB_VERSION),v.searchParams.set("code",m.code.toString());const s=h(m.data,d);return s&&v.searchParams.set("method",s),v.searchParams.set("message",m.message),Object.assign(Object.assign({},m),{docUrl:v.href})}e.serializeError=i;function o(p){return typeof p=="string"?{message:p,code:r.standardErrorCodes.rpc.internal}:(0,a.isErrorResponse)(p)?Object.assign(Object.assign({},p),{message:p.errorMessage,code:p.errorCode,data:{method:p.method}}):p}function h(p,d){const m=p?.method;if(m)return m;if(d!==void 0){if(typeof d=="string")return d;if(Array.isArray(d)){if(d.length>0)return d[0].method}else return d.method}}})),Yt=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;var a=Qt();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return a.standardErrorCodes}});var t=ai();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}});var r=oi();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}});var n=mr();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return n.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}})})),Xt=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0;function a(){return n=>n}e.OpaqueType=a,e.HexString=a(),e.AddressString=a(),e.BigIntString=a();function t(n){return Math.floor(n)}e.IntNumber=t,e.RegExpString=a();var r;(function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""})(r||(e.ProviderType=r={}))})),Ze=F((e=>{var a=e&&e.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.isMobileWeb=e.getLocation=e.isInIFrame=e.createQrUrl=e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;var t=a(Kt()),r=Yt(),n=Xt(),i=/^[0-9]*$/,o=/^[a-f0-9]*$/;function h(_){return p(crypto.getRandomValues(new Uint8Array(_)))}e.randomBytesHex=h;function p(_){return[..._].map(S=>S.toString(16).padStart(2,"0")).join("")}e.uint8ArrayToHex=p;function d(_){return new Uint8Array(_.match(/.{1,2}/g).map(S=>parseInt(S,16)))}e.hexStringToUint8Array=d;function m(_,S=!1){const R=_.toString("hex");return(0,n.HexString)(S?`0x${R}`:R)}e.hexStringFromBuffer=m;function v(_){return(0,n.BigIntString)(_.toString(10))}e.bigIntStringFromBN=v;function s(_){return(0,n.IntNumber)(new t.default(b(_,!1),16).toNumber())}e.intNumberFromHexString=s;function y(_){return(0,n.HexString)(`0x${new t.default(_).toString(16)}`)}e.hexStringFromIntNumber=y;function f(_){return _.startsWith("0x")||_.startsWith("0X")}e.has0xPrefix=f;function g(_){return f(_)?_.slice(2):_}e.strip0x=g;function w(_){return f(_)?`0x${_.slice(2)}`:`0x${_}`}e.prepend0x=w;function u(_){if(typeof _!="string")return!1;const S=g(_).toLowerCase();return o.test(S)}e.isHexString=u;function l(_,S=!1){if(typeof _=="string"){const R=g(_).toLowerCase();if(o.test(R))return(0,n.HexString)(S?`0x${R}`:R)}throw r.standardErrors.rpc.invalidParams(`"${String(_)}" is not a hexadecimal string`)}e.ensureHexString=l;function b(_,S=!1){let R=l(_,!1);return R.length%2===1&&(R=(0,n.HexString)(`0${R}
1`)),S?(0,n.HexString)(`0x${R}`):R}e.ensureEvenLengthHexString=b;function M(_){if(typeof _=="string"){const S=g(_).toLowerCase();if(u(S)&&S.length===40)return(0,n.AddressString)(w(S))}throw r.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(_)}`)}e.ensureAddressString=M;function k(_){if(Buffer.isBuffer(_))return _;if(typeof _=="string"){if(u(_)){const S=b(_,!1);return Buffer.from(S,"hex")}return Buffer.from(_,"utf8")}throw r.standardErrors.rpc.invalidParams(`Not binary data: ${String(_)}`)}e.ensureBuffer=k;function P(_){if(typeof _=="number"&&Number.isInteger(_))return(0,n.IntNumber)(_);if(typeof _=="string"){if(i.test(_))return(0,n.IntNumber)(Number(_));if(u(_))return(0,n.IntNumber)(new t.default(b(_,!1),16).toNumber())}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(_)}`)}e.ensureIntNumber=P;function $(_){if(_ instanceof RegExp)return(0,n.RegExpString)(_.toString());throw r.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(_)}`)}e.ensureRegExpString=$;function B(_){if(_!==null&&(t.default.isBN(_)||U(_)))return new t.default(_.toString(10),10);if(typeof _=="number")return new t.default(P(_));if(typeof _=="string"){if(i.test(_))return new t.default(_,10);if(u(_))return new t.default(b(_,!1),16)}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(_)}`)}e.ensureBN=B;function j(_){if(typeof _=="string")return JSON.parse(_);if(typeof _=="object")return _;throw r.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(_)}`)}e.ensureParsedJSONObject=j;function U(_){if(_==null||typeof _.constructor!="function")return!1;const{constructor:S}=_;return typeof S.config=="function"&&typeof S.EUCLID=="number"}e.isBigNumber=U;function Q(_,S){return Array.from({length:S-_},(R,C)=>_+C)}e.range=Q;function Y(){const _=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:S,host:R}=document.location,C=_?_.getAttribute("href"):null;return!C||C.startsWith("javascript:")||C.startsWith("vbscript:")?null:C.startsWith("http://")||C.startsWith("https://")||C.startsWith("data:")?C:C.startsWith("//")?S+C:`${S}//${R}${C}`}e.getFavicon=Y;function K(_,S,R,C,O,D){return`${R}/#/link?${new URLSearchParams({[C?"parent-id":"id"]:_,secret:S,server:R,v:O,chainId:D.toString()}).toString()}`}e.createQrUrl=K;function X(){try{return window.frameElement!==null}catch{return!1}}e.isInIFrame=X;function I(){try{return X()&&window.top?window.top.location:window.location}catch{return window.location}}e.getLocation=I;function c(){var _;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((_=window?.navigator)===null||_===void 0?void 0:_.userAgent)}e.isMobileWeb=c})),li=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0;var a=class{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}`}};e.ScopedLocalStorage=a})),br=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.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_IMPLEMENT
1ED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}})),wr=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;var a=Yt();e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";var t=class{async makeEthereumJSONRPCRequest(r,n){if(!n)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(n,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json"}}).then(i=>i.json()).then(i=>{if(!i)throw a.standardErrors.rpc.parse({});const o=i,{error:h}=o;if(h)throw(0,a.serializeError)(h,r.method);return o})}};e.RelayAbstract=t})),Ve=F(((e,a)=>{typeof Object.create=="function"?a.exports=function(r,n){n&&(r.super_=n,r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:a.exports=function(r,n){if(n){r.super_=n;var i=function(){};i.prototype=n.prototype,r.prototype=new i,r.prototype.constructor=r}}})),Ke=F(((e,a)=>{var t=Ot(),r=t.Buffer;function n(o,h){for(var p in o)h[p]=o[p]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?a.exports=t:(n(t,e),e.Buffer=i);function i(o,h,p){return r(o,h,p)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,h,p){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,h,p)},i.alloc=function(o,h,p){if(typeof o!="number")throw new TypeError("Argument must be a number");var d=r(o);return h!==void 0?typeof p=="string"?d.fill(h,p):d.fill(h):d.fill(0),d},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})),ci=F(((e,a)=>{var t={}.toString;a.exports=Array.isArray||function(r){return t.call(r)=="[object Array]"}})),Bt=F(((e,a)=>{a.exports=TypeError})),Xr=F(((e,a)=>{a.exports=Object})),ui=F(((e,a)=>{a.exports=Error})),hi=F(((e,a)=>{a.exports=EvalError})),di=F(((e,a)=>{a.exports=RangeError})),fi=F(((e,a)=>{a.exports=ReferenceError})),en=F(((e,a)=>{a.exports=SyntaxError})),pi=F(((e,a)=>{a.exports=URIError})),gi=F(((e,a)=>{a.exports=Math.abs})),vi=F(((e,a)=>{a.exports=Math.floor})),mi=F(((e,a)=>{a.exports=Math.max})),yi=F(((e,a)=>{a.exports=Math.min})),_i=F(((e,a)=>{a.exports=Math.pow})),bi=F(((e,a)=>{a.exports=Math.round})),wi=F(((e,a)=>{a.exports=Number.isNaN||function(r){return r!==r}})),Ei=F(((e,a)=>{var t=wi();a.exports=function(n){return t(n)||n===0?n:n<0?-1:1}})),Si=F(((e,a)=>{a.exports=Object.getOwnPropertyDescriptor})),Ft=F(((e,a)=>{var t=Si();if(t)try{t([],"length")}catch{t=null}a.exports=t})),er=F(((e,a)=>{var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}a.exports=t})),tn=F(((e,a)=>{a.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),i=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;r[n]=o;for(var h in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var p=Object.getOwnPropertySymbols(r);if(p.length!==1||p[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(r,n);if(d.value!==o||d.enumerable!==!0)return!1}return!0}})),Ri=F(((e,a)=>{var t=typeof Symbol<"u"&&Symbol,r=tn();a.exports=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()}})),rn=F(((e,a)=>{a.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null})),nn=F(((e,a)=>{var t=Xr();a.exports=t.getPrototypeOf||null})),Mi=F(((e,a)=>{var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(m,v){for(var s=[],y=0;y<m.length;y+=1)s[y]=m[y];for(var f=0;f<v.length;f+=1)s[f+m.length]=v[f];return s},h=function(m,v){for(var s=[],y=v||0,f=0;y<m.length;y+=1,f+=1)s[f]=m[y];return s},p=function(d,m){for(var v="",s=0;s<d.length;s+=1)v+=d[s],s+1<d.length&&(v+=m);return v};a.exports=function(m){var v=this;if(typeof v!="function"||r.apply(v)!==i)throw new TypeError(t+v);
1for(var s=h(arguments,1),y,f=function(){if(this instanceof y){var b=v.apply(this,o(s,arguments));return Object(b)===b?b:this}return v.apply(m,o(s,arguments))},g=n(0,v.length-s.length),w=[],u=0;u<g;u++)w[u]="$"+u;if(y=Function("binder","return function ("+p(w,",")+"){ return binder.apply(this,arguments); }")(f),v.prototype){var l=function(){};l.prototype=v.prototype,y.prototype=new l,l.prototype=null}return y}})),Dt=F(((e,a)=>{var t=Mi();a.exports=Function.prototype.bind||t})),Er=F(((e,a)=>{a.exports=Function.prototype.call})),Sr=F(((e,a)=>{a.exports=Function.prototype.apply})),ki=F(((e,a)=>{a.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply})),sn=F(((e,a)=>{var t=Dt(),r=Sr(),n=Er(),i=ki();a.exports=i||t.call(n,r)})),Rr=F(((e,a)=>{var t=Dt(),r=Bt(),n=Er(),i=sn();a.exports=function(h){if(h.length<1||typeof h[0]!="function")throw new r("a function is required");return i(t,n,h)}})),Ci=F(((e,a)=>{var t=Rr(),r=Ft(),n;try{n=[].__proto__===Array.prototype}catch(p){if(!p||typeof p!="object"||!("code"in p)||p.code!=="ERR_PROTO_ACCESS")throw p}var i=!!n&&r&&r(Object.prototype,"__proto__"),o=Object,h=o.getPrototypeOf;a.exports=i&&typeof i.get=="function"?t([i.get]):typeof h=="function"?function(d){return h(d==null?d:o(d))}:!1})),an=F(((e,a)=>{var t=rn(),r=nn(),n=Ci();a.exports=t?function(o){return t(o)}:r?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return r(o)}:n?function(o){return n(o)}:null})),Ii=F(((e,a)=>{var t=Function.prototype.call,r=Object.prototype.hasOwnProperty,n=Dt();a.exports=n.call(t,r)})),on=F(((e,a)=>{var t,r=Xr(),n=ui(),i=hi(),o=di(),h=fi(),p=en(),d=Bt(),m=pi(),v=gi(),s=vi(),y=mi(),f=yi(),g=_i(),w=bi(),u=Ei(),l=Function,b=function(V){try{return l('"use strict"; return ('+V+").constructor;")()}catch{}},M=Ft(),k=er(),P=function(){throw new d},$=M?(function(){try{return arguments.callee,P}catch{try{return M(arguments,"callee").get}catch{return P}}})():P,B=Ri()(),j=an(),U=nn(),Q=rn(),Y=Sr(),K=Er(),X={},I=typeof Uint8Array>"u"||!j?t:j(Uint8Array),c={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?t:ArrayBuffer,"%ArrayIteratorPrototype%":B&&j?j([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":X,"%AsyncGenerator%":X,"%AsyncGeneratorFunction%":X,"%AsyncIteratorPrototype%":X,"%Atomics%":typeof Atomics>"u"?t:Atomics,"%BigInt%":typeof BigInt>"u"?t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?t:Float16Array,"%Float32Array%":typeof Float32Array>"u"?t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?t:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":X,"%Int8Array%":typeof Int8Array>"u"?t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?t:Int16Array,"%Int32Array%":typeof Int32Array>
vendor: 4,964 bytes, line 1
1"u"?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&j?j(j([][Symbol.iterator]())):t,"%JSON%":typeof JSON=="object"?JSON:t,"%Map%":typeof Map>"u"?t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!B||!j?t:j(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":M,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?t:Promise,"%Proxy%":typeof Proxy>"u"?t:Proxy,"%RangeError%":o,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!B||!j?t:j(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&j?j(""[Symbol.iterator]()):t,"%Symbol%":B?Symbol:t,"%SyntaxError%":p,"%ThrowTypeError%":$,"%TypedArray%":I,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array>"u"?t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?t:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?t:WeakSet,"%Function.prototype.call%":K,"%Function.prototype.apply%":Y,"%Object.defineProperty%":k,"%Object.getPrototypeOf%":U,"%Math.abs%":v,"%Math.floor%":s,"%Math.max%":y,"%Math.min%":f,"%Math.pow%":g,"%Math.round%":w,"%Math.sign%":u,"%Reflect.getPrototypeOf%":Q};if(j)try{null.error}catch(V){c["%Error.prototype%"]=j(j(V))}var _=function V(G){var L;if(G==="%AsyncFunction%")L=b("async function () {}");else if(G==="%GeneratorFunction%")L=b("function* () {}");else if(G==="%AsyncGeneratorFunction%")L=b("async function* () {}");else if(G==="%AsyncGenerator%"){var T=V("%AsyncGeneratorFunction%");T&&(L=T.prototype)}else if(G==="%AsyncIteratorPrototype%"){var H=V("%AsyncGenerator%");H&&j&&(L=j(H.prototype))}return c[G]=L,L},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=Dt(),C=Ii(),O=R.call(K,Array.prototype.concat),D=R.call(Y,Array.prototype.splice),A=R.call(K,String.prototype.replace),E=R.call(K,String.prototype.slice),N=R.call(K,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,q=function(G){var L=E(G,0,1),T=E(G,-1);if(L==="%"&&T!=="%")throw new p("invalid intrinsic syntax, expected closing `%`");
1if(T==="%"&&L!=="%")throw new p("invalid intrinsic syntax, expected opening `%`");var H=[];return A(G,z,function(J,ee,Z,ne){H[H.length]=Z?A(ne,x,"$1"):ee||J}),H},W=function(G,L){var T=G,H;if(C(S,T)&&(H=S[T],T="%"+H[0]+"%"),C(c,T)){var J=c[T];if(J===X&&(J=_(T)),typeof J>"u"&&!L)throw new d("intrinsic "+G+" exists, but is not available. Please file an issue!");return{alias:H,name:T,value:J}}throw new p("intrinsic "+G+" does not exist!")};a.exports=function(G,L){if(typeof G!="string"||G.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof L!="boolean")throw new d('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,G)===null)throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var T=q(G),H=T.length>0?T[0]:"",J=W("%"+H+"%",L),ee=J.name,Z=J.value,ne=!1,ie=J.alias;ie&&(H=ie[0],D(T,O([0,1],ie)));for(var se=1,xe=!0;se<T.length;se+=1){var re=T[se],te=E(re,0,1),Oe=E(re,-1);if((te==='"'||te==="'"||te==="`"||Oe==='"'||Oe==="'"||Oe==="`")&&te!==Oe)throw new p("property names with quotes must have matching quotes");if((re==="constructor"||!xe)&&(ne=!0),H+="."+re,ee="%"+H+"%",C(c,ee))Z=c[ee];else if(Z!=null){if(!(re in Z)){if(!L)throw new d("base intrinsic for "+G+" exists, but the property is not available.");return}if(M&&se+1>=T.length){var ae=M(Z,re);xe=!!ae,xe&&"get"in ae&&!("originalValue"in ae.get)?Z=ae.get:Z=Z[re]}else xe=C(Z,re),Z=Z[re];xe&&!ne&&(c[ee]=Z)}}return Z}})),ln=F(((e,a)=>{var t=on(),r=Rr(),n=r([t("%String.prototype.indexOf%")]);a.exports=function(o,h){var p=t(o,!!h);return typeof p=="function"&&n(o,".prototype.")>-1?r([p]):p}})),Ai=F(((e,a)=>{var t=Function.prototype.toString,r=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,i;if(typeof r=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},r(function(){throw 42},null,n)}catch(M){M!==i&&(r=null)}else r=null;var o=/^\s*class\b/,h=function(k){try{var P=t.call(k);return o.test(P)}catch{return!1}},p=function(k){try{return h(k)?!1:(t.call(k),!0)}catch{return!1}},d=Object.prototype.toString,m="[object Object]",v="[object Function]",s="[object GeneratorFunction]",y="[object HTMLAllCollection]",f="[object HTML document.all class]",g="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,u=!(0 in[,]),l=function(){return!1};if(typeof document=="object"){var b=document.all;d.call(b)===d.call(document.all)&&(l=function(k){if((u||!k)&&(typeof k>"u"||typeof k=="object"))try{var P=d.call(k);return(P===y||P===f||P===g||P===m)&&k("")==null}catch{}return!1})}a.exports=r?function(k){if(l(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{r(k,null,n)}catch(P){if(P!==i)return!1}return!h(k)&&p(k)}:function(k){if(l(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(w)return p(k);if(h(k))return!1;var P=d.call(k);return P!==v&&P!==s&&!/^\[object HTML/.test(P)?!1:p(k)}})),Ti=F(((e,a)=>{var t=Ai(),r=Object.prototype.toString,n=Object.prototype.hasOwnProperty,i=function(m,v,s){for(var y=0,f=m.length;y<f;y++)n.call(m,y)&&(s==null?v(m[y],y,m):v.call(s,m[y],y,m))},o=function(m,v,s){for(var y=0,f=m.length;y<f;y++)s==null?v(m.charAt(y),y,m):v.call(s,m.charAt(y),y,m)},h=function(m,v,s){for(var y in m)n.call(m,y)&&(s==null?v(m[y],y,m):v.call(s,m[y],y,m))};function p(d){return r.call(d)==="[object Array]"}a.exports=function(m,v,s){if(!t(v))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=s),p(m)?i(m,v,y):typeof m=="string"?o(m,v,y):h(m,v,y)}})),Ni=F(((e,a)=>{a.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]})),Li=F(((e,a)=>{var t=Ni(),r=typeof globalThis>"u"?global:globalThis;a.exports=function(){for(var i=[],o=0;o<t.length;
1o++)typeof r[t[o]]=="function"&&(i[i.length]=t[o]);return i}})),Pi=F(((e,a)=>{var t=er(),r=en(),n=Bt(),i=Ft();a.exports=function(h,p,d){if(!h||typeof h!="object"&&typeof h!="function")throw new n("`obj` must be an object or a function`");if(typeof p!="string"&&typeof p!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var m=arguments.length>3?arguments[3]:null,v=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,f=!!i&&i(h,p);if(t)t(h,p,{configurable:s===null&&f?f.configurable:!s,enumerable:m===null&&f?f.enumerable:!m,value:d,writable:v===null&&f?f.writable:!v});else if(y||!m&&!v&&!s)h[p]=d;else throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}})),Oi=F(((e,a)=>{var t=er(),r=function(){return!!t};r.hasArrayLengthDefineBug=function(){if(!t)return null;try{return t([],"length",{value:1}).length!==1}catch{return!0}},a.exports=r})),Bi=F(((e,a)=>{var t=on(),r=Pi(),n=Oi()(),i=Ft(),o=Bt(),h=t("%Math.floor%");a.exports=function(d,m){if(typeof d!="function")throw new o("`fn` is not a function");if(typeof m!="number"||m<0||m>4294967295||h(m)!==m)throw new o("`length` must be a positive 32-bit integer");var v=arguments.length>2&&!!arguments[2],s=!0,y=!0;if("length"in d&&i){var f=i(d,"length");f&&!f.configurable&&(s=!1),f&&!f.writable&&(y=!1)}return(s||y||!v)&&(n?r(d,"length",m,!0,!0):r(d,"length",m)),d}})),Fi=F(((e,a)=>{var t=Dt(),r=Sr(),n=sn();a.exports=function(){return n(t,r,arguments)}})),Di=F(((e,a)=>{var t=Bi(),r=er(),n=Rr(),i=Fi();a.exports=function(h){var p=n(arguments),d=h.length-(arguments.length-1);return t(p,1+(d>0?d:0),!0)},r?r(a.exports,"apply",{value:i}):a.exports.apply=i})),xi=F(((e,a)=>{var t=tn();a.exports=function(){return t()&&!!Symbol.toStringTag}})),ji=F(((e,a)=>{var t=Ti(),r=Li(),n=Di(),i=ln(),o=Ft(),h=an(),p=i("Object.prototype.toString"),d=xi()(),m=typeof globalThis>"u"?global:globalThis,v=r(),s=i("String.prototype.slice"),y=i("Array.prototype.indexOf",!0)||function(l,b){for(var M=0;M<l.length;M+=1)if(l[M]===b)return M;return-1},f={__proto__:null};d&&o&&h?t(v,function(u){var l=new m[u];if(Symbol.toStringTag in l&&h){var b=h(l),M=o(b,Symbol.toStringTag);if(!M&&b&&(M=o(h(b),Symbol.toStringTag)),M&&M.get){var k=n(M.get);f["$"+u]=k}}}):t(v,function(u){var l=new m[u],b=l.slice||l.set;if(b){var M=n(b);f["$"+u]=M}});var g=function(l){var b=!1;return t(f,function(M,k){if(!b)try{"$"+M(l)===k&&(b=s(k,1))}catch{}}),b},w=function(l){var b=!1;return t(f,function(M,k){if(!b)try{M(l),b=s(k,1)}catch{}}),b};a.exports=function(l){if(!l||typeof l!="object")return!1;if(!d){var b=s(p(l),8,-1);return y(v,b)>-1?b:b!=="Object"?!1:w(l)}return o?g(l):null}})),qi=F(((e,a)=>{var t=ji();a.exports=function(n){return!!t(n)}})),$i=F(((e,a)=>{var t=Bt(),r=ln()("TypedArray.prototype.buffer",!0),n=qi();a.exports=r||function(o){if(!n(o))throw new t("Not a Typed Array");return o.buffer}})),Ui=F(((e,a)=>{var t=Ke().Buffer,r=ci(),n=$i(),i=ArrayBuffer.isView||function(m){try{return n(m),!0}catch{return!1}},o=typeof Uint8Array<"u",h=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",p=h&&(t.prototype instanceof Uint8Array||t.TYPED_ARRAY_SUPPORT);a.exports=function(m,v){if(t.isBuffer(m))return m.constructor&&!("isBuffer"in m)?t.from(m):m;if(typeof m=="string")return t.from(m,v);if(h&&i(m)){if(m.byteLength===0)return t.alloc(0);if(p){var s=t.from(m.buffer,m.byteOffset,m.byteLength);if(s.byteLength===m.byteLength)return s}var y=m instanceof Uint8Array?m:new Uint8Array(m.buffer,m.byteOffset,m.byteLength),f=t.from(y);if(f.length===m.byteLength)return f}if(o&&m instanceof Uint8Array)return t.from(m);var g=r(m);if(g)for(var w=0;w<m.length;w+=1){var u=m[w];if(typeof u!="number"||u<0||u>255||~~u!==u)throw new RangeError("Array items must be numbers in the range 0-255.")}if(g||t.isBuffer(m)&&m.constructor&&typeof m.constructor.isBuffer=="function"&&m.constructor.isBuffer(m))return t.from(m);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}})),Tt=F(((e,a)=>{var t=Ke().Buffer,r=Ui();function n(i,o){this._block=t.alloc(i),this._finalSize=o,this._blockSize=i,this._len=0}n.prototype.update=function(i,o){i=r(i,o||"utf8");for(var h=this._block,p=this._blockSize,d=i.length,m=this._len,v=0;v<d;){for(var s=m%p,y=Math.min(d-v,p-s),f=0;f<y;f++)h[s+f]=i[v+f];m+=y,v+=y,m%p===0&&this._update(h)}return this._len+=d,this},n.prototype.digest=function(i){var o=this._len%this._blockSize;this._block[o]=128,this._block.fill(0,o+1),o>=this._finalSize&&(this._update(this._block),this._block.fill(0));var h=this._len*8;if(h<=4294967295)this._block.writeUInt32BE(h,this._blockSize-4);else{var p=(h&4294967295)>>>0,d=(h-p)/4294967296;this._block.writeUInt32BE(d,this._blockSize-8),this._block.writeUInt32BE(p,this._blockSize-4)}this._update(this._block);var m=this._hash();return i?m.toString(i):m},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},a.exports=n})),Hi=F(((e,a)=>{var t=Ve(),r=Tt(),n=Ke().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,r.call(this,64,56)}t(h,r),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function p(v){return v<<5|v>>>27}function d(v){return v<<30|v>>>2}function m(v,s,y,f){return v===0?s&y|~s&f:v===2?s&y|s&f|y&f:s^y^f}h.prototype._update=function(v){for(var s=this._w,y=this._a|0,f=this._b|0,g=this._c|0,w=this._d|0,u=this._e|0,l=0;l<16;++l)s[l]=v.readInt32BE(l*4);for(;l<80;++l)s[l]=s[l-3]^s[l-8]^s[l-14]^s[l-16];for(var b=0;b<80;++b){var M=~~(b/20),k=p(y)+m(M,f,g,w)+u+s[b]+i[M]|0;
1u=w,w=g,g=d(f),f=y,y=k}this._a=y+this._a|0,this._b=f+this._b|0,this._c=g+this._c|0,this._d=w+this._d|0,this._e=u+this._e|0},h.prototype._hash=function(){var v=n.allocUnsafe(20);return v.writeInt32BE(this._a|0,0),v.writeInt32BE(this._b|0,4),v.writeInt32BE(this._c|0,8),v.writeInt32BE(this._d|0,12),v.writeInt32BE(this._e|0,16),v},a.exports=h})),Wi=F(((e,a)=>{var t=Ve(),r=Tt(),n=Ke().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function h(){this.init(),this._w=o,r.call(this,64,56)}t(h,r),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function p(s){return s<<1|s>>>31}function d(s){return s<<5|s>>>27}function m(s){return s<<30|s>>>2}function v(s,y,f,g){return s===0?y&f|~y&g:s===2?y&f|y&g|f&g:y^f^g}h.prototype._update=function(s){for(var y=this._w,f=this._a|0,g=this._b|0,w=this._c|0,u=this._d|0,l=this._e|0,b=0;b<16;++b)y[b]=s.readInt32BE(b*4);for(;b<80;++b)y[b]=p(y[b-3]^y[b-8]^y[b-14]^y[b-16]);for(var M=0;M<80;++M){var k=~~(M/20),P=d(f)+v(k,g,w,u)+l+y[M]+i[k]|0;l=u,u=w,w=m(g),g=f,f=P}this._a=f+this._a|0,this._b=g+this._b|0,this._c=w+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},h.prototype._hash=function(){var s=n.allocUnsafe(20);return s.writeInt32BE(this._a|0,0),s.writeInt32BE(this._b|0,4),s.writeInt32BE(this._c|0,8),s.writeInt32BE(this._d|0,12),s.writeInt32BE(this._e|0,16),s},a.exports=h})),cn=F(((e,a)=>{var t=Ve(),r=Tt(),n=Ke().Buffer,i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function h(){this.init(),this._w=o,r.call(this,64,56)}t(h,r),h.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function p(f,g,w){return w^f&(g^w)}function d(f,g,w){return f&g|w&(f|g)}function m(f){return(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10)}function v(f){return(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7)}function s(f){return(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3}function y(f){return(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10}h.prototype._update=function(f){for(var g=this._w,w=this._a|0,u=this._b|0,l=this._c|0,b=this._d|0,M=this._e|0,k=this._f|0,P=this._g|0,$=this._h|0,B=0;B<16;++B)g[B]=f.readInt32BE(B*4);for(;B<64;++B)g[B]=y(g[B-2])+g[B-7]+s(g[B-15])+g[B-16]|0;for(var j=0;j<64;++j){var U=$+v(M)+p(M,k,P)+i[j]+g[j]|0,Q=m(w)+d(w,u,l)|0;$=P,P=k,k=M,M=b+U|0,b=l,l=u,u=w,w=U+Q|0}this._a=w+this._a|0,this._b=u+this._b|0,this._c=l+this._c|0,this._d=b+this._d|0,this._e=M+this._e|0,this._f=k+this._f|0,this._g=P+this._g|0,this._h=$+this._h|0},h.prototype._hash=function(){var f=n.allocUnsafe(32);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f.writeInt32BE(this._h,28),f},a.exports=h})),Vi=F(((e,a)=>{var t=Ve(),r=cn(),n=Tt(),i=Ke().Buffer,o=new Array(64);function h(){this.init(),this._w=o,n.call(this,64,56)}t(h,r),h.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},h.prototype._hash=function(){var p=i.allocUnsafe(28);return p.writeInt32BE(this._a,0),p.writeInt32BE(this._b,4),p.writeInt32BE(this._c,8),p.writeInt32BE(this._d,12),p.writeInt32BE(this._e,16),p.writeInt32BE(this._f,20),p.writeInt32BE(this._g,24),p},a.exports=h})),un=F(((e,a)=>{var t=Ve(),r=Tt(),n=Ke().Buffer,i=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,
11322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function h(){this.init(),this._w=o,r.call(this,128,112)}t(h,r),h.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function p(u,l,b){return b^u&(l^b)}function d(u,l,b){return u&l|b&(u|l)}function m(u,l){return(u>>>28|l<<4)^(l>>>2|u<<30)^(l>>>7|u<<25)}function v(u,l){return(u>>>14|l<<18)^(u>>>18|l<<14)^(l>>>9|u<<23)}function s(u,l){return(u>>>1|l<<31)^(u>>>8|l<<24)^u>>>7}function y(u,l){return(u>>>1|l<<31)^(u>>>8|l<<24)^(u>>>7|l<<25)}function f(u,l){return(u>>>19|l<<13)^(l>>>29|u<<3)^u>>>6}function g(u,l){return(u>>>19|l<<13)^(l>>>29|u<<3)^(u>>>6|l<<26)}function w(u,l){return u>>>0<l>>>0?1:0}h.prototype._update=function(u){for(var l=this._w,b=this._ah|0,M=this._bh|0,k=this._ch|0,P=this._dh|0,$=this._eh|0,B=this._fh|0,j=this._gh|0,U=this._hh|0,Q=this._al|0,Y=this._bl|0,K=this._cl|0,X=this._dl|0,I=this._el|0,c=this._fl|0,_=this._gl|0,S=this._hl|0,R=0;R<32;R+=2)l[R]=u.readInt32BE(R*4),l[R+1]=u.readInt32BE(R*4+4);for(;R<160;R+=2){var C=l[R-30],O=l[R-30+1],D=s(C,O),A=y(O,C);C=l[R-4],O=l[R-4+1];var E=f(C,O),N=g(O,C),z=l[R-14],x=l[R-14+1],q=l[R-32],W=l[R-32+1],V=A+x|0,G=D+z+w(V,A)|0;V=V+N|0,G=G+E+w(V,N)|0,V=V+W|0,G=G+q+w(V,W)|0,l[R]=G,l[R+1]=V}for(var L=0;L<160;L+=2){G=l[L],V=l[L+1];var T=d(b,M,k),H=d(Q,Y,K),J=m(b,Q),ee=m(Q,b),Z=v($,I),ne=v(I,$),ie=i[L],se=i[L+1],xe=p($,B,j),re=p(I,c,_),te=S+ne|0,Oe=U+Z+w(te,S)|0;te=te+re|0,Oe=Oe+xe+w(te,re)|0,te=te+se|0,Oe=Oe+ie+w(te,se)|0,te=te+V|0,Oe=Oe+G+w(te,V)|0;var ae=ee+H|0,le=J+T+w(ae,ee)|0;U=j,S=_,j=B,_=c,B=$,c=I,I=X+te|0,$=P+Oe+w(I,X)|0,P=k,X=K,k=M,K=Y,M=b,Y=Q,Q=te+ae|0,b=Oe+le+w(Q,te)|0}this._al=this._al+Q|0,this._bl=this._bl+Y|0,this._cl=this._cl+K|0,this._dl=this._dl+X|0,this._el=this._el+I|0,this._fl=this._fl+c|0,this._gl=this._gl+_|0,this._hl=this._hl+S|0,this._ah=this._ah+b+w(this._al,Q)|0,this._bh=this._bh+M+w(this._bl,Y)|0,this._ch=this._ch+k+w(this._cl,K)|0,this._dh=this._dh+P+w(this._dl,X)|0,this._eh=this._eh+$+w(this._el,I)|0,this._fh=this._fh+B+w(this._fl,c)|0,this._gh=this._gh+j+w(this._gl,_)|0,this._hh=this._hh+U+w(this._hl,S)|0},h.prototype._hash=function(){var u=n.allocUnsafe(64);function l(b,M,k){u.writeInt32BE(b,k),u.writeInt32BE(M,k+4)}return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),l(this._gh,this._gl,48),l(this._hh,this._hl,56),u},a.exports=h})),zi=F(((e,a)=>{var t=Ve(),r=un(),n=Tt(),i=Ke().Buffer,o=new Array(160);function h(){this.init(),this._w=o,n.call(this,128,112)}t(h,r),h.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},h.prototype._hash=function(){var p=i.allocUnsafe(48);function d(m,v,s){p.writeInt32BE(m,s),p.writeInt32BE(v,s+4)}return d(this._ah,this._al,0),d(this._bh,this._bl,8),d(this._ch,this._cl,16),d(this._dh,this._dl,24),d(this._eh,this._el,32),d(this._fh,this._fl,40),p},a.exports=h})),Gi=F(((e,a)=>{a.exports=function(r){var n=r.toLowerCase(),i=a.exports[n];if(!i)throw new Error(n+" is not supported (we accept pull requests)");return new i},a.exports.sha=Hi(),a.exports.sha1=Wi(),a.exports.sha224=Vi(),a.exports.sha256=cn(),a.exports.sha384=zi(),a.exports.sha512=un()})),Mr=F((e=>
1{Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;var a=Gi(),t=Ze(),r="session:id",n="session:secret",i="session:linked",o=class hn{constructor(p,d,m,v){this._storage=p,this._id=d||(0,t.randomBytesHex)(16),this._secret=m||(0,t.randomBytesHex)(32),this._key=new a.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!v}static load(p){const d=p.getItem(r),m=p.getItem(i),v=p.getItem(n);return d&&v?new hn(p,d,v,m==="1"):null}static hash(p){return new a.sha256().update(p).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(p){this._linked=p,this.persistLinked()}save(){return this._storage.setItem(r,this._id),this._storage.setItem(n,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(i,this._linked?"1":"0")}};e.Session=o})),Ji=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Cipher=void 0;var a=Ze(),t=class{constructor(r){this.secret=r}async encrypt(r){const n=this.secret;if(n.length!==64)throw Error("secret must be 256 bits");const i=crypto.getRandomValues(new Uint8Array(12)),o=await crypto.subtle.importKey("raw",(0,a.hexStringToUint8Array)(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]),h=new TextEncoder,p=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},o,h.encode(r)),d=16,m=p.slice(p.byteLength-d),v=p.slice(0,p.byteLength-d),s=new Uint8Array(m),y=new Uint8Array(v),f=new Uint8Array([...i,...s,...y]);return(0,a.uint8ArrayToHex)(f)}async decrypt(r){const n=this.secret;if(n.length!==64)throw Error("secret must be 256 bits");return new Promise((i,o)=>{(async function(){const h=await crypto.subtle.importKey("raw",(0,a.hexStringToUint8Array)(n),{name:"aes-gcm"},!1,["encrypt","decrypt"]),p=(0,a.hexStringToUint8Array)(r),d=p.slice(0,12),m=p.slice(12,28),v=p.slice(28),s=new Uint8Array([...v,...m]),y={name:"AES-GCM",iv:new Uint8Array(d)};try{const f=await window.crypto.subtle.decrypt(y,h,s);i(new TextDecoder().decode(f))}catch(f){o(f)}})()})}};e.Cipher=t})),Zi=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkHTTP=void 0;var a=class{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const o=(t=n?.filter(h=>h.event==="Web3Response").map(h=>({type:"Event",sessionId:this.sessionId,eventId:h.id,event:h.event,data:h.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(o),o}throw new Error(`Check unseen events failed: ${r.status}`)}};e.WalletLinkHTTP=a})),Ki=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkWebSocket=e.ConnectionState=void 0;var a;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(a||(e.ConnectionState=a={}));var t=class{setConnectionStateListener(r){this.connectionStateListener=r}setIncomingDataListener(r){this.incomingDataListener=r}constructor(r,n=WebSocket){this.WebSocketClass=n,this.webSocket=null,this.pendingData=[],this.url=r.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((r,n)=>{var i;let o;try{this.webSocket=o=new this.WebSocketClass(this.url)}catch(h){n(h);return}(i=this.connectionStateListener)===null||i===void 0||i.call(this,a.CONNECTING),o.onclose=h=>{var p;this.clearWebSocket(),n(new Error(`websocket error ${h.code}: ${h.reason}`)),(p=this.connectionStateListener)===null||p===void 0||p.call(this,a.DISCONNECTED)},o.onopen=h=>{var p;r(),(p=this.connectionStateListener)===null||p===void 0||p.call(this,a.CONNECTED),this.pendingData.length>
10&&([...this.pendingData].forEach(d=>this.sendData(d)),this.pendingData=[])},o.onmessage=h=>{var p,d;if(h.data==="h")(p=this.incomingDataListener)===null||p===void 0||p.call(this,{type:"Heartbeat"});else try{const m=JSON.parse(h.data);(d=this.incomingDataListener)===null||d===void 0||d.call(this,m)}catch{}}})}disconnect(){var r;const{webSocket:n}=this;if(n){this.clearWebSocket(),(r=this.connectionStateListener)===null||r===void 0||r.call(this,a.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{n.close()}catch{}}}sendData(r){const{webSocket:n}=this;if(!n){this.pendingData.push(r),this.connect();return}n.send(r)}clearWebSocket(){const{webSocket:r}=this;r&&(this.webSocket=null,r.onclose=null,r.onerror=null,r.onmessage=null,r.onopen=null)}};e.WalletLinkWebSocket=t})),Qi=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkConnection=void 0;var a=Xt(),t=Ji(),r=br(),n=wr(),i=Mr(),o=Zi(),h=Ki(),p=1e4,d=6e4,m=class{constructor({session:v,linkAPIUrl:s,listener:y,diagnostic:f,WebSocketClass:g=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=u=>{u&&new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",l=>u.JsonRpcUrl&&this.handleChainUpdated(l,u.JsonRpcUrl)]]).forEach((l,b)=>{const M=u[b];M!==void 0&&l(M)})},this.handleDestroyed=u=>{var l,b;u==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:i.Session.hash(this.session.id)}))},this.handleAccountUpdated=async u=>{var l,b;try{const M=await this.cipher.decrypt(u);(l=this.listener)===null||l===void 0||l.accountUpdated(M)}catch{(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(u,l)=>{var b,M;try{const k=await this.cipher.decrypt(l);(b=this.listener)===null||b===void 0||b.metadataUpdated(u,k)}catch{(M=this.diagnostic)===null||M===void 0||M.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:u})}},this.handleWalletUsernameUpdated=async u=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,u)},this.handleAppVersionUpdated=async u=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,u)},this.handleChainUpdated=async(u,l)=>{var b,M;try{const k=await this.cipher.decrypt(u),P=await this.cipher.decrypt(l);(b=this.listener)===null||b===void 0||b.chainUpdated(k,P)}catch{(M=this.diagnostic)===null||M===void 0||M.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=v,this.cipher=new t.Cipher(v.secret),this.diagnostic=f,this.listener=y;const w=new h.WalletLinkWebSocket(`${s}/rpc`,g);w.setConnectionStateListener(async u=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(r.EVENTS.CONNECTED_STATE_CHANGE,{state:u,sessionIdHash:i.Session.hash(v.id)});let b=!1;switch(u){case h.ConnectionState.DISCONNECTED:if(!this.destroyed){const M=async()=>{await new Promise(k=>setTimeout(k,5e3)),this.destroyed||w.connect().catch(()=>{M()})};M()}break;case h.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),b=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},p),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case h.ConnectionState.CONNECTING:break}this.connected!==b&&(this.connected=b)}),w.setIncomingDataListener(u=>{var l,b,M;switch(u.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const k=u.type==="IsLinkedOK"?u.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(r.EVENTS.LINKED,{sessionIdHash:i.Session.hash(v.id),linked:k,type:u.type,onlineGuests:u.onlineGuests}),this.linked=k||u.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:i.Session.hash(v.id),metadata_keys:u&&u.metadata?Object.keys(u.metadata):void 0}),this.handleSessionMetadataUpdated(u.metadata);break;case"Event":this.handleIncomingEvent(u);break}u.id!==void 0&&((M=this.requestResolutions.get(u.id))===null||M===void 0||M(u))}),this.ws=w,this.http=new o.WalletLinkHTTP(s,v.id,v.key)}connect(){var v;if(this.destroyed)throw new Error("instance is destroyed");(v=this.diagnostic)===null||v===void 0||v.log(r.EVENTS.STARTED_CONNECTING,{sessionIdHash:i.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var v;this.destroyed=!0,this.ws.disconnect(),(v=this.diagnostic)===null||v===void 0||v.log(r.EVENTS.DISCONNECTED,{sessionIdHash:i.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(v){var s,y;this._connected=v,v&&((s=this.onceConnected)===null||s===void 0||s.call(this)),(y=this.listener)===null||y===void 0||y.connectedUpdated(v)}setOnceConnected(v){return new Promise(s=>{this.connected?v().then(s):this.onceConnected=()=>{v().then(s),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(v){var s,y;this._linked=v,v&&((s=this.onceLinked)===null||s===void 0||s.call(this)),(y=this.listener)===null||y===void 0||y.linkedUpdated(v)}setOnceLinked(v){return new Promise(s=>{this.linked?v().then(s):this.onceLinked=()=>{v().then(s),this.onceLinked=void 0}})}async handleIncomingEvent(v){var s,y;if(!(v.type!=="Event"||v.event!=="Web3Response"))try{const f=await this.cipher.decrypt(v.data),g=JSON.parse(f);if(g.type!=="WEB3_RESPONSE")return;(s=this.listener)===null||s===void 0||s.handleWeb3ResponseMessage(g)}catch{(y=this.diagnostic)===null||y===void 0||y.log(r.EVENTS.GENERAL_ER
1ROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(v=>setTimeout(v,250));try{await this.fetchUnseenEventsAPI()}catch(v){console.error("Unable to check for unseen events",v)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(v=>this.handleIncomingEvent(v))}async setSessionMetadata(v,s){const y={type:"SetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[v]:s}};return this.setOnceConnected(async()=>{const f=await this.makeRequest(y);if(f.type==="Fail")throw new Error(f.error||"failed to set session metadata")})}async publishEvent(v,s,y=!1){const f=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},s),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),g={type:"PublishEvent",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:v,data:f,callWebhook:y};return this.setOnceLinked(async()=>{const w=await this.makeRequest(g);if(w.type==="Fail")throw new Error(w.error||"failed to publish event");return w.eventId})}sendData(v){this.ws.sendData(JSON.stringify(v))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>p*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(v,s=d){const y=v.id;this.sendData(v);let f;return Promise.race([new Promise((g,w)=>{f=window.setTimeout(()=>{w(new Error(`request ${y} timed out`))},s)}),new Promise(g=>{this.requestResolutions.set(y,w=>{clearTimeout(f),g(w),this.requestResolutions.delete(y)})})])}async authenticate(){const v={type:"HostSession",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},s=await this.makeRequest(v);if(s.type==="Fail")throw new Error(s.error||"failed to authentcate")}sendIsLinked(){const v={type:"IsLinked",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(v)}sendGetSessionConfig(){const v={type:"GetSessionConfig",id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(v)}};e.WalletLinkConnection=m})),Yi=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'})),dn=F((e=>{var a=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};
1Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;var t=a(Yi());function r(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(n)}e.injectCssReset=r})),xt=zt({clsx:()=>Vr,default:()=>Vr});function fn(e){var a,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(a=0;a<e.length;a++)e[a]&&(t=fn(e[a]))&&(r&&(r+=" "),r+=t);else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function Vr(){for(var e,a,t=0,r="";t<arguments.length;)(e=arguments[t++])&&(a=fn(e))&&(r&&(r+=" "),r+=a);return r}var jt=Vt((()=>{})),Xi=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CloseIcon=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}e.CloseIcon=t})),es=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletRound=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,a.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,a.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}e.CoinbaseWalletRound=t})),ts=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.QRCodeIcon=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,a.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,a.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,a.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}e.QRCodeIcon=t})),rs=F(((e,a)=>{function t(g){this.mode=n.MODE_8BIT_BYTE,this.data=g,this.parsedData=[];for(var w=0,u=this.data.length;w<u;w++){var l=[],b=this.data.charCodeAt(w);b>65536?(l[0]=240|(b&1835008)>>>18,l[1]=128|(b&258048)>>>12,l[2]=128|(b&4032)>>>6,l[3]=128|b&63):b>2048?(l[0]=224|(b&61440)>>>12,l[1]=128|(b&4032)>>>6,l[2]=128|b&63):b>128?(l[0]=192|(b&1984)>>>6,l[1]=128|b&63):l[0]=b,this.parsedData.push(l)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}t.prototype={getLength:function(g){return this.parsedData.length},write:function(g){for(var w=0,u=this.parsedData.length;w<u;w++)g.put(this.parsedData[w],8)}};function r(g,w){this.typeNumber=g,this.errorCorrectLevel=w,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}r.prototype={addData:function(g){var w=new t(g);this.dataList.push(w),this.dataCache=null},isDark:function(g,w){if(g<0||this.moduleCount<=g||w<0||this.moduleCount<=w)throw new Error(g+","+w);return this.modules[g][w]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(g,w){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var u=0;u<this.moduleCount;u++){this.modules[u]=new Array(this.moduleCount);for(var l=0;l<this.moduleCount;l++)this.modules[u][l]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(g,w),this.typeNumber>=7&&this.setupTypeNumber(g),this.dataCache==null&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,w)},setupPositionProbePattern:function(g,w){for(var u=-1;u<=7;u++)if(!(g+u<=-1||this.moduleCount<=g+u))for(var l=-1;l<=7;l++)w+l<=-1||this.moduleCount<=w+l||(0<=u&&u<=6&&(l==0||l==6)||0<=l&&l<=6&&(u==0||u==6)||2<=u&&u<=4&&2<=l&&l<=4?this.modules[g+u][w+l]=!0:this.modules[g+u][w+l]=!1)},getBestMaskPattern:function(){for(var g=0,w=0,u=0;u<8;u++){this.makeImpl(!0,u);var l=h.getLostPoint(this);(u==0||g>l)&&(g=l,w=u)}return w},createMovieClip:function(g,w,u){var l=g.createEmptyMovieClip(w,u),b=1;this.make();for(var M=0;M<this.modules.length;M++)for(var k=M*b,P=0;P<this.modules[M].length;P++){var $=P*b;this.modules[M][P]&&(l.beginFill(0,100),l.moveTo($,k),l.lineTo($+b,k),l.lineTo($+b,k+b),l.lineTo($,k+b),l.endFill())}return l},setupTimingPattern:function(){for(var g=8;g<this.moduleCount-8;g++)this.modules[g][6]==null&&(this.modules[g][6]=g%2==0);for(var w=8;w<this.moduleCount-8;w++)this.modules[6][w]==null&&(this.modules[6][w]=w%2==0)},setupPositionAdjustPattern:function(){for(var g=h.getPatternPosition(this.typeNumber),w=0;w<g.length;w++)for(var u=0;u<g.length;u++){var l=g[w],b=g[u];if(this.modules[l][b]==null)for(var M=-2;M<=2;M++)for(var k=-2;k<=2;k++)M==-2||M==2||k==-2||k==2||M==0&&k==0?this.modules[l+M][b+k]=!0:this.modules[l+M][b+k]=!1}},setupTypeNumber:function(g){for(var w=h.getBCHTypeNumber(this.typeNumber),u=0;u<18;u++){var l=!g&&(w>>u&1)==1;this.modules[Math.floor(u/3)][u%3+this.moduleCount-8-3]=l}for(var u=0;u<18;u++){var l=!g&&(w>>u&1)==1;this.modules[u%3+this.moduleCount-8-3][Math.floor(u/3)]=l}},setupTypeInfo:function(g,w){for(var u=this.errorCorrectLevel<<3|w,l=h.getBCHTypeInfo(u),b=0;b<15;b++){var M=!g&&(l>>b&1)==1;b<6?this.modules[b][8]=M:b<8?this.modules[b+1][8]=M:this.modules[this.moduleCount-15+b][8]=M}for(var b=0;b<15;b++){var M=!g&&(l>>b&1)==1;b<8?this.modules[8][this.moduleCount-b-1]=M:b<9?this.modules[8][15-b-1+1]=M:this.modules[8][15-b-1
vendor: 9,988 bytes, line 1
1]=M}this.modules[this.moduleCount-8][8]=!g},mapData:function(g,w){for(var u=-1,l=this.moduleCount-1,b=7,M=0,k=this.moduleCount-1;k>0;k-=2)for(k==6&&k--;;){for(var P=0;P<2;P++)if(this.modules[l][k-P]==null){var $=!1;M<g.length&&($=(g[M]>>>b&1)==1),h.getMask(w,l,k-P)&&($=!$),this.modules[l][k-P]=$,b--,b==-1&&(M++,b=7)}if(l+=u,l<0||this.moduleCount<=l){l-=u,u=-u;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(g,w,u){for(var l=v.getRSBlocks(g,w),b=new s,M=0;M<u.length;M++){var k=u[M];b.put(k.mode,4),b.put(k.getLength(),h.getLengthInBits(k.mode,g)),k.write(b)}for(var P=0,M=0;M<l.length;M++)P+=l[M].dataCount;if(b.getLengthInBits()>P*8)throw new Error("code length overflow. ("+b.getLengthInBits()+">"+P*8+")");for(b.getLengthInBits()+4<=P*8&&b.put(0,4);b.getLengthInBits()%8!=0;)b.putBit(!1);for(;!(b.getLengthInBits()>=P*8||(b.put(r.PAD0,8),b.getLengthInBits()>=P*8));)b.put(r.PAD1,8);return r.createBytes(b,l)},r.createBytes=function(g,w){for(var u=0,l=0,b=0,M=new Array(w.length),k=new Array(w.length),P=0;P<w.length;P++){var $=w[P].dataCount,B=w[P].totalCount-$;l=Math.max(l,$),b=Math.max(b,B),M[P]=new Array($);for(var j=0;j<M[P].length;j++)M[P][j]=255&g.buffer[j+u];u+=$;var U=h.getErrorCorrectPolynomial(B),Q=new m(M[P],U.getLength()-1).mod(U);k[P]=new Array(U.getLength()-1);for(var j=0;j<k[P].length;j++){var Y=j+Q.getLength()-k[P].length;k[P][j]=Y>=0?Q.get(Y):0}}for(var K=0,j=0;j<w.length;j++)K+=w[j].totalCount;for(var X=new Array(K),I=0,j=0;j<l;j++)for(var P=0;P<w.length;P++)j<M[P].length&&(X[I++]=M[P][j]);for(var j=0;j<b;j++)for(var P=0;P<w.length;P++)j<k[P].length&&(X[I++]=k[P][j]);return X};for(var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},h={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(g){for(var w=g<<10;h.getBCHDigit(w)-h.getBCHDigit(h.G15)>=0;)w^=h.G15<<h.getBCHDigit(w)-h.getBCHDigit(h.G15);return(g<<10|w)^h.G15_MASK},getBCHTypeNumber:function(g){for(var w=g<<12;h.getBCHDigit(w)-h.getBCHDigit(h.G18)>=0;)w^=h.G18<<h.getBCHDigit(w)-h.getBCHDigit(h.G18);return g<<12|w},getBCHDigit:function(g){for(var w=0;g!=0;)w++,g>>>=1;return w},getPatternPosition:function(g){return h.PATTERN_POSITION_TABLE[g-1]},getMask:function(g,w,u){switch(g){case o.PATTERN000:return(w+u)%2==0;case o.PATTERN001:return w%2==0;case o.PATTERN010:return u%3==0;case o.PATTERN011:return(w+u)%3==0;case o.PATTERN100:return(Math.floor(w/2)+Math.floor(u/3))%2==0;case o.PATTERN101:return w*u%2+w*u%3==0;case o.PATTERN110:return(w*u%2+w*u%3)%2==0;case o.PATTERN111:return(w*u%3+(w+u)%2)%2==0;default:throw new Error("bad maskPattern:"+g)}},getErrorCorrectPolynomial:function(g){for(var w=new m([1],0),u=0;u<g;u++)w=w.multiply(new m([1,p.gexp(u)],0));return w},getLengthInBits:function(g,w){if(1<=w&&w<10)switch(g){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:return 8;case n.MODE_KANJI:return 8;default:throw new Error("mode:"+g)}else if(w<27)switch(g){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+g)}else if(w<41)switch(g){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+g)}else throw new Error("type:"+w)},getLostPoint:function(g){for(var w=g.getModuleCount(),u=0,l=0;l<w;l++)for(var b=0;b<w;b++){for(var M=0,k=g.isDark(l,b),P=-1;P<=1;P++)if(!(l+P<0||w<=l+P))for(var $=-1;$<=1;$++)b+$<0||w<=b+$||P==0&&$==0||k==g.isDark(l+P,b+$)&&M++;M>5&&(u+=3+M-5)}for(var l=0;l<w-1;l++)for(var b=0;b<w-1;b++){var B=0;g.isDark(l,b)&&B++,g.isDark(l+1,b)&&B++,g.isDark(l,b+1)&&B++,g.isDark(l+1,b+1)&&B++,(B==0||B==4)&&(u+=3)}for(var l=0;l<w;l++)for(var b=0;b<w-6;b++)g.isDark(l,b)&&!g.isDark(l,b+1)&&g.isDark(l,b+2)&&g.isDark(l,b+3)&&g.isDark(l,b+4)&&!g.isDark(l,b+5)&&g.isDark(l,b+6)&&(u+=40);for(var b=0;b<w;b++)for(var l=0;l<w-6;l++)g.isDark(l,b)&&!g.isDark(l+1,b)&&g.isDark(l+2,b)&&g.isDark(l+3,b)&&g.isDark(l+4,b)&&!g.isDark(l+5,b)&&g.isDark(l+6,b)&&(u+=40);for(var j=0,b=0;b<w;b++)for(var l=0;l<w;l++)g.isDark(l,b)&&j++;var U=Math.abs(100*j/w/w-50)/5;return u+=U*10,u}},p={glog:function(g){if(g<1)throw new Error("glog("+g+")");return p.LOG_TABLE[g]},gexp:function(g){for(;g<0;)g+=255;for(;g>=256;)g-=255;return p.EXP_TABLE[g]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)p.EXP_TABLE[d]=1<<d;for(var d=8;d<256;d++)p.EXP_TABLE[d]=p.EXP_TABLE[d-4]^p.EXP_TABLE[d-5]^p.EXP_TABLE[d-6]^p.EXP_TABLE[d-8];for(var d=0;d<255;d++)p.LOG_TABLE[p.EXP_TABLE[d]]=d;function m(g,w){if(g.length==null)throw new Error(g.length+"/"+w);for(var u=0;u<g.length&&g[u]==0;)u++;this.num=new Array(g.length-u+w);for(var l=0;l<g.length-u;l++)this.num[l]=g[l+u]}m.prototype={get:function(g){return this.num[g]},getLength:function(){return this.num.length},multiply:function(g){for(var w=new Array(this.getLength()+g.getLength()-1),u=0;u<this.getLength();u++)for(var l=0;l<g.getLength();l++)w[u+l]^=p.gexp(p.glog(this.get(u))+p.glog(g.get(l)));return new m(w,0)},mod:function(g){if(this.getLength()-g.getLength()<0)return this;for(var w=p.glog(this.get(0))-p.glog(g.get(0)),u=new Array(this.getLength()),l=0;l<this.getLength();l++)u[l]=this.get(l);for(var l=0;l<g.getLength();l++)u[l]^=p.gexp(p.glog(g.get(l))+w);return new m(u,0).mod(g)}};function v(g,w){this.totalCount=g,this.dataCount=w}v.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],v.getRSBlocks=function(g,w){var u=v.getRsBlockTable(g,w);if(u==null)throw new Error("bad rs block @ typeNumber:"+g+"/errorCorrectLevel:"+w);for(var l=u.length/3,b=[],M=0;M<l;M++)for(var k=u[M*3+0],P=u[M*3+1],$=u[M*3+2],B=0;B<k;B++)b.push(new v(P,$));return b},v.getRsBlockTable=function(g,w){switch(w){case i.L:return v.RS_BLOCK_TABLE[(g-1)*4+0];case i.M:return v.RS_BLOCK_TABLE[(g-1)*4+1];case i.Q:return v.RS_BLOCK_TABLE[(g-1)*4+2];case i.H:return v.RS_BLOCK_TABLE[(g-1)*4+3];default:return}};function s(){this.buffer=[],this.length=0}s.prototype={get:function(g){var w=Math.floor(g/8);return(this.buffer[w]>>>7-g%8&1)==1},put:function(g,w){for(var u=0;u<w;u++)this.putBit((g>>>w-u-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(g){var w=Math.floor(this.length/8);this.buffer.length<=w&&this.buffer.push(0),g&&(this.buffer[w]|=128>>>this.length%8),this.length++}};var y=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,8
16,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function f(g){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof g=="string"&&(g={content:g}),g)for(var w in g)this.options[w]=g[w];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function u(k){switch(k){case"L":return i.L;case"M":return i.M;case"Q":return i.Q;case"H":return i.H;default:throw new Error("Unknwon error correction level: "+k)}}function l(k,P){for(var $=b(k),B=1,j=0,U=0,Q=y.length;U<=Q;U++){var Y=y[U];if(!Y)throw new Error("Content too long: expected "+j+" but got "+$);switch(P){case"L":j=Y[0];break;case"M":j=Y[1];break;case"Q":j=Y[2];break;case"H":j=Y[3];break;default:throw new Error("Unknwon error correction level: "+P)}if($<=j)break;B++}if(B>y.length)throw new Error("Content too long");return B}function b(k){var P=encodeURI(k).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return P.length+(P.length!=k?3:0)}var M=this.options.content;this.qrcode=new r(l(M,this.options.ecl),u(this.options.ecl)),this.qrcode.addData(M),this.qrcode.make()}f.prototype.svg=function(g){var w=this.options||{},u=this.qrcode.modules;typeof g>"u"&&(g={container:w.container||"svg"});for(var l=typeof w.pretty<"u"?!!w.pretty:!0,b=l?"  ":"",M=l?`\r
2`:"",k=w.width,P=w.height,$=u.length,B=k/($+2*w.padding),j=P/($+2*w.padding),U=typeof w.join<"u"?!!w.join:!1,Q=typeof w.swap<"u"?!!w.swap:!1,Y=typeof w.xmlDeclaration<"u"?!!w.xmlDeclaration:!0,K=typeof w.predefined<"u"?!!w.predefined:!1,X=K?b+'<defs><path id="qrmodule" d="M0 0 h'+j+" v"+B+' H0 z" style="fill:'+w.color+';shape-rendering:crispEdges;" /></defs>'+M:"",I=b+'<rect x="0" y="0" width="'+k+'" height="'+P+'" style="fill:'+w.background+';shape-rendering:crispEdges;"/>'+M,c="",_="",S=0;S<$;S++)for(var R=0;R<$;R++)if(u[R][S]){var C=R*B+w.padding*B,O=S*j+w.padding*j;if(Q){var D=C;C=O,O=D}if(U){var A=B+C,E=j+O;C=Number.isInteger(C)?Number(C):C.toFixed(2),O=Number.isInteger(O)?Number(O):O.toFixed(2),A=Number.isInteger(A)?Number(A):A.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),_+="M"+C+","+O+" V"+E+" H"+A+" V"+O+" H"+C+" Z "}else K?c+=b+'<use x="'+C.toString()+'" y="'+O.toString()+'" href="#qrmodule" />'+M:c+=b+'<rect x="'+C.toString()+'" y="'+O.toString()+'" width="'+B+'" height="'+j+'" style="fill:'+w.color+';shape-rendering:crispEdges;"/>'+M}U&&(c=b+'<path x="0" y="0" style="fill:'+w.color+';shape-rendering:crispEdges;" d="'+_+'" />');let N="";if(this.options.image!==void 0&&this.options.image.svg){const x=k*this.options.image.width/100,q=P*this.options.image.height/100,W=k/2-x/2,V=P/2-q/2;N+=`<svg x="${W}" y="${V}" width="${x}" height="${q}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,N+=this.options.image.svg+M,N+="</svg>"}var z="";switch(g.container){case"svg":Y&&(z+='<?xml version="1.0" standalone="yes"?>'+M),z+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+k+'" height="'+P+'">'+M,z+=X+I+c,z+=N,z+="</svg>";break;case"svg-viewbox":Y&&(z+='<?xml version="1.0" standalone="yes"?>'+M),z+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+k+" "+P+'">'+M,z+=X+I+c,z+=N,z+="</svg>";break;case"g":z+='<g width="'+k+'" height="'+P+'">'+M,z+=X+I+c,z+=N,z+="</g>";break;default:z+=(X+I+c+N).replace(/^\s+/,"");break}return z},a.exports=f})),ns=F((e=>{var a=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};
2Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;var t=($e(),oe(qe)),r=(Jt(),oe(Gt)),n=a(rs()),i=o=>{const[h,p]=(0,r.useState)("");return(0,r.useEffect)(()=>{var d,m;const v=new n.default({content:o.content,background:o.bgColor||"#ffffff",color:o.fgColor||"#000000",container:"svg",ecl:"M",width:(d=o.width)!==null&&d!==void 0?d:256,height:(m=o.height)!==null&&m!==void 0?m:256,padding:0,image:o.image});p(`data:image/svg+xml;base64,${Buffer.from(v.svg(),"utf8").toString("base64")}`)},[o.bgColor,o.content,o.fgColor,o.height,o.image,o.width]),h?(0,t.h)("img",{src:h,alt:"QR Code"}):null};e.QRCode=i})),is=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"})),ss=F((e=>{var a=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;var t=($e(),oe(qe)),r=a(is()),n=i=>{var o;const h=(o=i.size)!==null&&o!==void 0?o:64,p=i.color||"#000";return(0,t.h)("div",{class:"-cbwsdk-spinner"},(0,t.h)("style",null,r.default),(0,t.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:h,height:h}},(0,t.h)("circle",{style:{cx:50,cy:50,r:45,stroke:p}})))};e.Spinner=n})),as=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;
2color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"})),os=F((e=>{var a=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSteps=e.ConnectContent=void 0;var t=a((jt(),oe(xt))),r=($e(),oe(qe)),n=Ze(),i=_r(),o=Xi(),h=es(),p=ts(),d=ns(),m=ss(),v=a(as()),s={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:w},y=u=>u==="light"?"#FFFFFF":"#0A0B0D";function f(u){const{theme:l}=u,b=(0,n.createQrUrl)(u.sessionId,u.sessionSecret,u.linkAPIUrl,u.isParentConnection,u.version,u.chainId),M=s.steps;return(0,r.h)("div",{"data-testid":"connect-content",className:(0,t.default)("-cbwsdk-connect-content",l)},(0,r.h)("style",null,v.default),(0,r.h)("div",{className:"-cbwsdk-connect-content-header"},(0,r.h)("h2",{className:(0,t.default)("-cbwsdk-connect-content-heading",l)},"Scan to connect with our mobile app"),u.onCancel&&(0,r.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:u.onCancel},(0,r.h)(o.CloseIcon,{fill:l==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,r.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,r.h)(g,{title:s.title,description:s.description,theme:l})),(0,r.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,r.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,r.h)(d.QRCode,{content:b,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,r.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:i.LIB_VERSION}),(0,r.h)("input",{type:"hidden",value:b})),(0,r.h)(M,{theme:l}),!u.isConnected&&(0,r.h)("div",{"data-testid":"connecting-spinner",className:(0,t.default)("-cbwsdk-connect-content-qr-connecting",l)},(0,r.h)(m.Spinner,{size:36,color:l==="dark"?"#FFF":"#000"}),(0,r.h)("p",null,"Connecting...")))))}e.ConnectContent=f;function g({title:u,description:l,theme:b}){return(0,r.h)("div",{className:(0,t.default)("-cbwsdk-connect-item",b)},(0,r.h)("div",null,(0,r.h)(h.CoinbaseWalletRound,null)),(0,r.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,r.h)("h3",{className:"-cbwsdk-connect-item-title"},u),(0,r.h)("p",{className:"-cbwsdk-connect-item-description"},l)))}function w({theme:u}){return(0,r.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",u)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",u)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,r.h)("span",null,"Tap ",(0,r.h)("strong",null,"Scan")," "),(0,r.h)("span",{className:(0,t.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",u)},(0,r.h)(p.QRCodeIcon,{fill:y(u)})))))}e.CoinbaseWalletSteps=w})),ls=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArrowLeftIcon=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}e.ArrowLeftIcon=t})),cs=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LaptopIcon=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,a.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}e.LaptopIcon=t})),us=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SafeIcon=void 0;var a=($e(),oe(qe));function t(r){return(0,a.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8
2001 5.20598 8.8001 6.2001Z"}))}e.SafeIcon=t})),hs=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"})),ds=F((e=>{var a=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionContent=void 0;var t=a((jt(),oe(xt))),r=($e(),oe(qe)),n=(Jt(),oe(Gt)),i=ls(),o=cs(),h=us(),p=a(hs());function d({theme:m}){const[v,s]=(0,n.useState)(!1),y=(0,n.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),f=(0,n.useCallback)(()=>{v?window.location.reload():(y(),s(!0))},[y,v]);return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension",m)},(0,r.h)("style",null,p.default),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("h3",{class:(0,t.default)("-cbwsdk-try-extension-heading",m)},"Or try the Coinbase Wallet browser extension"),(0,r.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,r.h)("button",{class:(0,t.default)("-cbwsdk-try-extension-cta",m),onClick:f},v?"Refresh":"Install"),(0,r.h)("div",null,!v&&(0,r.h)(i.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:m==="light"?"#0052FF":"#588AF5"})))),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",m)},(0,r.h)(o.LaptopIcon,{fill:m==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",m)},"Connect with dapps with just one click on your desktop browser")),(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",m)},(0,r.h)(h.SafeIcon,{fill:m==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",m)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}e.TryExtensionContent=d})),fs=F((e=>
2{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"})),ps=F((e=>{var a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectDialog=void 0;var t=a((jt(),oe(xt))),r=($e(),oe(qe)),n=(Jt(),oe(Gt)),i=os(),o=ds(),h=a(fs()),p=d=>{const{isOpen:m,darkMode:v}=d,[s,y]=(0,n.useState)(!m),[f,g]=(0,n.useState)(!m);(0,n.useEffect)(()=>{const u=[window.setTimeout(()=>{g(!m)},10)];return m?y(!1):u.push(window.setTimeout(()=>{y(!0)},360)),()=>{u.forEach(window.clearTimeout)}},[m]);const w=v?"dark":"light";return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-container",s&&"-cbwsdk-connect-dialog-container-hidden")},(0,r.h)("style",null,h.default),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-backdrop",w,f&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,r.h)("div",{class:"-cbwsdk-connect-dialog"},(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-box",f&&"-cbwsdk-connect-dialog-box-hidden")},d.connectDisabled?null:(0,r.h)(i.ConnectContent,{theme:w,version:d.version,sessionId:d.sessionId,sessionSecret:d.sessionSecret,linkAPIUrl:d.linkAPIUrl,isConnected:d.isConnected,isParentConnection:d.isParentConnection,chainId:d.chainId,onCancel:d.onCancel}),(0,r.h)(o.TryExtensionContent,{theme:w}))))};e.ConnectDialog=p})),gs=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;var a=($e(),oe(qe)),t=ps(),r=class{constructor(n){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=n.darkMode,this.version=n.version,this.sessionId=n.sessionId,this.sessionSecret=n.sessionSecret,this.linkAPIUrl=n.linkAPIUrl,this.isParentConnection=n.isParentConnection}attach(n){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",n.appendChild(this.root),this.render()}setConnected(n){this.connected!==n&&(this.connected=n,this.render())}setChainId(n){this.chainId!==n&&(this.chainId=n,this.render())}detach(){var n;this.root&&((0,a.render)(null,this.root),(n=this.root.parentElement)===null||n===void 0||n.removeChild(this.root))}setConnectDisabled(n){this.connectDisabled=n}open(n){this.isOpen=!0,this.onCancel=n.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,a.render)((0,a.h)(t.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};e.LinkFlow=r})),vs=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;
2cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"})),pn=F((e=>{var a=e&&e.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;var t=a((jt(),oe(xt))),r=($e(),oe(qe)),n=(Jt(),oe(Gt)),i=a(vs()),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",h="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwu
2NTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",p=class{constructor(v){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=v.darkMode}attach(v){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",v.appendChild(this.root),this.render()}presentItem(v){const s=this.nextItemKey++;return this.items.set(s,v),this.render(),()=>{this.items.delete(s),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,r.render)((0,r.h)("div",null,(0,r.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([v,s])=>(0,r.h)(e.SnackbarInstance,Object.assign({},s,{key:v}))))),this.root)}};e.Snackbar=p;var d=v=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,r.h)("style",null,i.default),(0,r.h)("div",{class:"-cbwsdk-snackbar"},v.children));e.SnackbarContainer=d;var m=({autoExpand:v,message:s,menuItems:y})=>
2{const[f,g]=(0,n.useState)(!0),[w,u]=(0,n.useState)(v??!1);(0,n.useEffect)(()=>{const b=[window.setTimeout(()=>{g(!1)},1),window.setTimeout(()=>{u(!0)},1e4)];return()=>{b.forEach(window.clearTimeout)}});const l=()=>{u(!w)};return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",f&&"-cbwsdk-snackbar-instance-hidden",w&&"-cbwsdk-snackbar-instance-expanded")},(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:l},(0,r.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},s),(0,r.h)("div",{class:"-gear-container"},!w&&(0,r.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,r.h)("img",{src:h,class:"-gear-icon",title:"Expand"}))),y&&y.length>0&&(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},y.map((b,M)=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",b.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:b.onClick,key:M},(0,r.h)("svg",{width:b.svgWidth,height:b.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{"fill-rule":b.defaultFillRule,"clip-rule":b.defaultClipRule,d:b.path,fill:"#AAAAAA"})),(0,r.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",b.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},b.info)))))};e.SnackbarInstance=m})),gn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelayUI=void 0;var a=dn(),t=gs(),r=pn(),n=class{constructor(i){this.standalone=null,this.attached=!1,this.snackbar=new r.Snackbar({darkMode:i.darkMode}),this.linkFlow=new t.LinkFlow({darkMode:i.darkMode,version:i.version,sessionId:i.session.id,sessionSecret:i.session.secret,linkAPIUrl:i.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const i=document.documentElement,o=document.createElement("div");o.className="-cbwsdk-css-reset",i.appendChild(o),this.linkFlow.attach(o),this.snackbar.attach(o),this.attached=!0,(0,a.injectCssReset)()}setConnected(i){this.linkFlow.setConnected(i)}setChainId(i){this.linkFlow.setChainId(i)}setConnectDisabled(i){this.linkFlow.setConnectDisabled(i)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(i){this.linkFlow.open({onCancel:i.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(i){let o;return i.isUnlinkedErrorState?o={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]}:o={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:i.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.9687
25 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:i.onResetConnection}]},this.snackbar.presentItem(o)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(i){this.standalone=i}isStandalone(){var i;return(i=this.standalone)!==null&&i!==void 0?i:!1}};e.WalletLinkRelayUI=n})),vn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelay=void 0;var a=Yt(),t=Xt(),r=Ze(),n=br(),i=wr(),o=Mr(),h=Qi(),p=yr(),d=gn(),m=class ft extends i.RelayAbstract{constructor(s){var y;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=u=>{var l;this.isLinked=u;const b=this.storage.getItem(i.LOCAL_STORAGE_ADDRESSES_KEY);if(u&&(this.session.linked=u),this.isUnlinkedErrorState=!1,b){const M=b.split(" "),k=this.storage.getItem("IsStandaloneSigning")==="true";if(M[0]!==""&&!u&&this.session.linked&&!k){this.isUnlinkedErrorState=!0;const P=this.getSessionIdHash();(l=this.diagnostic)===null||l===void 0||l.log(n.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:P})}}},this.metadataUpdated=(u,l)=>{this.storage.setItem(u,l)},this.chainUpdated=(u,l)=>{this.chainCallbackParams.chainId===u&&this.chainCallbackParams.jsonRpcUrl===l||(this.chainCallbackParams={chainId:u,jsonRpcUrl:l},this.chainCallback&&this.chainCallback(u,l))},this.accountUpdated=u=>{this.accountsCallback&&this.accountsCallback([u]),ft.accountRequestCallbackIds.size>0&&(Array.from(ft.accountRequestCallbackIds.values()).forEach(l=>{const b={type:"WEB3_RESPONSE",id:l,response:{method:"requestEthereumAccounts",result:[u]}};this.invokeCallback(Object.assign(Object.assign({},b),{id:l}))}),ft.accountRequestCallbackIds.clear())},this.connectedUpdated=u=>{this.ui.setConnected(u)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=s.linkAPIUrl,this.storage=s.storage,this.options=s;const{session:f,ui:g,connection:w}=this.subscribe();this._session=f,this.connection=w,this.relayEventManager=s.relayEventManager,this.diagnostic=s.diagnosticLogger,this._reloadOnDisconnect=(y=s.reloadOnDisconnect)!==null&&y!==void 0?y:!0,this.ui=g}subscribe(){const s=o.Session.load(this.storage)||new o.Session(this.storage).save(),{linkAPIUrl:y,diagnostic:f}=this,g=new h.WalletLinkConnection({session:s,linkAPIUrl:y,diagnostic:f,listener:this}),{version:w,darkMode:u}=this.options,l=this.options.uiConstructor({linkAPIUrl:y,version:w,darkMode:u,session:s});return g.connect(),{session:s,ui:l,connection:g}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(s=>setTimeout(()=>s(null),1e3))]).then(()=>{var s,y;const f=this.ui.isStandalone();(s=this.diagnostic)===null||s===void 0||s.log(n.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const g=o.Session.load(this.storage);if(g?.id===this._session.id?this.storage.clear():g&&((y=this.diagnostic)===null||y===void 0||y.log(n.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o.Session.hash(g.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:w,ui:u,connection:l}=this.subscribe();this._session=w,this.connection=l,this.ui=u,f&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(s=>{var y;(y=this.diagnostic)===null||y===void 0||y.log(n.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${s}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(s,y){this.appName=s,this.appLogoUrl=y}getStorageItem(s){return this.storage.getItem(s)}get session(){return this._session}setStorageItem(s,y){this.storage.setItem(s,y)}signEthereumMessage(s,y,f,g){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,r.hexStringFromBuffer)(s,!0),address:y,addPrefix:f,typedDataJson:g||null}})}ethereumAddressFromSignedMessage(s,y,f){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,r.hexStringFromBuffer)(s,!0),signature:(0,r.hexStringFromBuffer)(y,!0),addPrefix:f}})}signEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,r.bigIntStringFromBN)(s.weiValue),data:(0,r.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxPriorityFeePerGas:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,gasLimit:s.gasLimit?(0,r.b
2igIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(s){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:s.fromAddress,toAddress:s.toAddress,weiValue:(0,r.bigIntStringFromBN)(s.weiValue),data:(0,r.hexStringFromBuffer)(s.data,!0),nonce:s.nonce,gasPriceInWei:s.gasPriceInWei?(0,r.bigIntStringFromBN)(s.gasPriceInWei):null,maxFeePerGas:s.maxFeePerGas?(0,r.bigIntStringFromBN)(s.maxFeePerGas):null,maxPriorityFeePerGas:s.maxPriorityFeePerGas?(0,r.bigIntStringFromBN)(s.maxPriorityFeePerGas):null,gasLimit:s.gasLimit?(0,r.bigIntStringFromBN)(s.gasLimit):null,chainId:s.chainId,shouldSubmit:!0}})}submitEthereumTransaction(s,y){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,r.hexStringFromBuffer)(s,!0),chainId:y}})}scanQRCode(s){return this.sendRequest({method:"scanQRCode",params:{regExp:s}})}getQRCodeUrl(){return(0,r.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(s,y){return this.sendRequest({method:"generic",params:{action:y,data:s}})}sendGenericMessage(s){return this.sendRequest(s)}sendRequest(s){let y=null;const f=(0,r.randomBytesHex)(8),g=w=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,s.method,w),y?.()};return{promise:new Promise((w,u)=>{this.ui.isStandalone()||(y=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:g,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(f,l=>{if(y?.(),(0,p.isErrorResponse)(l))return u(new Error(l.errorMessage));w(l)}),this.ui.isStandalone()?this.sendRequestStandalone(f,s):this.publishWeb3RequestEvent(f,s)}),cancel:g}}setConnectDisabled(s){this.ui.setConnectDisabled(s)}setAccountsCallback(s){this.accountsCallback=s}setChainCallback(s){this.chainCallback=s}setDappDefaultChainCallback(s){this.dappDefaultChain=s,this.ui instanceof d.WalletLinkRelayUI&&this.ui.setChainId(s)}publishWeb3RequestEvent(s,y){var f;const g={type:"WEB3_REQUEST",id:s,request:y},w=o.Session.load(this.storage);(f=this.diagnostic)===null||f===void 0||f.log(n.EVENTS.WEB3_REQUEST,{eventId:g.id,method:`relay::${y.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:w?o.Session.hash(w.id):"",isSessionMismatched:(w?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",g,!0).then(u=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(n.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:g.id,method:`relay::${y.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:w?o.Session.hash(w.id):"",isSessionMismatched:(w?.id!==this._session.id).toString()})}).catch(u=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g.id,response:{method:y.method,errorMessage:u.message}})})}publishWeb3RequestCanceledEvent(s){const y={type:"WEB3_REQUEST_CANCELED",id:s};this.publishEvent("Web3RequestCanceled",y,!1).then()}publishEvent(s,y,f){return this.connection.publishEvent(s,y,f)}handleWeb3ResponseMessage(s){var y;const{response:f}=s;if((y=this.diagnostic)===null||y===void 0||y.log(n.EVENTS.WEB3_RESPONSE,{eventId:s.id,method:`relay::${f.method}`,sessionIdHash:this.getSessionIdHash()}),f.method==="requestEthereumAccounts"){ft.accountRequestCallbackIds.forEach(g=>this.invokeCallback(Object.assign(Object.assign({},s),{id:g}))),ft.accountRequestCallbackIds.clear();return}this.invokeCallback(s)}handleErrorResponse(s,y,f,g){var w;const u=(w=f?.message)!==null&&w!==void 0?w:(0,a.getMessageFromCode)(g);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:y,errorMessage:u,errorCode:g}})}invokeCallback(s){const y=this.relayEventManager.callbacks.get(s.id);y&&(y(s.response),this.relayEventManager.callbacks.delete(s.id))}requestEthereumAccounts(){const s={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},y=null,f=(0,r.randomBytesHex)(8),g=w=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,s.method,w),y?.()};return{promise:new Promise((w,u)=>{if(this.relayEventManager.callbacks.set(f,l=>{if(this.ui.hideRequestEthereumAccounts(),y?.(),(0,p.isErrorResponse)(l))return u(new Error(l.errorMessage));w(l)}),this.ui.inlineAccountsResponse()){const l=b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"requestEthereumAccounts",result:b}})};this.ui.requestEthereumAccounts({onCancel:g,onAccounts:l})}else{const l=a.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>g(l)})}ft.accountRequestCallbackIds.add(f),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,s)}),cancel:g}}selectProvider(s){const y={method:"selectProvider",params:{providerOptions:s}},f=(0,r.randomBytesHex)(8);return{cancel:w=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,y.method,w)},promise:new Promise((w,u)=>{this.relayEventManager.callbacks.set(f,M=>{if((0,p.isErrorResponse)(M))return u(new Error(M.errorMessage));w(M)});const l=M=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"selectProvider",result:t.ProviderType.Unselected}})},b=M=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"selectProvider",result:M}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:b,onCancel:l,providerOptions:s})})}}watchAsset(s,y,f,g,w,u){const l={method:"watchAsset",params:{type:s,options:{address:y,symbol:f,decimals:g,image:w},chainId:u}};let b=null;const M=(0,r.randomBytesHex)(8),k=P=>{this.publishWeb3RequestCanceledEvent(M),this.handleErrorResponse(M,l.method,P),b?.()};return this.ui.inlineWatchAsset()||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:k,onResetConnection:this.resetAndReload})),{cancel:k,promise:new Promise((P,$)=>{this.relayEventManager.callbacks.set(M,U=>
2{if(b?.(),(0,p.isErrorResponse)(U))return $(new Error(U.errorMessage));P(U)});const B=U=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:M,response:{method:"watchAsset",result:!1}})},j=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:M,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:j,onCancel:B,type:s,address:y,symbol:f,decimals:g,image:w,chainId:u}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(M,l)})}}addEthereumChain(s,y,f,g,w,u){const l={method:"addEthereumChain",params:{chainId:s,rpcUrls:y,blockExplorerUrls:g,chainName:w,iconUrls:f,nativeCurrency:u}};let b=null;const M=(0,r.randomBytesHex)(8),k=P=>{this.publishWeb3RequestCanceledEvent(M),this.handleErrorResponse(M,l.method,P),b?.()};return this.ui.inlineAddEthereumChain(s)||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:k,onResetConnection:this.resetAndReload})),{promise:new Promise((P,$)=>{this.relayEventManager.callbacks.set(M,U=>{if(b?.(),(0,p.isErrorResponse)(U))return $(new Error(U.errorMessage));P(U)});const B=U=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:M,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},j=U=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:M,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:U}}})};this.ui.inlineAddEthereumChain(s)&&this.ui.addEthereumChain({onCancel:B,onApprove:j,chainId:l.params.chainId,rpcUrls:l.params.rpcUrls,blockExplorerUrls:l.params.blockExplorerUrls,chainName:l.params.chainName,iconUrls:l.params.iconUrls,nativeCurrency:l.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(s)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(M,l)}),cancel:k}}switchEthereumChain(s,y){const f={method:"switchEthereumChain",params:Object.assign({chainId:s},{address:y})},g=(0,r.randomBytesHex)(8),w=u=>{this.publishWeb3RequestCanceledEvent(g),this.handleErrorResponse(g,f.method,u)};return{promise:new Promise((u,l)=>{this.relayEventManager.callbacks.set(g,k=>{if((0,p.isErrorResponse)(k)&&k.errorCode)return l(a.standardErrors.provider.custom({code:k.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,p.isErrorResponse)(k))return l(new Error(k.errorMessage));u(k)});const b=k=>{var P;if(k){const $=(P=(0,a.getErrorCode)(k))!==null&&P!==void 0?P:a.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(g,"switchEthereumChain",k instanceof Error?k:a.standardErrors.provider.unsupportedChain(s),$)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},M=k=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:g,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:k}}})};this.ui.switchEthereumChain({onCancel:b,onApprove:M,chainId:f.params.chainId,address:f.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(g,f)}),cancel:w}}inlineAddEthereumChain(s){return this.ui.inlineAddEthereumChain(s)}getSessionIdHash(){return o.Session.hash(this._session.id)}sendRequestStandalone(s,y){const f=w=>{this.handleErrorResponse(s,y.method,w)},g=w=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:w})};switch(y.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:y,onSuccess:g,onCancel:f});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:y,onSuccess:g,onCancel:f});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:y,onSuccess:g,onCancel:f});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:y,onSuccess:g});break;default:f();break}}};e.WalletLinkRelay=m,m.accountRequestCallbackIds=new Set})),ms=F((e=>{var a=e&&e.__createBinding||(Object.create?(function(r,n,i,o){o===void 0&&(o=i);var h=Object.getOwnPropertyDescriptor(n,i);(!h||("get"in h?!n.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,o,h)}):(function(r,n,i,o){o===void 0&&(o=i),r[o]=n[i]})),t=e&&e.__exportStar||function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&a(n,r,i)};
2Object.defineProperty(e,"__esModule",{value:!0}),t(pn(),e)})),ys=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"})),_s=F((e=>{var a=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.RedirectDialog=void 0;var t=a((jt(),oe(xt))),r=($e(),oe(qe)),n=dn(),i=ms(),o=a(ys()),h=class{constructor(){this.root=null}attach(){const d=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",d.appendChild(this.root),(0,n.injectCssReset)()}present(d){this.render(d)}clear(){this.render(null)}render(d){this.root&&((0,r.render)(null,this.root),d&&(0,r.render)((0,r.h)(p,Object.assign({},d,{onDismiss:()=>{this.clear()}})),this.root))}};e.RedirectDialog=h;var p=({title:d,buttonText:m,darkMode:v,onButtonClick:s,onDismiss:y})=>{const f=v?"dark":"light";return(0,r.h)(i.SnackbarContainer,{darkMode:v},(0,r.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,r.h)("style",null,o.default),(0,r.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:y}),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-redirect-dialog-box",f)},(0,r.h)("p",null,d),(0,r.h)("button",{onClick:s},m))))}})),mn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MobileRelayUI=void 0;var a=_s(),t=class{constructor(r){this.attached=!1,this.darkMode=!1,this.redirectDialog=new a.RedirectDialog,this.darkMode=r.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(r){}redirectToCoinbaseWallet(r){const n=new URL("https://go.cb-w.com/walletlink");n.searchParams.append("redirect_url",window.location.href),r&&n.searchParams.append("wl_url",r);const i=document.createElement("a");i.target="cbw-opener",i.href=n.href,i.rel="noreferrer noopener",i.click()}openCoinbaseWalletDeeplink(r){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(r)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(r)},99)}showConnecting(r){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};e.MobileRelayUI=t})),yn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MobileRelay=void 0;var a=Ze(),t=vn(),r=mn(),n=class extends t.WalletLinkRelay{constructor(i){var o;super(i),this._enableMobileWalletLink=(o=i.enableMobileWalletLink)!==null&&o!==void 0?o:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>
2{const i=(0,a.getLocation)();i.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(i.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(i,o){if(super.publishWeb3RequestEvent(i,o),!(this._enableMobileWalletLink&&this.ui instanceof r.MobileRelayUI))return;let h=!1;switch(o.method){case"requestEthereumAccounts":case"connectAndSignIn":h=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:h=!0,this.ui.openCoinbaseWalletDeeplink();break}h&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(i){super.handleWeb3ResponseMessage(i)}connectAndSignIn(i){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:i.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:i.statement,resources:i.resources}})}};e.MobileRelay=n})),_n=F(((e,a)=>{a.exports=Zt().EventEmitter})),bn=F(((e,a)=>{a.exports={}})),bs=F(((e,a)=>{function t(f,g){var w=Object.keys(f);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(f);g&&(u=u.filter(function(l){return Object.getOwnPropertyDescriptor(f,l).enumerable})),w.push.apply(w,u)}return w}function r(f){for(var g=1;g<arguments.length;g++){var w=arguments[g]!=null?arguments[g]:{};g%2?t(Object(w),!0).forEach(function(u){n(f,u,w[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(w)):t(Object(w)).forEach(function(u){Object.defineProperty(f,u,Object.getOwnPropertyDescriptor(w,u))})}return f}function n(f,g,w){return g=p(g),g in f?Object.defineProperty(f,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):f[g]=w,f}function i(f,g){if(!(f instanceof g))throw new TypeError("Cannot call a class as a function")}function o(f,g){for(var w=0;w<g.length;w++){var u=g[w];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(f,p(u.key),u)}}function h(f,g,w){return g&&o(f.prototype,g),w&&o(f,w),Object.defineProperty(f,"prototype",{writable:!1}),f}function p(f){var g=d(f,"string");return typeof g=="symbol"?g:String(g)}function d(f,g){if(typeof f!="object"||f===null)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var u=w.call(f,g||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(f)}var m=Ot().Buffer,v=bn().inspect,s=v&&v.custom||"inspect";function y(f,g,w){m.prototype.copy.call(f,g,w)}a.exports=(function(){function f(){i(this,f),this.head=null,this.tail=null,this.length=0}return h(f,[{key:"push",value:function(w){var u={data:w,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length}},{key:"unshift",value:function(w){var u={data:w,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var u=this.head,l=""+u.data;u=u.next;)l+=w+u.data;return l}},{key:"concat",value:function(w){if(this.length===0)return m.alloc(0);for(var u=m.allocUnsafe(w>>>0),l=this.head,b=0;l;)y(l.data,u,b),b+=l.data.length,l=l.next;return u}},{key:"consume",value:function(w,u){var l;return w<this.head.data.length?(l=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?l=this.shift():l=u?this._getString(w):this._getBuffer(w),l}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var u=this.head,l=1,b=u.data;for(w-=b.length;u=u.next;){var M=u.data,k=w>M.length?M.length:w;if(k===M.length?b+=M:b+=M.slice(0,w),w-=k,w===0){k===M.length?(++l,u.next?this.head=u.next:this.head=this.tail=null):(this.head=u,u.data=M.slice(k));break}++l}return this.length-=l,b}},{key:"_getBuffer",value:function(w){var u=m.allocUnsafe(w),l=this.head,b=1;for(l.data.copy(u),w-=l.data.length;l=l.next;){var M=l.data,k=w>M.length?M.length:w;if(M.copy(u,u.length-w,0,k),w-=k,w===0){k===M.length?(++b,l.next?this.head=l.next:this.head=this.tail=null):(this.head=l,l.data=M.slice(k));break}++b}return this.length-=b,u}},{key:s,value:function(w,u){return v(this,r(r({},u),{},{depth:0,customInspect:!1}))}}]),f})()})),wn=F(((e,a)=>{function t(p,d){var m=this,v=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return v||s?(d?d(p):p&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,p)):process.nextTick(o,this,p)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(y){!d&&y?m._writableState?m._writableState.errorEmitted?process.nextTick(n,m):(m._writableState.errorEmitted=!0,process.nextTick(r,m,y)):process.nextTick(r,m,y):d?(process.nextTick(n,m),d(y)):process.nextTick(n,m)}),this)}function r(p,d){o(p,d),n(p)}function n(p){p._writableState&&!p._writableState.emitClose||p._readableState&&!p._readableState.emitClose||p.emit
vendor: 14,838 bytes, line 2
2("close")}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(p,d){p.emit("error",d)}function h(p,d){var m=p._readableState,v=p._writableState;m&&m.autoDestroy||v&&v.autoDestroy?p.destroy(d):p.emit("error",d)}a.exports={destroy:t,undestroy:i,errorOrDestroy:h}})),Nt=F(((e,a)=>{function t(d,m){d.prototype=Object.create(m.prototype),d.prototype.constructor=d,d.__proto__=m}var r={};function n(d,m,v){v||(v=Error);function s(f,g,w){return typeof m=="string"?m:m(f,g,w)}var y=(function(f){t(g,f);function g(w,u,l){return f.call(this,s(w,u,l))||this}return g})(v);y.prototype.name=v.name,y.prototype.code=d,r[d]=y}function i(d,m){if(Array.isArray(d)){var v=d.length;return d=d.map(function(s){return String(s)}),v>2?"one of ".concat(m," ").concat(d.slice(0,v-1).join(", "),", or ")+d[v-1]:v===2?"one of ".concat(m," ").concat(d[0]," or ").concat(d[1]):"of ".concat(m," ").concat(d[0])}else return"of ".concat(m," ").concat(String(d))}function o(d,m,v){return d.substr(!v||v<0?0:+v,m.length)===m}function h(d,m,v){return(v===void 0||v>d.length)&&(v=d.length),d.substring(v-m.length,v)===m}function p(d,m,v){return typeof v!="number"&&(v=0),v+m.length>d.length?!1:d.indexOf(m,v)!==-1}n("ERR_INVALID_OPT_VALUE",function(d,m){return'The value "'+m+'" is invalid for option "'+d+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(d,m,v){var s;typeof m=="string"&&o(m,"not ")?(s="must not be",m=m.replace(/^not /,"")):s="must be";var y;if(h(d," argument"))y="The ".concat(d," ").concat(s," ").concat(i(m,"type"));else{var f=p(d,".")?"property":"argument";y='The "'.concat(d,'" ').concat(f," ").concat(s," ").concat(i(m,"type"))}return y+=". Received type ".concat(typeof v),y},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),a.exports.codes=r})),En=F(((e,a)=>{var t=Nt().codes.ERR_INVALID_OPT_VALUE;function r(i,o,h){return i.highWaterMark!=null?i.highWaterMark:o?i[h]:null}function n(i,o,h,p){var d=r(o,p,h);if(d!=null){if(!(isFinite(d)&&Math.floor(d)===d)||d<0)throw new t(p?h:"highWaterMark",d);return Math.floor(d)}return i.objectMode?16:16*1024}a.exports={getHighWaterMark:n}})),ws=F(((e,a)=>{a.exports=t;function t(n,i){if(r("noDeprecation"))return n;var o=!1;function h(){if(!o){if(r("throwDeprecation"))throw new Error(i);r("traceDeprecation")?console.trace(i):console.warn(i),o=!0}return n.apply(this,arguments)}return h}function r(n){try{if(!global.localStorage)return!1}catch{return!1}var i=global.localStorage[n];return i==null?!1:String(i).toLowerCase()==="true"}})),Sn=F(((e,a)=>{a.exports=j;function t(x){var q=this;this.next=null,this.entry=null,this.finish=function(){z(q,x)}}var r;j.WritableState=$;var n={deprecate:ws()},i=_n(),o=Ot().Buffer,h=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function p(x){return o.from(x)}function d(x){return o.isBuffer(x)||x instanceof h}var m=wn(),v=En().getHighWaterMark,s=Nt().codes,y=s.ERR_INVALID_ARG_TYPE,f=s.ERR_METHOD_NOT_IMPLEMENTED,g=s.ERR_MULTIPLE_CALLBACK,w=s.ERR_STREAM_CANNOT_PIPE,u=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,M=s.ERR_UNKNOWN_ENCODING,k=m.errorOrDestroy;Ve()(j,i);function P(){}function $(x,q,W){r=r||At(),x=x||{},typeof W!="boolean"&&(W=q instanceof r),this.objectMode=!!x.objectMode,W&&(this.objectMode=this.objectMode||!!x.writableObjectMode),this.highWaterMark=v(this,x,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=x.decodeStrings!==!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){_(q,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}$.prototype.getBuffer=function(){for(var q=this.bufferedRequest,W=[];q;)W.push(q),q=q.next;return W},(function(){try{Object.defineProperty($.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(q){return B.call(this,q)?!0:this!==j?!1:q&&q._writableState instanceof $}})):B=function(q){return q instanceof this};function j(x){r=r||At();var q=this instanceof r;if(!q&&!B.call(j,this))return new j(x);this._writableState=new $(x,this,q),this.writable=!0,x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final)),i.call(this)}j.prototype.pipe=function(){k(this,new w)};function U(x,q){var W=new b;k(x,W),process.nextTick(q,W)}function Q(x,q,W,V){var G;return W===null?G=new l:typeof W!="string"&&!q.objectMode&&(G=new y("chunk",["string","Buffer"],W)),G?(k(x,G),process.nextTick(V,G),!1):!0}j.prototype.write=function(x,q,W){var V=this._writableState,G=!1,L=!V.objectMode&&d(x);return L&&!o.isBuffer(x)&&(x=p(x)),typeof q=="function"&&(W=q,q=null),L?q="buffer":q||(q=V.defaultEncoding),typeof W!="function"&&(W=P),V.ending?U(this,W):(L||Q(this,V,x,W))&&(V.pendingcb++,G=K(this,V,L,x,q,W)),G},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){var x=this._writableState;x.corked&&(x.corked--,!x.writing&&!x.corked&&!x.bufferProcessing&&x.bufferedRequest&&C(this,x))},j.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new M(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(j.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Y(x,q,W){return!x.objectMode&&x.decodeStrings!==!1&&typeof q=="string"&&(q=o.from(q,W)),q}Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(x,q,W,V,G,L){if(!W){var T=Y(q,V,G);V!==T&&(W=!0,G="buffer",V=T)}var H=q.objectMode?1:V.length;q.length+=H;var J=q.length<q.highWaterMark;if(J||(q.needDrain=!0),q.writing||q.corked){var ee=q.lastBufferedRequest;q.lastBufferedRequest={chunk:V,encoding:G,isBuf:W,callback:L,next:null},ee?ee.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else X(x,q,!1,H,V,G,L);return J}function X(x,q,W,V,G,L,T){q.writelen=V,q.writecb=T,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new u("write")):W?x._writev(G,q.onwrite):x._write(G,L,q.onwrite),q.sync=!1}function I(x,q,W,V,G){--q.pendingcb,W?(process.nextTick(G,V),process.nextTick(E,x,q),x._writableState.errorEmitted=!0,k(x,V)):(G(V),x._writableState.errorEmitted=!0,k(x,V),E(x,q))}function c(x){x.writing=!1,x.writecb=null,x.length-=x.writelen,x.writelen=0}function _(x,q){var W=x._writableState,V=W.sync,G=W.writecb;if(typeof G!="function")throw new g;if(c(W),q)I(x,W,V,q,G);else{var L=O(W)||x.destroyed;!L&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&C(x,W),V?process.nextTick(S,x,W,L,G):S(x,W,L,G)}}function S(x,q,W,V){W||R(x,q),q.pendingcb--,V(),E(x,q)}function R(x,q){q.length===0&&q.needDrain&&(q.needDrain=!1,x.emit("drain"))}function C(x,q){q.bufferProcessing=!0;var W=q.bufferedRequest;if(x._writev&&W&&W.next){var V=q.bufferedRequestCount,G=new Array(V),L=q.corkedRequestsFree;L.entry=W;for(var T=0,H=!0;W;)G[T]=W,W.isBuf||(H=!1),W=W.next,T+=1;G.allBuffers=H,X(x,q,!0,q.length,G,"",L.finish),q.pendingcb++,q.lastBufferedRequest=null,L.next?(q.corkedRequestsFree=L.next,L.next=null):q.corkedRequestsFree=new t(q),q.bufferedRequestCount=0}else{for(;W;){var J=W.chunk,ee=W.encoding,Z=W.callback;if(X(x,q,!1,q.objectMode?1:J.length,J,ee,Z),W=W.next,q.bufferedRequestCount--,q.writing)break}W===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=W,q.bufferProcessing=!1}j.prototype._write=function(x,q,W){W(new f("_write()"))},j.prototype._writev=null,j.prototype.end=function(x,q,W){var V=this._writableState;return typeof x=="function"?(W=x,x=null,q=null):typeof q=="function"&&(W=q,q=null),x!=null&&this.write(x,q),V.corked&&(V.corked=1,this.uncork()),V.ending||N(this,V,W),this},Object.defineProperty(j.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function O(x){return x.ending&&x.length===0&&x.bufferedRequest===null&&!x.finished&&!x.writing}function D(x,q){x._final(function(W){q.pendingcb--,W&&k(x,W),q.prefinished=!0,x.emit("prefinish"),E(x,q)})}function A(x,q){!q.prefinished&&!q.finalCalled&&(typeof x._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process.nextTick(D,x,q)):(q.prefinished=!0,x.emit("prefinish")))}function E(x,q){var W=O(q);if(W&&(A(x,q),q.pendingcb===0&&(q.finished=!0,x.emit("finish"),q.autoDestroy))){var V=x._readableState;(!V||V.autoDestroy&&V.endEmitted)&&x.destroy()}return W}function N(x,q,W){q.ending=!0,E(x,q),W&&(q.finished?process.nextTick(W):x.once("finish",W)),q.ended=!0,x.writable=!1}function z(x,q,W){var V=x.entry;for(x.entry=null;V;){var G=V.callback;q.pendingcb--,G(W),V=V.next}q.corkedRequestsFree.next=x}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),j.prototype.destroy=m.destroy,j.prototype._undestroy=m.undestroy,j.prototype._destroy=function(x,q){q(x)}})),At=F(((e,a)=>{var t=Object.keys||function(v){var s=[];for(var y in v)s.push(y);return s};a.exports=p;var r=Rn(),n=Sn();Ve()(p,r);for(var i=t(n.prototype),o=0;o<i.length;o++){var h=i[o];p.prototype[h]||(p.prototype[h]=n.prototype[h])}function p(v){if(!(this instanceof p))return new p(v);r.call(this,v),n.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",d)))}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function d(){this._writableState.ended||process.nextTick(m,this)}function m(v){v.end()}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(s){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=s,this._writableState.destroyed=s)}})})),zr=F((e=>{var a=Ke().Buffer,t=a.isEncoding||function(l){switch(l=""+l,l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(l){if(!l)return"utf8";for(var b;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(b)return;l=(""+l).toLowerCase(),b=!0}}function n(l){var b=r(l);if(typeof b!="string"&&(a.isEncoding===t||!t(l)))throw new Error("Unknown encoding: "+l);return b||l}e.StringDecoder=i;function i(l){this.encoding=n(l);var b;switch(this.encoding){case"utf16le":this.text=s,this.end=y,b=4;break;case"utf8":this.fillLast=d,b=4;break;case"base64":this.text=f,this.end=g,b=3;break;default:this.write=w,this.end=u;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(b)}i.prototype.write=function(l){if(l.length===0)return"";var b,M;if(this.lastNeed){if(b=this.fillLast(l),b===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<l.length?b?b+this.text(l,M):this.text(l,M):b||""},i.prototype.end=v,i.prototype.text=m,i.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function o(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function h(l,b,M){var k=b.length-1;if(k<M)return 0;var P=o(b[k]);return P>=0?(P>0&&(l.lastNeed=P-1),P):--k<M||P===-2?0:(P=o(b[k]),P>=0?(P>0&&(l.lastNeed=P-2),P):--k<M||P===-2?0:(P=o(b[k]),P>=0?(P>0&&(P===2?P=0:l.lastNeed=P-3),P):0))}function p(l,b,M){if((b[0]&192)!==128)return l.lastNeed=0,"�";if(l.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return l.lastNeed=1,"�";if(l.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return l.lastNeed=2,"�"}}function d(l){var b=this.lastTotal-this.lastNeed,M=p(this,l,b);if(M!==void 0)return M;if(this.lastNeed<=l.length)return l.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,b,0,l.length),this.lastNeed-=l.length}function m(l,b){var M=h(this,l,b);if(!this.lastNeed)return l.toString("utf8",b);this.lastTotal=M;var k=l.length-(M-this.lastNeed);return l.copy(this.lastChar,0,k),l.toString("utf8",b,k)}function v(l){var b=l&&l.length?this.write(l):"";return this.lastNeed?b+"�":b}function s(l,b){if((l.length-b)%2===0){var M=l.toString("utf16le",b);
vendor: 7,353 bytes, line 2
2if(M){var k=M.charCodeAt(M.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",b,l.length-1)}function y(l){var b=l&&l.length?this.write(l):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,M)}return b}function f(l,b){var M=(l.length-b)%3;return M===0?l.toString("base64",b):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",b,l.length-M))}function g(l){var b=l&&l.length?this.write(l):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function w(l){return l.toString(this.encoding)}function u(l){return l&&l.length?this.write(l):""}})),kr=F(((e,a)=>{var t=Nt().codes.ERR_STREAM_PREMATURE_CLOSE;function r(h){var p=!1;return function(){if(!p){p=!0;for(var d=arguments.length,m=new Array(d),v=0;v<d;v++)m[v]=arguments[v];h.apply(this,m)}}}function n(){}function i(h){return h.setHeader&&typeof h.abort=="function"}function o(h,p,d){if(typeof p=="function")return o(h,null,p);p||(p={}),d=r(d||n);var m=p.readable||p.readable!==!1&&h.readable,v=p.writable||p.writable!==!1&&h.writable,s=function(){h.writable||f()},y=h._writableState&&h._writableState.finished,f=function(){v=!1,y=!0,m||d.call(h)},g=h._readableState&&h._readableState.endEmitted,w=function(){m=!1,g=!0,v||d.call(h)},u=function(k){d.call(h,k)},l=function(){var k;if(m&&!g)return(!h._readableState||!h._readableState.ended)&&(k=new t),d.call(h,k);if(v&&!y)return(!h._writableState||!h._writableState.ended)&&(k=new t),d.call(h,k)},b=function(){h.req.on("finish",f)};return i(h)?(h.on("complete",f),h.on("abort",l),h.req?b():h.on("request",b)):v&&!h._writableState&&(h.on("end",s),h.on("close",s)),h.on("end",w),h.on("finish",f),p.error!==!1&&h.on("error",u),h.on("close",l),function(){h.removeListener("complete",f),h.removeListener("abort",l),h.removeListener("request",b),h.req&&h.req.removeListener("finish",f),h.removeListener("end",s),h.removeListener("close",s),h.removeListener("finish",f),h.removeListener("end",w),h.removeListener("error",u),h.removeListener("close",l)}}a.exports=o})),Es=F(((e,a)=>{var t;function r(k,P,$){return P=n(P),P in k?Object.defineProperty(k,P,{value:$,enumerable:!0,configurable:!0,writable:!0}):k[P]=$,k}function n(k){var P=i(k,"string");return typeof P=="symbol"?P:String(P)}function i(k,P){if(typeof k!="object"||k===null)return k;var $=k[Symbol.toPrimitive];if($!==void 0){var B=$.call(k,P||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(P==="string"?String:Number)(k)}var o=kr(),h=Symbol("lastResolve"),p=Symbol("lastReject"),d=Symbol("error"),m=Symbol("ended"),v=Symbol("lastPromise"),s=Symbol("handlePromise"),y=Symbol("stream");function f(k,P){return{value:k,done:P}}function g(k){var P=k[h];if(P!==null){var $=k[y].read();$!==null&&(k[v]=null,k[h]=null,k[p]=null,P(f($,!1)))}}function w(k){process.nextTick(g,k)}function u(k,P){return function($,B){k.then(function(){if(P[m]){$(f(void 0,!0));return}P[s]($,B)},B)}}var l=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[y]},next:function(){var P=this,$=this[d];if($!==null)return Promise.reject($);if(this[m])return Promise.resolve(f(void 0,!0));if(this[y].destroyed)return new Promise(function(Q,Y){process.nextTick(function(){P[d]?Y(P[d]):Q(f(void 0,!0))})});var B=this[v],j;if(B)j=new Promise(u(B,this));else{var U=this[y].read();if(U!==null)return Promise.resolve(f(U,!1));j=new Promise(this[s])}return this[v]=j,j}},r(t,Symbol.asyncIterator,function(){return this}),r(t,"return",function(){var P=this;return new Promise(function($,B){P[y].destroy(null,function(j){if(j){B(j);return}$(f(void 0,!0))})})}),t),l),M=function(P){var $,B=Object.create(b,($={},r($,y,{value:P,writable:!0}),r($,h,{value:null,writable:!0}),r($,p,{value:null,writable:!0}),r($,d,{value:null,writable:!0}),r($,m,{value:P._readableState.endEmitted,writable:!0}),r($,s,{value:function(U,Q){var Y=B[y].read();Y?(B[v]=null,B[h]=null,B[p]=null,U(f(Y,!1))):(B[h]=U,B[p]=Q)},writable:!0}),$));return B[v]=null,o(P,function(j){if(j&&j.code!=="ERR_STREAM_PREMATURE_CLOSE"){var U=B[p];U!==null&&(B[v]=null,B[h]=null,B[p]=null,U(j)),B[d]=j;return}var Q=B[h];Q!==null&&(B[v]=null,B[h]=null,B[p]=null,Q(f(void 0,!0))),B[m]=!0}),P.on("readable",w.bind(null,B)),B};a.exports=M})),Ss=F(((e,a)=>{a.exports=function(){throw new Error("Readable.from is not available in the browser")}})),Rn=F(((e,a)=>{a.exports=U;var t;U.ReadableState=j,Zt().EventEmitter;var r=function(T,H){return T.listeners(H).length},n=_n(),i=Ot().Buffer,o=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(L){return i.from(L)}function p(L){return i.isBuffer(L)||L instanceof o}var d=bn(),m;d&&d.debuglog?m=d.debuglog("stream"):m=function(){};var v=bs(),s=wn(),y=En().getHighWaterMark,f=Nt().codes,g=f.ERR_INVALID_ARG_TYPE,w=f.ERR_STREAM_PUSH_AFTER_EOF,u=f.ERR_METHOD_NOT_IMPLEMENTED,l=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,M,k;Ve()(U,n);var P=s.errorOrDestroy,$=["error","close","destroy","pause","resume"];function B(L,T,H){if(typeof L.prependListener=="function")return L.prependListener(T,H);!L._events||!L._events[T]?L.on(T,H):Array.isArray(L._events[T])?L._events[T].unshift(H):L._events[T]=[H,L._events[T]]}function j(L,T,H){t=t||At(),L=L||{},typeof H!="boolean"&&(H=T instanceof t),this.objectMode=!!L.objectMode,H&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=y(this,L,"readableHighWaterMark",H),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(b||(b=zr().StringDecoder),this.decoder=new b(L.encoding),this.encoding=L.encoding)}function U(L){if(t=t||At(),!(this instanceof U))return new U(L);var T=this instanceof t;this._readableState=new j(L,this,T),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),U.prototype.destroy=s.destroy,U.prototype._undestroy=s.undestroy,U.prototype._destroy=function(L,T){T(L)},U.prototype.push=function(L,T){var H=this._readableState,J;return H.objectMode?J=!0:typeof L=="string"&&(T=T||H.defaultEncoding,T!==H.encoding&&(L=i.from(L,T),T=""),J=!0),Q(this,L,T,!1,J)},U.prototype.unshift=function(L){return Q(this,L,null,!0,!1)};function Q(L,T,H,J,ee){m("readableAddChunk",T);var Z=L._readableState;if(T===null)Z.reading=!1,_(L,Z);else{var ne;if(ee||(ne=K(Z,T)),ne)P(L,ne);else if(Z.objectMode||T&&T.length>
vendor: 7,068 bytes, line 2
20)if(typeof T!="string"&&!Z.objectMode&&Object.getPrototypeOf(T)!==i.prototype&&(T=h(T)),J)Z.endEmitted?P(L,new l):Y(L,Z,T,!0);else if(Z.ended)P(L,new w);else{if(Z.destroyed)return!1;Z.reading=!1,Z.decoder&&!H?(T=Z.decoder.write(T),Z.objectMode||T.length!==0?Y(L,Z,T,!1):C(L,Z)):Y(L,Z,T,!1)}else J||(Z.reading=!1,C(L,Z))}return!Z.ended&&(Z.length<Z.highWaterMark||Z.length===0)}function Y(L,T,H,J){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,L.emit("data",H)):(T.length+=T.objectMode?1:H.length,J?T.buffer.unshift(H):T.buffer.push(H),T.needReadable&&S(L)),C(L,T)}function K(L,T){var H;return!p(T)&&typeof T!="string"&&T!==void 0&&!L.objectMode&&(H=new g("chunk",["string","Buffer","Uint8Array"],T)),H}U.prototype.isPaused=function(){return this._readableState.flowing===!1},U.prototype.setEncoding=function(L){b||(b=zr().StringDecoder);var T=new b(L);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var H=this._readableState.buffer.head,J="";H!==null;)J+=T.write(H.data),H=H.next;return this._readableState.buffer.clear(),J!==""&&this._readableState.buffer.push(J),this._readableState.length=J.length,this};var X=1073741824;function I(L){return L>=X?L=X:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function c(L,T){return L<=0||T.length===0&&T.ended?0:T.objectMode?1:L!==L?T.flowing&&T.length?T.buffer.head.data.length:T.length:(L>T.highWaterMark&&(T.highWaterMark=I(L)),L<=T.length?L:T.ended?T.length:(T.needReadable=!0,0))}U.prototype.read=function(L){m("read",L),L=parseInt(L,10);var T=this._readableState,H=L;if(L!==0&&(T.emittedReadable=!1),L===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return m("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?W(this):S(this),null;if(L=c(L,T),L===0&&T.ended)return T.length===0&&W(this),null;var J=T.needReadable;m("need readable",J),(T.length===0||T.length-L<T.highWaterMark)&&(J=!0,m("length less than watermark",J)),T.ended||T.reading?(J=!1,m("reading or ended",J)):J&&(m("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(L=c(H,T)));var ee;return L>0?ee=q(L,T):ee=null,ee===null?(T.needReadable=T.length<=T.highWaterMark,L=0):(T.length-=L,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),H!==L&&T.ended&&W(this)),ee!==null&&this.emit("data",ee),ee};function _(L,T){if(m("onEofChunk"),!T.ended){if(T.decoder){var H=T.decoder.end();H&&H.length&&(T.buffer.push(H),T.length+=T.objectMode?1:H.length)}T.ended=!0,T.sync?S(L):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,R(L)))}}function S(L){var T=L._readableState;m("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(m("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(R,L))}function R(L){var T=L._readableState;m("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(L.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,x(L)}function C(L,T){T.readingMore||(T.readingMore=!0,process.nextTick(O,L,T))}function O(L,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var H=T.length;if(m("maybeReadMore read 0"),L.read(0),H===T.length)break}T.readingMore=!1}U.prototype._read=function(L){P(this,new u("_read()"))},U.prototype.pipe=function(L,T){var H=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=L;break;case 1:J.pipes=[J.pipes,L];break;default:J.pipes.push(L);break}J.pipesCount+=1,m("pipe count=%d opts=%j",J.pipesCount,T);var ee=(!T||T.end!==!1)&&L!==process.stdout&&L!==process.stderr?ne:le;J.endEmitted?process.nextTick(ee):H.once("end",ee),L.on("unpipe",Z);function Z(He,ce){m("onunpipe"),He===H&&ce&&ce.hasUnpiped===!1&&(ce.hasUnpiped=!0,xe())}function ne(){m("onend"),L.end()}var ie=D(H);L.on("drain",ie);var se=!1;function xe(){m("cleanup"),L.removeListener("close",Oe),L.removeListener("finish",ae),L.removeListener("drain",ie),L.removeListener("error",te),L.removeListener("unpipe",Z),H.removeListener("end",ne),H.removeListener("end",le),H.removeListener("data",re),se=!0,J.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&ie()}H.on("data",re);function re(He){m("ondata");var ce=L.write(He);m("dest.write",ce),ce===!1&&((J.pipesCount===1&&J.pipes===L||J.pipesCount>1&&G(J.pipes,L)!==-1)&&!se&&(m("false write response, pause",J.awaitDrain),J.awaitDrain++),H.pause())}function te(He){m("onerror",He),le(),L.removeListener("error",te),r(L,"error")===0&&P(L,He)}B(L,"error",te);function Oe(){L.removeListener("finish",ae),le()}L.once("close",Oe);function ae(){m("onfinish"),L.removeListener("close",Oe),le()}L.once("finish",ae);function le(){m("unpipe"),H.unpipe(L)}return L.emit("pipe",H),J.flowing||(m("pipe resume"),H.resume()),L};function D(L){return function(){var H=L._readableState;m("pipeOnDrain",H.awaitDrain),H.awaitDrain&&H.awaitDrain--,H.awaitDrain===0&&r(L,"data")&&(H.flowing=!0,x(L))}}U.prototype.unpipe=function(L){var T=this._readableState,H={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return L&&L!==T.pipes?this:(L||(L=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,L&&L.emit("unpipe",this,H),this);if(!L){var J=T.pipes,ee=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var Z=0;Z<ee;Z++)J[Z].emit("unpipe",this,{hasUnpiped:!1});return this}var ne=G(T.pipes,L);return ne===-1?this:(T.pipes.splice(ne,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),L.emit("unpipe",this,H),this)},U.prototype.on=function(L,T){var H=n.prototype.on.call(this,L,T),J=this._readableState;return L==="data"?(J.readableListening=this.listenerCount("readable")>0,J.flowing!==!1&&this.resume()):L==="readable"&&!J.endEmitted&&!J.readableListening&&(J.readableListening=J.needReadable=!0,J.flowing=!1,J.emittedReadable=!1,m("on readable",J.length,J.reading),J.length?S(this):J.reading||process.nextTick(E,this)),H},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(L,T){var H=n.prototype.removeListener.call(this,L,T);return L==="readable"&&process.nextTick(A,this),H},U.prototype.removeAllListeners=function(L){var T=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(A,this),T};function A(L){var T=L._readableState;T.readableListening=L.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:L.listenerCount("data")>0&&L.resume()}function E(L){m("readable nexttick read 0"),L.read(0)}U.prototype.resume=function(){var L=this._readableState;return L.flowing||(m("resume"),L.flowing=!L.readableListening,N(this,L)),L.paused=!1,this};function N(L,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(z,L,T))}function z(L,T){m("resume",T.reading),T.reading||L.read(0),T.resumeScheduled=!1,L.emit("resume"),x(L),T.flowing&&!T.reading&&L.read(0)}U.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit
2("pause")),this._readableState.paused=!0,this};function x(L){var T=L._readableState;for(m("flow",T.flowing);T.flowing&&L.read()!==null;);}U.prototype.wrap=function(L){var T=this,H=this._readableState,J=!1;L.on("end",function(){if(m("wrapped end"),H.decoder&&!H.ended){var ne=H.decoder.end();ne&&ne.length&&T.push(ne)}T.push(null)}),L.on("data",function(ne){m("wrapped data"),H.decoder&&(ne=H.decoder.write(ne)),!(H.objectMode&&ne==null)&&(!H.objectMode&&(!ne||!ne.length)||T.push(ne)||(J=!0,L.pause()))});for(var ee in L)this[ee]===void 0&&typeof L[ee]=="function"&&(this[ee]=(function(ie){return function(){return L[ie].apply(L,arguments)}})(ee));for(var Z=0;Z<$.length;Z++)L.on($[Z],this.emit.bind(this,$[Z]));return this._read=function(ne){m("wrapped _read",ne),J&&(J=!1,L.resume())},this},typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=Es()),M(this)}),Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),U._fromList=q,Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(L,T){if(T.length===0)return null;var H;return T.objectMode?H=T.buffer.shift():!L||L>=T.length?(T.decoder?H=T.buffer.join(""):T.buffer.length===1?H=T.buffer.first():H=T.buffer.concat(T.length),T.buffer.clear()):H=T.buffer.consume(L,T.decoder),H}function W(L){var T=L._readableState;m("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(V,T,L))}function V(L,T){if(m("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,T.readable=!1,T.emit("end"),L.autoDestroy)){var H=T._writableState;(!H||H.autoDestroy&&H.finished)&&T.destroy()}}typeof Symbol=="function"&&(U.from=function(L,T){return k===void 0&&(k=Ss()),k(U,L,T)});function G(L,T){for(var H=0,J=L.length;H<J;H++)if(L[H]===T)return H;return-1}})),Mn=F(((e,a)=>{a.exports=d;var t=Nt().codes,r=t.ERR_METHOD_NOT_IMPLEMENTED,n=t.ERR_MULTIPLE_CALLBACK,i=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=t.ERR_TRANSFORM_WITH_LENGTH_0,h=At();Ve()(d,h);function p(s,y){var f=this._transformState;f.transforming=!1;var g=f.writecb;if(g===null)return this.emit("error",new n);f.writechunk=null,f.writecb=null,y!=null&&this.push(y),g(s);var w=this._readableState;w.reading=!1,(w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}function d(s){if(!(this instanceof d))return new d(s);h.call(this,s),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(typeof s.transform=="function"&&(this._transform=s.transform),typeof s.flush=="function"&&(this._flush=s.flush)),this.on("prefinish",m)}function m(){var s=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(y,f){v(s,y,f)}):v(this,null,null)}d.prototype.push=function(s,y){return this._transformState.needTransform=!1,h.prototype.push.call(this,s,y)},d.prototype._transform=function(s,y,f){f(new r("_transform()"))},d.prototype._write=function(s,y,f){var g=this._transformState;if(g.writecb=f,g.writechunk=s,g.writeencoding=y,!g.transforming){var w=this._readableState;(g.needTransform||w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}},d.prototype._read=function(s){var y=this._transformState;y.writechunk!==null&&!y.transforming?(y.transforming=!0,this._transform(y.writechunk,y.writeencoding,y.afterTransform)):y.needTransform=!0},d.prototype._destroy=function(s,y){h.prototype._destroy.call(this,s,function(f){y(f)})};function v(s,y,f){if(y)return s.emit("error",y);if(f!=null&&s.push(f),s._writableState.length)throw new o;
2if(s._transformState.transforming)throw new i;return s.push(null)}})),Rs=F(((e,a)=>{a.exports=r;var t=Mn();Ve()(r,t);function r(n){if(!(this instanceof r))return new r(n);t.call(this,n)}r.prototype._transform=function(n,i,o){o(null,n)}})),Ms=F(((e,a)=>{var t;function r(f){var g=!1;return function(){g||(g=!0,f.apply(void 0,arguments))}}var n=Nt().codes,i=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function h(f){if(f)throw f}function p(f){return f.setHeader&&typeof f.abort=="function"}function d(f,g,w,u){u=r(u);var l=!1;f.on("close",function(){l=!0}),t===void 0&&(t=kr()),t(f,{readable:g,writable:w},function(M){if(M)return u(M);l=!0,u()});var b=!1;return function(M){if(!l&&!b){if(b=!0,p(f))return f.abort();if(typeof f.destroy=="function")return f.destroy();u(M||new o("pipe"))}}}function m(f){f()}function v(f,g){return f.pipe(g)}function s(f){return!f.length||typeof f[f.length-1]!="function"?h:f.pop()}function y(){for(var f=arguments.length,g=new Array(f),w=0;w<f;w++)g[w]=arguments[w];var u=s(g);if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new i("streams");var l,b=g.map(function(M,k){var P=k<g.length-1;return d(M,P,k>0,function($){l||(l=$),$&&b.forEach(m),!P&&(b.forEach(m),u(l))})});return g.reduce(v)}a.exports=y})),kn=F(((e,a)=>{e=a.exports=Rn(),e.Stream=e,e.Readable=e,e.Writable=Sn(),e.Duplex=At(),e.Transform=Mn(),e.PassThrough=Rs(),e.finished=kr(),e.pipeline=Ms()})),ks=F(((e,a)=>{var{Transform:t}=kn();a.exports=r=>class Cn extends t{constructor(i,o,h,p,d){super(d),this._rate=i,this._capacity=o,this._delimitedSuffix=h,this._hashBitLength=p,this._options=d,this._state=new r,this._state.initialize(i,o),this._finalized=!1}_transform(i,o,h){let p=null;try{this.update(i,o)}catch(d){p=d}h(p)}_flush(i){let o=null;try{this.push(this.digest())}catch(h){o=h}i(o)}update(i,o){if(!Buffer.isBuffer(i)&&typeof i!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(i)||(i=Buffer.from(i,o)),this._state.absorb(i),this}digest(i){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let o=this._state.squeeze(this._hashBitLength/8);return i!==void 0&&(o=o.toString(i)),this._resetState(),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const i=new Cn(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(i._state),i._finalized=this._finalized,i}}})),Cs=F(((e,a)=>{var{Transform:t}=kn();a.exports=r=>class In extends t{constructor(i,o,h,p){super(p),this._rate=i,this._capacity=o,this._delimitedSuffix=h,this._options=p,this._state=new r,this._state.initialize(i,o),this._finalized=!1}_transform(i,o,h){let p=null;try{this.update(i,o)}catch(d){p=d}h(p)}_flush(){}_read(i){this.push(this.squeeze(i))}update(i,o){if(!Buffer.isBuffer(i)&&typeof i!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(i)||(i=Buffer.from(i,o)),this._state.absorb(i),this}squeeze(i,o){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let h=this._state.squeeze(i);return o!==void 0&&(h=h.toString(o)),h}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const i=new In(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(i._state),i._finalized=this._finalized,i}}})),Is=F(((e,a)=>{var t=ks(),r=Cs();a.exports=function(n){const i=t(n),o=r(n);return function(h,p){switch(typeof h=="string"?h.toLowerCase():h){case"keccak224":return new i(1152,448,null,224,p);case"keccak256":return new i(1088,512,null,256,p);case"keccak384":return new i(832,768,null,384,p);case"keccak512":return new i(576,1024,null,512,p);case"sha3-224":return new i(1152,448,6,224,p);case"sha3-256":return new i(1088,512,6,256,p);case"sha3-384":return new i(832,768,6,384,p);case"sha3-512":return new i(576,1024,6,512,p);case"shake128":return new o(1344,256,31,p);case"shake256":return new o(1088,512,31,p);default:throw new Error("Invald algorithm: "+h)}}}})),As=F((e=>{var a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(let r=0;r<24;++r){const n=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],h=t[3]^t[13]^t[23]^t[33]^t[43],p=t[4]^t[14]^t[24]^t[34]^t[44],d=t[5]^t[15]^t[25]^t[35]^t[45],m=t[6]^t[16]^t[26]^t[3
26]^t[46],v=t[7]^t[17]^t[27]^t[37]^t[47],s=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let f=s^(o<<1|h>>>31),g=y^(h<<1|o>>>31);const w=t[0]^f,u=t[1]^g,l=t[10]^f,b=t[11]^g,M=t[20]^f,k=t[21]^g,P=t[30]^f,$=t[31]^g,B=t[40]^f,j=t[41]^g;f=n^(p<<1|d>>>31),g=i^(d<<1|p>>>31);const U=t[2]^f,Q=t[3]^g,Y=t[12]^f,K=t[13]^g,X=t[22]^f,I=t[23]^g,c=t[32]^f,_=t[33]^g,S=t[42]^f,R=t[43]^g;f=o^(m<<1|v>>>31),g=h^(v<<1|m>>>31);const C=t[4]^f,O=t[5]^g,D=t[14]^f,A=t[15]^g,E=t[24]^f,N=t[25]^g,z=t[34]^f,x=t[35]^g,q=t[44]^f,W=t[45]^g;f=p^(s<<1|y>>>31),g=d^(y<<1|s>>>31);const V=t[6]^f,G=t[7]^g,L=t[16]^f,T=t[17]^g,H=t[26]^f,J=t[27]^g,ee=t[36]^f,Z=t[37]^g,ne=t[46]^f,ie=t[47]^g;f=m^(n<<1|i>>>31),g=v^(i<<1|n>>>31);const se=t[8]^f,xe=t[9]^g,re=t[18]^f,te=t[19]^g,Oe=t[28]^f,ae=t[29]^g,le=t[38]^f,He=t[39]^g,ce=t[48]^f,Be=t[49]^g,mt=w,ue=u,he=b<<4|l>>>28,yt=l<<4|b>>>28,de=M<<3|k>>>29,fe=k<<3|M>>>29,_t=$<<9|P>>>23,pe=P<<9|$>>>23,ge=B<<18|j>>>14,bt=j<<18|B>>>14,ve=U<<1|Q>>>31,me=Q<<1|U>>>31,wt=K<<12|Y>>>20,ye=Y<<12|K>>>20,_e=X<<10|I>>>22,Et=I<<10|X>>>22,be=_<<13|c>>>19,we=c<<13|_>>>19,St=S<<2|R>>>30,Ee=R<<2|S>>>30,Se=O<<30|C>>>2,Rt=C<<30|O>>>2,Re=D<<6|A>>>26,Me=A<<6|D>>>26,Mt=N<<11|E>>>21,ke=E<<11|N>>>21,Ce=z<<15|x>>>17,kt=x<<15|z>>>17,Ie=W<<29|q>>>3,Ae=q<<29|W>>>3,Ct=V<<28|G>>>4,Te=G<<28|V>>>4,Ne=T<<23|L>>>9,It=L<<23|T>>>9,Le=H<<25|J>>>7,Pe=J<<25|H>>>7,Xe=ee<<21|Z>>>11,et=Z<<21|ee>>>11,tt=ie<<24|ne>>>8,rt=ne<<24|ie>>>8,nt=se<<27|xe>>>5,it=xe<<27|se>>>5,st=re<<20|te>>>12,at=te<<20|re>>>12,ot=ae<<7|Oe>>>25,lt=Oe<<7|ae>>>25,ct=le<<8|He>>>24,ut=He<<8|le>>>24,ht=ce<<14|Be>>>18,dt=Be<<14|ce>>>18;t[0]=mt^~wt&Mt,t[1]=ue^~ye&ke,t[10]=Ct^~st&de,t[11]=Te^~at&fe,t[20]=ve^~Re&Le,t[21]=me^~Me&Pe,t[30]=nt^~he&_e,t[31]=it^~yt&Et,t[40]=Se^~Ne&ot,t[41]=Rt^~It&lt,t[2]=wt^~Mt&Xe,t[3]=ye^~ke&et,t[12]=st^~de&be,t[13]=at^~fe&we,t[22]=Re^~Le&ct,t[23]=Me^~Pe&ut,t[32]=he^~_e&Ce,t[33]=yt^~Et&kt,t[42]=Ne^~ot&_t,t[43]=It^~lt&pe,t[4]=Mt^~Xe&ht,t[5]=ke^~et&dt,t[14]=de^~be&Ie,t[15]=fe^~we&Ae,t[24]=Le^~ct&ge,t[25]=Pe^~ut&bt,t[34]=_e^~Ce&tt,t[35]=Et^~kt&rt,t[44]=ot^~_t&St,t[45]=lt^~pe&Ee,t[6]=Xe^~ht&mt,t[7]=et^~dt&ue,t[16]=be^~Ie&Ct,t[17]=we^~Ae&Te,t[26]=ct^~ge&ve,t[27]=ut^~bt&me,t[36]=Ce^~tt&nt,t[37]=kt^~rt&it,t[46]=_t^~St&Se,t[47]=pe^~Ee&Rt,t[8]=ht^~mt&wt,t[9]=dt^~ue&ye,t[18]=Ie^~Ct&st,t[19]=Ae^~Te&at,t[28]=ge^~ve&Re,t[29]=bt^~me&Me,t[38]=tt^~nt&he,t[39]=rt^~it&yt,t[48]=St^~Se&Ne,t[49]=Ee^~Rt&It,t[0]^=a[r*2],t[1]^=a[r*2+1]}}})),Ts=F(((e,a)=>{var t=As();function r(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}r.prototype.initialize=function(n,i){for(let o=0;o<50;++o)this.state[o]=0;this.blockSize=n/8,this.count=0,this.squeezing=!1},r.prototype.absorb=function(n){for(let i=0;i<n.length;++i)this.state[~~(this.count/4)]^=n[i]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(t.p1600(this.state),this.count=0)},r.prototype.absorbLastFewBits=function(n){this.state[~~(this.count/4)]^=n<<8*(this.count%4),(n&128)!==0&&this.count===this.blockSize-1&&t.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),t.p1600(this.state),this.count=0,this.squeezing=!0},r.prototype.squeeze=function(n){this.squeezing||this.absorbLastFewBits(1);const i=Buffer.alloc(n);for(let o=0;o<n;++o)i[o]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(t.p1600(this.state),this.count=0);return i},r.prototype.copy=function(n){for(let i=0;i<50;++i)n.state[i]=this.state[i];n.blockSize=this.blockSize,n.count=this.count,n.squeezing=this.squeezing},a.exports=r})),Ns=F(((e,a)=>{a.exports=Is()(Ts())})),An=F(((e,a)=>{var t=Ns(),r=Kt();function n(y){return Buffer.allocUnsafe(y).fill(0)}function i(y,f,g){const w=n(f);return y=h(y),g?y.length<f?(y.copy(w),w):y.slice(0,f):y.length<f?(y.copy(w,f-y.length),w):y.slice(-f)}function o(y,f){return i(y,f,!0)}function h(y){if(!Buffer.isBuffer(y))if(Array.isArray(y))y=Buffer.from(y);else if(typeof y=="string")v(y)?y=Buffer.from(m(s(y)),"hex"):y=Buffer.from(y);else if(typeof y=="number")y=intToBuffer(y);else if(y==null)y=Buffer.allocUnsafe(0);else if(r.isBN(y))y=y.toArrayLike(Buffer);else if(y.toArray)y=Buffer.from(y.toArray());else throw new Error("invalid type");return y}function p(y){return y=h(y),"0x"+y.toString("hex")}function d(y,f){return y=h(y),f||(f=256),t("keccak"+f).update(y).digest()}function m(y){return y.length%2?"0"+y:y}function v(y){return typeof y=="string"&&y.match(/^0x[0-9A-Fa-f]*$/)}function s(y){return typeof y=="string"&&y.startsWith("0x")?y.slice(2):y}a.exports={zeros:n,setLength:i,setLengthRight:o,isHexString:v,stripHexPrefix:s,toBuffer:h,bufferToHex:p,keccak:d}})),Ls=F(((e,a)=>{var t=An(),r=Kt();function n(g){return g.startsWith("int[")?"int256"+g.slice(3):g==="int"?"int256":g.startsWith("uint[")?"uint256"+g.slice(4):g==="uint"?"uint256":g.startsWith("fixed[")?"fixed128x128"+g.slice(5):g==="fixed"?"fixed128x128":g.startsWith("ufixed[")?"ufixed128x128"+g.slice(6):g==="ufixed"?"ufixed128x128":g}function i(g){return parseInt(/^\D+(\d+)$/.exec(g)[1],10)}function o(g){var w=/^\D+(\d+)x(\d+)$/.exec(g);return[parseInt(w[1],10),parseInt(w[2],10)]}function h(g){var w=g.match(/(.*)\[(.*?)\]$/);return w?w[2]===""?"dynamic":parseInt(w[2],10):null}function p(g){var w=typeof g;if(w==="string")return t.isHexString(g)?new r(t.stripHexPrefix(g),16):new r(g,10);if(w==="number")return new r(g);if(g.toArray)return g;throw new Error("Argument is not a number")}function d(g,w){var u,l,b,M;if(g==="address")return d("uint160",p(w));if(g==="bool")return d("uint8",w?1:0);if(g==="string")return d("bytes",new Buffer(w,"utf8"));if(v(g)){if(typeof w.length>"u")throw new Error("Not an array?");if(u=h(g),u!=="dynamic"&&u!==0&&w.length>u)throw new Error("Elements exceed array size: "+u);b=[],g=g.slice(0,g.lastIndexOf("[")),typeof w=="string"&&(w=JSON.parse(w));for(M in w)b.push(d(g,w[M]));if(u==="dynamic"){var k=d("uint256",w.length);b.unshift(k)}return Buffer.concat(b)}else{if(g==="bytes")return w=new Buffer(w),b=Buffer.concat([d("uint256",w.length),w]),w.length%32!==0&&(b=Buffer.concat([b,t.zeros(32-w.length%32)])),b;if(g.startsWith("bytes")){if(u=i(g),u<1||u>32)throw new Error("Invalid bytes<N> width: "+u);return t.setLengthRight(w,32)}else if(g.startsWith("uint")){if(u=i(g),u%8||u<8||u>256)throw new Error("Invalid uint<N> width: "+u);if(l=p(w),l.bitLength()>u)throw new Error("Supplied uint exceeds width: "+u+" vs "+l.bitLength());if(l<0)throw new Error("Supplied uint is negative");return l.toArrayLike(Buffer,"be",32)}else if(g.startsWith("int")){if(u=i(g),u%8||u<8||u>256)throw new Error("Invalid int<N> width: "+u);if(l=p(w),l.bitLength()>u)throw new Error("Supplied int exceeds width: "+u+" vs "+l.bitLength());return l.toTwos(256).toArrayLike(Buffer,"be",32)}else if(g.startsWith("ufixed")){if(u=o(g),l=p(w),l<0)throw new Error("Supplied ufixed is negative");return d("uint256",l.mul(new r(2).pow(new r(u[1]))))}else if(g.startsWith("fixed"))return u=o(g),d("int256",p(w).mul(new r(2).pow(new r(u[1]))))}throw new Error("Unsupported or invalid type: "+g)}function m(g){return g==="string"||g==="bytes"||h(g)==="dynamic"}function v(g){return g.lastIndexOf("]")===g.length-1}function s(g,w){var u=[],l=[],b=32*g.length;for(var M in g){var k=n(g[M]),P=w[M],$=d(k,P);m(k)?(u.push(d("uint256",b)),l.push($),b+=$.length):u.push($)}return Buffer.concat(u.concat(l))}function y(g,w){if(g.length!==w.length)throw new Error("Number of types are not matching the values");for(var u,l,b=[],M=0;M<g.length;M++){var k=n(g[M]),P=w[M];if(k==="bytes")b.push(P);else if(k==="string")b.push(new Buffer(P,"utf8"));else if(k==="bool")b.push(new Buffer(P?"01":"00","hex"));else if(k==="address")b.push(t.setLength(P,20));else if(k.startsWith("bytes")){if(u=i(k),u<1||u>32)throw new Error("Invalid bytes<N> width: "+u);b.push(t.setLengthRight(P,u))}else if(k.startsWith("uint")){if(u=i(k),u%8||u<8||u>256)throw new Error("Invalid uint<N> width: "+u);if(l=p(P),l.bitLength()>u)throw new Error("Supplied uint exceeds width: "+u+" vs "+l.bitLength());b.push(l.toArrayLike(Buffer,"be",u/8))}else if(k.startsWith("int")){if(u=i(k),u%8||u<8||u>256)throw new Error("Invalid int<N> width: "+u);if(l=p(P),l.bitLength()>u)throw new Error("Supplied int exceeds width: "+u+" vs "+l.bitLength());b.push(l.toTwos(u).toArrayLike(Buffer,"be",u/8))}else throw new Error("Unsupported or invalid type: "+k)}return Buffer.concat(b)}function f(g,w){return t.keccak(y(g,w))}a.exports={rawEncode:s,solidityPack:y,soliditySHA3:f}})),Ps=F(((e,a)=>{var t=An(),r=Ls(),n={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},i={encodeData(h,p,d,m=!0){const v=["bytes32"],s=[this.hashType(h,d)];if(m){const y=(f,g,w)=>{if(d[g]!==void 0)return["bytes32",w==null?"0x0000000000000000000000000000000000000000000000000000000000000000":t.keccak(this.encodeData(g,w,d,m))];if(w===void 0)throw new Error(`missing value for field ${f} of type ${g}`);if(g==="bytes")return["bytes32",t.keccak(w)];if(g==="string")return typeof w=="string"&&(w=Buffer.from(w,"utf8")),["bytes32",t.keccak(w)];if(g.lastIndexOf("]")===g.length-1){const u=g.slice(0,g.lastIndexOf("[")),l=w.map(b=>y(f,u,b));return["bytes32",t.keccak(r.rawEncode(l.map(([b])=>b),l.map(([,b])=>b)))]}return[g,w]};for(const f of d[h]){const[g,w]=y(f.name,f.type,p[f.name]);v.push(g),s.push(w)}}else for(const y of d[h]){let f=p[y.name];if(f!==void 0)if(y.type==="bytes")v.push("bytes32"),f=t.keccak(f),s.push(f);else if(y.type==="string")v.push("bytes32"),typeof f=="string"&&(f=Buffer.from(f,"utf8")),f=t.keccak(f),s.push(f);else if(d[y.type]!==void 0)v.push("bytes32"),f=t.keccak(this.encodeData(y.type,f,d,m)),s.push(f);else{if(y.type.lastIndexOf("]")===y.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");v.push(y.type),s.push(f)}}return r.rawEncode(v,s)},encodeType(h,p){let d="",m=this.findTypeDependencies(h,p).filter(v=>v!==h);m=[h].concat(m.sort());for(const v of m){if(!p[v])throw new Error("No type definition specified: "+v);d+=v+"("+p[v].map(({name:s,type:y})=>y+" "+s).join(",")+")"}return d},findTypeDependencies(h,p,d=[]){if(h=h.match(/^\w*/)[0],d.includes(h)||p[h]===void 0)return d;d.push(h);for(const m of p[h])for(const v of this.findTypeDependencies(m.type,p,d))!d.includes(v)&&d.push(v);return d},hashStruct(h,p,d,m=!0){return t.keccak(this.encodeData(h,p,d,m))},hashType(h,p){return t.keccak(this.encodeType(h,p))},sanitizeData(h){const p={};for(const d in n.properties)h[d]&&(p[d]=h[d]);return p.types&&(p.types=Object.assign({EIP712Domain:[]},p.types)),p},hash(h,p=!0){const d=this.sanitizeData(h),m=[Buffer.from("1901","hex")];return m.push(this.hashStruct("EIP712Domain",d.domain,d.types,p)),d.primaryType!=="EIP712Domain"&&m.push(this.hashStruct(d.primaryType,d.message,d.types,p)),t.keccak(Buffer.concat(m))}};a.exports={TYPED_MESSAGE_SCHEMA:n,TypedDataUtils:i,hashForSignTypedDataLegacy:function(h){return o(h.data)},hashForSignTypedData_v3:function(h){return i.hash(h.data,!1)},hashForSignTypedData_v4:function(h){return i.hash(h.data)}};function o(h){const p=new Error("Expect argument to be non-empty array");if(typeof h!="object"||!h.length)throw p;const d=h.map(function(s){return s.type==="bytes"?t.toBuffer(s.value):s.value}),m=h.map(function(s){return s.type}),v=h.map(function(s){if(!s.name)throw p;return s.type+" "+s.name});return r.soliditySHA3(["bytes32","bytes32"],[r.soliditySHA3(new Array(h.length).fill("string"),v),r.soliditySHA3(m,d)])}})),Os=F((e=>
2{Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;var a=Xt(),t=Ze(),r=300*1e3,n={jsonrpc:"2.0",id:0},i=class{constructor(s){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,a.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=s}async newFilter(s){const y=o(s),f=this.makeFilterId(),g=await this.setInitialCursorPosition(f,y.fromBlock);return console.info(`Installing new log filter(${f}):`,y,"initial cursor position:",g),this.logFilters.set(f,y),this.setFilterTimeout(f),(0,t.hexStringFromIntNumber)(f)}async newBlockFilter(){const s=this.makeFilterId(),y=await this.setInitialCursorPosition(s,"latest");return console.info(`Installing new block filter (${s}) with initial cursor position:`,y),this.blockFilters.add(s),this.setFilterTimeout(s),(0,t.hexStringFromIntNumber)(s)}async newPendingTransactionFilter(){const s=this.makeFilterId(),y=await this.setInitialCursorPosition(s,"latest");return console.info(`Installing new block filter (${s}) with initial cursor position:`,y),this.pendingTransactionFilters.add(s),this.setFilterTimeout(s),(0,t.hexStringFromIntNumber)(s)}uninstallFilter(s){const y=(0,t.intNumberFromHexString)(s);return console.info(`Uninstalling filter (${y})`),this.deleteFilter(y),!0}getFilterChanges(s){const y=(0,t.intNumberFromHexString)(s);return this.timeouts.has(y)&&this.setFilterTimeout(y),this.logFilters.has(y)?this.getLogFilterChanges(y):this.blockFilters.has(y)?this.getBlockFilterChanges(y):this.pendingTransactionFilters.has(y)?this.getPendingTransactionFilterChanges(y):Promise.resolve(m())}async getFilterLogs(s){const y=(0,t.intNumberFromHexString)(s),f=this.logFilters.get(y);return f?this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[h(f)]})):m()}makeFilterId(){return(0,a.IntNumber)(++this.nextFilterId)}sendAsyncPromise(s){return new Promise((y,f)=>{this.provider.sendAsync(s,(g,w)=>{if(g)return f(g);if(Array.isArray(w)||w==null)return f(new Error(`unexpected response received: ${JSON.stringify(w)}`));y(w)})})}deleteFilter(s){console.info(`Deleting filter (${s})`),this.logFilters.delete(s),this.blockFilters.delete(s),this.pendingTransactionFilters.delete(s),this.cursors.delete(s),this.timeouts.delete(s)}async getLogFilterChanges(s){const y=this.logFilters.get(s),f=this.cursors.get(s);if(!f||!y)return m();const g=await this.getCurrentBlockHeight(),w=y.toBlock==="latest"?g:y.toBlock;if(f>g||f>Number(y.toBlock))return v();console.info(`Fetching logs from ${f} to ${w} for filter ${s}`);const u=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[h(Object.assign(Object.assign({},y),{fromBlock:f,toBlock:w}))]}));if(Array.isArray(u.result)){const l=u.result.map(M=>(0,t.intNumberFromHexString)(M.blockNumber||"0x0")),b=Math.max(...l);if(b&&b>f){const M=(0,a.IntNumber)(b+1);console.info(`Moving cursor position for filter (${s}) from ${f} to ${M}`),this.cursors.set(s,M)}}return u}async getBlockFilterChanges(s){const y=this.cursors.get(s);if(!y)return m();const f=await this.getCurrentBlockHeight();if(y>f)return v();console.info(`Fetching blocks from ${y} to ${f} for filter (${s})`);const g=(await Promise.all((0,t.range)(y,f+1).map(u=>this.getBlockHashByNumber((0,a.IntNumber)(u))))).filter(u=>!!u),w=(0,a.IntNumber)(y+g.length);return console.info(`Moving cursor position for filter (${s}) from ${y} to ${w}`),this.cursors.set(s,w),Object.assign(Object.assign({},n),{result:g})}async getPendingTransactionFilterChanges(s){return Promise.resolve(v())}async setInitialCursorPosition(s,y){const f=await this.getCurrentBlockHeight(),g=typeof y=="number"&&y>f?y:f;return this.cursors.set(s,g),g}setFilterTimeout(s){const y=this.timeouts.get(s);y&&window.clearTimeout(y);const f=window.setTimeout(()=>{console.info(`Filter (${s}) timed out`),this.deleteFilter(s)},r);this.timeouts.set(s,f)}async getCurrentBlockHeight(){const s=new Date;if(s.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=s;const y=await this._getCurrentBlockHeight();
2this.currentBlockHeight=y,this.resolvers.forEach(f=>f(y)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(y=>this.resolvers.push(y))}async _getCurrentBlockHeight(){const{result:s}=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_blockNumber",params:[]}));return(0,t.intNumberFromHexString)((0,t.ensureHexString)(s))}async getBlockHashByNumber(s){const y=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getBlockByNumber",params:[(0,t.hexStringFromIntNumber)(s),!1]}));return y.result&&typeof y.result.hash=="string"?(0,t.ensureHexString)(y.result.hash):null}};e.FilterPolyfill=i;function o(s){return{fromBlock:p(s.fromBlock),toBlock:p(s.toBlock),addresses:s.address===void 0?null:Array.isArray(s.address)?s.address:[s.address],topics:s.topics||[]}}e.filterFromParam=o;function h(s){const y={fromBlock:d(s.fromBlock),toBlock:d(s.toBlock),topics:s.topics};return s.addresses!==null&&(y.address=s.addresses),y}function p(s){if(s===void 0||s==="latest"||s==="pending")return"latest";if(s==="earliest")return(0,a.IntNumber)(0);if((0,t.isHexString)(s))return(0,t.intNumberFromHexString)(s);throw new Error(`Invalid block option: ${String(s)}`)}function d(s){return s==="latest"?s:(0,t.hexStringFromIntNumber)(s)}function m(){return Object.assign(Object.assign({},n),{error:{code:-32e3,message:"filter not found"}})}function v(){return Object.assign(Object.assign({},n),{result:[]})}})),Cr=F(((e,a)=>{a.exports=t;function t(r){r=r||{};var n=r.max||Number.MAX_SAFE_INTEGER,i=typeof r.start<"u"?r.start:Math.floor(Math.random()*n);return function(){return i=i%n,i++}}})),Bs=F(((e,a)=>{var t=(r,n)=>function(){const i=n.promiseModule,o=new Array(arguments.length);for(let h=0;h<arguments.length;h++)o[h]=arguments[h];return new i((h,p)=>{n.errorFirst?o.push(function(d,m){if(n.multiArgs){const v=new Array(arguments.length-1);for(let s=1;s<arguments.length;s++)v[s-1]=arguments[s];d?(v.unshift(d),p(v)):h(v)}else d?p(d):h(m)}):o.push(function(d){if(n.multiArgs){const m=new Array(arguments.length-1);for(let v=0;v<arguments.length;v++)m[v]=arguments[v];h(m)}else h(d)}),r.apply(this,o)})};a.exports=(r,n)=>{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},n);const i=h=>{const p=d=>typeof d=="string"?h===d:d.test(h);return n.include?n.include.some(p):!n.exclude.some(p)};let o;typeof r=="function"?o=function(){return n.excludeMain?r.apply(this,arguments):t(r,n).apply(this,arguments)}:o=Object.create(Object.getPrototypeOf(r));for(const h in r){const p=r[h];o[h]=typeof p=="function"&&i(h)?t(p,n):p}return o}})),Ir=zt({default:()=>Tn});function Gr(e,a,t){try{Reflect.apply(e,a,t)}catch(r){setTimeout(()=>{throw r})}}function Fs(e){const a=e.length,t=new Array(a);for(let r=0;r<a;r+=1)t[r]=e[r];return t}var Jr,Tn,Ar=Vt((()=>{Jr=Qn(Zt(),1),Tn=class extends Jr.EventEmitter{emit(e,...a){let t=e==="error";const r=this._events;if(r!==void 0)t=t&&r.error===void 0;else if(!t)return!1;if(t){let i;if(a.length>0&&([i]=a),i instanceof Error)throw i;const o=new Error(`Unhandled error.${i?` (${i.message})`:""}`);throw o.context=i,o}const n=r[e];if(n===void 0)return!1;if(typeof n=="function")Gr(n,this,a);else{const i=n.length,o=Fs(n);for(let h=0;h<i;h+=1)Gr(o[h],this,a)}return!0}}})),Nn=F((e=>{var a=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBlockTracker=void 0;var t=a((Ar(),oe(Ir))),r=1e3,n=(p,d)=>p+d,i=["sync","latest"],o=class extends t.default{constructor(p){super(),this._blockResetDuration=p.blockResetDuration||20*r,this._usePastBlocks=p.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(p=>this.once("latest",p))}removeAllListeners(p){return p?super.removeAllListeners(p):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(p){i.includes(p)&&this._maybeStart()}
2_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return i.map(p=>this.listenerCount(p)).reduce(n)}_shouldUseNewBlock(p){const d=this._currentBlock;if(!d)return!0;const m=h(p),v=h(d);return this._usePastBlocks&&m<v||m>v}_newPotentialLatest(p){this._shouldUseNewBlock(p)&&this._setCurrentBlock(p)}_setCurrentBlock(p){const d=this._currentBlock;this._currentBlock=p,this.emit("latest",p),this.emit("sync",{oldBlock:d,newBlock:p})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};e.BaseBlockTracker=o;function h(p){return Number.parseInt(p,16)}})),pt=zt({Struct:()=>Fe,StructError:()=>Or,any:()=>Js,array:()=>Zs,assert:()=>Ln,assign:()=>qs,bigint:()=>Ks,boolean:()=>Qs,coerce:()=>Pr,create:()=>Pn,date:()=>Ys,defaulted:()=>fa,define:()=>Ue,deprecated:()=>$s,dynamic:()=>Us,empty:()=>ga,enums:()=>Xs,func:()=>ea,instance:()=>ta,integer:()=>ra,intersection:()=>na,is:()=>Nr,lazy:()=>Hs,literal:()=>ia,map:()=>sa,mask:()=>On,max:()=>va,min:()=>ma,never:()=>Lr,nonempty:()=>ya,nullable:()=>aa,number:()=>oa,object:()=>qt,omit:()=>Ws,optional:()=>Bn,partial:()=>Vs,pattern:()=>_a,pick:()=>zs,record:()=>la,refine:()=>gt,regexp:()=>ca,set:()=>ua,size:()=>ba,string:()=>Fn,struct:()=>Gs,trimmed:()=>pa,tuple:()=>ha,type:()=>$t,union:()=>da,unknown:()=>Dn,validate:()=>Lt});function Ds(e){return We(e)&&typeof e[Symbol.iterator]=="function"}function We(e){return typeof e=="object"&&e!=null}function Zr(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const a=Object.getPrototypeOf(e);return a===null||a===Object.prototype}function De(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function xs(e){const{done:a,value:t}=e.next();return a?void 0:t}function js(e,a,t,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:n,branch:i}=a,{type:o}=t,{refinement:h,message:p=`Expected a value of type \`${o}\`${h?` with refinement \`${h}\``:""}, but received: \`${De(r)}\``}=e;return{value:r,type:o,refinement:h,key:n[n.length-1],path:n,branch:i,...e,message:p}}function*dr(e,a,t,r){Ds(e)||(e=[e]);for(const n of e){const i=js(n,a,t,r);i&&(yield i)}}function*Tr(e,a,t={}){const{path:r=[],branch:n=[e],coerce:i=!1,mask:o=!1}=t,h={path:r,branch:n};if(i&&(e=a.coercer(e,h),o&&a.type!=="type"&&We(a.schema)&&We(e)&&!Array.isArray(e)))for(const d in e)a.schema[d]===void 0&&delete e[d];let p="valid";for(const d of a.validator(e,h))d.explanation=t.message,p="not_valid",yield[d,void 0];for(let[d,m,v]of a.entries(e,h)){const s=Tr(m,v,{path:d===void 0?r:[...r,d],branch:d===void 0?n:[...n,m],coerce:i,mask:o,message:t.message});for(const y of s)y[0]?(p=y[0].refinement!=null?"not_refined":"not_valid",yield[y[0],void 0]):i&&(m=y[1],d===void 0?e=m:e instanceof Map?e.set(d,m):e instanceof Set?e.add(m):We(e)&&(m!==void 0||d in e)&&(e[d]=m))}if(p!=="not_valid")for(const d of a.refiner(e,h))d.explanation=t.message,p="not_refined",yield[d,void 0];p==="valid"&&(yield[void 0,e])}function Ln(e,a,t){const r=Lt(e,a,{message:t});if(r[0])throw r[0]}function Pn(e,a,t){const r=Lt(e,a,{coerce:!0,message:t});if(r[0])throw r[0];return r[1]}function On(e,a,t){const r=Lt(e,a,{coerce:!0,mask:!0,message:t});if(r[0])throw r[0];return r[1]}function Nr(e,a){return!Lt(e,a)[0]}function Lt(e,a,t={}){const r=Tr(e,a,t),n=xs(r);return n[0]?[new Or(n[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,n[1]]}function qs(...e){const a=e[0].type==="type",t=e.map(n=>n.schema),r=Object.assign({},...t);return a?$t(r):qt(r)}function Ue(e,a){return new Fe({type:e,schema:null,validator:a})}function $s(e,a){return new Fe({...e,refiner:(t,r)=>t===void 0||e.refiner(t,r),validator(t,r){return t===void 0?!0:(a(t,r),e.validator(t,r))}})}function Us(e){return new Fe({type:"dynamic",schema:null,*entries(a,t){yield*e(a,t).entries(a,t)},validator(a,t){return e(a,t).validator(a,t)}
2,coercer(a,t){return e(a,t).coercer(a,t)},refiner(a,t){return e(a,t).refiner(a,t)}})}function Hs(e){let a;return new Fe({type:"lazy",schema:null,*entries(t,r){a??(a=e()),yield*a.entries(t,r)},validator(t,r){return a??(a=e()),a.validator(t,r)},coercer(t,r){return a??(a=e()),a.coercer(t,r)},refiner(t,r){return a??(a=e()),a.refiner(t,r)}})}function Ws(e,a){const{schema:t}=e,r={...t};for(const n of a)delete r[n];return e.type==="type"?$t(r):qt(r)}function Vs(e){const a=e instanceof Fe,t=a?{...e.schema}:{...e};for(const r in t)t[r]=Bn(t[r]);return a&&e.type==="type"?$t(t):qt(t)}function zs(e,a){const{schema:t}=e,r={};for(const n of a)r[n]=t[n];return e.type==="type"?$t(r):qt(r)}function Gs(e,a){return console.warn("[email protected] - The `struct` helper has been renamed to `define`."),Ue(e,a)}function Js(){return Ue("any",()=>!0)}function Zs(e){return new Fe({type:"array",schema:e,*entries(a){if(e&&Array.isArray(a))for(const[t,r]of a.entries())yield[t,r,e]},coercer(a){return Array.isArray(a)?a.slice():a},validator(a){return Array.isArray(a)||`Expected an array value, but received: ${De(a)}`}})}function Ks(){return Ue("bigint",e=>typeof e=="bigint")}function Qs(){return Ue("boolean",e=>typeof e=="boolean")}function Ys(){return Ue("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${De(e)}`)}function Xs(e){const a={},t=e.map(r=>De(r)).join();for(const r of e)a[r]=r;return new Fe({type:"enums",schema:a,validator(r){return e.includes(r)||`E
2xpected one of \`${t}\`, but received: ${De(r)}`}})}function ea(){return Ue("func",e=>typeof e=="function"||`Expected a function, but received: ${De(e)}`)}function ta(e){return Ue("instance",a=>a instanceof e||`Expected a \`${e.name}\` instance, but received: ${De(a)}`)}function ra(){return Ue("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${De(e)}`)}function na(e){return new Fe({type:"intersection",schema:null,*entries(a,t){for(const r of e)yield*r.entries(a,t)},*validator(a,t){for(const r of e)yield*r.validator(a,t)},*refiner(a,t){for(const r of e)yield*r.refiner(a,t)}})}function ia(e){const a=De(e),t=typeof e;return new Fe({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?e:null,validator(r){return r===e||`Expected the literal \`${a}\`, but received: ${De(r)}`}})}function sa(e,a){return new Fe({type:"map",schema:null,*entries(t){if(e&&a&&t instanceof Map)for(const[r,n]of t.entries())yield[r,r,e],yield[r,n,a]},coercer(t){return t instanceof Map?new Map(t):t},validator(t){return t instanceof Map||`Expected a \`Map\` object, but received: ${De(t)}`}})}function Lr(){return Ue("never",()=>!1)}function aa(e){return new Fe({...e,validator:(a,t)=>a===null||e.validator(a,t),refiner:(a,t)=>a===null||e.refiner(a,t)})}function oa(){return Ue("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${De(e)}`)}function qt(e){const a=e?Object.keys(e):[],t=Lr();return new Fe({type:"object",schema:e||null,*entries(r){if(e&&We(r)){const n=new Set(Object.keys(r));for(const i of a)n.delete(i),yield[i,r[i],e[i]];for(const i of n)yield[i,r[i],t]}},validator(r){return We(r)||`Expected an object, but received: ${De(r)}`},coercer(r){return We(r)?{...r}:r}})}function Bn(e){return new Fe({...e,validator:(a,t)=>a===void 0||e.validator(a,t),refiner:(a,t)=>a===void 0||e.refiner(a,t)})}function la(e,a){return new Fe({type:"record",schema:null,*entries(t){if(We(t))for(const r in t){const n=t[r];yield[r,r,e],yield[r,n,a]}},validator(t){return We(t)||`Expected an object, but received: ${De(t)}`}})}function ca(){return Ue("regexp",e=>e instanceof RegExp)}function ua(e){return new Fe({type:"set",schema:null,*entries(a){if(e&&a instanceof Set)for(const t of a)yield[t,t,e]},coercer(a){return a instanceof Set?new Set(a):a},validator(a){return a instanceof Set||`Expected a \`Set\` object, but received: ${De(a)}`}})}function Fn(){return Ue("string",e=>typeof e=="string"||`Expected a string, but received: ${De(e)}`)}function ha(e){const a=Lr();return new Fe({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const r=Math.max(e.length,t.length);for(let n=0;n<r;n++)yield[n,t[n],e[n]||a]}},validator(t){return Array.isArray(t)||`Expected an array, but received: ${De(t)}`}})}function $t(e){const a=Object.keys(e);return new Fe({type:"type",schema:e,*entries(t){if(We(t))for(const r of a)yield[r,t[r],e[r]]},validator(t){return We(t)||`Expected an object, but received: ${De(t)}`},coercer(t){return We(t)?{...t}:t}})}function da(e){const a=e.map(t=>t.type).join(" | ");return new Fe({type:"union",schema:null,coercer(t){for(const r of e){const[n,i]=r.validate(t,{coerce:!0});if(!n)return i}return t},validator(t,r){const n=[];for(const i of e){const[...o]=Tr(t,i,r),[h]=o;if(h[0])for(const[p]of o)p&&n.push(p);else return[]}return[`Expected the value to satisfy a union of \`${a}\`, but received: ${De(t)}`,...n]}})}function Dn(){return Ue("unknown",()=>!0)}function Pr(e,a,t){return new Fe({...e,coercer:(r,n)=>Nr(r,a)?e.coercer(t(r,n),n):e.coercer(r,n)})}function fa(e,a,t={}){return Pr(e,Dn(),r=>{const n=typeof a=="function"?a():a;if(r===void 0)return n;if(!t.strict&&Zr(r)&&Zr(n)){const i={...r};let o=!1;for(const h in n)i[h]===void 0&&(i[h]=n[h],o=!0);if(o)return i}return r})}function pa(e){return Pr(e,Fn(),a=>a.trim())}function ga(e){return gt(e,"empty",a=>{const t=xn(a);return t===0||`Expected an empty ${e.type} but received one with a size of \`${t}\``})}function xn(e){return e instanceof Map||e instanceof Set?e.size:e.length}function va(e,a,t={}){const{exclusive:r}=t;return gt(e,"max",n=>r?n<a:n<=a||`Expected a ${e.type} less than ${r?"":"or equal to "}${a} but received \`${n}\``)}function ma(e,a,t={}){const{exclusive:r}=t;return gt(e,"min",n=>r?n>a:n>=a||`Expected a ${e.type} greater than ${r?"":"or equal to "}${a} but received \`${n}\``)}function ya(e){return gt(e,"nonempty",a=>xn(a)>0||`Expected a nonempty ${e.type} but received an empty one`)}function _a(e,a){return gt(e,"pattern",t=>a.test(t)||`Expected a ${e.type} matching \`/${a.source}/\` but received "${t}"`)}function ba(e,a,t=a){const r=`Expected a ${e.type}`,n=a===t?`of \`${a}\``:`between \`${a}\` and \`${t}\``;return gt(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return a<=i&&i<=t||`${r} ${n} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:o}=i;return a<=o&&o<=t||`${r}
2 with a size ${n} but received one with a size of \`${o}\``}else{const{length:o}=i;return a<=o&&o<=t||`${r} with a length ${n} but received one with a length of \`${o}\``}})}function gt(e,a,t){return new Fe({...e,*refiner(r,n){yield*e.refiner(r,n);const i=dr(t(r,n),n,e,r);for(const o of i)yield{...o,refinement:a}}})}var Or,Fe,vt=Vt((()=>{Or=class extends TypeError{constructor(e,a){let t;const{message:r,explanation:n,...i}=e,{path:o}=e,h=o.length===0?r:`At path: ${o.join(".")} -- ${r}`;super(n??h),n!=null&&(this.cause=h),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>t??(t=[e,...a()])}},Fe=class{constructor(e){const{type:a,schema:t,validator:r,refiner:n,coercer:i=h=>h,entries:o=function*(){}}=e;this.type=a,this.schema=t,this.entries=o,this.coercer=i,r?this.validator=(h,p)=>dr(r(h,p),p,this,h):this.validator=()=>[],n?this.refiner=(h,p)=>dr(n(h,p),p,this,h):this.refiner=()=>[]}assert(e,a){return Ln(e,this,a)}create(e,a){return Pn(e,this,a)}is(e){return Nr(e,this)}mask(e,a){return On(e,this,a)}validate(e,a={}){return Lt(e,this,a)}}})),Ye=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertExhaustive=e.assertStruct=e.assert=e.AssertionError=void 0;var a=(vt(),oe(pt));function t(m){return typeof m=="object"&&m!==null&&"message"in m}function r(m){var v,s;return typeof((s=(v=m?.prototype)===null||v===void 0?void 0:v.constructor)===null||s===void 0?void 0:s.name)=="string"}function n(m){const v=t(m)?m.message:String(m);return v.endsWith(".")?v.slice(0,-1):v}function i(m,v){return r(m)?new m({message:v}):m({message:v})}var o=class extends Error{constructor(m){super(m.message),this.code="ERR_ASSERTION"}};e.AssertionError=o;function h(m,v="Assertion failed.",s=o){if(!m)throw v instanceof Error?v:i(s,v)}e.assert=h;function p(m,v,s="Assertion failed",y=o){try{(0,a.assert)(m,v)}catch(f){throw i(y,`${s}: ${n(f)}.`)}}e.assertStruct=p;function d(m){throw new Error("Invalid branch reached. Should be detected during compilation.")}e.assertExhaustive=d})),jn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.base64=void 0;var a=(vt(),oe(pt)),t=Ye(),r=(n,i={})=>{var o,h;const p=(o=i.paddingRequired)!==null&&o!==void 0?o:!1,d=(h=i.characterSet)!==null&&h!==void 0?h:"base64";let m;d==="base64"?m=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(d==="base64url"),m=String.raw`[-_A-Za-z0-9]`);let v;return p?v=new RegExp(`^(?:${m}{4})*(?:${m}{3}=|${m}{2}==)?$`,"u"):v=new RegExp(`^(?:${m}{4})*(?:${m}{2,3}|${m}{3}=|${m}{2}==)?$`,"u"),(0,a.pattern)(n,v)};e.base64=r})),tr=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;var a=(vt(),oe(pt)),t=Ye();e.HexStruct=(0,a.pattern)((0,a.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,a.pattern)((0,a.string)(),/^0x[0-9a-f]+$/iu);function r(d){return(0,a.is)(d,e.HexStruct)}e.isHexString=r;function n(d){return(0,a.is)(d,e.StrictHexStruct)}e.isStrictHexString=n;function i(d){(0,t.assert)(r(d),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function o(d){(0,t.assert)(n(d),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function h(d){return d.startsWith("0x")?d:d.startsWith("0X")?`0x${d.substring(2)}`:`0x${d}`}e.add0x=h;function p(d){return d.startsWith("0x")||d.startsWith("0X")?d.substring(2):d}e.remove0x=p})),qn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDataView=e.concatBytes=e.valueToBytes=e.stringToBytes=e.numberToBytes=e.signedBigIntToBytes=e.bigIntToBytes=e.hexToBytes=e.bytesToString=e.bytesToNumber=e.bytesToSignedBigInt=e.bytesToBigInt=e.bytesToHex=e.assertIsBytes=e.isBytes=void 0;var a=Ye(),t=tr(),r=48,n=58,i=87;function o(){const B=[];return()=>{if(B.length===0)for(let j=0;j<256;j++)B.push(j.toString(16).padStart(2,"0"));return B}}var h=o();function p(B){return B instanceof Uint8Array}e.isBytes=p;function d(B){(0,a.assert)(p(B),"Value must be a Uint8Array.")}e.assertIsBytes=d;function m(B){if(d(B),B.length===0)return"0x";const j=h(),U=new Array(B.length);for(let Q=0;Q<B.length;Q++)U[Q]=j[B[Q]];return(0,t.add0x)(U.join(""))}e.bytesToHex=m;function v(B){d(B);const j=m(B);return BigInt(j)}e.bytesToBigInt=v;function s(B){d(B);let j=BigInt(0);for(const U of B)j=(j<<BigInt(8))+BigInt(U);return BigInt.asIntN(B.length*8,j)}e.bytesToSignedBigInt=s;function y(B){d(B);const j=v(B);return(0,a.assert)(j<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(j)}e.bytesToNumber=y;function f(B){return d(B),new TextDecoder().decode(B)}e.bytesToString=f;function g(B){var j;if(((j=B?.toLowerCase)===null||j===void 0?void 0:j.call(B))==="0x")return new Uint8Array;(0,t.assertIsHexString)(B);const U=(0,t.remove0x)(B).toLowerCase(),Q=U.length%2===0?U:`0${U}`,Y=new Uint8Array(Q.length/2);for(let K=0;K<Y.length;
2K++){const X=Q.charCodeAt(K*2),I=Q.charCodeAt(K*2+1),c=X-(X<n?r:i),_=I-(I<n?r:i);Y[K]=c*16+_}return Y}e.hexToBytes=g;function w(B){return(0,a.assert)(typeof B=="bigint","Value must be a bigint."),(0,a.assert)(B>=BigInt(0),"Value must be a non-negative bigint."),g(B.toString(16))}e.bigIntToBytes=w;function u(B,j){(0,a.assert)(j>0);const U=B>>BigInt(31);return!((~B&U)+(B&~U)>>BigInt(j*8+-1))}function l(B,j){(0,a.assert)(typeof B=="bigint","Value must be a bigint."),(0,a.assert)(typeof j=="number","Byte length must be a number."),(0,a.assert)(j>0,"Byte length must be greater than 0."),(0,a.assert)(u(B,j),"Byte length is too small to represent the given value.");let U=B;const Q=new Uint8Array(j);for(let Y=0;Y<Q.length;Y++)Q[Y]=Number(BigInt.asUintN(8,U)),U>>=BigInt(8);return Q.reverse()}e.signedBigIntToBytes=l;function b(B){return(0,a.assert)(typeof B=="number","Value must be a number."),(0,a.assert)(B>=0,"Value must be a non-negative number."),(0,a.assert)(Number.isSafeInteger(B),"Value is not a safe integer. Use `bigIntToBytes` instead."),g(B.toString(16))}e.numberToBytes=b;function M(B){return(0,a.assert)(typeof B=="string","Value must be a string."),new TextEncoder().encode(B)}e.stringToBytes=M;function k(B){if(typeof B=="bigint")return w(B);if(typeof B=="number")return b(B);if(typeof B=="string")return B.startsWith("0x")?g(B):M(B);if(p(B))return B;throw new TypeError(`Unsupported value type: "${typeof B}".`)}e.valueToBytes=k;function P(B){const j=new Array(B.length);let U=0;for(let Y=0;Y<B.length;Y++){const K=k(B[Y]);j[Y]=K,U+=K.length}const Q=new Uint8Array(U);for(let Y=0,K=0;Y<j.length;Y++)Q.set(j[Y],K),K+=j[Y].length;return Q}e.concatBytes=P;function $(B){if(typeof Buffer<"u"&&B instanceof Buffer){const j=B.buffer.slice(B.byteOffset,B.byteOffset+B.byteLength);return new DataView(j)}return new DataView(B.buffer,B.byteOffset,B.byteLength)}e.createDataView=$})),wa=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ChecksumStruct=void 0;var a=(vt(),oe(pt)),t=jn();e.ChecksumStruct=(0,a.size)((0,t.base64)((0,a.string)(),{paddingRequired:!0}),44,44)})),Ea=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createHex=e.createBytes=e.createBigInt=e.createNumber=void 0;var a=(vt(),oe(pt)),t=Ye(),r=qn(),n=tr(),i=(0,a.union)([(0,a.number)(),(0,a.bigint)(),(0,a.string)(),n.StrictHexStruct]),o=(0,a.coerce)((0,a.number)(),i,Number),h=(0,a.coerce)((0,a.bigint)(),i,BigInt);(0,a.union)([n.StrictHexStruct,(0,a.instance)(Uint8Array)]);var p=(0,a.coerce)((0,a.instance)(Uint8Array),(0,a.union)([n.StrictHexStruct]),r.hexToBytes),d=(0,a.coerce)(n.StrictHexStruct,(0,a.instance)(Uint8Array),r.bytesToHex);function m(f){try{const g=(0,a.create)(f,o);return(0,t.assert)(Number.isFinite(g),`Expected a number-like value, got "${f}".`),g}catch(g){throw g instanceof a.StructError?new Error(`Expected a number-like value, got "${f}".`):g}}e.createNumber=m;function v(f){try{return(0,a.create)(f,h)}catch(g){throw g instanceof a.StructError?new Error(`Expected a number-like value, got "${String(g.value)}".`):g}}e.createBigInt=v;function s(f){if(typeof f=="string"&&f.toLowerCase()==="0x")return new Uint8Array;try{return(0,a.create)(f,p)}catch(g){throw g instanceof a.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}}e.createBytes=s;function y(f){if(f instanceof Uint8Array&&f.length===0||typeof f=="string"&&f.toLowerCase()==="0x")return"0x";try{return(0,a.create)(f,d)}catch(g){throw g instanceof a.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}}e.createHex=y})),Sa=F((e=>{var a=e&&e.__classPrivateFieldSet||function(h,p,d,m,v){if(m==="m")throw new TypeError("Private method is not writable");if(m==="a"&&!v)throw new TypeError("Private accessor was defined without a setter");if(typeof p=="function"?h!==p||!v:!p.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return m==="a"?v.call(h,d):v?v.value=d:p.set(h,d),d},t=e&&e.__classPrivateFieldGet||function(h,p,d,m){if(d==="a"&&!m)throw new TypeError("Private accessor was defined without a getter");if(typeof p=="function"?h!==p||!m:!p.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return d==="m"?m:d==="a"?m.call(h):m?m.value:p.get(h)},r,n;
2Object.defineProperty(e,"__esModule",{value:!0}),e.FrozenSet=e.FrozenMap=void 0;var i=class{constructor(h){r.set(this,void 0),a(this,r,new Map(h),"f"),Object.freeze(this)}get size(){return t(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return t(this,r,"f")[Symbol.iterator]()}entries(){return t(this,r,"f").entries()}forEach(h,p){return t(this,r,"f").forEach((d,m,v)=>h.call(p,d,m,this))}get(h){return t(this,r,"f").get(h)}has(h){return t(this,r,"f").has(h)}keys(){return t(this,r,"f").keys()}values(){return t(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([h,p])=>`${String(h)} => ${String(p)}`).join(", ")} `:""}}`}};e.FrozenMap=i;var o=class{constructor(h){n.set(this,void 0),a(this,n,new Set(h),"f"),Object.freeze(this)}get size(){return t(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return t(this,n,"f")[Symbol.iterator]()}entries(){return t(this,n,"f").entries()}forEach(h,p){return t(this,n,"f").forEach((d,m,v)=>h.call(p,d,m,this))}has(h){return t(this,n,"f").has(h)}keys(){return t(this,n,"f").keys()}values(){return t(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(h=>String(h)).join(", ")} `:""}}`}};e.FrozenSet=o,Object.freeze(i),Object.freeze(i.prototype),Object.freeze(o),Object.freeze(o.prototype)})),Ra=F((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Ma=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;var a=(vt(),oe(pt)),t=Ye(),r=()=>(0,a.define)("finite number",k=>(0,a.is)(k,(0,a.number)())&&Number.isFinite(k));e.UnsafeJsonStruct=(0,a.union)([(0,a.literal)(null),(0,a.boolean)(),r(),(0,a.string)(),(0,a.array)((0,a.lazy)(()=>e.UnsafeJsonStruct)),(0,a.record)((0,a.string)(),(0,a.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,a.define)("Json",(k,P)=>{function $(B,j){const U=[...j.validator(B,P)];return U.length>0?U:!0}try{const B=$(k,e.UnsafeJsonStruct);return B!==!0?B:$(JSON.parse(JSON.stringify(k)),e.UnsafeJsonStruct)}catch(B){return B instanceof RangeError?"Circular reference detected":!1}});function n(k){return(0,a.is)(k,e.JsonStruct)}e.isValidJson=n;function i(k){(0,t.assertStruct)(k,e.JsonStruct,"Invalid JSON value");const P=JSON.stringify(k);return new TextEncoder().encode(P).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,a.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,a.nullable)((0,a.union)([(0,a.number)(),(0,a.string)()])),e.JsonRpcErrorStruct=(0,a.object)({code:(0,a.integer)(),message:(0,a.string)(),data:(0,a.optional)(e.JsonStruct),stack:(0,a.optional)((0,a.string)())}),e.JsonRpcParamsStruct=(0,a.optional)((0,a.union)([(0,a.record)((0,a.string)(),e.JsonStruct),(0,a.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,a.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,a.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,a.omit)(e.JsonRpcRequestStruct,["id"]);function o(k){return(0,a.is)(k,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=o;function h(k,P){(0,t.assertStruct)(k,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",P)}e.assertIsJsonRpcNotification=h;function p(k){return(0,a.is)(k,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=p;function d(k,P){(0,t.assertStruct)(k,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",P)}e.assertIsJsonRpcRequest=d,e.PendingJsonRpcResponseStruct=(0,a.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStru
2ct,result:(0,a.optional)((0,a.unknown)()),error:(0,a.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,a.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,a.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,a.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function m(k){return(0,a.is)(k,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=m;function v(k,P){(0,t.assertStruct)(k,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",P)}e.assertIsPendingJsonRpcResponse=v;function s(k){return(0,a.is)(k,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=s;function y(k,P){(0,t.assertStruct)(k,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",P)}e.assertIsJsonRpcResponse=y;function f(k){return(0,a.is)(k,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=f;function g(k,P){(0,t.assertStruct)(k,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",P)}e.assertIsJsonRpcSuccess=g;function w(k){return(0,a.is)(k,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=w;function u(k,P){(0,t.assertStruct)(k,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",P)}e.assertIsJsonRpcFailure=u;function l(k){return(0,a.is)(k,e.JsonRpcErrorStruct)}e.isJsonRpcError=l;function b(k,P){(0,t.assertStruct)(k,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",P)}e.assertIsJsonRpcError=b;function M(k){const{permitEmptyString:P,permitFractions:$,permitNull:B}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},k);return U=>!!(typeof U=="number"&&($||Number.isInteger(U))||typeof U=="string"&&(P||U.length>0)||B&&U===null)}e.getJsonRpcIdValidator=M})),ka=F((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Ca=F((e=>{var a=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.createProjectLogger=void 0;var t=(0,a(ri()).default)("metamask");function r(i){return t.extend(i)}e.createProjectLogger=r;function n(i,o){return i.extend(o)}e.createModuleLogger=n})),Ia=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function a(d){return Array.isArray(d)&&d.length>0}e.isNonEmptyArray=a;function t(d){return d==null}e.isNullOrUndefined=t;function r(d){return!!d&&typeof d=="object"&&!Array.isArray(d)}e.isObject=r;var n=(d,m)=>Object.hasOwnProperty.call(d,m);e.hasProperty=n,(function(d){d[d.Null=4]="Null",d[d.Comma=1]="Comma",d[d.Wrapper=1]="Wrapper",d[d.True=4]="True",d[d.False=5]="False",d[d.Quote=1]="Quote",d[d.Colon=1]="Colon",d[d.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(d){if(typeof d!="object"||d===null)return!1;try{let m=d;for(;Object.getPrototypeOf(m)!==null;)m=Object.getPrototypeOf(m);return Object.getPrototypeOf(d)===m}catch{return!1}}e.isPlainObject=i;function o(d){return d.charCodeAt(0)<=127}e.isASCII=o;function h(d){var m;return d.split("").reduce((v,s)=>o(s)?v+1:v+2,0)+((m=d.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&m!==void 0?m:[]).length}e.calculateStringSize=h;function p(d){return d.toString().length}e.calculateNumberSize=p})),Aa=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBigInt=e.hexToNumber=e.bigIntToHex=e.numberToHex=void 0;var a=Ye(),t=tr(),r=h=>((0,a.assert)(typeof h=="number","Value must be a number."),(0,a.assert)(h>=0,"Value must be a non-negative number."),(0,a.assert)(Number.isSafeInteger(h),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(h.toString(16)));e.numberToHex=r;var n=h=>((0,a.assert)(typeof h=="bigint","Value must be a bigint."),(0,a.assert)(h>=0,"Value must be a non-negative bigint."),(0,t.add0x)(h.toString(16)));e.bigIntToHex=n;var i=h=>{(0,t.assertIsHexString)(h);const p=parseInt(h,16);return(0,a.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `hexToBigInt` instead."),p};e.hexToNumber=i;var o=h=>((0,t.assertIsHexString)(h),BigInt((0,t.add0x)(h)));e.hexToBigInt=o})),Ta=F((e=>
2{Object.defineProperty(e,"__esModule",{value:!0})})),Na=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));var a=i=>Number.isInteger(i)&&i>=0,t=(i,o)=>{if(!a(i))throw new Error(`"${o}" must be a non-negative integer. Received: "${i}".`)};function r(i,o){return t(i,"count"),i*o}e.inMilliseconds=r;function n(i){return t(i,"timestamp"),Date.now()-i}e.timeSince=n})),La=F((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),rr=F(((e,a)=>{var t="2.0.0",r=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,o=r-6,h=["major","premajor","minor","preminor","patch","prepatch","prerelease"];a.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:h,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),nr=F(((e,a)=>{var t=typeof process=="object"&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};a.exports=t})),Ut=F(((e,a)=>{var{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:n}=rr(),i=nr();e=a.exports={};var o=e.re=[],h=e.safeRe=[],p=e.src=[],d=e.safeSrc=[],m=e.t={},v=0,s="[a-zA-Z0-9-]",y=[["\\s",1],["\\d",n],[s,r]],f=w=>{for(const[u,l]of y)w=w.split(`${u}*`).join(`${u}{0,${l}}`).split(`${u}+`).join(`${u}{1,${l}}`);return w},g=(w,u,l)=>{const b=f(u),M=v++;i(w,M,u),m[w]=M,p[M]=u,d[M]=b,o[M]=new RegExp(u,l?"g":void 0),h[M]=new RegExp(b,l?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${s}*`),g("MAINVERSION",`(${p[m.NUMERICIDENTIFIER]})\\.(${p[m.NUMERICIDENTIFIER]})\\.(${p[m.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${p[m.NUMERICIDENTIFIERLOOSE]})\\.(${p[m.NUMERICIDENTIFIERLOOSE]})\\.(${p[m.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${p[m.NONNUMERICIDENTIFIER]}|${p[m.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${p[m.NONNUMERICIDENTIFIER]}|${p[m.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${p[m.PRERELEASEIDENTIFIER]}(?:\\.${p[m.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${p[m.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[m.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${s}+`),g("BUILD",`(?:\\+(${p[m.BUILDIDENTIFIER]}(?:\\.${p[m.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${p[m.MAINVERSION]}${p[m.PRERELEASE]}?${p[m.BUILD]}?`),g("FULL",`^${p[m.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${p[m.MAINVERSIONLOOSE]}${p[m.PRERELEASELOOSE]}?${p[m.BUILD]}?`),g("LOOSE",`^${p[m.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${p[m.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${p[m.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${p[m.XRANGEIDENTIFIER]})(?:\\.(${p[m.XRANGEIDENTIFIER]})(?:\\.(${p[m.XRANGEIDENTIFIER]})(?:${p[m.PRERELEASE]})?${p[m.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${p[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[m.XRANGEIDENTIFIERLOOSE]})(?:${p[m.PRERELEASELOOSE]})?${p[m.BUILD]}?)?)?`),g("XRANGE",`^${p[m.GTLT]}\\s*${p[m.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${p[m.GTLT]}\\s*${p[m.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),g("COERCE",`${p[m.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",p[m.COERCEPLAIN]+`(?:${p[m.PRERELEASE]})?(?:${p[m.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",p[m.COERCE],!0),g("COERCERTLFULL",p[m.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${p[m.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${p[m.LONETILDE]}${p[m.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${p[m.LONETILDE]}${p[m.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${p[m.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${p[m.LONECARET]}${p[m.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${p[m.LONECARET]}${p[m.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${p[m.GTLT]}\\s*(${p[m.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${p[m.GTLT]}\\s*(${p[m.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${p[m.GTLT]}\\s*(${p[m.LOOSEPLAIN]}|${p[m.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${p[m.XRANGEPLAIN]})\\s+-\\s+(${p[m.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${p[m.XRANGEPLAINLOOSE]}
2)\\s+-\\s+(${p[m.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})),Br=F(((e,a)=>{var t=Object.freeze({loose:!0}),r=Object.freeze({}),n=i=>i?typeof i!="object"?t:i:r;a.exports=n})),$n=F(((e,a)=>{var t=/^[0-9]+$/,r=(i,o)=>{if(typeof i=="number"&&typeof o=="number")return i===o?0:i<o?-1:1;const h=t.test(i),p=t.test(o);return h&&p&&(i=+i,o=+o),i===o?0:h&&!p?-1:p&&!h?1:i<o?-1:1},n=(i,o)=>r(o,i);a.exports={compareIdentifiers:r,rcompareIdentifiers:n}})),je=F(((e,a)=>{var t=nr(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:n}=rr(),{safeRe:i,t:o}=Ut(),h=Br(),{compareIdentifiers:p}=$n(),d=class Je{constructor(v,s){if(s=h(s),v instanceof Je){if(v.loose===!!s.loose&&v.includePrerelease===!!s.includePrerelease)return v;v=v.version}else if(typeof v!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof v}".`);if(v.length>r)throw new TypeError(`version is longer than ${r} characters`);t("SemVer",v,s),this.options=s,this.loose=!!s.loose,this.includePrerelease=!!s.includePrerelease;const y=v.trim().match(s.loose?i[o.LOOSE]:i[o.FULL]);if(!y)throw new TypeError(`Invalid Version: ${v}`);if(this.raw=v,this.major=+y[1],this.minor=+y[2],this.patch=+y[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");y[4]?this.prerelease=y[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const g=+f;if(g>=0&&g<n)return g}return f}):this.prerelease=[],this.build=y[5]?y[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(v){if(t("SemVer.compare",this.version,this.options,v),!(v instanceof Je)){if(typeof v=="string"&&v===this.version)return 0;v=new Je(v,this.options)}return v.version===this.version?0:this.compareMain(v)||this.comparePre(v)}compareMain(v){return v instanceof Je||(v=new Je(v,this.options)),this.major<v.major?-1:this.major>v.major?1:this.minor<v.minor?-1:this.minor>v.minor?1:this.patch<v.patch?-1:this.patch>v.patch?1:0}comparePre(v){if(v instanceof Je||(v=new Je(v,this.options)),this.prerelease.length&&!v.prerelease.length)return-1;if(!this.prerelease.length&&v.prerelease.length)return 1;if(!this.prerelease.length&&!v.prerelease.length)return 0;let s=0;do{const y=this.prerelease[s],f=v.prerelease[s];if(t("prerelease compare",s,y,f),y===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(y===void 0)return-1;if(y===f)continue;return p(y,f)}while(++s)}compareBuild(v){v instanceof Je||(v=new Je(v,this.options));let s=0;do{const y=this.build[s],f=v.build[s];if(t("build compare",s,y,f),y===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(y===void 0)return-1;if(y===f)continue;return p(y,f)}while(++s)}inc(v,s,y){if(v.startsWith("pre")){if(!s&&y===!1)throw new Error("invalid increment argument: identifier is empty");if(s){const f=`-${s}`.match(this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]);if(!f||f[1]!==s)throw new Error(`invalid identifier: ${s}`)}}switch(v){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",s,y);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",s,y);break;case"prepatch":this.prerelease.length=0,this.inc("patch",s,y),this.inc("pre",s,y);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",s,y),this.inc("pre",s,y);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(y)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(s===this.prerelease.join(".")&&y===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(s){let g=[s,f];y===!1&&(g=[s]),p(this.prerelease[0],s)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${v}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};a.exports=d})),Pt=F(((e,a)=>{var t=je(),r=(n,i,o=!1)=>
2{if(n instanceof t)return n;try{return new t(n,i)}catch(h){if(!o)return null;throw h}};a.exports=r})),Pa=F(((e,a)=>{var t=Pt(),r=(n,i)=>{const o=t(n,i);return o?o.version:null};a.exports=r})),Oa=F(((e,a)=>{var t=Pt(),r=(n,i)=>{const o=t(n.trim().replace(/^[=v]+/,""),i);return o?o.version:null};a.exports=r})),Ba=F(((e,a)=>{var t=je(),r=(n,i,o,h,p)=>{typeof o=="string"&&(p=h,h=o,o=void 0);try{return new t(n instanceof t?n.version:n,o).inc(i,h,p).version}catch{return null}};a.exports=r})),Fa=F(((e,a)=>{var t=Pt(),r=(n,i)=>{const o=t(n,null,!0),h=t(i,null,!0),p=o.compare(h);if(p===0)return null;const d=p>0,m=d?o:h,v=d?h:o,s=!!m.prerelease.length;if(v.prerelease.length&&!s){if(!v.patch&&!v.minor)return"major";if(v.compareMain(m)===0)return v.minor&&!v.patch?"minor":"patch"}const y=s?"pre":"";return o.major!==h.major?y+"major":o.minor!==h.minor?y+"minor":o.patch!==h.patch?y+"patch":"prerelease"};a.exports=r})),Da=F(((e,a)=>{var t=je(),r=(n,i)=>new t(n,i).major;a.exports=r})),xa=F(((e,a)=>{var t=je(),r=(n,i)=>new t(n,i).minor;a.exports=r})),ja=F(((e,a)=>{var t=je(),r=(n,i)=>new t(n,i).patch;a.exports=r})),qa=F(((e,a)=>{var t=Pt(),r=(n,i)=>{const o=t(n,i);return o&&o.prerelease.length?o.prerelease:null};a.exports=r})),ze=F(((e,a)=>{var t=je(),r=(n,i,o)=>new t(n,o).compare(new t(i,o));a.exports=r})),$a=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(i,n,o);a.exports=r})),Ua=F(((e,a)=>{var t=ze(),r=(n,i)=>t(n,i,!0);a.exports=r})),Fr=F(((e,a)=>{var t=je(),r=(n,i,o)=>{const h=new t(n,o),p=new t(i,o);return h.compare(p)||h.compareBuild(p)};a.exports=r})),Ha=F(((e,a)=>{var t=Fr(),r=(n,i)=>n.sort((o,h)=>t(o,h,i));a.exports=r})),Wa=F(((e,a)=>{var t=Fr(),r=(n,i)=>n.sort((o,h)=>t(h,o,i));a.exports=r})),ir=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)>0;a.exports=r})),Dr=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)<0;a.exports=r})),Un=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)===0;a.exports=r})),Hn=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)!==0;a.exports=r})),xr=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)>=0;a.exports=r})),jr=F(((e,a)=>{var t=ze(),r=(n,i,o)=>t(n,i,o)<=0;a.exports=r})),Wn=F(((e,a)=>{var t=Un(),r=Hn(),n=ir(),i=xr(),o=Dr(),h=jr(),p=(d,m,v,s)=>{switch(m){case"===":return typeof d=="object"&&(d=d.version),typeof v=="object"&&(v=v.version),d===v;case"!==":return typeof d=="object"&&(d=d.version),typeof v=="object"&&(v=v.version),d!==v;case"":case"=":case"==":return t(d,v,s);case"!=":return r(d,v,s);case">":return n(d,v,s);case">=":return i(d,v,s);case"<":return o(d,v,s);case"<=":return h(d,v,s);default:throw new TypeError(`Invalid operator: ${m}`)}};a.exports=p})),Va=F(((e,a)=>{var t=je(),r=Pt(),{safeRe:n,t:i}=Ut(),o=(h,p)=>{if(h instanceof t)return h;if(typeof h=="number"&&(h=String(h)),typeof h!="string")return null;p=p||{};let d=null;if(!p.rtl)d=h.match(p.includePrerelease?n[i.COERCEFULL]:n[i.COERCE]);else{const v=p.includePrerelease?n[i.COERCERTLFULL]:n[i.COERCERTL];let s;for(;(s=v.exec(h))&&(!d||d.index+d[0].length!==h.length);)(!d||s.index+s[0].length!==d.index+d[0].length)&&(d=s),v.lastIndex=s.index+s[1].length+s[2].length;v.lastIndex=-1}if(d===null)return null;const m=d[2];return r(`${m}.${d[3]||"0"}.${d[4]||"0"}${p.includePrerelease&&d[5]?`-${d[5]}`:""}${p.includePrerelease&&d[6]?`+${d[6]}`:""}`,p)};a.exports=o})),za=F(((e,a)=>{var t=class{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(r,n)}return this}};a.exports=t})),Ge=F(((e,a)=>{var t=/\s+/g,r=class Wt{constructor(c,_){if(_=i(_),c instanceof Wt)return c.loose===!!_.loose&&c.includePrerelease===!!_.includePrerelease?c:new Wt(c.raw,_);if(c instanceof o)return this.raw=c.value,this.set=[[c]],this.formatted=void 0,this;if(this.options=_,this.loose=!!_.loose,this.includePrerelease=!!_.includePrerelease,this.raw=c.trim().replace(t," "),this.set=this.raw.split("||").map(S=>this.parseRange(S.trim())).filter(S=>S.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
vendor: 5,455 bytes, line 2
2if(this.set.length>1){const S=this.set[0];if(this.set=this.set.filter(R=>!w(R[0])),this.set.length===0)this.set=[S];else if(this.set.length>1){for(const R of this.set)if(R.length===1&&u(R[0])){this.set=[R];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let c=0;c<this.set.length;c++){c>0&&(this.formatted+="||");const _=this.set[c];for(let S=0;S<_.length;S++)S>0&&(this.formatted+=" "),this.formatted+=_[S].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(c){const _=((this.options.includePrerelease&&f)|(this.options.loose&&g))+":"+c,S=n.get(_);if(S)return S;const R=this.options.loose,C=R?d[m.HYPHENRANGELOOSE]:d[m.HYPHENRANGE];c=c.replace(C,K(this.options.includePrerelease)),h("hyphen replace",c),c=c.replace(d[m.COMPARATORTRIM],v),h("comparator trim",c),c=c.replace(d[m.TILDETRIM],s),h("tilde trim",c),c=c.replace(d[m.CARETTRIM],y),h("caret trim",c);let O=c.split(" ").map(N=>b(N,this.options)).join(" ").split(/\s+/).map(N=>Y(N,this.options));R&&(O=O.filter(N=>(h("loose invalid filter",N,this.options),!!N.match(d[m.COMPARATORLOOSE])))),h("range list",O);const D=new Map,A=O.map(N=>new o(N,this.options));for(const N of A){if(w(N))return[N];D.set(N.value,N)}D.size>1&&D.has("")&&D.delete("");const E=[...D.values()];return n.set(_,E),E}intersects(c,_){if(!(c instanceof Wt))throw new TypeError("a Range is required");return this.set.some(S=>l(S,_)&&c.set.some(R=>l(R,_)&&S.every(C=>R.every(O=>C.intersects(O,_)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new p(c,this.options)}catch{return!1}for(let _=0;_<this.set.length;_++)if(X(this.set[_],c,this.options))return!0;return!1}};a.exports=r;var n=new(za()),i=Br(),o=sr(),h=nr(),p=je(),{safeRe:d,t:m,comparatorTrimReplace:v,tildeTrimReplace:s,caretTrimReplace:y}=Ut(),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:g}=rr(),w=I=>I.value==="<0.0.0-0",u=I=>I.value==="",l=(I,c)=>{let _=!0;const S=I.slice();let R=S.pop();for(;_&&S.length;)_=S.every(C=>R.intersects(C,c)),R=S.pop();return _},b=(I,c)=>(I=I.replace(d[m.BUILD],""),h("comp",I,c),I=$(I,c),h("caret",I),I=k(I,c),h("tildes",I),I=j(I,c),h("xrange",I),I=Q(I,c),h("stars",I),I),M=I=>!I||I.toLowerCase()==="x"||I==="*",k=(I,c)=>I.trim().split(/\s+/).map(_=>P(_,c)).join(" "),P=(I,c)=>{const _=c.loose?d[m.TILDELOOSE]:d[m.TILDE];return I.replace(_,(S,R,C,O,D)=>{h("tilde",I,S,R,C,O,D);let A;return M(R)?A="":M(C)?A=`>=${R}.0.0 <${+R+1}.0.0-0`:M(O)?A=`>=${R}.${C}.0 <${R}.${+C+1}.0-0`:D?(h("replaceTilde pr",D),A=`>=${R}.${C}.${O}-${D} <${R}.${+C+1}.0-0`):A=`>=${R}.${C}.${O} <${R}.${+C+1}.0-0`,h("tilde return",A),A})},$=(I,c)=>I.trim().split(/\s+/).map(_=>B(_,c)).join(" "),B=(I,c)=>{h("caret",I,c);const _=c.loose?d[m.CARETLOOSE]:d[m.CARET],S=c.includePrerelease?"-0":"";return I.replace(_,(R,C,O,D,A)=>{h("caret",I,R,C,O,D,A);let E;return M(C)?E="":M(O)?E=`>=${C}.0.0${S} <${+C+1}.0.0-0`:M(D)?C==="0"?E=`>=${C}.${O}.0${S} <${C}.${+O+1}.0-0`:E=`>=${C}.${O}.0${S} <${+C+1}.0.0-0`:A?(h("replaceCaret pr",A),C==="0"?O==="0"?E=`>=${C}.${O}.${D}-${A} <${C}.${O}.${+D+1}-0`:E=`>=${C}.${O}.${D}-${A} <${C}.${+O+1}.0-0`:E=`>=${C}.${O}.${D}-${A} <${+C+1}.0.0-0`):(h("no pr"),C==="0"?O==="0"?E=`>=${C}.${O}.${D}${S} <${C}.${O}.${+D+1}-0`:E=`>=${C}.${O}.${D}${S} <${C}.${+O+1}.0-0`:E=`>=${C}.${O}.${D} <${+C+1}.0.0-0`),h("caret return",E),E})},j=(I,c)=>(h("replaceXRanges",I,c),I.split(/\s+/).map(_=>U(_,c)).join(" ")),U=(I,c)=>{I=I.trim();const _=c.loose?d[m.XRANGELOOSE]:d[m.XRANGE];return I.replace(_,(S,R,C,O,D,A)=>{h("xRange",I,S,R,C,O,D,A);const E=M(C),N=E||M(O),z=N||M(D),x=z;return R==="="&&x&&(R=""),A=c.includePrerelease?"-0":"",E?R===">"||R==="<"?S="<0.0.0-0":S="*":R&&x?(N&&(O=0),D=0,R===">"?(R=">=",N?(C=+C+1,O=0,D=0):(O=+O+1,D=0)):R==="<="&&(R="<",N?C=+C+1:O=+O+1),R==="<"&&(A="-0"),S=`${R+C}.${O}.${D}${A}`):N?S=`>=${C}.0.0${A} <${+C+1}.0.0-0`:z&&(S=`>=${C}.${O}.0${A} <${C}.${+O+1}.0-0`),h("xRange return",S),S})},Q=(I,c)=>(h("replaceStars",I,c),I.trim().replace(d[m.STAR],"")),Y=(I,c)=>(h("replaceGTE0",I,c),I.trim().replace(d[c.includePrerelease?m.GTE0PRE:m.GTE0],"")),K=I=>(c,_,S,R,C,O,D,A,E,N,z,x)=>(M(S)?_="":M(R)?_=`>=${S}.0.0${I?"-0":""}`:M(C)?_=`>=${S}.${R}.0${I?"-0":""}`:O?_=`>=${_}`:_=`>=${_}${I?"-0":""}`,M(E)?A="":M(N)?A=`<${+E+1}.0.0-0`:M(z)?A=`<${E}.${+N+1}.0-0`:x?A=`<=${E}.${N}.${z}-${x}`:I?A=`<${E}.${N}.${+z+1}-0`:A=`<=${A}`,`${_} ${A}`.trim()),X=(I,c,_)=>{for(let S=0;S<I.length;S++)if(!I[S].test(c))return!1;if(c.prerelease.length&&!_.includePrerelease){for(let S=0;S<I.length;S++)if(h(I[S].semver),I[S].semver!==o.ANY&&I[S].semver.prerelease.length>0){const R=I[S].semver;if(R.major===c.major&&R.minor===c.minor&&R.patch===c.patch)return!0}return!1}return!0}})),sr=F(((e,a)=>{var t=Symbol("SemVer ANY"),r=class fr{static get ANY(){return t}constructor(s,y){if(y=n(y),s instanceof fr){if(s.loose===!!y.loose)return s;s=s.value}s=s.trim().split(/\s+/).join(" "),p("comparator",s,y),this.options=y,this.loose=!!y.loose,this.parse(s),this.semver===t?this.value="":this.value=this.operator+this.semver.version,p("comp",this)}parse(s){const y=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],f=s.match(y);if(!f)throw new TypeError(`Invalid comparator: ${s}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new d(f[2],this.options.loose):this.semver=t}toString(){return this.value}test(s){if(p("Comparator.test",s,this.options.loose),this.semver===t||s===t)return!0;
vendor: 6,020 bytes, line 2
2if(typeof s=="string")try{s=new d(s,this.options)}catch{return!1}return h(s,this.operator,this.semver,this.options)}intersects(s,y){if(!(s instanceof fr))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new m(s.value,y).test(this.value):s.operator===""?s.value===""?!0:new m(this.value,y).test(s.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||s.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||s.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&s.operator.startsWith(">")||this.operator.startsWith("<")&&s.operator.startsWith("<")||this.semver.version===s.semver.version&&this.operator.includes("=")&&s.operator.includes("=")||h(this.semver,"<",s.semver,y)&&this.operator.startsWith(">")&&s.operator.startsWith("<")||h(this.semver,">",s.semver,y)&&this.operator.startsWith("<")&&s.operator.startsWith(">")))}};a.exports=r;var n=Br(),{safeRe:i,t:o}=Ut(),h=Wn(),p=nr(),d=je(),m=Ge()})),ar=F(((e,a)=>{var t=Ge(),r=(n,i,o)=>{try{i=new t(i,o)}catch{return!1}return i.test(n)};a.exports=r})),Ga=F(((e,a)=>{var t=Ge(),r=(n,i)=>new t(n,i).set.map(o=>o.map(h=>h.value).join(" ").trim().split(" "));a.exports=r})),Ja=F(((e,a)=>{var t=je(),r=Ge(),n=(i,o,h)=>{let p=null,d=null,m=null;try{m=new r(o,h)}catch{return null}return i.forEach(v=>{m.test(v)&&(!p||d.compare(v)===-1)&&(p=v,d=new t(p,h))}),p};a.exports=n})),Za=F(((e,a)=>{var t=je(),r=Ge(),n=(i,o,h)=>{let p=null,d=null,m=null;try{m=new r(o,h)}catch{return null}return i.forEach(v=>{m.test(v)&&(!p||d.compare(v)===1)&&(p=v,d=new t(p,h))}),p};a.exports=n})),Ka=F(((e,a)=>{var t=je(),r=Ge(),n=ir(),i=(o,h)=>{o=new r(o,h);let p=new t("0.0.0");if(o.test(p)||(p=new t("0.0.0-0"),o.test(p)))return p;p=null;for(let d=0;d<o.set.length;++d){const m=o.set[d];let v=null;m.forEach(s=>{const y=new t(s.semver.version);switch(s.operator){case">":y.prerelease.length===0?y.patch++:y.prerelease.push(0),y.raw=y.format();case"":case">=":(!v||n(y,v))&&(v=y);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),v&&(!p||n(p,v))&&(p=v)}return p&&o.test(p)?p:null};a.exports=i})),Qa=F(((e,a)=>{var t=Ge(),r=(n,i)=>{try{return new t(n,i).range||"*"}catch{return null}};a.exports=r})),qr=F(((e,a)=>{var t=je(),r=sr(),{ANY:n}=r,i=Ge(),o=ar(),h=ir(),p=Dr(),d=jr(),m=xr(),v=(s,y,f,g)=>{s=new t(s,g),y=new i(y,g);let w,u,l,b,M;switch(f){case">":w=h,u=d,l=p,b=">",M=">=";break;case"<":w=p,u=m,l=h,b="<",M="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(s,y,g))return!1;for(let k=0;k<y.set.length;++k){const P=y.set[k];let $=null,B=null;if(P.forEach(j=>{j.semver===n&&(j=new r(">=0.0.0")),$=$||j,B=B||j,w(j.semver,$.semver,g)?$=j:l(j.semver,B.semver,g)&&(B=j)}),$.operator===b||$.operator===M||(!B.operator||B.operator===b)&&u(s,B.semver))return!1;if(B.operator===M&&l(s,B.semver))return!1}return!0};a.exports=v})),Ya=F(((e,a)=>{var t=qr(),r=(n,i,o)=>t(n,i,">",o);a.exports=r})),Xa=F(((e,a)=>{var t=qr(),r=(n,i,o)=>t(n,i,"<",o);a.exports=r})),eo=F(((e,a)=>{var t=Ge(),r=(n,i,o)=>(n=new t(n,o),i=new t(i,o),n.intersects(i,o));a.exports=r})),to=F(((e,a)=>{var t=ar(),r=ze();a.exports=(n,i,o)=>{const h=[];let p=null,d=null;const m=n.sort((f,g)=>r(f,g,o));for(const f of m)t(f,i,o)?(d=f,p||(p=f)):(d&&h.push([p,d]),d=null,p=null);p&&h.push([p,null]);const v=[];for(const[f,g]of h)f===g?v.push(f):!g&&f===m[0]?v.push("*"):g?f===m[0]?v.push(`<=${g}`):v.push(`${f} - ${g}`):v.push(`>=${f}`);const s=v.join(" || "),y=typeof i.raw=="string"?i.raw:String(i);return s.length<y.length?s:i}})),ro=F(((e,a)=>{var t=Ge(),r=sr(),{ANY:n}=r,i=ar(),o=ze(),h=(y,f,g={})=>{if(y===f)return!0;y=new t(y,g),f=new t(f,g);let w=!1;e:for(const u of y.set){for(const l of f.set){const b=m(u,l,g);if(w=w||b!==null,b)continue e}if(w)return!1}return!0},p=[new r(">=0.0.0-0")],d=[new r(">=0.0.0")],m=(y,f,g)=>{if(y===f)return!0;if(y.length===1&&y[0].semver===n){if(f.length===1&&f[0].semver===n)return!0;g.includePrerelease?y=p:y=d}if(f.length===1&&f[0].semver===n){if(g.includePrerelease)return!0;f=d}const w=new Set;let u,l;for(const U of y)U.operator===">"||U.operator===">="?u=v(u,U,g):U.operator==="<"||U.operator==="<="?l=s(l,U,g):w.add(U.semver);if(w.size>1)return null;let b;if(u&&l){if(b=o(u.semver,l.semver,g),b>0)return null;if(b===0&&(u.operator!==">="||l.operator!=="<="))return null}for(const U of w){if(u&&!i(U,String(u),g)||l&&!i(U,String(l),g))return null;for(const Q of f)if(!i(U,String(Q),g))return!1;return!0}let M,k,P,$,B=l&&!g.includePrerelease&&l.semver.prerelease.length?l.semver:!1,j=u&&!g.includePrerelease&&u.semver.prerelease.length?u.semver:!1;B&&B.prerelease.length===1&&l.operator==="<"&&B.prerelease[0]===0&&(B=!1);for(const U of f){if($=$||U.operator===">"||U.operator===">=",P=P||U.operator==="<"||U.operator==="<=",u){if(j&&U.semver.prerelease&&U.semver.prerelease.length&&U.semver.major===j.major&&U.semver.minor===j.minor&&U.semver.patch===j.patch&&(j=!1),U.operator===">"||U.operator===">="){if(M=v(u,U,g),M===U&&M!==u)return!1}else if(u.operator===">="&&!i(u.semver,String(U),g))return!1}if(l){if(B&&U.semver.prerelease&&U.semver.prerelease.length&&U.semver.major===B.major&&U.semver.minor===B.minor&&U.semver.patch===B.patch&&(B=!1),U.operator==="<"||U.operator==="<="){if(k=s(l,U,g),k===U&&k!==l)return!1}else if(l.operator==="<="&&!i(l.semver,String(U),g))return!1}if(!U.operator&&(l||u)&&b!==0)return!1}return!(u&&P&&!l&&b!==0||l&&$&&!u&&b!==0||j||B)},v=(y,f,g)=>{if(!y)return f;const w=o(y.semver,f.semver,g);return w>0?y:w<0||f.operator===">"&&y.operator===">="?f:y},s=(y,f,g)=>{if(!y)return f;const w=o(y.semver,f.semver,g);return w<0?y:w>0||f.operator==="<"&&y.operator==="<="?f:y};a.exports=h})),no=F(((e,a)=>{var t=Ut(),r=rr(),n=je(),i=$n(),o=Pt(),h=Pa(),p=Oa(),d=Ba(),m=Fa(),v=Da(),s=xa(),y=ja(),f=qa(),g=ze(),w=$a(),u=Ua(),l=Fr(),b=Ha(),M=Wa(),k=ir(),P=Dr(),$=Un(),B=Hn(),j=xr(),U=jr(),Q=Wn(),Y=Va(),K=sr(),X=Ge(),I=ar(),c=Ga(),_=Ja(),S=Za(),R=Ka(),C=Qa(),O=qr(),D=Ya(),A=Xa(),E=eo(),N=to(),z=ro();
2a.exports={parse:o,valid:h,clean:p,inc:d,diff:m,major:v,minor:s,patch:y,prerelease:f,compare:g,rcompare:w,compareLoose:u,compareBuild:l,sort:b,rsort:M,gt:k,lt:P,eq:$,neq:B,gte:j,lte:U,cmp:Q,coerce:Y,Comparator:K,Range:X,satisfies:I,toComparators:c,maxSatisfying:_,minSatisfying:S,minVersion:R,validRange:C,outside:O,gtr:D,ltr:A,intersects:E,simplifyRange:N,subset:z,SemVer:n,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}})),io=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;var a=no(),t=(vt(),oe(pt)),r=Ye();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",v=>(0,a.valid)(v)===null?`Expected SemVer version, got "${v}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",v=>(0,a.validRange)(v)===null?`Expected SemVer range, got "${v}"`:!0);function n(v){return(0,t.is)(v,e.VersionStruct)}e.isValidSemVerVersion=n;function i(v){return(0,t.is)(v,e.VersionRangeStruct)}e.isValidSemVerRange=i;function o(v){(0,r.assertStruct)(v,e.VersionStruct)}e.assertIsSemVerVersion=o;function h(v){(0,r.assertStruct)(v,e.VersionRangeStruct)}e.assertIsSemVerRange=h;function p(v,s){return(0,a.gt)(v,s)}e.gtVersion=p;function d(v,s){return(0,a.gtr)(v,s)}e.gtRange=d;function m(v,s){return(0,a.satisfies)(v,s,{includePrerelease:!0})}e.satisfiesVersionRange=m})),so=F((e=>{var a=e&&e.__createBinding||(Object.create?(function(r,n,i,o){o===void 0&&(o=i);var h=Object.getOwnPropertyDescriptor(n,i);(!h||("get"in h?!n.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,o,h)}):(function(r,n,i,o){o===void 0&&(o=i),r[o]=n[i]})),t=e&&e.__exportStar||function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&a(n,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),t(Ye(),e),t(jn(),e),t(qn(),e),t(wa(),e),t(Ea(),e),t(Sa(),e),t(Ra(),e),t(tr(),e),t(Ma(),e),t(ka(),e),t(Ca(),e),t(Ia(),e),t(Aa(),e),t(Ta(),e),t(Na(),e),t(La(),e),t(io(),e)})),ao=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;var a=so();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return a.createModuleLogger}}),e.projectLogger=(0,a.createProjectLogger)("eth-block-tracker")})),oo=F((e=>{var a=e&&e.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.PollingBlockTracker=void 0;var t=a(Cr()),r=a(Bs()),n=Nn(),i=ao(),o=(0,i.createModuleLogger)(i.projectLogger,"polling-block-tracker"),h=(0,t.default)(),p=1e3,d=class extends n.BaseBlockTracker{constructor(v={}){var s;if(!v.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},v),{blockResetDuration:(s=v.blockResetDuration)!==null&&s!==void 0?s:v.pollingInterval})),this._provider=v.provider,this._pollingInterval=v.pollingInterval||20*p,this._retryTimeout=v.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=v.keepEventLoopActive===void 0?!0:v.keepEventLoopActive,this._setSkipCacheFlag=v.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var v;this._isRunning;)try{await this._updateLatestBlock();const s=m(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await s}catch(s){const y=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3${(v=s.stack)!==null&&v!==void 0?v:s}`);try{this.emit("error",y)}catch{console.error(y)}const f=m(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await f}}async _updateLatestBlock(){const v=await this._fetchLatestBlock();this._newPotentialLatest(v)}async _fetchLatestBlock(){const v={jsonrpc:"2.0",id:h(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(v.skipCache=!0),o("Making request",v);const s=await(0,r.default)(y=>this._provider.sendAsync(v,y))();if(o("Got response",s),s.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4${s.error.message}`);return s.result}};e.PollingBlockTracker=d;function m(v,s){return new Promise(y=>{const f=setTimeout(y,v);f.unref&&s&&f.unref()})}})),lo=F((e=>{var a=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};
4Object.defineProperty(e,"__esModule",{value:!0}),e.SubscribeBlockTracker=void 0;var t=a(Cr()),r=Nn(),n=(0,t.default)(),i=class extends r.BaseBlockTracker{constructor(o={}){if(!o.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(o),this._provider=o.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const o=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(o)}catch(o){this.emit("error",o)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(o){this.emit("error",o)}}_call(o,...h){return new Promise((p,d)=>{this._provider.sendAsync({id:n(),method:o,params:h,jsonrpc:"2.0"},(m,v)=>{m?d(m):p(v.result)})})}_handleSubData(o,h){var p;h.method==="eth_subscription"&&((p=h.params)===null||p===void 0?void 0:p.subscription)===this._subscriptionId&&this._newPotentialLatest(h.params.result.number)}};e.SubscribeBlockTracker=i})),co=F((e=>{var a=e&&e.__createBinding||(Object.create?(function(r,n,i,o){o===void 0&&(o=i),Object.defineProperty(r,o,{enumerable:!0,get:function(){return n[i]}})}):(function(r,n,i,o){o===void 0&&(o=i),r[o]=n[i]})),t=e&&e.__exportStar||function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&a(n,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),t(oo(),e),t(lo(),e)})),Vn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;var a=4294967295,t=Math.floor(Math.random()*a);function r(){return t=(t+1)%a,t}e.getUniqueId=r})),uo=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;var a=Vn();function t(){return(r,n,i,o)=>{const h=r.id,p=a.getUniqueId();r.id=p,n.id=p,i(d=>{r.id=h,n.id=h,d()})}}e.createIdRemapMiddleware=t})),ho=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0;function a(t){return async(r,n,i,o)=>{let h;const p=new Promise(s=>{h=s});let d=null,m=!1;const v=async()=>{m=!0,i(s=>{d=s,h()}),await p};try{await t(r,n,v),m?(await p,d(null)):o(null)}catch(s){d?d(s):o(s)}}}e.createAsyncMiddleware=a})),fo=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0;function a(t){return(r,n,i,o)=>{const h=t[r.method];return h===void 0?i():typeof h=="function"?h(r,n,i,o):(n.result=h,o())}}e.createScaffoldMiddleware=a})),po=F((e=>{Object.defineProperty(e,"__esModule",{value:!0});var a=Zt();function t(i,o,h){try{Reflect.apply(i,o,h)}catch(p){setTimeout(()=>{throw p})}}function r(i){const o=i.length,h=new Array(o);for(let p=0;p<o;p+=1)h[p]=i[p];return h}var n=class extends a.EventEmitter{emit(i,...o){let h=i==="error";const p=this._events;if(p!==void 0)h=h&&p.error===void 0;else if(!h)return!1;if(h){let m;if(o.length>0&&([m]=o),m instanceof Error)throw m;const v=new Error(`Unhandled error.${m?` (${m.message})`:""}`);throw v.context=m,v}const d=p[i];if(d===void 0)return!1;if(typeof d=="function")t(d,this,o);else{const m=d.length,v=r(d);for(let s=0;s<m;s+=1)t(v[s],this,o)}return!0}};e.default=n})),$r=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;var a=ni(),t=class extends Error{constructor(o,h,p){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!h||typeof h!="string")throw new Error('"message" must be a nonempty string.');super(h),this.code=o,p!==void 0&&(this.data=p)}serialize(){const o={code:this.code,message:this.message};return this.data!==void 0&&(o.data=this.data),this.stack&&(o.stack=this.stack),o}toString(){return a.default(this.serialize(),i,2)}};e.EthereumRpcError=t;var r=class extends t{constructor(o,h,p){if(!n(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,h,p)}};e.EthereumProviderError=r;function n(o){return Number.isInteger(o)&&o>=1e3&&o<=4999}function i(o,h){if(h!=="[Circular]")return h}})),Ur=F((e=>
4{Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},e.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."}}})),zn=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var a=Ur(),t=$r(),r=a.errorCodes.rpc.internal,n="Unspecified error message. This is a bug, please report it.",i={code:r,message:o(r)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(s,y=n){if(Number.isInteger(s)){const f=s.toString();if(v(a.errorValues,f))return a.errorValues[f].message;if(d(s))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return y}e.getMessageFromCode=o;function h(s){if(!Number.isInteger(s))return!1;const y=s.toString();return!!(a.errorValues[y]||d(s))}e.isValidCode=h;function p(s,{fallbackError:y=i,shouldIncludeStack:f=!1}={}){var g,w;if(!y||!Number.isInteger(y.code)||typeof y.message!="string")throw new Error("Mu
4st provide fallback error with integer number code and string message.");if(s instanceof t.EthereumRpcError)return s.serialize();const u={};if(s&&typeof s=="object"&&!Array.isArray(s)&&v(s,"code")&&h(s.code)){const b=s;u.code=b.code,b.message&&typeof b.message=="string"?(u.message=b.message,v(b,"data")&&(u.data=b.data)):(u.message=o(u.code),u.data={originalError:m(s)})}else{u.code=y.code;const b=(g=s)===null||g===void 0?void 0:g.message;u.message=b&&typeof b=="string"?b:y.message,u.data={originalError:m(s)}}const l=(w=s)===null||w===void 0?void 0:w.stack;return f&&s&&l&&typeof l=="string"&&(u.stack=l),u}e.serializeError=p;function d(s){return s>=-32099&&s<=-32e3}function m(s){return s&&typeof s=="object"&&!Array.isArray(s)?Object.assign({},s):s}function v(s,y){return Object.prototype.hasOwnProperty.call(s,y)}})),go=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;var a=$r(),t=zn(),r=Ur();e.ethErrors={rpc:{parse:h=>n(r.errorCodes.rpc.parse,h),invalidRequest:h=>n(r.errorCodes.rpc.invalidRequest,h),invalidParams:h=>n(r.errorCodes.rpc.invalidParams,h),methodNotFound:h=>n(r.errorCodes.rpc.methodNotFound,h),internal:h=>n(r.errorCodes.rpc.internal,h),server:h=>{if(!h||typeof h!="object"||Array.isArray(h))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:p}=h;if(!Number.isInteger(p)||p>-32005||p<-32099)throw new Error('"code" must be an integer such that: -32099 <= code 
4<= -32005');return n(p,h)},invalidInput:h=>n(r.errorCodes.rpc.invalidInput,h),resourceNotFound:h=>n(r.errorCodes.rpc.resourceNotFound,h),resourceUnavailable:h=>n(r.errorCodes.rpc.resourceUnavailable,h),transactionRejected:h=>n(r.errorCodes.rpc.transactionRejected,h),methodNotSupported:h=>n(r.errorCodes.rpc.methodNotSupported,h),limitExceeded:h=>n(r.errorCodes.rpc.limitExceeded,h)},provider:{userRejectedRequest:h=>i(r.errorCodes.provider.userRejectedRequest,h),unauthorized:h=>i(r.errorCodes.provider.unauthorized,h),unsupportedMethod:h=>i(r.errorCodes.provider.unsupportedMethod,h),disconnected:h=>i(r.errorCodes.provider.disconnected,h),chainDisconnected:h=>i(r.errorCodes.provider.chainDisconnected,h),custom:h=>{if(!h||typeof h!="object"||Array.isArray(h))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:p,message:d,data:m}=h;if(!d||typeof d!="string")throw new Error('"message" must be a nonempty string');return new a.EthereumProviderError(p,d,m)}}};function n(h,p){const[d,m]=o(p);return new a.EthereumRpcError(h,d||t.getMessageFromCode(h),m)}function i(h,p){const[d,m]=o(p);return new a.EthereumProviderError(h,d||t.getMessageFromCode(h),m)}function o(h){if(h){if(typeof h=="string")return[h];if(typeof h=="object"&&!Array.isArray(h)){const{message:p,data:d}=h;
4if(p&&typeof p!="string")throw new Error("Must specify string message.");return[p||void 0,d]}}return[]}})),vo=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;var a=$r();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return a.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return a.EthereumProviderError}});var t=zn();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});var r=go();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});var n=Ur();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return n.errorCodes}})})),Gn=F((e=>{var a=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;var t=a(po()),r=vo(),n=class Qe extends t.default{constructor(){super(),this._middleware=[]}push(h){this._middleware.push(h)}handle(h,p){if(p&&typeof p!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(h)?p?this._handleBatch(h,p):this._handleBatch(h):p?this._handle(h,p):this._promiseHandle(h)}asMiddleware(){return async(h,p,d,m)=>{try{const[v,s,y]=await Qe._runAllMiddleware(h,p,this._middleware);return s?(await Qe._runReturnHandlers(y),m(v)):d(async f=>{try{await Qe._runReturnHandlers(y)}catch(g){return f(g)}return f()})}catch(v){return m(v)}}}async _handleBatch(h,p){try{const d=await Promise.all(h.map(this._promiseHandle.bind(this)));return p?p(null,d):d}catch(d){if(p)return p(d);throw d}}_promiseHandle(h){return new Promise(p=>{this._handle(h,(d,m)=>{p(m)})})}async _handle(h,p){if(!h||Array.isArray(h)||typeof h!="object"){const s=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof h}`,{request:h});return p(s,{id:void 0,jsonrpc:"2.0",error:s})}if(typeof h.method!="string"){const s=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof h.method}`,{request:h});return p(s,{id:h.id,jsonrpc:"2.0",error:s})}const d=Object.assign({},h),m={id:d.id,jsonrpc:d.jsonrpc};let v=null;try{await this._processRequest(d,m)}catch(s){v=s}return v&&(delete m.result,m.error||(m.error=r.serializeError(v))),p(v,m)}async _processRequest(h,p){const[d,m,v]=await Qe._runAllMiddleware(h,p,this._middleware);if(Qe._checkForCompletion(h,p,m),await Qe._runReturnHandlers(v),d)throw d}static async _runAllMiddleware(h,p,d){const m=[];let v=null,s=!1;for(const y of d)if([v,s]=await Qe._runMiddleware(h,p,y,m),s)break;return[v,s,m.reverse()]}static _runMiddleware(h,p,d,m){return new Promise(v=>{const s=f=>{const g=f||p.error;g&&(p.error=r.serializeError(g)),v([g,!0])},y=f=>{p.error?s(p.error):(f&&(typeof f!="function"&&s(new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof f}" for request:
5${i(h)}`,{request:h})),m.push(f)),v([null,!1]))};try{d(h,p,y,s)}catch(f){s(f)}})}static async _runReturnHandlers(h){for(const p of h)await new Promise((d,m)=>{p(v=>v?m(v):d())})}static _checkForCompletion(h,p,d){if(!("result"in p)&&!("error"in p))throw new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
6${i(h)}`,{request:h});if(!d)throw new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
7${i(h)}`,{request:h})}};e.JsonRpcEngine=n;function i(o){return JSON.stringify(o,null,2)}})),mo=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;var a=Gn();function t(r){const n=new a.JsonRpcEngine;return r.forEach(i=>n.push(i)),n.asMiddleware()}e.mergeMiddleware=t})),Jn=F((e=>{var a=e&&e.__createBinding||(Object.create?(function(r,n,i,o){o===void 0&&(o=i),Object.defineProperty(r,o,{enumerable:!0,get:function(){return n[i]}})}):(function(r,n,i,o){o===void 0&&(o=i),r[o]=n[i]})),t=e&&e.__exportStar||function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&a(n,r,i)};
7Object.defineProperty(e,"__esModule",{value:!0}),t(uo(),e),t(ho(),e),t(fo(),e),t(Vn(),e),t(Gn(),e),t(mo(),e)})),yo=zt({Mutex:()=>Zn,Semaphore:()=>pr,withTimeout:()=>_o});function _o(e,a,t=new Error("timeout")){return{acquire:()=>new Promise((r,n)=>gr(this,void 0,void 0,function*(){let i=!1;setTimeout(()=>{i=!0,n(t)},a);const o=yield e.acquire();i?(Array.isArray(o)?o[1]:o)():r(o)})),runExclusive(r){return gr(this,void 0,void 0,function*(){let n=()=>{};try{const i=yield this.acquire();return Array.isArray(i)?(n=i[1],yield r(i[0])):(n=i,yield r())}finally{n()}})},release(){e.release()},isLocked:()=>e.isLocked()}}var Kr,pr,Qr,Zn,gr,bo=Vt((()=>{Kr=function(e,a,t,r){function n(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function h(m){try{d(r.next(m))}catch(v){o(v)}}function p(m){try{d(r.throw(m))}catch(v){o(v)}}function d(m){m.done?i(m.value):n(m.value).then(h,p)}d((r=r.apply(e,a||[])).next())})},pr=class{constructor(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}acquire(){const e=this.isLocked(),a=new Promise(t=>this._queue.push(t));return e||this._dispatch(),a}runExclusive(e){return Kr(this,void 0,void 0,function*(){const[a,t]=yield this.acquire();try{return yield e(a)}finally{t()}})}isLocked(){return this._value<=0}release(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){const e=this._currentReleaser;this._currentReleaser=void 0,e()}}_dispatch(){const e=this._queue.shift();if(!e)return;let a=!1;this._currentReleaser=()=>{a||(a=!0,this._value++,this._dispatch())},e([this._value--,this._currentReleaser])}},Qr=function(e,a,t,r){function n(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function h(m){try{d(r.next(m))}catch(v){o(v)}}function p(m){try{d(r.throw(m))}catch(v){o(v)}}function d(m){m.done?i(m.value):n(m.value).then(h,p)}d((r=r.apply(e,a||[])).next())})},Zn=class{constructor(){this._semaphore=new pr(1)}acquire(){return Qr(this,void 0,void 0,function*(){const[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}release(){this._semaphore.release()}},gr=function(e,a,t,r){function n(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function h(m){try{d(r.next(m))}catch(v){o(v)}}function p(m){try{d(r.throw(m))}catch(v){o(v)}}function d(m){m.done?i(m.value):n(m.value).then(h,p)}d((r=r.apply(e,a||[])).next())})}})),wo=F(((e,a)=>{a.exports=r;var t=Object.prototype.hasOwnProperty;function r(){for(var n={},i=0;i<arguments.length;i++){var o=arguments[i];for(var h in o)t.call(o,h)&&(n[h]=o[h])}return n}})),Eo=F(((e,a)=>{var t=wo(),r=Cr()();a.exports=n;function n(p){const d=this;d.currentProvider=p}n.prototype.getBalance=o(2,"eth_getBalance"),n.prototype.getCode=o(2,"eth_getCode"),n.prototype.getTransactionCount=o(2,"eth_getTransactionCount"),n.prototype.getStorageAt=o(3,"eth_getStorageAt"),n.prototype.call=o(2,"eth_call"),n.prototype.protocolVersion=i("eth_protocolVersion"),n.prototype.syncing=i("eth_syncing"),n.prototype.coinbase=i("eth_coinbase"),n.prototype.mining=i("eth_mining"),n.prototype.hashrate=i("eth_hashrate"),n.prototype.gasPrice=i("eth_gasPrice"),n.prototype.accounts=i("eth_accounts"),n.prototype.blockNumber=i("eth_blockNumber"),n.prototype.getBlockTransactionCountByHash=i("eth_getBlockTransactionCountByHash"),n.prototype.getBlockTransactionCountByNumber=i("eth_getBlockTransactionCountByNumber"),n.prototype.getUncleCountByBlockHash=i("eth_getUncleCountByBlockHash"),n.prototype.getUncleCountByBlockNumber=i("eth_getUncleCountByBlockNumber"),n.prototype.sign=i("eth_sign"),n.prototype.sendTransaction=i("eth_sendTransaction"),n.prototype.sendRawTransaction=i("eth_sendRawTransaction"),n.prototype.estimateGas=i("eth_estimateGas"),n.prototype.getBlockByHash=i("eth_getBlockByHash"),n.prototype.getBlockByNumber=i("eth_getBlockByNumber"),n.prototype.getTransactionByHash=i("eth_getTransactionByHash"),n.prototype.getTransactionByBlockHashAndIndex=i("eth_getTransactionByBlockHashAndIndex"),n.prototype.getTransactionByBlockNumberAndIndex=i("eth_getTransactionByBlockNumberAndIndex"),n.prototype.getTransactionReceipt=i("eth_getTransactionReceipt"),n.prototype.getUncleByBlockHashAndIndex=i("eth_getUncleByBlockHashAndIndex"),n.prototype.getUncleByBlockNumberAndIndex=i("eth_getUncleByBlockNumberAndIndex"),n.prototype.getCompilers=i("eth_getCompilers"),n.prototype.compileLLL=i("eth_compileLLL"),n.prototype.compileSolidity=i("eth_compileSolidity"),n.prototype.compileSerpent=i("eth_compileSerpent"),n.prototype.newFilter=i("eth_newFilter"),n.prototype.newBlockFilter=i("eth_newBlockFilter"),n.prototype.newPendingTransactionFilter=i("eth_newPendingTransactionFilter"),n.prototype.uninstallFilter=i("eth_uninstallFilter"),n.prototype.getFilterChanges=i("eth_getFilterChanges"),n.prototype.getFilterLogs=i("eth_getFilterLogs"),n.prototype.getLogs=i("eth_getLogs"),n.prototype.getWork=i("eth_getWork"),n.prototype.submitWork=i("eth_submitWork"),n.prototype.submitHashrate=i("eth_submitHashrate"),n.prototype.sendAsync=function(p,d){this.currentProvider.sendAsync(h(p),function(m,v){if(!m&&v.error&&(m=new Error("EthQuery - RPC Error - "+v.error.message)),m)return d(m);d(null,v.result)})};function i(p){return function(){const d=this;var m=[].slice.call(arguments),v=m.pop();d.sendAsync({method:p,params:m},v)}}function o(p,d){return function(){const m=this;var v=[].slice.call(arguments),s=v.pop();v.length<p&&v.push("latest"),m.sendAsync({method:d,params:v},s)}}function h(p){return t({id:r(),jsonrpc:"2.0",params:[]},p)}})),So=F(((e,a)=>{var t=(n,i,o,h)=>function(...p){const d=i.promiseModule;return new d((m,v)=>{i.multiArgs?p.push((...s)=>{i.errorFirst?s[0]?v(s):(s.shift(),m(s)):m(s)}):i.errorFirst?p.push((s,y)=>{s?v(s):m(y)}):p.push(m),Reflect.apply(n,this===o?h:this,p)})},r=new WeakMap;a.exports=(n,i)=>{i={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...i};const o=typeof n;if(!(n!==null&&(o==="object"||o==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${n===null?"null":o}\``);const h=(m,v)=>{let s=r.get(m);
7if(s||(s={},r.set(m,s)),v in s)return s[v];const y=u=>typeof u=="string"||typeof v=="symbol"?v===u:u.test(v),f=Reflect.getOwnPropertyDescriptor(m,v),g=f===void 0||f.writable||f.configurable,w=(i.include?i.include.some(y):!i.exclude.some(y))&&g;return s[v]=w,w},p=new WeakMap,d=new Proxy(n,{apply(m,v,s){const y=p.get(m);if(y)return Reflect.apply(y,v,s);const f=i.excludeMain?m:t(m,i,d,m);return p.set(m,f),Reflect.apply(f,v,s)},get(m,v){const s=m[v];if(!h(m,v)||s===Function.prototype[v])return s;const y=p.get(s);if(y)return y;if(typeof s=="function"){const f=t(s,i,d,m);return p.set(s,f),f}return s}});return d}})),Hr=F(((e,a)=>{var t=(Ar(),oe(Ir)).default,r=class extends t{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(n){this.updates=this.updates.concat(n),n.forEach(i=>this.emit("update",i))}addInitialResults(n){}getChangesAndClear(){const n=this.updates;return this.updates=[],n}};a.exports=r})),Ro=F(((e,a)=>{var t=Hr(),r=class extends t{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(n){this.allResults=this.allResults.concat(n),super.addResults(n)}addInitialResults(n){this.allResults=this.allResults.concat(n),super.addInitialResults(n)}getAllResults(){return this.allResults}};a.exports=r})),Ht=F(((e,a)=>{a.exports={minBlockRef:t,maxBlockRef:r,sortBlockRefs:n,bnToHex:i,blockRefIsNumber:o,hexToInt:h,incrementHexInt:p,intToHex:d,unsafeRandomBytes:m};function t(...s){return n(s)[0]}function r(...s){const y=n(s);return y[y.length-1]}function n(s){return s.sort((y,f)=>y==="latest"||f==="earliest"?1:f==="latest"||y==="earliest"?-1:h(y)-h(f))}function i(s){return"0x"+s.toString(16)}function o(s){return s&&!["earliest","latest","pending"].includes(s)}function h(s){return s==null?s:Number.parseInt(s,16)}function p(s){return s==null?s:d(h(s)+1)}function d(s){if(s==null)return s;let y=s.toString(16);return y.length%2&&(y="0"+y),"0x"+y}function m(s){let y="0x";for(let f=0;f<s;f++)y+=v(),y+=v();return y}function v(){return Math.floor(Math.random()*16).toString(16)}})),Mo=F(((e,a)=>{var t=Eo(),r=So(),n=Ro(),{bnToHex:i,hexToInt:o,incrementHexInt:h,minBlockRef:p,blockRefIsNumber:d}=Ht(),m=class extends n{constructor({provider:v,params:s}){super(),this.type="log",this.ethQuery=new t(v),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},s),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(y=>y.toLowerCase()))}async initialize({currentBlock:v}){let s=this.params.fromBlock;["latest","pending"].includes(s)&&(s=v),s==="earliest"&&(s="0x0"),this.params.fromBlock=s;const y=p(this.params.toBlock,v),f=Object.assign({},this.params,{toBlock:y}),g=await this._fetchLogs(f);this.addInitialResults(g)}async update({oldBlock:v,newBlock:s}){const y=s;let f;v?f=h(v):f=s;const g=Object.assign({},this.params,{fromBlock:f,toBlock:y}),w=(await this._fetchLogs(g)).filter(u=>this.matchLog(u));this.addResults(w)}async _fetchLogs(v){return await r(s=>this.ethQuery.getLogs(v,s))()}matchLog(v){if(o(this.params.fromBlock)>=o(v.blockNumber)||d(this.params.toBlock)&&o(this.params.toBlock)<=o(v.blockNumber))return!1;const s=v.address&&v.address.toLowerCase();return this.params.address&&s&&!this.params.address.includes(s)?!1:this.params.topics.every((y,f)=>{let g=v.topics[f];if(!g)return!1;g=g.toLowerCase();let w=Array.isArray(y)?y:[y];return w.includes(null)?!0:(w=w.map(u=>u.toLowerCase()),w.includes(g))})}};a.exports=m})),Wr=F(((e,a)=>{a.exports=t;async function t({provider:h,fromBlock:p,toBlock:d}){p||(p=d);const m=r(p),v=r(d)-m+1,s=Array(v).fill().map((f,g)=>m+g).map(n);let y=await Promise.all(s.map(f=>o(h,"eth_getBlockByNumber",[f,!1])));return y=y.filter(f=>f!==null),y}function r(h){return h==null?h:Number.parseInt(h,16)}function n(h){return h==null?h:"0x"+h.toString(16)}function i(h,p){return new Promise((d,m)=>{h.sendAsync(p,(v,s)=>{v?m(v):s.error?m(s.error):s.result?d(s.result):m(new Error("Result was empty"))})})}async function o(h,p,d){for(let m=0;m<3;m++)try{return await i(h,{id:1,jsonrpc:"2.0",method:p,params:d})}catch(v){console.error(`provider.sendAsync failed: ${v.stack||v.message||v}`)}return null}})),ko=F(((e,a)=>{var t=Hr(),r=Wr(),{incrementHexInt:n}=Ht(),i=class extends t{constructor({provider:o,params:h}){super(),this.type="block",this.provider=o}async update({oldBlock:o,newBlock:h}){const p=h,d=n(o),m=(await r({provider:this.provider,fromBlock:d,toBlock:p})).map(v=>v.hash);this.addResults(m)}};a.exports=i})),Co=F(((e,a)=>{var t=Hr(),r=Wr(),{incrementHexInt:n}=Ht(),i=class extends t{constructor({provider:o}){super(),this.type="tx",this.provider=o}async update({oldBlock:o}){const h=o,p=n(o),d=await r({provider:this.provider,fromBlock:p,toBlock:h}),m=[];for(const v of d)m.push(...v.transactions);this.addResults(m)}};a.exports=i})),Io=F(((e,a)=>{var t=(bo(),oe(yo)).Mutex,{createAsyncMiddleware:r,createScaffoldMiddleware:n}
7=Jn(),i=Mo(),o=ko(),h=Co(),{intToHex:p,hexToInt:d}=Ht();a.exports=m;function m({blockTracker:g,provider:w}){let u=0,l={};const b=new t,M=y({mutex:b}),k=n({eth_newFilter:M(v($)),eth_newBlockFilter:M(v(B)),eth_newPendingTransactionFilter:M(v(j)),eth_uninstallFilter:M(s(Y)),eth_getFilterChanges:M(s(U)),eth_getFilterLogs:M(s(Q))}),P=async({oldBlock:_,newBlock:S})=>{if(l.length===0)return;const R=await b.acquire();try{await Promise.all(f(l).map(async C=>{try{await C.update({oldBlock:_,newBlock:S})}catch(O){console.error(O)}}))}catch(C){console.error(C)}R()};return k.newLogFilter=$,k.newBlockFilter=B,k.newPendingTransactionFilter=j,k.uninstallFilter=Y,k.getFilterChanges=U,k.getFilterLogs=Q,k.destroy=()=>{I()},k;async function $(_){const S=new i({provider:w,params:_});return await K(S),S}async function B(){const _=new o({provider:w});return await K(_),_}async function j(){const _=new h({provider:w});return await K(_),_}async function U(_){const S=d(_),R=l[S];if(!R)throw new Error(`No filter for index "${S}"`);return R.getChangesAndClear()}async function Q(_){const S=d(_),R=l[S];if(!R)throw new Error(`No filter for index "${S}"`);let C=[];return R.type==="log"&&(C=R.getAllResults()),C}async function Y(_){const S=d(_),C=!!l[S];return C&&await X(S),C}async function K(_){const S=f(l).length,R=await g.getLatestBlock();await _.initialize({currentBlock:R}),u++,l[u]=_,_.id=u,_.idHex=p(u);const C=f(l).length;return c({prevFilterCount:S,newFilterCount:C}),u}async function X(_){const S=f(l).length;delete l[_];const R=f(l).length;c({prevFilterCount:S,newFilterCount:R})}async function I(){const _=f(l).length;l={},c({prevFilterCount:_,newFilterCount:0})}function c({prevFilterCount:_,newFilterCount:S}){if(_===0&&S>0){g.on("sync",P);return}if(_>0&&S===0){g.removeListener("sync",P);return}}}function v(g){return s(async(...w)=>p((await g(...w)).id))}function s(g){return r(async(w,u)=>{u.result=await g.apply(null,w.params)})}function y({mutex:g}){return w=>async(u,l,b,M)=>{(await g.acquire())(),w(u,l,b,M)}}function f(g,w){const u=[];for(let l in g)u.push(g[l]);return u}})),Ao=F(((e,a)=>{var t=(Ar(),oe(Ir)).default,{createAsyncMiddleware:r,createScaffoldMiddleware:n}=Jn(),i=Io(),{unsafeRandomBytes:o,incrementHexInt:h}=Ht(),p=Wr();a.exports=d;function d({blockTracker:v,provider:s}){const y={},f=i({blockTracker:v,provider:s});let g=!1;const w=new t,u=n({eth_subscribe:r(l),eth_unsubscribe:r(b)});return u.destroy=k,{events:w,middleware:u};async function l(P,$){if(g)throw new Error("SubscriptionManager - attempting to use after destroying");const B=P.params[0],j=o(16);let U;switch(B){case"newHeads":U=Q({subId:j});break;case"logs":const K=P.params[1];U=Y({subId:j,filter:await f.newLogFilter(K)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${B}"`)}y[j]=U,$.result=j;return;function Q({subId:K}){const X={type:B,destroy:async()=>{v.removeListener("sync",X.update)},update:async({oldBlock:I,newBlock:c})=>{const _=c;(await p({provider:s,fromBlock:h(I),toBlock:_})).map(m).filter(S=>S!==null).forEach(S=>{M(K,S)})}};return v.on("sync",X.update),X}function Y({subId:K,filter:X}){return X.on("update",I=>M(K,I)),{type:B,destroy:async()=>await f.uninstallFilter(X.idHex)}}}async function b(P,$){if(g)throw new Error("SubscriptionManager - attempting to use after destroying");const B=P.params[0],j=y[B];if(!j){$.result=!1;return}delete y[B],await j.destroy(),$.result=!0}function M(P,$){w.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:P,result:$}})}function k(){w.removeAllListeners();for(const P in y)y[P].destroy(),delete y[P];g=!0}}function m(v){return v==null?null:{hash:v.hash,parentHash:v.parentHash,sha3Uncles:v.sha3Uncles,miner:v.miner,stateRoot:v.stateRoot,transactionsRoot:v.transactionsRoot,receiptsRoot:v.receiptsRoot,logsBloom:v.logsBloom,difficulty:v.difficulty,number:v.number,gasLimit:v.gasLimit,gasUsed:v.gasUsed,nonce:v.nonce,mixHash:v.mixHash,timestamp:v.timestamp,extraData:v.extraData}}})),To=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;var a=co(),t=Ao(),r=()=>{},n=class{constructor(i){const{events:o,middleware:h}=t({blockTracker:new a.PollingBlockTracker({provider:i,pollingInterval:15e3,setSkipCacheFlag:!0}),provider:i});this.events=o,this.subscriptionMiddleware=h}async handleRequest(i){const o={};return await this.subscriptionMiddleware(i,o,r,r),o}destroy(){this.subscriptionMiddleware.destroy()}};e.SubscriptionManager=n})),vr=F((e=>
7{var a=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;var t=a(Kt()),r=(Yn(),oe(Xn)),n=Yt(),i=Ze(),o=yn(),h=wr(),p=Mr(),d=yr(),m=a(Ps()),v=br(),s=Os(),y=To(),f="DefaultChainId",g="DefaultJsonRpcUrl",w=class extends r.EventEmitter{constructor(u){var l,b;super(),this._filterPolyfill=new s.FilterPolyfill(this),this._subscriptionManager=new y.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=u.chainId,this._jsonRpcUrlFromOpts=u.jsonRpcUrl,this._overrideIsMetaMask=u.overrideIsMetaMask,this._relayProvider=u.relayProvider,this._storage=u.storage,this._relayEventManager=u.relayEventManager,this.diagnostic=u.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(l=u.overrideIsCoinbaseWallet)!==null&&l!==void 0?l:!0,this.isCoinbaseBrowser=(b=u.overrideIsCoinbaseBrowser)!==null&&b!==void 0?b:!1,this.qrUrl=u.qrUrl;const M=this.getChainId(),k=(0,i.prepend0x)(M.toString(16));this.emit("connect",{chainIdStr:k});const P=this._storage.getItem(h.LOCAL_STORAGE_ADDRESSES_KEY);if(P){const $=P.split(" ");$[0]!==""&&(this._addresses=$.map(B=>(0,i.ensureAddressString)(B)),this.emit("accountsChanged",$))}this._subscriptionManager.events.on("notification",$=>{this.emit("message",{type:$.method,data:$.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",$=>{var B;if(!($.origin!==location.origin||$.source!==window)&&$.data.type==="walletLinkMessage"&&$.data.data.action==="dappChainSwitched"){const j=$.data.data.chainId,U=(B=$.data.data.jsonRpcUrl)!==null&&B!==void 0?B:this.jsonRpcUrl;this.updateProviderInfo(U,Number(j))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,i.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var u;return(u=this._storage.getItem(g))!==null&&u!==void 0?u:this._jsonRpcUrlFromOpts}set jsonRpcUrl(u){this._storage.setItem(g,u)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(u,l){this.isCoinbaseBrowser||(this._chainIdFromOpts=l,this._jsonRpcUrlFromOpts=u),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(u,l){this.jsonRpcUrl=u;const b=this.getChainId();this._storage.setItem(f,l.toString(10)),((0,i.ensureIntNumber)(l)!==b||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(u,l,b,M,k,P){const $=await(await this.initializeRelay()).watchAsset(u,l,b,M,k,P?.toString()).promise;return(0,d.isErrorResponse)($)?!1:!!$.result}async addEthereumChain(u,l,b,M,k,P){var $,B;if((0,i.ensureIntNumber)(u)===this.getChainId())return!1;const j=await this.initializeRelay(),U=j.inlineAddEthereumChain(u.toString());!this._isAuthorized()&&!U&&await j.requestEthereumAccounts().promise;const Q=await j.addEthereumChain(u.toString(),l,k,b,M,P).promise;return(0,d.isErrorResponse)(Q)?!1:((($=Q.result)===null||$===void 0?void 0:$.isApproved)===!0&&this.updateProviderInfo(l[0],u),((B=Q.result)===null||B===void 0?void 0:B.isApproved)===!0)}async switchEthereumChain(u){const l=await(await this.initializeRelay()).switchEthereumChain(u.toString(10),this.selectedAddress||void 0).promise;if((0,d.isErrorResponse)(l)){if(!l.errorCode)return;throw l.errorCode===n.standardErrorCodes.provider.unsupportedChain?n.standardErrors.provider.unsupportedChain():n.standardErrors.provider.custom({message:l.errorMessage,code:l.errorCode})}const b=l.result;b.isApproved&&b.rpcUrl.length>0&&this.updateProviderInfo(b.rpcUrl,u)}setAppInfo(u,l){this.initializeRelay().then(b=>b.setAppInfo(u,l))}async enable(){var u;return(u=this.diagnostic)===null||u===void 0||u.log(v.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?p.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(u,l){try{const b=this._send(u,l);if(b instanceof Promise)return b.catch(M=>{throw(0,n.serializeError)(M,u)})}catch(b){throw(0,n.serializeError)(b,u)}}_send(u,l){if(typeof u=="string"){const M={jsonrpc:"2.0",id:0,method:u,params:Array.isArray(l)?l:l!==void 0?[l]:[]};return this._sendRequestAsync(M).then(k=>k.result)}if(typeof l=="function"){const M=u,k=l;return this._sendAsync(M,k)}if(Array.isArray(u))return u.map(M=>this._sendRequest(M));const b=u;return this._sendRequest(b)}async sendAsync(u,l){try{return this._sendAsync(u,l).catch(b=>{throw(0,n.serializeError)(b,u)})}catch(b){return Promise.reject((0,n.serializeError)(b,u))}}async _sendAsync(u,l){if(typeof l!="function")throw new Error("callback is required");if(Array.isArray(u)){const M=l;this._sendMultipleRequestsAsync(u).then(k=>M(null,k)).catch(k=>M(k,null));return}const b=l;return this._sendRequestAsync(u).then(M=>b(null,M)).catch(M=>b(M,null))}async request(u){try{return this._request(u).catch(l=>{throw(0,n.serializeError)(l,u.method)})}catch(l){return Promise.reject((0,n.serializeError)(l,u.method))}}async _request(u){if(!u||typeof u!="object"||Array.isArray(u))throw n.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:u});const{method:l,params:b}=u;if(typeof l!="string"||l.length===0)throw n.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:u});if(b!==void 0&&!Array.isArray(b)&&(typeof b!="object"||b===null))throw n.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:u});const M=b===void 0?[]:b,k=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:l,params:M,jsonrpc:"2.0",id:k})).result}
7async scanQRCode(u){const l=await(await this.initializeRelay()).scanQRCode((0,i.ensureRegExpString)(u)).promise;if((0,d.isErrorResponse)(l))throw(0,n.serializeError)(l.errorMessage,"scanQRCode");if(typeof l.result!="string")throw(0,n.serializeError)("result was not a string","scanQRCode");return l.result}async genericRequest(u,l){const b=await(await this.initializeRelay()).genericRequest(u,l).promise;if((0,d.isErrorResponse)(b))throw(0,n.serializeError)(b.errorMessage,"generic");if(typeof b.result!="string")throw(0,n.serializeError)("result was not a string","generic");return b.result}async connectAndSignIn(u){var l;(l=this.diagnostic)===null||l===void 0||l.log(v.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?p.Session.hash(this._relay.session.id):void 0});let b;try{const k=await this.initializeRelay();if(!(k instanceof o.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(b=await k.connectAndSignIn(u).promise,(0,d.isErrorResponse)(b))throw new Error(b.errorMessage)}catch(k){throw typeof k.message=="string"&&k.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):k}if(!b.result)throw new Error("accounts received is empty");const{accounts:M}=b.result;return this._setAddresses(M),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),b.result}async selectProvider(u){const l=await(await this.initializeRelay()).selectProvider(u).promise;if((0,d.isErrorResponse)(l))throw(0,n.serializeError)(l.errorMessage,"selectProvider");if(typeof l.result!="string")throw(0,n.serializeError)("result was not a string","selectProvider");return l.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(u){const l={jsonrpc:"2.0",id:u.id},{method:b}=u;if(l.result=this._handleSynchronousMethods(u),l.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${b} synchronously without a callback. Please provide a callback parameter to call ${b} asynchronously.`);return l}_setAddresses(u,l){if(!Array.isArray(u))throw new Error("addresses is not an array");const b=u.map(M=>(0,i.ensureAddressString)(M));JSON.stringify(b)!==JSON.stringify(this._addresses)&&(this._addresses=b,this.emit("accountsChanged",this._addresses),this._storage.setItem(h.LOCAL_STORAGE_ADDRESSES_KEY,b.join(" ")))}_sendRequestAsync(u){return new Promise((l,b)=>{try{const M=this._handleSynchronousMethods(u);if(M!==void 0)return l({jsonrpc:"2.0",id:u.id,result:M});const k=this._handleAsynchronousFilterMethods(u);if(k!==void 0){k.then($=>l(Object.assign(Object.assign({},$),{id:u.id}))).catch($=>b($));return}const P=this._handleSubscriptionMethods(u);if(P!==void 0){P.then($=>l({jsonrpc:"2.0",id:u.id,result:$.result})).catch($=>b($));return}}catch(M){return b(M)}this._handleAsynchronousMethods(u).then(M=>M&&l(Object.assign(Object.assign({},M),{id:u.id}))).catch(M=>b(M))})}_sendMultipleRequestsAsync(u){return Promise.all(u.map(l=>this._sendRequestAsync(l)))}_handleSynchronousMethods(u){const{method:l}=u,b=u.params||[];switch(l){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(b);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(u){const{method:l}=u,b=u.params||[];switch(l){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(b);case"eth_ecRecover":return this._eth_ecRecover(b);case"personal_sign":return this._personal_sign(b);case"personal_ecRecover":return this._personal_ecRecover(b);case"eth_signTransaction":return this._eth_signTransaction(b);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(b);case"eth_sendTransaction":return this._eth_sendTransaction(b);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(b);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(b);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(b);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(b);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(b);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(b);case"wallet_watchAsset":return this._wallet_watchAsset(b)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(u,this.jsonRpcUrl).cat
7ch(M=>{var k;throw(M.code===n.standardErrorCodes.rpc.methodNotFound||M.code===n.standardErrorCodes.rpc.methodNotSupported)&&((k=this.diagnostic)===null||k===void 0||k.log(v.EVENTS.METHOD_NOT_IMPLEMENTED,{method:u.method,sessionIdHash:this._relay?p.Session.hash(this._relay.session.id):void 0})),M})}_handleAsynchronousFilterMethods(u){const{method:l}=u,b=u.params||[];switch(l){case"eth_newFilter":return this._eth_newFilter(b);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(b);case"eth_getFilterLogs":return this._eth_getFilterLogs(b)}}_handleSubscriptionMethods(u){switch(u.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(u)}}_isKnownAddress(u){try{const l=(0,i.ensureAddressString)(u);return this._addresses.map(b=>(0,i.ensureAddressString)(b)).includes(l)}catch{}return!1}_ensureKnownAddress(u){var l;if(!this._isKnownAddress(u))throw(l=this.diagnostic)===null||l===void 0||l.log(v.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(u){const l=u.from?(0,i.ensureAddressString)(u.from):this.selectedAddress;if(!l)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(l),{fromAddress:l,toAddress:u.to?(0,i.ensureAddressString)(u.to):null,weiValue:u.value!=null?(0,i.ensureBN)(u.value):new t.default(0),data:u.data?(0,i.ensureBuffer)(u.data):Buffer.alloc(0),nonce:u.nonce!=null?(0,i.ensureIntNumber)(u.nonce):null,gasPriceInWei:u.gasPrice!=null?(0,i.ensureBN)(u.gasPrice):null,maxFeePerGas:u.maxFeePerGas!=null?(0,i.ensureBN)(u.maxFeePerGas):null,maxPriorityFeePerGas:u.maxPriorityFeePerGas!=null?(0,i.ensureBN)(u.maxPriorityFeePerGas):null,gasLimit:u.gas!=null?(0,i.ensureBN)(u.gas):null,chainId:u.chainId?(0,i.ensureIntNumber)(u.chainId):this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw n.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw n.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(u,l,b,M){this._ensureKnownAddress(l);try{const k=await(await this.initializeRelay()).signEthereumMessage(u,l,b,M).promise;if((0,d.isErrorResponse)(k))throw new Error(k.errorMessage);return{jsonrpc:"2.0",id:0,result:k.result}}catch(k){throw typeof k.message=="string"&&k.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied message signature"):k}}async _ethereumAddressFromSignedMessage(u,l,b){const M=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(u,l,b).promise;if((0,d.isErrorResponse)(M))throw new Error(M.errorMessage);return{jsonrpc:"2.0",id:0,result:M.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,i.hexStringFromIntNumber)(this.getChainId())}getChainId(){const u=this._storage.getItem(f);if(!u)return(0,i.ensureIntNumber)(this._chainIdFromOpts);const l=parseInt(u,10);return(0,i.ensureIntNumber)(l)}async _eth_requestAccounts(){var u;if((u=this.diagnostic)===null||u===void 0||u.log(v.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?p.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let l;try{if(l=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,d.isErrorResponse)(l))throw new Error(l.errorMessage)}catch(b){throw typeof b.message=="string"&&b.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):b}if(!l.result)throw new Error("accounts received is empty");return this._setAddresses(l.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(u){this._requireAuthorization();const l=(0,i.ensureAddressString)(u[0]),b=(0,i.ensureBuffer)(u[1]);return this._signEthereumMessage(b,l,!1)}_eth_ecRecover(u){const l=(0,i.ensureBuffer)(u[0]),b=(0,i.ensureBuffer)(u[1]);return this._ethereumAddressFromSignedMessage(l,b,!1)}_personal_sign(u){this._requireAuthorization();const l=(0,i.ensureBuffer)(u[0]),b=(0,i.ensureAddressString)(u[1]);return this._signEthereumMessage(l,b,!0)}_personal_ecRecover(u){const l=(0,i.ensureBuffer)(u[0]),b=(0,i.ensureBuffer)(u[1]);return this._ethereumAddressFromSignedMessage(l,b,!0)}async _eth_signTransaction(u){this._requireAuthorization();const l=this._prepareTransactionParams(u[0]||{});try{const b=await(await this.initializeRelay()).signEthereumTransaction(l).promise;if((0,d.isErrorResponse)(b))throw new Error(b.errorMessage);return{jsonrpc:"2.0",id:0,result:b.result}}catch(b){throw typeof b.message=="string"&&b.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):b}}
7async _eth_sendRawTransaction(u){const l=(0,i.ensureBuffer)(u[0]),b=await(await this.initializeRelay()).submitEthereumTransaction(l,this.getChainId()).promise;if((0,d.isErrorResponse)(b))throw new Error(b.errorMessage);return{jsonrpc:"2.0",id:0,result:b.result}}async _eth_sendTransaction(u){this._requireAuthorization();const l=this._prepareTransactionParams(u[0]||{});try{const b=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(l).promise;if((0,d.isErrorResponse)(b))throw new Error(b.errorMessage);return{jsonrpc:"2.0",id:0,result:b.result}}catch(b){throw typeof b.message=="string"&&b.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):b}}async _eth_signTypedData_v1(u){this._requireAuthorization();const l=(0,i.ensureParsedJSONObject)(u[0]),b=(0,i.ensureAddressString)(u[1]);this._ensureKnownAddress(b);const M=m.default.hashForSignTypedDataLegacy({data:l}),k=JSON.stringify(l,null,2);return this._signEthereumMessage(M,b,!1,k)}async _eth_signTypedData_v3(u){this._requireAuthorization();const l=(0,i.ensureAddressString)(u[0]),b=(0,i.ensureParsedJSONObject)(u[1]);this._ensureKnownAddress(l);const M=m.default.hashForSignTypedData_v3({data:b}),k=JSON.stringify(b,null,2);return this._signEthereumMessage(M,l,!1,k)}async _eth_signTypedData_v4(u){this._requireAuthorization();const l=(0,i.ensureAddressString)(u[0]),b=(0,i.ensureParsedJSONObject)(u[1]);this._ensureKnownAddress(l);const M=m.default.hashForSignTypedData_v4({data:b}),k=JSON.stringify(b,null,2);return this._signEthereumMessage(M,l,!1,k)}async _cbwallet_arbitrary(u){const l=u[0],b=u[1];if(typeof b!="string")throw new Error("parameter must be a string");if(typeof l!="object"||l===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(l,b)}}async _wallet_addEthereumChain(u){var l,b,M,k;const P=u[0];if(((l=P.rpcUrls)===null||l===void 0?void 0:l.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!P.chainName||P.chainName.trim()==="")throw n.standardErrors.rpc.invalidParams("chainName is a required field");if(!P.nativeCurrency)throw n.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const $=parseInt(P.chainId,16);return await this.addEthereumChain($,(b=P.rpcUrls)!==null&&b!==void 0?b:[],(M=P.blockExplorerUrls)!==null&&M!==void 0?M:[],P.chainName,(k=P.iconUrls)!==null&&k!==void 0?k:[],P.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(u){const l=u[0];return await this.switchEthereumChain(parseInt(l.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(u){const l=Array.isArray(u)?u[0]:u;if(!l.type)throw n.standardErrors.rpc.invalidParams("Type is required");if(l?.type!=="ERC20")throw n.standardErrors.rpc.invalidParams(`Asset of type '${l.type}' is not supported`);if(!l?.options)throw n.standardErrors.rpc.invalidParams("Options are required");if(!l?.options.address)throw n.standardErrors.rpc.invalidParams("Address is required");const b=this.getChainId(),{address:M,symbol:k,image:P,decimals:$}=l.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(l.type,M,k,$,P,b)}}_eth_uninstallFilter(u){const l=(0,i.ensureHexString)(u[0]);return this._filterPolyfill.uninstallFilter(l)}async _eth_newFilter(u){const l=u[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(l)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(u){const l=(0,i.ensureHexString)(u[0]);return this._filterPolyfill.getFilterChanges(l)}_eth_getFilterLogs(u){const l=(0,i.ensureHexString)(u[0]);return this._filterPolyfill.getFilterLogs(l)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(u=>(u.setAccountsCallback((l,b)=>this._setAddresses(l,b)),u.setChainCallback((l,b)=>{this.updateProviderInfo(b,parseInt(l,10))}),u.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=u,u))}};e.CoinbaseWalletProvider=w})),No=F((e=>
7{Object.defineProperty(e,"__esModule",{value:!0}),e.RelayEventManager=void 0;var a=Ze(),t=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const r=this._nextRequestId,n=(0,a.prepend0x)(r.toString(16));return this.callbacks.get(n)&&this.callbacks.delete(n),r}};e.RelayEventManager=t})),Yr=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;var a=ii(),t=si(),r=Ze(),n=li(),i=vr(),o=yn(),h=mn(),p=No(),d=gn(),m=vn(),v=_r(),s=class Kn{constructor(f){var g,w,u;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const l=f.linkAPIUrl||t.LINK_API_URL;typeof f.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=f.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(g=f.overrideIsCoinbaseWallet)!==null&&g!==void 0?g:!0,this._overrideIsCoinbaseBrowser=(w=f.overrideIsCoinbaseBrowser)!==null&&w!==void 0?w:!1,this._diagnosticLogger=f.diagnosticLogger,this._reloadOnDisconnect=(u=f.reloadOnDisconnect)!==null&&u!==void 0?u:!0;const b=new URL(l),M=`${b.protocol}//${b.host}`;if(this._storage=new n.ScopedLocalStorage(`-walletlink:${M}`),this._storage.setItem("version",Kn.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new p.RelayEventManager;const k=(0,r.isMobileWeb)(),P=f.uiConstructor||(B=>k?new h.MobileRelayUI(B):new d.WalletLinkRelayUI(B)),$={linkAPIUrl:l,version:v.LIB_VERSION,darkMode:!!f.darkMode,headlessMode:!!f.headlessMode,uiConstructor:P,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:f.enableMobileWalletLink};this._relay=k?new o.MobileRelay($):new m.WalletLinkRelay($),this.setAppInfo(f.appName,f.appLogoUrl),!f.headlessMode&&this._relay.attachUI()}makeWeb3Provider(f="",g=1){const w=this.walletExtension;if(w)return this.isCipherProvider(w)||w.setProviderInfo(f,g),this._reloadOnDisconnect===!1&&typeof w.disableReloadOnDisconnect=="function"&&w.disableReloadOnDisconnect(),w;const u=this.coinbaseBrowser;if(u)return u;const l=this._relay;if(!l||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return f||l.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(l),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:f,chainId:g,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(f,g){var w;this._appName=f||"DApp",this._appLogoUrl=g||(0,r.getFavicon)();const u=this.walletExtension;u?this.isCipherProvider(u)||u.setAppInfo(this._appName,this._appLogoUrl):(w=this._relay)===null||w===void 0||w.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var f;const g=this===null||this===void 0?void 0:this.walletExtension;g?g.close():(f=this._relay)===null||f===void 0||f.resetAndReload()}getQrUrl(){var f,g;return(g=(f=this._relay)===null||f===void 0?void 0:f.getQRCodeUrl())!==null&&g!==void 0?g:null}getCoinbaseWalletLogo(f,g=240){return(0,a.walletLogo)(f,g)}get walletExtension(){var f;return(f=window.coinbaseWalletExtension)!==null&&f!==void 0?f:window.walletLinkExtension}get coinbaseBrowser(){var f,g;try{const w=(f=window.ethereum)!==null&&f!==void 0?f:(g=window.top)===null||g===void 0?void 0:g.ethereum;return w&&"isCoinbaseBrowser"in w&&w.isCoinbaseBrowser?w:void 0}catch{return}}isCipherProvider(f){return typeof f.isCipher=="boolean"&&f.isCipher}};e.CoinbaseWalletSDK=s,s.VERSION=v.LIB_VERSION})),Lo=F((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;var a=Yr(),t=vr(),r=Yr();Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return r.CoinbaseWalletSDK}});var n=vr();Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return n.CoinbaseWalletProvider}}),e.default=a.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=a.CoinbaseWalletSDK,window.CoinbaseWalletProvider=t.CoinbaseWalletProvider,window.WalletLink=a.
7CoinbaseWalletSDK,window.WalletLinkProvider=t.CoinbaseWalletProvider)})),xo=Lo();export{xo as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.