HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/doco/testConnect/assets/index-a3835762.js
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))e(o);new MutationObserver(o=>{for(const n of o)if(n.type==="childList")for(const f of n.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&e(f)}).observe(document,{childList:!0,subtree:!0});function i(o){const n={};return o.integrity&&(n.integrity=o.integrity),o.referrerPolicy&&(n.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?n.credentials="include":o.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function e(o){if(o.ep)return;o.ep=!0;const n=i(o);fetch(o.href,n)}})();const n0={__name:r=>{const{normalize:t}=r;return t(["English"])},__flag:r=>{const{normalize:t}=r;return t(["EN"])},__status:r=>{const{normalize:t}=r;return t([])},Themes:r=>{const{normalize:t}=r;return t(["Themes"])},LoginBtnName:r=>{const{normalize:t}=r;return t(["Login"])},LoginMeto:r=>{const{normalize:t}=r;return t(["Plase use Metamsk or Wallet Scan to login"])},"":r=>{const{normalize:t}=r;return t([])}},i0=Object.freeze(Object.defineProperty({__proto__:null,default:n0},Symbol.toStringTag,{value:"Module"})),o0={__name:r=>{const{normalize:t}=r;return t(["中文"])},__flag:r=>{const{normalize:t}=r;return t(["CN"])},__status:r=>{const{normalize:t}=r;return t([])},Themes:r=>{const{normalize:t}=r;return t(["主题"])},LoginBtnName:r=>{const{normalize:t}=r;return t(["登录"])},LoginMeto:r=>{const{normalize:t}=r;return t(["请使用Metamask或钱包扫描登入"])},"":r=>{const{normalize:t}=r;return t([])}},s0=Object.freeze(Object.defineProperty({__proto__:null,default:o0},Symbol.toStringTag,{value:"Module"}));function qa(r,t){const i=Object.create(null),e=r.split(",");for(let o=0;o<e.length;o++)i[e[o]]=!0;return t?o=>!!i[o.toLowerCase()]:o=>!!i[o]}function Ha(r){if(lt(r)){const t={};for(let i=0;i<r.length;i++){const e=r[i],o=qt(e)?c0(e):Ha(e);if(o)for(const n in o)t[n]=o[n]}return t}else{if(qt(r))return r;if(Ct(r))return r}}const a0=/;(?![^(]*\))/g,u0=/:([^]+)/,f0=/\/\*.*?\*\//gs;function c0(r){const t={};return r.replace(f0,"").split(a0).forEach(i=>{if(i){const e=i.split(u0);e.length>1&&(t[e[0].trim()]=e[1].trim())}}),t}function za(r){let t="";if(qt(r))t=r;else if(lt(r))for(let i=0;i<r.length;i++){const e=za(r[i]);e&&(t+=e+" ")}else if(Ct(r))for(const i in r)r[i]&&(t+=i+" ");return t.trim()}const l0="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",h0=qa(l0);function cl(r){return!!r||r===""}const s_=r=>qt(r)?r:r==null?"":lt(r)||Ct(r)&&(r.toString===pl||!bt(r.toString))?JSON.stringify(r,ll,2):String(r),ll=(r,t)=>t&&t.__v_isRef?ll(r,t.value):ai(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[e,o])=>(i[`${e} =>`]=o,i),{})}:hl(t)?{[`Set(${t.size})`]:[...t.values()]}:Ct(t)&&!lt(t)&&!ml(t)?String(t):t,Tt={},si=[],Fr=()=>{},d0=()=>!1,p0=/^on[^a-z]/,Zo=r=>p0.test(r),Wa=r=>r.startsWith("onUpdate:"),Xt=Object.assign,Ka=(r,t)=>{const i=r.indexOf(t);i>-1&&r.splice(i,1)},m0=Object.prototype.hasOwnProperty,St=(r,t)=>m0.call(r,t),lt=Array.isArray,ai=r=>Qo(r)==="[object Map]",hl=r=>Qo(r)==="[object Set]",bt=r=>typeof r=="function",qt=r=>typeof r=="string",Ga=r=>typeof r=="symbol",Ct=r=>r!==null&&typeof r=="object",dl=r=>Ct(r)&&bt(r.then)&&bt(r.catch),pl=Object.prototype.toString,Qo=r=>pl.call(r),g0=r=>Qo(r).slice(8,-1),ml=r=>Qo(r)==="[object Object]",Va=r=>qt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,So=qa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xo=r=>{const t=Object.create(null);return i=>t[i]||(t[i]=r(i))},v0=/-(\w)/g,on=Xo(r=>r.replace(v0,(t,i)=>i?i.toUpperCase():"")),b0=/\B([A-Z])/g,_i=Xo(r=>r.replace(b0,"-$1").toLowerCase()),es=Xo(r=>r.charAt(0).toUpperCase()+r.slice(1)),As=Xo(r=>r?`on${es(r)}`:""),Yi=(r,t)=>!Object.is(r,t),Es=(r,t)=>{for(let i=0;i<r.length;i++)r[i](t)},Bo=(r,t,i)=>{Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value:i})},y0=r=>{const t=parseFloat(r);return isNaN(t)?r:t};let Uu;const w0=()=>Uu||(Uu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let lr;class gl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=lr,!t&&lr&&(this.index=(lr.scopes||(lr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const i=lr;try{return lr=this,t()}finally{lr=i}}}on(){lr=this}off(){lr=this.parent}stop(t){if(this._active){let i,e;for(i=0,e=this.effects.length;i<e;i++)this.effects[i].stop();for(i=0,e=this.cleanups.length;i<e;i++)this.cleanups[i]();if(this.scopes)for(i=0,e=this.scopes.length;i<e;i++)this.scopes[i].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function Ja(r){return new gl(r)}function _0(r,t=lr){t&&t.active&&t.effects.push(r)}function Ya(){return lr}function vl(r){lr&&lr.cleanups.push(r)}const $a=r=>{const t=new Set(r);return t.w=0,t.n=0,t},bl=r=>(r.w&On)>0,yl=r=>(r.n&On)>0,M0=({deps:r})=>{if(r.length)for(let t=0;t<r.length;t++)r[t].w|=On},x0=r=>{const{deps:t}=r;if(t.length){let i=0;for(let e=0;e<t.length;e++){const o=t[e];bl(o)&&!yl(o)?o.delete(r):t[i++]=o,o.w&=~On,o.n&=~On}t.length=i}},Lo=new WeakMap;let ji=0,On=1;const Zs=30;let jr;const Gn=Symbol(""),Qs=Symbol("");class Za{constructor(t,i=null,e){this.fn=t,this.scheduler=i,this.active=!0,this.deps=[],this.parent=void 0,_0(this,e)}run(){if(!this.active)return this.fn();let t=jr,i=Tn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=jr,jr=this,Tn=!0,On=1<<++ji,ji<=Zs?M0(this):Du(this),this.fn()}finally{ji<=Zs&&x0(this),On=1<<--ji,jr=this.parent,Tn=i,this.parent=void 0,this.deferStop&&this.stop()}}stop(){jr===this?this.deferStop=!0:this.active&&(Du(this),this.onStop&&this.onStop(),this.active=!1)}}function Du(r){const{deps:t}=r;if(t.length){for(let i=0;i<t.length;i++)t[i].delete(r);t.length=0}}let Tn=!0;const wl=[];function Mi(){wl.push(Tn),Tn=!1}function xi(){const r=wl.pop();Tn=r===void 0?!0:r}function ur(r,t,i){if(Tn&&jr){let e=Lo.get(r);e||Lo.set(r,e=new Map);let o=e.get(i);o||e.set(i,o=$a()),_l(o)}}function _l(r,t){let i=!1;ji<=Zs?yl(r)||(r.n|=On,i=!bl(r)):i=!r.has(jr),i&&(r.add(jr),jr.deps.push(r))}function mn(r,t,i,e,o,n){const f=Lo.get(r);if(!f)return;let p=[];if(t==="clear")p=[...f.values()];else if(i==="length"&&lt(r)){const u=Number(e);f.forEach((c,s)=>{(s==="length"||s>=u)&&p.push(c)})}else switch(i!==void 0&&p.push(f.get(i)),t){case"add":lt(r)?Va(i)&&p.push(f.get("length")):(p.push(f.get(Gn)),ai(r)&&p.push(f.get(Qs)));break;case"delete":lt(r)||(p.push(f.get(Gn)),ai(r)&&p.push(f.get(Qs)));break;case"set":ai(r)&&p.push(f.get(Gn));break}if(p.length===1)p[0]&&Xs(p[0]);else{const u=[];for(const c of p)c&&u.push(...c);Xs($a(u))}}function Xs(r,t){const i=lt(r)?r:[...r];for(const e of i)e.computed&&Fu(e);for(const e of i)e.computed||Fu(e)}function Fu(r,t){(r!==jr||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}function A0(r,t){var i;return(i=Lo.get(r))===null||i===void 0?void 0:i.get(t)}const E0=qa("__proto__,__v_isRef,__isVue"),Ml=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(Ga)),S0=Qa(),k0=Qa(!1,!0),R0=Qa(!0),qu=T0();function T0(){const r={};return["includes","indexOf","lastIndexOf"].forEach(t=>{r[t]=function(...i){const e=Et(this);for(let n=0,f=this.length;n<f;n++)ur(e,"get",n+"");const o=e[t](...i);return o===-1||o===!1?e[t](...i.map(Et)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{r[t]=function(...i){Mi();const e=Et(this)[t].apply(this,i);return xi(),e}}),r}function I0(r){const t=Et(this);return ur(t,"has",r),t.hasOwnProperty(r)}function Qa(r=!1,t=!1){return function(e,o,n){if(o==="__v_isReactive")return!r;if(o==="__v_isReadonly")return r;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&n===(r?t?G0:kl:t?Sl:El).get(e))return e;const f=lt(e);if(!r){if(f&&St(qu,o))return Reflect.get(qu,o,n);if(o==="hasOwnProperty")return I0}const p=Reflect.get(e,o,n);return(Ga(o)?Ml.has(o):E0(o))||(r||ur(e,"get",o),t)?p:Lt(p)?f&&Va(o)?p:p.value:Ct(p)?r?tu(p):Ai(p):p}}const C0=xl(),P0=xl(!0);function xl(r=!1){return function(i,e,o,n){let f=i[e];if(li(f)&&Lt(f)&&!Lt(o))return!1;if(!r&&(!jo(o)&&!li(o)&&(f=Et(f),o=Et(o)),!lt(i)&&Lt(f)&&!Lt(o)))return f.value=o,!0;const p=lt(i)&&Va(e)?Number(e)<i.length:St(i,e),u=Reflect.set(i,e,o,n);return i===Et(n)&&(p?Yi(o,f)&&mn(i,"set",e,o):mn(i,"add",e,o)),u}}function O0(r,t){const i=St(r,t);r[t];const e=Reflect.deleteProperty(r,t);return e&&i&&mn(r,"delete",t,void 0),e}function N0(r,t){const i=Reflect.has(r,t);return(!Ga(t)||!Ml.has(t))&&ur(r,"has",t),i}function B0(r){return ur(r,"iterate",lt(r)?"length":Gn),Reflect.ownKeys(r)}const Al={get:S0,set:C0,deleteProperty:O0,has:N0,ownKeys:B0},L0={get:R0,set(r,t){return!0},deleteProperty(r,t){return!0}},j0=Xt({},Al,{get:k0,set:P0}),Xa=r=>r,ts=r=>Reflect.getPrototypeOf(r);function po(r,t,i=!1,e=!1){r=r.__v_raw;const o=Et(r),n=Et(t);i||(t!==n&&ur(o,"get",t),ur(o,"get",n));const{has:f}=ts(o),p=e?Xa:i?nu:$i;if(f.call(o,t))return p(r.get(t));if(f.call(o,n))return p(r.get(n));r!==o&&r.get(t)}function mo(r,t=!1){const i=this.__v_raw,e=Et(i),o=Et(r);return t||(r!==o&&ur(e,"has",r),ur(e,"has",o)),r===o?i.has(r):i.has(r)||i.has(o)}function go(r,t=!1){return r=r.__v_raw,!t&&ur(Et(r),"iterate",Gn),Reflect.get(r,"size",r)}function Hu(r){r=Et(r);const t=Et(this);return ts(t).has.call(t,r)||(t.add(r),mn(t,"add",r,r)),this}function zu(r,t){t=Et(t);const i=Et(this),{has:e,get:o}=ts(i);let n=e.call(i,r);n||(r=Et(r),n=e.call(i,r));const f=o.call(i,r);return i.set(r,t),n?Yi(t,f)&&mn(i,"set",r,t):mn(i,"add",r,t),this}function Wu(r){const t=Et(this),{has:i,get:e}=ts(t);let o=i.call(t,r);o||(r=Et(r),o=i.call(t,r)),e&&e.call(t,r);const n=t.delete(r);return o&&mn(t,"delete",r,void 0),n}function Ku(){const r=Et(this),t=r.size!==0,i=r.clear();return t&&mn(r,"clear",void 0,void 0),i}function vo(r,t){return function(e,o){const n=this,f=n.__v_raw,p=Et(f),u=t?Xa:r?nu:$i;return!r&&ur(p,"iterate",Gn),f.forEach((c,s)=>e.call(o,u(c),u(s),n))}}function bo(r,t,i){return function(...e){const o=this.__v_raw,n=Et(o),f=ai(n),p=r==="entries"||r===Symbol.iterator&&f,u=r==="keys"&&f,c=o[r](...e),s=i?Xa:t?nu:$i;return!t&&ur(n,"iterate",u?Qs:Gn),{next(){const{value:l,done:d}=c.next();return d?{value:l,done:d}:{value:p?[s(l[0]),s(l[1])]:s(l),done:d}},[Symbol.iterator](){return this}}}}function _n(r){return function(...t){return r==="delete"?!1:this}}function U0(){const r={get(n){return po(this,n)},get size(){return go(this)},has:mo,add:Hu,set:zu,delete:Wu,clear:Ku,forEach:vo(!1,!1)},t={get(n){return po(this,n,!1,!0)},get size(){return go(this)},has:mo,add:Hu,set:zu,delete:Wu,clear:Ku,forEach:vo(!1,!0)},i={get(n){return po(this,n,!0)},get size(){return go(this,!0)},has(n){return mo.call(this,n,!0)},add:_n("add"),set:_n("set"),delete:_n("delete"),clear:_n("clear"),forEach:vo(!0,!1)},e={get(n){return po(this,n,!0,!0)},get size(){return go(this,!0)},has(n){return mo.call(this,n,!0)},add:_n("add"),set:_n("set"),delete:_n("delete"),clear:_n("clear"),forEach:vo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=bo(n,!1,!1),i[n]=bo(n,!0,!1),t[n]=bo(n,!1,!0),e[n]=bo(n,!0,!0)}),[r,i,t,e]}const[D0,F0,q0,H0]=U0();function eu(r,t){const i=t?r?H0:q0:r?F0:D0;return(e,o,n)=>o==="__v_isReactive"?!r:o==="__v_isReadonly"?r:o==="__v_raw"?e:Reflect.get(St(i,o)&&o in e?i:e,o,n)}const z0={get:eu(!1,!1)},W0={get:eu(!1,!0)},K0={get:eu(!0,!1)},El=new WeakMap,Sl=new WeakMap,kl=new WeakMap,G0=new WeakMap;function V0(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function J0(r){return r.__v_skip||!Object.isExtensible(r)?0:V0(g0(r))}function Ai(r){return li(r)?r:ru(r,!1,Al,z0,El)}function Y0(r){return ru(r,!1,j0,W0,Sl)}function tu(r){return ru(r,!0,L0,K0,kl)}function ru(r,t,i,e,o){if(!Ct(r)||r.__v_raw&&!(t&&r.__v_isReactive))return r;const n=o.get(r);if(n)return n;const f=J0(r);if(f===0)return r;const p=new Proxy(r,f===2?e:i);return o.set(r,p),p}function In(r){return li(r)?In(r.__v_raw):!!(r&&r.__v_isReactive)}function li(r){return!!(r&&r.__v_isReadonly)}function jo(r){return!!(r&&r.__v_isShallow)}function Rl(r){return In(r)||li(r)}function Et(r){const t=r&&r.__v_raw;return t?Et(t):r}function hi(r){return Bo(r,"__v_skip",!0),r}const $i=r=>Ct(r)?Ai(r):r,nu=r=>Ct(r)?tu(r):r;function Tl(r){Tn&&jr&&(r=Et(r),_l(r.dep||(r.dep=$a())))}function Il(r,t){r=Et(r);const i=r.dep;i&&Xs(i)}function Lt(r){return!!(r&&r.__v_isRef===!0)}function sr(r){return Pl(r,!1)}function Cl(r){return Pl(r,!0)}function Pl(r,t){return Lt(r)?r:new $0(r,t)}class $0{constructor(t,i){this.__v_isShallow=i,this.dep=void 0,this.__v_isRef=!0,this._rawValue=i?t:Et(t),this._value=i?t:$i(t)}get value(){return Tl(this),this._value}set value(t){const i=this.__v_isShallow||jo(t)||li(t);t=i?t:Et(t),Yi(t,this._rawValue)&&(this._rawValue=t,this._value=i?t:$i(t),Il(this))}}function Cn(r){return Lt(r)?r.value:r}const Z0={get:(r,t,i)=>Cn(Reflect.get(r,t,i)),set:(r,t,i,e)=>{const o=r[t];return Lt(o)&&!Lt(i)?(o.value=i,!0):Reflect.set(r,t,i,e)}};function Ol(r){return In(r)?r:new Proxy(r,Z0)}function Q0(r){const t=lt(r)?new Array(r.length):{};for(const i in r)t[i]=ep(r,i);return t}class X0{constructor(t,i,e){this._object=t,this._key=i,this._defaultValue=e,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return A0(Et(this._object),this._key)}}function ep(r,t,i){const e=r[t];return Lt(e)?e:new X0(r,t,i)}var Nl;class tp{constructor(t,i,e,o){this._setter=i,this.dep=void 0,this.__v_isRef=!0,this[Nl]=!1,this._dirty=!0,this.effect=new Za(t,()=>{this._dirty||(this._dirty=!0,Il(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=e}get value(){const t=Et(this);return Tl(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Nl="__v_isReadonly";function rp(r,t,i=!1){let e,o;const n=bt(r);return n?(e=r,o=Fr):(e=r.get,o=r.set),new tp(e,o,n||!o,i)}function Pn(r,t,i,e){let o;try{o=e?r(...e):r()}catch(n){rs(n,t,i)}return o}function xr(r,t,i,e){if(bt(r)){const n=Pn(r,t,i,e);return n&&dl(n)&&n.catch(f=>{rs(f,t,i)}),n}const o=[];for(let n=0;n<r.length;n++)o.push(xr(r[n],t,i,e));return o}function rs(r,t,i,e=!0){const o=t?t.vnode:null;if(t){let n=t.parent;const f=t.proxy,p=i;for(;n;){const c=n.ec;if(c){for(let s=0;s<c.length;s++)if(c[s](r,f,p)===!1)return}n=n.parent}const u=t.appContext.config.errorHandler;if(u){Pn(u,null,10,[r,f,p]);return}}np(r,i,o,e)}function np(r,t,i,e=!0){console.error(r)}let Zi=!1,ea=!1;const Yt=[];let Zr=0;const ui=[];let ln=null,Hn=0;const Bl=Promise.resolve();let iu=null;function ao(r){const t=iu||Bl;return r?t.then(this?r.bind(this):r):t}function ip(r){let t=Zr+1,i=Yt.length;for(;t<i;){const e=t+i>>>1;Qi(Yt[e])<r?t=e+1:i=e}return t}function ou(r){(!Yt.length||!Yt.includes(r,Zi&&r.allowRecurse?Zr+1:Zr))&&(r.id==null?Yt.push(r):Yt.splice(ip(r.id),0,r),Ll())}function Ll(){!Zi&&!ea&&(ea=!0,iu=Bl.then(Ul))}function op(r){const t=Yt.indexOf(r);t>Zr&&Yt.splice(t,1)}function sp(r){lt(r)?ui.push(...r):(!ln||!ln.includes(r,r.allowRecurse?Hn+1:Hn))&&ui.push(r),Ll()}function Gu(r,t=Zi?Zr+1:0){for(;t<Yt.length;t++){const i=Yt[t];i&&i.pre&&(Yt.splice(t,1),t--,i())}}function jl(r){if(ui.length){const t=[...new Set(ui)];if(ui.length=0,ln){ln.push(...t);return}for(ln=t,ln.sort((i,e)=>Qi(i)-Qi(e)),Hn=0;Hn<ln.length;Hn++)ln[Hn]();ln=null,Hn=0}}const Qi=r=>r.id==null?1/0:r.id,ap=(r,t)=>{const i=Qi(r)-Qi(t);if(i===0){if(r.pre&&!t.pre)return-1;if(t.pre&&!r.pre)return 1}return i};function Ul(r){ea=!1,Zi=!0,Yt.sort(ap);const t=Fr;try{for(Zr=0;Zr<Yt.length;Zr++){const i=Yt[Zr];i&&i.active!==!1&&Pn(i,null,14)}}finally{Zr=0,Yt.length=0,jl(),Zi=!1,iu=null,(Yt.length||ui.length)&&Ul()}}function up(r,t,...i){if(r.isUnmounted)return;const e=r.vnode.props||Tt;let o=i;const n=t.startsWith("update:"),f=n&&t.slice(7);if(f&&f in e){const s=`${f==="modelValue"?"model":f}Modifiers`,{number:l,trim:d}=e[s]||Tt;d&&(o=i.map(b=>qt(b)?b.trim():b)),l&&(o=i.map(y0))}let p,u=e[p=As(t)]||e[p=As(on(t))];!u&&n&&(u=e[p=As(_i(t))]),u&&xr(u,r,6,o);const c=e[p+"Once"];if(c){if(!r.emitted)r.emitted={};else if(r.emitted[p])return;r.emitted[p]=!0,xr(c,r,6,o)}}function Dl(r,t,i=!1){const e=t.emitsCache,o=e.get(r);if(o!==void 0)return o;const n=r.emits;let f={},p=!1;if(!bt(r)){const u=c=>{const s=Dl(c,t,!0);s&&(p=!0,Xt(f,s))};!i&&t.mixins.length&&t.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}return!n&&!p?(Ct(r)&&e.set(r,null),null):(lt(n)?n.forEach(u=>f[u]=null):Xt(f,n),Ct(r)&&e.set(r,f),f)}function ns(r,t){return!r||!Zo(t)?!1:(t=t.slice(2).replace(/Once$/,""),St(r,t[0].toLowerCase()+t.slice(1))||St(r,_i(t))||St(r,t))}let $t=null,Fl=null;function Uo(r){const t=$t;return $t=r,Fl=r&&r.type.__scopeId||null,t}function fp(r,t=$t,i){if(!t||r._n)return r;const e=(...o)=>{e._d&&nf(-1);const n=Uo(t);let f;try{f=r(...o)}finally{Uo(n),e._d&&nf(1)}return f};return e._n=!0,e._c=!0,e._d=!0,e}function Ss(r){const{type:t,vnode:i,proxy:e,withProxy:o,props:n,propsOptions:[f],slots:p,attrs:u,emit:c,render:s,renderCache:l,data:d,setupState:b,ctx:v,inheritAttrs:y}=r;let x,E;const R=Uo(r);try{if(i.shapeFlag&4){const O=o||e;x=Vr(s.call(O,O,l,n,b,d,v)),E=u}else{const O=t;x=Vr(O.length>1?O(n,{attrs:u,slots:p,emit:c}):O(n,null)),E=t.props?u:cp(u)}}catch(O){zi.length=0,rs(O,r,1),x=Zt(Sr)}let I=x;if(E&&y!==!1){const O=Object.keys(E),{shapeFlag:A}=I;O.length&&A&7&&(f&&O.some(Wa)&&(E=lp(E,f)),I=Nn(I,E))}return i.dirs&&(I=Nn(I),I.dirs=I.dirs?I.dirs.concat(i.dirs):i.dirs),i.transition&&(I.transition=i.transition),x=I,Uo(R),x}const cp=r=>{let t;for(const i in r)(i==="class"||i==="style"||Zo(i))&&((t||(t={}))[i]=r[i]);return t},lp=(r,t)=>{const i={};for(const e in r)(!Wa(e)||!(e.slice(9)in t))&&(i[e]=r[e]);return i};function hp(r,t,i){const{props:e,children:o,component:n}=r,{props:f,children:p,patchFlag:u}=t,c=n.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&u>=0){if(u&1024)return!0;if(u&16)return e?Vu(e,f,c):!!f;if(u&8){const s=t.dynamicProps;for(let l=0;l<s.length;l++){const d=s[l];if(f[d]!==e[d]&&!ns(c,d))return!0}}}else return(o||p)&&(!p||!p.$stable)?!0:e===f?!1:e?f?Vu(e,f,c):!0:!!f;return!1}function Vu(r,t,i){const e=Object.keys(t);if(e.length!==Object.keys(r).length)return!0;for(let o=0;o<e.length;o++){const n=e[o];if(t[n]!==r[n]&&!ns(i,n))return!0}return!1}function dp({vnode:r,parent:t},i){for(;t&&t.subTree===r;)(r=t.vnode).el=i,t=t.parent}const pp=r=>r.__isSuspense;function mp(r,t){t&&t.pendingBranch?lt(r)?t.effects.push(...r):t.effects.push(r):sp(r)}function ko(r,t){if(jt){let i=jt.provides;const e=jt.parent&&jt.parent.provides;e===i&&(i=jt.provides=Object.create(e)),i[r]=t}}function Ar(r,t,i=!1){const e=jt||$t;if(e){const o=e.parent==null?e.vnode.appContext&&e.vnode.appContext.provides:e.parent.provides;if(o&&r in o)return o[r];if(arguments.length>1)return i&&bt(t)?t.call(e.proxy):t}}function gp(r,t){return su(r,null,t)}const yo={};function Er(r,t,i){return su(r,t,i)}function su(r,t,{immediate:i,deep:e,flush:o,onTrack:n,onTrigger:f}=Tt){const p=Ya()===(jt==null?void 0:jt.scope)?jt:null;let u,c=!1,s=!1;if(Lt(r)?(u=()=>r.value,c=jo(r)):In(r)?(u=()=>r,e=!0):lt(r)?(s=!0,c=r.some(I=>In(I)||jo(I)),u=()=>r.map(I=>{if(Lt(I))return I.value;if(In(I))return ri(I);if(bt(I))return Pn(I,p,2)})):bt(r)?t?u=()=>Pn(r,p,2):u=()=>{if(!(p&&p.isUnmounted))return l&&l(),xr(r,p,3,[d])}:u=Fr,t&&e){const I=u;u=()=>ri(I())}let l,d=I=>{l=E.onStop=()=>{Pn(I,p,4)}},b;if(eo)if(d=Fr,t?i&&xr(t,p,3,[u(),s?[]:void 0,d]):u(),o==="sync"){const I=p1();b=I.__watcherHandles||(I.__watcherHandles=[])}else return Fr;let v=s?new Array(r.length).fill(yo):yo;const y=()=>{if(E.active)if(t){const I=E.run();(e||c||(s?I.some((O,A)=>Yi(O,v[A])):Yi(I,v)))&&(l&&l(),xr(t,p,3,[I,v===yo?void 0:s&&v[0]===yo?[]:v,d]),v=I)}else E.run()};y.allowRecurse=!!t;let x;o==="sync"?x=y:o==="post"?x=()=>or(y,p&&p.suspense):(y.pre=!0,p&&(y.id=p.uid),x=()=>ou(y));const E=new Za(u,x);t?i?y():v=E.run():o==="post"?or(E.run.bind(E),p&&p.suspense):E.run();const R=()=>{E.stop(),p&&p.scope&&Ka(p.scope.effects,E)};return b&&b.push(R),R}function vp(r,t,i){const e=this.proxy,o=qt(r)?r.includes(".")?ql(e,r):()=>e[r]:r.bind(e,e);let n;bt(t)?n=t:(n=t.handler,i=t);const f=jt;di(this);const p=su(o,n.bind(e),i);return f?di(f):Vn(),p}function ql(r,t){const i=t.split(".");return()=>{let e=r;for(let o=0;o<i.length&&e;o++)e=e[i[o]];return e}}function ri(r,t){if(!Ct(r)||r.__v_skip||(t=t||new Set,t.has(r)))return r;if(t.add(r),Lt(r))ri(r.value,t);else if(lt(r))for(let i=0;i<r.length;i++)ri(r[i],t);else if(hl(r)||ai(r))r.forEach(i=>{ri(i,t)});else if(ml(r))for(const i in r)ri(r[i],t);return r}function bp(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ss(()=>{r.isMounted=!0}),Kl(()=>{r.isUnmounting=!0}),r}const _r=[Function,Array],yp={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:_r,onEnter:_r,onAfterEnter:_r,onEnterCancelled:_r,onBeforeLeave:_r,onLeave:_r,onAfterLeave:_r,onLeaveCancelled:_r,onBeforeAppear:_r,onAppear:_r,onAfterAppear:_r,onAppearCancelled:_r},setup(r,{slots:t}){const i=Ei(),e=bp();let o;return()=>{const n=t.default&&zl(t.default(),!0);if(!n||!n.length)return;let f=n[0];if(n.length>1){for(const y of n)if(y.type!==Sr){f=y;break}}const p=Et(r),{mode:u}=p;if(e.isLeaving)return ks(f);const c=Ju(f);if(!c)return ks(f);const s=ta(c,p,e,i);ra(c,s);const l=i.subTree,d=l&&Ju(l);let b=!1;const{getTransitionKey:v}=c.type;if(v){const y=v();o===void 0?o=y:y!==o&&(o=y,b=!0)}if(d&&d.type!==Sr&&(!zn(c,d)||b)){const y=ta(d,p,e,i);if(ra(d,y),u==="out-in")return e.isLeaving=!0,y.afterLeave=()=>{e.isLeaving=!1,i.update.active!==!1&&i.update()},ks(f);u==="in-out"&&c.type!==Sr&&(y.delayLeave=(x,E,R)=>{const I=Hl(e,d);I[String(d.key)]=d,x._leaveCb=()=>{E(),x._leaveCb=void 0,delete s.delayedLeave},s.delayedLeave=R})}return f}}},wp=yp;function Hl(r,t){const{leavingVNodes:i}=r;let e=i.get(t.type);return e||(e=Object.create(null),i.set(t.type,e)),e}function ta(r,t,i,e){const{appear:o,mode:n,persisted:f=!1,onBeforeEnter:p,onEnter:u,onAfterEnter:c,onEnterCancelled:s,onBeforeLeave:l,onLeave:d,onAfterLeave:b,onLeaveCancelled:v,onBeforeAppear:y,onAppear:x,onAfterAppear:E,onAppearCancelled:R}=t,I=String(r.key),O=Hl(i,r),A=(L,H)=>{L&&xr(L,e,9,H)},P=(L,H)=>{const J=H[1];A(L,H),lt(L)?L.every(G=>G.length<=1)&&J():L.length<=1&&J()},N={mode:n,persisted:f,beforeEnter(L){let H=p;if(!i.isMounted)if(o)H=y||p;else return;L._leaveCb&&L._leaveCb(!0);const J=O[I];J&&zn(r,J)&&J.el._leaveCb&&J.el._leaveCb(),A(H,[L])},enter(L){let H=u,J=c,G=s;if(!i.isMounted)if(o)H=x||u,J=E||c,G=R||s;else return;let z=!1;const S=L._enterCb=a=>{z||(z=!0,a?A(G,[L]):A(J,[L]),N.delayedLeave&&N.delayedLeave(),L._enterCb=void 0)};H?P(H,[L,S]):S()},leave(L,H){const J=String(r.key);if(L._enterCb&&L._enterCb(!0),i.isUnmounting)return H();A(l,[L]);let G=!1;const z=L._leaveCb=S=>{G||(G=!0,H(),S?A(v,[L]):A(b,[L]),L._leaveCb=void 0,O[J]===r&&delete O[J])};O[J]=r,d?P(d,[L,z]):z()},clone(L){return ta(L,t,i,e)}};return N}function ks(r){if(is(r))return r=Nn(r),r.children=null,r}function Ju(r){return is(r)?r.children?r.children[0]:void 0:r}function ra(r,t){r.shapeFlag&6&&r.component?ra(r.component.subTree,t):r.shapeFlag&128?(r.ssContent.transition=t.clone(r.ssContent),r.ssFallback.transition=t.clone(r.ssFallback)):r.transition=t}function zl(r,t=!1,i){let e=[],o=0;for(let n=0;n<r.length;n++){let f=r[n];const p=i==null?f.key:String(i)+String(f.key!=null?f.key:n);f.type===pr?(f.patchFlag&128&&o++,e=e.concat(zl(f.children,t,p))):(t||f.type!==Sr)&&e.push(p!=null?Nn(f,{key:p}):f)}if(o>1)for(let n=0;n<e.length;n++)e[n].patchFlag=-2;return e}function au(r){return bt(r)?{setup:r,name:r.name}:r}const Fi=r=>!!r.type.__asyncLoader,is=r=>r.type.__isKeepAlive;function _p(r,t){Wl(r,"a",t)}function Mp(r,t){Wl(r,"da",t)}function Wl(r,t,i=jt){const e=r.__wdc||(r.__wdc=()=>{let o=i;for(;o;){if(o.isDeactivated)return;o=o.parent}return r()});if(os(t,e,i),i){let o=i.parent;for(;o&&o.parent;)is(o.parent.vnode)&&xp(e,t,i,o),o=o.parent}}function xp(r,t,i,e){const o=os(t,r,e,!0);uu(()=>{Ka(e[t],o)},i)}function os(r,t,i=jt,e=!1){if(i){const o=i[r]||(i[r]=[]),n=t.__weh||(t.__weh=(...f)=>{if(i.isUnmounted)return;Mi(),di(i);const p=xr(t,i,r,f);return Vn(),xi(),p});return e?o.unshift(n):o.push(n),n}}const yn=r=>(t,i=jt)=>(!eo||r==="sp")&&os(r,(...e)=>t(...e),i),Ap=yn("bm"),ss=yn("m"),Ep=yn("bu"),Sp=yn("u"),Kl=yn("bum"),uu=yn("um"),kp=yn("sp"),Rp=yn("rtg"),Tp=yn("rtc");function Ip(r,t=jt){os("ec",r,t)}function Dn(r,t,i,e){const o=r.dirs,n=t&&t.dirs;for(let f=0;f<o.length;f++){const p=o[f];n&&(p.oldValue=n[f].value);let u=p.dir[e];u&&(Mi(),xr(u,i,8,[r.el,p,r,t]),xi())}}const Gl="components";function Cp(r,t){return Op(Gl,r,!0,t)||r}const Pp=Symbol();function Op(r,t,i=!0,e=!1){const o=$t||jt;if(o){const n=o.type;if(r===Gl){const p=l1(n,!1);if(p&&(p===t||p===on(t)||p===es(on(t))))return n}const f=Yu(o[r]||n[r],t)||Yu(o.appContext[r],t);return!f&&e?n:f}}function Yu(r,t){return r&&(r[t]||r[on(t)]||r[es(on(t))])}function a_(r,t,i,e){let o;const n=i&&i[e];if(lt(r)||qt(r)){o=new Array(r.length);for(let f=0,p=r.length;f<p;f++)o[f]=t(r[f],f,void 0,n&&n[f])}else if(typeof r=="number"){o=new Array(r);for(let f=0;f<r;f++)o[f]=t(f+1,f,void 0,n&&n[f])}else if(Ct(r))if(r[Symbol.iterator])o=Array.from(r,(f,p)=>t(f,p,void 0,n&&n[p]));else{const f=Object.keys(r);o=new Array(f.length);for(let p=0,u=f.length;p<u;p++){const c=f[p];o[p]=t(r[c],c,p,n&&n[p])}}else o=[];return i&&(i[e]=o),o}function u_(r,t,i={},e,o){if($t.isCE||$t.parent&&Fi($t.parent)&&$t.parent.isCE)return t!=="default"&&(i.name=t),Zt("slot",i,e&&e());let n=r[t];n&&n._c&&(n._d=!1),hu();const f=n&&Vl(n(i)),p=du(pr,{key:i.key||f&&f.key||`_${t}`},f||(e?e():[]),f&&r._===1?64:-2);return!o&&p.scopeId&&(p.slotScopeIds=[p.scopeId+"-s"]),n&&n._c&&(n._d=!0),p}function Vl(r){return r.some(t=>Fo(t)?!(t.type===Sr||t.type===pr&&!Vl(t.children)):!0)?r:null}const na=r=>r?oh(r)?mu(r)||r.proxy:na(r.parent):null,qi=Xt(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>na(r.parent),$root:r=>na(r.root),$emit:r=>r.emit,$options:r=>fu(r),$forceUpdate:r=>r.f||(r.f=()=>ou(r.update)),$nextTick:r=>r.n||(r.n=ao.bind(r.proxy)),$watch:r=>vp.bind(r)}),Rs=(r,t)=>r!==Tt&&!r.__isScriptSetup&&St(r,t),Np={get({_:r},t){const{ctx:i,setupState:e,data:o,props:n,accessCache:f,type:p,appContext:u}=r;let c;if(t[0]!=="$"){const b=f[t];if(b!==void 0)switch(b){case 1:return e[t];case 2:return o[t];case 4:return i[t];case 3:return n[t]}else{if(Rs(e,t))return f[t]=1,e[t];if(o!==Tt&&St(o,t))return f[t]=2,o[t];if((c=r.propsOptions[0])&&St(c,t))return f[t]=3,n[t];if(i!==Tt&&St(i,t))return f[t]=4,i[t];ia&&(f[t]=0)}}const s=qi[t];let l,d;if(s)return t==="$attrs"&&ur(r,"get",t),s(r);if((l=p.__cssModules)&&(l=l[t]))return l;if(i!==Tt&&St(i,t))return f[t]=4,i[t];if(d=u.config.globalProperties,St(d,t))return d[t]},set({_:r},t,i){const{data:e,setupState:o,ctx:n}=r;return Rs(o,t)?(o[t]=i,!0):e!==Tt&&St(e,t)?(e[t]=i,!0):St(r.props,t)||t[0]==="$"&&t.slice(1)in r?!1:(n[t]=i,!0)},has({_:{data:r,setupState:t,accessCache:i,ctx:e,appContext:o,propsOptions:n}},f){let p;return!!i[f]||r!==Tt&&St(r,f)||Rs(t,f)||(p=n[0])&&St(p,f)||St(e,f)||St(qi,f)||St(o.config.globalProperties,f)},defineProperty(r,t,i){return i.get!=null?r._.accessCache[t]=0:St(i,"value")&&this.set(r,t,i.value,null),Reflect.defineProperty(r,t,i)}};let ia=!0;function Bp(r){const t=fu(r),i=r.proxy,e=r.ctx;ia=!1,t.beforeCreate&&$u(t.beforeCreate,r,"bc");const{data:o,computed:n,methods:f,watch:p,provide:u,inject:c,created:s,beforeMount:l,mounted:d,beforeUpdate:b,updated:v,activated:y,deactivated:x,beforeDestroy:E,beforeUnmount:R,destroyed:I,unmounted:O,render:A,renderTracked:P,renderTriggered:N,errorCaptured:L,serverPrefetch:H,expose:J,inheritAttrs:G,components:z,directives:S,filters:a}=t;if(c&&Lp(c,e,null,r.appContext.config.unwrapInjectedRef),f)for(const m in f){const g=f[m];bt(g)&&(e[m]=g.bind(i))}if(o){const m=o.call(i,i);Ct(m)&&(r.data=Ai(m))}if(ia=!0,n)for(const m in n){const g=n[m],_=bt(g)?g.bind(i,i):bt(g.get)?g.get.bind(i,i):Fr,T=!bt(g)&&bt(g.set)?g.set.bind(i):Fr,k=Ut({get:_,set:T});Object.defineProperty(e,m,{enumerable:!0,configurable:!0,get:()=>k.value,set:M=>k.value=M})}if(p)for(const m in p)Jl(p[m],e,i,m);if(u){const m=bt(u)?u.call(i):u;Reflect.ownKeys(m).forEach(g=>{ko(g,m[g])})}s&&$u(s,r,"c");function h(m,g){lt(g)?g.forEach(_=>m(_.bind(i))):g&&m(g.bind(i))}if(h(Ap,l),h(ss,d),h(Ep,b),h(Sp,v),h(_p,y),h(Mp,x),h(Ip,L),h(Tp,P),h(Rp,N),h(Kl,R),h(uu,O),h(kp,H),lt(J))if(J.length){const m=r.exposed||(r.exposed={});J.forEach(g=>{Object.defineProperty(m,g,{get:()=>i[g],set:_=>i[g]=_})})}else r.exposed||(r.exposed={});A&&r.render===Fr&&(r.render=A),G!=null&&(r.inheritAttrs=G),z&&(r.components=z),S&&(r.directives=S)}function Lp(r,t,i=Fr,e=!1){lt(r)&&(r=oa(r));for(const o in r){const n=r[o];let f;Ct(n)?"default"in n?f=Ar(n.from||o,n.default,!0):f=Ar(n.from||o):f=Ar(n),Lt(f)&&e?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>f.value,set:p=>f.value=p}):t[o]=f}}function $u(r,t,i){xr(lt(r)?r.map(e=>e.bind(t.proxy)):r.bind(t.proxy),t,i)}function Jl(r,t,i,e){const o=e.includes(".")?ql(i,e):()=>i[e];if(qt(r)){const n=t[r];bt(n)&&Er(o,n)}else if(bt(r))Er(o,r.bind(i));else if(Ct(r))if(lt(r))r.forEach(n=>Jl(n,t,i,e));else{const n=bt(r.handler)?r.handler.bind(i):t[r.handler];bt(n)&&Er(o,n,r)}}function fu(r){const t=r.type,{mixins:i,extends:e}=t,{mixins:o,optionsCache:n,config:{optionMergeStrategies:f}}=r.appContext,p=n.get(t);let u;return p?u=p:!o.length&&!i&&!e?u=t:(u={},o.length&&o.forEach(c=>Do(u,c,f,!0)),Do(u,t,f)),Ct(t)&&n.set(t,u),u}function Do(r,t,i,e=!1){const{mixins:o,extends:n}=t;n&&Do(r,n,i,!0),o&&o.forEach(f=>Do(r,f,i,!0));for(const f in t)if(!(e&&f==="expose")){const p=jp[f]||i&&i[f];r[f]=p?p(r[f],t[f]):t[f]}return r}const jp={data:Zu,props:qn,emits:qn,methods:qn,computed:qn,beforeCreate:er,created:er,beforeMount:er,mounted:er,beforeUpdate:er,updated:er,beforeDestroy:er,beforeUnmount:er,destroyed:er,unmounted:er,activated:er,deactivated:er,errorCaptured:er,serverPrefetch:er,components:qn,directives:qn,watch:Dp,provide:Zu,inject:Up};function Zu(r,t){return t?r?function(){return Xt(bt(r)?r.call(this,this):r,bt(t)?t.call(this,this):t)}:t:r}function Up(r,t){return qn(oa(r),oa(t))}function oa(r){if(lt(r)){const t={};for(let i=0;i<r.length;i++)t[r[i]]=r[i];return t}return r}function er(r,t){return r?[...new Set([].concat(r,t))]:t}function qn(r,t){return r?Xt(Xt(Object.create(null),r),t):t}function Dp(r,t){if(!r)return t;if(!t)return r;const i=Xt(Object.create(null),r);for(const e in t)i[e]=er(r[e],t[e]);return i}function Fp(r,t,i,e=!1){const o={},n={};Bo(n,as,1),r.propsDefaults=Object.create(null),Yl(r,t,o,n);for(const f in r.propsOptions[0])f in o||(o[f]=void 0);i?r.props=e?o:Y0(o):r.type.props?r.props=o:r.props=n,r.attrs=n}function qp(r,t,i,e){const{props:o,attrs:n,vnode:{patchFlag:f}}=r,p=Et(o),[u]=r.propsOptions;let c=!1;if((e||f>0)&&!(f&16)){if(f&8){const s=r.vnode.dynamicProps;for(let l=0;l<s.length;l++){let d=s[l];if(ns(r.emitsOptions,d))continue;const b=t[d];if(u)if(St(n,d))b!==n[d]&&(n[d]=b,c=!0);else{const v=on(d);o[v]=sa(u,p,v,b,r,!1)}else b!==n[d]&&(n[d]=b,c=!0)}}}else{Yl(r,t,o,n)&&(c=!0);let s;for(const l in p)(!t||!St(t,l)&&((s=_i(l))===l||!St(t,s)))&&(u?i&&(i[l]!==void 0||i[s]!==void 0)&&(o[l]=sa(u,p,l,void 0,r,!0)):delete o[l]);if(n!==p)for(const l in n)(!t||!St(t,l))&&(delete n[l],c=!0)}c&&mn(r,"set","$attrs")}function Yl(r,t,i,e){const[o,n]=r.propsOptions;let f=!1,p;if(t)for(let u in t){if(So(u))continue;const c=t[u];let s;o&&St(o,s=on(u))?!n||!n.includes(s)?i[s]=c:(p||(p={}))[s]=c:ns(r.emitsOptions,u)||(!(u in e)||c!==e[u])&&(e[u]=c,f=!0)}if(n){const u=Et(i),c=p||Tt;for(let s=0;s<n.length;s++){const l=n[s];i[l]=sa(o,u,l,c[l],r,!St(c,l))}}return f}function sa(r,t,i,e,o,n){const f=r[i];if(f!=null){const p=St(f,"default");if(p&&e===void 0){const u=f.default;if(f.type!==Function&&bt(u)){const{propsDefaults:c}=o;i in c?e=c[i]:(di(o),e=c[i]=u.call(null,t),Vn())}else e=u}f[0]&&(n&&!p?e=!1:f[1]&&(e===""||e===_i(i))&&(e=!0))}return e}function $l(r,t,i=!1){const e=t.propsCache,o=e.get(r);if(o)return o;const n=r.props,f={},p=[];let u=!1;if(!bt(r)){const s=l=>{u=!0;const[d,b]=$l(l,t,!0);Xt(f,d),b&&p.push(...b)};!i&&t.mixins.length&&t.mixins.forEach(s),r.extends&&s(r.extends),r.mixins&&r.mixins.forEach(s)}if(!n&&!u)return Ct(r)&&e.set(r,si),si;if(lt(n))for(let s=0;s<n.length;s++){const l=on(n[s]);Qu(l)&&(f[l]=Tt)}else if(n)for(const s in n){const l=on(s);if(Qu(l)){const d=n[s],b=f[l]=lt(d)||bt(d)?{type:d}:Object.assign({},d);if(b){const v=tf(Boolean,b.type),y=tf(String,b.type);b[0]=v>-1,b[1]=y<0||v<y,(v>-1||St(b,"default"))&&p.push(l)}}}const c=[f,p];return Ct(r)&&e.set(r,c),c}function Qu(r){return r[0]!=="$"}function Xu(r){const t=r&&r.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:r===null?"null":""}function ef(r,t){return Xu(r)===Xu(t)}function tf(r,t){return lt(t)?t.findIndex(i=>ef(i,r)):bt(t)&&ef(t,r)?0:-1}const Zl=r=>r[0]==="_"||r==="$stable",cu=r=>lt(r)?r.map(Vr):[Vr(r)],Hp=(r,t,i)=>{if(t._n)return t;const e=fp((...o)=>cu(t(...o)),i);return e._c=!1,e},Ql=(r,t,i)=>{const e=r._ctx;for(const o in r){if(Zl(o))continue;const n=r[o];if(bt(n))t[o]=Hp(o,n,e);else if(n!=null){const f=cu(n);t[o]=()=>f}}},Xl=(r,t)=>{const i=cu(t);r.slots.default=()=>i},zp=(r,t)=>{if(r.vnode.shapeFlag&32){const i=t._;i?(r.slots=Et(t),Bo(t,"_",i)):Ql(t,r.slots={})}else r.slots={},t&&Xl(r,t);Bo(r.slots,as,1)},Wp=(r,t,i)=>{const{vnode:e,slots:o}=r;let n=!0,f=Tt;if(e.shapeFlag&32){const p=t._;p?i&&p===1?n=!1:(Xt(o,t),!i&&p===1&&delete o._):(n=!t.$stable,Ql(t,o)),f=t}else t&&(Xl(r,t),f={default:1});if(n)for(const p in o)!Zl(p)&&!(p in f)&&delete o[p]};function eh(){return{app:null,config:{isNativeTag:d0,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Kp=0;function Gp(r,t){return function(e,o=null){bt(e)||(e=Object.assign({},e)),o!=null&&!Ct(o)&&(o=null);const n=eh(),f=new Set;let p=!1;const u=n.app={_uid:Kp++,_component:e,_props:o,_container:null,_context:n,_instance:null,version:m1,get config(){return n.config},set config(c){},use(c,...s){return f.has(c)||(c&&bt(c.install)?(f.add(c),c.install(u,...s)):bt(c)&&(f.add(c),c(u,...s))),u},mixin(c){return n.mixins.includes(c)||n.mixins.push(c),u},component(c,s){return s?(n.components[c]=s,u):n.components[c]},directive(c,s){return s?(n.directives[c]=s,u):n.directives[c]},mount(c,s,l){if(!p){const d=Zt(e,o);return d.appContext=n,s&&t?t(d,c):r(d,c,l),p=!0,u._container=c,c.__vue_app__=u,mu(d.component)||d.component.proxy}},unmount(){p&&(r(null,u._container),delete u._container.__vue_app__)},provide(c,s){return n.provides[c]=s,u}};return u}}function aa(r,t,i,e,o=!1){if(lt(r)){r.forEach((d,b)=>aa(d,t&&(lt(t)?t[b]:t),i,e,o));return}if(Fi(e)&&!o)return;const n=e.shapeFlag&4?mu(e.component)||e.component.proxy:e.el,f=o?null:n,{i:p,r:u}=r,c=t&&t.r,s=p.refs===Tt?p.refs={}:p.refs,l=p.setupState;if(c!=null&&c!==u&&(qt(c)?(s[c]=null,St(l,c)&&(l[c]=null)):Lt(c)&&(c.value=null)),bt(u))Pn(u,p,12,[f,s]);else{const d=qt(u),b=Lt(u);if(d||b){const v=()=>{if(r.f){const y=d?St(l,u)?l[u]:s[u]:u.value;o?lt(y)&&Ka(y,n):lt(y)?y.includes(n)||y.push(n):d?(s[u]=[n],St(l,u)&&(l[u]=s[u])):(u.value=[n],r.k&&(s[r.k]=u.value))}else d?(s[u]=f,St(l,u)&&(l[u]=f)):b&&(u.value=f,r.k&&(s[r.k]=f))};f?(v.id=-1,or(v,i)):v()}}}const or=mp;function Vp(r){return Jp(r)}function Jp(r,t){const i=w0();i.__VUE__=!0;const{insert:e,remove:o,patchProp:n,createElement:f,createText:p,createComment:u,setText:c,setElementText:s,parentNode:l,nextSibling:d,setScopeId:b=Fr,insertStaticContent:v}=r,y=(F,$,V,Z=null,ee=null,re=null,ue=!1,fe=null,oe=!!$.dynamicChildren)=>{if(F===$)return;F&&!zn(F,$)&&(Z=W(F),M(F,ee,re,!0),F=null),$.patchFlag===-2&&(oe=!1,$.dynamicChildren=null);const{type:ae,ref:ie,shapeFlag:te}=$;switch(ae){case uo:x(F,$,V,Z);break;case Sr:E(F,$,V,Z);break;case Ro:F==null&&R($,V,Z,ue);break;case pr:z(F,$,V,Z,ee,re,ue,fe,oe);break;default:te&1?A(F,$,V,Z,ee,re,ue,fe,oe):te&6?S(F,$,V,Z,ee,re,ue,fe,oe):(te&64||te&128)&&ae.process(F,$,V,Z,ee,re,ue,fe,oe,q)}ie!=null&&ee&&aa(ie,F&&F.ref,re,$||F,!$)},x=(F,$,V,Z)=>{if(F==null)e($.el=p($.children),V,Z);else{const ee=$.el=F.el;$.children!==F.children&&c(ee,$.children)}},E=(F,$,V,Z)=>{F==null?e($.el=u($.children||""),V,Z):$.el=F.el},R=(F,$,V,Z)=>{[F.el,F.anchor]=v(F.children,$,V,Z,F.el,F.anchor)},I=({el:F,anchor:$},V,Z)=>{let ee;for(;F&&F!==$;)ee=d(F),e(F,V,Z),F=ee;e($,V,Z)},O=({el:F,anchor:$})=>{let V;for(;F&&F!==$;)V=d(F),o(F),F=V;o($)},A=(F,$,V,Z,ee,re,ue,fe,oe)=>{ue=ue||$.type==="svg",F==null?P($,V,Z,ee,re,ue,fe,oe):H(F,$,ee,re,ue,fe,oe)},P=(F,$,V,Z,ee,re,ue,fe)=>{let oe,ae;const{type:ie,props:te,shapeFlag:le,transition:ge,dirs:he}=F;if(oe=F.el=f(F.type,re,te&&te.is,te),le&8?s(oe,F.children):le&16&&L(F.children,oe,null,Z,ee,re&&ie!=="foreignObject",ue,fe),he&&Dn(F,null,Z,"created"),N(oe,F,F.scopeId,ue,Z),te){for(const Ie in te)Ie!=="value"&&!So(Ie)&&n(oe,Ie,null,te[Ie],re,F.children,Z,ee,K);"value"in te&&n(oe,"value",null,te.value),(ae=te.onVnodeBeforeMount)&&Kr(ae,Z,F)}he&&Dn(F,null,Z,"beforeMount");const ye=(!ee||ee&&!ee.pendingBranch)&&ge&&!ge.persisted;ye&&ge.beforeEnter(oe),e(oe,$,V),((ae=te&&te.onVnodeMounted)||ye||he)&&or(()=>{ae&&Kr(ae,Z,F),ye&&ge.enter(oe),he&&Dn(F,null,Z,"mounted")},ee)},N=(F,$,V,Z,ee)=>{if(V&&b(F,V),Z)for(let re=0;re<Z.length;re++)b(F,Z[re]);if(ee){let re=ee.subTree;if($===re){const ue=ee.vnode;N(F,ue,ue.scopeId,ue.slotScopeIds,ee.parent)}}},L=(F,$,V,Z,ee,re,ue,fe,oe=0)=>{for(let ae=oe;ae<F.length;ae++){const ie=F[ae]=fe?Sn(F[ae]):Vr(F[ae]);y(null,ie,$,V,Z,ee,re,ue,fe)}},H=(F,$,V,Z,ee,re,ue)=>{const fe=$.el=F.el;let{patchFlag:oe,dynamicChildren:ae,dirs:ie}=$;oe|=F.patchFlag&16;const te=F.props||Tt,le=$.props||Tt;let ge;V&&Fn(V,!1),(ge=le.onVnodeBeforeUpdate)&&Kr(ge,V,$,F),ie&&Dn($,F,V,"beforeUpdate"),V&&Fn(V,!0);const he=ee&&$.type!=="foreignObject";if(ae?J(F.dynamicChildren,ae,fe,V,Z,he,re):ue||g(F,$,fe,null,V,Z,he,re,!1),oe>0){if(oe&16)G(fe,$,te,le,V,Z,ee);else if(oe&2&&te.class!==le.class&&n(fe,"class",null,le.class,ee),oe&4&&n(fe,"style",te.style,le.style,ee),oe&8){const ye=$.dynamicProps;for(let Ie=0;Ie<ye.length;Ie++){const pe=ye[Ie],Oe=te[pe],Ge=le[pe];(Ge!==Oe||pe==="value")&&n(fe,pe,Oe,Ge,ee,F.children,V,Z,K)}}oe&1&&F.children!==$.children&&s(fe,$.children)}else!ue&&ae==null&&G(fe,$,te,le,V,Z,ee);((ge=le.onVnodeUpdated)||ie)&&or(()=>{ge&&Kr(ge,V,$,F),ie&&Dn($,F,V,"updated")},Z)},J=(F,$,V,Z,ee,re,ue)=>{for(let fe=0;fe<$.length;fe++){const oe=F[fe],ae=$[fe],ie=oe.el&&(oe.type===pr||!zn(oe,ae)||oe.shapeFlag&70)?l(oe.el):V;y(oe,ae,ie,null,Z,ee,re,ue,!0)}},G=(F,$,V,Z,ee,re,ue)=>{if(V!==Z){if(V!==Tt)for(const fe in V)!So(fe)&&!(fe in Z)&&n(F,fe,V[fe],null,ue,$.children,ee,re,K);for(const fe in Z){if(So(fe))continue;const oe=Z[fe],ae=V[fe];oe!==ae&&fe!=="value"&&n(F,fe,ae,oe,ue,$.children,ee,re,K)}"value"in Z&&n(F,"value",V.value,Z.value)}},z=(F,$,V,Z,ee,re,ue,fe,oe)=>{const ae=$.el=F?F.el:p(""),ie=$.anchor=F?F.anchor:p("");let{patchFlag:te,dynamicChildren:le,slotScopeIds:ge}=$;ge&&(fe=fe?fe.concat(ge):ge),F==null?(e(ae,V,Z),e(ie,V,Z),L($.children,V,ie,ee,re,ue,fe,oe)):te>0&&te&64&&le&&F.dynamicChildren?(J(F.dynamicChildren,le,V,ee,re,ue,fe),($.key!=null||ee&&$===ee.subTree)&&lu(F,$,!0)):g(F,$,V,ie,ee,re,ue,fe,oe)},S=(F,$,V,Z,ee,re,ue,fe,oe)=>{$.slotScopeIds=fe,F==null?$.shapeFlag&512?ee.ctx.activate($,V,Z,ue,oe):a($,V,Z,ee,re,ue,oe):w(F,$,oe)},a=(F,$,V,Z,ee,re,ue)=>{const fe=F.component=s1(F,Z,ee);if(is(F)&&(fe.ctx.renderer=q),a1(fe),fe.asyncDep){if(ee&&ee.registerDep(fe,h),!F.el){const oe=fe.subTree=Zt(Sr);E(null,oe,$,V)}return}h(fe,F,$,V,ee,re,ue)},w=(F,$,V)=>{const Z=$.component=F.component;if(hp(F,$,V))if(Z.asyncDep&&!Z.asyncResolved){m(Z,$,V);return}else Z.next=$,op(Z.update),Z.update();else $.el=F.el,Z.vnode=$},h=(F,$,V,Z,ee,re,ue)=>{const fe=()=>{if(F.isMounted){let{next:ie,bu:te,u:le,parent:ge,vnode:he}=F,ye=ie,Ie;Fn(F,!1),ie?(ie.el=he.el,m(F,ie,ue)):ie=he,te&&Es(te),(Ie=ie.props&&ie.props.onVnodeBeforeUpdate)&&Kr(Ie,ge,ie,he),Fn(F,!0);const pe=Ss(F),Oe=F.subTree;F.subTree=pe,y(Oe,pe,l(Oe.el),W(Oe),F,ee,re),ie.el=pe.el,ye===null&&dp(F,pe.el),le&&or(le,ee),(Ie=ie.props&&ie.props.onVnodeUpdated)&&or(()=>Kr(Ie,ge,ie,he),ee)}else{let ie;const{el:te,props:le}=$,{bm:ge,m:he,parent:ye}=F,Ie=Fi($);if(Fn(F,!1),ge&&Es(ge),!Ie&&(ie=le&&le.onVnodeBeforeMount)&&Kr(ie,ye,$),Fn(F,!0),te&&D){const pe=()=>{F.subTree=Ss(F),D(te,F.subTree,F,ee,null)};Ie?$.type.__asyncLoader().then(()=>!F.isUnmounted&&pe()):pe()}else{const pe=F.subTree=Ss(F);y(null,pe,V,Z,F,ee,re),$.el=pe.el}if(he&&or(he,ee),!Ie&&(ie=le&&le.onVnodeMounted)){const pe=$;or(()=>Kr(ie,ye,pe),ee)}($.shapeFlag&256||ye&&Fi(ye.vnode)&&ye.vnode.shapeFlag&256)&&F.a&&or(F.a,ee),F.isMounted=!0,$=V=Z=null}},oe=F.effect=new Za(fe,()=>ou(ae),F.scope),ae=F.update=()=>oe.run();ae.id=F.uid,Fn(F,!0),ae()},m=(F,$,V)=>{$.component=F;const Z=F.vnode.props;F.vnode=$,F.next=null,qp(F,$.props,Z,V),Wp(F,$.children,V),Mi(),Gu(),xi()},g=(F,$,V,Z,ee,re,ue,fe,oe=!1)=>{const ae=F&&F.children,ie=F?F.shapeFlag:0,te=$.children,{patchFlag:le,shapeFlag:ge}=$;if(le>0){if(le&128){T(ae,te,V,Z,ee,re,ue,fe,oe);return}else if(le&256){_(ae,te,V,Z,ee,re,ue,fe,oe);return}}ge&8?(ie&16&&K(ae,ee,re),te!==ae&&s(V,te)):ie&16?ge&16?T(ae,te,V,Z,ee,re,ue,fe,oe):K(ae,ee,re,!0):(ie&8&&s(V,""),ge&16&&L(te,V,Z,ee,re,ue,fe,oe))},_=(F,$,V,Z,ee,re,ue,fe,oe)=>{F=F||si,$=$||si;const ae=F.length,ie=$.length,te=Math.min(ae,ie);let le;for(le=0;le<te;le++){const ge=$[le]=oe?Sn($[le]):Vr($[le]);y(F[le],ge,V,null,ee,re,ue,fe,oe)}ae>ie?K(F,ee,re,!0,!1,te):L($,V,Z,ee,re,ue,fe,oe,te)},T=(F,$,V,Z,ee,re,ue,fe,oe)=>{let ae=0;const ie=$.length;let te=F.length-1,le=ie-1;for(;ae<=te&&ae<=le;){const ge=F[ae],he=$[ae]=oe?Sn($[ae]):Vr($[ae]);if(zn(ge,he))y(ge,he,V,null,ee,re,ue,fe,oe);else break;ae++}for(;ae<=te&&ae<=le;){const ge=F[te],he=$[le]=oe?Sn($[le]):Vr($[le]);if(zn(ge,he))y(ge,he,V,null,ee,re,ue,fe,oe);else break;te--,le--}if(ae>te){if(ae<=le){const ge=le+1,he=ge<ie?$[ge].el:Z;for(;ae<=le;)y(null,$[ae]=oe?Sn($[ae]):Vr($[ae]),V,he,ee,re,ue,fe,oe),ae++}}else if(ae>le)for(;ae<=te;)M(F[ae],ee,re,!0),ae++;else{const ge=ae,he=ae,ye=new Map;for(ae=he;ae<=le;ae++){const ve=$[ae]=oe?Sn($[ae]):Vr($[ae]);ve.key!=null&&ye.set(ve.key,ae)}let Ie,pe=0;const Oe=le-he+1;let Ge=!1,we=0;const Le=new Array(Oe);for(ae=0;ae<Oe;ae++)Le[ae]=0;for(ae=ge;ae<=te;ae++){const ve=F[ae];if(pe>=Oe){M(ve,ee,re,!0);continue}let Ne;if(ve.key!=null)Ne=ye.get(ve.key);else for(Ie=he;Ie<=le;Ie++)if(Le[Ie-he]===0&&zn(ve,$[Ie])){Ne=Ie;break}Ne===void 0?M(ve,ee,re,!0):(Le[Ne-he]=ae+1,Ne>=we?we=Ne:Ge=!0,y(ve,$[Ne],V,null,ee,re,ue,fe,oe),pe++)}const Ve=Ge?Yp(Le):si;for(Ie=Ve.length-1,ae=Oe-1;ae>=0;ae--){const ve=he+ae,Ne=$[ve],se=ve+1<ie?$[ve+1].el:Z;Le[ae]===0?y(null,Ne,V,se,ee,re,ue,fe,oe):Ge&&(Ie<0||ae!==Ve[Ie]?k(Ne,V,se,2):Ie--)}}},k=(F,$,V,Z,ee=null)=>{const{el:re,type:ue,transition:fe,children:oe,shapeFlag:ae}=F;if(ae&6){k(F.component.subTree,$,V,Z);return}if(ae&128){F.suspense.move($,V,Z);return}if(ae&64){ue.move(F,$,V,q);return}if(ue===pr){e(re,$,V);for(let te=0;te<oe.length;te++)k(oe[te],$,V,Z);e(F.anchor,$,V);return}if(ue===Ro){I(F,$,V);return}if(Z!==2&&ae&1&&fe)if(Z===0)fe.beforeEnter(re),e(re,$,V),or(()=>fe.enter(re),ee);else{const{leave:te,delayLeave:le,afterLeave:ge}=fe,he=()=>e(re,$,V),ye=()=>{te(re,()=>{he(),ge&&ge()})};le?le(re,he,ye):ye()}else e(re,$,V)},M=(F,$,V,Z=!1,ee=!1)=>{const{type:re,props:ue,ref:fe,children:oe,dynamicChildren:ae,shapeFlag:ie,patchFlag:te,dirs:le}=F;if(fe!=null&&aa(fe,null,V,F,!0),ie&256){$.ctx.deactivate(F);return}const ge=ie&1&&le,he=!Fi(F);let ye;if(he&&(ye=ue&&ue.onVnodeBeforeUnmount)&&Kr(ye,$,F),ie&6)C(F.component,V,Z);else{if(ie&128){F.suspense.unmount(V,Z);return}ge&&Dn(F,null,$,"beforeUnmount"),ie&64?F.type.remove(F,$,V,ee,q,Z):ae&&(re!==pr||te>0&&te&64)?K(ae,$,V,!1,!0):(re===pr&&te&384||!ee&&ie&16)&&K(oe,$,V),Z&&B(F)}(he&&(ye=ue&&ue.onVnodeUnmounted)||ge)&&or(()=>{ye&&Kr(ye,$,F),ge&&Dn(F,null,$,"unmounted")},V)},B=F=>{const{type:$,el:V,anchor:Z,transition:ee}=F;if($===pr){Y(V,Z);return}if($===Ro){O(F);return}const re=()=>{o(V),ee&&!ee.persisted&&ee.afterLeave&&ee.afterLeave()};if(F.shapeFlag&1&&ee&&!ee.persisted){const{leave:ue,delayLeave:fe}=ee,oe=()=>ue(V,re);fe?fe(F.el,re,oe):oe()}else re()},Y=(F,$)=>{let V;for(;F!==$;)V=d(F),o(F),F=V;o($)},C=(F,$,V)=>{const{bum:Z,scope:ee,update:re,subTree:ue,um:fe}=F;Z&&Es(Z),ee.stop(),re&&(re.active=!1,M(ue,F,$,V)),fe&&or(fe,$),or(()=>{F.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},K=(F,$,V,Z=!1,ee=!1,re=0)=>{for(let ue=re;ue<F.length;ue++)M(F[ue],$,V,Z,ee)},W=F=>F.shapeFlag&6?W(F.component.subTree):F.shapeFlag&128?F.suspense.next():d(F.anchor||F.el),U=(F,$,V)=>{F==null?$._vnode&&M($._vnode,null,null,!0):y($._vnode||null,F,$,null,null,null,V),Gu(),jl(),$._vnode=F},q={p:y,um:M,m:k,r:B,mt:a,mc:L,pc:g,pbc:J,n:W,o:r};let j,D;return t&&([j,D]=t(q)),{render:U,hydrate:j,createApp:Gp(U,j)}}function Fn({effect:r,update:t},i){r.allowRecurse=t.allowRecurse=i}function lu(r,t,i=!1){const e=r.children,o=t.children;if(lt(e)&&lt(o))for(let n=0;n<e.length;n++){const f=e[n];let p=o[n];p.shapeFlag&1&&!p.dynamicChildren&&((p.patchFlag<=0||p.patchFlag===32)&&(p=o[n]=Sn(o[n]),p.el=f.el),i||lu(f,p)),p.type===uo&&(p.el=f.el)}}function Yp(r){const t=r.slice(),i=[0];let e,o,n,f,p;const u=r.length;for(e=0;e<u;e++){const c=r[e];if(c!==0){if(o=i[i.length-1],r[o]<c){t[e]=o,i.push(e);continue}for(n=0,f=i.length-1;n<f;)p=n+f>>1,r[i[p]]<c?n=p+1:f=p;c<r[i[n]]&&(n>0&&(t[e]=i[n-1]),i[n]=e)}}for(n=i.length,f=i[n-1];n-- >0;)i[n]=f,f=t[f];return i}const $p=r=>r.__isTeleport,Hi=r=>r&&(r.disabled||r.disabled===""),rf=r=>typeof SVGElement<"u"&&r instanceof SVGElement,ua=(r,t)=>{const i=r&&r.to;return qt(i)?t?t(i):null:i},Zp={__isTeleport:!0,process(r,t,i,e,o,n,f,p,u,c){const{mc:s,pc:l,pbc:d,o:{insert:b,querySelector:v,createText:y,createComment:x}}=c,E=Hi(t.props);let{shapeFlag:R,children:I,dynamicChildren:O}=t;if(r==null){const A=t.el=y(""),P=t.anchor=y("");b(A,i,e),b(P,i,e);const N=t.target=ua(t.props,v),L=t.targetAnchor=y("");N&&(b(L,N),f=f||rf(N));const H=(J,G)=>{R&16&&s(I,J,G,o,n,f,p,u)};E?H(i,P):N&&H(N,L)}else{t.el=r.el;const A=t.anchor=r.anchor,P=t.target=r.target,N=t.targetAnchor=r.targetAnchor,L=Hi(r.props),H=L?i:P,J=L?A:N;if(f=f||rf(P),O?(d(r.dynamicChildren,O,H,o,n,f,p),lu(r,t,!0)):u||l(r,t,H,J,o,n,f,p,!1),E)L||wo(t,i,A,c,1);else if((t.props&&t.props.to)!==(r.props&&r.props.to)){const G=t.target=ua(t.props,v);G&&wo(t,G,null,c,0)}else L&&wo(t,P,N,c,1)}th(t)},remove(r,t,i,e,{um:o,o:{remove:n}},f){const{shapeFlag:p,children:u,anchor:c,targetAnchor:s,target:l,props:d}=r;if(l&&n(s),(f||!Hi(d))&&(n(c),p&16))for(let b=0;b<u.length;b++){const v=u[b];o(v,t,i,!0,!!v.dynamicChildren)}},move:wo,hydrate:Qp};function wo(r,t,i,{o:{insert:e},m:o},n=2){n===0&&e(r.targetAnchor,t,i);const{el:f,anchor:p,shapeFlag:u,children:c,props:s}=r,l=n===2;if(l&&e(f,t,i),(!l||Hi(s))&&u&16)for(let d=0;d<c.length;d++)o(c[d],t,i,2);l&&e(p,t,i)}function Qp(r,t,i,e,o,n,{o:{nextSibling:f,parentNode:p,querySelector:u}},c){const s=t.target=ua(t.props,u);if(s){const l=s._lpa||s.firstChild;if(t.shapeFlag&16)if(Hi(t.props))t.anchor=c(f(r),t,p(r),i,e,o,n),t.targetAnchor=l;else{t.anchor=f(r);let d=l;for(;d;)if(d=f(d),d&&d.nodeType===8&&d.data==="teleport anchor"){t.targetAnchor=d,s._lpa=t.targetAnchor&&f(t.targetAnchor);break}c(l,t,s,i,e,o,n)}th(t)}return t.anchor&&f(t.anchor)}const f_=Zp;function th(r){const t=r.ctx;if(t&&t.ut){let i=r.children[0].el;for(;i!==r.targetAnchor;)i.nodeType===1&&i.setAttribute("data-v-owner",t.uid),i=i.nextSibling;t.ut()}}const pr=Symbol(void 0),uo=Symbol(void 0),Sr=Symbol(void 0),Ro=Symbol(void 0),zi=[];let Ur=null;function hu(r=!1){zi.push(Ur=r?null:[])}function Xp(){zi.pop(),Ur=zi[zi.length-1]||null}let Xi=1;function nf(r){Xi+=r}function rh(r){return r.dynamicChildren=Xi>0?Ur||si:null,Xp(),Xi>0&&Ur&&Ur.push(r),r}function c_(r,t,i,e,o,n){return rh(ih(r,t,i,e,o,n,!0))}function du(r,t,i,e,o){return rh(Zt(r,t,i,e,o,!0))}function Fo(r){return r?r.__v_isVNode===!0:!1}function zn(r,t){return r.type===t.type&&r.key===t.key}const as="__vInternal",nh=({key:r})=>r??null,To=({ref:r,ref_key:t,ref_for:i})=>r!=null?qt(r)||Lt(r)||bt(r)?{i:$t,r,k:t,f:!!i}:r:null;function ih(r,t=null,i=null,e=0,o=null,n=r===pr?0:1,f=!1,p=!1){const u={__v_isVNode:!0,__v_skip:!0,type:r,props:t,key:t&&nh(t),ref:t&&To(t),scopeId:Fl,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:e,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:$t};return p?(pu(u,i),n&128&&r.normalize(u)):i&&(u.shapeFlag|=qt(i)?8:16),Xi>0&&!f&&Ur&&(u.patchFlag>0||n&6)&&u.patchFlag!==32&&Ur.push(u),u}const Zt=e1;function e1(r,t=null,i=null,e=0,o=null,n=!1){if((!r||r===Pp)&&(r=Sr),Fo(r)){const p=Nn(r,t,!0);return i&&pu(p,i),Xi>0&&!n&&Ur&&(p.shapeFlag&6?Ur[Ur.indexOf(r)]=p:Ur.push(p)),p.patchFlag|=-2,p}if(h1(r)&&(r=r.__vccOpts),t){t=t1(t);let{class:p,style:u}=t;p&&!qt(p)&&(t.class=za(p)),Ct(u)&&(Rl(u)&&!lt(u)&&(u=Xt({},u)),t.style=Ha(u))}const f=qt(r)?1:pp(r)?128:$p(r)?64:Ct(r)?4:bt(r)?2:0;return ih(r,t,i,e,o,f,n,!0)}function t1(r){return r?Rl(r)||as in r?Xt({},r):r:null}function Nn(r,t,i=!1){const{props:e,ref:o,patchFlag:n,children:f}=r,p=t?n1(e||{},t):e;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:p,key:p&&nh(p),ref:t&&t.ref?i&&o?lt(o)?o.concat(To(t)):[o,To(t)]:To(t):o,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:f,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:t&&r.type!==pr?n===-1?16:n|16:n,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&Nn(r.ssContent),ssFallback:r.ssFallback&&Nn(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce}}function r1(r=" ",t=0){return Zt(uo,null,r,t)}function l_(r,t){const i=Zt(Ro,null,r);return i.staticCount=t,i}function h_(r="",t=!1){return t?(hu(),du(Sr,null,r)):Zt(Sr,null,r)}function Vr(r){return r==null||typeof r=="boolean"?Zt(Sr):lt(r)?Zt(pr,null,r.slice()):typeof r=="object"?Sn(r):Zt(uo,null,String(r))}function Sn(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:Nn(r)}function pu(r,t){let i=0;const{shapeFlag:e}=r;if(t==null)t=null;else if(lt(t))i=16;else if(typeof t=="object")if(e&65){const o=t.default;o&&(o._c&&(o._d=!1),pu(r,o()),o._c&&(o._d=!0));return}else{i=32;const o=t._;!o&&!(as in t)?t._ctx=$t:o===3&&$t&&($t.slots._===1?t._=1:(t._=2,r.patchFlag|=1024))}else bt(t)?(t={default:t,_ctx:$t},i=32):(t=String(t),e&64?(i=16,t=[r1(t)]):i=8);r.children=t,r.shapeFlag|=i}function n1(...r){const t={};for(let i=0;i<r.length;i++){const e=r[i];for(const o in e)if(o==="class")t.class!==e.class&&(t.class=za([t.class,e.class]));else if(o==="style")t.style=Ha([t.style,e.style]);else if(Zo(o)){const n=t[o],f=e[o];f&&n!==f&&!(lt(n)&&n.includes(f))&&(t[o]=n?[].concat(n,f):f)}else o!==""&&(t[o]=e[o])}return t}function Kr(r,t,i,e=null){xr(r,t,7,[i,e])}const i1=eh();let o1=0;function s1(r,t,i){const e=r.type,o=(t?t.appContext:r.appContext)||i1,n={uid:o1++,vnode:r,type:e,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new gl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$l(e,o),emitsOptions:Dl(e,o),emit:null,emitted:null,propsDefaults:Tt,inheritAttrs:e.inheritAttrs,ctx:Tt,data:Tt,props:Tt,attrs:Tt,slots:Tt,refs:Tt,setupState:Tt,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return n.ctx={_:n},n.root=t?t.root:n,n.emit=up.bind(null,n),r.ce&&r.ce(n),n}let jt=null;const Ei=()=>jt||$t,di=r=>{jt=r,r.scope.on()},Vn=()=>{jt&&jt.scope.off(),jt=null};function oh(r){return r.vnode.shapeFlag&4}let eo=!1;function a1(r,t=!1){eo=t;const{props:i,children:e}=r.vnode,o=oh(r);Fp(r,i,o,t),zp(r,e);const n=o?u1(r,t):void 0;return eo=!1,n}function u1(r,t){const i=r.type;r.accessCache=Object.create(null),r.proxy=hi(new Proxy(r.ctx,Np));const{setup:e}=i;if(e){const o=r.setupContext=e.length>1?c1(r):null;di(r),Mi();const n=Pn(e,r,0,[r.props,o]);if(xi(),Vn(),dl(n)){if(n.then(Vn,Vn),t)return n.then(f=>{of(r,f,t)}).catch(f=>{rs(f,r,0)});r.asyncDep=n}else of(r,n,t)}else sh(r,t)}function of(r,t,i){bt(t)?r.type.__ssrInlineRender?r.ssrRender=t:r.render=t:Ct(t)&&(r.setupState=Ol(t)),sh(r,i)}let sf;function sh(r,t,i){const e=r.type;if(!r.render){if(!t&&sf&&!e.render){const o=e.template||fu(r).template;if(o){const{isCustomElement:n,compilerOptions:f}=r.appContext.config,{delimiters:p,compilerOptions:u}=e,c=Xt(Xt({isCustomElement:n,delimiters:p},f),u);e.render=sf(o,c)}}r.render=e.render||Fr}di(r),Mi(),Bp(r),xi(),Vn()}function f1(r){return new Proxy(r.attrs,{get(t,i){return ur(r,"get","$attrs"),t[i]}})}function c1(r){const t=e=>{r.exposed=e||{}};let i;return{get attrs(){return i||(i=f1(r))},slots:r.slots,emit:r.emit,expose:t}}function mu(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(Ol(hi(r.exposed)),{get(t,i){if(i in t)return t[i];if(i in qi)return qi[i](r)},has(t,i){return i in t||i in qi}}))}function l1(r,t=!0){return bt(r)?r.displayName||r.name:r.name||t&&r.__name}function h1(r){return bt(r)&&"__vccOpts"in r}const Ut=(r,t)=>rp(r,t,eo);function us(r,t,i){const e=arguments.length;return e===2?Ct(t)&&!lt(t)?Fo(t)?Zt(r,null,[t]):Zt(r,t):Zt(r,null,t):(e>3?i=Array.prototype.slice.call(arguments,2):e===3&&Fo(i)&&(i=[i]),Zt(r,t,i))}const d1=Symbol(""),p1=()=>Ar(d1),m1="3.2.47",g1="http://www.w3.org/2000/svg",Wn=typeof document<"u"?document:null,af=Wn&&Wn.createElement("template"),v1={insert:(r,t,i)=>{t.insertBefore(r,i||null)},remove:r=>{const t=r.parentNode;t&&t.removeChild(r)},createElement:(r,t,i,e)=>{const o=t?Wn.createElementNS(g1,r):Wn.createElement(r,i?{is:i}:void 0);return r==="select"&&e&&e.multiple!=null&&o.setAttribute("multiple",e.multiple),o},createText:r=>Wn.createTextNode(r),createComment:r=>Wn.createComment(r),setText:(r,t)=>{r.nodeValue=t},setElementText:(r,t)=>{r.textContent=t},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Wn.querySelector(r),setScopeId(r,t){r.setAttribute(t,"")},insertStaticContent(r,t,i,e,o,n){const f=i?i.previousSibling:t.lastChild;if(o&&(o===n||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),i),!(o===n||!(o=o.nextSibling)););else{af.innerHTML=e?`<svg>${r}</svg>`:r;const p=af.content;if(e){const u=p.firstChild;for(;u.firstChild;)p.appendChild(u.firstChild);p.removeChild(u)}t.insertBefore(p,i)}return[f?f.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}};function b1(r,t,i){const e=r._vtc;e&&(t=(t?[t,...e]:[...e]).join(" ")),t==null?r.removeAttribute("class"):i?r.setAttribute("class",t):r.className=t}function y1(r,t,i){const e=r.style,o=qt(i);if(i&&!o){if(t&&!qt(t))for(const n in t)i[n]==null&&fa(e,n,"");for(const n in i)fa(e,n,i[n])}else{const n=e.display;o?t!==i&&(e.cssText=i):t&&r.removeAttribute("style"),"_vod"in r&&(e.display=n)}}const uf=/\s*!important$/;function fa(r,t,i){if(lt(i))i.forEach(e=>fa(r,t,e));else if(i==null&&(i=""),t.startsWith("--"))r.setProperty(t,i);else{const e=w1(r,t);uf.test(i)?r.setProperty(_i(e),i.replace(uf,""),"important"):r[e]=i}}const ff=["Webkit","Moz","ms"],Ts={};function w1(r,t){const i=Ts[t];if(i)return i;let e=on(t);if(e!=="filter"&&e in r)return Ts[t]=e;e=es(e);for(let o=0;o<ff.length;o++){const n=ff[o]+e;if(n in r)return Ts[t]=n}return t}const cf="http://www.w3.org/1999/xlink";function _1(r,t,i,e,o){if(e&&t.startsWith("xlink:"))i==null?r.removeAttributeNS(cf,t.slice(6,t.length)):r.setAttributeNS(cf,t,i);else{const n=h0(t);i==null||n&&!cl(i)?r.removeAttribute(t):r.setAttribute(t,n?"":i)}}function M1(r,t,i,e,o,n,f){if(t==="innerHTML"||t==="textContent"){e&&f(e,o,n),r[t]=i??"";return}if(t==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=i;const u=i??"";(r.value!==u||r.tagName==="OPTION")&&(r.value=u),i==null&&r.removeAttribute(t);return}let p=!1;if(i===""||i==null){const u=typeof r[t];u==="boolean"?i=cl(i):i==null&&u==="string"?(i="",p=!0):u==="number"&&(i=0,p=!0)}try{r[t]=i}catch{}p&&r.removeAttribute(t)}function x1(r,t,i,e){r.addEventListener(t,i,e)}function A1(r,t,i,e){r.removeEventListener(t,i,e)}function E1(r,t,i,e,o=null){const n=r._vei||(r._vei={}),f=n[t];if(e&&f)f.value=e;else{const[p,u]=S1(t);if(e){const c=n[t]=T1(e,o);x1(r,p,c,u)}else f&&(A1(r,p,f,u),n[t]=void 0)}}const lf=/(?:Once|Passive|Capture)$/;function S1(r){let t;if(lf.test(r)){t={};let e;for(;e=r.match(lf);)r=r.slice(0,r.length-e[0].length),t[e[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):_i(r.slice(2)),t]}let Is=0;const k1=Promise.resolve(),R1=()=>Is||(k1.then(()=>Is=0),Is=Date.now());function T1(r,t){const i=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=i.attached)return;xr(I1(e,i.value),t,5,[e])};return i.value=r,i.attached=R1(),i}function I1(r,t){if(lt(t)){const i=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0},t.map(e=>o=>!o._stopped&&e&&e(o))}else return t}const hf=/^on[a-z]/,C1=(r,t,i,e,o=!1,n,f,p,u)=>{t==="class"?b1(r,e,o):t==="style"?y1(r,i,e):Zo(t)?Wa(t)||E1(r,t,i,e,f):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):P1(r,t,e,o))?M1(r,t,e,n,f,p,u):(t==="true-value"?r._trueValue=e:t==="false-value"&&(r._falseValue=e),_1(r,t,e,o))};function P1(r,t,i,e){return e?!!(t==="innerHTML"||t==="textContent"||t in r&&hf.test(t)&&bt(i)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&r.tagName==="INPUT"||t==="type"&&r.tagName==="TEXTAREA"||hf.test(t)&&qt(i)?!1:t in r}const O1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};wp.props;const N1=Xt({patchProp:C1},v1);let df;function B1(){return df||(df=Vp(N1))}const L1=(...r)=>{const t=B1().createApp(...r),{mount:i}=t;return t.mount=e=>{const o=j1(e);if(!o)return;const n=t._component;!bt(n)&&!n.render&&!n.template&&(n.template=o.innerHTML),o.innerHTML="";const f=i(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),f},t};function j1(r){return qt(r)?document.querySelector(r):r}var pf;const ah=typeof window<"u",U1=r=>typeof r=="function",D1=r=>typeof r=="string",F1=()=>{};ah&&((pf=window==null?void 0:window.navigator)!=null&&pf.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function gu(r){return typeof r=="function"?r():Cn(r)}function q1(r,t){function i(...e){return new Promise((o,n)=>{Promise.resolve(r(()=>t.apply(this,e),{fn:t,thisArg:this,args:e})).then(o).catch(n)})}return i}const uh=r=>r();function H1(r=uh){const t=sr(!0);function i(){t.value=!1}function e(){t.value=!0}const o=(...n)=>{t.value&&r(...n)};return{isActive:tu(t),pause:i,resume:e,eventFilter:o}}function z1(r){return r}function fh(r){return Ya()?(vl(r),!0):!1}function W1(r){return typeof r=="function"?Ut(r):sr(r)}function ch(r,t=!0){Ei()?ss(r):t?r():ao(r)}var mf=Object.getOwnPropertySymbols,K1=Object.prototype.hasOwnProperty,G1=Object.prototype.propertyIsEnumerable,V1=(r,t)=>{var i={};for(var e in r)K1.call(r,e)&&t.indexOf(e)<0&&(i[e]=r[e]);if(r!=null&&mf)for(var e of mf(r))t.indexOf(e)<0&&G1.call(r,e)&&(i[e]=r[e]);return i};function J1(r,t,i={}){const e=i,{eventFilter:o=uh}=e,n=V1(e,["eventFilter"]);return Er(r,q1(o,t),n)}var Y1=Object.defineProperty,$1=Object.defineProperties,Z1=Object.getOwnPropertyDescriptors,qo=Object.getOwnPropertySymbols,lh=Object.prototype.hasOwnProperty,hh=Object.prototype.propertyIsEnumerable,gf=(r,t,i)=>t in r?Y1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,Q1=(r,t)=>{for(var i in t||(t={}))lh.call(t,i)&&gf(r,i,t[i]);if(qo)for(var i of qo(t))hh.call(t,i)&&gf(r,i,t[i]);return r},X1=(r,t)=>$1(r,Z1(t)),em=(r,t)=>{var i={};for(var e in r)lh.call(r,e)&&t.indexOf(e)<0&&(i[e]=r[e]);if(r!=null&&qo)for(var e of qo(r))t.indexOf(e)<0&&hh.call(r,e)&&(i[e]=r[e]);return i};function tm(r,t,i={}){const e=i,{eventFilter:o}=e,n=em(e,["eventFilter"]),{eventFilter:f,pause:p,resume:u,isActive:c}=H1(o);return{stop:J1(r,t,X1(Q1({},n),{eventFilter:f})),pause:p,resume:u,isActive:c}}function rm(r){var t;const i=gu(r);return(t=i==null?void 0:i.$el)!=null?t:i}const pi=ah?window:void 0;function vf(...r){let t,i,e,o;if(D1(r[0])||Array.isArray(r[0])?([i,e,o]=r,t=pi):[t,i,e,o]=r,!t)return F1;Array.isArray(i)||(i=[i]),Array.isArray(e)||(e=[e]);const n=[],f=()=>{n.forEach(s=>s()),n.length=0},p=(s,l,d,b)=>(s.addEventListener(l,d,b),()=>s.removeEventListener(l,d,b)),u=Er(()=>[rm(t),gu(o)],([s,l])=>{f(),s&&n.push(...i.flatMap(d=>e.map(b=>p(s,d,b,l))))},{immediate:!0,flush:"post"}),c=()=>{u(),f()};return fh(c),c}function nm(r,t=!1){const i=sr(),e=()=>i.value=Boolean(r());return e(),ch(e,t),i}function im(r,t={}){const{window:i=pi}=t,e=nm(()=>i&&"matchMedia"in i&&typeof i.matchMedia=="function");let o;const n=sr(!1),f=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",p):o.removeListener(p))},p=()=>{e.value&&(f(),o=i.matchMedia(W1(r).value),n.value=o.matches,"addEventListener"in o?o.addEventListener("change",p):o.addListener(p))};return gp(p),fh(()=>f()),n}const ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},la="__vueuse_ssr_handlers__";ca[la]=ca[la]||{};const om=ca[la];function dh(r,t){return om[r]||t}function sm(r){return r==null?"any":r instanceof Set?"set":r instanceof Map?"map":r instanceof Date?"date":typeof r=="boolean"?"boolean":typeof r=="string"?"string":typeof r=="object"?"object":Number.isNaN(r)?"any":"number"}var am=Object.defineProperty,bf=Object.getOwnPropertySymbols,um=Object.prototype.hasOwnProperty,fm=Object.prototype.propertyIsEnumerable,yf=(r,t,i)=>t in r?am(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,wf=(r,t)=>{for(var i in t||(t={}))um.call(t,i)&&yf(r,i,t[i]);if(bf)for(var i of bf(t))fm.call(t,i)&&yf(r,i,t[i]);return r};const cm={boolean:{read:r=>r==="true",write:r=>String(r)},object:{read:r=>JSON.parse(r),write:r=>JSON.stringify(r)},number:{read:r=>Number.parseFloat(r),write:r=>String(r)},any:{read:r=>r,write:r=>String(r)},string:{read:r=>r,write:r=>String(r)},map:{read:r=>new Map(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r.entries()))},set:{read:r=>new Set(JSON.parse(r)),write:r=>JSON.stringify(Array.from(r))},date:{read:r=>new Date(r),write:r=>r.toISOString()}},_f="vueuse-storage";function ph(r,t,i,e={}){var o;const{flush:n="pre",deep:f=!0,listenToStorageChanges:p=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:s,window:l=pi,eventFilter:d,onError:b=L=>{console.error(L)}}=e,v=(s?Cl:sr)(t);if(!i)try{i=dh("getDefaultStorage",()=>{var L;return(L=pi)==null?void 0:L.localStorage})()}catch(L){b(L)}if(!i)return v;const y=gu(t),x=sm(y),E=(o=e.serializer)!=null?o:cm[x],{pause:R,resume:I}=tm(v,()=>O(v.value),{flush:n,deep:f,eventFilter:d});return l&&p&&(vf(l,"storage",N),vf(l,_f,P)),N(),v;function O(L){try{if(L==null)i.removeItem(r);else{const H=E.write(L),J=i.getItem(r);J!==H&&(i.setItem(r,H),l&&l.dispatchEvent(new CustomEvent(_f,{detail:{key:r,oldValue:J,newValue:H,storageArea:i}})))}}catch(H){b(H)}}function A(L){const H=L?L.newValue:i.getItem(r);if(H==null)return u&&y!==null&&i.setItem(r,E.write(y)),y;if(!L&&c){const J=E.read(H);return U1(c)?c(J,y):x==="object"&&!Array.isArray(J)?wf(wf({},y),J):J}else return typeof H!="string"?H:E.read(H)}function P(L){N(L.detail)}function N(L){if(!(L&&L.storageArea!==i)){if(L&&L.key==null){v.value=y;return}if(!(L&&L.key!==r)){R();try{v.value=A(L)}catch(H){b(H)}finally{L?ao(I):I()}}}}}function lm(r){return im("(prefers-color-scheme: dark)",r)}var hm=Object.defineProperty,Mf=Object.getOwnPropertySymbols,dm=Object.prototype.hasOwnProperty,pm=Object.prototype.propertyIsEnumerable,xf=(r,t,i)=>t in r?hm(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,mm=(r,t)=>{for(var i in t||(t={}))dm.call(t,i)&&xf(r,i,t[i]);if(Mf)for(var i of Mf(t))pm.call(t,i)&&xf(r,i,t[i]);return r};function d_(r={}){const{selector:t="html",attribute:i="class",initialValue:e="auto",window:o=pi,storage:n,storageKey:f="vueuse-color-scheme",listenToStorageChanges:p=!0,storageRef:u,emitAuto:c}=r,s=mm({auto:"",light:"light",dark:"dark"},r.modes||{}),l=lm({window:o}),d=Ut(()=>l.value?"dark":"light"),b=u||(f==null?sr(e):ph(f,e,n,{window:o,listenToStorageChanges:p})),v=Ut({get(){return b.value==="auto"&&!c?d.value:b.value},set(R){b.value=R}}),y=dh("updateHTMLAttrs",(R,I,O)=>{const A=o==null?void 0:o.document.querySelector(R);if(A)if(I==="class"){const P=O.split(/\s/g);Object.values(s).flatMap(N=>(N||"").split(/\s/g)).filter(Boolean).forEach(N=>{P.includes(N)?A.classList.add(N):A.classList.remove(N)})}else A.setAttribute(I,O)});function x(R){var I;const O=R==="auto"?d.value:R;y(t,i,(I=s[O])!=null?I:O)}function E(R){r.onChanged?r.onChanged(R,x):x(R)}return Er(v,E,{flush:"post",immediate:!0}),c&&Er(d,()=>E(v.value),{flush:"post"}),ch(()=>E(v.value)),v}function gm(r,t,i={}){const{window:e=pi}=i;return ph(r,t,e==null?void 0:e.localStorage,i)}var Af;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Af||(Af={}));var vm=Object.defineProperty,Ef=Object.getOwnPropertySymbols,bm=Object.prototype.hasOwnProperty,ym=Object.prototype.propertyIsEnumerable,Sf=(r,t,i)=>t in r?vm(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,wm=(r,t)=>{for(var i in t||(t={}))bm.call(t,i)&&Sf(r,i,t[i]);if(Ef)for(var i of Ef(t))ym.call(t,i)&&Sf(r,i,t[i]);return r};const _m={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};wm({linear:z1},_m);var Mm=!1;/*!
  * pinia v2.0.33
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */let mh;const fs=r=>mh=r,gh=Symbol();function ha(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Wi;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Wi||(Wi={}));function xm(){const r=Ja(!0),t=r.run(()=>sr({}));let i=[],e=[];const o=hi({install(n){fs(o),o._a=n,n.provide(gh,o),n.config.globalProperties.$pinia=o,e.forEach(f=>i.push(f)),e=[]},use(n){return!this._a&&!Mm?e.push(n):i.push(n),this},_p:i,_a:null,_e:r,_s:new Map,state:t});return o}const vh=()=>{};function kf(r,t,i,e=vh){r.push(t);const o=()=>{const n=r.indexOf(t);n>-1&&(r.splice(n,1),e())};return!i&&Ya()&&vl(o),o}function Qn(r,...t){r.slice().forEach(i=>{i(...t)})}function da(r,t){r instanceof Map&&t instanceof Map&&t.forEach((i,e)=>r.set(e,i)),r instanceof Set&&t instanceof Set&&t.forEach(r.add,r);for(const i in t){if(!t.hasOwnProperty(i))continue;const e=t[i],o=r[i];ha(o)&&ha(e)&&r.hasOwnProperty(i)&&!Lt(e)&&!In(e)?r[i]=da(o,e):r[i]=e}return r}const Am=Symbol();function Em(r){return!ha(r)||!r.hasOwnProperty(Am)}const{assign:En}=Object;function Sm(r){return!!(Lt(r)&&r.effect)}function km(r,t,i,e){const{state:o,actions:n,getters:f}=t,p=i.state.value[r];let u;function c(){p||(i.state.value[r]=o?o():{});const s=Q0(i.state.value[r]);return En(s,n,Object.keys(f||{}).reduce((l,d)=>(l[d]=hi(Ut(()=>{fs(i);const b=i._s.get(r);return f[d].call(b,b)})),l),{}))}return u=bh(r,c,t,i,e,!0),u}function bh(r,t,i={},e,o,n){let f;const p=En({actions:{}},i),u={deep:!0};let c,s,l=hi([]),d=hi([]),b;const v=e.state.value[r];!n&&!v&&(e.state.value[r]={}),sr({});let y;function x(N){let L;c=s=!1,typeof N=="function"?(N(e.state.value[r]),L={type:Wi.patchFunction,storeId:r,events:b}):(da(e.state.value[r],N),L={type:Wi.patchObject,payload:N,storeId:r,events:b});const H=y=Symbol();ao().then(()=>{y===H&&(c=!0)}),s=!0,Qn(l,L,e.state.value[r])}const E=n?function(){const{state:L}=i,H=L?L():{};this.$patch(J=>{En(J,H)})}:vh;function R(){f.stop(),l=[],d=[],e._s.delete(r)}function I(N,L){return function(){fs(e);const H=Array.from(arguments),J=[],G=[];function z(w){J.push(w)}function S(w){G.push(w)}Qn(d,{args:H,name:N,store:A,after:z,onError:S});let a;try{a=L.apply(this&&this.$id===r?this:A,H)}catch(w){throw Qn(G,w),w}return a instanceof Promise?a.then(w=>(Qn(J,w),w)).catch(w=>(Qn(G,w),Promise.reject(w))):(Qn(J,a),a)}}const O={_p:e,$id:r,$onAction:kf.bind(null,d),$patch:x,$reset:E,$subscribe(N,L={}){const H=kf(l,N,L.detached,()=>J()),J=f.run(()=>Er(()=>e.state.value[r],G=>{(L.flush==="sync"?s:c)&&N({storeId:r,type:Wi.direct,events:b},G)},En({},u,L)));return H},$dispose:R},A=Ai(O);e._s.set(r,A);const P=e._e.run(()=>(f=Ja(),f.run(()=>t())));for(const N in P){const L=P[N];if(Lt(L)&&!Sm(L)||In(L))n||(v&&Em(L)&&(Lt(L)?L.value=v[N]:da(L,v[N])),e.state.value[r][N]=L);else if(typeof L=="function"){const H=I(N,L);P[N]=H,p.actions[N]=L}}return En(A,P),En(Et(A),P),Object.defineProperty(A,"$state",{get:()=>e.state.value[r],set:N=>{x(L=>{En(L,N)})}}),e._p.forEach(N=>{En(A,f.run(()=>N({store:A,app:e._a,pinia:e,options:p})))}),v&&n&&i.hydrate&&i.hydrate(A.$state,v),c=!0,s=!0,A}function Rm(r,t,i){let e,o;const n=typeof t=="function";typeof r=="string"?(e=r,o=n?i:t):(o=r,e=r.id);function f(p,u){const c=Ei();return p=p||c&&Ar(gh,null),p&&fs(p),p=mh,p._s.has(e)||(n?bh(e,t,o,p):km(e,o,p)),p._s.get(e)}return f.$id=e,f}/*!
  * shared v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const pa=typeof window<"u",Tm=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Ln=r=>Tm?Symbol(r):r,to=r=>typeof r=="number"&&isFinite(r),Rf=r=>wh(r)==="[object RegExp]",Im=r=>Jr(r)&&Object.keys(r).length===0,Xr=Object.assign;let Tf;const yh=()=>Tf||(Tf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Cm=Object.prototype.hasOwnProperty;function vu(r,t){return Cm.call(r,t)}const Qr=Array.isArray,_o=r=>typeof r=="function",Ht=r=>typeof r=="string",kn=r=>typeof r=="boolean",qr=r=>r!==null&&typeof r=="object",Pm=Object.prototype.toString,wh=r=>Pm.call(r),Jr=r=>wh(r)==="[object Object]";/*!
  * shared v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const Om=(r,t,i)=>Nm({l:r,k:t,s:i}),Nm=r=>JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),gr=r=>typeof r=="number"&&isFinite(r),Bm=r=>yu(r)==="[object Date]",If=r=>yu(r)==="[object RegExp]",bu=r=>It(r)&&Object.keys(r).length===0;function Lm(r,t){typeof console<"u"&&(console.warn("[intlify] "+r),t&&console.warn(t.stack))}const fo=Object.assign;let Cf;const jm=()=>Cf||(Cf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pf(r){return r.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const en=Array.isArray,mr=r=>typeof r=="function",pt=r=>typeof r=="string",vr=r=>typeof r=="boolean",rr=r=>r!==null&&typeof r=="object",_h=Object.prototype.toString,yu=r=>_h.call(r),It=r=>yu(r)==="[object Object]",Um=r=>r==null?"":en(r)||It(r)&&r.toString===_h?JSON.stringify(r,null,2):String(r);/*!
  * message-compiler v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const Mh={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function xh(r,t,i={}){const{domain:e,messages:o,args:n}=i,f=r,p=new SyntaxError(String(f));return p.code=r,t&&(p.location=t),p.domain=e,p}/*!
  * devtools-if v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const Ah={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};/*!
  * core-base v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const jn=[];jn[0]={w:[0],i:[3,0],["["]:[4],o:[7]};jn[1]={w:[1],["."]:[2],["["]:[4],o:[7]};jn[2]={w:[2],i:[3,0],[0]:[3,0]};jn[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};jn[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};jn[5]={["'"]:[4,0],o:8,l:[5,0]};jn[6]={['"']:[4,0],o:8,l:[6,0]};const Dm=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Fm(r){return Dm.test(r)}function qm(r){const t=r.charCodeAt(0),i=r.charCodeAt(r.length-1);return t===i&&(t===34||t===39)?r.slice(1,-1):r}function Hm(r){if(r==null)return"o";switch(r.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return r;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function zm(r){const t=r.trim();return r.charAt(0)==="0"&&isNaN(parseInt(r))?!1:Fm(t)?qm(t):"*"+t}function Wm(r){const t=[];let i=-1,e=0,o=0,n,f,p,u,c,s,l;const d=[];d[0]=()=>{f===void 0?f=p:f+=p},d[1]=()=>{f!==void 0&&(t.push(f),f=void 0)},d[2]=()=>{d[0](),o++},d[3]=()=>{if(o>0)o--,e=4,d[0]();else{if(o=0,f===void 0||(f=zm(f),f===!1))return!1;d[1]()}};function b(){const v=r[i+1];if(e===5&&v==="'"||e===6&&v==='"')return i++,p="\\"+v,d[0](),!0}for(;e!==null;)if(i++,n=r[i],!(n==="\\"&&b())){if(u=Hm(n),l=jn[e],c=l[u]||l.l||8,c===8||(e=c[0],c[1]!==void 0&&(s=d[c[1]],s&&(p=n,s()===!1))))return;if(e===7)return t}}const Of=new Map;function Km(r,t){return rr(r)?r[t]:null}function Gm(r,t){if(!rr(r))return null;let i=Of.get(t);if(i||(i=Wm(t),i&&Of.set(t,i)),!i)return null;const e=i.length;let o=r,n=0;for(;n<e;){const f=o[i[n]];if(f===void 0)return null;o=f,n++}return o}const Vm=r=>r,Jm=r=>"",Ym="text",$m=r=>r.length===0?"":r.join(""),Zm=Um;function Nf(r,t){return r=Math.abs(r),t===2?r?r>1?1:0:1:r?Math.min(r,2):0}function Qm(r){const t=gr(r.pluralIndex)?r.pluralIndex:-1;return r.named&&(gr(r.named.count)||gr(r.named.n))?gr(r.named.count)?r.named.count:gr(r.named.n)?r.named.n:t:t}function Xm(r,t){t.count||(t.count=r),t.n||(t.n=r)}function eg(r={}){const t=r.locale,i=Qm(r),e=rr(r.pluralRules)&&pt(t)&&mr(r.pluralRules[t])?r.pluralRules[t]:Nf,o=rr(r.pluralRules)&&pt(t)&&mr(r.pluralRules[t])?Nf:void 0,n=E=>E[e(i,E.length,o)],f=r.list||[],p=E=>f[E],u=r.named||{};gr(r.pluralIndex)&&Xm(i,u);const c=E=>u[E];function s(E){const R=mr(r.messages)?r.messages(E):rr(r.messages)?r.messages[E]:!1;return R||(r.parent?r.parent.message(E):Jm)}const l=E=>r.modifiers?r.modifiers[E]:Vm,d=It(r.processor)&&mr(r.processor.normalize)?r.processor.normalize:$m,b=It(r.processor)&&mr(r.processor.interpolate)?r.processor.interpolate:Zm,v=It(r.processor)&&pt(r.processor.type)?r.processor.type:Ym,x={list:p,named:c,plural:n,linked:(E,...R)=>{const[I,O]=R;let A="text",P="";R.length===1?rr(I)?(P=I.modifier||P,A=I.type||A):pt(I)&&(P=I||P):R.length===2&&(pt(I)&&(P=I||P),pt(O)&&(A=O||A));let N=s(E)(x);return A==="vnode"&&en(N)&&P&&(N=N[0]),P?l(P)(N,A):N},message:s,type:v,interpolate:b,normalize:d};return x}let ro=null;function tg(r){ro=r}function rg(r,t,i){ro&&ro.emit(Ah.I18nInit,{timestamp:Date.now(),i18n:r,version:t,meta:i})}const ng=ig(Ah.FunctionTranslate);function ig(r){return t=>ro&&ro.emit(r,t)}function og(r,t,i){return[...new Set([i,...en(t)?t:rr(t)?Object.keys(t):pt(t)?[t]:[i]])]}function Eh(r,t,i){const e=pt(i)?i:wu,o=r;o.__localeChainCache||(o.__localeChainCache=new Map);let n=o.__localeChainCache.get(e);if(!n){n=[];let f=[i];for(;en(f);)f=Bf(n,f,t);const p=en(t)||!It(t)?t:t.default?t.default:null;f=pt(p)?[p]:p,en(f)&&Bf(n,f,!1),o.__localeChainCache.set(e,n)}return n}function Bf(r,t,i){let e=!0;for(let o=0;o<t.length&&vr(e);o++){const n=t[o];pt(n)&&(e=sg(r,t[o],i))}return e}function sg(r,t,i){let e;const o=t.split("-");do{const n=o.join("-");e=ag(r,n,i),o.splice(-1,1)}while(o.length&&e===!0);return e}function ag(r,t,i){let e=!1;if(!r.includes(t)&&(e=!0,t)){e=t[t.length-1]!=="!";const o=t.replace(/!/g,"");r.push(o),(en(i)||It(i))&&i[o]&&(e=i[o])}return e}const ug="9.2.2",cs=-1,wu="en-US",Lf="",jf=r=>`${r.charAt(0).toLocaleUpperCase()}${r.substr(1)}`;function fg(){return{upper:(r,t)=>t==="text"&&pt(r)?r.toUpperCase():t==="vnode"&&rr(r)&&"__v_isVNode"in r?r.children.toUpperCase():r,lower:(r,t)=>t==="text"&&pt(r)?r.toLowerCase():t==="vnode"&&rr(r)&&"__v_isVNode"in r?r.children.toLowerCase():r,capitalize:(r,t)=>t==="text"&&pt(r)?jf(r):t==="vnode"&&rr(r)&&"__v_isVNode"in r?jf(r.children):r}}let cg,Sh;function lg(r){Sh=r}let kh;function hg(r){kh=r}let Rh=null;const Uf=r=>{Rh=r},dg=()=>Rh;let Th=null;const Df=r=>{Th=r},pg=()=>Th;let Ff=0;function mg(r={}){const t=pt(r.version)?r.version:ug,i=pt(r.locale)?r.locale:wu,e=en(r.fallbackLocale)||It(r.fallbackLocale)||pt(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:i,o=It(r.messages)?r.messages:{[i]:{}},n=It(r.datetimeFormats)?r.datetimeFormats:{[i]:{}},f=It(r.numberFormats)?r.numberFormats:{[i]:{}},p=fo({},r.modifiers||{},fg()),u=r.pluralRules||{},c=mr(r.missing)?r.missing:null,s=vr(r.missingWarn)||If(r.missingWarn)?r.missingWarn:!0,l=vr(r.fallbackWarn)||If(r.fallbackWarn)?r.fallbackWarn:!0,d=!!r.fallbackFormat,b=!!r.unresolving,v=mr(r.postTranslation)?r.postTranslation:null,y=It(r.processor)?r.processor:null,x=vr(r.warnHtmlMessage)?r.warnHtmlMessage:!0,E=!!r.escapeParameter,R=mr(r.messageCompiler)?r.messageCompiler:cg,I=mr(r.messageResolver)?r.messageResolver:Sh||Km,O=mr(r.localeFallbacker)?r.localeFallbacker:kh||og,A=rr(r.fallbackContext)?r.fallbackContext:void 0,P=mr(r.onWarn)?r.onWarn:Lm,N=r,L=rr(N.__datetimeFormatters)?N.__datetimeFormatters:new Map,H=rr(N.__numberFormatters)?N.__numberFormatters:new Map,J=rr(N.__meta)?N.__meta:{};Ff++;const G={version:t,cid:Ff,locale:i,fallbackLocale:e,messages:o,modifiers:p,pluralRules:u,missing:c,missingWarn:s,fallbackWarn:l,fallbackFormat:d,unresolving:b,postTranslation:v,processor:y,warnHtmlMessage:x,escapeParameter:E,messageCompiler:R,messageResolver:I,localeFallbacker:O,fallbackContext:A,onWarn:P,__meta:J};return G.datetimeFormats=n,G.numberFormats=f,G.__datetimeFormatters=L,G.__numberFormatters=H,__INTLIFY_PROD_DEVTOOLS__&&rg(G,t,J),G}function _u(r,t,i,e,o){const{missing:n,onWarn:f}=r;if(n!==null){const p=n(r,i,t,o);return pt(p)?p:t}else return t}function Ii(r,t,i){const e=r;e.__localeChainCache=new Map,r.localeFallbacker(r,i,t)}let Ih=Mh.__EXTEND_POINT__;const Cs=()=>++Ih,ni={INVALID_ARGUMENT:Ih,INVALID_DATE_ARGUMENT:Cs(),INVALID_ISO_DATE_ARGUMENT:Cs(),__EXTEND_POINT__:Cs()};function ii(r){return xh(r,null,void 0)}const qf=()=>"",Yr=r=>mr(r);function Hf(r,...t){const{fallbackFormat:i,postTranslation:e,unresolving:o,messageCompiler:n,fallbackLocale:f,messages:p}=r,[u,c]=ma(...t),s=vr(c.missingWarn)?c.missingWarn:r.missingWarn,l=vr(c.fallbackWarn)?c.fallbackWarn:r.fallbackWarn,d=vr(c.escapeParameter)?c.escapeParameter:r.escapeParameter,b=!!c.resolvedMessage,v=pt(c.default)||vr(c.default)?vr(c.default)?n?u:()=>u:c.default:i?n?u:()=>u:"",y=i||v!=="",x=pt(c.locale)?c.locale:r.locale;d&&gg(c);let[E,R,I]=b?[u,x,p[x]||{}]:Ch(r,u,x,f,l,s),O=E,A=u;if(!b&&!(pt(O)||Yr(O))&&y&&(O=v,A=O),!b&&(!(pt(O)||Yr(O))||!pt(R)))return o?cs:u;let P=!1;const N=()=>{P=!0},L=Yr(O)?O:Ph(r,u,R,O,A,N);if(P)return O;const H=yg(r,R,I,c),J=eg(H),G=vg(r,L,J),z=e?e(G,u):G;if(__INTLIFY_PROD_DEVTOOLS__){const S={timestamp:Date.now(),key:pt(u)?u:Yr(O)?O.key:"",locale:R||(Yr(O)?O.locale:""),format:pt(O)?O:Yr(O)?O.source:"",message:z};S.meta=fo({},r.__meta,dg()||{}),ng(S)}return z}function gg(r){en(r.list)?r.list=r.list.map(t=>pt(t)?Pf(t):t):rr(r.named)&&Object.keys(r.named).forEach(t=>{pt(r.named[t])&&(r.named[t]=Pf(r.named[t]))})}function Ch(r,t,i,e,o,n){const{messages:f,onWarn:p,messageResolver:u,localeFallbacker:c}=r,s=c(r,e,i);let l={},d,b=null;const v="translate";for(let y=0;y<s.length&&(d=s[y],l=f[d]||{},(b=u(l,t))===null&&(b=l[t]),!(pt(b)||mr(b)));y++){const x=_u(r,t,d,n,v);x!==t&&(b=x)}return[b,d,l]}function Ph(r,t,i,e,o,n){const{messageCompiler:f,warnHtmlMessage:p}=r;if(Yr(e)){const c=e;return c.locale=c.locale||i,c.key=c.key||t,c}if(f==null){const c=()=>e;return c.locale=i,c.key=t,c}const u=f(e,bg(r,i,o,e,p,n));return u.locale=i,u.key=t,u.source=e,u}function vg(r,t,i){return t(i)}function ma(...r){const[t,i,e]=r,o={};if(!pt(t)&&!gr(t)&&!Yr(t))throw ii(ni.INVALID_ARGUMENT);const n=gr(t)?String(t):(Yr(t),t);return gr(i)?o.plural=i:pt(i)?o.default=i:It(i)&&!bu(i)?o.named=i:en(i)&&(o.list=i),gr(e)?o.plural=e:pt(e)?o.default=e:It(e)&&fo(o,e),[n,o]}function bg(r,t,i,e,o,n){return{warnHtmlMessage:o,onError:f=>{throw n&&n(f),f},onCacheKey:f=>Om(t,i,f)}}function yg(r,t,i,e){const{modifiers:o,pluralRules:n,messageResolver:f,fallbackLocale:p,fallbackWarn:u,missingWarn:c,fallbackContext:s}=r,d={locale:t,modifiers:o,pluralRules:n,messages:b=>{let v=f(i,b);if(v==null&&s){const[,,y]=Ch(s,b,t,p,u,c);v=f(y,b)}if(pt(v)){let y=!1;const E=Ph(r,b,t,v,b,()=>{y=!0});return y?qf:E}else return Yr(v)?v:qf}};return r.processor&&(d.processor=r.processor),e.list&&(d.list=e.list),e.named&&(d.named=e.named),gr(e.plural)&&(d.pluralIndex=e.plural),d}function zf(r,...t){const{datetimeFormats:i,unresolving:e,fallbackLocale:o,onWarn:n,localeFallbacker:f}=r,{__datetimeFormatters:p}=r,[u,c,s,l]=ga(...t),d=vr(s.missingWarn)?s.missingWarn:r.missingWarn;vr(s.fallbackWarn)?s.fallbackWarn:r.fallbackWarn;const b=!!s.part,v=pt(s.locale)?s.locale:r.locale,y=f(r,o,v);if(!pt(u)||u==="")return new Intl.DateTimeFormat(v,l).format(c);let x={},E,R=null;const I="datetime format";for(let P=0;P<y.length&&(E=y[P],x=i[E]||{},R=x[u],!It(R));P++)_u(r,u,E,d,I);if(!It(R)||!pt(E))return e?cs:u;let O=`${E}__${u}`;bu(l)||(O=`${O}__${JSON.stringify(l)}`);let A=p.get(O);return A||(A=new Intl.DateTimeFormat(E,fo({},R,l)),p.set(O,A)),b?A.formatToParts(c):A.format(c)}const Oh=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ga(...r){const[t,i,e,o]=r,n={};let f={},p;if(pt(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw ii(ni.INVALID_ISO_DATE_ARGUMENT);const c=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();p=new Date(c);try{p.toISOString()}catch{throw ii(ni.INVALID_ISO_DATE_ARGUMENT)}}else if(Bm(t)){if(isNaN(t.getTime()))throw ii(ni.INVALID_DATE_ARGUMENT);p=t}else if(gr(t))p=t;else throw ii(ni.INVALID_ARGUMENT);return pt(i)?n.key=i:It(i)&&Object.keys(i).forEach(u=>{Oh.includes(u)?f[u]=i[u]:n[u]=i[u]}),pt(e)?n.locale=e:It(e)&&(f=e),It(o)&&(f=o),[n.key||"",p,n,f]}function Wf(r,t,i){const e=r;for(const o in i){const n=`${t}__${o}`;e.__datetimeFormatters.has(n)&&e.__datetimeFormatters.delete(n)}}function Kf(r,...t){const{numberFormats:i,unresolving:e,fallbackLocale:o,onWarn:n,localeFallbacker:f}=r,{__numberFormatters:p}=r,[u,c,s,l]=va(...t),d=vr(s.missingWarn)?s.missingWarn:r.missingWarn;vr(s.fallbackWarn)?s.fallbackWarn:r.fallbackWarn;const b=!!s.part,v=pt(s.locale)?s.locale:r.locale,y=f(r,o,v);if(!pt(u)||u==="")return new Intl.NumberFormat(v,l).format(c);let x={},E,R=null;const I="number format";for(let P=0;P<y.length&&(E=y[P],x=i[E]||{},R=x[u],!It(R));P++)_u(r,u,E,d,I);if(!It(R)||!pt(E))return e?cs:u;let O=`${E}__${u}`;bu(l)||(O=`${O}__${JSON.stringify(l)}`);let A=p.get(O);return A||(A=new Intl.NumberFormat(E,fo({},R,l)),p.set(O,A)),b?A.formatToParts(c):A.format(c)}const Nh=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function va(...r){const[t,i,e,o]=r,n={};let f={};if(!gr(t))throw ii(ni.INVALID_ARGUMENT);const p=t;return pt(i)?n.key=i:It(i)&&Object.keys(i).forEach(u=>{Nh.includes(u)?f[u]=i[u]:n[u]=i[u]}),pt(e)?n.locale=e:It(e)&&(f=e),It(o)&&(f=o),[n.key||"",p,n,f]}function Gf(r,t,i){const e=r;for(const o in i){const n=`${t}__${o}`;e.__numberFormatters.has(n)&&e.__numberFormatters.delete(n)}}typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(jm().__INTLIFY_PROD_DEVTOOLS__=!1);/*!
  * vue-i18n v9.2.2
  * (c) 2022 kazuya kawaguchi
  * Released under the MIT License.
  */const wg="9.2.2";function _g(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(yh().__INTLIFY_PROD_DEVTOOLS__=!1)}let Bh=Mh.__EXTEND_POINT__;const nr=()=>++Bh,yr={UNEXPECTED_RETURN_TYPE:Bh,INVALID_ARGUMENT:nr(),MUST_BE_CALL_SETUP_TOP:nr(),NOT_INSLALLED:nr(),NOT_AVAILABLE_IN_LEGACY_MODE:nr(),REQUIRED_VALUE:nr(),INVALID_VALUE:nr(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:nr(),NOT_INSLALLED_WITH_PROVIDE:nr(),UNEXPECTED_ERROR:nr(),NOT_COMPATIBLE_LEGACY_VUE_I18N:nr(),BRIDGE_SUPPORT_VUE_2_ONLY:nr(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:nr(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:nr(),__EXTEND_POINT__:nr()};function kr(r,...t){return xh(r,null,void 0)}const ba=Ln("__transrateVNode"),ya=Ln("__datetimeParts"),wa=Ln("__numberParts"),Mg=Ln("__setPluralRules");Ln("__intlifyMeta");const xg=Ln("__injectWithOption");function _a(r){if(!qr(r))return r;for(const t in r)if(vu(r,t))if(!t.includes("."))qr(r[t])&&_a(r[t]);else{const i=t.split("."),e=i.length-1;let o=r;for(let n=0;n<e;n++)i[n]in o||(o[i[n]]={}),o=o[i[n]];o[i[e]]=r[t],delete r[t],qr(o[i[e]])&&_a(o[i[e]])}return r}function Lh(r,t){const{messages:i,__i18n:e,messageResolver:o,flatJson:n}=t,f=Jr(i)?i:Qr(e)?{}:{[r]:{}};if(Qr(e)&&e.forEach(p=>{if("locale"in p&&"resource"in p){const{locale:u,resource:c}=p;u?(f[u]=f[u]||{},Ki(c,f[u])):Ki(c,f)}else Ht(p)&&Ki(JSON.parse(p),f)}),o==null&&n)for(const p in f)vu(f,p)&&_a(f[p]);return f}const Mo=r=>!qr(r)||Qr(r);function Ki(r,t){if(Mo(r)||Mo(t))throw kr(yr.INVALID_VALUE);for(const i in r)vu(r,i)&&(Mo(r[i])||Mo(t[i])?t[i]=r[i]:Ki(r[i],t[i]))}function jh(r){return r.type}function Ag(r,t,i){let e=qr(t.messages)?t.messages:{};"__i18nGlobal"in i&&(e=Lh(r.locale.value,{messages:e,__i18n:i.__i18nGlobal}));const o=Object.keys(e);o.length&&o.forEach(n=>{r.mergeLocaleMessage(n,e[n])});{if(qr(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach(f=>{r.mergeDateTimeFormat(f,t.datetimeFormats[f])})}if(qr(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach(f=>{r.mergeNumberFormat(f,t.numberFormats[f])})}}}function Vf(r){return Zt(uo,null,r,0)}const Jf="__INTLIFY_META__";let Yf=0;function $f(r){return(t,i,e,o)=>r(i,e,Ei()||void 0,o)}const Eg=()=>{const r=Ei();let t=null;return r&&(t=jh(r)[Jf])?{[Jf]:t}:null};function Uh(r={},t){const{__root:i}=r,e=i===void 0;let o=kn(r.inheritLocale)?r.inheritLocale:!0;const n=sr(i&&o?i.locale.value:Ht(r.locale)?r.locale:wu),f=sr(i&&o?i.fallbackLocale.value:Ht(r.fallbackLocale)||Qr(r.fallbackLocale)||Jr(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:n.value),p=sr(Lh(n.value,r)),u=sr(Jr(r.datetimeFormats)?r.datetimeFormats:{[n.value]:{}}),c=sr(Jr(r.numberFormats)?r.numberFormats:{[n.value]:{}});let s=i?i.missingWarn:kn(r.missingWarn)||Rf(r.missingWarn)?r.missingWarn:!0,l=i?i.fallbackWarn:kn(r.fallbackWarn)||Rf(r.fallbackWarn)?r.fallbackWarn:!0,d=i?i.fallbackRoot:kn(r.fallbackRoot)?r.fallbackRoot:!0,b=!!r.fallbackFormat,v=_o(r.missing)?r.missing:null,y=_o(r.missing)?$f(r.missing):null,x=_o(r.postTranslation)?r.postTranslation:null,E=i?i.warnHtmlMessage:kn(r.warnHtmlMessage)?r.warnHtmlMessage:!0,R=!!r.escapeParameter;const I=i?i.modifiers:Jr(r.modifiers)?r.modifiers:{};let O=r.pluralRules||i&&i.pluralRules,A;A=(()=>{e&&Df(null);const ie={version:wg,locale:n.value,fallbackLocale:f.value,messages:p.value,modifiers:I,pluralRules:O,missing:y===null?void 0:y,missingWarn:s,fallbackWarn:l,fallbackFormat:b,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:E,escapeParameter:R,messageResolver:r.messageResolver,__meta:{framework:"vue"}};ie.datetimeFormats=u.value,ie.numberFormats=c.value,ie.__datetimeFormatters=Jr(A)?A.__datetimeFormatters:void 0,ie.__numberFormatters=Jr(A)?A.__numberFormatters:void 0;const te=mg(ie);return e&&Df(te),te})(),Ii(A,n.value,f.value);function N(){return[n.value,f.value,p.value,u.value,c.value]}const L=Ut({get:()=>n.value,set:ie=>{n.value=ie,A.locale=n.value}}),H=Ut({get:()=>f.value,set:ie=>{f.value=ie,A.fallbackLocale=f.value,Ii(A,n.value,ie)}}),J=Ut(()=>p.value),G=Ut(()=>u.value),z=Ut(()=>c.value);function S(){return _o(x)?x:null}function a(ie){x=ie,A.postTranslation=ie}function w(){return v}function h(ie){ie!==null&&(y=$f(ie)),v=ie,A.missing=y}const m=(ie,te,le,ge,he,ye)=>{N();let Ie;if(__INTLIFY_PROD_DEVTOOLS__)try{Uf(Eg()),e||(A.fallbackContext=i?pg():void 0),Ie=ie(A)}finally{Uf(null),e||(A.fallbackContext=void 0)}else Ie=ie(A);if(to(Ie)&&Ie===cs){const[pe,Oe]=te();return i&&d?ge(i):he(pe)}else{if(ye(Ie))return Ie;throw kr(yr.UNEXPECTED_RETURN_TYPE)}};function g(...ie){return m(te=>Reflect.apply(Hf,null,[te,...ie]),()=>ma(...ie),"translate",te=>Reflect.apply(te.t,te,[...ie]),te=>te,te=>Ht(te))}function _(...ie){const[te,le,ge]=ie;if(ge&&!qr(ge))throw kr(yr.INVALID_ARGUMENT);return g(te,le,Xr({resolvedMessage:!0},ge||{}))}function T(...ie){return m(te=>Reflect.apply(zf,null,[te,...ie]),()=>ga(...ie),"datetime format",te=>Reflect.apply(te.d,te,[...ie]),()=>Lf,te=>Ht(te))}function k(...ie){return m(te=>Reflect.apply(Kf,null,[te,...ie]),()=>va(...ie),"number format",te=>Reflect.apply(te.n,te,[...ie]),()=>Lf,te=>Ht(te))}function M(ie){return ie.map(te=>Ht(te)||to(te)||kn(te)?Vf(String(te)):te)}const Y={normalize:M,interpolate:ie=>ie,type:"vnode"};function C(...ie){return m(te=>{let le;const ge=te;try{ge.processor=Y,le=Reflect.apply(Hf,null,[ge,...ie])}finally{ge.processor=null}return le},()=>ma(...ie),"translate",te=>te[ba](...ie),te=>[Vf(te)],te=>Qr(te))}function K(...ie){return m(te=>Reflect.apply(Kf,null,[te,...ie]),()=>va(...ie),"number format",te=>te[wa](...ie),()=>[],te=>Ht(te)||Qr(te))}function W(...ie){return m(te=>Reflect.apply(zf,null,[te,...ie]),()=>ga(...ie),"datetime format",te=>te[ya](...ie),()=>[],te=>Ht(te)||Qr(te))}function U(ie){O=ie,A.pluralRules=O}function q(ie,te){const le=Ht(te)?te:n.value,ge=F(le);return A.messageResolver(ge,ie)!==null}function j(ie){let te=null;const le=Eh(A,f.value,n.value);for(let ge=0;ge<le.length;ge++){const he=p.value[le[ge]]||{},ye=A.messageResolver(he,ie);if(ye!=null){te=ye;break}}return te}function D(ie){const te=j(ie);return te??(i?i.tm(ie)||{}:{})}function F(ie){return p.value[ie]||{}}function $(ie,te){p.value[ie]=te,A.messages=p.value}function V(ie,te){p.value[ie]=p.value[ie]||{},Ki(te,p.value[ie]),A.messages=p.value}function Z(ie){return u.value[ie]||{}}function ee(ie,te){u.value[ie]=te,A.datetimeFormats=u.value,Wf(A,ie,te)}function re(ie,te){u.value[ie]=Xr(u.value[ie]||{},te),A.datetimeFormats=u.value,Wf(A,ie,te)}function ue(ie){return c.value[ie]||{}}function fe(ie,te){c.value[ie]=te,A.numberFormats=c.value,Gf(A,ie,te)}function oe(ie,te){c.value[ie]=Xr(c.value[ie]||{},te),A.numberFormats=c.value,Gf(A,ie,te)}Yf++,i&&pa&&(Er(i.locale,ie=>{o&&(n.value=ie,A.locale=ie,Ii(A,n.value,f.value))}),Er(i.fallbackLocale,ie=>{o&&(f.value=ie,A.fallbackLocale=ie,Ii(A,n.value,f.value))}));const ae={id:Yf,locale:L,fallbackLocale:H,get inheritLocale(){return o},set inheritLocale(ie){o=ie,ie&&i&&(n.value=i.locale.value,f.value=i.fallbackLocale.value,Ii(A,n.value,f.value))},get availableLocales(){return Object.keys(p.value).sort()},messages:J,get modifiers(){return I},get pluralRules(){return O||{}},get isGlobal(){return e},get missingWarn(){return s},set missingWarn(ie){s=ie,A.missingWarn=s},get fallbackWarn(){return l},set fallbackWarn(ie){l=ie,A.fallbackWarn=l},get fallbackRoot(){return d},set fallbackRoot(ie){d=ie},get fallbackFormat(){return b},set fallbackFormat(ie){b=ie,A.fallbackFormat=b},get warnHtmlMessage(){return E},set warnHtmlMessage(ie){E=ie,A.warnHtmlMessage=ie},get escapeParameter(){return R},set escapeParameter(ie){R=ie,A.escapeParameter=ie},t:g,getLocaleMessage:F,setLocaleMessage:$,mergeLocaleMessage:V,getPostTranslationHandler:S,setPostTranslationHandler:a,getMissingHandler:w,setMissingHandler:h,[Mg]:U};return ae.datetimeFormats=G,ae.numberFormats=z,ae.rt=_,ae.te=q,ae.tm=D,ae.d=T,ae.n=k,ae.getDateTimeFormat=Z,ae.setDateTimeFormat=ee,ae.mergeDateTimeFormat=re,ae.getNumberFormat=ue,ae.setNumberFormat=fe,ae.mergeNumberFormat=oe,ae[xg]=r.__injectWithOption,ae[ba]=C,ae[ya]=W,ae[wa]=K,ae}const Mu={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:r=>r==="parent"||r==="global",default:"parent"},i18n:{type:Object}};function Sg({slots:r},t){return t.length===1&&t[0]==="default"?(r.default?r.default():[]).reduce((e,o)=>e=[...e,...Qr(o.children)?o.children:[o]],[]):t.reduce((i,e)=>{const o=r[e];return o&&(i[e]=o()),i},{})}function Dh(r){return pr}const Zf={name:"i18n-t",props:Xr({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:r=>to(r)||!isNaN(r)}},Mu),setup(r,t){const{slots:i,attrs:e}=t,o=r.i18n||xu({useScope:r.scope,__useComponent:!0});return()=>{const n=Object.keys(i).filter(l=>l!=="_"),f={};r.locale&&(f.locale=r.locale),r.plural!==void 0&&(f.plural=Ht(r.plural)?+r.plural:r.plural);const p=Sg(t,n),u=o[ba](r.keypath,p,f),c=Xr({},e),s=Ht(r.tag)||qr(r.tag)?r.tag:Dh();return us(s,c,u)}}};function kg(r){return Qr(r)&&!Ht(r[0])}function Fh(r,t,i,e){const{slots:o,attrs:n}=t;return()=>{const f={part:!0};let p={};r.locale&&(f.locale=r.locale),Ht(r.format)?f.key=r.format:qr(r.format)&&(Ht(r.format.key)&&(f.key=r.format.key),p=Object.keys(r.format).reduce((d,b)=>i.includes(b)?Xr({},d,{[b]:r.format[b]}):d,{}));const u=e(r.value,f,p);let c=[f.key];Qr(u)?c=u.map((d,b)=>{const v=o[d.type],y=v?v({[d.type]:d.value,index:b,parts:u}):[d.value];return kg(y)&&(y[0].key=`${d.type}-${b}`),y}):Ht(u)&&(c=[u]);const s=Xr({},n),l=Ht(r.tag)||qr(r.tag)?r.tag:Dh();return us(l,s,c)}}const Qf={name:"i18n-n",props:Xr({value:{type:Number,required:!0},format:{type:[String,Object]}},Mu),setup(r,t){const i=r.i18n||xu({useScope:"parent",__useComponent:!0});return Fh(r,t,Nh,(...e)=>i[wa](...e))}},Xf={name:"i18n-d",props:Xr({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Mu),setup(r,t){const i=r.i18n||xu({useScope:"parent",__useComponent:!0});return Fh(r,t,Oh,(...e)=>i[ya](...e))}};function Rg(r,t){const i=r;if(r.mode==="composition")return i.__getInstance(t)||r.global;{const e=i.__getInstance(t);return e!=null?e.__composer:r.global.__composer}}function Tg(r){const t=f=>{const{instance:p,modifiers:u,value:c}=f;if(!p||!p.$)throw kr(yr.UNEXPECTED_ERROR);const s=Rg(r,p.$),l=ec(c);return[Reflect.apply(s.t,s,[...tc(l)]),s]};return{created:(f,p)=>{const[u,c]=t(p);pa&&r.global===c&&(f.__i18nWatcher=Er(c.locale,()=>{p.instance&&p.instance.$forceUpdate()})),f.__composer=c,f.textContent=u},unmounted:f=>{pa&&f.__i18nWatcher&&(f.__i18nWatcher(),f.__i18nWatcher=void 0,delete f.__i18nWatcher),f.__composer&&(f.__composer=void 0,delete f.__composer)},beforeUpdate:(f,{value:p})=>{if(f.__composer){const u=f.__composer,c=ec(p);f.textContent=Reflect.apply(u.t,u,[...tc(c)])}},getSSRProps:f=>{const[p]=t(f);return{textContent:p}}}}function ec(r){if(Ht(r))return{path:r};if(Jr(r)){if(!("path"in r))throw kr(yr.REQUIRED_VALUE,"path");return r}else throw kr(yr.INVALID_VALUE)}function tc(r){const{path:t,locale:i,args:e,choice:o,plural:n}=r,f={},p=e||{};return Ht(i)&&(f.locale=i),to(o)&&(f.plural=o),to(n)&&(f.plural=n),[t,p,f]}function Ig(r,t,...i){const e=Jr(i[0])?i[0]:{},o=!!e.useI18nComponentName;(kn(e.globalInstall)?e.globalInstall:!0)&&(r.component(o?"i18n":Zf.name,Zf),r.component(Qf.name,Qf),r.component(Xf.name,Xf)),r.directive("t",Tg(t))}const Cg=Ln("global-vue-i18n");function Pg(r={},t){const i=kn(r.globalInjection)?r.globalInjection:!0,e=!0,o=new Map,[n,f]=Og(r),p=Ln("");function u(l){return o.get(l)||null}function c(l,d){o.set(l,d)}function s(l){o.delete(l)}{const l={get mode(){return"composition"},get allowComposition(){return e},async install(d,...b){d.__VUE_I18N_SYMBOL__=p,d.provide(d.__VUE_I18N_SYMBOL__,l),i&&qg(d,l.global),Ig(d,l,...b);const v=d.unmount;d.unmount=()=>{l.dispose(),v()}},get global(){return f},dispose(){n.stop()},__instances:o,__getInstance:u,__setInstance:c,__deleteInstance:s};return l}}function xu(r={}){const t=Ei();if(t==null)throw kr(yr.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw kr(yr.NOT_INSLALLED);const i=Ng(t),e=Lg(i),o=jh(t),n=Bg(r,o);if(n==="global")return Ag(e,r,o),e;if(n==="parent"){let u=jg(i,t,r.__useComponent);return u==null&&(u=e),u}const f=i;let p=f.__getInstance(t);if(p==null){const u=Xr({},r);"__i18n"in o&&(u.__i18n=o.__i18n),e&&(u.__root=e),p=Uh(u),Ug(f,t),f.__setInstance(t,p)}return p}function Og(r,t,i){const e=Ja();{const o=e.run(()=>Uh(r));if(o==null)throw kr(yr.UNEXPECTED_ERROR);return[e,o]}}function Ng(r){{const t=Ar(r.isCE?Cg:r.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw kr(r.isCE?yr.NOT_INSLALLED_WITH_PROVIDE:yr.UNEXPECTED_ERROR);return t}}function Bg(r,t){return Im(r)?"__i18n"in t?"local":"global":r.useScope?r.useScope:"local"}function Lg(r){return r.mode==="composition"?r.global:r.global.__composer}function jg(r,t,i=!1){let e=null;const o=t.root;let n=t.parent;for(;n!=null;){const f=r;if(r.mode==="composition"&&(e=f.__getInstance(n)),e!=null||o===n)break;n=n.parent}return e}function Ug(r,t,i){ss(()=>{},t),uu(()=>{r.__deleteInstance(t)},t)}const Dg=["locale","fallbackLocale","availableLocales"],Fg=["t","rt","d","n","tm"];function qg(r,t){const i=Object.create(null);Dg.forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);if(!o)throw kr(yr.UNEXPECTED_ERROR);const n=Lt(o.value)?{get(){return o.value.value},set(f){o.value.value=f}}:{get(){return o.get&&o.get()}};Object.defineProperty(i,e,n)}),r.config.globalProperties.$i18n=i,Fg.forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o.value)throw kr(yr.UNEXPECTED_ERROR);Object.defineProperty(r.config.globalProperties,`$${e}`,o)})}lg(Gm);hg(Eh);_g();if(__INTLIFY_PROD_DEVTOOLS__){const r=yh();r.__INTLIFY__=!0,tg(r.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}/*!
  * vue-router v4.1.6
  * (c) 2022 Eduardo San Martin Morote
  * @license MIT
  */const ti=typeof window<"u";function Hg(r){return r.__esModule||r[Symbol.toStringTag]==="Module"}const kt=Object.assign;function Ps(r,t){const i={};for(const e in t){const o=t[e];i[e]=Hr(o)?o.map(r):r(o)}return i}const Gi=()=>{},Hr=Array.isArray,zg=/\/$/,Wg=r=>r.replace(zg,"");function Os(r,t,i="/"){let e,o={},n="",f="";const p=t.indexOf("#");let u=t.indexOf("?");return p<u&&p>=0&&(u=-1),u>-1&&(e=t.slice(0,u),n=t.slice(u+1,p>-1?p:t.length),o=r(n)),p>-1&&(e=e||t.slice(0,p),f=t.slice(p,t.length)),e=Jg(e??t,i),{fullPath:e+(n&&"?")+n+f,path:e,query:o,hash:f}}function Kg(r,t){const i=t.query?r(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function rc(r,t){return!t||!r.toLowerCase().startsWith(t.toLowerCase())?r:r.slice(t.length)||"/"}function Gg(r,t,i){const e=t.matched.length-1,o=i.matched.length-1;return e>-1&&e===o&&mi(t.matched[e],i.matched[o])&&qh(t.params,i.params)&&r(t.query)===r(i.query)&&t.hash===i.hash}function mi(r,t){return(r.aliasOf||r)===(t.aliasOf||t)}function qh(r,t){if(Object.keys(r).length!==Object.keys(t).length)return!1;for(const i in r)if(!Vg(r[i],t[i]))return!1;return!0}function Vg(r,t){return Hr(r)?nc(r,t):Hr(t)?nc(t,r):r===t}function nc(r,t){return Hr(t)?r.length===t.length&&r.every((i,e)=>i===t[e]):r.length===1&&r[0]===t}function Jg(r,t){if(r.startsWith("/"))return r;if(!r)return t;const i=t.split("/"),e=r.split("/");let o=i.length-1,n,f;for(n=0;n<e.length;n++)if(f=e[n],f!==".")if(f==="..")o>1&&o--;else break;return i.slice(0,o).join("/")+"/"+e.slice(n-(n===e.length?1:0)).join("/")}var no;(function(r){r.pop="pop",r.push="push"})(no||(no={}));var Vi;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Vi||(Vi={}));function Yg(r){if(!r)if(ti){const t=document.querySelector("base");r=t&&t.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),Wg(r)}const $g=/^[^#]+#/;function Zg(r,t){return r.replace($g,"#")+t}function Qg(r,t){const i=document.documentElement.getBoundingClientRect(),e=r.getBoundingClientRect();return{behavior:t.behavior,left:e.left-i.left-(t.left||0),top:e.top-i.top-(t.top||0)}}const ls=()=>({left:window.pageXOffset,top:window.pageYOffset});function Xg(r){let t;if("el"in r){const i=r.el,e=typeof i=="string"&&i.startsWith("#"),o=typeof i=="string"?e?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!o)return;t=Qg(o,r)}else t=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ic(r,t){return(history.state?history.state.position-t:-1)+r}const Ma=new Map;function ev(r,t){Ma.set(r,t)}function tv(r){const t=Ma.get(r);return Ma.delete(r),t}let rv=()=>location.protocol+"//"+location.host;function Hh(r,t){const{pathname:i,search:e,hash:o}=t,n=r.indexOf("#");if(n>-1){let p=o.includes(r.slice(n))?r.slice(n).length:1,u=o.slice(p);return u[0]!=="/"&&(u="/"+u),rc(u,"")}return rc(i,r)+e+o}function nv(r,t,i,e){let o=[],n=[],f=null;const p=({state:d})=>{const b=Hh(r,location),v=i.value,y=t.value;let x=0;if(d){if(i.value=b,t.value=d,f&&f===v){f=null;return}x=y?d.position-y.position:0}else e(b);o.forEach(E=>{E(i.value,v,{delta:x,type:no.pop,direction:x?x>0?Vi.forward:Vi.back:Vi.unknown})})};function u(){f=i.value}function c(d){o.push(d);const b=()=>{const v=o.indexOf(d);v>-1&&o.splice(v,1)};return n.push(b),b}function s(){const{history:d}=window;d.state&&d.replaceState(kt({},d.state,{scroll:ls()}),"")}function l(){for(const d of n)d();n=[],window.removeEventListener("popstate",p),window.removeEventListener("beforeunload",s)}return window.addEventListener("popstate",p),window.addEventListener("beforeunload",s),{pauseListeners:u,listen:c,destroy:l}}function oc(r,t,i,e=!1,o=!1){return{back:r,current:t,forward:i,replaced:e,position:window.history.length,scroll:o?ls():null}}function iv(r){const{history:t,location:i}=window,e={value:Hh(r,i)},o={value:t.state};o.value||n(e.value,{back:null,current:e.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function n(u,c,s){const l=r.indexOf("#"),d=l>-1?(i.host&&document.querySelector("base")?r:r.slice(l))+u:rv()+r+u;try{t[s?"replaceState":"pushState"](c,"",d),o.value=c}catch(b){console.error(b),i[s?"replace":"assign"](d)}}function f(u,c){const s=kt({},t.state,oc(o.value.back,u,o.value.forward,!0),c,{position:o.value.position});n(u,s,!0),e.value=u}function p(u,c){const s=kt({},o.value,t.state,{forward:u,scroll:ls()});n(s.current,s,!0);const l=kt({},oc(e.value,u,null),{position:s.position+1},c);n(u,l,!1),e.value=u}return{location:e,state:o,push:p,replace:f}}function ov(r){r=Yg(r);const t=iv(r),i=nv(r,t.state,t.location,t.replace);function e(n,f=!0){f||i.pauseListeners(),history.go(n)}const o=kt({location:"",base:r,go:e,createHref:Zg.bind(null,r)},t,i);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function sv(r){return r=location.host?r||location.pathname+location.search:"",r.includes("#")||(r+="#"),ov(r)}function av(r){return typeof r=="string"||r&&typeof r=="object"}function zh(r){return typeof r=="string"||typeof r=="symbol"}const Mn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Wh=Symbol("");var sc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(sc||(sc={}));function gi(r,t){return kt(new Error,{type:r,[Wh]:!0},t)}function cn(r,t){return r instanceof Error&&Wh in r&&(t==null||!!(r.type&t))}const ac="[^/]+?",uv={sensitive:!1,strict:!1,start:!0,end:!0},fv=/[.+*?^${}()[\]/\\]/g;function cv(r,t){const i=kt({},uv,t),e=[];let o=i.start?"^":"";const n=[];for(const c of r){const s=c.length?[]:[90];i.strict&&!c.length&&(o+="/");for(let l=0;l<c.length;l++){const d=c[l];let b=40+(i.sensitive?.25:0);if(d.type===0)l||(o+="/"),o+=d.value.replace(fv,"\\$&"),b+=40;else if(d.type===1){const{value:v,repeatable:y,optional:x,regexp:E}=d;n.push({name:v,repeatable:y,optional:x});const R=E||ac;if(R!==ac){b+=10;try{new RegExp(`(${R})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${v}" (${R}): `+O.message)}}let I=y?`((?:${R})(?:/(?:${R}))*)`:`(${R})`;l||(I=x&&c.length<2?`(?:/${I})`:"/"+I),x&&(I+="?"),o+=I,b+=20,x&&(b+=-8),y&&(b+=-20),R===".*"&&(b+=-50)}s.push(b)}e.push(s)}if(i.strict&&i.end){const c=e.length-1;e[c][e[c].length-1]+=.7000000000000001}i.strict||(o+="/?"),i.end?o+="$":i.strict&&(o+="(?:/|$)");const f=new RegExp(o,i.sensitive?"":"i");function p(c){const s=c.match(f),l={};if(!s)return null;for(let d=1;d<s.length;d++){const b=s[d]||"",v=n[d-1];l[v.name]=b&&v.repeatable?b.split("/"):b}return l}function u(c){let s="",l=!1;for(const d of r){(!l||!s.endsWith("/"))&&(s+="/"),l=!1;for(const b of d)if(b.type===0)s+=b.value;else if(b.type===1){const{value:v,repeatable:y,optional:x}=b,E=v in c?c[v]:"";if(Hr(E)&&!y)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const R=Hr(E)?E.join("/"):E;if(!R)if(x)d.length<2&&(s.endsWith("/")?s=s.slice(0,-1):l=!0);else throw new Error(`Missing required param "${v}"`);s+=R}}return s||"/"}return{re:f,score:e,keys:n,parse:p,stringify:u}}function lv(r,t){let i=0;for(;i<r.length&&i<t.length;){const e=t[i]-r[i];if(e)return e;i++}return r.length<t.length?r.length===1&&r[0]===40+40?-1:1:r.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function hv(r,t){let i=0;const e=r.score,o=t.score;for(;i<e.length&&i<o.length;){const n=lv(e[i],o[i]);if(n)return n;i++}if(Math.abs(o.length-e.length)===1){if(uc(e))return 1;if(uc(o))return-1}return o.length-e.length}function uc(r){const t=r[r.length-1];return r.length>0&&t[t.length-1]<0}const dv={type:0,value:""},pv=/[a-zA-Z0-9_]/;function mv(r){if(!r)return[[]];if(r==="/")return[[dv]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function t(b){throw new Error(`ERR (${i})/"${c}": ${b}`)}let i=0,e=i;const o=[];let n;function f(){n&&o.push(n),n=[]}let p=0,u,c="",s="";function l(){c&&(i===0?n.push({type:0,value:c}):i===1||i===2||i===3?(n.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),n.push({type:1,value:c,regexp:s,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function d(){c+=u}for(;p<r.length;){if(u=r[p++],u==="\\"&&i!==2){e=i,i=4;continue}switch(i){case 0:u==="/"?(c&&l(),f()):u===":"?(l(),i=1):d();break;case 4:d(),i=e;break;case 1:u==="("?i=2:pv.test(u)?d():(l(),i=0,u!=="*"&&u!=="?"&&u!=="+"&&p--);break;case 2:u===")"?s[s.length-1]=="\\"?s=s.slice(0,-1)+u:i=3:s+=u;break;case 3:l(),i=0,u!=="*"&&u!=="?"&&u!=="+"&&p--,s="";break;default:t("Unknown state");break}}return i===2&&t(`Unfinished custom RegExp for param "${c}"`),l(),f(),o}function gv(r,t,i){const e=cv(mv(r.path),i),o=kt(e,{record:r,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function vv(r,t){const i=[],e=new Map;t=lc({strict:!1,end:!0,sensitive:!1},t);function o(s){return e.get(s)}function n(s,l,d){const b=!d,v=bv(s);v.aliasOf=d&&d.record;const y=lc(t,s),x=[v];if("alias"in s){const I=typeof s.alias=="string"?[s.alias]:s.alias;for(const O of I)x.push(kt({},v,{components:d?d.record.components:v.components,path:O,aliasOf:d?d.record:v}))}let E,R;for(const I of x){const{path:O}=I;if(l&&O[0]!=="/"){const A=l.record.path,P=A[A.length-1]==="/"?"":"/";I.path=l.record.path+(O&&P+O)}if(E=gv(I,l,y),d?d.alias.push(E):(R=R||E,R!==E&&R.alias.push(E),b&&s.name&&!cc(E)&&f(s.name)),v.children){const A=v.children;for(let P=0;P<A.length;P++)n(A[P],E,d&&d.children[P])}d=d||E,(E.record.components&&Object.keys(E.record.components).length||E.record.name||E.record.redirect)&&u(E)}return R?()=>{f(R)}:Gi}function f(s){if(zh(s)){const l=e.get(s);l&&(e.delete(s),i.splice(i.indexOf(l),1),l.children.forEach(f),l.alias.forEach(f))}else{const l=i.indexOf(s);l>-1&&(i.splice(l,1),s.record.name&&e.delete(s.record.name),s.children.forEach(f),s.alias.forEach(f))}}function p(){return i}function u(s){let l=0;for(;l<i.length&&hv(s,i[l])>=0&&(s.record.path!==i[l].record.path||!Kh(s,i[l]));)l++;i.splice(l,0,s),s.record.name&&!cc(s)&&e.set(s.record.name,s)}function c(s,l){let d,b={},v,y;if("name"in s&&s.name){if(d=e.get(s.name),!d)throw gi(1,{location:s});y=d.record.name,b=kt(fc(l.params,d.keys.filter(R=>!R.optional).map(R=>R.name)),s.params&&fc(s.params,d.keys.map(R=>R.name))),v=d.stringify(b)}else if("path"in s)v=s.path,d=i.find(R=>R.re.test(v)),d&&(b=d.parse(v),y=d.record.name);else{if(d=l.name?e.get(l.name):i.find(R=>R.re.test(l.path)),!d)throw gi(1,{location:s,currentLocation:l});y=d.record.name,b=kt({},l.params,s.params),v=d.stringify(b)}const x=[];let E=d;for(;E;)x.unshift(E.record),E=E.parent;return{name:y,path:v,params:b,matched:x,meta:wv(x)}}return r.forEach(s=>n(s)),{addRoute:n,resolve:c,removeRoute:f,getRoutes:p,getRecordMatcher:o}}function fc(r,t){const i={};for(const e of t)e in r&&(i[e]=r[e]);return i}function bv(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:yv(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}}}function yv(r){const t={},i=r.props||!1;if("component"in r)t.default=i;else for(const e in r.components)t[e]=typeof i=="boolean"?i:i[e];return t}function cc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function wv(r){return r.reduce((t,i)=>kt(t,i.meta),{})}function lc(r,t){const i={};for(const e in r)i[e]=e in t?t[e]:r[e];return i}function Kh(r,t){return t.children.some(i=>i===r||Kh(r,i))}const Gh=/#/g,_v=/&/g,Mv=/\//g,xv=/=/g,Av=/\?/g,Vh=/\+/g,Ev=/%5B/g,Sv=/%5D/g,Jh=/%5E/g,kv=/%60/g,Yh=/%7B/g,Rv=/%7C/g,$h=/%7D/g,Tv=/%20/g;function Au(r){return encodeURI(""+r).replace(Rv,"|").replace(Ev,"[").replace(Sv,"]")}function Iv(r){return Au(r).replace(Yh,"{").replace($h,"}").replace(Jh,"^")}function xa(r){return Au(r).replace(Vh,"%2B").replace(Tv,"+").replace(Gh,"%23").replace(_v,"%26").replace(kv,"`").replace(Yh,"{").replace($h,"}").replace(Jh,"^")}function Cv(r){return xa(r).replace(xv,"%3D")}function Pv(r){return Au(r).replace(Gh,"%23").replace(Av,"%3F")}function Ov(r){return r==null?"":Pv(r).replace(Mv,"%2F")}function Ho(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function Nv(r){const t={};if(r===""||r==="?")return t;const e=(r[0]==="?"?r.slice(1):r).split("&");for(let o=0;o<e.length;++o){const n=e[o].replace(Vh," "),f=n.indexOf("="),p=Ho(f<0?n:n.slice(0,f)),u=f<0?null:Ho(n.slice(f+1));if(p in t){let c=t[p];Hr(c)||(c=t[p]=[c]),c.push(u)}else t[p]=u}return t}function hc(r){let t="";for(let i in r){const e=r[i];if(i=Cv(i),e==null){e!==void 0&&(t+=(t.length?"&":"")+i);continue}(Hr(e)?e.map(n=>n&&xa(n)):[e&&xa(e)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+i,n!=null&&(t+="="+n))})}return t}function Bv(r){const t={};for(const i in r){const e=r[i];e!==void 0&&(t[i]=Hr(e)?e.map(o=>o==null?null:""+o):e==null?e:""+e)}return t}const Lv=Symbol(""),dc=Symbol(""),hs=Symbol(""),Zh=Symbol(""),Aa=Symbol("");function Ci(){let r=[];function t(e){return r.push(e),()=>{const o=r.indexOf(e);o>-1&&r.splice(o,1)}}function i(){r=[]}return{add:t,list:()=>r,reset:i}}function Rn(r,t,i,e,o){const n=e&&(e.enterCallbacks[o]=e.enterCallbacks[o]||[]);return()=>new Promise((f,p)=>{const u=l=>{l===!1?p(gi(4,{from:i,to:t})):l instanceof Error?p(l):av(l)?p(gi(2,{from:t,to:l})):(n&&e.enterCallbacks[o]===n&&typeof l=="function"&&n.push(l),f())},c=r.call(e&&e.instances[o],t,i,u);let s=Promise.resolve(c);r.length<3&&(s=s.then(u)),s.catch(l=>p(l))})}function Ns(r,t,i,e){const o=[];for(const n of r)for(const f in n.components){let p=n.components[f];if(!(t!=="beforeRouteEnter"&&!n.instances[f]))if(jv(p)){const c=(p.__vccOpts||p)[t];c&&o.push(Rn(c,i,e,n,f))}else{let u=p();o.push(()=>u.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${f}" at "${n.path}"`));const s=Hg(c)?c.default:c;n.components[f]=s;const d=(s.__vccOpts||s)[t];return d&&Rn(d,i,e,n,f)()}))}}return o}function jv(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function pc(r){const t=Ar(hs),i=Ar(Zh),e=Ut(()=>t.resolve(Cn(r.to))),o=Ut(()=>{const{matched:u}=e.value,{length:c}=u,s=u[c-1],l=i.matched;if(!s||!l.length)return-1;const d=l.findIndex(mi.bind(null,s));if(d>-1)return d;const b=mc(u[c-2]);return c>1&&mc(s)===b&&l[l.length-1].path!==b?l.findIndex(mi.bind(null,u[c-2])):d}),n=Ut(()=>o.value>-1&&qv(i.params,e.value.params)),f=Ut(()=>o.value>-1&&o.value===i.matched.length-1&&qh(i.params,e.value.params));function p(u={}){return Fv(u)?t[Cn(r.replace)?"replace":"push"](Cn(r.to)).catch(Gi):Promise.resolve()}return{route:e,href:Ut(()=>e.value.href),isActive:n,isExactActive:f,navigate:p}}const Uv=au({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:pc,setup(r,{slots:t}){const i=Ai(pc(r)),{options:e}=Ar(hs),o=Ut(()=>({[gc(r.activeClass,e.linkActiveClass,"router-link-active")]:i.isActive,[gc(r.exactActiveClass,e.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const n=t.default&&t.default(i);return r.custom?n:us("a",{"aria-current":i.isExactActive?r.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:o.value},n)}}}),Dv=Uv;function Fv(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const t=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return r.preventDefault&&r.preventDefault(),!0}}function qv(r,t){for(const i in t){const e=t[i],o=r[i];if(typeof e=="string"){if(e!==o)return!1}else if(!Hr(o)||o.length!==e.length||e.some((n,f)=>n!==o[f]))return!1}return!0}function mc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const gc=(r,t,i)=>r??t??i,Hv=au({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:t,slots:i}){const e=Ar(Aa),o=Ut(()=>r.route||e.value),n=Ar(dc,0),f=Ut(()=>{let c=Cn(n);const{matched:s}=o.value;let l;for(;(l=s[c])&&!l.components;)c++;return c}),p=Ut(()=>o.value.matched[f.value]);ko(dc,Ut(()=>f.value+1)),ko(Lv,p),ko(Aa,o);const u=sr();return Er(()=>[u.value,p.value,r.name],([c,s,l],[d,b,v])=>{s&&(s.instances[l]=c,b&&b!==s&&c&&c===d&&(s.leaveGuards.size||(s.leaveGuards=b.leaveGuards),s.updateGuards.size||(s.updateGuards=b.updateGuards))),c&&s&&(!b||!mi(s,b)||!d)&&(s.enterCallbacks[l]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=o.value,s=r.name,l=p.value,d=l&&l.components[s];if(!d)return vc(i.default,{Component:d,route:c});const b=l.props[s],v=b?b===!0?c.params:typeof b=="function"?b(c):b:null,x=us(d,kt({},v,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(l.instances[s]=null)},ref:u}));return vc(i.default,{Component:x,route:c})||x}}});function vc(r,t){if(!r)return null;const i=r(t);return i.length===1?i[0]:i}const zv=Hv;function Wv(r){const t=vv(r.routes,r),i=r.parseQuery||Nv,e=r.stringifyQuery||hc,o=r.history,n=Ci(),f=Ci(),p=Ci(),u=Cl(Mn);let c=Mn;ti&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const s=Ps.bind(null,C=>""+C),l=Ps.bind(null,Ov),d=Ps.bind(null,Ho);function b(C,K){let W,U;return zh(C)?(W=t.getRecordMatcher(C),U=K):U=C,t.addRoute(U,W)}function v(C){const K=t.getRecordMatcher(C);K&&t.removeRoute(K)}function y(){return t.getRoutes().map(C=>C.record)}function x(C){return!!t.getRecordMatcher(C)}function E(C,K){if(K=kt({},K||u.value),typeof C=="string"){const F=Os(i,C,K.path),$=t.resolve({path:F.path},K),V=o.createHref(F.fullPath);return kt(F,$,{params:d($.params),hash:Ho(F.hash),redirectedFrom:void 0,href:V})}let W;if("path"in C)W=kt({},C,{path:Os(i,C.path,K.path).path});else{const F=kt({},C.params);for(const $ in F)F[$]==null&&delete F[$];W=kt({},C,{params:l(C.params)}),K.params=l(K.params)}const U=t.resolve(W,K),q=C.hash||"";U.params=s(d(U.params));const j=Kg(e,kt({},C,{hash:Iv(q),path:U.path})),D=o.createHref(j);return kt({fullPath:j,hash:q,query:e===hc?Bv(C.query):C.query||{}},U,{redirectedFrom:void 0,href:D})}function R(C){return typeof C=="string"?Os(i,C,u.value.path):kt({},C)}function I(C,K){if(c!==C)return gi(8,{from:K,to:C})}function O(C){return N(C)}function A(C){return O(kt(R(C),{replace:!0}))}function P(C){const K=C.matched[C.matched.length-1];if(K&&K.redirect){const{redirect:W}=K;let U=typeof W=="function"?W(C):W;return typeof U=="string"&&(U=U.includes("?")||U.includes("#")?U=R(U):{path:U},U.params={}),kt({query:C.query,hash:C.hash,params:"path"in U?{}:C.params},U)}}function N(C,K){const W=c=E(C),U=u.value,q=C.state,j=C.force,D=C.replace===!0,F=P(W);if(F)return N(kt(R(F),{state:typeof F=="object"?kt({},q,F.state):q,force:j,replace:D}),K||W);const $=W;$.redirectedFrom=K;let V;return!j&&Gg(e,U,W)&&(V=gi(16,{to:$,from:U}),T(U,U,!0,!1)),(V?Promise.resolve(V):H($,U)).catch(Z=>cn(Z)?cn(Z,2)?Z:_(Z):m(Z,$,U)).then(Z=>{if(Z){if(cn(Z,2))return N(kt({replace:D},R(Z.to),{state:typeof Z.to=="object"?kt({},q,Z.to.state):q,force:j}),K||$)}else Z=G($,U,!0,D,q);return J($,U,Z),Z})}function L(C,K){const W=I(C,K);return W?Promise.reject(W):Promise.resolve()}function H(C,K){let W;const[U,q,j]=Kv(C,K);W=Ns(U.reverse(),"beforeRouteLeave",C,K);for(const F of U)F.leaveGuards.forEach($=>{W.push(Rn($,C,K))});const D=L.bind(null,C,K);return W.push(D),Xn(W).then(()=>{W=[];for(const F of n.list())W.push(Rn(F,C,K));return W.push(D),Xn(W)}).then(()=>{W=Ns(q,"beforeRouteUpdate",C,K);for(const F of q)F.updateGuards.forEach($=>{W.push(Rn($,C,K))});return W.push(D),Xn(W)}).then(()=>{W=[];for(const F of C.matched)if(F.beforeEnter&&!K.matched.includes(F))if(Hr(F.beforeEnter))for(const $ of F.beforeEnter)W.push(Rn($,C,K));else W.push(Rn(F.beforeEnter,C,K));return W.push(D),Xn(W)}).then(()=>(C.matched.forEach(F=>F.enterCallbacks={}),W=Ns(j,"beforeRouteEnter",C,K),W.push(D),Xn(W))).then(()=>{W=[];for(const F of f.list())W.push(Rn(F,C,K));return W.push(D),Xn(W)}).catch(F=>cn(F,8)?F:Promise.reject(F))}function J(C,K,W){for(const U of p.list())U(C,K,W)}function G(C,K,W,U,q){const j=I(C,K);if(j)return j;const D=K===Mn,F=ti?history.state:{};W&&(U||D?o.replace(C.fullPath,kt({scroll:D&&F&&F.scroll},q)):o.push(C.fullPath,q)),u.value=C,T(C,K,W,D),_()}let z;function S(){z||(z=o.listen((C,K,W)=>{if(!Y.listening)return;const U=E(C),q=P(U);if(q){N(kt(q,{replace:!0}),U).catch(Gi);return}c=U;const j=u.value;ti&&ev(ic(j.fullPath,W.delta),ls()),H(U,j).catch(D=>cn(D,12)?D:cn(D,2)?(N(D.to,U).then(F=>{cn(F,20)&&!W.delta&&W.type===no.pop&&o.go(-1,!1)}).catch(Gi),Promise.reject()):(W.delta&&o.go(-W.delta,!1),m(D,U,j))).then(D=>{D=D||G(U,j,!1),D&&(W.delta&&!cn(D,8)?o.go(-W.delta,!1):W.type===no.pop&&cn(D,20)&&o.go(-1,!1)),J(U,j,D)}).catch(Gi)}))}let a=Ci(),w=Ci(),h;function m(C,K,W){_(C);const U=w.list();return U.length?U.forEach(q=>q(C,K,W)):console.error(C),Promise.reject(C)}function g(){return h&&u.value!==Mn?Promise.resolve():new Promise((C,K)=>{a.add([C,K])})}function _(C){return h||(h=!C,S(),a.list().forEach(([K,W])=>C?W(C):K()),a.reset()),C}function T(C,K,W,U){const{scrollBehavior:q}=r;if(!ti||!q)return Promise.resolve();const j=!W&&tv(ic(C.fullPath,0))||(U||!W)&&history.state&&history.state.scroll||null;return ao().then(()=>q(C,K,j)).then(D=>D&&Xg(D)).catch(D=>m(D,C,K))}const k=C=>o.go(C);let M;const B=new Set,Y={currentRoute:u,listening:!0,addRoute:b,removeRoute:v,hasRoute:x,getRoutes:y,resolve:E,options:r,push:O,replace:A,go:k,back:()=>k(-1),forward:()=>k(1),beforeEach:n.add,beforeResolve:f.add,afterEach:p.add,onError:w.add,isReady:g,install(C){const K=this;C.component("RouterLink",Dv),C.component("RouterView",zv),C.config.globalProperties.$router=K,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>Cn(u)}),ti&&!M&&u.value===Mn&&(M=!0,O(o.location).catch(q=>{}));const W={};for(const q in Mn)W[q]=Ut(()=>u.value[q]);C.provide(hs,K),C.provide(Zh,Ai(W)),C.provide(Aa,u);const U=C.unmount;B.add(C),C.unmount=function(){B.delete(C),B.size<1&&(c=Mn,z&&z(),z=null,u.value=Mn,M=!1,h=!1),U()}}};return Y}function Xn(r){return r.reduce((t,i)=>t.then(()=>i()),Promise.resolve())}function Kv(r,t){const i=[],e=[],o=[],n=Math.max(t.matched.length,r.matched.length);for(let f=0;f<n;f++){const p=t.matched[f];p&&(r.matched.find(c=>mi(c,p))?e.push(p):i.push(p));const u=r.matched[f];u&&(t.matched.find(c=>mi(c,u))||o.push(u))}return[i,e,o]}function p_(){return Ar(hs)}const Qh={BASE_LOGIN:"/login",BASE_HOME:"/home",ERROR_PAGE:"/exception"},Gv="modulepreload",Vv=function(r){return"https://keylab.cc/testConnect/"+r},bc={},Eu=function(t,i,e){if(!i||i.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(i.map(n=>{if(n=Vv(n),n in bc)return;bc[n]=!0;const f=n.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(!!e)for(let s=o.length-1;s>=0;s--){const l=o[s];if(l.href===n&&(!f||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const c=document.createElement("link");if(c.rel=f?"stylesheet":Gv,f||(c.as="script",c.crossOrigin=""),c.href=n,document.head.appendChild(c),f)return new Promise((s,l)=>{c.addEventListener("load",s),c.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Jv=[{path:"/home",name:"Home",component:()=>Eu(()=>import("./index-bb6a27d4.js"),[]),meta:{title:"Home"}}],Yv=Object.freeze(Object.defineProperty({__proto__:null,default:Jv},Symbol.toStringTag,{value:"Module"})),$v="PageNotFound",Zv=()=>Eu(()=>import("./index-f0c4c0c6.js"),[]),Qv=()=>Eu(()=>import("./index-59782b22.js"),["assets/index-59782b22.js","assets/index-9b071095.css"]),Xv={path:"/:path(.*)*",name:$v,component:Zv,meta:{title:"ErrorPage"}},yc=Object.assign({"./modules/home.js":Yv}),Xh=[];Object.keys(yc).forEach(r=>{const t=yc[r].default||{},i=Array.isArray(t)?[...t]:[t];Xh.push(...i)});const eb={path:"/layout",name:"Layout",component:Qv,meta:{title:"Layout"},redirect:Qh.BASE_HOME,children:[...Xh,Xv]},tb={path:"/",name:"Root",redirect:Qh.BASE_HOME,meta:{title:"Root"}},rb=[tb,eb];var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nb(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function ib(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var i=function e(){if(this instanceof e){var o=[null];o.push.apply(o,arguments);var n=Function.bind.apply(t,o);return new n}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(e){var o=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:function(){return r[e]}})}),i}var Ea={},ob={get exports(){return Ea},set exports(r){Ea=r}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
 * @license MIT */(function(r,t){(function(i,e){r.exports=e()})(co,function(){var i={};i.version="0.2.0";var e=i.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};i.configure=function(v){var y,x;for(y in v)x=v[y],x!==void 0&&v.hasOwnProperty(y)&&(e[y]=x);return this},i.status=null,i.set=function(v){var y=i.isStarted();v=o(v,e.minimum,1),i.status=v===1?null:v;var x=i.render(!y),E=x.querySelector(e.barSelector),R=e.speed,I=e.easing;return x.offsetWidth,p(function(O){e.positionUsing===""&&(e.positionUsing=i.getPositioningCSS()),u(E,f(v,R,I)),v===1?(u(x,{transition:"none",opacity:1}),x.offsetWidth,setTimeout(function(){u(x,{transition:"all "+R+"ms linear",opacity:0}),setTimeout(function(){i.remove(),O()},R)},R)):setTimeout(O,R)}),this},i.isStarted=function(){return typeof i.status=="number"},i.start=function(){i.status||i.set(0);var v=function(){setTimeout(function(){i.status&&(i.trickle(),v())},e.trickleSpeed)};return e.trickle&&v(),this},i.done=function(v){return!v&&!i.status?this:i.inc(.3+.5*Math.random()).set(1)},i.inc=function(v){var y=i.status;return y?(typeof v!="number"&&(v=(1-y)*o(Math.random()*y,.1,.95)),y=o(y+v,0,.994),i.set(y)):i.start()},i.trickle=function(){return i.inc(Math.random()*e.trickleRate)},function(){var v=0,y=0;i.promise=function(x){return!x||x.state()==="resolved"?this:(y===0&&i.start(),v++,y++,x.always(function(){y--,y===0?(v=0,i.done()):i.set((v-y)/v)}),this)}}(),i.render=function(v){if(i.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var y=document.createElement("div");y.id="nprogress",y.innerHTML=e.template;var x=y.querySelector(e.barSelector),E=v?"-100":n(i.status||0),R=document.querySelector(e.parent),I;return u(x,{transition:"all 0 linear",transform:"translate3d("+E+"%,0,0)"}),e.showSpinner||(I=y.querySelector(e.spinnerSelector),I&&b(I)),R!=document.body&&s(R,"nprogress-custom-parent"),R.appendChild(y),y},i.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(e.parent),"nprogress-custom-parent");var v=document.getElementById("nprogress");v&&b(v)},i.isRendered=function(){return!!document.getElementById("nprogress")},i.getPositioningCSS=function(){var v=document.body.style,y="WebkitTransform"in v?"Webkit":"MozTransform"in v?"Moz":"msTransform"in v?"ms":"OTransform"in v?"O":"";return y+"Perspective"in v?"translate3d":y+"Transform"in v?"translate":"margin"};function o(v,y,x){return v<y?y:v>x?x:v}function n(v){return(-1+v)*100}function f(v,y,x){var E;return e.positionUsing==="translate3d"?E={transform:"translate3d("+n(v)+"%,0,0)"}:e.positionUsing==="translate"?E={transform:"translate("+n(v)+"%,0)"}:E={"margin-left":n(v)+"%"},E.transition="all "+y+"ms "+x,E}var p=function(){var v=[];function y(){var x=v.shift();x&&x(y)}return function(x){v.push(x),v.length==1&&y()}}(),u=function(){var v=["Webkit","O","Moz","ms"],y={};function x(O){return O.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(A,P){return P.toUpperCase()})}function E(O){var A=document.body.style;if(O in A)return O;for(var P=v.length,N=O.charAt(0).toUpperCase()+O.slice(1),L;P--;)if(L=v[P]+N,L in A)return L;return O}function R(O){return O=x(O),y[O]||(y[O]=E(O))}function I(O,A,P){A=R(A),O.style[A]=P}return function(O,A){var P=arguments,N,L;if(P.length==2)for(N in A)L=A[N],L!==void 0&&A.hasOwnProperty(N)&&I(O,N,L);else I(O,P[1],P[2])}}();function c(v,y){var x=typeof v=="string"?v:d(v);return x.indexOf(" "+y+" ")>=0}function s(v,y){var x=d(v),E=x+y;c(x,y)||(v.className=E.substring(1))}function l(v,y){var x=d(v),E;c(v,y)&&(E=x.replace(" "+y+" "," "),v.className=E.substring(1,E.length-1))}function d(v){return(" "+(v.className||"")+" ").replace(/\s+/gi," ")}function b(v){v&&v.parentNode&&v.parentNode.removeChild(v)}return i})})(ob);const zo=Ea;zo.configure({easing:"ease",speed:300,showSpinner:!0,trickleSpeed:200,minimum:.1});const Su=Wv({history:sv(),routes:rb,strict:!0,scrollBehavior:()=>({left:0,top:0})});Su.beforeEach(()=>{zo.isStarted()||zo.start()});Su.afterEach(()=>{zo.done()});var zt=(r=>(r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Info=2]="Info",r[r.Warn=3]="Warn",r[r.Error=4]="Error",r))(zt||{});function Sa(r,...t){switch(r){case zt.Trace:return console.trace(...t);case zt.Debug:return console.debug(...t);case zt.Info:return console.info(...t);case zt.Warn:return console.warn(...t);case zt.Error:return console.error(...t)}}class sb{constructor(t,i){this.identifier=t,this.value=i}toJSON(){return{identifier:this.identifier,value:this.value}}}let ed=class{constructor(t="%s",i=!0){this.formatType=t,this.useColors=i,this.minimumTagWidth=5,this.message={format:"",args:[],fields:[]}}tag(t,i){let e=t;for(let o=t.length;o<this.minimumTagWidth;++o)e+=" ";this.push(`${e} `,i)}push(t,i,e){if(Array.isArray(t)&&t.every(o=>o instanceof sb)){this.message.fields.push(...t);return}this.useColors&&(i||e)?(this.message.format+=`${this.formatType}${this.getType(t)}${this.formatType}`,this.message.args.push(this.style(i,e),t,this.reset())):(this.message.format+=`${this.getType(t)}`,this.message.args.push(t))}write(t){const i=this.flush();this.doWrite(t,i)}flush(){const t=this.message;return this.message={format:"",args:[],fields:[]},t}getType(t){switch(typeof t){case"object":return"%o";case"number":return"%d";default:return"%s"}}};class ab extends ed{constructor(){super("%c")}style(t,i){return(t?`color: ${t};`:"")+(i?`font-weight: ${i};`:"")}reset(){return this.style("inherit","normal")}doWrite(t,i){console.groupCollapsed(i.format,...i.args),i.fields.forEach(e=>{this.push(e.identifier,"#3794ff","bold"),typeof e.value<"u"&&e.value.constructor&&e.value.constructor.name&&this.push(` (${e.value.constructor.name})`),this.push(": "),this.push(e.value);const o=this.flush();Sa(t,o.format,...o.args)}),console.groupEnd()}}class ub extends ed{constructor(){super("%s",!!process.stdout.isTTY)}style(t,i){return(i==="bold"?"\x1B[1m":"")+(t?this.hex(t):"")}reset(){return"\x1B[0m"}hex(t){const[i,e,o]=this.hexToRgb(t);return`\x1B[38;2;${i};${e};${o}m`}hexToRgb(t){const i=parseInt(t.substring(1),16);return[i>>16&255,i>>8&255,i&255]}doWrite(t,i){if(i.fields.length===0)return Sa(t,`[%s] ${i.format}`,new Date().toISOString(),...i.args);const e={};i.fields.forEach(o=>e[o.identifier]=o.value),Sa(t,`[%s] ${i.format} %s%s%s`,new Date().toISOString(),...i.args,this.style("#8c8c8c"),JSON.stringify(e),this.reset())}}class fb{constructor(t,i){this.expected=t,this.ms=i}}let cb=class td{constructor(t,i,e,o=[]){if(this._formatter=t,this.name=i,this.defaultFields=e,this.extenders=o,this.level=zt.Info,this.muted=!1,i&&(this.nameColor=this.hashStringToColor(i)),typeof process<"u"&&typeof process.env<"u")switch({}.LOG_LEVEL){case"trace":this.level=zt.Trace;break;case"debug":this.level=zt.Debug;break;case"info":this.level=zt.Info;break;case"warn":this.level=zt.Warn;break;case"error":this.level=zt.Error;break}}set formatter(t){this._formatter=t}get formatter(){return this._formatter}mute(){this.muted=!0}extend(t){this.extenders.push(t)}info(t,...i){this.handle({message:t,fields:i,tagColor:"#66ccff",level:zt.Info})}warn(t,...i){this.handle({message:t,fields:i,tagColor:"#ffae00",level:zt.Warn})}trace(t,...i){this.handle({message:t,fields:i,tagColor:"#9e9e9e",level:zt.Trace})}debug(t,...i){this.handle({message:t,fields:i,tagColor:"#ffb8da",level:zt.Debug})}error(t,...i){this.handle({message:t,fields:i,tagColor:"#ff0000",level:zt.Error})}named(t,...i){const e=new td(this._formatter,t,i,this.extenders);return this.muted&&e.mute(),e}handle(t){if(this.level>t.level||this.muted)return;let i=t.fields||[];if(typeof t.message=="function"){const p=t.message();t.message=p.shift(),i=p}const e=this.defaultFields?i.filter(p=>!!p).concat(this.defaultFields):i.filter(p=>!!p),o=Date.now();let n=[];e&&e.length>0&&(n=e.filter(p=>p.value instanceof fb),this._formatter.push(e)),this._formatter.tag(zt[t.level].toLowerCase(),t.tagColor),this.name&&this.nameColor&&this._formatter.tag(this.name,this.nameColor),this._formatter.push(t.message),n.length>0&&n.forEach(p=>{const u=o-p.value.ms,c=u/p.value.expected,s=125*(1-c),l=125+s,d=c<1?l:s,b=c>=1?l:s;this._formatter.push(` ${p.identifier}=`,"#3390ff"),this._formatter.push(`${u}ms`,this.rgbToHex(b>0?b:0,d>0?d:0,0))}),this._formatter.write(t.level),this.extenders.forEach(p=>{p({section:this.name,...t})})}djb2(t){let i=5381;for(let e=0;e<t.length;e++)i=(i<<5)+i+t.charCodeAt(e);return i}rgbToHex(t,i,e){const n=(((Math.round(t)&255)<<16)+((Math.round(i)&255)<<8)+(Math.round(e)&255)).toString(16);return`#${"000000".substring(n.length)}${n}`}hashStringToColor(t){const i=this.djb2(t);return this.rgbToHex((i&16711680)>>16,(i&65280)>>8,i&255)}};const ka=new cb(typeof process>"u"||typeof process.stdout>"u"?new ab:new ub);var Ra={},lb={get exports(){return Ra},set exports(r){Ra=r}};const hb={},db=Object.freeze(Object.defineProperty({__proto__:null,default:hb},Symbol.toStringTag,{value:"Module"})),rd=ib(db);(function(r){(function(t,i){function e(S,a){if(!S)throw new Error(a||"Assertion failed")}function o(S,a){S.super_=a;var w=function(){};w.prototype=a.prototype,S.prototype=new w,S.prototype.constructor=S}function n(S,a,w){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((a==="le"||a==="be")&&(w=a,a=10),this._init(S||0,a||10,w||"be"))}typeof t=="object"?t.exports=n:i.BN=n,n.BN=n,n.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=rd.Buffer}catch{}n.isBN=function(a){return a instanceof n?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===n.wordSize&&Array.isArray(a.words)},n.max=function(a,w){return a.cmp(w)>0?a:w},n.min=function(a,w){return a.cmp(w)<0?a:w},n.prototype._init=function(a,w,h){if(typeof a=="number")return this._initNumber(a,w,h);if(typeof a=="object")return this._initArray(a,w,h);w==="hex"&&(w=16),e(w===(w|0)&&w>=2&&w<=36),a=a.toString().replace(/\s+/g,"");var m=0;a[0]==="-"&&(m++,this.negative=1),m<a.length&&(w===16?this._parseHex(a,m,h):(this._parseBase(a,w,m),h==="le"&&this._initArray(this.toArray(),w,h)))},n.prototype._initNumber=function(a,w,h){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(e(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),h==="le"&&this._initArray(this.toArray(),w,h)},n.prototype._initArray=function(a,w,h){if(e(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g,_,T=0;if(h==="be")for(m=a.length-1,g=0;m>=0;m-=3)_=a[m]|a[m-1]<<8|a[m-2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,T+=24,T>=26&&(T-=26,g++);else if(h==="le")for(m=0,g=0;m<a.length;m+=3)_=a[m]|a[m+1]<<8|a[m+2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,T+=24,T>=26&&(T-=26,g++);return this._strip()};function p(S,a){var w=S.charCodeAt(a);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;e(!1,"Invalid character in "+S)}function u(S,a,w){var h=p(S,w);return w-1>=a&&(h|=p(S,w-1)<<4),h}n.prototype._parseHex=function(a,w,h){this.length=Math.ceil((a.length-w)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g=0,_=0,T;if(h==="be")for(m=a.length-1;m>=w;m-=2)T=u(a,w,m)<<g,this.words[_]|=T&67108863,g>=18?(g-=18,_+=1,this.words[_]|=T>>>26):g+=8;else{var k=a.length-w;for(m=k%2===0?w+1:w;m<a.length;m+=2)T=u(a,w,m)<<g,this.words[_]|=T&67108863,g>=18?(g-=18,_+=1,this.words[_]|=T>>>26):g+=8}this._strip()};function c(S,a,w,h){for(var m=0,g=0,_=Math.min(S.length,w),T=a;T<_;T++){var k=S.charCodeAt(T)-48;m*=h,k>=49?g=k-49+10:k>=17?g=k-17+10:g=k,e(k>=0&&g<h,"Invalid character"),m+=g}return m}n.prototype._parseBase=function(a,w,h){this.words=[0],this.length=1;for(var m=0,g=1;g<=67108863;g*=w)m++;m--,g=g/w|0;for(var _=a.length-h,T=_%m,k=Math.min(_,_-T)+h,M=0,B=h;B<k;B+=m)M=c(a,B,B+m,w),this.imuln(g),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M);if(T!==0){var Y=1;for(M=c(a,B,a.length,w),B=0;B<T;B++)Y*=w;this.imuln(Y),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M)}this._strip()},n.prototype.copy=function(a){a.words=new Array(this.length);for(var w=0;w<this.length;w++)a.words[w]=this.words[w];a.length=this.length,a.negative=this.negative,a.red=this.red};function s(S,a){S.words=a.words,S.length=a.length,S.negative=a.negative,S.red=a.red}if(n.prototype._move=function(a){s(a,this)},n.prototype.clone=function(){var a=new n(null);return this.copy(a),a},n.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{n.prototype.inspect=l}else n.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],b=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(a,w){a=a||10,w=w|0||1;var h;if(a===16||a==="hex"){h="";for(var m=0,g=0,_=0;_<this.length;_++){var T=this.words[_],k=((T<<m|g)&16777215).toString(16);g=T>>>24-m&16777215,m+=2,m>=26&&(m-=26,_--),g!==0||_!==this.length-1?h=d[6-k.length]+k+h:h=k+h}for(g!==0&&(h=g.toString(16)+h);h.length%w!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(a===(a|0)&&a>=2&&a<=36){var M=b[a],B=v[a];h="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var C=Y.modrn(B).toString(a);Y=Y.idivn(B),Y.isZero()?h=C+h:h=d[M-C.length]+C+h}for(this.isZero()&&(h="0"+h);h.length%w!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}e(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&e(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},n.prototype.toJSON=function(){return this.toString(16,2)},f&&(n.prototype.toBuffer=function(a,w){return this.toArrayLike(f,a,w)}),n.prototype.toArray=function(a,w){return this.toArrayLike(Array,a,w)};var y=function(a,w){return a.allocUnsafe?a.allocUnsafe(w):new a(w)};n.prototype.toArrayLike=function(a,w,h){this._strip();var m=this.byteLength(),g=h||Math.max(1,m);e(m<=g,"byte array longer than desired length"),e(g>0,"Requested array length <= 0");var _=y(a,g),T=w==="le"?"LE":"BE";return this["_toArrayLike"+T](_,m),_},n.prototype._toArrayLikeLE=function(a,w){for(var h=0,m=0,g=0,_=0;g<this.length;g++){var T=this.words[g]<<_|m;a[h++]=T&255,h<a.length&&(a[h++]=T>>8&255),h<a.length&&(a[h++]=T>>16&255),_===6?(h<a.length&&(a[h++]=T>>24&255),m=0,_=0):(m=T>>>24,_+=2)}if(h<a.length)for(a[h++]=m;h<a.length;)a[h++]=0},n.prototype._toArrayLikeBE=function(a,w){for(var h=a.length-1,m=0,g=0,_=0;g<this.length;g++){var T=this.words[g]<<_|m;a[h--]=T&255,h>=0&&(a[h--]=T>>8&255),h>=0&&(a[h--]=T>>16&255),_===6?(h>=0&&(a[h--]=T>>24&255),m=0,_=0):(m=T>>>24,_+=2)}if(h>=0)for(a[h--]=m;h>=0;)a[h--]=0},Math.clz32?n.prototype._countBits=function(a){return 32-Math.clz32(a)}:n.prototype._countBits=function(a){var w=a,h=0;return w>=4096&&(h+=13,w>>>=13),w>=64&&(h+=7,w>>>=7),w>=8&&(h+=4,w>>>=4),w>=2&&(h+=2,w>>>=2),h+w},n.prototype._zeroBits=function(a){if(a===0)return 26;var w=a,h=0;return w&8191||(h+=13,w>>>=13),w&127||(h+=7,w>>>=7),w&15||(h+=4,w>>>=4),w&3||(h+=2,w>>>=2),w&1||h++,h},n.prototype.bitLength=function(){var a=this.words[this.length-1],w=this._countBits(a);return(this.length-1)*26+w};function x(S){for(var a=new Array(S.bitLength()),w=0;w<a.length;w++){var h=w/26|0,m=w%26;a[w]=S.words[h]>>>m&1}return a}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,w=0;w<this.length;w++){var h=this._zeroBits(this.words[w]);if(a+=h,h!==26)break}return a},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(a){return this.negative!==0?this.abs().inotn(a).iaddn(1):this.clone()},n.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var w=0;w<a.length;w++)this.words[w]=this.words[w]|a.words[w];return this._strip()},n.prototype.ior=function(a){return e((this.negative|a.negative)===0),this.iuor(a)},n.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},n.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},n.prototype.iuand=function(a){var w;this.length>a.length?w=a:w=this;for(var h=0;h<w.length;h++)this.words[h]=this.words[h]&a.words[h];return this.length=w.length,this._strip()},n.prototype.iand=function(a){return e((this.negative|a.negative)===0),this.iuand(a)},n.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},n.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},n.prototype.iuxor=function(a){var w,h;this.length>a.length?(w=this,h=a):(w=a,h=this);for(var m=0;m<h.length;m++)this.words[m]=w.words[m]^h.words[m];if(this!==w)for(;m<w.length;m++)this.words[m]=w.words[m];return this.length=w.length,this._strip()},n.prototype.ixor=function(a){return e((this.negative|a.negative)===0),this.iuxor(a)},n.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},n.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},n.prototype.inotn=function(a){e(typeof a=="number"&&a>=0);var w=Math.ceil(a/26)|0,h=a%26;this._expand(w),h>0&&w--;for(var m=0;m<w;m++)this.words[m]=~this.words[m]&67108863;return h>0&&(this.words[m]=~this.words[m]&67108863>>26-h),this._strip()},n.prototype.notn=function(a){return this.clone().inotn(a)},n.prototype.setn=function(a,w){e(typeof a=="number"&&a>=0);var h=a/26|0,m=a%26;return this._expand(h+1),w?this.words[h]=this.words[h]|1<<m:this.words[h]=this.words[h]&~(1<<m),this._strip()},n.prototype.iadd=function(a){var w;if(this.negative!==0&&a.negative===0)return this.negative=0,w=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,w=this.isub(a),a.negative=1,w._normSign();var h,m;this.length>a.length?(h=this,m=a):(h=a,m=this);for(var g=0,_=0;_<m.length;_++)w=(h.words[_]|0)+(m.words[_]|0)+g,this.words[_]=w&67108863,g=w>>>26;for(;g!==0&&_<h.length;_++)w=(h.words[_]|0)+g,this.words[_]=w&67108863,g=w>>>26;if(this.length=h.length,g!==0)this.words[this.length]=g,this.length++;else if(h!==this)for(;_<h.length;_++)this.words[_]=h.words[_];return this},n.prototype.add=function(a){var w;return a.negative!==0&&this.negative===0?(a.negative=0,w=this.sub(a),a.negative^=1,w):a.negative===0&&this.negative!==0?(this.negative=0,w=a.sub(this),this.negative=1,w):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},n.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var w=this.iadd(a);return a.negative=1,w._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var h=this.cmp(a);if(h===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,g;h>0?(m=this,g=a):(m=a,g=this);for(var _=0,T=0;T<g.length;T++)w=(m.words[T]|0)-(g.words[T]|0)+_,_=w>>26,this.words[T]=w&67108863;for(;_!==0&&T<m.length;T++)w=(m.words[T]|0)+_,_=w>>26,this.words[T]=w&67108863;if(_===0&&T<m.length&&m!==this)for(;T<m.length;T++)this.words[T]=m.words[T];return this.length=Math.max(this.length,T),m!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(a){return this.clone().isub(a)};function E(S,a,w){w.negative=a.negative^S.negative;var h=S.length+a.length|0;w.length=h,h=h-1|0;var m=S.words[0]|0,g=a.words[0]|0,_=m*g,T=_&67108863,k=_/67108864|0;w.words[0]=T;for(var M=1;M<h;M++){for(var B=k>>>26,Y=k&67108863,C=Math.min(M,a.length-1),K=Math.max(0,M-S.length+1);K<=C;K++){var W=M-K|0;m=S.words[W]|0,g=a.words[K]|0,_=m*g+Y,B+=_/67108864|0,Y=_&67108863}w.words[M]=Y|0,k=B|0}return k!==0?w.words[M]=k|0:w.length--,w._strip()}var R=function(a,w,h){var m=a.words,g=w.words,_=h.words,T=0,k,M,B,Y=m[0]|0,C=Y&8191,K=Y>>>13,W=m[1]|0,U=W&8191,q=W>>>13,j=m[2]|0,D=j&8191,F=j>>>13,$=m[3]|0,V=$&8191,Z=$>>>13,ee=m[4]|0,re=ee&8191,ue=ee>>>13,fe=m[5]|0,oe=fe&8191,ae=fe>>>13,ie=m[6]|0,te=ie&8191,le=ie>>>13,ge=m[7]|0,he=ge&8191,ye=ge>>>13,Ie=m[8]|0,pe=Ie&8191,Oe=Ie>>>13,Ge=m[9]|0,we=Ge&8191,Le=Ge>>>13,Ve=g[0]|0,ve=Ve&8191,Ne=Ve>>>13,se=g[1]|0,de=se&8191,_e=se>>>13,Ue=g[2]|0,me=Ue&8191,Be=Ue>>>13,Je=g[3]|0,be=Je&8191,He=Je>>>13,tt=g[4]|0,Re=tt&8191,ze=tt>>>13,Ze=g[5]|0,Ae=Ze&8191,De=Ze>>>13,rt=g[6]|0,Ee=rt&8191,Fe=rt>>>13,Qe=g[7]|0,Se=Qe&8191,Ke=Qe>>>13,Xe=g[8]|0,Me=Xe&8191,We=Xe>>>13,et=g[9]|0,ke=et&8191,qe=et>>>13;h.negative=a.negative^w.negative,h.length=19,k=Math.imul(C,ve),M=Math.imul(C,Ne),M=M+Math.imul(K,ve)|0,B=Math.imul(K,Ne);var Q=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Q>>>26)|0,Q&=67108863,k=Math.imul(U,ve),M=Math.imul(U,Ne),M=M+Math.imul(q,ve)|0,B=Math.imul(q,Ne),k=k+Math.imul(C,de)|0,M=M+Math.imul(C,_e)|0,M=M+Math.imul(K,de)|0,B=B+Math.imul(K,_e)|0;var X=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(X>>>26)|0,X&=67108863,k=Math.imul(D,ve),M=Math.imul(D,Ne),M=M+Math.imul(F,ve)|0,B=Math.imul(F,Ne),k=k+Math.imul(U,de)|0,M=M+Math.imul(U,_e)|0,M=M+Math.imul(q,de)|0,B=B+Math.imul(q,_e)|0,k=k+Math.imul(C,me)|0,M=M+Math.imul(C,Be)|0,M=M+Math.imul(K,me)|0,B=B+Math.imul(K,Be)|0;var ne=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ne>>>26)|0,ne&=67108863,k=Math.imul(V,ve),M=Math.imul(V,Ne),M=M+Math.imul(Z,ve)|0,B=Math.imul(Z,Ne),k=k+Math.imul(D,de)|0,M=M+Math.imul(D,_e)|0,M=M+Math.imul(F,de)|0,B=B+Math.imul(F,_e)|0,k=k+Math.imul(U,me)|0,M=M+Math.imul(U,Be)|0,M=M+Math.imul(q,me)|0,B=B+Math.imul(q,Be)|0,k=k+Math.imul(C,be)|0,M=M+Math.imul(C,He)|0,M=M+Math.imul(K,be)|0,B=B+Math.imul(K,He)|0;var ce=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ce>>>26)|0,ce&=67108863,k=Math.imul(re,ve),M=Math.imul(re,Ne),M=M+Math.imul(ue,ve)|0,B=Math.imul(ue,Ne),k=k+Math.imul(V,de)|0,M=M+Math.imul(V,_e)|0,M=M+Math.imul(Z,de)|0,B=B+Math.imul(Z,_e)|0,k=k+Math.imul(D,me)|0,M=M+Math.imul(D,Be)|0,M=M+Math.imul(F,me)|0,B=B+Math.imul(F,Be)|0,k=k+Math.imul(U,be)|0,M=M+Math.imul(U,He)|0,M=M+Math.imul(q,be)|0,B=B+Math.imul(q,He)|0,k=k+Math.imul(C,Re)|0,M=M+Math.imul(C,ze)|0,M=M+Math.imul(K,Re)|0,B=B+Math.imul(K,ze)|0;var Ce=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,k=Math.imul(oe,ve),M=Math.imul(oe,Ne),M=M+Math.imul(ae,ve)|0,B=Math.imul(ae,Ne),k=k+Math.imul(re,de)|0,M=M+Math.imul(re,_e)|0,M=M+Math.imul(ue,de)|0,B=B+Math.imul(ue,_e)|0,k=k+Math.imul(V,me)|0,M=M+Math.imul(V,Be)|0,M=M+Math.imul(Z,me)|0,B=B+Math.imul(Z,Be)|0,k=k+Math.imul(D,be)|0,M=M+Math.imul(D,He)|0,M=M+Math.imul(F,be)|0,B=B+Math.imul(F,He)|0,k=k+Math.imul(U,Re)|0,M=M+Math.imul(U,ze)|0,M=M+Math.imul(q,Re)|0,B=B+Math.imul(q,ze)|0,k=k+Math.imul(C,Ae)|0,M=M+Math.imul(C,De)|0,M=M+Math.imul(K,Ae)|0,B=B+Math.imul(K,De)|0;var Pe=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,k=Math.imul(te,ve),M=Math.imul(te,Ne),M=M+Math.imul(le,ve)|0,B=Math.imul(le,Ne),k=k+Math.imul(oe,de)|0,M=M+Math.imul(oe,_e)|0,M=M+Math.imul(ae,de)|0,B=B+Math.imul(ae,_e)|0,k=k+Math.imul(re,me)|0,M=M+Math.imul(re,Be)|0,M=M+Math.imul(ue,me)|0,B=B+Math.imul(ue,Be)|0,k=k+Math.imul(V,be)|0,M=M+Math.imul(V,He)|0,M=M+Math.imul(Z,be)|0,B=B+Math.imul(Z,He)|0,k=k+Math.imul(D,Re)|0,M=M+Math.imul(D,ze)|0,M=M+Math.imul(F,Re)|0,B=B+Math.imul(F,ze)|0,k=k+Math.imul(U,Ae)|0,M=M+Math.imul(U,De)|0,M=M+Math.imul(q,Ae)|0,B=B+Math.imul(q,De)|0,k=k+Math.imul(C,Ee)|0,M=M+Math.imul(C,Fe)|0,M=M+Math.imul(K,Ee)|0,B=B+Math.imul(K,Fe)|0;var Ye=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,k=Math.imul(he,ve),M=Math.imul(he,Ne),M=M+Math.imul(ye,ve)|0,B=Math.imul(ye,Ne),k=k+Math.imul(te,de)|0,M=M+Math.imul(te,_e)|0,M=M+Math.imul(le,de)|0,B=B+Math.imul(le,_e)|0,k=k+Math.imul(oe,me)|0,M=M+Math.imul(oe,Be)|0,M=M+Math.imul(ae,me)|0,B=B+Math.imul(ae,Be)|0,k=k+Math.imul(re,be)|0,M=M+Math.imul(re,He)|0,M=M+Math.imul(ue,be)|0,B=B+Math.imul(ue,He)|0,k=k+Math.imul(V,Re)|0,M=M+Math.imul(V,ze)|0,M=M+Math.imul(Z,Re)|0,B=B+Math.imul(Z,ze)|0,k=k+Math.imul(D,Ae)|0,M=M+Math.imul(D,De)|0,M=M+Math.imul(F,Ae)|0,B=B+Math.imul(F,De)|0,k=k+Math.imul(U,Ee)|0,M=M+Math.imul(U,Fe)|0,M=M+Math.imul(q,Ee)|0,B=B+Math.imul(q,Fe)|0,k=k+Math.imul(C,Se)|0,M=M+Math.imul(C,Ke)|0,M=M+Math.imul(K,Se)|0,B=B+Math.imul(K,Ke)|0;var $e=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+($e>>>26)|0,$e&=67108863,k=Math.imul(pe,ve),M=Math.imul(pe,Ne),M=M+Math.imul(Oe,ve)|0,B=Math.imul(Oe,Ne),k=k+Math.imul(he,de)|0,M=M+Math.imul(he,_e)|0,M=M+Math.imul(ye,de)|0,B=B+Math.imul(ye,_e)|0,k=k+Math.imul(te,me)|0,M=M+Math.imul(te,Be)|0,M=M+Math.imul(le,me)|0,B=B+Math.imul(le,Be)|0,k=k+Math.imul(oe,be)|0,M=M+Math.imul(oe,He)|0,M=M+Math.imul(ae,be)|0,B=B+Math.imul(ae,He)|0,k=k+Math.imul(re,Re)|0,M=M+Math.imul(re,ze)|0,M=M+Math.imul(ue,Re)|0,B=B+Math.imul(ue,ze)|0,k=k+Math.imul(V,Ae)|0,M=M+Math.imul(V,De)|0,M=M+Math.imul(Z,Ae)|0,B=B+Math.imul(Z,De)|0,k=k+Math.imul(D,Ee)|0,M=M+Math.imul(D,Fe)|0,M=M+Math.imul(F,Ee)|0,B=B+Math.imul(F,Fe)|0,k=k+Math.imul(U,Se)|0,M=M+Math.imul(U,Ke)|0,M=M+Math.imul(q,Se)|0,B=B+Math.imul(q,Ke)|0,k=k+Math.imul(C,Me)|0,M=M+Math.imul(C,We)|0,M=M+Math.imul(K,Me)|0,B=B+Math.imul(K,We)|0;var nt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(nt>>>26)|0,nt&=67108863,k=Math.imul(we,ve),M=Math.imul(we,Ne),M=M+Math.imul(Le,ve)|0,B=Math.imul(Le,Ne),k=k+Math.imul(pe,de)|0,M=M+Math.imul(pe,_e)|0,M=M+Math.imul(Oe,de)|0,B=B+Math.imul(Oe,_e)|0,k=k+Math.imul(he,me)|0,M=M+Math.imul(he,Be)|0,M=M+Math.imul(ye,me)|0,B=B+Math.imul(ye,Be)|0,k=k+Math.imul(te,be)|0,M=M+Math.imul(te,He)|0,M=M+Math.imul(le,be)|0,B=B+Math.imul(le,He)|0,k=k+Math.imul(oe,Re)|0,M=M+Math.imul(oe,ze)|0,M=M+Math.imul(ae,Re)|0,B=B+Math.imul(ae,ze)|0,k=k+Math.imul(re,Ae)|0,M=M+Math.imul(re,De)|0,M=M+Math.imul(ue,Ae)|0,B=B+Math.imul(ue,De)|0,k=k+Math.imul(V,Ee)|0,M=M+Math.imul(V,Fe)|0,M=M+Math.imul(Z,Ee)|0,B=B+Math.imul(Z,Fe)|0,k=k+Math.imul(D,Se)|0,M=M+Math.imul(D,Ke)|0,M=M+Math.imul(F,Se)|0,B=B+Math.imul(F,Ke)|0,k=k+Math.imul(U,Me)|0,M=M+Math.imul(U,We)|0,M=M+Math.imul(q,Me)|0,B=B+Math.imul(q,We)|0,k=k+Math.imul(C,ke)|0,M=M+Math.imul(C,qe)|0,M=M+Math.imul(K,ke)|0,B=B+Math.imul(K,qe)|0;var je=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(je>>>26)|0,je&=67108863,k=Math.imul(we,de),M=Math.imul(we,_e),M=M+Math.imul(Le,de)|0,B=Math.imul(Le,_e),k=k+Math.imul(pe,me)|0,M=M+Math.imul(pe,Be)|0,M=M+Math.imul(Oe,me)|0,B=B+Math.imul(Oe,Be)|0,k=k+Math.imul(he,be)|0,M=M+Math.imul(he,He)|0,M=M+Math.imul(ye,be)|0,B=B+Math.imul(ye,He)|0,k=k+Math.imul(te,Re)|0,M=M+Math.imul(te,ze)|0,M=M+Math.imul(le,Re)|0,B=B+Math.imul(le,ze)|0,k=k+Math.imul(oe,Ae)|0,M=M+Math.imul(oe,De)|0,M=M+Math.imul(ae,Ae)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(re,Ee)|0,M=M+Math.imul(re,Fe)|0,M=M+Math.imul(ue,Ee)|0,B=B+Math.imul(ue,Fe)|0,k=k+Math.imul(V,Se)|0,M=M+Math.imul(V,Ke)|0,M=M+Math.imul(Z,Se)|0,B=B+Math.imul(Z,Ke)|0,k=k+Math.imul(D,Me)|0,M=M+Math.imul(D,We)|0,M=M+Math.imul(F,Me)|0,B=B+Math.imul(F,We)|0,k=k+Math.imul(U,ke)|0,M=M+Math.imul(U,qe)|0,M=M+Math.imul(q,ke)|0,B=B+Math.imul(q,qe)|0;var Te=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Te>>>26)|0,Te&=67108863,k=Math.imul(we,me),M=Math.imul(we,Be),M=M+Math.imul(Le,me)|0,B=Math.imul(Le,Be),k=k+Math.imul(pe,be)|0,M=M+Math.imul(pe,He)|0,M=M+Math.imul(Oe,be)|0,B=B+Math.imul(Oe,He)|0,k=k+Math.imul(he,Re)|0,M=M+Math.imul(he,ze)|0,M=M+Math.imul(ye,Re)|0,B=B+Math.imul(ye,ze)|0,k=k+Math.imul(te,Ae)|0,M=M+Math.imul(te,De)|0,M=M+Math.imul(le,Ae)|0,B=B+Math.imul(le,De)|0,k=k+Math.imul(oe,Ee)|0,M=M+Math.imul(oe,Fe)|0,M=M+Math.imul(ae,Ee)|0,B=B+Math.imul(ae,Fe)|0,k=k+Math.imul(re,Se)|0,M=M+Math.imul(re,Ke)|0,M=M+Math.imul(ue,Se)|0,B=B+Math.imul(ue,Ke)|0,k=k+Math.imul(V,Me)|0,M=M+Math.imul(V,We)|0,M=M+Math.imul(Z,Me)|0,B=B+Math.imul(Z,We)|0,k=k+Math.imul(D,ke)|0,M=M+Math.imul(D,qe)|0,M=M+Math.imul(F,ke)|0,B=B+Math.imul(F,qe)|0;var st=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(st>>>26)|0,st&=67108863,k=Math.imul(we,be),M=Math.imul(we,He),M=M+Math.imul(Le,be)|0,B=Math.imul(Le,He),k=k+Math.imul(pe,Re)|0,M=M+Math.imul(pe,ze)|0,M=M+Math.imul(Oe,Re)|0,B=B+Math.imul(Oe,ze)|0,k=k+Math.imul(he,Ae)|0,M=M+Math.imul(he,De)|0,M=M+Math.imul(ye,Ae)|0,B=B+Math.imul(ye,De)|0,k=k+Math.imul(te,Ee)|0,M=M+Math.imul(te,Fe)|0,M=M+Math.imul(le,Ee)|0,B=B+Math.imul(le,Fe)|0,k=k+Math.imul(oe,Se)|0,M=M+Math.imul(oe,Ke)|0,M=M+Math.imul(ae,Se)|0,B=B+Math.imul(ae,Ke)|0,k=k+Math.imul(re,Me)|0,M=M+Math.imul(re,We)|0,M=M+Math.imul(ue,Me)|0,B=B+Math.imul(ue,We)|0,k=k+Math.imul(V,ke)|0,M=M+Math.imul(V,qe)|0,M=M+Math.imul(Z,ke)|0,B=B+Math.imul(Z,qe)|0;var ft=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ft>>>26)|0,ft&=67108863,k=Math.imul(we,Re),M=Math.imul(we,ze),M=M+Math.imul(Le,Re)|0,B=Math.imul(Le,ze),k=k+Math.imul(pe,Ae)|0,M=M+Math.imul(pe,De)|0,M=M+Math.imul(Oe,Ae)|0,B=B+Math.imul(Oe,De)|0,k=k+Math.imul(he,Ee)|0,M=M+Math.imul(he,Fe)|0,M=M+Math.imul(ye,Ee)|0,B=B+Math.imul(ye,Fe)|0,k=k+Math.imul(te,Se)|0,M=M+Math.imul(te,Ke)|0,M=M+Math.imul(le,Se)|0,B=B+Math.imul(le,Ke)|0,k=k+Math.imul(oe,Me)|0,M=M+Math.imul(oe,We)|0,M=M+Math.imul(ae,Me)|0,B=B+Math.imul(ae,We)|0,k=k+Math.imul(re,ke)|0,M=M+Math.imul(re,qe)|0,M=M+Math.imul(ue,ke)|0,B=B+Math.imul(ue,qe)|0;var gt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(gt>>>26)|0,gt&=67108863,k=Math.imul(we,Ae),M=Math.imul(we,De),M=M+Math.imul(Le,Ae)|0,B=Math.imul(Le,De),k=k+Math.imul(pe,Ee)|0,M=M+Math.imul(pe,Fe)|0,M=M+Math.imul(Oe,Ee)|0,B=B+Math.imul(Oe,Fe)|0,k=k+Math.imul(he,Se)|0,M=M+Math.imul(he,Ke)|0,M=M+Math.imul(ye,Se)|0,B=B+Math.imul(ye,Ke)|0,k=k+Math.imul(te,Me)|0,M=M+Math.imul(te,We)|0,M=M+Math.imul(le,Me)|0,B=B+Math.imul(le,We)|0,k=k+Math.imul(oe,ke)|0,M=M+Math.imul(oe,qe)|0,M=M+Math.imul(ae,ke)|0,B=B+Math.imul(ae,qe)|0;var ht=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ht>>>26)|0,ht&=67108863,k=Math.imul(we,Ee),M=Math.imul(we,Fe),M=M+Math.imul(Le,Ee)|0,B=Math.imul(Le,Fe),k=k+Math.imul(pe,Se)|0,M=M+Math.imul(pe,Ke)|0,M=M+Math.imul(Oe,Se)|0,B=B+Math.imul(Oe,Ke)|0,k=k+Math.imul(he,Me)|0,M=M+Math.imul(he,We)|0,M=M+Math.imul(ye,Me)|0,B=B+Math.imul(ye,We)|0,k=k+Math.imul(te,ke)|0,M=M+Math.imul(te,qe)|0,M=M+Math.imul(le,ke)|0,B=B+Math.imul(le,qe)|0;var yt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(yt>>>26)|0,yt&=67108863,k=Math.imul(we,Se),M=Math.imul(we,Ke),M=M+Math.imul(Le,Se)|0,B=Math.imul(Le,Ke),k=k+Math.imul(pe,Me)|0,M=M+Math.imul(pe,We)|0,M=M+Math.imul(Oe,Me)|0,B=B+Math.imul(Oe,We)|0,k=k+Math.imul(he,ke)|0,M=M+Math.imul(he,qe)|0,M=M+Math.imul(ye,ke)|0,B=B+Math.imul(ye,qe)|0;var at=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(at>>>26)|0,at&=67108863,k=Math.imul(we,Me),M=Math.imul(we,We),M=M+Math.imul(Le,Me)|0,B=Math.imul(Le,We),k=k+Math.imul(pe,ke)|0,M=M+Math.imul(pe,qe)|0,M=M+Math.imul(Oe,ke)|0,B=B+Math.imul(Oe,qe)|0;var wt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(wt>>>26)|0,wt&=67108863,k=Math.imul(we,ke),M=Math.imul(we,qe),M=M+Math.imul(Le,ke)|0,B=Math.imul(Le,qe);var ut=(T+k|0)+((M&8191)<<13)|0;return T=(B+(M>>>13)|0)+(ut>>>26)|0,ut&=67108863,_[0]=Q,_[1]=X,_[2]=ne,_[3]=ce,_[4]=Ce,_[5]=Pe,_[6]=Ye,_[7]=$e,_[8]=nt,_[9]=je,_[10]=Te,_[11]=st,_[12]=ft,_[13]=gt,_[14]=ht,_[15]=yt,_[16]=at,_[17]=wt,_[18]=ut,T!==0&&(_[19]=T,h.length++),h};Math.imul||(R=E);function I(S,a,w){w.negative=a.negative^S.negative,w.length=S.length+a.length;for(var h=0,m=0,g=0;g<w.length-1;g++){var _=m;m=0;for(var T=h&67108863,k=Math.min(g,a.length-1),M=Math.max(0,g-S.length+1);M<=k;M++){var B=g-M,Y=S.words[B]|0,C=a.words[M]|0,K=Y*C,W=K&67108863;_=_+(K/67108864|0)|0,W=W+T|0,T=W&67108863,_=_+(W>>>26)|0,m+=_>>>26,_&=67108863}w.words[g]=T,h=_,_=m}return h!==0?w.words[g]=h:w.length--,w._strip()}function O(S,a,w){return I(S,a,w)}n.prototype.mulTo=function(a,w){var h,m=this.length+a.length;return this.length===10&&a.length===10?h=R(this,a,w):m<63?h=E(this,a,w):m<1024?h=I(this,a,w):h=O(this,a,w),h},n.prototype.mul=function(a){var w=new n(null);return w.words=new Array(this.length+a.length),this.mulTo(a,w)},n.prototype.mulf=function(a){var w=new n(null);return w.words=new Array(this.length+a.length),O(this,a,w)},n.prototype.imul=function(a){return this.clone().mulTo(a,this)},n.prototype.imuln=function(a){var w=a<0;w&&(a=-a),e(typeof a=="number"),e(a<67108864);for(var h=0,m=0;m<this.length;m++){var g=(this.words[m]|0)*a,_=(g&67108863)+(h&67108863);h>>=26,h+=g/67108864|0,h+=_>>>26,this.words[m]=_&67108863}return h!==0&&(this.words[m]=h,this.length++),w?this.ineg():this},n.prototype.muln=function(a){return this.clone().imuln(a)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(a){var w=x(a);if(w.length===0)return new n(1);for(var h=this,m=0;m<w.length&&w[m]===0;m++,h=h.sqr());if(++m<w.length)for(var g=h.sqr();m<w.length;m++,g=g.sqr())w[m]!==0&&(h=h.mul(g));return h},n.prototype.iushln=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26,m=67108863>>>26-w<<26-w,g;if(w!==0){var _=0;for(g=0;g<this.length;g++){var T=this.words[g]&m,k=(this.words[g]|0)-T<<w;this.words[g]=k|_,_=T>>>26-w}_&&(this.words[g]=_,this.length++)}if(h!==0){for(g=this.length-1;g>=0;g--)this.words[g+h]=this.words[g];for(g=0;g<h;g++)this.words[g]=0;this.length+=h}return this._strip()},n.prototype.ishln=function(a){return e(this.negative===0),this.iushln(a)},n.prototype.iushrn=function(a,w,h){e(typeof a=="number"&&a>=0);var m;w?m=(w-w%26)/26:m=0;var g=a%26,_=Math.min((a-g)/26,this.length),T=67108863^67108863>>>g<<g,k=h;if(m-=_,m=Math.max(0,m),k){for(var M=0;M<_;M++)k.words[M]=this.words[M];k.length=_}if(_!==0)if(this.length>_)for(this.length-=_,M=0;M<this.length;M++)this.words[M]=this.words[M+_];else this.words[0]=0,this.length=1;var B=0;for(M=this.length-1;M>=0&&(B!==0||M>=m);M--){var Y=this.words[M]|0;this.words[M]=B<<26-g|Y>>>g,B=Y&T}return k&&B!==0&&(k.words[k.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(a,w,h){return e(this.negative===0),this.iushrn(a,w,h)},n.prototype.shln=function(a){return this.clone().ishln(a)},n.prototype.ushln=function(a){return this.clone().iushln(a)},n.prototype.shrn=function(a){return this.clone().ishrn(a)},n.prototype.ushrn=function(a){return this.clone().iushrn(a)},n.prototype.testn=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26,m=1<<w;if(this.length<=h)return!1;var g=this.words[h];return!!(g&m)},n.prototype.imaskn=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26;if(e(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(w!==0&&h++,this.length=Math.min(h,this.length),w!==0){var m=67108863^67108863>>>w<<w;this.words[this.length-1]&=m}return this._strip()},n.prototype.maskn=function(a){return this.clone().imaskn(a)},n.prototype.iaddn=function(a){return e(typeof a=="number"),e(a<67108864),a<0?this.isubn(-a):this.negative!==0?this.length===1&&(this.words[0]|0)<=a?(this.words[0]=a-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},n.prototype._iaddn=function(a){this.words[0]+=a;for(var w=0;w<this.length&&this.words[w]>=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},n.prototype.isubn=function(a){if(e(typeof a=="number"),e(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w<this.length&&this.words[w]<0;w++)this.words[w]+=67108864,this.words[w+1]-=1;return this._strip()},n.prototype.addn=function(a){return this.clone().iaddn(a)},n.prototype.subn=function(a){return this.clone().isubn(a)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(a,w,h){var m=a.length+h,g;this._expand(m);var _,T=0;for(g=0;g<a.length;g++){_=(this.words[g+h]|0)+T;var k=(a.words[g]|0)*w;_-=k&67108863,T=(_>>26)-(k/67108864|0),this.words[g+h]=_&67108863}for(;g<this.length-h;g++)_=(this.words[g+h]|0)+T,T=_>>26,this.words[g+h]=_&67108863;if(T===0)return this._strip();for(e(T===-1),T=0,g=0;g<this.length;g++)_=-(this.words[g]|0)+T,T=_>>26,this.words[g]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(a,w){var h=this.length-a.length,m=this.clone(),g=a,_=g.words[g.length-1]|0,T=this._countBits(_);h=26-T,h!==0&&(g=g.ushln(h),m.iushln(h),_=g.words[g.length-1]|0);var k=m.length-g.length,M;if(w!=="mod"){M=new n(null),M.length=k+1,M.words=new Array(M.length);for(var B=0;B<M.length;B++)M.words[B]=0}var Y=m.clone()._ishlnsubmul(g,1,k);Y.negative===0&&(m=Y,M&&(M.words[k]=1));for(var C=k-1;C>=0;C--){var K=(m.words[g.length+C]|0)*67108864+(m.words[g.length+C-1]|0);for(K=Math.min(K/_|0,67108863),m._ishlnsubmul(g,K,C);m.negative!==0;)K--,m.negative=0,m._ishlnsubmul(g,1,C),m.isZero()||(m.negative^=1);M&&(M.words[C]=K)}return M&&M._strip(),m._strip(),w!=="div"&&h!==0&&m.iushrn(h),{div:M||null,mod:m}},n.prototype.divmod=function(a,w,h){if(e(!a.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var m,g,_;return this.negative!==0&&a.negative===0?(_=this.neg().divmod(a,w),w!=="mod"&&(m=_.div.neg()),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.iadd(a)),{div:m,mod:g}):this.negative===0&&a.negative!==0?(_=this.divmod(a.neg(),w),w!=="mod"&&(m=_.div.neg()),{div:m,mod:_.mod}):this.negative&a.negative?(_=this.neg().divmod(a.neg(),w),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.isub(a)),{div:_.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:new n(0),mod:this}:a.length===1?w==="div"?{div:this.divn(a.words[0]),mod:null}:w==="mod"?{div:null,mod:new n(this.modrn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new n(this.modrn(a.words[0]))}:this._wordDiv(a,w)},n.prototype.div=function(a){return this.divmod(a,"div",!1).div},n.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},n.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},n.prototype.divRound=function(a){var w=this.divmod(a);if(w.mod.isZero())return w.div;var h=w.div.negative!==0?w.mod.isub(a):w.mod,m=a.ushrn(1),g=a.andln(1),_=h.cmp(m);return _<0||g===1&&_===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},n.prototype.modrn=function(a){var w=a<0;w&&(a=-a),e(a<=67108863);for(var h=(1<<26)%a,m=0,g=this.length-1;g>=0;g--)m=(h*m+(this.words[g]|0))%a;return w?-m:m},n.prototype.modn=function(a){return this.modrn(a)},n.prototype.idivn=function(a){var w=a<0;w&&(a=-a),e(a<=67108863);for(var h=0,m=this.length-1;m>=0;m--){var g=(this.words[m]|0)+h*67108864;this.words[m]=g/a|0,h=g%a}return this._strip(),w?this.ineg():this},n.prototype.divn=function(a){return this.clone().idivn(a)},n.prototype.egcd=function(a){e(a.negative===0),e(!a.isZero());var w=this,h=a.clone();w.negative!==0?w=w.umod(a):w=w.clone();for(var m=new n(1),g=new n(0),_=new n(0),T=new n(1),k=0;w.isEven()&&h.isEven();)w.iushrn(1),h.iushrn(1),++k;for(var M=h.clone(),B=w.clone();!w.isZero();){for(var Y=0,C=1;!(w.words[0]&C)&&Y<26;++Y,C<<=1);if(Y>0)for(w.iushrn(Y);Y-- >0;)(m.isOdd()||g.isOdd())&&(m.iadd(M),g.isub(B)),m.iushrn(1),g.iushrn(1);for(var K=0,W=1;!(h.words[0]&W)&&K<26;++K,W<<=1);if(K>0)for(h.iushrn(K);K-- >0;)(_.isOdd()||T.isOdd())&&(_.iadd(M),T.isub(B)),_.iushrn(1),T.iushrn(1);w.cmp(h)>=0?(w.isub(h),m.isub(_),g.isub(T)):(h.isub(w),_.isub(m),T.isub(g))}return{a:_,b:T,gcd:h.iushln(k)}},n.prototype._invmp=function(a){e(a.negative===0),e(!a.isZero());var w=this,h=a.clone();w.negative!==0?w=w.umod(a):w=w.clone();for(var m=new n(1),g=new n(0),_=h.clone();w.cmpn(1)>0&&h.cmpn(1)>0;){for(var T=0,k=1;!(w.words[0]&k)&&T<26;++T,k<<=1);if(T>0)for(w.iushrn(T);T-- >0;)m.isOdd()&&m.iadd(_),m.iushrn(1);for(var M=0,B=1;!(h.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(h.iushrn(M);M-- >0;)g.isOdd()&&g.iadd(_),g.iushrn(1);w.cmp(h)>=0?(w.isub(h),m.isub(g)):(h.isub(w),g.isub(m))}var Y;return w.cmpn(1)===0?Y=m:Y=g,Y.cmpn(0)<0&&Y.iadd(a),Y},n.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var w=this.clone(),h=a.clone();w.negative=0,h.negative=0;for(var m=0;w.isEven()&&h.isEven();m++)w.iushrn(1),h.iushrn(1);do{for(;w.isEven();)w.iushrn(1);for(;h.isEven();)h.iushrn(1);var g=w.cmp(h);if(g<0){var _=w;w=h,h=_}else if(g===0||h.cmpn(1)===0)break;w.isub(h)}while(!0);return h.iushln(m)},n.prototype.invm=function(a){return this.egcd(a).a.umod(a)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(a){return this.words[0]&a},n.prototype.bincn=function(a){e(typeof a=="number");var w=a%26,h=(a-w)/26,m=1<<w;if(this.length<=h)return this._expand(h+1),this.words[h]|=m,this;for(var g=m,_=h;g!==0&&_<this.length;_++){var T=this.words[_]|0;T+=g,g=T>>>26,T&=67108863,this.words[_]=T}return g!==0&&(this.words[_]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(a){var w=a<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;this._strip();var h;if(this.length>1)h=1;else{w&&(a=-a),e(a<=67108863,"Number is too big");var m=this.words[0]|0;h=m===a?0:m<a?-1:1}return this.negative!==0?-h|0:h},n.prototype.cmp=function(a){if(this.negative!==0&&a.negative===0)return-1;if(this.negative===0&&a.negative!==0)return 1;var w=this.ucmp(a);return this.negative!==0?-w|0:w},n.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var w=0,h=this.length-1;h>=0;h--){var m=this.words[h]|0,g=a.words[h]|0;if(m!==g){m<g?w=-1:m>g&&(w=1);break}}return w},n.prototype.gtn=function(a){return this.cmpn(a)===1},n.prototype.gt=function(a){return this.cmp(a)===1},n.prototype.gten=function(a){return this.cmpn(a)>=0},n.prototype.gte=function(a){return this.cmp(a)>=0},n.prototype.ltn=function(a){return this.cmpn(a)===-1},n.prototype.lt=function(a){return this.cmp(a)===-1},n.prototype.lten=function(a){return this.cmpn(a)<=0},n.prototype.lte=function(a){return this.cmp(a)<=0},n.prototype.eqn=function(a){return this.cmpn(a)===0},n.prototype.eq=function(a){return this.cmp(a)===0},n.red=function(a){return new G(a)},n.prototype.toRed=function(a){return e(!this.red,"Already a number in reduction context"),e(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},n.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(a){return this.red=a,this},n.prototype.forceRed=function(a){return e(!this.red,"Already a number in reduction context"),this._forceRed(a)},n.prototype.redAdd=function(a){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},n.prototype.redIAdd=function(a){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},n.prototype.redSub=function(a){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},n.prototype.redISub=function(a){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},n.prototype.redShl=function(a){return e(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},n.prototype.redMul=function(a){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},n.prototype.redIMul=function(a){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},n.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(a){return e(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var A={k256:null,p224:null,p192:null,p25519:null};function P(S,a){this.name=S,this.p=new n(a,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var a=new n(null);return a.words=new Array(Math.ceil(this.n/13)),a},P.prototype.ireduce=function(a){var w=a,h;do this.split(w,this.tmp),w=this.imulK(w),w=w.iadd(this.tmp),h=w.bitLength();while(h>this.n);var m=h<this.n?-1:w.ucmp(this.p);return m===0?(w.words[0]=0,w.length=1):m>0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},P.prototype.split=function(a,w){a.iushrn(this.n,0,w)},P.prototype.imulK=function(a){return a.imul(this.k)};function N(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(N,P),N.prototype.split=function(a,w){for(var h=4194303,m=Math.min(a.length,9),g=0;g<m;g++)w.words[g]=a.words[g];if(w.length=m,a.length<=9){a.words[0]=0,a.length=1;return}var _=a.words[9];for(w.words[w.length++]=_&h,g=10;g<a.length;g++){var T=a.words[g]|0;a.words[g-10]=(T&h)<<4|_>>>22,_=T}_>>>=22,a.words[g-10]=_,_===0&&a.length>10?a.length-=10:a.length-=9},N.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var w=0,h=0;h<a.length;h++){var m=a.words[h]|0;w+=m*977,a.words[h]=w&67108863,w=m*64+(w/67108864|0)}return a.words[a.length-1]===0&&(a.length--,a.words[a.length-1]===0&&a.length--),a};function L(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(L,P);function H(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(H,P);function J(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(J,P),J.prototype.imulK=function(a){for(var w=0,h=0;h<a.length;h++){var m=(a.words[h]|0)*19+w,g=m&67108863;m>>>=26,a.words[h]=g,w=m}return w!==0&&(a.words[a.length++]=w),a},n._prime=function(a){if(A[a])return A[a];var w;if(a==="k256")w=new N;else if(a==="p224")w=new L;else if(a==="p192")w=new H;else if(a==="p25519")w=new J;else throw new Error("Unknown prime "+a);return A[a]=w,w};function G(S){if(typeof S=="string"){var a=n._prime(S);this.m=a.p,this.prime=a}else e(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}G.prototype._verify1=function(a){e(a.negative===0,"red works only with positives"),e(a.red,"red works only with red numbers")},G.prototype._verify2=function(a,w){e((a.negative|w.negative)===0,"red works only with positives"),e(a.red&&a.red===w.red,"red works only with red numbers")},G.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(s(a,a.umod(this.m)._forceRed(this)),a)},G.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},G.prototype.add=function(a,w){this._verify2(a,w);var h=a.add(w);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},G.prototype.iadd=function(a,w){this._verify2(a,w);var h=a.iadd(w);return h.cmp(this.m)>=0&&h.isub(this.m),h},G.prototype.sub=function(a,w){this._verify2(a,w);var h=a.sub(w);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},G.prototype.isub=function(a,w){this._verify2(a,w);var h=a.isub(w);return h.cmpn(0)<0&&h.iadd(this.m),h},G.prototype.shl=function(a,w){return this._verify1(a),this.imod(a.ushln(w))},G.prototype.imul=function(a,w){return this._verify2(a,w),this.imod(a.imul(w))},G.prototype.mul=function(a,w){return this._verify2(a,w),this.imod(a.mul(w))},G.prototype.isqr=function(a){return this.imul(a,a.clone())},G.prototype.sqr=function(a){return this.mul(a,a)},G.prototype.sqrt=function(a){if(a.isZero())return a.clone();var w=this.m.andln(3);if(e(w%2===1),w===3){var h=this.m.add(new n(1)).iushrn(2);return this.pow(a,h)}for(var m=this.m.subn(1),g=0;!m.isZero()&&m.andln(1)===0;)g++,m.iushrn(1);e(!m.isZero());var _=new n(1).toRed(this),T=_.redNeg(),k=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new n(2*M*M).toRed(this);this.pow(M,k).cmp(T)!==0;)M.redIAdd(T);for(var B=this.pow(M,m),Y=this.pow(a,m.addn(1).iushrn(1)),C=this.pow(a,m),K=g;C.cmp(_)!==0;){for(var W=C,U=0;W.cmp(_)!==0;U++)W=W.redSqr();e(U<K);var q=this.pow(B,new n(1).iushln(K-U-1));Y=Y.redMul(q),B=q.redSqr(),C=C.redMul(B),K=U}return Y},G.prototype.invm=function(a){var w=a._invmp(this.m);return w.negative!==0?(w.negative=0,this.imod(w).redNeg()):this.imod(w)},G.prototype.pow=function(a,w){if(w.isZero())return new n(1).toRed(this);if(w.cmpn(1)===0)return a.clone();var h=4,m=new Array(1<<h);m[0]=new n(1).toRed(this),m[1]=a;for(var g=2;g<m.length;g++)m[g]=this.mul(m[g-1],a);var _=m[0],T=0,k=0,M=w.bitLength()%26;for(M===0&&(M=26),g=w.length-1;g>=0;g--){for(var B=w.words[g],Y=M-1;Y>=0;Y--){var C=B>>Y&1;if(_!==m[0]&&(_=this.sqr(_)),C===0&&T===0){k=0;continue}T<<=1,T|=C,k++,!(k!==h&&(g!==0||Y!==0))&&(_=this.mul(_,m[T]),k=0,T=0)}M=26}return _},G.prototype.convertTo=function(a){var w=a.umod(this.m);return w===a?w.clone():w},G.prototype.convertFrom=function(a){var w=a.clone();return w.red=null,w},n.mont=function(a){return new z(a)};function z(S){G.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}o(z,G),z.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},z.prototype.convertFrom=function(a){var w=this.imod(a.mul(this.rinv));return w.red=null,w},z.prototype.imul=function(a,w){if(a.isZero()||w.isZero())return a.words[0]=0,a.length=1,a;var h=a.imul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},z.prototype.mul=function(a,w){if(a.isZero()||w.isZero())return new n(0)._forceRed(this);var h=a.mul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},z.prototype.invm=function(a){var w=this.imod(a._invmp(this.m).mul(this.r2));return w._forceRed(this)}})(r,co)})(lb);const pb=Ra,mb="logger/5.7.0";let wc=!1,_c=!1;const Io={debug:1,default:2,info:2,warning:3,error:4,off:5};let Mc=Io.default,Bs=null;function gb(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{r.push(t)}}),r.length)throw new Error("missing "+r.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(r){return r.message}return null}const xc=gb();var Ta;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(Ta||(Ta={}));var Br;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(Br||(Br={}));const Ac="0123456789abcdef";class xe{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,i){const e=t.toLowerCase();Io[e]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(Mc>Io[e])&&console.log.apply(console,i)}debug(...t){this._log(xe.levels.DEBUG,t)}info(...t){this._log(xe.levels.INFO,t)}warn(...t){this._log(xe.levels.WARNING,t)}makeError(t,i,e){if(_c)return this.makeError("censored error",i,{});i||(i=xe.errors.UNKNOWN_ERROR),e||(e={});const o=[];Object.keys(e).forEach(u=>{const c=e[u];try{if(c instanceof Uint8Array){let s="";for(let l=0;l<c.length;l++)s+=Ac[c[l]>>4],s+=Ac[c[l]&15];o.push(u+"=Uint8Array(0x"+s+")")}else o.push(u+"="+JSON.stringify(c))}catch{o.push(u+"="+JSON.stringify(e[u].toString()))}}),o.push(`code=${i}`),o.push(`version=${this.version}`);const n=t;let f="";switch(i){case Br.NUMERIC_FAULT:{f="NUMERIC_FAULT";const u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":f+="-"+u;break;case"negative-power":case"negative-width":f+="-unsupported";break;case"unbound-bitwise-result":f+="-unbound-result";break}break}case Br.CALL_EXCEPTION:case Br.INSUFFICIENT_FUNDS:case Br.MISSING_NEW:case Br.NONCE_EXPIRED:case Br.REPLACEMENT_UNDERPRICED:case Br.TRANSACTION_REPLACED:case Br.UNPREDICTABLE_GAS_LIMIT:f=i;break}f&&(t+=" [ See: https://links.ethers.org/v5-errors-"+f+" ]"),o.length&&(t+=" ("+o.join(", ")+")");const p=new Error(t);return p.reason=n,p.code=i,Object.keys(e).forEach(function(u){p[u]=e[u]}),p}throwError(t,i,e){throw this.makeError(t,i,e)}throwArgumentError(t,i,e){return this.throwError(t,xe.errors.INVALID_ARGUMENT,{argument:i,value:e})}assert(t,i,e,o){t||this.throwError(i,e,o)}assertArgument(t,i,e,o){t||this.throwArgumentError(i,e,o)}checkNormalize(t){xc&&this.throwError("platform missing String.prototype.normalize",xe.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:xc})}checkSafeUint53(t,i){typeof t=="number"&&(i==null&&(i="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(i,xe.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(i,xe.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,i,e){e?e=": "+e:e="",t<i&&this.throwError("missing argument"+e,xe.errors.MISSING_ARGUMENT,{count:t,expectedCount:i}),t>i&&this.throwError("too many arguments"+e,xe.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:i})}checkNew(t,i){(t===Object||t==null)&&this.throwError("missing new",xe.errors.MISSING_NEW,{name:i.name})}checkAbstract(t,i){t===i?this.throwError("cannot instantiate abstract class "+JSON.stringify(i.name)+" directly; use a sub-class",xe.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",xe.errors.MISSING_NEW,{name:i.name})}static globalLogger(){return Bs||(Bs=new xe(mb)),Bs}static setCensorship(t,i){if(!t&&i&&this.globalLogger().throwError("cannot permanently disable censorship",xe.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),wc){if(!t)return;this.globalLogger().throwError("error censorship permanent",xe.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}_c=!!t,wc=!!i}static setLogLevel(t){const i=Io[t.toLowerCase()];if(i==null){xe.globalLogger().warn("invalid log level - "+t);return}Mc=i}static from(t){return new xe(t)}}xe.errors=Br;xe.levels=Ta;const vb="bytes/5.7.0",Bt=new xe(vb);function nd(r){return!!r.toHexString}function fi(r){return r.slice||(r.slice=function(){const t=Array.prototype.slice.call(arguments);return fi(new Uint8Array(Array.prototype.slice.apply(r,t)))}),r}function ku(r){return Rt(r)&&!(r.length%2)||ds(r)}function Ec(r){return typeof r=="number"&&r==r&&r%1===0}function ds(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!Ec(r.length)||r.length<0)return!1;for(let t=0;t<r.length;t++){const i=r[t];if(!Ec(i)||i<0||i>=256)return!1}return!0}function vt(r,t){if(t||(t={}),typeof r=="number"){Bt.checkSafeUint53(r,"invalid arrayify value");const i=[];for(;r;)i.unshift(r&255),r=parseInt(String(r/256));return i.length===0&&i.push(0),fi(new Uint8Array(i))}if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),nd(r)&&(r=r.toHexString()),Rt(r)){let i=r.substring(2);i.length%2&&(t.hexPad==="left"?i="0"+i:t.hexPad==="right"?i+="0":Bt.throwArgumentError("hex data is odd-length","value",r));const e=[];for(let o=0;o<i.length;o+=2)e.push(parseInt(i.substring(o,o+2),16));return fi(new Uint8Array(e))}return ds(r)?fi(new Uint8Array(r)):Bt.throwArgumentError("invalid arrayify value","value",r)}function Kn(r){const t=r.map(o=>vt(o)),i=t.reduce((o,n)=>o+n.length,0),e=new Uint8Array(i);return t.reduce((o,n)=>(e.set(n,o),o+n.length),0),fi(e)}function vi(r){let t=vt(r);if(t.length===0)return t;let i=0;for(;i<t.length&&t[i]===0;)i++;return i&&(t=t.slice(i)),t}function bb(r,t){r=vt(r),r.length>t&&Bt.throwArgumentError("value out of range","value",arguments[0]);const i=new Uint8Array(t);return i.set(r,t-r.length),fi(i)}function Rt(r,t){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||t&&r.length!==2+2*t)}const Ls="0123456789abcdef";function dt(r,t){if(t||(t={}),typeof r=="number"){Bt.checkSafeUint53(r,"invalid hexlify value");let i="";for(;r;)i=Ls[r&15]+i,r=Math.floor(r/16);return i.length?(i.length%2&&(i="0"+i),"0x"+i):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),nd(r))return r.toHexString();if(Rt(r))return r.length%2&&(t.hexPad==="left"?r="0x0"+r.substring(2):t.hexPad==="right"?r+="0":Bt.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(ds(r)){let i="0x";for(let e=0;e<r.length;e++){let o=r[e];i+=Ls[(o&240)>>4]+Ls[o&15]}return i}return Bt.throwArgumentError("invalid hexlify value","value",r)}function Jn(r){if(typeof r!="string")r=dt(r);else if(!Rt(r)||r.length%2)return null;return(r.length-2)/2}function tr(r,t,i){return typeof r!="string"?r=dt(r):(!Rt(r)||r.length%2)&&Bt.throwArgumentError("invalid hexData","value",r),t=2+2*t,i!=null?"0x"+r.substring(t,2+2*i):"0x"+r.substring(t)}function br(r){let t="0x";return r.forEach(i=>{t+=dt(i).substring(2)}),t}function Ru(r){const t=yb(dt(r,{hexPad:"left"}));return t==="0x"?"0x0":t}function yb(r){typeof r!="string"&&(r=dt(r)),Rt(r)||Bt.throwArgumentError("invalid hex string","value",r),r=r.substring(2);let t=0;for(;t<r.length&&r[t]==="0";)t++;return"0x"+r.substring(t)}function Ft(r,t){for(typeof r!="string"?r=dt(r):Rt(r)||Bt.throwArgumentError("invalid hex string","value",r),r.length>2*t+2&&Bt.throwArgumentError("value out of range","value",arguments[1]);r.length<2*t+2;)r="0x0"+r.substring(2);return r}function ps(r){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ku(r)){let i=vt(r);i.length===64?(t.v=27+(i[32]>>7),i[32]&=127,t.r=dt(i.slice(0,32)),t.s=dt(i.slice(32,64))):i.length===65?(t.r=dt(i.slice(0,32)),t.s=dt(i.slice(32,64)),t.v=i[64]):Bt.throwArgumentError("invalid signature string","signature",r),t.v<27&&(t.v===0||t.v===1?t.v+=27:Bt.throwArgumentError("signature invalid v byte","signature",r)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(i[32]|=128),t._vs=dt(i.slice(32,64))}else{if(t.r=r.r,t.s=r.s,t.v=r.v,t.recoveryParam=r.recoveryParam,t._vs=r._vs,t._vs!=null){const o=bb(vt(t._vs),32);t._vs=dt(o);const n=o[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=n:t.recoveryParam!==n&&Bt.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),o[0]&=127;const f=dt(o);t.s==null?t.s=f:t.s!==f&&Bt.throwArgumentError("signature v mismatch _vs","signature",r)}if(t.recoveryParam==null)t.v==null?Bt.throwArgumentError("signature missing v and recoveryParam","signature",r):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const o=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==o&&Bt.throwArgumentError("signature recoveryParam mismatch v","signature",r)}t.r==null||!Rt(t.r)?Bt.throwArgumentError("signature missing or invalid r","signature",r):t.r=Ft(t.r,32),t.s==null||!Rt(t.s)?Bt.throwArgumentError("signature missing or invalid s","signature",r):t.s=Ft(t.s,32);const i=vt(t.s);i[0]>=128&&Bt.throwArgumentError("signature s out of range","signature",r),t.recoveryParam&&(i[0]|=128);const e=dt(i);t._vs&&(Rt(t._vs)||Bt.throwArgumentError("signature invalid _vs","signature",r),t._vs=Ft(t._vs,32)),t._vs==null?t._vs=e:t._vs!==e&&Bt.throwArgumentError("signature _vs mismatch v and s","signature",r)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}const wb="bignumber/5.7.0";var Wo=pb.BN;const hn=new xe(wb),js={},Sc=9007199254740991;let kc=!1;class ot{constructor(t,i){t!==js&&hn.throwError("cannot call constructor directly; use BigNumber.from",xe.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=i,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return ir(Mt(this).fromTwos(t))}toTwos(t){return ir(Mt(this).toTwos(t))}abs(){return this._hex[0]==="-"?ot.from(this._hex.substring(1)):this}add(t){return ir(Mt(this).add(Mt(t)))}sub(t){return ir(Mt(this).sub(Mt(t)))}div(t){return ot.from(t).isZero()&&Mr("division-by-zero","div"),ir(Mt(this).div(Mt(t)))}mul(t){return ir(Mt(this).mul(Mt(t)))}mod(t){const i=Mt(t);return i.isNeg()&&Mr("division-by-zero","mod"),ir(Mt(this).umod(i))}pow(t){const i=Mt(t);return i.isNeg()&&Mr("negative-power","pow"),ir(Mt(this).pow(i))}and(t){const i=Mt(t);return(this.isNegative()||i.isNeg())&&Mr("unbound-bitwise-result","and"),ir(Mt(this).and(i))}or(t){const i=Mt(t);return(this.isNegative()||i.isNeg())&&Mr("unbound-bitwise-result","or"),ir(Mt(this).or(i))}xor(t){const i=Mt(t);return(this.isNegative()||i.isNeg())&&Mr("unbound-bitwise-result","xor"),ir(Mt(this).xor(i))}mask(t){return(this.isNegative()||t<0)&&Mr("negative-width","mask"),ir(Mt(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&Mr("negative-width","shl"),ir(Mt(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&Mr("negative-width","shr"),ir(Mt(this).shrn(t))}eq(t){return Mt(this).eq(Mt(t))}lt(t){return Mt(this).lt(Mt(t))}lte(t){return Mt(this).lte(Mt(t))}gt(t){return Mt(this).gt(Mt(t))}gte(t){return Mt(this).gte(Mt(t))}isNegative(){return this._hex[0]==="-"}isZero(){return Mt(this).isZero()}toNumber(){try{return Mt(this).toNumber()}catch{Mr("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return hn.throwError("this platform does not support BigInt",xe.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?kc||(kc=!0,hn.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?hn.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",xe.errors.UNEXPECTED_ARGUMENT,{}):hn.throwError("BigNumber.toString does not accept parameters",xe.errors.UNEXPECTED_ARGUMENT,{})),Mt(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof ot)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new ot(js,io(t)):t.match(/^-?[0-9]+$/)?new ot(js,io(new Wo(t))):hn.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&Mr("underflow","BigNumber.from",t),(t>=Sc||t<=-Sc)&&Mr("overflow","BigNumber.from",t),ot.from(String(t));const i=t;if(typeof i=="bigint")return ot.from(i.toString());if(ds(i))return ot.from(dt(i));if(i)if(i.toHexString){const e=i.toHexString();if(typeof e=="string")return ot.from(e)}else{let e=i._hex;if(e==null&&i.type==="BigNumber"&&(e=i.hex),typeof e=="string"&&(Rt(e)||e[0]==="-"&&Rt(e.substring(1))))return ot.from(e)}return hn.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function io(r){if(typeof r!="string")return io(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&hn.throwArgumentError("invalid hex","value",r),r=io(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function ir(r){return ot.from(io(r))}function Mt(r){const t=ot.from(r).toHexString();return t[0]==="-"?new Wo("-"+t.substring(3),16):new Wo(t.substring(2),16)}function Mr(r,t,i){const e={fault:r,operation:t};return i!=null&&(e.value=i),hn.throwError(r,xe.errors.NUMERIC_FAULT,e)}function _b(r){return new Wo(r,36).toString(16)}const Mb="properties/5.7.0";var xb=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Ko=new xe(Mb);function At(r,t,i){Object.defineProperty(r,t,{enumerable:!0,value:i,writable:!1})}function Ui(r,t){for(let i=0;i<32;i++){if(r[t])return r[t];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}function Kt(r){return xb(this,void 0,void 0,function*(){const t=Object.keys(r).map(e=>{const o=r[e];return Promise.resolve(o).then(n=>({key:e,value:n}))});return(yield Promise.all(t)).reduce((e,o)=>(e[o.key]=o.value,e),{})})}function Ab(r,t){(!r||typeof r!="object")&&Ko.throwArgumentError("invalid object","object",r),Object.keys(r).forEach(i=>{t[i]||Ko.throwArgumentError("invalid object key - "+i,"transaction:"+i,r)})}function ar(r){const t={};for(const i in r)t[i]=r[i];return t}const Eb={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function id(r){if(r==null||Eb[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const t=Object.keys(r);for(let i=0;i<t.length;i++){let e=null;try{e=r[t[i]]}catch{continue}if(!id(e))return!1}return!0}return Ko.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function Sb(r){if(id(r))return r;if(Array.isArray(r))return Object.freeze(r.map(t=>Yn(t)));if(typeof r=="object"){const t={};for(const i in r){const e=r[i];e!==void 0&&At(t,i,Yn(e))}return t}return Ko.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function Yn(r){return Sb(r)}class kb{constructor(t){for(const i in t)this[i]=Yn(t[i])}}var Ia={},Rb={get exports(){return Ia},set exports(r){Ia=r}};/**
 * [js-sha3]{@link https://github.com/emn178/js-sha3}
 *
 * @version 0.8.0
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2015-2018
 * @license MIT
 */(function(r){(function(){var t="input is invalid type",i="finalize already called",e=typeof window=="object",o=e?window:{};o.JS_SHA3_NO_WINDOW&&(e=!1);var n=!e&&typeof self=="object",f=!o.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;f?o=co:n&&(o=self);var p=!o.JS_SHA3_NO_COMMON_JS&&!0&&r.exports,u=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),s=[31,7936,2031616,520093696],l=[4,1024,262144,67108864],d=[1,256,65536,16777216],b=[6,1536,393216,100663296],v=[0,8,16,24],y=[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],x=[224,256,384,512],E=[128,256],R=["hex","buffer","arrayBuffer","array","digest"],I={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),u&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var O=function(C,K,W){return function(U){return new M(C,K,C).update(U)[W]()}},A=function(C,K,W){return function(U,q){return new M(C,K,q).update(U)[W]()}},P=function(C,K,W){return function(U,q,j,D){return a["cshake"+C].update(U,q,j,D)[W]()}},N=function(C,K,W){return function(U,q,j,D){return a["kmac"+C].update(U,q,j,D)[W]()}},L=function(C,K,W,U){for(var q=0;q<R.length;++q){var j=R[q];C[j]=K(W,U,j)}return C},H=function(C,K){var W=O(C,K,"hex");return W.create=function(){return new M(C,K,C)},W.update=function(U){return W.create().update(U)},L(W,O,C,K)},J=function(C,K){var W=A(C,K,"hex");return W.create=function(U){return new M(C,K,U)},W.update=function(U,q){return W.create(q).update(U)},L(W,A,C,K)},G=function(C,K){var W=I[C],U=P(C,K,"hex");return U.create=function(q,j,D){return!j&&!D?a["shake"+C].create(q):new M(C,K,q).bytepad([j,D],W)},U.update=function(q,j,D,F){return U.create(j,D,F).update(q)},L(U,P,C,K)},z=function(C,K){var W=I[C],U=N(C,K,"hex");return U.create=function(q,j,D){return new B(C,K,j).bytepad(["KMAC",D],W).bytepad([q],W)},U.update=function(q,j,D,F){return U.create(q,D,F).update(j)},L(U,N,C,K)},S=[{name:"keccak",padding:d,bits:x,createMethod:H},{name:"sha3",padding:b,bits:x,createMethod:H},{name:"shake",padding:s,bits:E,createMethod:J},{name:"cshake",padding:l,bits:E,createMethod:G},{name:"kmac",padding:l,bits:E,createMethod:z}],a={},w=[],h=0;h<S.length;++h)for(var m=S[h],g=m.bits,_=0;_<g.length;++_){var T=m.name+"_"+g[_];if(w.push(T),a[T]=m.createMethod(g[_],m.padding),m.name!=="sha3"){var k=m.name+g[_];w.push(k),a[k]=a[T]}}function M(C,K,W){this.blocks=[],this.s=[],this.padding=K,this.outputBits=W,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(C<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=W>>5,this.extraBytes=(W&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}M.prototype.update=function(C){if(this.finalized)throw new Error(i);var K,W=typeof C;if(W!=="string"){if(W==="object"){if(C===null)throw new Error(t);if(u&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!u||!ArrayBuffer.isView(C)))throw new Error(t)}else throw new Error(t);K=!0}for(var U=this.blocks,q=this.byteCount,j=C.length,D=this.blockCount,F=0,$=this.s,V,Z;F<j;){if(this.reset)for(this.reset=!1,U[0]=this.block,V=1;V<D+1;++V)U[V]=0;if(K)for(V=this.start;F<j&&V<q;++F)U[V>>2]|=C[F]<<v[V++&3];else for(V=this.start;F<j&&V<q;++F)Z=C.charCodeAt(F),Z<128?U[V>>2]|=Z<<v[V++&3]:Z<2048?(U[V>>2]|=(192|Z>>6)<<v[V++&3],U[V>>2]|=(128|Z&63)<<v[V++&3]):Z<55296||Z>=57344?(U[V>>2]|=(224|Z>>12)<<v[V++&3],U[V>>2]|=(128|Z>>6&63)<<v[V++&3],U[V>>2]|=(128|Z&63)<<v[V++&3]):(Z=65536+((Z&1023)<<10|C.charCodeAt(++F)&1023),U[V>>2]|=(240|Z>>18)<<v[V++&3],U[V>>2]|=(128|Z>>12&63)<<v[V++&3],U[V>>2]|=(128|Z>>6&63)<<v[V++&3],U[V>>2]|=(128|Z&63)<<v[V++&3]);if(this.lastByteIndex=V,V>=q){for(this.start=V-q,this.block=U[D],V=0;V<D;++V)$[V]^=U[V];Y($),this.reset=!0}else this.start=V}return this},M.prototype.encode=function(C,K){var W=C&255,U=1,q=[W];for(C=C>>8,W=C&255;W>0;)q.unshift(W),C=C>>8,W=C&255,++U;return K?q.push(U):q.unshift(U),this.update(q),q.length},M.prototype.encodeString=function(C){var K,W=typeof C;if(W!=="string"){if(W==="object"){if(C===null)throw new Error(t);if(u&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!u||!ArrayBuffer.isView(C)))throw new Error(t)}else throw new Error(t);K=!0}var U=0,q=C.length;if(K)U=q;else for(var j=0;j<C.length;++j){var D=C.charCodeAt(j);D<128?U+=1:D<2048?U+=2:D<55296||D>=57344?U+=3:(D=65536+((D&1023)<<10|C.charCodeAt(++j)&1023),U+=4)}return U+=this.encode(U*8),this.update(C),U},M.prototype.bytepad=function(C,K){for(var W=this.encode(K),U=0;U<C.length;++U)W+=this.encodeString(C[U]);var q=K-W%K,j=[];return j.length=q,this.update(j),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,K=this.lastByteIndex,W=this.blockCount,U=this.s;if(C[K>>2]|=this.padding[K&3],this.lastByteIndex===this.byteCount)for(C[0]=C[W],K=1;K<W+1;++K)C[K]=0;for(C[W-1]|=2147483648,K=0;K<W;++K)U[K]^=C[K];Y(U)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var C=this.blockCount,K=this.s,W=this.outputBlocks,U=this.extraBytes,q=0,j=0,D="",F;j<W;){for(q=0;q<C&&j<W;++q,++j)F=K[q],D+=c[F>>4&15]+c[F&15]+c[F>>12&15]+c[F>>8&15]+c[F>>20&15]+c[F>>16&15]+c[F>>28&15]+c[F>>24&15];j%C===0&&(Y(K),q=0)}return U&&(F=K[q],D+=c[F>>4&15]+c[F&15],U>1&&(D+=c[F>>12&15]+c[F>>8&15]),U>2&&(D+=c[F>>20&15]+c[F>>16&15])),D},M.prototype.arrayBuffer=function(){this.finalize();var C=this.blockCount,K=this.s,W=this.outputBlocks,U=this.extraBytes,q=0,j=0,D=this.outputBits>>3,F;U?F=new ArrayBuffer(W+1<<2):F=new ArrayBuffer(D);for(var $=new Uint32Array(F);j<W;){for(q=0;q<C&&j<W;++q,++j)$[j]=K[q];j%C===0&&Y(K)}return U&&($[q]=K[q],F=F.slice(0,D)),F},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var C=this.blockCount,K=this.s,W=this.outputBlocks,U=this.extraBytes,q=0,j=0,D=[],F,$;j<W;){for(q=0;q<C&&j<W;++q,++j)F=j<<2,$=K[q],D[F]=$&255,D[F+1]=$>>8&255,D[F+2]=$>>16&255,D[F+3]=$>>24&255;j%C===0&&Y(K)}return U&&(F=j<<2,$=K[q],D[F]=$&255,U>1&&(D[F+1]=$>>8&255),U>2&&(D[F+2]=$>>16&255)),D};function B(C,K,W){M.call(this,C,K,W)}B.prototype=new M,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var Y=function(C){var K,W,U,q,j,D,F,$,V,Z,ee,re,ue,fe,oe,ae,ie,te,le,ge,he,ye,Ie,pe,Oe,Ge,we,Le,Ve,ve,Ne,se,de,_e,Ue,me,Be,Je,be,He,tt,Re,ze,Ze,Ae,De,rt,Ee,Fe,Qe,Se,Ke,Xe,Me,We,et,ke,qe,Q,X,ne,ce,Ce;for(U=0;U<48;U+=2)q=C[0]^C[10]^C[20]^C[30]^C[40],j=C[1]^C[11]^C[21]^C[31]^C[41],D=C[2]^C[12]^C[22]^C[32]^C[42],F=C[3]^C[13]^C[23]^C[33]^C[43],$=C[4]^C[14]^C[24]^C[34]^C[44],V=C[5]^C[15]^C[25]^C[35]^C[45],Z=C[6]^C[16]^C[26]^C[36]^C[46],ee=C[7]^C[17]^C[27]^C[37]^C[47],re=C[8]^C[18]^C[28]^C[38]^C[48],ue=C[9]^C[19]^C[29]^C[39]^C[49],K=re^(D<<1|F>>>31),W=ue^(F<<1|D>>>31),C[0]^=K,C[1]^=W,C[10]^=K,C[11]^=W,C[20]^=K,C[21]^=W,C[30]^=K,C[31]^=W,C[40]^=K,C[41]^=W,K=q^($<<1|V>>>31),W=j^(V<<1|$>>>31),C[2]^=K,C[3]^=W,C[12]^=K,C[13]^=W,C[22]^=K,C[23]^=W,C[32]^=K,C[33]^=W,C[42]^=K,C[43]^=W,K=D^(Z<<1|ee>>>31),W=F^(ee<<1|Z>>>31),C[4]^=K,C[5]^=W,C[14]^=K,C[15]^=W,C[24]^=K,C[25]^=W,C[34]^=K,C[35]^=W,C[44]^=K,C[45]^=W,K=$^(re<<1|ue>>>31),W=V^(ue<<1|re>>>31),C[6]^=K,C[7]^=W,C[16]^=K,C[17]^=W,C[26]^=K,C[27]^=W,C[36]^=K,C[37]^=W,C[46]^=K,C[47]^=W,K=Z^(q<<1|j>>>31),W=ee^(j<<1|q>>>31),C[8]^=K,C[9]^=W,C[18]^=K,C[19]^=W,C[28]^=K,C[29]^=W,C[38]^=K,C[39]^=W,C[48]^=K,C[49]^=W,fe=C[0],oe=C[1],De=C[11]<<4|C[10]>>>28,rt=C[10]<<4|C[11]>>>28,Le=C[20]<<3|C[21]>>>29,Ve=C[21]<<3|C[20]>>>29,X=C[31]<<9|C[30]>>>23,ne=C[30]<<9|C[31]>>>23,Re=C[40]<<18|C[41]>>>14,ze=C[41]<<18|C[40]>>>14,_e=C[2]<<1|C[3]>>>31,Ue=C[3]<<1|C[2]>>>31,ae=C[13]<<12|C[12]>>>20,ie=C[12]<<12|C[13]>>>20,Ee=C[22]<<10|C[23]>>>22,Fe=C[23]<<10|C[22]>>>22,ve=C[33]<<13|C[32]>>>19,Ne=C[32]<<13|C[33]>>>19,ce=C[42]<<2|C[43]>>>30,Ce=C[43]<<2|C[42]>>>30,Me=C[5]<<30|C[4]>>>2,We=C[4]<<30|C[5]>>>2,me=C[14]<<6|C[15]>>>26,Be=C[15]<<6|C[14]>>>26,te=C[25]<<11|C[24]>>>21,le=C[24]<<11|C[25]>>>21,Qe=C[34]<<15|C[35]>>>17,Se=C[35]<<15|C[34]>>>17,se=C[45]<<29|C[44]>>>3,de=C[44]<<29|C[45]>>>3,pe=C[6]<<28|C[7]>>>4,Oe=C[7]<<28|C[6]>>>4,et=C[17]<<23|C[16]>>>9,ke=C[16]<<23|C[17]>>>9,Je=C[26]<<25|C[27]>>>7,be=C[27]<<25|C[26]>>>7,ge=C[36]<<21|C[37]>>>11,he=C[37]<<21|C[36]>>>11,Ke=C[47]<<24|C[46]>>>8,Xe=C[46]<<24|C[47]>>>8,Ze=C[8]<<27|C[9]>>>5,Ae=C[9]<<27|C[8]>>>5,Ge=C[18]<<20|C[19]>>>12,we=C[19]<<20|C[18]>>>12,qe=C[29]<<7|C[28]>>>25,Q=C[28]<<7|C[29]>>>25,He=C[38]<<8|C[39]>>>24,tt=C[39]<<8|C[38]>>>24,ye=C[48]<<14|C[49]>>>18,Ie=C[49]<<14|C[48]>>>18,C[0]=fe^~ae&te,C[1]=oe^~ie&le,C[10]=pe^~Ge&Le,C[11]=Oe^~we&Ve,C[20]=_e^~me&Je,C[21]=Ue^~Be&be,C[30]=Ze^~De&Ee,C[31]=Ae^~rt&Fe,C[40]=Me^~et&qe,C[41]=We^~ke&Q,C[2]=ae^~te&ge,C[3]=ie^~le&he,C[12]=Ge^~Le&ve,C[13]=we^~Ve&Ne,C[22]=me^~Je&He,C[23]=Be^~be&tt,C[32]=De^~Ee&Qe,C[33]=rt^~Fe&Se,C[42]=et^~qe&X,C[43]=ke^~Q&ne,C[4]=te^~ge&ye,C[5]=le^~he&Ie,C[14]=Le^~ve&se,C[15]=Ve^~Ne&de,C[24]=Je^~He&Re,C[25]=be^~tt&ze,C[34]=Ee^~Qe&Ke,C[35]=Fe^~Se&Xe,C[44]=qe^~X&ce,C[45]=Q^~ne&Ce,C[6]=ge^~ye&fe,C[7]=he^~Ie&oe,C[16]=ve^~se&pe,C[17]=Ne^~de&Oe,C[26]=He^~Re&_e,C[27]=tt^~ze&Ue,C[36]=Qe^~Ke&Ze,C[37]=Se^~Xe&Ae,C[46]=X^~ce&Me,C[47]=ne^~Ce&We,C[8]=ye^~fe&ae,C[9]=Ie^~oe&ie,C[18]=se^~pe&Ge,C[19]=de^~Oe&we,C[28]=Re^~_e&me,C[29]=ze^~Ue&Be,C[38]=Ke^~Ze&De,C[39]=Xe^~Ae&rt,C[48]=ce^~Me&et,C[49]=Ce^~We&ke,C[0]^=y[U],C[1]^=y[U+1]};if(p)r.exports=a;else for(h=0;h<w.length;++h)o[w[h]]=a[w[h]]})()})(Rb);const Tb=Ia;function Gt(r){return"0x"+Tb.keccak_256(vt(r))}const Ib="rlp/5.7.0",Gr=new xe(Ib);function Rc(r){const t=[];for(;r;)t.unshift(r&255),r>>=8;return t}function Tc(r,t,i){let e=0;for(let o=0;o<i;o++)e=e*256+r[t+o];return e}function od(r){if(Array.isArray(r)){let e=[];if(r.forEach(function(n){e=e.concat(od(n))}),e.length<=55)return e.unshift(192+e.length),e;const o=Rc(e.length);return o.unshift(247+o.length),o.concat(e)}ku(r)||Gr.throwArgumentError("RLP object must be BytesLike","object",r);const t=Array.prototype.slice.call(vt(r));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const i=Rc(t.length);return i.unshift(183+i.length),i.concat(t)}function ms(r){return dt(od(r))}function Ic(r,t,i,e){const o=[];for(;i<t+1+e;){const n=sd(r,i);o.push(n.result),i+=n.consumed,i>t+1+e&&Gr.throwError("child data too short",xe.errors.BUFFER_OVERRUN,{})}return{consumed:1+e,result:o}}function sd(r,t){if(r.length===0&&Gr.throwError("data too short",xe.errors.BUFFER_OVERRUN,{}),r[t]>=248){const i=r[t]-247;t+1+i>r.length&&Gr.throwError("data short segment too short",xe.errors.BUFFER_OVERRUN,{});const e=Tc(r,t+1,i);return t+1+i+e>r.length&&Gr.throwError("data long segment too short",xe.errors.BUFFER_OVERRUN,{}),Ic(r,t,t+1+i,i+e)}else if(r[t]>=192){const i=r[t]-192;return t+1+i>r.length&&Gr.throwError("data array too short",xe.errors.BUFFER_OVERRUN,{}),Ic(r,t,t+1,i)}else if(r[t]>=184){const i=r[t]-183;t+1+i>r.length&&Gr.throwError("data array too short",xe.errors.BUFFER_OVERRUN,{});const e=Tc(r,t+1,i);t+1+i+e>r.length&&Gr.throwError("data array too short",xe.errors.BUFFER_OVERRUN,{});const o=dt(r.slice(t+1+i,t+1+i+e));return{consumed:1+i+e,result:o}}else if(r[t]>=128){const i=r[t]-128;t+1+i>r.length&&Gr.throwError("data too short",xe.errors.BUFFER_OVERRUN,{});const e=dt(r.slice(t+1,t+1+i));return{consumed:1+i,result:e}}return{consumed:1,result:dt(r[t])}}function Tu(r){const t=vt(r),i=sd(t,0);return i.consumed!==t.length&&Gr.throwArgumentError("invalid rlp data","data",r),i.result}const Cb="address/5.7.0",oi=new xe(Cb);function Cc(r){Rt(r,20)||oi.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const t=r.substring(2).split(""),i=new Uint8Array(40);for(let o=0;o<40;o++)i[o]=t[o].charCodeAt(0);const e=vt(Gt(i));for(let o=0;o<40;o+=2)e[o>>1]>>4>=8&&(t[o]=t[o].toUpperCase()),(e[o>>1]&15)>=8&&(t[o+1]=t[o+1].toUpperCase());return"0x"+t.join("")}const Pb=9007199254740991;function Ob(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const Iu={};for(let r=0;r<10;r++)Iu[String(r)]=String(r);for(let r=0;r<26;r++)Iu[String.fromCharCode(65+r)]=String(10+r);const Pc=Math.floor(Ob(Pb));function Nb(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let t=r.split("").map(e=>Iu[e]).join("");for(;t.length>=Pc;){let e=t.substring(0,Pc);t=parseInt(e,10)%97+t.substring(e.length)}let i=String(98-parseInt(t,10)%97);for(;i.length<2;)i="0"+i;return i}function zr(r){let t=null;if(typeof r!="string"&&oi.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),t=Cc(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==r&&oi.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Nb(r)&&oi.throwArgumentError("bad icap checksum","address",r),t=_b(r.substring(4));t.length<40;)t="0"+t;t=Cc("0x"+t)}else oi.throwArgumentError("invalid address","address",r);return t}function Bb(r){let t=null;try{t=zr(r.from)}catch{oi.throwArgumentError("missing from address","transaction",r)}const i=vi(vt(ot.from(r.nonce).toHexString()));return zr(tr(Gt(ms([t,i])),12))}const Lb="0x0000000000000000000000000000000000000000",jb=ot.from(0),Ub="0x0000000000000000000000000000000000000000000000000000000000000000",Db="strings/5.7.0",ad=new xe(Db);var oo;(function(r){r.current="",r.NFC="NFC",r.NFD="NFD",r.NFKC="NFKC",r.NFKD="NFKD"})(oo||(oo={}));var hr;(function(r){r.UNEXPECTED_CONTINUE="unexpected continuation byte",r.BAD_PREFIX="bad codepoint prefix",r.OVERRUN="string overrun",r.MISSING_CONTINUE="missing continuation byte",r.OUT_OF_RANGE="out of UTF-8 range",r.UTF16_SURROGATE="UTF-16 surrogate",r.OVERLONG="overlong representation"})(hr||(hr={}));function Fb(r,t,i,e,o){return ad.throwArgumentError(`invalid codepoint at offset ${t}; ${r}`,"bytes",i)}function ud(r,t,i,e,o){if(r===hr.BAD_PREFIX||r===hr.UNEXPECTED_CONTINUE){let n=0;for(let f=t+1;f<i.length&&i[f]>>6===2;f++)n++;return n}return r===hr.OVERRUN?i.length-t-1:0}function qb(r,t,i,e,o){return r===hr.OVERLONG?(e.push(o),0):(e.push(65533),ud(r,t,i))}const Hb=Object.freeze({error:Fb,ignore:ud,replace:qb});function fd(r,t){t==null&&(t=Hb.error),r=vt(r);const i=[];let e=0;for(;e<r.length;){const o=r[e++];if(!(o>>7)){i.push(o);continue}let n=null,f=null;if((o&224)===192)n=1,f=127;else if((o&240)===224)n=2,f=2047;else if((o&248)===240)n=3,f=65535;else{(o&192)===128?e+=t(hr.UNEXPECTED_CONTINUE,e-1,r,i):e+=t(hr.BAD_PREFIX,e-1,r,i);continue}if(e-1+n>=r.length){e+=t(hr.OVERRUN,e-1,r,i);continue}let p=o&(1<<8-n-1)-1;for(let u=0;u<n;u++){let c=r[e];if((c&192)!=128){e+=t(hr.MISSING_CONTINUE,e,r,i),p=null;break}p=p<<6|c&63,e++}if(p!==null){if(p>1114111){e+=t(hr.OUT_OF_RANGE,e-1-n,r,i,p);continue}if(p>=55296&&p<=57343){e+=t(hr.UTF16_SURROGATE,e-1-n,r,i,p);continue}if(p<=f){e+=t(hr.OVERLONG,e-1-n,r,i,p);continue}i.push(p)}}return i}function gn(r,t=oo.current){t!=oo.current&&(ad.checkNormalize(),r=r.normalize(t));let i=[];for(let e=0;e<r.length;e++){const o=r.charCodeAt(e);if(o<128)i.push(o);else if(o<2048)i.push(o>>6|192),i.push(o&63|128);else if((o&64512)==55296){e++;const n=r.charCodeAt(e);if(e>=r.length||(n&64512)!==56320)throw new Error("invalid utf-8 string");const f=65536+((o&1023)<<10)+(n&1023);i.push(f>>18|240),i.push(f>>12&63|128),i.push(f>>6&63|128),i.push(f&63|128)}else i.push(o>>12|224),i.push(o>>6&63|128),i.push(o&63|128)}return vt(i)}function zb(r){return r.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function gs(r,t){return zb(fd(r,t))}function Wb(r,t=oo.current){return fd(gn(r,t))}function cd(r){return Gt(gn(r))}const ld="hash/5.7.0";function hd(r){r=atob(r);const t=[];for(let i=0;i<r.length;i++)t.push(r.charCodeAt(i));return vt(t)}function dd(r){r=vt(r);let t="";for(let i=0;i<r.length;i++)t+=String.fromCharCode(r[i]);return btoa(t)}function pd(r,t){t==null&&(t=1);const i=[],e=i.forEach,o=function(n,f){e.call(n,function(p){f>0&&Array.isArray(p)?o(p,f-1):i.push(p)})};return o(r,t),i}function Kb(r){const t={};for(let i=0;i<r.length;i++){const e=r[i];t[e[0]]=e[1]}return t}function Gb(r){let t=0;function i(){return r[t++]<<8|r[t++]}let e=i(),o=1,n=[0,1];for(let A=1;A<e;A++)n.push(o+=i());let f=i(),p=t;t+=f;let u=0,c=0;function s(){return u==0&&(c=c<<8|r[t++],u=8),c>>--u&1}const l=31,d=Math.pow(2,l),b=d>>>1,v=b>>1,y=d-1;let x=0;for(let A=0;A<l;A++)x=x<<1|s();let E=[],R=0,I=d;for(;;){let A=Math.floor(((x-R+1)*o-1)/I),P=0,N=e;for(;N-P>1;){let J=P+N>>>1;A<n[J]?N=J:P=J}if(P==0)break;E.push(P);let L=R+Math.floor(I*n[P]/o),H=R+Math.floor(I*n[P+1]/o)-1;for(;!((L^H)&b);)x=x<<1&y|s(),L=L<<1&y,H=H<<1&y|1;for(;L&~H&v;)x=x&b|x<<1&y>>>1|s(),L=L<<1^b,H=(H^b)<<1|b|1;R=L,I=1+H-L}let O=e-4;return E.map(A=>{switch(A-O){case 3:return O+65792+(r[p++]<<16|r[p++]<<8|r[p++]);case 2:return O+256+(r[p++]<<8|r[p++]);case 1:return O+r[p++];default:return A-1}})}function Vb(r){let t=0;return()=>r[t++]}function Jb(r){return Vb(Gb(r))}function Yb(r){return r&1?~r>>1:r>>1}function $b(r,t){let i=Array(r);for(let e=0;e<r;e++)i[e]=1+t();return i}function Oc(r,t){let i=Array(r);for(let e=0,o=-1;e<r;e++)i[e]=o+=1+t();return i}function Zb(r,t){let i=Array(r);for(let e=0,o=0;e<r;e++)i[e]=o+=Yb(t());return i}function Go(r,t){let i=Oc(r(),r),e=r(),o=Oc(e,r),n=$b(e,r);for(let f=0;f<e;f++)for(let p=0;p<n[f];p++)i.push(o[f]+p);return t?i.map(f=>t[f]):i}function Qb(r){let t=[];for(;;){let i=r();if(i==0)break;t.push(ey(i,r))}for(;;){let i=r()-1;if(i<0)break;t.push(ty(i,r))}return Kb(pd(t))}function Xb(r){let t=[];for(;;){let i=r();if(i==0)break;t.push(i)}return t}function md(r,t,i){let e=Array(r).fill(void 0).map(()=>[]);for(let o=0;o<t;o++)Zb(r,i).forEach((n,f)=>e[f].push(n));return e}function ey(r,t){let i=1+t(),e=t(),o=Xb(t),n=md(o.length,1+r,t);return pd(n.map((f,p)=>{const u=f[0],c=f.slice(1);return Array(o[p]).fill(void 0).map((s,l)=>{let d=l*e;return[u+l*i,c.map(b=>b+d)]})}))}function ty(r,t){let i=1+t();return md(i,1+r,t).map(o=>[o[0],o.slice(1)])}function ry(r){let t=Go(r).sort((e,o)=>e-o);return i();function i(){let e=[];for(;;){let c=Go(r,t);if(c.length==0)break;e.push({set:new Set(c),node:i()})}e.sort((c,s)=>s.set.size-c.set.size);let o=r(),n=o%3;o=o/3|0;let f=!!(o&1);o>>=1;let p=o==1,u=o==2;return{branches:e,valid:n,fe0f:f,save:p,check:u}}}function ny(){return Jb(hd("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const vs=ny(),iy=new Set(Go(vs)),oy=new Set(Go(vs)),sy=Qb(vs),ay=ry(vs),Nc=45,Bc=95;function gd(r){return Wb(r)}function uy(r){return r.filter(t=>t!=65039)}function vd(r){for(let t of r.split(".")){let i=gd(t);try{for(let e=i.lastIndexOf(Bc)-1;e>=0;e--)if(i[e]!==Bc)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every(e=>e<128)&&i[2]===Nc&&i[3]===Nc)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return r}function fy(r){return vd(cy(r,uy))}function cy(r,t){let i=gd(r).reverse(),e=[];for(;i.length;){let o=hy(i);if(o){e.push(...t(o));continue}let n=i.pop();if(iy.has(n)){e.push(n);continue}if(oy.has(n))continue;let f=sy[n];if(f){e.push(...f);continue}throw new Error(`Disallowed codepoint: 0x${n.toString(16).toUpperCase()}`)}return vd(ly(String.fromCodePoint(...e)))}function ly(r){return r.normalize("NFC")}function hy(r,t){var i;let e=ay,o,n,f=[],p=r.length;for(t&&(t.length=0);p;){let u=r[--p];if(e=(i=e.branches.find(c=>c.set.has(u)))===null||i===void 0?void 0:i.node,!e)break;if(e.save)n=u;else if(e.check&&u===n)break;f.push(u),e.fe0f&&(f.push(65039),p>0&&r[p-1]==65039&&p--),e.valid&&(o=f.slice(),e.valid==2&&o.splice(1,1),t&&t.push(...r.slice(p).reverse()),r.length=p)}return o}const dy=new xe(ld),bd=new Uint8Array(32);bd.fill(0);function Lc(r){if(r.length===0)throw new Error("invalid ENS name; empty component");return r}function yd(r){const t=gn(fy(r)),i=[];if(r.length===0)return i;let e=0;for(let o=0;o<t.length;o++)t[o]===46&&(i.push(Lc(t.slice(e,o))),e=o+1);if(e>=t.length)throw new Error("invalid ENS name; empty component");return i.push(Lc(t.slice(e))),i}function Co(r){typeof r!="string"&&dy.throwArgumentError("invalid ENS name; not a string","name",r);let t=bd;const i=yd(r);for(;i.length;)t=Gt(Kn([t,Gt(i.pop())]));return dt(t)}function py(r){return dt(Kn(yd(r).map(t=>{if(t.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const i=new Uint8Array(t.length+1);return i.set(t,1),i[0]=i.length-1,i})))+"00"}var my=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Ot=new xe(ld),wd=new Uint8Array(32);wd.fill(0);const gy=ot.from(-1),_d=ot.from(0),Md=ot.from(1),vy=ot.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function by(r){const t=vt(r),i=t.length%32;return i?br([t,wd.slice(i)]):dt(t)}const yy=Ft(Md.toHexString(),32),wy=Ft(_d.toHexString(),32),jc={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Us=["name","version","chainId","verifyingContract","salt"];function Uc(r){return function(t){return typeof t!="string"&&Ot.throwArgumentError(`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,t),t}}const _y={name:Uc("name"),version:Uc("version"),chainId:function(r){try{return ot.from(r).toString()}catch{}return Ot.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",r)},verifyingContract:function(r){try{return zr(r).toLowerCase()}catch{}return Ot.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){try{const t=vt(r);if(t.length!==32)throw new Error("bad length");return dt(t)}catch{}return Ot.throwArgumentError('invalid domain value "salt"',"domain.salt",r)}};function Ds(r){{const t=r.match(/^(u?)int(\d*)$/);if(t){const i=t[1]==="",e=parseInt(t[2]||"256");(e%8!==0||e>256||t[2]&&t[2]!==String(e))&&Ot.throwArgumentError("invalid numeric width","type",r);const o=vy.mask(i?e-1:e),n=i?o.add(Md).mul(gy):_d;return function(f){const p=ot.from(f);return(p.lt(n)||p.gt(o))&&Ot.throwArgumentError(`value out-of-bounds for ${r}`,"value",f),Ft(p.toTwos(256).toHexString(),32)}}}{const t=r.match(/^bytes(\d+)$/);if(t){const i=parseInt(t[1]);return(i===0||i>32||t[1]!==String(i))&&Ot.throwArgumentError("invalid bytes width","type",r),function(e){return vt(e).length!==i&&Ot.throwArgumentError(`invalid length for ${r}`,"value",e),by(e)}}}switch(r){case"address":return function(t){return Ft(zr(t),32)};case"bool":return function(t){return t?yy:wy};case"bytes":return function(t){return Gt(t)};case"string":return function(t){return cd(t)}}return null}function Dc(r,t){return`${r}(${t.map(({name:i,type:e})=>e+" "+i).join(",")})`}class cr{constructor(t){At(this,"types",Object.freeze(Yn(t))),At(this,"_encoderCache",{}),At(this,"_types",{});const i={},e={},o={};Object.keys(t).forEach(p=>{i[p]={},e[p]=[],o[p]={}});for(const p in t){const u={};t[p].forEach(c=>{u[c.name]&&Ot.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(p)}`,"types",t),u[c.name]=!0;const s=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===p&&Ot.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",t),!Ds(s)&&(e[s]||Ot.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",t),e[s].push(p),i[p][s]=!0)})}const n=Object.keys(e).filter(p=>e[p].length===0);n.length===0?Ot.throwArgumentError("missing primary type","types",t):n.length>1&&Ot.throwArgumentError(`ambiguous primary types or unused types: ${n.map(p=>JSON.stringify(p)).join(", ")}`,"types",t),At(this,"primaryType",n[0]);function f(p,u){u[p]&&Ot.throwArgumentError(`circular type reference to ${JSON.stringify(p)}`,"types",t),u[p]=!0,Object.keys(i[p]).forEach(c=>{e[c]&&(f(c,u),Object.keys(u).forEach(s=>{o[s][c]=!0}))}),delete u[p]}f(this.primaryType,{});for(const p in o){const u=Object.keys(o[p]);u.sort(),this._types[p]=Dc(p,t[p])+u.map(c=>Dc(c,t[c])).join("")}}getEncoder(t){let i=this._encoderCache[t];return i||(i=this._encoderCache[t]=this._getEncoder(t)),i}_getEncoder(t){{const o=Ds(t);if(o)return o}const i=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],n=this.getEncoder(o),f=parseInt(i[3]);return p=>{f>=0&&p.length!==f&&Ot.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",p);let u=p.map(n);return this._types[o]&&(u=u.map(Gt)),Gt(br(u))}}const e=this.types[t];if(e){const o=cd(this._types[t]);return n=>{const f=e.map(({name:p,type:u})=>{const c=this.getEncoder(u)(n[p]);return this._types[u]?Gt(c):c});return f.unshift(o),br(f)}}return Ot.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const i=this._types[t];return i||Ot.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),i}encodeData(t,i){return this.getEncoder(t)(i)}hashStruct(t,i){return Gt(this.encodeData(t,i))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,i,e){if(Ds(t))return e(t,i);const o=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){const f=o[1],p=parseInt(o[3]);return p>=0&&i.length!==p&&Ot.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",i),i.map(u=>this._visit(f,u,e))}const n=this.types[t];return n?n.reduce((f,{name:p,type:u})=>(f[p]=this._visit(u,i[p],e),f),{}):Ot.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,i){return this._visit(this.primaryType,t,i)}static from(t){return new cr(t)}static getPrimaryType(t){return cr.from(t).primaryType}static hashStruct(t,i,e){return cr.from(i).hashStruct(t,e)}static hashDomain(t){const i=[];for(const e in t){const o=jc[e];o||Ot.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(e)}`,"domain",t),i.push({name:e,type:o})}return i.sort((e,o)=>Us.indexOf(e.name)-Us.indexOf(o.name)),cr.hashStruct("EIP712Domain",{EIP712Domain:i},t)}static encode(t,i,e){return br(["0x1901",cr.hashDomain(t),cr.from(i).hash(e)])}static hash(t,i,e){return Gt(cr.encode(t,i,e))}static resolveNames(t,i,e,o){return my(this,void 0,void 0,function*(){t=ar(t);const n={};t.verifyingContract&&!Rt(t.verifyingContract,20)&&(n[t.verifyingContract]="0x");const f=cr.from(i);f.visit(e,(p,u)=>(p==="address"&&!Rt(u,20)&&(n[u]="0x"),u));for(const p in n)n[p]=yield o(p);return t.verifyingContract&&n[t.verifyingContract]&&(t.verifyingContract=n[t.verifyingContract]),e=f.visit(e,(p,u)=>p==="address"&&n[u]?n[u]:u),{domain:t,value:e}})}static getPayload(t,i,e){cr.hashDomain(t);const o={},n=[];Us.forEach(u=>{const c=t[u];c!=null&&(o[u]=_y[u](c),n.push({name:u,type:jc[u]}))});const f=cr.from(i),p=ar(i);return p.EIP712Domain?Ot.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",i):p.EIP712Domain=n,f.encode(e),{types:p,domain:o,primaryType:f.primaryType,message:f.visit(e,(u,c)=>{if(u.match(/^bytes(\d*)/))return dt(vt(c));if(u.match(/^u?int/))return ot.from(c).toString();switch(u){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Ot.throwArgumentError("invalid string","value",c),c}return Ot.throwArgumentError("unsupported type","type",u)})}}}const My="abstract-provider/5.7.0";var xy=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Ay=new xe(My);class Ey extends kb{static isForkEvent(t){return!!(t&&t._isForkEvent)}}class Cu{constructor(){Ay.checkAbstract(new.target,Cu),At(this,"_isProvider",!0)}getFeeData(){return xy(this,void 0,void 0,function*(){const{block:t,gasPrice:i}=yield Kt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(f=>null)});let e=null,o=null,n=null;return t&&t.baseFeePerGas&&(e=t.baseFeePerGas,n=ot.from("1500000000"),o=t.baseFeePerGas.mul(2).add(n)),{lastBaseFeePerGas:e,maxFeePerGas:o,maxPriorityFeePerGas:n,gasPrice:i}})}addListener(t,i){return this.on(t,i)}removeListener(t,i){return this.off(t,i)}static isProvider(t){return!!(t&&t._isProvider)}}const Sy="abstract-signer/5.7.0";var Cr=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Pr=new xe(Sy),ky=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Ry=[xe.errors.INSUFFICIENT_FUNDS,xe.errors.NONCE_EXPIRED,xe.errors.REPLACEMENT_UNDERPRICED];class Pu{constructor(){Pr.checkAbstract(new.target,Pu),At(this,"_isSigner",!0)}getBalance(t){return Cr(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),t)})}getTransactionCount(t){return Cr(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),t)})}estimateGas(t){return Cr(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const i=yield Kt(this.checkTransaction(t));return yield this.provider.estimateGas(i)})}call(t,i){return Cr(this,void 0,void 0,function*(){this._checkProvider("call");const e=yield Kt(this.checkTransaction(t));return yield this.provider.call(e,i)})}sendTransaction(t){return Cr(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const i=yield this.populateTransaction(t),e=yield this.signTransaction(i);return yield this.provider.sendTransaction(e)})}getChainId(){return Cr(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Cr(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Cr(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(t){return Cr(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(t)})}checkTransaction(t){for(const e in t)ky.indexOf(e)===-1&&Pr.throwArgumentError("invalid transaction key: "+e,"transaction",t);const i=ar(t);return i.from==null?i.from=this.getAddress():i.from=Promise.all([Promise.resolve(i.from),this.getAddress()]).then(e=>(e[0].toLowerCase()!==e[1].toLowerCase()&&Pr.throwArgumentError("from address mismatch","transaction",t),e[0])),i}populateTransaction(t){return Cr(this,void 0,void 0,function*(){const i=yield Kt(this.checkTransaction(t));i.to!=null&&(i.to=Promise.resolve(i.to).then(o=>Cr(this,void 0,void 0,function*(){if(o==null)return null;const n=yield this.resolveName(o);return n==null&&Pr.throwArgumentError("provided ENS name resolves to null","tx.to",o),n})),i.to.catch(o=>{}));const e=i.maxFeePerGas!=null||i.maxPriorityFeePerGas!=null;if(i.gasPrice!=null&&(i.type===2||e)?Pr.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",t):(i.type===0||i.type===1)&&e&&Pr.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",t),(i.type===2||i.type==null)&&i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)i.type=2;else if(i.type===0||i.type===1)i.gasPrice==null&&(i.gasPrice=this.getGasPrice());else{const o=yield this.getFeeData();if(i.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(i.type=2,i.gasPrice!=null){const n=i.gasPrice;delete i.gasPrice,i.maxFeePerGas=n,i.maxPriorityFeePerGas=n}else i.maxFeePerGas==null&&(i.maxFeePerGas=o.maxFeePerGas),i.maxPriorityFeePerGas==null&&(i.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(e&&Pr.throwError("network does not support EIP-1559",xe.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),i.gasPrice==null&&(i.gasPrice=o.gasPrice),i.type=0):Pr.throwError("failed to get consistent fee data",xe.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else i.type===2&&(i.maxFeePerGas==null&&(i.maxFeePerGas=o.maxFeePerGas),i.maxPriorityFeePerGas==null&&(i.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return i.nonce==null&&(i.nonce=this.getTransactionCount("pending")),i.gasLimit==null&&(i.gasLimit=this.estimateGas(i).catch(o=>{if(Ry.indexOf(o.code)>=0)throw o;return Pr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",xe.errors.UNPREDICTABLE_GAS_LIMIT,{error:o,tx:i})})),i.chainId==null?i.chainId=this.getChainId():i.chainId=Promise.all([Promise.resolve(i.chainId),this.getChainId()]).then(o=>(o[1]!==0&&o[0]!==o[1]&&Pr.throwArgumentError("chainId address mismatch","transaction",t),o[0])),yield Kt(i)})}_checkProvider(t){this.provider||Pr.throwError("missing provider",xe.errors.UNSUPPORTED_OPERATION,{operation:t||"_checkProvider"})}static isSigner(t){return!!(t&&t._isSigner)}}var Ca={},Ty={get exports(){return Ca},set exports(r){Ca=r}};(function(r){(function(t,i){function e(S,a){if(!S)throw new Error(a||"Assertion failed")}function o(S,a){S.super_=a;var w=function(){};w.prototype=a.prototype,S.prototype=new w,S.prototype.constructor=S}function n(S,a,w){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((a==="le"||a==="be")&&(w=a,a=10),this._init(S||0,a||10,w||"be"))}typeof t=="object"?t.exports=n:i.BN=n,n.BN=n,n.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=rd.Buffer}catch{}n.isBN=function(a){return a instanceof n?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===n.wordSize&&Array.isArray(a.words)},n.max=function(a,w){return a.cmp(w)>0?a:w},n.min=function(a,w){return a.cmp(w)<0?a:w},n.prototype._init=function(a,w,h){if(typeof a=="number")return this._initNumber(a,w,h);if(typeof a=="object")return this._initArray(a,w,h);w==="hex"&&(w=16),e(w===(w|0)&&w>=2&&w<=36),a=a.toString().replace(/\s+/g,"");var m=0;a[0]==="-"&&(m++,this.negative=1),m<a.length&&(w===16?this._parseHex(a,m,h):(this._parseBase(a,w,m),h==="le"&&this._initArray(this.toArray(),w,h)))},n.prototype._initNumber=function(a,w,h){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(e(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),h==="le"&&this._initArray(this.toArray(),w,h)},n.prototype._initArray=function(a,w,h){if(e(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g,_,T=0;if(h==="be")for(m=a.length-1,g=0;m>=0;m-=3)_=a[m]|a[m-1]<<8|a[m-2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,T+=24,T>=26&&(T-=26,g++);else if(h==="le")for(m=0,g=0;m<a.length;m+=3)_=a[m]|a[m+1]<<8|a[m+2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,T+=24,T>=26&&(T-=26,g++);return this._strip()};function p(S,a){var w=S.charCodeAt(a);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;e(!1,"Invalid character in "+S)}function u(S,a,w){var h=p(S,w);return w-1>=a&&(h|=p(S,w-1)<<4),h}n.prototype._parseHex=function(a,w,h){this.length=Math.ceil((a.length-w)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g=0,_=0,T;if(h==="be")for(m=a.length-1;m>=w;m-=2)T=u(a,w,m)<<g,this.words[_]|=T&67108863,g>=18?(g-=18,_+=1,this.words[_]|=T>>>26):g+=8;else{var k=a.length-w;for(m=k%2===0?w+1:w;m<a.length;m+=2)T=u(a,w,m)<<g,this.words[_]|=T&67108863,g>=18?(g-=18,_+=1,this.words[_]|=T>>>26):g+=8}this._strip()};function c(S,a,w,h){for(var m=0,g=0,_=Math.min(S.length,w),T=a;T<_;T++){var k=S.charCodeAt(T)-48;m*=h,k>=49?g=k-49+10:k>=17?g=k-17+10:g=k,e(k>=0&&g<h,"Invalid character"),m+=g}return m}n.prototype._parseBase=function(a,w,h){this.words=[0],this.length=1;for(var m=0,g=1;g<=67108863;g*=w)m++;m--,g=g/w|0;for(var _=a.length-h,T=_%m,k=Math.min(_,_-T)+h,M=0,B=h;B<k;B+=m)M=c(a,B,B+m,w),this.imuln(g),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M);if(T!==0){var Y=1;for(M=c(a,B,a.length,w),B=0;B<T;B++)Y*=w;this.imuln(Y),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M)}this._strip()},n.prototype.copy=function(a){a.words=new Array(this.length);for(var w=0;w<this.length;w++)a.words[w]=this.words[w];a.length=this.length,a.negative=this.negative,a.red=this.red};function s(S,a){S.words=a.words,S.length=a.length,S.negative=a.negative,S.red=a.red}if(n.prototype._move=function(a){s(a,this)},n.prototype.clone=function(){var a=new n(null);return this.copy(a),a},n.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch{n.prototype.inspect=l}else n.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],b=[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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(a,w){a=a||10,w=w|0||1;var h;if(a===16||a==="hex"){h="";for(var m=0,g=0,_=0;_<this.length;_++){var T=this.words[_],k=((T<<m|g)&16777215).toString(16);g=T>>>24-m&16777215,m+=2,m>=26&&(m-=26,_--),g!==0||_!==this.length-1?h=d[6-k.length]+k+h:h=k+h}for(g!==0&&(h=g.toString(16)+h);h.length%w!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(a===(a|0)&&a>=2&&a<=36){var M=b[a],B=v[a];h="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var C=Y.modrn(B).toString(a);Y=Y.idivn(B),Y.isZero()?h=C+h:h=d[M-C.length]+C+h}for(this.isZero()&&(h="0"+h);h.length%w!==0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}e(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&e(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},n.prototype.toJSON=function(){return this.toString(16,2)},f&&(n.prototype.toBuffer=function(a,w){return this.toArrayLike(f,a,w)}),n.prototype.toArray=function(a,w){return this.toArrayLike(Array,a,w)};var y=function(a,w){return a.allocUnsafe?a.allocUnsafe(w):new a(w)};n.prototype.toArrayLike=function(a,w,h){this._strip();var m=this.byteLength(),g=h||Math.max(1,m);e(m<=g,"byte array longer than desired length"),e(g>0,"Requested array length <= 0");var _=y(a,g),T=w==="le"?"LE":"BE";return this["_toArrayLike"+T](_,m),_},n.prototype._toArrayLikeLE=function(a,w){for(var h=0,m=0,g=0,_=0;g<this.length;g++){var T=this.words[g]<<_|m;a[h++]=T&255,h<a.length&&(a[h++]=T>>8&255),h<a.length&&(a[h++]=T>>16&255),_===6?(h<a.length&&(a[h++]=T>>24&255),m=0,_=0):(m=T>>>24,_+=2)}if(h<a.length)for(a[h++]=m;h<a.length;)a[h++]=0},n.prototype._toArrayLikeBE=function(a,w){for(var h=a.length-1,m=0,g=0,_=0;g<this.length;g++){var T=this.words[g]<<_|m;a[h--]=T&255,h>=0&&(a[h--]=T>>8&255),h>=0&&(a[h--]=T>>16&255),_===6?(h>=0&&(a[h--]=T>>24&255),m=0,_=0):(m=T>>>24,_+=2)}if(h>=0)for(a[h--]=m;h>=0;)a[h--]=0},Math.clz32?n.prototype._countBits=function(a){return 32-Math.clz32(a)}:n.prototype._countBits=function(a){var w=a,h=0;return w>=4096&&(h+=13,w>>>=13),w>=64&&(h+=7,w>>>=7),w>=8&&(h+=4,w>>>=4),w>=2&&(h+=2,w>>>=2),h+w},n.prototype._zeroBits=function(a){if(a===0)return 26;var w=a,h=0;return w&8191||(h+=13,w>>>=13),w&127||(h+=7,w>>>=7),w&15||(h+=4,w>>>=4),w&3||(h+=2,w>>>=2),w&1||h++,h},n.prototype.bitLength=function(){var a=this.words[this.length-1],w=this._countBits(a);return(this.length-1)*26+w};function x(S){for(var a=new Array(S.bitLength()),w=0;w<a.length;w++){var h=w/26|0,m=w%26;a[w]=S.words[h]>>>m&1}return a}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,w=0;w<this.length;w++){var h=this._zeroBits(this.words[w]);if(a+=h,h!==26)break}return a},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(a){return this.negative!==0?this.abs().inotn(a).iaddn(1):this.clone()},n.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var w=0;w<a.length;w++)this.words[w]=this.words[w]|a.words[w];return this._strip()},n.prototype.ior=function(a){return e((this.negative|a.negative)===0),this.iuor(a)},n.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},n.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},n.prototype.iuand=function(a){var w;this.length>a.length?w=a:w=this;for(var h=0;h<w.length;h++)this.words[h]=this.words[h]&a.words[h];return this.length=w.length,this._strip()},n.prototype.iand=function(a){return e((this.negative|a.negative)===0),this.iuand(a)},n.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},n.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},n.prototype.iuxor=function(a){var w,h;this.length>a.length?(w=this,h=a):(w=a,h=this);for(var m=0;m<h.length;m++)this.words[m]=w.words[m]^h.words[m];if(this!==w)for(;m<w.length;m++)this.words[m]=w.words[m];return this.length=w.length,this._strip()},n.prototype.ixor=function(a){return e((this.negative|a.negative)===0),this.iuxor(a)},n.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},n.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},n.prototype.inotn=function(a){e(typeof a=="number"&&a>=0);var w=Math.ceil(a/26)|0,h=a%26;this._expand(w),h>0&&w--;for(var m=0;m<w;m++)this.words[m]=~this.words[m]&67108863;return h>0&&(this.words[m]=~this.words[m]&67108863>>26-h),this._strip()},n.prototype.notn=function(a){return this.clone().inotn(a)},n.prototype.setn=function(a,w){e(typeof a=="number"&&a>=0);var h=a/26|0,m=a%26;return this._expand(h+1),w?this.words[h]=this.words[h]|1<<m:this.words[h]=this.words[h]&~(1<<m),this._strip()},n.prototype.iadd=function(a){var w;if(this.negative!==0&&a.negative===0)return this.negative=0,w=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,w=this.isub(a),a.negative=1,w._normSign();var h,m;this.length>a.length?(h=this,m=a):(h=a,m=this);for(var g=0,_=0;_<m.length;_++)w=(h.words[_]|0)+(m.words[_]|0)+g,this.words[_]=w&67108863,g=w>>>26;for(;g!==0&&_<h.length;_++)w=(h.words[_]|0)+g,this.words[_]=w&67108863,g=w>>>26;if(this.length=h.length,g!==0)this.words[this.length]=g,this.length++;else if(h!==this)for(;_<h.length;_++)this.words[_]=h.words[_];return this},n.prototype.add=function(a){var w;return a.negative!==0&&this.negative===0?(a.negative=0,w=this.sub(a),a.negative^=1,w):a.negative===0&&this.negative!==0?(this.negative=0,w=a.sub(this),this.negative=1,w):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},n.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var w=this.iadd(a);return a.negative=1,w._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var h=this.cmp(a);if(h===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,g;h>0?(m=this,g=a):(m=a,g=this);for(var _=0,T=0;T<g.length;T++)w=(m.words[T]|0)-(g.words[T]|0)+_,_=w>>26,this.words[T]=w&67108863;for(;_!==0&&T<m.length;T++)w=(m.words[T]|0)+_,_=w>>26,this.words[T]=w&67108863;if(_===0&&T<m.length&&m!==this)for(;T<m.length;T++)this.words[T]=m.words[T];return this.length=Math.max(this.length,T),m!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(a){return this.clone().isub(a)};function E(S,a,w){w.negative=a.negative^S.negative;var h=S.length+a.length|0;w.length=h,h=h-1|0;var m=S.words[0]|0,g=a.words[0]|0,_=m*g,T=_&67108863,k=_/67108864|0;w.words[0]=T;for(var M=1;M<h;M++){for(var B=k>>>26,Y=k&67108863,C=Math.min(M,a.length-1),K=Math.max(0,M-S.length+1);K<=C;K++){var W=M-K|0;m=S.words[W]|0,g=a.words[K]|0,_=m*g+Y,B+=_/67108864|0,Y=_&67108863}w.words[M]=Y|0,k=B|0}return k!==0?w.words[M]=k|0:w.length--,w._strip()}var R=function(a,w,h){var m=a.words,g=w.words,_=h.words,T=0,k,M,B,Y=m[0]|0,C=Y&8191,K=Y>>>13,W=m[1]|0,U=W&8191,q=W>>>13,j=m[2]|0,D=j&8191,F=j>>>13,$=m[3]|0,V=$&8191,Z=$>>>13,ee=m[4]|0,re=ee&8191,ue=ee>>>13,fe=m[5]|0,oe=fe&8191,ae=fe>>>13,ie=m[6]|0,te=ie&8191,le=ie>>>13,ge=m[7]|0,he=ge&8191,ye=ge>>>13,Ie=m[8]|0,pe=Ie&8191,Oe=Ie>>>13,Ge=m[9]|0,we=Ge&8191,Le=Ge>>>13,Ve=g[0]|0,ve=Ve&8191,Ne=Ve>>>13,se=g[1]|0,de=se&8191,_e=se>>>13,Ue=g[2]|0,me=Ue&8191,Be=Ue>>>13,Je=g[3]|0,be=Je&8191,He=Je>>>13,tt=g[4]|0,Re=tt&8191,ze=tt>>>13,Ze=g[5]|0,Ae=Ze&8191,De=Ze>>>13,rt=g[6]|0,Ee=rt&8191,Fe=rt>>>13,Qe=g[7]|0,Se=Qe&8191,Ke=Qe>>>13,Xe=g[8]|0,Me=Xe&8191,We=Xe>>>13,et=g[9]|0,ke=et&8191,qe=et>>>13;h.negative=a.negative^w.negative,h.length=19,k=Math.imul(C,ve),M=Math.imul(C,Ne),M=M+Math.imul(K,ve)|0,B=Math.imul(K,Ne);var Q=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Q>>>26)|0,Q&=67108863,k=Math.imul(U,ve),M=Math.imul(U,Ne),M=M+Math.imul(q,ve)|0,B=Math.imul(q,Ne),k=k+Math.imul(C,de)|0,M=M+Math.imul(C,_e)|0,M=M+Math.imul(K,de)|0,B=B+Math.imul(K,_e)|0;var X=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(X>>>26)|0,X&=67108863,k=Math.imul(D,ve),M=Math.imul(D,Ne),M=M+Math.imul(F,ve)|0,B=Math.imul(F,Ne),k=k+Math.imul(U,de)|0,M=M+Math.imul(U,_e)|0,M=M+Math.imul(q,de)|0,B=B+Math.imul(q,_e)|0,k=k+Math.imul(C,me)|0,M=M+Math.imul(C,Be)|0,M=M+Math.imul(K,me)|0,B=B+Math.imul(K,Be)|0;var ne=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ne>>>26)|0,ne&=67108863,k=Math.imul(V,ve),M=Math.imul(V,Ne),M=M+Math.imul(Z,ve)|0,B=Math.imul(Z,Ne),k=k+Math.imul(D,de)|0,M=M+Math.imul(D,_e)|0,M=M+Math.imul(F,de)|0,B=B+Math.imul(F,_e)|0,k=k+Math.imul(U,me)|0,M=M+Math.imul(U,Be)|0,M=M+Math.imul(q,me)|0,B=B+Math.imul(q,Be)|0,k=k+Math.imul(C,be)|0,M=M+Math.imul(C,He)|0,M=M+Math.imul(K,be)|0,B=B+Math.imul(K,He)|0;var ce=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ce>>>26)|0,ce&=67108863,k=Math.imul(re,ve),M=Math.imul(re,Ne),M=M+Math.imul(ue,ve)|0,B=Math.imul(ue,Ne),k=k+Math.imul(V,de)|0,M=M+Math.imul(V,_e)|0,M=M+Math.imul(Z,de)|0,B=B+Math.imul(Z,_e)|0,k=k+Math.imul(D,me)|0,M=M+Math.imul(D,Be)|0,M=M+Math.imul(F,me)|0,B=B+Math.imul(F,Be)|0,k=k+Math.imul(U,be)|0,M=M+Math.imul(U,He)|0,M=M+Math.imul(q,be)|0,B=B+Math.imul(q,He)|0,k=k+Math.imul(C,Re)|0,M=M+Math.imul(C,ze)|0,M=M+Math.imul(K,Re)|0,B=B+Math.imul(K,ze)|0;var Ce=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,k=Math.imul(oe,ve),M=Math.imul(oe,Ne),M=M+Math.imul(ae,ve)|0,B=Math.imul(ae,Ne),k=k+Math.imul(re,de)|0,M=M+Math.imul(re,_e)|0,M=M+Math.imul(ue,de)|0,B=B+Math.imul(ue,_e)|0,k=k+Math.imul(V,me)|0,M=M+Math.imul(V,Be)|0,M=M+Math.imul(Z,me)|0,B=B+Math.imul(Z,Be)|0,k=k+Math.imul(D,be)|0,M=M+Math.imul(D,He)|0,M=M+Math.imul(F,be)|0,B=B+Math.imul(F,He)|0,k=k+Math.imul(U,Re)|0,M=M+Math.imul(U,ze)|0,M=M+Math.imul(q,Re)|0,B=B+Math.imul(q,ze)|0,k=k+Math.imul(C,Ae)|0,M=M+Math.imul(C,De)|0,M=M+Math.imul(K,Ae)|0,B=B+Math.imul(K,De)|0;var Pe=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,k=Math.imul(te,ve),M=Math.imul(te,Ne),M=M+Math.imul(le,ve)|0,B=Math.imul(le,Ne),k=k+Math.imul(oe,de)|0,M=M+Math.imul(oe,_e)|0,M=M+Math.imul(ae,de)|0,B=B+Math.imul(ae,_e)|0,k=k+Math.imul(re,me)|0,M=M+Math.imul(re,Be)|0,M=M+Math.imul(ue,me)|0,B=B+Math.imul(ue,Be)|0,k=k+Math.imul(V,be)|0,M=M+Math.imul(V,He)|0,M=M+Math.imul(Z,be)|0,B=B+Math.imul(Z,He)|0,k=k+Math.imul(D,Re)|0,M=M+Math.imul(D,ze)|0,M=M+Math.imul(F,Re)|0,B=B+Math.imul(F,ze)|0,k=k+Math.imul(U,Ae)|0,M=M+Math.imul(U,De)|0,M=M+Math.imul(q,Ae)|0,B=B+Math.imul(q,De)|0,k=k+Math.imul(C,Ee)|0,M=M+Math.imul(C,Fe)|0,M=M+Math.imul(K,Ee)|0,B=B+Math.imul(K,Fe)|0;var Ye=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,k=Math.imul(he,ve),M=Math.imul(he,Ne),M=M+Math.imul(ye,ve)|0,B=Math.imul(ye,Ne),k=k+Math.imul(te,de)|0,M=M+Math.imul(te,_e)|0,M=M+Math.imul(le,de)|0,B=B+Math.imul(le,_e)|0,k=k+Math.imul(oe,me)|0,M=M+Math.imul(oe,Be)|0,M=M+Math.imul(ae,me)|0,B=B+Math.imul(ae,Be)|0,k=k+Math.imul(re,be)|0,M=M+Math.imul(re,He)|0,M=M+Math.imul(ue,be)|0,B=B+Math.imul(ue,He)|0,k=k+Math.imul(V,Re)|0,M=M+Math.imul(V,ze)|0,M=M+Math.imul(Z,Re)|0,B=B+Math.imul(Z,ze)|0,k=k+Math.imul(D,Ae)|0,M=M+Math.imul(D,De)|0,M=M+Math.imul(F,Ae)|0,B=B+Math.imul(F,De)|0,k=k+Math.imul(U,Ee)|0,M=M+Math.imul(U,Fe)|0,M=M+Math.imul(q,Ee)|0,B=B+Math.imul(q,Fe)|0,k=k+Math.imul(C,Se)|0,M=M+Math.imul(C,Ke)|0,M=M+Math.imul(K,Se)|0,B=B+Math.imul(K,Ke)|0;var $e=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+($e>>>26)|0,$e&=67108863,k=Math.imul(pe,ve),M=Math.imul(pe,Ne),M=M+Math.imul(Oe,ve)|0,B=Math.imul(Oe,Ne),k=k+Math.imul(he,de)|0,M=M+Math.imul(he,_e)|0,M=M+Math.imul(ye,de)|0,B=B+Math.imul(ye,_e)|0,k=k+Math.imul(te,me)|0,M=M+Math.imul(te,Be)|0,M=M+Math.imul(le,me)|0,B=B+Math.imul(le,Be)|0,k=k+Math.imul(oe,be)|0,M=M+Math.imul(oe,He)|0,M=M+Math.imul(ae,be)|0,B=B+Math.imul(ae,He)|0,k=k+Math.imul(re,Re)|0,M=M+Math.imul(re,ze)|0,M=M+Math.imul(ue,Re)|0,B=B+Math.imul(ue,ze)|0,k=k+Math.imul(V,Ae)|0,M=M+Math.imul(V,De)|0,M=M+Math.imul(Z,Ae)|0,B=B+Math.imul(Z,De)|0,k=k+Math.imul(D,Ee)|0,M=M+Math.imul(D,Fe)|0,M=M+Math.imul(F,Ee)|0,B=B+Math.imul(F,Fe)|0,k=k+Math.imul(U,Se)|0,M=M+Math.imul(U,Ke)|0,M=M+Math.imul(q,Se)|0,B=B+Math.imul(q,Ke)|0,k=k+Math.imul(C,Me)|0,M=M+Math.imul(C,We)|0,M=M+Math.imul(K,Me)|0,B=B+Math.imul(K,We)|0;var nt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(nt>>>26)|0,nt&=67108863,k=Math.imul(we,ve),M=Math.imul(we,Ne),M=M+Math.imul(Le,ve)|0,B=Math.imul(Le,Ne),k=k+Math.imul(pe,de)|0,M=M+Math.imul(pe,_e)|0,M=M+Math.imul(Oe,de)|0,B=B+Math.imul(Oe,_e)|0,k=k+Math.imul(he,me)|0,M=M+Math.imul(he,Be)|0,M=M+Math.imul(ye,me)|0,B=B+Math.imul(ye,Be)|0,k=k+Math.imul(te,be)|0,M=M+Math.imul(te,He)|0,M=M+Math.imul(le,be)|0,B=B+Math.imul(le,He)|0,k=k+Math.imul(oe,Re)|0,M=M+Math.imul(oe,ze)|0,M=M+Math.imul(ae,Re)|0,B=B+Math.imul(ae,ze)|0,k=k+Math.imul(re,Ae)|0,M=M+Math.imul(re,De)|0,M=M+Math.imul(ue,Ae)|0,B=B+Math.imul(ue,De)|0,k=k+Math.imul(V,Ee)|0,M=M+Math.imul(V,Fe)|0,M=M+Math.imul(Z,Ee)|0,B=B+Math.imul(Z,Fe)|0,k=k+Math.imul(D,Se)|0,M=M+Math.imul(D,Ke)|0,M=M+Math.imul(F,Se)|0,B=B+Math.imul(F,Ke)|0,k=k+Math.imul(U,Me)|0,M=M+Math.imul(U,We)|0,M=M+Math.imul(q,Me)|0,B=B+Math.imul(q,We)|0,k=k+Math.imul(C,ke)|0,M=M+Math.imul(C,qe)|0,M=M+Math.imul(K,ke)|0,B=B+Math.imul(K,qe)|0;var je=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(je>>>26)|0,je&=67108863,k=Math.imul(we,de),M=Math.imul(we,_e),M=M+Math.imul(Le,de)|0,B=Math.imul(Le,_e),k=k+Math.imul(pe,me)|0,M=M+Math.imul(pe,Be)|0,M=M+Math.imul(Oe,me)|0,B=B+Math.imul(Oe,Be)|0,k=k+Math.imul(he,be)|0,M=M+Math.imul(he,He)|0,M=M+Math.imul(ye,be)|0,B=B+Math.imul(ye,He)|0,k=k+Math.imul(te,Re)|0,M=M+Math.imul(te,ze)|0,M=M+Math.imul(le,Re)|0,B=B+Math.imul(le,ze)|0,k=k+Math.imul(oe,Ae)|0,M=M+Math.imul(oe,De)|0,M=M+Math.imul(ae,Ae)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(re,Ee)|0,M=M+Math.imul(re,Fe)|0,M=M+Math.imul(ue,Ee)|0,B=B+Math.imul(ue,Fe)|0,k=k+Math.imul(V,Se)|0,M=M+Math.imul(V,Ke)|0,M=M+Math.imul(Z,Se)|0,B=B+Math.imul(Z,Ke)|0,k=k+Math.imul(D,Me)|0,M=M+Math.imul(D,We)|0,M=M+Math.imul(F,Me)|0,B=B+Math.imul(F,We)|0,k=k+Math.imul(U,ke)|0,M=M+Math.imul(U,qe)|0,M=M+Math.imul(q,ke)|0,B=B+Math.imul(q,qe)|0;var Te=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(Te>>>26)|0,Te&=67108863,k=Math.imul(we,me),M=Math.imul(we,Be),M=M+Math.imul(Le,me)|0,B=Math.imul(Le,Be),k=k+Math.imul(pe,be)|0,M=M+Math.imul(pe,He)|0,M=M+Math.imul(Oe,be)|0,B=B+Math.imul(Oe,He)|0,k=k+Math.imul(he,Re)|0,M=M+Math.imul(he,ze)|0,M=M+Math.imul(ye,Re)|0,B=B+Math.imul(ye,ze)|0,k=k+Math.imul(te,Ae)|0,M=M+Math.imul(te,De)|0,M=M+Math.imul(le,Ae)|0,B=B+Math.imul(le,De)|0,k=k+Math.imul(oe,Ee)|0,M=M+Math.imul(oe,Fe)|0,M=M+Math.imul(ae,Ee)|0,B=B+Math.imul(ae,Fe)|0,k=k+Math.imul(re,Se)|0,M=M+Math.imul(re,Ke)|0,M=M+Math.imul(ue,Se)|0,B=B+Math.imul(ue,Ke)|0,k=k+Math.imul(V,Me)|0,M=M+Math.imul(V,We)|0,M=M+Math.imul(Z,Me)|0,B=B+Math.imul(Z,We)|0,k=k+Math.imul(D,ke)|0,M=M+Math.imul(D,qe)|0,M=M+Math.imul(F,ke)|0,B=B+Math.imul(F,qe)|0;var st=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(st>>>26)|0,st&=67108863,k=Math.imul(we,be),M=Math.imul(we,He),M=M+Math.imul(Le,be)|0,B=Math.imul(Le,He),k=k+Math.imul(pe,Re)|0,M=M+Math.imul(pe,ze)|0,M=M+Math.imul(Oe,Re)|0,B=B+Math.imul(Oe,ze)|0,k=k+Math.imul(he,Ae)|0,M=M+Math.imul(he,De)|0,M=M+Math.imul(ye,Ae)|0,B=B+Math.imul(ye,De)|0,k=k+Math.imul(te,Ee)|0,M=M+Math.imul(te,Fe)|0,M=M+Math.imul(le,Ee)|0,B=B+Math.imul(le,Fe)|0,k=k+Math.imul(oe,Se)|0,M=M+Math.imul(oe,Ke)|0,M=M+Math.imul(ae,Se)|0,B=B+Math.imul(ae,Ke)|0,k=k+Math.imul(re,Me)|0,M=M+Math.imul(re,We)|0,M=M+Math.imul(ue,Me)|0,B=B+Math.imul(ue,We)|0,k=k+Math.imul(V,ke)|0,M=M+Math.imul(V,qe)|0,M=M+Math.imul(Z,ke)|0,B=B+Math.imul(Z,qe)|0;var ft=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ft>>>26)|0,ft&=67108863,k=Math.imul(we,Re),M=Math.imul(we,ze),M=M+Math.imul(Le,Re)|0,B=Math.imul(Le,ze),k=k+Math.imul(pe,Ae)|0,M=M+Math.imul(pe,De)|0,M=M+Math.imul(Oe,Ae)|0,B=B+Math.imul(Oe,De)|0,k=k+Math.imul(he,Ee)|0,M=M+Math.imul(he,Fe)|0,M=M+Math.imul(ye,Ee)|0,B=B+Math.imul(ye,Fe)|0,k=k+Math.imul(te,Se)|0,M=M+Math.imul(te,Ke)|0,M=M+Math.imul(le,Se)|0,B=B+Math.imul(le,Ke)|0,k=k+Math.imul(oe,Me)|0,M=M+Math.imul(oe,We)|0,M=M+Math.imul(ae,Me)|0,B=B+Math.imul(ae,We)|0,k=k+Math.imul(re,ke)|0,M=M+Math.imul(re,qe)|0,M=M+Math.imul(ue,ke)|0,B=B+Math.imul(ue,qe)|0;var gt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(gt>>>26)|0,gt&=67108863,k=Math.imul(we,Ae),M=Math.imul(we,De),M=M+Math.imul(Le,Ae)|0,B=Math.imul(Le,De),k=k+Math.imul(pe,Ee)|0,M=M+Math.imul(pe,Fe)|0,M=M+Math.imul(Oe,Ee)|0,B=B+Math.imul(Oe,Fe)|0,k=k+Math.imul(he,Se)|0,M=M+Math.imul(he,Ke)|0,M=M+Math.imul(ye,Se)|0,B=B+Math.imul(ye,Ke)|0,k=k+Math.imul(te,Me)|0,M=M+Math.imul(te,We)|0,M=M+Math.imul(le,Me)|0,B=B+Math.imul(le,We)|0,k=k+Math.imul(oe,ke)|0,M=M+Math.imul(oe,qe)|0,M=M+Math.imul(ae,ke)|0,B=B+Math.imul(ae,qe)|0;var ht=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(ht>>>26)|0,ht&=67108863,k=Math.imul(we,Ee),M=Math.imul(we,Fe),M=M+Math.imul(Le,Ee)|0,B=Math.imul(Le,Fe),k=k+Math.imul(pe,Se)|0,M=M+Math.imul(pe,Ke)|0,M=M+Math.imul(Oe,Se)|0,B=B+Math.imul(Oe,Ke)|0,k=k+Math.imul(he,Me)|0,M=M+Math.imul(he,We)|0,M=M+Math.imul(ye,Me)|0,B=B+Math.imul(ye,We)|0,k=k+Math.imul(te,ke)|0,M=M+Math.imul(te,qe)|0,M=M+Math.imul(le,ke)|0,B=B+Math.imul(le,qe)|0;var yt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(yt>>>26)|0,yt&=67108863,k=Math.imul(we,Se),M=Math.imul(we,Ke),M=M+Math.imul(Le,Se)|0,B=Math.imul(Le,Ke),k=k+Math.imul(pe,Me)|0,M=M+Math.imul(pe,We)|0,M=M+Math.imul(Oe,Me)|0,B=B+Math.imul(Oe,We)|0,k=k+Math.imul(he,ke)|0,M=M+Math.imul(he,qe)|0,M=M+Math.imul(ye,ke)|0,B=B+Math.imul(ye,qe)|0;var at=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(at>>>26)|0,at&=67108863,k=Math.imul(we,Me),M=Math.imul(we,We),M=M+Math.imul(Le,Me)|0,B=Math.imul(Le,We),k=k+Math.imul(pe,ke)|0,M=M+Math.imul(pe,qe)|0,M=M+Math.imul(Oe,ke)|0,B=B+Math.imul(Oe,qe)|0;var wt=(T+k|0)+((M&8191)<<13)|0;T=(B+(M>>>13)|0)+(wt>>>26)|0,wt&=67108863,k=Math.imul(we,ke),M=Math.imul(we,qe),M=M+Math.imul(Le,ke)|0,B=Math.imul(Le,qe);var ut=(T+k|0)+((M&8191)<<13)|0;return T=(B+(M>>>13)|0)+(ut>>>26)|0,ut&=67108863,_[0]=Q,_[1]=X,_[2]=ne,_[3]=ce,_[4]=Ce,_[5]=Pe,_[6]=Ye,_[7]=$e,_[8]=nt,_[9]=je,_[10]=Te,_[11]=st,_[12]=ft,_[13]=gt,_[14]=ht,_[15]=yt,_[16]=at,_[17]=wt,_[18]=ut,T!==0&&(_[19]=T,h.length++),h};Math.imul||(R=E);function I(S,a,w){w.negative=a.negative^S.negative,w.length=S.length+a.length;for(var h=0,m=0,g=0;g<w.length-1;g++){var _=m;m=0;for(var T=h&67108863,k=Math.min(g,a.length-1),M=Math.max(0,g-S.length+1);M<=k;M++){var B=g-M,Y=S.words[B]|0,C=a.words[M]|0,K=Y*C,W=K&67108863;_=_+(K/67108864|0)|0,W=W+T|0,T=W&67108863,_=_+(W>>>26)|0,m+=_>>>26,_&=67108863}w.words[g]=T,h=_,_=m}return h!==0?w.words[g]=h:w.length--,w._strip()}function O(S,a,w){return I(S,a,w)}n.prototype.mulTo=function(a,w){var h,m=this.length+a.length;return this.length===10&&a.length===10?h=R(this,a,w):m<63?h=E(this,a,w):m<1024?h=I(this,a,w):h=O(this,a,w),h},n.prototype.mul=function(a){var w=new n(null);return w.words=new Array(this.length+a.length),this.mulTo(a,w)},n.prototype.mulf=function(a){var w=new n(null);return w.words=new Array(this.length+a.length),O(this,a,w)},n.prototype.imul=function(a){return this.clone().mulTo(a,this)},n.prototype.imuln=function(a){var w=a<0;w&&(a=-a),e(typeof a=="number"),e(a<67108864);for(var h=0,m=0;m<this.length;m++){var g=(this.words[m]|0)*a,_=(g&67108863)+(h&67108863);h>>=26,h+=g/67108864|0,h+=_>>>26,this.words[m]=_&67108863}return h!==0&&(this.words[m]=h,this.length++),w?this.ineg():this},n.prototype.muln=function(a){return this.clone().imuln(a)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(a){var w=x(a);if(w.length===0)return new n(1);for(var h=this,m=0;m<w.length&&w[m]===0;m++,h=h.sqr());if(++m<w.length)for(var g=h.sqr();m<w.length;m++,g=g.sqr())w[m]!==0&&(h=h.mul(g));return h},n.prototype.iushln=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26,m=67108863>>>26-w<<26-w,g;if(w!==0){var _=0;for(g=0;g<this.length;g++){var T=this.words[g]&m,k=(this.words[g]|0)-T<<w;this.words[g]=k|_,_=T>>>26-w}_&&(this.words[g]=_,this.length++)}if(h!==0){for(g=this.length-1;g>=0;g--)this.words[g+h]=this.words[g];for(g=0;g<h;g++)this.words[g]=0;this.length+=h}return this._strip()},n.prototype.ishln=function(a){return e(this.negative===0),this.iushln(a)},n.prototype.iushrn=function(a,w,h){e(typeof a=="number"&&a>=0);var m;w?m=(w-w%26)/26:m=0;var g=a%26,_=Math.min((a-g)/26,this.length),T=67108863^67108863>>>g<<g,k=h;if(m-=_,m=Math.max(0,m),k){for(var M=0;M<_;M++)k.words[M]=this.words[M];k.length=_}if(_!==0)if(this.length>_)for(this.length-=_,M=0;M<this.length;M++)this.words[M]=this.words[M+_];else this.words[0]=0,this.length=1;var B=0;for(M=this.length-1;M>=0&&(B!==0||M>=m);M--){var Y=this.words[M]|0;this.words[M]=B<<26-g|Y>>>g,B=Y&T}return k&&B!==0&&(k.words[k.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(a,w,h){return e(this.negative===0),this.iushrn(a,w,h)},n.prototype.shln=function(a){return this.clone().ishln(a)},n.prototype.ushln=function(a){return this.clone().iushln(a)},n.prototype.shrn=function(a){return this.clone().ishrn(a)},n.prototype.ushrn=function(a){return this.clone().iushrn(a)},n.prototype.testn=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26,m=1<<w;if(this.length<=h)return!1;var g=this.words[h];return!!(g&m)},n.prototype.imaskn=function(a){e(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26;if(e(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(w!==0&&h++,this.length=Math.min(h,this.length),w!==0){var m=67108863^67108863>>>w<<w;this.words[this.length-1]&=m}return this._strip()},n.prototype.maskn=function(a){return this.clone().imaskn(a)},n.prototype.iaddn=function(a){return e(typeof a=="number"),e(a<67108864),a<0?this.isubn(-a):this.negative!==0?this.length===1&&(this.words[0]|0)<=a?(this.words[0]=a-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},n.prototype._iaddn=function(a){this.words[0]+=a;for(var w=0;w<this.length&&this.words[w]>=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},n.prototype.isubn=function(a){if(e(typeof a=="number"),e(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w<this.length&&this.words[w]<0;w++)this.words[w]+=67108864,this.words[w+1]-=1;return this._strip()},n.prototype.addn=function(a){return this.clone().iaddn(a)},n.prototype.subn=function(a){return this.clone().isubn(a)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(a,w,h){var m=a.length+h,g;this._expand(m);var _,T=0;for(g=0;g<a.length;g++){_=(this.words[g+h]|0)+T;var k=(a.words[g]|0)*w;_-=k&67108863,T=(_>>26)-(k/67108864|0),this.words[g+h]=_&67108863}for(;g<this.length-h;g++)_=(this.words[g+h]|0)+T,T=_>>26,this.words[g+h]=_&67108863;if(T===0)return this._strip();for(e(T===-1),T=0,g=0;g<this.length;g++)_=-(this.words[g]|0)+T,T=_>>26,this.words[g]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(a,w){var h=this.length-a.length,m=this.clone(),g=a,_=g.words[g.length-1]|0,T=this._countBits(_);h=26-T,h!==0&&(g=g.ushln(h),m.iushln(h),_=g.words[g.length-1]|0);var k=m.length-g.length,M;if(w!=="mod"){M=new n(null),M.length=k+1,M.words=new Array(M.length);for(var B=0;B<M.length;B++)M.words[B]=0}var Y=m.clone()._ishlnsubmul(g,1,k);Y.negative===0&&(m=Y,M&&(M.words[k]=1));for(var C=k-1;C>=0;C--){var K=(m.words[g.length+C]|0)*67108864+(m.words[g.length+C-1]|0);for(K=Math.min(K/_|0,67108863),m._ishlnsubmul(g,K,C);m.negative!==0;)K--,m.negative=0,m._ishlnsubmul(g,1,C),m.isZero()||(m.negative^=1);M&&(M.words[C]=K)}return M&&M._strip(),m._strip(),w!=="div"&&h!==0&&m.iushrn(h),{div:M||null,mod:m}},n.prototype.divmod=function(a,w,h){if(e(!a.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var m,g,_;return this.negative!==0&&a.negative===0?(_=this.neg().divmod(a,w),w!=="mod"&&(m=_.div.neg()),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.iadd(a)),{div:m,mod:g}):this.negative===0&&a.negative!==0?(_=this.divmod(a.neg(),w),w!=="mod"&&(m=_.div.neg()),{div:m,mod:_.mod}):this.negative&a.negative?(_=this.neg().divmod(a.neg(),w),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.isub(a)),{div:_.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:new n(0),mod:this}:a.length===1?w==="div"?{div:this.divn(a.words[0]),mod:null}:w==="mod"?{div:null,mod:new n(this.modrn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new n(this.modrn(a.words[0]))}:this._wordDiv(a,w)},n.prototype.div=function(a){return this.divmod(a,"div",!1).div},n.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},n.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},n.prototype.divRound=function(a){var w=this.divmod(a);if(w.mod.isZero())return w.div;var h=w.div.negative!==0?w.mod.isub(a):w.mod,m=a.ushrn(1),g=a.andln(1),_=h.cmp(m);return _<0||g===1&&_===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},n.prototype.modrn=function(a){var w=a<0;w&&(a=-a),e(a<=67108863);for(var h=(1<<26)%a,m=0,g=this.length-1;g>=0;g--)m=(h*m+(this.words[g]|0))%a;return w?-m:m},n.prototype.modn=function(a){return this.modrn(a)},n.prototype.idivn=function(a){var w=a<0;w&&(a=-a),e(a<=67108863);for(var h=0,m=this.length-1;m>=0;m--){var g=(this.words[m]|0)+h*67108864;this.words[m]=g/a|0,h=g%a}return this._strip(),w?this.ineg():this},n.prototype.divn=function(a){return this.clone().idivn(a)},n.prototype.egcd=function(a){e(a.negative===0),e(!a.isZero());var w=this,h=a.clone();w.negative!==0?w=w.umod(a):w=w.clone();for(var m=new n(1),g=new n(0),_=new n(0),T=new n(1),k=0;w.isEven()&&h.isEven();)w.iushrn(1),h.iushrn(1),++k;for(var M=h.clone(),B=w.clone();!w.isZero();){for(var Y=0,C=1;!(w.words[0]&C)&&Y<26;++Y,C<<=1);if(Y>0)for(w.iushrn(Y);Y-- >0;)(m.isOdd()||g.isOdd())&&(m.iadd(M),g.isub(B)),m.iushrn(1),g.iushrn(1);for(var K=0,W=1;!(h.words[0]&W)&&K<26;++K,W<<=1);if(K>0)for(h.iushrn(K);K-- >0;)(_.isOdd()||T.isOdd())&&(_.iadd(M),T.isub(B)),_.iushrn(1),T.iushrn(1);w.cmp(h)>=0?(w.isub(h),m.isub(_),g.isub(T)):(h.isub(w),_.isub(m),T.isub(g))}return{a:_,b:T,gcd:h.iushln(k)}},n.prototype._invmp=function(a){e(a.negative===0),e(!a.isZero());var w=this,h=a.clone();w.negative!==0?w=w.umod(a):w=w.clone();for(var m=new n(1),g=new n(0),_=h.clone();w.cmpn(1)>0&&h.cmpn(1)>0;){for(var T=0,k=1;!(w.words[0]&k)&&T<26;++T,k<<=1);if(T>0)for(w.iushrn(T);T-- >0;)m.isOdd()&&m.iadd(_),m.iushrn(1);for(var M=0,B=1;!(h.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(h.iushrn(M);M-- >0;)g.isOdd()&&g.iadd(_),g.iushrn(1);w.cmp(h)>=0?(w.isub(h),m.isub(g)):(h.isub(w),g.isub(m))}var Y;return w.cmpn(1)===0?Y=m:Y=g,Y.cmpn(0)<0&&Y.iadd(a),Y},n.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var w=this.clone(),h=a.clone();w.negative=0,h.negative=0;for(var m=0;w.isEven()&&h.isEven();m++)w.iushrn(1),h.iushrn(1);do{for(;w.isEven();)w.iushrn(1);for(;h.isEven();)h.iushrn(1);var g=w.cmp(h);if(g<0){var _=w;w=h,h=_}else if(g===0||h.cmpn(1)===0)break;w.isub(h)}while(!0);return h.iushln(m)},n.prototype.invm=function(a){return this.egcd(a).a.umod(a)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(a){return this.words[0]&a},n.prototype.bincn=function(a){e(typeof a=="number");var w=a%26,h=(a-w)/26,m=1<<w;if(this.length<=h)return this._expand(h+1),this.words[h]|=m,this;for(var g=m,_=h;g!==0&&_<this.length;_++){var T=this.words[_]|0;T+=g,g=T>>>26,T&=67108863,this.words[_]=T}return g!==0&&(this.words[_]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(a){var w=a<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;this._strip();var h;if(this.length>1)h=1;else{w&&(a=-a),e(a<=67108863,"Number is too big");var m=this.words[0]|0;h=m===a?0:m<a?-1:1}return this.negative!==0?-h|0:h},n.prototype.cmp=function(a){if(this.negative!==0&&a.negative===0)return-1;if(this.negative===0&&a.negative!==0)return 1;var w=this.ucmp(a);return this.negative!==0?-w|0:w},n.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var w=0,h=this.length-1;h>=0;h--){var m=this.words[h]|0,g=a.words[h]|0;if(m!==g){m<g?w=-1:m>g&&(w=1);break}}return w},n.prototype.gtn=function(a){return this.cmpn(a)===1},n.prototype.gt=function(a){return this.cmp(a)===1},n.prototype.gten=function(a){return this.cmpn(a)>=0},n.prototype.gte=function(a){return this.cmp(a)>=0},n.prototype.ltn=function(a){return this.cmpn(a)===-1},n.prototype.lt=function(a){return this.cmp(a)===-1},n.prototype.lten=function(a){return this.cmpn(a)<=0},n.prototype.lte=function(a){return this.cmp(a)<=0},n.prototype.eqn=function(a){return this.cmpn(a)===0},n.prototype.eq=function(a){return this.cmp(a)===0},n.red=function(a){return new G(a)},n.prototype.toRed=function(a){return e(!this.red,"Already a number in reduction context"),e(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},n.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(a){return this.red=a,this},n.prototype.forceRed=function(a){return e(!this.red,"Already a number in reduction context"),this._forceRed(a)},n.prototype.redAdd=function(a){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},n.prototype.redIAdd=function(a){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},n.prototype.redSub=function(a){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},n.prototype.redISub=function(a){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},n.prototype.redShl=function(a){return e(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},n.prototype.redMul=function(a){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},n.prototype.redIMul=function(a){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},n.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(a){return e(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var A={k256:null,p224:null,p192:null,p25519:null};function P(S,a){this.name=S,this.p=new n(a,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var a=new n(null);return a.words=new Array(Math.ceil(this.n/13)),a},P.prototype.ireduce=function(a){var w=a,h;do this.split(w,this.tmp),w=this.imulK(w),w=w.iadd(this.tmp),h=w.bitLength();while(h>this.n);var m=h<this.n?-1:w.ucmp(this.p);return m===0?(w.words[0]=0,w.length=1):m>0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},P.prototype.split=function(a,w){a.iushrn(this.n,0,w)},P.prototype.imulK=function(a){return a.imul(this.k)};function N(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(N,P),N.prototype.split=function(a,w){for(var h=4194303,m=Math.min(a.length,9),g=0;g<m;g++)w.words[g]=a.words[g];if(w.length=m,a.length<=9){a.words[0]=0,a.length=1;return}var _=a.words[9];for(w.words[w.length++]=_&h,g=10;g<a.length;g++){var T=a.words[g]|0;a.words[g-10]=(T&h)<<4|_>>>22,_=T}_>>>=22,a.words[g-10]=_,_===0&&a.length>10?a.length-=10:a.length-=9},N.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var w=0,h=0;h<a.length;h++){var m=a.words[h]|0;w+=m*977,a.words[h]=w&67108863,w=m*64+(w/67108864|0)}return a.words[a.length-1]===0&&(a.length--,a.words[a.length-1]===0&&a.length--),a};function L(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(L,P);function H(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(H,P);function J(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(J,P),J.prototype.imulK=function(a){for(var w=0,h=0;h<a.length;h++){var m=(a.words[h]|0)*19+w,g=m&67108863;m>>>=26,a.words[h]=g,w=m}return w!==0&&(a.words[a.length++]=w),a},n._prime=function(a){if(A[a])return A[a];var w;if(a==="k256")w=new N;else if(a==="p224")w=new L;else if(a==="p192")w=new H;else if(a==="p25519")w=new J;else throw new Error("Unknown prime "+a);return A[a]=w,w};function G(S){if(typeof S=="string"){var a=n._prime(S);this.m=a.p,this.prime=a}else e(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}G.prototype._verify1=function(a){e(a.negative===0,"red works only with positives"),e(a.red,"red works only with red numbers")},G.prototype._verify2=function(a,w){e((a.negative|w.negative)===0,"red works only with positives"),e(a.red&&a.red===w.red,"red works only with red numbers")},G.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(s(a,a.umod(this.m)._forceRed(this)),a)},G.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},G.prototype.add=function(a,w){this._verify2(a,w);var h=a.add(w);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},G.prototype.iadd=function(a,w){this._verify2(a,w);var h=a.iadd(w);return h.cmp(this.m)>=0&&h.isub(this.m),h},G.prototype.sub=function(a,w){this._verify2(a,w);var h=a.sub(w);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},G.prototype.isub=function(a,w){this._verify2(a,w);var h=a.isub(w);return h.cmpn(0)<0&&h.iadd(this.m),h},G.prototype.shl=function(a,w){return this._verify1(a),this.imod(a.ushln(w))},G.prototype.imul=function(a,w){return this._verify2(a,w),this.imod(a.imul(w))},G.prototype.mul=function(a,w){return this._verify2(a,w),this.imod(a.mul(w))},G.prototype.isqr=function(a){return this.imul(a,a.clone())},G.prototype.sqr=function(a){return this.mul(a,a)},G.prototype.sqrt=function(a){if(a.isZero())return a.clone();var w=this.m.andln(3);if(e(w%2===1),w===3){var h=this.m.add(new n(1)).iushrn(2);return this.pow(a,h)}for(var m=this.m.subn(1),g=0;!m.isZero()&&m.andln(1)===0;)g++,m.iushrn(1);e(!m.isZero());var _=new n(1).toRed(this),T=_.redNeg(),k=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new n(2*M*M).toRed(this);this.pow(M,k).cmp(T)!==0;)M.redIAdd(T);for(var B=this.pow(M,m),Y=this.pow(a,m.addn(1).iushrn(1)),C=this.pow(a,m),K=g;C.cmp(_)!==0;){for(var W=C,U=0;W.cmp(_)!==0;U++)W=W.redSqr();e(U<K);var q=this.pow(B,new n(1).iushln(K-U-1));Y=Y.redMul(q),B=q.redSqr(),C=C.redMul(B),K=U}return Y},G.prototype.invm=function(a){var w=a._invmp(this.m);return w.negative!==0?(w.negative=0,this.imod(w).redNeg()):this.imod(w)},G.prototype.pow=function(a,w){if(w.isZero())return new n(1).toRed(this);if(w.cmpn(1)===0)return a.clone();var h=4,m=new Array(1<<h);m[0]=new n(1).toRed(this),m[1]=a;for(var g=2;g<m.length;g++)m[g]=this.mul(m[g-1],a);var _=m[0],T=0,k=0,M=w.bitLength()%26;for(M===0&&(M=26),g=w.length-1;g>=0;g--){for(var B=w.words[g],Y=M-1;Y>=0;Y--){var C=B>>Y&1;if(_!==m[0]&&(_=this.sqr(_)),C===0&&T===0){k=0;continue}T<<=1,T|=C,k++,!(k!==h&&(g!==0||Y!==0))&&(_=this.mul(_,m[T]),k=0,T=0)}M=26}return _},G.prototype.convertTo=function(a){var w=a.umod(this.m);return w===a?w.clone():w},G.prototype.convertFrom=function(a){var w=a.clone();return w.red=null,w},n.mont=function(a){return new z(a)};function z(S){G.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}o(z,G),z.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},z.prototype.convertFrom=function(a){var w=this.imod(a.mul(this.rinv));return w.red=null,w},z.prototype.imul=function(a,w){if(a.isZero()||w.isZero())return a.words[0]=0,a.length=1,a;var h=a.imul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},z.prototype.mul=function(a,w){if(a.isZero()||w.isZero())return new n(0)._forceRed(this);var h=a.mul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},z.prototype.invm=function(a){var w=this.imod(a._invmp(this.m).mul(this.r2));return w._forceRed(this)}})(r,co)})(Ty);const mt=Ca;var Lr={},xt={},lo=xd;function xd(r,t){if(!r)throw new Error(t||"Assertion failed")}xd.equal=function(t,i,e){if(t!=i)throw new Error(e||"Assertion failed: "+t+" != "+i)};var Pa={},Fc={get exports(){return Pa},set exports(r){Pa=r}};typeof Object.create=="function"?Fc.exports=function(t,i){i&&(t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Fc.exports=function(t,i){if(i){t.super_=i;var e=function(){};e.prototype=i.prototype,t.prototype=new e,t.prototype.constructor=t}};var Iy=lo,Cy=Pa;xt.inherits=Cy;function Py(r,t){return(r.charCodeAt(t)&64512)!==55296||t<0||t+1>=r.length?!1:(r.charCodeAt(t+1)&64512)===56320}function Oy(r,t){if(Array.isArray(r))return r.slice();if(!r)return[];var i=[];if(typeof r=="string")if(t){if(t==="hex")for(r=r.replace(/[^a-z0-9]+/ig,""),r.length%2!==0&&(r="0"+r),o=0;o<r.length;o+=2)i.push(parseInt(r[o]+r[o+1],16))}else for(var e=0,o=0;o<r.length;o++){var n=r.charCodeAt(o);n<128?i[e++]=n:n<2048?(i[e++]=n>>6|192,i[e++]=n&63|128):Py(r,o)?(n=65536+((n&1023)<<10)+(r.charCodeAt(++o)&1023),i[e++]=n>>18|240,i[e++]=n>>12&63|128,i[e++]=n>>6&63|128,i[e++]=n&63|128):(i[e++]=n>>12|224,i[e++]=n>>6&63|128,i[e++]=n&63|128)}else for(o=0;o<r.length;o++)i[o]=r[o]|0;return i}xt.toArray=Oy;function Ny(r){for(var t="",i=0;i<r.length;i++)t+=Ed(r[i].toString(16));return t}xt.toHex=Ny;function Ad(r){var t=r>>>24|r>>>8&65280|r<<8&16711680|(r&255)<<24;return t>>>0}xt.htonl=Ad;function By(r,t){for(var i="",e=0;e<r.length;e++){var o=r[e];t==="little"&&(o=Ad(o)),i+=Sd(o.toString(16))}return i}xt.toHex32=By;function Ed(r){return r.length===1?"0"+r:r}xt.zero2=Ed;function Sd(r){return r.length===7?"0"+r:r.length===6?"00"+r:r.length===5?"000"+r:r.length===4?"0000"+r:r.length===3?"00000"+r:r.length===2?"000000"+r:r.length===1?"0000000"+r:r}xt.zero8=Sd;function Ly(r,t,i,e){var o=i-t;Iy(o%4===0);for(var n=new Array(o/4),f=0,p=t;f<n.length;f++,p+=4){var u;e==="big"?u=r[p]<<24|r[p+1]<<16|r[p+2]<<8|r[p+3]:u=r[p+3]<<24|r[p+2]<<16|r[p+1]<<8|r[p],n[f]=u>>>0}return n}xt.join32=Ly;function jy(r,t){for(var i=new Array(r.length*4),e=0,o=0;e<r.length;e++,o+=4){var n=r[e];t==="big"?(i[o]=n>>>24,i[o+1]=n>>>16&255,i[o+2]=n>>>8&255,i[o+3]=n&255):(i[o+3]=n>>>24,i[o+2]=n>>>16&255,i[o+1]=n>>>8&255,i[o]=n&255)}return i}xt.split32=jy;function Uy(r,t){return r>>>t|r<<32-t}xt.rotr32=Uy;function Dy(r,t){return r<<t|r>>>32-t}xt.rotl32=Dy;function Fy(r,t){return r+t>>>0}xt.sum32=Fy;function qy(r,t,i){return r+t+i>>>0}xt.sum32_3=qy;function Hy(r,t,i,e){return r+t+i+e>>>0}xt.sum32_4=Hy;function zy(r,t,i,e,o){return r+t+i+e+o>>>0}xt.sum32_5=zy;function Wy(r,t,i,e){var o=r[t],n=r[t+1],f=e+n>>>0,p=(f<e?1:0)+i+o;r[t]=p>>>0,r[t+1]=f}xt.sum64=Wy;function Ky(r,t,i,e){var o=t+e>>>0,n=(o<t?1:0)+r+i;return n>>>0}xt.sum64_hi=Ky;function Gy(r,t,i,e){var o=t+e;return o>>>0}xt.sum64_lo=Gy;function Vy(r,t,i,e,o,n,f,p){var u=0,c=t;c=c+e>>>0,u+=c<t?1:0,c=c+n>>>0,u+=c<n?1:0,c=c+p>>>0,u+=c<p?1:0;var s=r+i+o+f+u;return s>>>0}xt.sum64_4_hi=Vy;function Jy(r,t,i,e,o,n,f,p){var u=t+e+n+p;return u>>>0}xt.sum64_4_lo=Jy;function Yy(r,t,i,e,o,n,f,p,u,c){var s=0,l=t;l=l+e>>>0,s+=l<t?1:0,l=l+n>>>0,s+=l<n?1:0,l=l+p>>>0,s+=l<p?1:0,l=l+c>>>0,s+=l<c?1:0;var d=r+i+o+f+u+s;return d>>>0}xt.sum64_5_hi=Yy;function $y(r,t,i,e,o,n,f,p,u,c){var s=t+e+n+p+c;return s>>>0}xt.sum64_5_lo=$y;function Zy(r,t,i){var e=t<<32-i|r>>>i;return e>>>0}xt.rotr64_hi=Zy;function Qy(r,t,i){var e=r<<32-i|t>>>i;return e>>>0}xt.rotr64_lo=Qy;function Xy(r,t,i){return r>>>i}xt.shr64_hi=Xy;function e2(r,t,i){var e=r<<32-i|t>>>i;return e>>>0}xt.shr64_lo=e2;var Si={},qc=xt,t2=lo;function bs(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Si.BlockHash=bs;bs.prototype.update=function(t,i){if(t=qc.toArray(t,i),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var e=t.length%this._delta8;this.pending=t.slice(t.length-e,t.length),this.pending.length===0&&(this.pending=null),t=qc.join32(t,0,t.length-e,this.endian);for(var o=0;o<t.length;o+=this._delta32)this._update(t,o,o+this._delta32)}return this};bs.prototype.digest=function(t){return this.update(this._pad()),t2(this.pending===null),this._digest(t)};bs.prototype._pad=function(){var t=this.pendingTotal,i=this._delta8,e=i-(t+this.padLength)%i,o=new Array(e+this.padLength);o[0]=128;for(var n=1;n<e;n++)o[n]=0;if(t<<=3,this.endian==="big"){for(var f=8;f<this.padLength;f++)o[n++]=0;o[n++]=0,o[n++]=0,o[n++]=0,o[n++]=0,o[n++]=t>>>24&255,o[n++]=t>>>16&255,o[n++]=t>>>8&255,o[n++]=t&255}else for(o[n++]=t&255,o[n++]=t>>>8&255,o[n++]=t>>>16&255,o[n++]=t>>>24&255,o[n++]=0,o[n++]=0,o[n++]=0,o[n++]=0,f=8;f<this.padLength;f++)o[n++]=0;return o};var ki={},fn={},r2=xt,tn=r2.rotr32;function n2(r,t,i,e){if(r===0)return kd(t,i,e);if(r===1||r===3)return Td(t,i,e);if(r===2)return Rd(t,i,e)}fn.ft_1=n2;function kd(r,t,i){return r&t^~r&i}fn.ch32=kd;function Rd(r,t,i){return r&t^r&i^t&i}fn.maj32=Rd;function Td(r,t,i){return r^t^i}fn.p32=Td;function i2(r){return tn(r,2)^tn(r,13)^tn(r,22)}fn.s0_256=i2;function o2(r){return tn(r,6)^tn(r,11)^tn(r,25)}fn.s1_256=o2;function s2(r){return tn(r,7)^tn(r,18)^r>>>3}fn.g0_256=s2;function a2(r){return tn(r,17)^tn(r,19)^r>>>10}fn.g1_256=a2;var bi=xt,u2=Si,f2=fn,Fs=bi.rotl32,Pi=bi.sum32,c2=bi.sum32_5,l2=f2.ft_1,Id=u2.BlockHash,h2=[1518500249,1859775393,2400959708,3395469782];function sn(){if(!(this instanceof sn))return new sn;Id.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}bi.inherits(sn,Id);var d2=sn;sn.blockSize=512;sn.outSize=160;sn.hmacStrength=80;sn.padLength=64;sn.prototype._update=function(t,i){for(var e=this.W,o=0;o<16;o++)e[o]=t[i+o];for(;o<e.length;o++)e[o]=Fs(e[o-3]^e[o-8]^e[o-14]^e[o-16],1);var n=this.h[0],f=this.h[1],p=this.h[2],u=this.h[3],c=this.h[4];for(o=0;o<e.length;o++){var s=~~(o/20),l=c2(Fs(n,5),l2(s,f,p,u),c,e[o],h2[s]);c=u,u=p,p=Fs(f,30),f=n,n=l}this.h[0]=Pi(this.h[0],n),this.h[1]=Pi(this.h[1],f),this.h[2]=Pi(this.h[2],p),this.h[3]=Pi(this.h[3],u),this.h[4]=Pi(this.h[4],c)};sn.prototype._digest=function(t){return t==="hex"?bi.toHex32(this.h,"big"):bi.split32(this.h,"big")};var yi=xt,p2=Si,Ri=fn,m2=lo,Or=yi.sum32,g2=yi.sum32_4,v2=yi.sum32_5,b2=Ri.ch32,y2=Ri.maj32,w2=Ri.s0_256,_2=Ri.s1_256,M2=Ri.g0_256,x2=Ri.g1_256,Cd=p2.BlockHash,A2=[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];function an(){if(!(this instanceof an))return new an;Cd.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=A2,this.W=new Array(64)}yi.inherits(an,Cd);var Pd=an;an.blockSize=512;an.outSize=256;an.hmacStrength=192;an.padLength=64;an.prototype._update=function(t,i){for(var e=this.W,o=0;o<16;o++)e[o]=t[i+o];for(;o<e.length;o++)e[o]=g2(x2(e[o-2]),e[o-7],M2(e[o-15]),e[o-16]);var n=this.h[0],f=this.h[1],p=this.h[2],u=this.h[3],c=this.h[4],s=this.h[5],l=this.h[6],d=this.h[7];for(m2(this.k.length===e.length),o=0;o<e.length;o++){var b=v2(d,_2(c),b2(c,s,l),this.k[o],e[o]),v=Or(w2(n),y2(n,f,p));d=l,l=s,s=c,c=Or(u,b),u=p,p=f,f=n,n=Or(b,v)}this.h[0]=Or(this.h[0],n),this.h[1]=Or(this.h[1],f),this.h[2]=Or(this.h[2],p),this.h[3]=Or(this.h[3],u),this.h[4]=Or(this.h[4],c),this.h[5]=Or(this.h[5],s),this.h[6]=Or(this.h[6],l),this.h[7]=Or(this.h[7],d)};an.prototype._digest=function(t){return t==="hex"?yi.toHex32(this.h,"big"):yi.split32(this.h,"big")};var Oa=xt,Od=Pd;function vn(){if(!(this instanceof vn))return new vn;Od.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Oa.inherits(vn,Od);var E2=vn;vn.blockSize=512;vn.outSize=224;vn.hmacStrength=192;vn.padLength=64;vn.prototype._digest=function(t){return t==="hex"?Oa.toHex32(this.h.slice(0,7),"big"):Oa.split32(this.h.slice(0,7),"big")};var fr=xt,S2=Si,k2=lo,rn=fr.rotr64_hi,nn=fr.rotr64_lo,Nd=fr.shr64_hi,Bd=fr.shr64_lo,xn=fr.sum64,qs=fr.sum64_hi,Hs=fr.sum64_lo,R2=fr.sum64_4_hi,T2=fr.sum64_4_lo,I2=fr.sum64_5_hi,C2=fr.sum64_5_lo,Ld=S2.BlockHash,P2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Wr(){if(!(this instanceof Wr))return new Wr;Ld.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=P2,this.W=new Array(160)}fr.inherits(Wr,Ld);var jd=Wr;Wr.blockSize=1024;Wr.outSize=512;Wr.hmacStrength=192;Wr.padLength=128;Wr.prototype._prepareBlock=function(t,i){for(var e=this.W,o=0;o<32;o++)e[o]=t[i+o];for(;o<e.length;o+=2){var n=z2(e[o-4],e[o-3]),f=W2(e[o-4],e[o-3]),p=e[o-14],u=e[o-13],c=q2(e[o-30],e[o-29]),s=H2(e[o-30],e[o-29]),l=e[o-32],d=e[o-31];e[o]=R2(n,f,p,u,c,s,l,d),e[o+1]=T2(n,f,p,u,c,s,l,d)}};Wr.prototype._update=function(t,i){this._prepareBlock(t,i);var e=this.W,o=this.h[0],n=this.h[1],f=this.h[2],p=this.h[3],u=this.h[4],c=this.h[5],s=this.h[6],l=this.h[7],d=this.h[8],b=this.h[9],v=this.h[10],y=this.h[11],x=this.h[12],E=this.h[13],R=this.h[14],I=this.h[15];k2(this.k.length===e.length);for(var O=0;O<e.length;O+=2){var A=R,P=I,N=D2(d,b),L=F2(d,b),H=O2(d,b,v,y,x),J=N2(d,b,v,y,x,E),G=this.k[O],z=this.k[O+1],S=e[O],a=e[O+1],w=I2(A,P,N,L,H,J,G,z,S,a),h=C2(A,P,N,L,H,J,G,z,S,a);A=j2(o,n),P=U2(o,n),N=B2(o,n,f,p,u),L=L2(o,n,f,p,u,c);var m=qs(A,P,N,L),g=Hs(A,P,N,L);R=x,I=E,x=v,E=y,v=d,y=b,d=qs(s,l,w,h),b=Hs(l,l,w,h),s=u,l=c,u=f,c=p,f=o,p=n,o=qs(w,h,m,g),n=Hs(w,h,m,g)}xn(this.h,0,o,n),xn(this.h,2,f,p),xn(this.h,4,u,c),xn(this.h,6,s,l),xn(this.h,8,d,b),xn(this.h,10,v,y),xn(this.h,12,x,E),xn(this.h,14,R,I)};Wr.prototype._digest=function(t){return t==="hex"?fr.toHex32(this.h,"big"):fr.split32(this.h,"big")};function O2(r,t,i,e,o){var n=r&i^~r&o;return n<0&&(n+=4294967296),n}function N2(r,t,i,e,o,n){var f=t&e^~t&n;return f<0&&(f+=4294967296),f}function B2(r,t,i,e,o){var n=r&i^r&o^i&o;return n<0&&(n+=4294967296),n}function L2(r,t,i,e,o,n){var f=t&e^t&n^e&n;return f<0&&(f+=4294967296),f}function j2(r,t){var i=rn(r,t,28),e=rn(t,r,2),o=rn(t,r,7),n=i^e^o;return n<0&&(n+=4294967296),n}function U2(r,t){var i=nn(r,t,28),e=nn(t,r,2),o=nn(t,r,7),n=i^e^o;return n<0&&(n+=4294967296),n}function D2(r,t){var i=rn(r,t,14),e=rn(r,t,18),o=rn(t,r,9),n=i^e^o;return n<0&&(n+=4294967296),n}function F2(r,t){var i=nn(r,t,14),e=nn(r,t,18),o=nn(t,r,9),n=i^e^o;return n<0&&(n+=4294967296),n}function q2(r,t){var i=rn(r,t,1),e=rn(r,t,8),o=Nd(r,t,7),n=i^e^o;return n<0&&(n+=4294967296),n}function H2(r,t){var i=nn(r,t,1),e=nn(r,t,8),o=Bd(r,t,7),n=i^e^o;return n<0&&(n+=4294967296),n}function z2(r,t){var i=rn(r,t,19),e=rn(t,r,29),o=Nd(r,t,6),n=i^e^o;return n<0&&(n+=4294967296),n}function W2(r,t){var i=nn(r,t,19),e=nn(t,r,29),o=Bd(r,t,6),n=i^e^o;return n<0&&(n+=4294967296),n}var Na=xt,Ud=jd;function bn(){if(!(this instanceof bn))return new bn;Ud.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Na.inherits(bn,Ud);var K2=bn;bn.blockSize=1024;bn.outSize=384;bn.hmacStrength=192;bn.padLength=128;bn.prototype._digest=function(t){return t==="hex"?Na.toHex32(this.h.slice(0,12),"big"):Na.split32(this.h.slice(0,12),"big")};ki.sha1=d2;ki.sha224=E2;ki.sha256=Pd;ki.sha384=K2;ki.sha512=jd;var Dd={},$n=xt,G2=Si,xo=$n.rotl32,Hc=$n.sum32,Oi=$n.sum32_3,zc=$n.sum32_4,Fd=G2.BlockHash;function un(){if(!(this instanceof un))return new un;Fd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}$n.inherits(un,Fd);Dd.ripemd160=un;un.blockSize=512;un.outSize=160;un.hmacStrength=192;un.padLength=64;un.prototype._update=function(t,i){for(var e=this.h[0],o=this.h[1],n=this.h[2],f=this.h[3],p=this.h[4],u=e,c=o,s=n,l=f,d=p,b=0;b<80;b++){var v=Hc(xo(zc(e,Wc(b,o,n,f),t[Y2[b]+i],V2(b)),Z2[b]),p);e=p,p=f,f=xo(n,10),n=o,o=v,v=Hc(xo(zc(u,Wc(79-b,c,s,l),t[$2[b]+i],J2(b)),Q2[b]),d),u=d,d=l,l=xo(s,10),s=c,c=v}v=Oi(this.h[1],n,l),this.h[1]=Oi(this.h[2],f,d),this.h[2]=Oi(this.h[3],p,u),this.h[3]=Oi(this.h[4],e,c),this.h[4]=Oi(this.h[0],o,s),this.h[0]=v};un.prototype._digest=function(t){return t==="hex"?$n.toHex32(this.h,"little"):$n.split32(this.h,"little")};function Wc(r,t,i,e){return r<=15?t^i^e:r<=31?t&i|~t&e:r<=47?(t|~i)^e:r<=63?t&e|i&~e:t^(i|~e)}function V2(r){return r<=15?0:r<=31?1518500249:r<=47?1859775393:r<=63?2400959708:2840853838}function J2(r){return r<=15?1352829926:r<=31?1548603684:r<=47?1836072691:r<=63?2053994217:0}var Y2=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],$2=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Z2=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Q2=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],X2=xt,ew=lo;function wi(r,t,i){if(!(this instanceof wi))return new wi(r,t,i);this.Hash=r,this.blockSize=r.blockSize/8,this.outSize=r.outSize/8,this.inner=null,this.outer=null,this._init(X2.toArray(t,i))}var tw=wi;wi.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),ew(t.length<=this.blockSize);for(var i=t.length;i<this.blockSize;i++)t.push(0);for(i=0;i<t.length;i++)t[i]^=54;for(this.inner=new this.Hash().update(t),i=0;i<t.length;i++)t[i]^=106;this.outer=new this.Hash().update(t)};wi.prototype.update=function(t,i){return this.inner.update(t,i),this};wi.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)};(function(r){var t=r;t.utils=xt,t.common=Si,t.sha=ki,t.ripemd=Dd,t.hmac=tw,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160})(Lr);function Ti(r,t,i){return i={path:t,exports:{},require:function(e,o){return rw(e,o??i.path)}},r(i,i.exports),i.exports}function rw(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ou=qd;function qd(r,t){if(!r)throw new Error(t||"Assertion failed")}qd.equal=function(t,i,e){if(t!=i)throw new Error(e||"Assertion failed: "+t+" != "+i)};var Dr=Ti(function(r,t){var i=t;function e(f,p){if(Array.isArray(f))return f.slice();if(!f)return[];var u=[];if(typeof f!="string"){for(var c=0;c<f.length;c++)u[c]=f[c]|0;return u}if(p==="hex"){f=f.replace(/[^a-z0-9]+/ig,""),f.length%2!==0&&(f="0"+f);for(var c=0;c<f.length;c+=2)u.push(parseInt(f[c]+f[c+1],16))}else for(var c=0;c<f.length;c++){var s=f.charCodeAt(c),l=s>>8,d=s&255;l?u.push(l,d):u.push(d)}return u}i.toArray=e;function o(f){return f.length===1?"0"+f:f}i.zero2=o;function n(f){for(var p="",u=0;u<f.length;u++)p+=o(f[u].toString(16));return p}i.toHex=n,i.encode=function(p,u){return u==="hex"?n(p):p}}),wr=Ti(function(r,t){var i=t;i.assert=Ou,i.toArray=Dr.toArray,i.zero2=Dr.zero2,i.toHex=Dr.toHex,i.encode=Dr.encode;function e(u,c,s){var l=new Array(Math.max(u.bitLength(),s)+1);l.fill(0);for(var d=1<<c+1,b=u.clone(),v=0;v<l.length;v++){var y,x=b.andln(d-1);b.isOdd()?(x>(d>>1)-1?y=(d>>1)-x:y=x,b.isubn(y)):y=0,l[v]=y,b.iushrn(1)}return l}i.getNAF=e;function o(u,c){var s=[[],[]];u=u.clone(),c=c.clone();for(var l=0,d=0,b;u.cmpn(-l)>0||c.cmpn(-d)>0;){var v=u.andln(3)+l&3,y=c.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var x;v&1?(b=u.andln(7)+l&7,(b===3||b===5)&&y===2?x=-v:x=v):x=0,s[0].push(x);var E;y&1?(b=c.andln(7)+d&7,(b===3||b===5)&&v===2?E=-y:E=y):E=0,s[1].push(E),2*l===x+1&&(l=1-l),2*d===E+1&&(d=1-d),u.iushrn(1),c.iushrn(1)}return s}i.getJSF=o;function n(u,c,s){var l="_"+c;u.prototype[c]=function(){return this[l]!==void 0?this[l]:this[l]=s.call(this)}}i.cachedProperty=n;function f(u){return typeof u=="string"?i.toArray(u,"hex"):u}i.parseBytes=f;function p(u){return new mt(u,"hex","le")}i.intFromLE=p}),Vo=wr.getNAF,nw=wr.getJSF,Jo=wr.assert;function Un(r,t){this.type=r,this.p=new mt(t.p,16),this.red=t.prime?mt.red(t.prime):mt.mont(this.p),this.zero=new mt(0).toRed(this.red),this.one=new mt(1).toRed(this.red),this.two=new mt(2).toRed(this.red),this.n=t.n&&new mt(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Zn=Un;Un.prototype.point=function(){throw new Error("Not implemented")};Un.prototype.validate=function(){throw new Error("Not implemented")};Un.prototype._fixedNafMul=function(t,i){Jo(t.precomputed);var e=t._getDoubles(),o=Vo(i,1,this._bitLength),n=(1<<e.step+1)-(e.step%2===0?2:1);n/=3;var f=[],p,u;for(p=0;p<o.length;p+=e.step){u=0;for(var c=p+e.step-1;c>=p;c--)u=(u<<1)+o[c];f.push(u)}for(var s=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=n;d>0;d--){for(p=0;p<f.length;p++)u=f[p],u===d?l=l.mixedAdd(e.points[p]):u===-d&&(l=l.mixedAdd(e.points[p].neg()));s=s.add(l)}return s.toP()};Un.prototype._wnafMul=function(t,i){var e=4,o=t._getNAFPoints(e);e=o.wnd;for(var n=o.points,f=Vo(i,e,this._bitLength),p=this.jpoint(null,null,null),u=f.length-1;u>=0;u--){for(var c=0;u>=0&&f[u]===0;u--)c++;if(u>=0&&c++,p=p.dblp(c),u<0)break;var s=f[u];Jo(s!==0),t.type==="affine"?s>0?p=p.mixedAdd(n[s-1>>1]):p=p.mixedAdd(n[-s-1>>1].neg()):s>0?p=p.add(n[s-1>>1]):p=p.add(n[-s-1>>1].neg())}return t.type==="affine"?p.toP():p};Un.prototype._wnafMulAdd=function(t,i,e,o,n){var f=this._wnafT1,p=this._wnafT2,u=this._wnafT3,c=0,s,l,d;for(s=0;s<o;s++){d=i[s];var b=d._getNAFPoints(t);f[s]=b.wnd,p[s]=b.points}for(s=o-1;s>=1;s-=2){var v=s-1,y=s;if(f[v]!==1||f[y]!==1){u[v]=Vo(e[v],f[v],this._bitLength),u[y]=Vo(e[y],f[y],this._bitLength),c=Math.max(u[v].length,c),c=Math.max(u[y].length,c);continue}var x=[i[v],null,null,i[y]];i[v].y.cmp(i[y].y)===0?(x[1]=i[v].add(i[y]),x[2]=i[v].toJ().mixedAdd(i[y].neg())):i[v].y.cmp(i[y].y.redNeg())===0?(x[1]=i[v].toJ().mixedAdd(i[y]),x[2]=i[v].add(i[y].neg())):(x[1]=i[v].toJ().mixedAdd(i[y]),x[2]=i[v].toJ().mixedAdd(i[y].neg()));var E=[-3,-1,-5,-7,0,7,5,1,3],R=nw(e[v],e[y]);for(c=Math.max(R[0].length,c),u[v]=new Array(c),u[y]=new Array(c),l=0;l<c;l++){var I=R[0][l]|0,O=R[1][l]|0;u[v][l]=E[(I+1)*3+(O+1)],u[y][l]=0,p[v]=x}}var A=this.jpoint(null,null,null),P=this._wnafT4;for(s=c;s>=0;s--){for(var N=0;s>=0;){var L=!0;for(l=0;l<o;l++)P[l]=u[l][s]|0,P[l]!==0&&(L=!1);if(!L)break;N++,s--}if(s>=0&&N++,A=A.dblp(N),s<0)break;for(l=0;l<o;l++){var H=P[l];H!==0&&(H>0?d=p[l][H-1>>1]:H<0&&(d=p[l][-H-1>>1].neg()),d.type==="affine"?A=A.mixedAdd(d):A=A.add(d))}}for(s=0;s<o;s++)p[s]=null;return n?A:A.toP()};function Tr(r,t){this.curve=r,this.type=t,this.precomputed=null}Un.BasePoint=Tr;Tr.prototype.eq=function(){throw new Error("Not implemented")};Tr.prototype.validate=function(){return this.curve.validate(this)};Un.prototype.decodePoint=function(t,i){t=wr.toArray(t,i);var e=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*e){t[0]===6?Jo(t[t.length-1]%2===0):t[0]===7&&Jo(t[t.length-1]%2===1);var o=this.point(t.slice(1,1+e),t.slice(1+e,1+2*e));return o}else if((t[0]===2||t[0]===3)&&t.length-1===e)return this.pointFromX(t.slice(1,1+e),t[0]===3);throw new Error("Unknown point format")};Tr.prototype.encodeCompressed=function(t){return this.encode(t,!0)};Tr.prototype._encode=function(t){var i=this.curve.p.byteLength(),e=this.getX().toArray("be",i);return t?[this.getY().isEven()?2:3].concat(e):[4].concat(e,this.getY().toArray("be",i))};Tr.prototype.encode=function(t,i){return wr.encode(this._encode(i),t)};Tr.prototype.precompute=function(t){if(this.precomputed)return this;var i={doubles:null,naf:null,beta:null};return i.naf=this._getNAFPoints(8),i.doubles=this._getDoubles(4,t),i.beta=this._getBeta(),this.precomputed=i,this};Tr.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var i=this.precomputed.doubles;return i?i.points.length>=Math.ceil((t.bitLength()+1)/i.step):!1};Tr.prototype._getDoubles=function(t,i){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var e=[this],o=this,n=0;n<i;n+=t){for(var f=0;f<t;f++)o=o.dbl();e.push(o)}return{step:t,points:e}};Tr.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var i=[this],e=(1<<t)-1,o=e===1?null:this.dbl(),n=1;n<e;n++)i[n]=i[n-1].add(o);return{wnd:t,points:i}};Tr.prototype._getBeta=function(){return null};Tr.prototype.dblp=function(t){for(var i=this,e=0;e<t;e++)i=i.dbl();return i};var Nu=Ti(function(r){typeof Object.create=="function"?r.exports=function(i,e){e&&(i.super_=e,i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(i,e){if(e){i.super_=e;var o=function(){};o.prototype=e.prototype,i.prototype=new o,i.prototype.constructor=i}}}),iw=wr.assert;function Ir(r){Zn.call(this,"short",r),this.a=new mt(r.a,16).toRed(this.red),this.b=new mt(r.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(r),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Nu(Ir,Zn);var ow=Ir;Ir.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var i,e;if(t.beta)i=new mt(t.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);i=o[0].cmp(o[1])<0?o[0]:o[1],i=i.toRed(this.red)}if(t.lambda)e=new mt(t.lambda,16);else{var n=this._getEndoRoots(this.n);this.g.mul(n[0]).x.cmp(this.g.x.redMul(i))===0?e=n[0]:(e=n[1],iw(this.g.mul(e).x.cmp(this.g.x.redMul(i))===0))}var f;return t.basis?f=t.basis.map(function(p){return{a:new mt(p.a,16),b:new mt(p.b,16)}}):f=this._getEndoBasis(e),{beta:i,lambda:e,basis:f}}};Ir.prototype._getEndoRoots=function(t){var i=t===this.p?this.red:mt.mont(t),e=new mt(2).toRed(i).redInvm(),o=e.redNeg(),n=new mt(3).toRed(i).redNeg().redSqrt().redMul(e),f=o.redAdd(n).fromRed(),p=o.redSub(n).fromRed();return[f,p]};Ir.prototype._getEndoBasis=function(t){for(var i=this.n.ushrn(Math.floor(this.n.bitLength()/2)),e=t,o=this.n.clone(),n=new mt(1),f=new mt(0),p=new mt(0),u=new mt(1),c,s,l,d,b,v,y,x=0,E,R;e.cmpn(0)!==0;){var I=o.div(e);E=o.sub(I.mul(e)),R=p.sub(I.mul(n));var O=u.sub(I.mul(f));if(!l&&E.cmp(i)<0)c=y.neg(),s=n,l=E.neg(),d=R;else if(l&&++x===2)break;y=E,o=e,e=E,p=n,n=R,u=f,f=O}b=E.neg(),v=R;var A=l.sqr().add(d.sqr()),P=b.sqr().add(v.sqr());return P.cmp(A)>=0&&(b=c,v=s),l.negative&&(l=l.neg(),d=d.neg()),b.negative&&(b=b.neg(),v=v.neg()),[{a:l,b:d},{a:b,b:v}]};Ir.prototype._endoSplit=function(t){var i=this.endo.basis,e=i[0],o=i[1],n=o.b.mul(t).divRound(this.n),f=e.b.neg().mul(t).divRound(this.n),p=n.mul(e.a),u=f.mul(o.a),c=n.mul(e.b),s=f.mul(o.b),l=t.sub(p).sub(u),d=c.add(s).neg();return{k1:l,k2:d}};Ir.prototype.pointFromX=function(t,i){t=new mt(t,16),t.red||(t=t.toRed(this.red));var e=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=e.redSqrt();if(o.redSqr().redSub(e).cmp(this.zero)!==0)throw new Error("invalid point");var n=o.fromRed().isOdd();return(i&&!n||!i&&n)&&(o=o.redNeg()),this.point(t,o)};Ir.prototype.validate=function(t){if(t.inf)return!0;var i=t.x,e=t.y,o=this.a.redMul(i),n=i.redSqr().redMul(i).redIAdd(o).redIAdd(this.b);return e.redSqr().redISub(n).cmpn(0)===0};Ir.prototype._endoWnafMulAdd=function(t,i,e){for(var o=this._endoWnafT1,n=this._endoWnafT2,f=0;f<t.length;f++){var p=this._endoSplit(i[f]),u=t[f],c=u._getBeta();p.k1.negative&&(p.k1.ineg(),u=u.neg(!0)),p.k2.negative&&(p.k2.ineg(),c=c.neg(!0)),o[f*2]=u,o[f*2+1]=c,n[f*2]=p.k1,n[f*2+1]=p.k2}for(var s=this._wnafMulAdd(1,o,n,f*2,e),l=0;l<f*2;l++)o[l]=null,n[l]=null;return s};function Wt(r,t,i,e){Zn.BasePoint.call(this,r,"affine"),t===null&&i===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new mt(t,16),this.y=new mt(i,16),e&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Nu(Wt,Zn.BasePoint);Ir.prototype.point=function(t,i,e){return new Wt(this,t,i,e)};Ir.prototype.pointFromJSON=function(t,i){return Wt.fromJSON(this,t,i)};Wt.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var i=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var e=this.curve,o=function(n){return e.point(n.x.redMul(e.endo.beta),n.y)};t.beta=i,i.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(o)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(o)}}}return i}};Wt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Wt.fromJSON=function(t,i,e){typeof i=="string"&&(i=JSON.parse(i));var o=t.point(i[0],i[1],e);if(!i[2])return o;function n(p){return t.point(p[0],p[1],e)}var f=i[2];return o.precomputed={beta:null,doubles:f.doubles&&{step:f.doubles.step,points:[o].concat(f.doubles.points.map(n))},naf:f.naf&&{wnd:f.naf.wnd,points:[o].concat(f.naf.points.map(n))}},o};Wt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Wt.prototype.isInfinity=function(){return this.inf};Wt.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var i=this.y.redSub(t.y);i.cmpn(0)!==0&&(i=i.redMul(this.x.redSub(t.x).redInvm()));var e=i.redSqr().redISub(this.x).redISub(t.x),o=i.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,o)};Wt.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var i=this.curve.a,e=this.x.redSqr(),o=t.redInvm(),n=e.redAdd(e).redIAdd(e).redIAdd(i).redMul(o),f=n.redSqr().redISub(this.x.redAdd(this.x)),p=n.redMul(this.x.redSub(f)).redISub(this.y);return this.curve.point(f,p)};Wt.prototype.getX=function(){return this.x.fromRed()};Wt.prototype.getY=function(){return this.y.fromRed()};Wt.prototype.mul=function(t){return t=new mt(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Wt.prototype.mulAdd=function(t,i,e){var o=[this,i],n=[t,e];return this.curve.endo?this.curve._endoWnafMulAdd(o,n):this.curve._wnafMulAdd(1,o,n,2)};Wt.prototype.jmulAdd=function(t,i,e){var o=[this,i],n=[t,e];return this.curve.endo?this.curve._endoWnafMulAdd(o,n,!0):this.curve._wnafMulAdd(1,o,n,2,!0)};Wt.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Wt.prototype.neg=function(t){if(this.inf)return this;var i=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var e=this.precomputed,o=function(n){return n.neg()};i.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(o)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(o)}}}return i};Wt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Vt(r,t,i,e){Zn.BasePoint.call(this,r,"jacobian"),t===null&&i===null&&e===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new mt(0)):(this.x=new mt(t,16),this.y=new mt(i,16),this.z=new mt(e,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Nu(Vt,Zn.BasePoint);Ir.prototype.jpoint=function(t,i,e){return new Vt(this,t,i,e)};Vt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),i=t.redSqr(),e=this.x.redMul(i),o=this.y.redMul(i).redMul(t);return this.curve.point(e,o)};Vt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Vt.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var i=t.z.redSqr(),e=this.z.redSqr(),o=this.x.redMul(i),n=t.x.redMul(e),f=this.y.redMul(i.redMul(t.z)),p=t.y.redMul(e.redMul(this.z)),u=o.redSub(n),c=f.redSub(p);if(u.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var s=u.redSqr(),l=s.redMul(u),d=o.redMul(s),b=c.redSqr().redIAdd(l).redISub(d).redISub(d),v=c.redMul(d.redISub(b)).redISub(f.redMul(l)),y=this.z.redMul(t.z).redMul(u);return this.curve.jpoint(b,v,y)};Vt.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var i=this.z.redSqr(),e=this.x,o=t.x.redMul(i),n=this.y,f=t.y.redMul(i).redMul(this.z),p=e.redSub(o),u=n.redSub(f);if(p.cmpn(0)===0)return u.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=p.redSqr(),s=c.redMul(p),l=e.redMul(c),d=u.redSqr().redIAdd(s).redISub(l).redISub(l),b=u.redMul(l.redISub(d)).redISub(n.redMul(s)),v=this.z.redMul(p);return this.curve.jpoint(d,b,v)};Vt.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var e=this;for(i=0;i<t;i++)e=e.dbl();return e}var o=this.curve.a,n=this.curve.tinv,f=this.x,p=this.y,u=this.z,c=u.redSqr().redSqr(),s=p.redAdd(p);for(i=0;i<t;i++){var l=f.redSqr(),d=s.redSqr(),b=d.redSqr(),v=l.redAdd(l).redIAdd(l).redIAdd(o.redMul(c)),y=f.redMul(d),x=v.redSqr().redISub(y.redAdd(y)),E=y.redISub(x),R=v.redMul(E);R=R.redIAdd(R).redISub(b);var I=s.redMul(u);i+1<t&&(c=c.redMul(b)),f=x,u=I,s=R}return this.curve.jpoint(f,s.redMul(n),u)};Vt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};Vt.prototype._zeroDbl=function(){var t,i,e;if(this.zOne){var o=this.x.redSqr(),n=this.y.redSqr(),f=n.redSqr(),p=this.x.redAdd(n).redSqr().redISub(o).redISub(f);p=p.redIAdd(p);var u=o.redAdd(o).redIAdd(o),c=u.redSqr().redISub(p).redISub(p),s=f.redIAdd(f);s=s.redIAdd(s),s=s.redIAdd(s),t=c,i=u.redMul(p.redISub(c)).redISub(s),e=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),b=d.redSqr(),v=this.x.redAdd(d).redSqr().redISub(l).redISub(b);v=v.redIAdd(v);var y=l.redAdd(l).redIAdd(l),x=y.redSqr(),E=b.redIAdd(b);E=E.redIAdd(E),E=E.redIAdd(E),t=x.redISub(v).redISub(v),i=y.redMul(v.redISub(t)).redISub(E),e=this.y.redMul(this.z),e=e.redIAdd(e)}return this.curve.jpoint(t,i,e)};Vt.prototype._threeDbl=function(){var t,i,e;if(this.zOne){var o=this.x.redSqr(),n=this.y.redSqr(),f=n.redSqr(),p=this.x.redAdd(n).redSqr().redISub(o).redISub(f);p=p.redIAdd(p);var u=o.redAdd(o).redIAdd(o).redIAdd(this.curve.a),c=u.redSqr().redISub(p).redISub(p);t=c;var s=f.redIAdd(f);s=s.redIAdd(s),s=s.redIAdd(s),i=u.redMul(p.redISub(c)).redISub(s),e=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),b=this.x.redMul(d),v=this.x.redSub(l).redMul(this.x.redAdd(l));v=v.redAdd(v).redIAdd(v);var y=b.redIAdd(b);y=y.redIAdd(y);var x=y.redAdd(y);t=v.redSqr().redISub(x),e=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var E=d.redSqr();E=E.redIAdd(E),E=E.redIAdd(E),E=E.redIAdd(E),i=v.redMul(y.redISub(t)).redISub(E)}return this.curve.jpoint(t,i,e)};Vt.prototype._dbl=function(){var t=this.curve.a,i=this.x,e=this.y,o=this.z,n=o.redSqr().redSqr(),f=i.redSqr(),p=e.redSqr(),u=f.redAdd(f).redIAdd(f).redIAdd(t.redMul(n)),c=i.redAdd(i);c=c.redIAdd(c);var s=c.redMul(p),l=u.redSqr().redISub(s.redAdd(s)),d=s.redISub(l),b=p.redSqr();b=b.redIAdd(b),b=b.redIAdd(b),b=b.redIAdd(b);var v=u.redMul(d).redISub(b),y=e.redAdd(e).redMul(o);return this.curve.jpoint(l,v,y)};Vt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),i=this.y.redSqr(),e=this.z.redSqr(),o=i.redSqr(),n=t.redAdd(t).redIAdd(t),f=n.redSqr(),p=this.x.redAdd(i).redSqr().redISub(t).redISub(o);p=p.redIAdd(p),p=p.redAdd(p).redIAdd(p),p=p.redISub(f);var u=p.redSqr(),c=o.redIAdd(o);c=c.redIAdd(c),c=c.redIAdd(c),c=c.redIAdd(c);var s=n.redIAdd(p).redSqr().redISub(f).redISub(u).redISub(c),l=i.redMul(s);l=l.redIAdd(l),l=l.redIAdd(l);var d=this.x.redMul(u).redISub(l);d=d.redIAdd(d),d=d.redIAdd(d);var b=this.y.redMul(s.redMul(c.redISub(s)).redISub(p.redMul(u)));b=b.redIAdd(b),b=b.redIAdd(b),b=b.redIAdd(b);var v=this.z.redAdd(p).redSqr().redISub(e).redISub(u);return this.curve.jpoint(d,b,v)};Vt.prototype.mul=function(t,i){return t=new mt(t,i),this.curve._wnafMul(this,t)};Vt.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var i=this.z.redSqr(),e=t.z.redSqr();if(this.x.redMul(e).redISub(t.x.redMul(i)).cmpn(0)!==0)return!1;var o=i.redMul(this.z),n=e.redMul(t.z);return this.y.redMul(n).redISub(t.y.redMul(o)).cmpn(0)===0};Vt.prototype.eqXToP=function(t){var i=this.z.redSqr(),e=t.toRed(this.curve.red).redMul(i);if(this.x.cmp(e)===0)return!0;for(var o=t.clone(),n=this.curve.redN.redMul(i);;){if(o.iadd(this.curve.n),o.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),this.x.cmp(e)===0)return!0}};Vt.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};Vt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Po=Ti(function(r,t){var i=t;i.base=Zn,i.short=ow,i.mont=null,i.edwards=null}),Oo=Ti(function(r,t){var i=t,e=wr.assert;function o(p){p.type==="short"?this.curve=new Po.short(p):p.type==="edwards"?this.curve=new Po.edwards(p):this.curve=new Po.mont(p),this.g=this.curve.g,this.n=this.curve.n,this.hash=p.hash,e(this.g.validate(),"Invalid curve"),e(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i.PresetCurve=o;function n(p,u){Object.defineProperty(i,p,{configurable:!0,enumerable:!0,get:function(){var c=new o(u);return Object.defineProperty(i,p,{configurable:!0,enumerable:!0,value:c}),c}})}n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Lr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Lr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Lr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Lr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Lr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Lr.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Lr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=null.crash()}catch{f=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Lr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})});function Bn(r){if(!(this instanceof Bn))return new Bn(r);this.hash=r.hash,this.predResist=!!r.predResist,this.outLen=this.hash.outSize,this.minEntropy=r.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Dr.toArray(r.entropy,r.entropyEnc||"hex"),i=Dr.toArray(r.nonce,r.nonceEnc||"hex"),e=Dr.toArray(r.pers,r.persEnc||"hex");Ou(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,i,e)}var Hd=Bn;Bn.prototype._init=function(t,i,e){var o=t.concat(i).concat(e);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(o),this._reseed=1,this.reseedInterval=281474976710656};Bn.prototype._hmac=function(){return new Lr.hmac(this.hash,this.K)};Bn.prototype._update=function(t){var i=this._hmac().update(this.V).update([0]);t&&(i=i.update(t)),this.K=i.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())};Bn.prototype.reseed=function(t,i,e,o){typeof i!="string"&&(o=e,e=i,i=null),t=Dr.toArray(t,i),e=Dr.toArray(e,o),Ou(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(e||[])),this._reseed=1};Bn.prototype.generate=function(t,i,e,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof i!="string"&&(o=e,e=i,i=null),e&&(e=Dr.toArray(e,o||"hex"),this._update(e));for(var n=[];n.length<t;)this.V=this._hmac().update(this.V).digest(),n=n.concat(this.V);var f=n.slice(0,t);return this._update(e),this._reseed++,Dr.encode(f,i)};var Ba=wr.assert;function Qt(r,t){this.ec=r,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Bu=Qt;Qt.fromPublic=function(t,i,e){return i instanceof Qt?i:new Qt(t,{pub:i,pubEnc:e})};Qt.fromPrivate=function(t,i,e){return i instanceof Qt?i:new Qt(t,{priv:i,privEnc:e})};Qt.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};Qt.prototype.getPublic=function(t,i){return typeof t=="string"&&(i=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),i?this.pub.encode(i,t):this.pub};Qt.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};Qt.prototype._importPrivate=function(t,i){this.priv=new mt(t,i||16),this.priv=this.priv.umod(this.ec.curve.n)};Qt.prototype._importPublic=function(t,i){if(t.x||t.y){this.ec.curve.type==="mont"?Ba(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Ba(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,i)};Qt.prototype.derive=function(t){return t.validate()||Ba(t.validate(),"public point not validated"),t.mul(this.priv).getX()};Qt.prototype.sign=function(t,i,e){return this.ec.sign(t,this,i,e)};Qt.prototype.verify=function(t,i){return this.ec.verify(t,i,this)};Qt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var sw=wr.assert;function ys(r,t){if(r instanceof ys)return r;this._importDER(r,t)||(sw(r.r&&r.s,"Signature without r or s"),this.r=new mt(r.r,16),this.s=new mt(r.s,16),r.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=r.recoveryParam)}var ws=ys;function aw(){this.place=0}function zs(r,t){var i=r[t.place++];if(!(i&128))return i;var e=i&15;if(e===0||e>4)return!1;for(var o=0,n=0,f=t.place;n<e;n++,f++)o<<=8,o|=r[f],o>>>=0;return o<=127?!1:(t.place=f,o)}function Kc(r){for(var t=0,i=r.length-1;!r[t]&&!(r[t+1]&128)&&t<i;)t++;return t===0?r:r.slice(t)}ys.prototype._importDER=function(t,i){t=wr.toArray(t,i);var e=new aw;if(t[e.place++]!==48)return!1;var o=zs(t,e);if(o===!1||o+e.place!==t.length||t[e.place++]!==2)return!1;var n=zs(t,e);if(n===!1)return!1;var f=t.slice(e.place,n+e.place);if(e.place+=n,t[e.place++]!==2)return!1;var p=zs(t,e);if(p===!1||t.length!==p+e.place)return!1;var u=t.slice(e.place,p+e.place);if(f[0]===0)if(f[1]&128)f=f.slice(1);else return!1;if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;return this.r=new mt(f),this.s=new mt(u),this.recoveryParam=null,!0};function Ws(r,t){if(t<128){r.push(t);return}var i=1+(Math.log(t)/Math.LN2>>>3);for(r.push(i|128);--i;)r.push(t>>>(i<<3)&255);r.push(t)}ys.prototype.toDER=function(t){var i=this.r.toArray(),e=this.s.toArray();for(i[0]&128&&(i=[0].concat(i)),e[0]&128&&(e=[0].concat(e)),i=Kc(i),e=Kc(e);!e[0]&&!(e[1]&128);)e=e.slice(1);var o=[2];Ws(o,i.length),o=o.concat(i),o.push(2),Ws(o,e.length);var n=o.concat(e),f=[48];return Ws(f,n.length),f=f.concat(n),wr.encode(f,t)};var uw=function(){throw new Error("unsupported")},zd=wr.assert;function Rr(r){if(!(this instanceof Rr))return new Rr(r);typeof r=="string"&&(zd(Object.prototype.hasOwnProperty.call(Oo,r),"Unknown curve "+r),r=Oo[r]),r instanceof Oo.PresetCurve&&(r={curve:r}),this.curve=r.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=r.curve.g,this.g.precompute(r.curve.n.bitLength()+1),this.hash=r.hash||r.curve.hash}var fw=Rr;Rr.prototype.keyPair=function(t){return new Bu(this,t)};Rr.prototype.keyFromPrivate=function(t,i){return Bu.fromPrivate(this,t,i)};Rr.prototype.keyFromPublic=function(t,i){return Bu.fromPublic(this,t,i)};Rr.prototype.genKeyPair=function(t){t||(t={});for(var i=new Hd({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||uw(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),e=this.n.byteLength(),o=this.n.sub(new mt(2));;){var n=new mt(i.generate(e));if(!(n.cmp(o)>0))return n.iaddn(1),this.keyFromPrivate(n)}};Rr.prototype._truncateToN=function(t,i){var e=t.byteLength()*8-this.n.bitLength();return e>0&&(t=t.ushrn(e)),!i&&t.cmp(this.n)>=0?t.sub(this.n):t};Rr.prototype.sign=function(t,i,e,o){typeof e=="object"&&(o=e,e=null),o||(o={}),i=this.keyFromPrivate(i,e),t=this._truncateToN(new mt(t,16));for(var n=this.n.byteLength(),f=i.getPrivate().toArray("be",n),p=t.toArray("be",n),u=new Hd({hash:this.hash,entropy:f,nonce:p,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new mt(1)),s=0;;s++){var l=o.k?o.k(s):new mt(u.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),!(l.cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var b=d.getX(),v=b.umod(this.n);if(v.cmpn(0)!==0){var y=l.invm(this.n).mul(v.mul(i.getPrivate()).iadd(t));if(y=y.umod(this.n),y.cmpn(0)!==0){var x=(d.getY().isOdd()?1:0)|(b.cmp(v)!==0?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),x^=1),new ws({r:v,s:y,recoveryParam:x})}}}}}};Rr.prototype.verify=function(t,i,e,o){t=this._truncateToN(new mt(t,16)),e=this.keyFromPublic(e,o),i=new ws(i,"hex");var n=i.r,f=i.s;if(n.cmpn(1)<0||n.cmp(this.n)>=0||f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var p=f.invm(this.n),u=p.mul(t).umod(this.n),c=p.mul(n).umod(this.n),s;return this.curve._maxwellTrick?(s=this.g.jmulAdd(u,e.getPublic(),c),s.isInfinity()?!1:s.eqXToP(n)):(s=this.g.mulAdd(u,e.getPublic(),c),s.isInfinity()?!1:s.getX().umod(this.n).cmp(n)===0)};Rr.prototype.recoverPubKey=function(r,t,i,e){zd((3&i)===i,"The recovery param is more than two bits"),t=new ws(t,e);var o=this.n,n=new mt(r),f=t.r,p=t.s,u=i&1,c=i>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?f=this.curve.pointFromX(f.add(this.curve.n),u):f=this.curve.pointFromX(f,u);var s=t.r.invm(o),l=o.sub(n).mul(s).umod(o),d=p.mul(s).umod(o);return this.g.mulAdd(l,f,d)};Rr.prototype.getKeyRecoveryParam=function(r,t,i,e){if(t=new ws(t,e),t.recoveryParam!==null)return t.recoveryParam;for(var o=0;o<4;o++){var n;try{n=this.recoverPubKey(r,t,o)}catch{continue}if(n.eq(i))return o}throw new Error("Unable to find valid recovery factor")};var cw=Ti(function(r,t){var i=t;i.version="6.5.4",i.utils=wr,i.rand=function(){throw new Error("unsupported")},i.curve=Po,i.curves=Oo,i.ec=fw,i.eddsa=null}),lw=cw.ec;const hw="signing-key/5.7.0",La=new xe(hw);let Ks=null;function $r(){return Ks||(Ks=new lw("secp256k1")),Ks}class dw{constructor(t){At(this,"curve","secp256k1"),At(this,"privateKey",dt(t)),Jn(this.privateKey)!==32&&La.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const i=$r().keyFromPrivate(vt(this.privateKey));At(this,"publicKey","0x"+i.getPublic(!1,"hex")),At(this,"compressedPublicKey","0x"+i.getPublic(!0,"hex")),At(this,"_isSigningKey",!0)}_addPoint(t){const i=$r().keyFromPublic(vt(this.publicKey)),e=$r().keyFromPublic(vt(t));return"0x"+i.pub.add(e.pub).encodeCompressed("hex")}signDigest(t){const i=$r().keyFromPrivate(vt(this.privateKey)),e=vt(t);e.length!==32&&La.throwArgumentError("bad digest length","digest",t);const o=i.sign(e,{canonical:!0});return ps({recoveryParam:o.recoveryParam,r:Ft("0x"+o.r.toString(16),32),s:Ft("0x"+o.s.toString(16),32)})}computeSharedSecret(t){const i=$r().keyFromPrivate(vt(this.privateKey)),e=$r().keyFromPublic(vt(Wd(t)));return Ft("0x"+i.derive(e.getPublic()).toString(16),32)}static isSigningKey(t){return!!(t&&t._isSigningKey)}}function pw(r,t){const i=ps(t),e={r:vt(i.r),s:vt(i.s)};return"0x"+$r().recoverPubKey(vt(r),e,i.recoveryParam).encode("hex",!1)}function Wd(r,t){const i=vt(r);if(i.length===32){const e=new dw(i);return t?"0x"+$r().keyFromPrivate(i).getPublic(!0,"hex"):e.publicKey}else{if(i.length===33)return t?dt(i):"0x"+$r().keyFromPublic(i).getPublic(!1,"hex");if(i.length===65)return t?"0x"+$r().keyFromPublic(i).getPublic(!0,"hex"):dt(i)}return La.throwArgumentError("invalid public or private key","key","[REDACTED]")}const mw="transactions/5.7.0",wn=new xe(mw);var Gc;(function(r){r[r.legacy=0]="legacy",r[r.eip2930=1]="eip2930",r[r.eip1559=2]="eip1559"})(Gc||(Gc={}));function Lu(r){return r==="0x"?null:zr(r)}function Jt(r){return r==="0x"?jb:ot.from(r)}function gw(r){const t=Wd(r);return zr(tr(Gt(tr(t,1)),12))}function Kd(r,t){return gw(pw(vt(r),t))}function dr(r,t){const i=vi(ot.from(r).toHexString());return i.length>32&&wn.throwArgumentError("invalid length for "+t,"transaction:"+t,r),i}function Gs(r,t){return{address:zr(r),storageKeys:(t||[]).map((i,e)=>(Jn(i)!==32&&wn.throwArgumentError("invalid access list storageKey",`accessList[${r}:${e}]`,i),i.toLowerCase()))}}function ho(r){if(Array.isArray(r))return r.map((i,e)=>Array.isArray(i)?(i.length>2&&wn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${e}]`,i),Gs(i[0],i[1])):Gs(i.address,i.storageKeys));const t=Object.keys(r).map(i=>{const e=r[i].reduce((o,n)=>(o[n]=!0,o),{});return Gs(i,Object.keys(e).sort())});return t.sort((i,e)=>i.address.localeCompare(e.address)),t}function Gd(r){return ho(r).map(t=>[t.address,t.storageKeys])}function vw(r,t){if(r.gasPrice!=null){const e=ot.from(r.gasPrice),o=ot.from(r.maxFeePerGas||0);e.eq(o)||wn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:e,maxFeePerGas:o})}const i=[dr(r.chainId||0,"chainId"),dr(r.nonce||0,"nonce"),dr(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),dr(r.maxFeePerGas||0,"maxFeePerGas"),dr(r.gasLimit||0,"gasLimit"),r.to!=null?zr(r.to):"0x",dr(r.value||0,"value"),r.data||"0x",Gd(r.accessList||[])];if(t){const e=ps(t);i.push(dr(e.recoveryParam,"recoveryParam")),i.push(vi(e.r)),i.push(vi(e.s))}return br(["0x02",ms(i)])}function bw(r,t){const i=[dr(r.chainId||0,"chainId"),dr(r.nonce||0,"nonce"),dr(r.gasPrice||0,"gasPrice"),dr(r.gasLimit||0,"gasLimit"),r.to!=null?zr(r.to):"0x",dr(r.value||0,"value"),r.data||"0x",Gd(r.accessList||[])];if(t){const e=ps(t);i.push(dr(e.recoveryParam,"recoveryParam")),i.push(vi(e.r)),i.push(vi(e.s))}return br(["0x01",ms(i)])}function Vd(r,t,i){try{const e=Jt(t[0]).toNumber();if(e!==0&&e!==1)throw new Error("bad recid");r.v=e}catch{wn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}r.r=Ft(t[1],32),r.s=Ft(t[2],32);try{const e=Gt(i(r));r.from=Kd(e,{r:r.r,s:r.s,recoveryParam:r.v})}catch{}}function yw(r){const t=Tu(r.slice(1));t.length!==9&&t.length!==12&&wn.throwArgumentError("invalid component count for transaction type: 2","payload",dt(r));const i=Jt(t[2]),e=Jt(t[3]),o={type:2,chainId:Jt(t[0]).toNumber(),nonce:Jt(t[1]).toNumber(),maxPriorityFeePerGas:i,maxFeePerGas:e,gasPrice:null,gasLimit:Jt(t[4]),to:Lu(t[5]),value:Jt(t[6]),data:t[7],accessList:ho(t[8])};return t.length===9||(o.hash=Gt(r),Vd(o,t.slice(9),vw)),o}function ww(r){const t=Tu(r.slice(1));t.length!==8&&t.length!==11&&wn.throwArgumentError("invalid component count for transaction type: 1","payload",dt(r));const i={type:1,chainId:Jt(t[0]).toNumber(),nonce:Jt(t[1]).toNumber(),gasPrice:Jt(t[2]),gasLimit:Jt(t[3]),to:Lu(t[4]),value:Jt(t[5]),data:t[6],accessList:ho(t[7])};return t.length===8||(i.hash=Gt(r),Vd(i,t.slice(8),bw)),i}function _w(r){const t=Tu(r);t.length!==9&&t.length!==6&&wn.throwArgumentError("invalid raw transaction","rawTransaction",r);const i={nonce:Jt(t[0]).toNumber(),gasPrice:Jt(t[1]),gasLimit:Jt(t[2]),to:Lu(t[3]),value:Jt(t[4]),data:t[5],chainId:0};if(t.length===6)return i;try{i.v=ot.from(t[6]).toNumber()}catch{return i}if(i.r=Ft(t[7],32),i.s=Ft(t[8],32),ot.from(i.r).isZero()&&ot.from(i.s).isZero())i.chainId=i.v,i.v=0;else{i.chainId=Math.floor((i.v-35)/2),i.chainId<0&&(i.chainId=0);let e=i.v-27;const o=t.slice(0,6);i.chainId!==0&&(o.push(dt(i.chainId)),o.push("0x"),o.push("0x"),e-=i.chainId*2+8);const n=Gt(ms(o));try{i.from=Kd(n,{r:dt(i.r),s:dt(i.s),recoveryParam:e})}catch{}i.hash=Gt(r)}return i.type=null,i}function Mw(r){const t=vt(r);if(t[0]>127)return _w(t);switch(t[0]){case 1:return ww(t);case 2:return yw(t)}return wn.throwError(`unsupported transaction type: ${t[0]}`,xe.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}class Jd{constructor(t){At(this,"alphabet",t),At(this,"base",t.length),At(this,"_alphabetMap",{}),At(this,"_leader",t.charAt(0));for(let i=0;i<t.length;i++)this._alphabetMap[t.charAt(i)]=i}encode(t){let i=vt(t);if(i.length===0)return"";let e=[0];for(let n=0;n<i.length;++n){let f=i[n];for(let p=0;p<e.length;++p)f+=e[p]<<8,e[p]=f%this.base,f=f/this.base|0;for(;f>0;)e.push(f%this.base),f=f/this.base|0}let o="";for(let n=0;i[n]===0&&n<i.length-1;++n)o+=this._leader;for(let n=e.length-1;n>=0;--n)o+=this.alphabet[e[n]];return o}decode(t){if(typeof t!="string")throw new TypeError("Expected String");let i=[];if(t.length===0)return new Uint8Array(i);i.push(0);for(let e=0;e<t.length;e++){let o=this._alphabetMap[t[e]];if(o===void 0)throw new Error("Non-base"+this.base+" character");let n=o;for(let f=0;f<i.length;++f)n+=i[f]*this.base,i[f]=n&255,n>>=8;for(;n>0;)i.push(n&255),n>>=8}for(let e=0;t[e]===this._leader&&e<t.length-1;++e)i.push(0);return vt(new Uint8Array(i.reverse()))}}new Jd("abcdefghijklmnopqrstuvwxyz234567");const ja=new Jd("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");function Vc(r){return"0x"+Lr.sha256().update(vt(r)).digest("hex")}const xw="networks/5.7.1",Jc=new xe(xw);function Aw(r){return r&&typeof r.renetwork=="function"}function pn(r){const t=function(i,e){e==null&&(e={});const o=[];if(i.InfuraProvider&&e.infura!=="-")try{o.push(new i.InfuraProvider(r,e.infura))}catch{}if(i.EtherscanProvider&&e.etherscan!=="-")try{o.push(new i.EtherscanProvider(r,e.etherscan))}catch{}if(i.AlchemyProvider&&e.alchemy!=="-")try{o.push(new i.AlchemyProvider(r,e.alchemy))}catch{}if(i.PocketProvider&&e.pocket!=="-"){const n=["goerli","ropsten","rinkeby","sepolia"];try{const f=new i.PocketProvider(r,e.pocket);f.network&&n.indexOf(f.network.name)===-1&&o.push(f)}catch{}}if(i.CloudflareProvider&&e.cloudflare!=="-")try{o.push(new i.CloudflareProvider(r))}catch{}if(i.AnkrProvider&&e.ankr!=="-")try{const n=["ropsten"],f=new i.AnkrProvider(r,e.ankr);f.network&&n.indexOf(f.network.name)===-1&&o.push(f)}catch{}if(o.length===0)return null;if(i.FallbackProvider){let n=1;return e.quorum!=null?n=e.quorum:r==="homestead"&&(n=2),new i.FallbackProvider(o,n)}return o[0]};return t.renetwork=function(i){return pn(i)},t}function Yo(r,t){const i=function(e,o){return e.JsonRpcProvider?new e.JsonRpcProvider(r,t):null};return i.renetwork=function(e){return Yo(r,e)},i}const Yc={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:pn("homestead")},$c={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:pn("ropsten")},Zc={chainId:63,name:"classicMordor",_defaultProvider:Yo("https://www.ethercluster.com/mordor","classicMordor")},Ao={unspecified:{chainId:0,name:"unspecified"},homestead:Yc,mainnet:Yc,morden:{chainId:2,name:"morden"},ropsten:$c,testnet:$c,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:pn("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:pn("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:pn("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:pn("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Yo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Zc,classicTestnet:Zc,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Yo("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:pn("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:pn("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Ew(r){if(r==null)return null;if(typeof r=="number"){for(const e in Ao){const o=Ao[e];if(o.chainId===r)return{name:o.name,chainId:o.chainId,ensAddress:o.ensAddress||null,_defaultProvider:o._defaultProvider||null}}return{chainId:r,name:"unknown"}}if(typeof r=="string"){const e=Ao[r];return e==null?null:{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress,_defaultProvider:e._defaultProvider||null}}const t=Ao[r.name];if(!t)return typeof r.chainId!="number"&&Jc.throwArgumentError("invalid network chainId","network",r),r;r.chainId!==0&&r.chainId!==t.chainId&&Jc.throwArgumentError("network chainId mismatch","network",r);let i=r._defaultProvider||null;return i==null&&t._defaultProvider&&(Aw(t._defaultProvider)?i=t._defaultProvider.renetwork(r):i=t._defaultProvider),{name:r.name,chainId:t.chainId,ensAddress:r.ensAddress||t.ensAddress||null,_defaultProvider:i}}const Sw="web/5.7.1";var kw=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};function Rw(r,t){return kw(this,void 0,void 0,function*(){t==null&&(t={});const i={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(t.skipFetchSetup!==!0&&(i.mode="cors",i.cache="no-cache",i.credentials="same-origin",i.redirect="follow",i.referrer="client"),t.fetchOptions!=null){const f=t.fetchOptions;f.mode&&(i.mode=f.mode),f.cache&&(i.cache=f.cache),f.credentials&&(i.credentials=f.credentials),f.redirect&&(i.redirect=f.redirect),f.referrer&&(i.referrer=f.referrer)}const e=yield fetch(r,i),o=yield e.arrayBuffer(),n={};return e.headers.forEach?e.headers.forEach((f,p)=>{n[p.toLowerCase()]=f}):e.headers.keys().forEach(f=>{n[f.toLowerCase()]=e.headers.get(f)}),{headers:n,statusCode:e.status,statusMessage:e.statusText,body:vt(new Uint8Array(o))}})}var Tw=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Nr=new xe(Sw);function Qc(r){return new Promise(t=>{setTimeout(t,r)})}function An(r,t){if(r==null)return null;if(typeof r=="string")return r;if(ku(r)){if(t&&(t.split("/")[0]==="text"||t.split(";")[0].trim()==="application/json"))try{return gs(r)}catch{}return dt(r)}return r}function Iw(r){return gn(r.replace(/%([0-9a-f][0-9a-f])/gi,(t,i)=>String.fromCharCode(parseInt(i,16))))}function Cw(r,t,i){const e=typeof r=="object"&&r.throttleLimit!=null?r.throttleLimit:12;Nr.assertArgument(e>0&&e%1===0,"invalid connection throttle limit","connection.throttleLimit",e);const o=typeof r=="object"?r.throttleCallback:null,n=typeof r=="object"&&typeof r.throttleSlotInterval=="number"?r.throttleSlotInterval:100;Nr.assertArgument(n>0&&n%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",n);const f=typeof r=="object"?!!r.errorPassThrough:!1,p={};let u=null;const c={method:"GET"};let s=!1,l=2*60*1e3;if(typeof r=="string")u=r;else if(typeof r=="object"){if((r==null||r.url==null)&&Nr.throwArgumentError("missing URL","connection.url",r),u=r.url,typeof r.timeout=="number"&&r.timeout>0&&(l=r.timeout),r.headers)for(const E in r.headers)p[E.toLowerCase()]={key:E,value:String(r.headers[E])},["if-none-match","if-modified-since"].indexOf(E.toLowerCase())>=0&&(s=!0);if(c.allowGzip=!!r.allowGzip,r.user!=null&&r.password!=null){u.substring(0,6)!=="https:"&&r.allowInsecureAuthentication!==!0&&Nr.throwError("basic authentication requires a secure https url",xe.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:r.user,password:"[REDACTED]"});const E=r.user+":"+r.password;p.authorization={key:"Authorization",value:"Basic "+dd(gn(E))}}r.skipFetchSetup!=null&&(c.skipFetchSetup=!!r.skipFetchSetup),r.fetchOptions!=null&&(c.fetchOptions=ar(r.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),b=u?u.match(d):null;if(b)try{const E={statusCode:200,statusMessage:"OK",headers:{"content-type":b[1]||"text/plain"},body:b[2]?hd(b[3]):Iw(b[3])};let R=E.body;return i&&(R=i(E.body,E)),Promise.resolve(R)}catch(E){Nr.throwError("processing response error",xe.errors.SERVER_ERROR,{body:An(b[1],b[2]),error:E,requestBody:null,requestMethod:"GET",url:u})}t&&(c.method="POST",c.body=t,p["content-type"]==null&&(p["content-type"]={key:"Content-Type",value:"application/octet-stream"}),p["content-length"]==null&&(p["content-length"]={key:"Content-Length",value:String(t.length)}));const v={};Object.keys(p).forEach(E=>{const R=p[E];v[R.key]=R.value}),c.headers=v;const y=function(){let E=null;return{promise:new Promise(function(O,A){l&&(E=setTimeout(()=>{E!=null&&(E=null,A(Nr.makeError("timeout",xe.errors.TIMEOUT,{requestBody:An(c.body,v["content-type"]),requestMethod:c.method,timeout:l,url:u})))},l))}),cancel:function(){E!=null&&(clearTimeout(E),E=null)}}}(),x=function(){return Tw(this,void 0,void 0,function*(){for(let E=0;E<e;E++){let R=null;try{if(R=yield Rw(u,c),E<e){if(R.statusCode===301||R.statusCode===302){const O=R.headers.location||"";if(c.method==="GET"&&O.match(/^https:/)){u=R.headers.location;continue}}else if(R.statusCode===429){let O=!0;if(o&&(O=yield o(E,u)),O){let A=0;const P=R.headers["retry-after"];typeof P=="string"&&P.match(/^[1-9][0-9]*$/)?A=parseInt(P)*1e3:A=n*parseInt(String(Math.random()*Math.pow(2,E))),yield Qc(A);continue}}}}catch(O){R=O.response,R==null&&(y.cancel(),Nr.throwError("missing response",xe.errors.SERVER_ERROR,{requestBody:An(c.body,v["content-type"]),requestMethod:c.method,serverError:O,url:u}))}let I=R.body;if(s&&R.statusCode===304?I=null:!f&&(R.statusCode<200||R.statusCode>=300)&&(y.cancel(),Nr.throwError("bad response",xe.errors.SERVER_ERROR,{status:R.statusCode,headers:R.headers,body:An(I,R.headers?R.headers["content-type"]:null),requestBody:An(c.body,v["content-type"]),requestMethod:c.method,url:u})),i)try{const O=yield i(I,R);return y.cancel(),O}catch(O){if(O.throttleRetry&&E<e){let A=!0;if(o&&(A=yield o(E,u)),A){const P=n*parseInt(String(Math.random()*Math.pow(2,E)));yield Qc(P);continue}}y.cancel(),Nr.throwError("processing response error",xe.errors.SERVER_ERROR,{body:An(I,R.headers?R.headers["content-type"]:null),error:O,requestBody:An(c.body,v["content-type"]),requestMethod:c.method,url:u})}return y.cancel(),I}return Nr.throwError("failed response",xe.errors.SERVER_ERROR,{requestBody:An(c.body,v["content-type"]),requestMethod:c.method,url:u})})}();return Promise.race([y.promise,x])}function ju(r,t,i){let e=(n,f)=>{let p=null;if(n!=null)try{p=JSON.parse(gs(n))}catch(u){Nr.throwError("invalid JSON",xe.errors.SERVER_ERROR,{body:n,error:u})}return i&&(p=i(p,f)),p},o=null;if(t!=null){o=gn(t);const n=typeof r=="string"?{url:r}:ar(r);n.headers?Object.keys(n.headers).filter(p=>p.toLowerCase()==="content-type").length!==0||(n.headers=ar(n.headers),n.headers["content-type"]="application/json"):n.headers={"content-type":"application/json"},r=n}return Cw(r,o,e)}function Di(r,t){return t||(t={}),t=ar(t),t.floor==null&&(t.floor=0),t.ceiling==null&&(t.ceiling=1e4),t.interval==null&&(t.interval=250),new Promise(function(i,e){let o=null,n=!1;const f=()=>n?!1:(n=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout(()=>{f()&&e(new Error("timeout"))},t.timeout));const p=t.retryLimit;let u=0;function c(){return r().then(function(s){if(s!==void 0)f()&&i(s);else if(t.oncePoll)t.oncePoll.once("poll",c);else if(t.onceBlock)t.onceBlock.once("block",c);else if(!n){if(u++,u>p){f()&&e(new Error("retry limit reached"));return}let l=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));l<t.floor&&(l=t.floor),l>t.ceiling&&(l=t.ceiling),setTimeout(c,l)}return null},function(s){f()&&e(s)})}c()})}var $o="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ua={};for(var Eo=0;Eo<$o.length;Eo++){var Vs=$o.charAt(Eo);if(Ua[Vs]!==void 0)throw new TypeError(Vs+" is ambiguous");Ua[Vs]=Eo}function ci(r){var t=r>>25;return(r&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function Yd(r){for(var t=1,i=0;i<r.length;++i){var e=r.charCodeAt(i);if(e<33||e>126)return"Invalid prefix ("+r+")";t=ci(t)^e>>5}for(t=ci(t),i=0;i<r.length;++i){var o=r.charCodeAt(i);t=ci(t)^o&31}return t}function Pw(r,t,i){if(i=i||90,r.length+7+t.length>i)throw new TypeError("Exceeds length limit");r=r.toLowerCase();var e=Yd(r);if(typeof e=="string")throw new Error(e);for(var o=r+"1",n=0;n<t.length;++n){var f=t[n];if(f>>5)throw new Error("Non 5-bit word");e=ci(e)^f,o+=$o.charAt(f)}for(n=0;n<6;++n)e=ci(e);for(e^=1,n=0;n<6;++n){var p=e>>(5-n)*5&31;o+=$o.charAt(p)}return o}function $d(r,t){if(t=t||90,r.length<8)return r+" too short";if(r.length>t)return"Exceeds length limit";var i=r.toLowerCase(),e=r.toUpperCase();if(r!==i&&r!==e)return"Mixed-case string "+r;r=i;var o=r.lastIndexOf("1");if(o===-1)return"No separator character for "+r;if(o===0)return"Missing prefix for "+r;var n=r.slice(0,o),f=r.slice(o+1);if(f.length<6)return"Data too short";var p=Yd(n);if(typeof p=="string")return p;for(var u=[],c=0;c<f.length;++c){var s=f.charAt(c),l=Ua[s];if(l===void 0)return"Unknown character "+s;p=ci(p)^l,!(c+6>=f.length)&&u.push(l)}return p!==1?"Invalid checksum for "+r:{prefix:n,words:u}}function Ow(){var r=$d.apply(null,arguments);if(typeof r=="object")return r}function Nw(r){var t=$d.apply(null,arguments);if(typeof t=="object")return t;throw new Error(t)}function _s(r,t,i,e){for(var o=0,n=0,f=(1<<i)-1,p=[],u=0;u<r.length;++u)for(o=o<<t|r[u],n+=t;n>=i;)n-=i,p.push(o>>n&f);if(e)n>0&&p.push(o<<i-n&f);else{if(n>=t)return"Excess padding";if(o<<i-n&f)return"Non-zero padding"}return p}function Bw(r){var t=_s(r,8,5,!0);if(Array.isArray(t))return t}function Lw(r){var t=_s(r,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)}function jw(r){var t=_s(r,5,8,!1);if(Array.isArray(t))return t}function Uw(r){var t=_s(r,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}var Xc={decodeUnsafe:Ow,decode:Nw,encode:Pw,toWordsUnsafe:Bw,toWords:Lw,fromWordsUnsafe:jw,fromWords:Uw};const Ms="providers/5.7.2",Ni=new xe(Ms);class it{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const t={},i=this.address.bind(this),e=this.bigNumber.bind(this),o=this.blockTag.bind(this),n=this.data.bind(this),f=this.hash.bind(this),p=this.hex.bind(this),u=this.number.bind(this),c=this.type.bind(this),s=l=>this.data(l,!0);return t.transaction={hash:f,type:c,accessList:it.allowNull(this.accessList.bind(this),null),blockHash:it.allowNull(f,null),blockNumber:it.allowNull(u,null),transactionIndex:it.allowNull(u,null),confirmations:it.allowNull(u,null),from:i,gasPrice:it.allowNull(e),maxPriorityFeePerGas:it.allowNull(e),maxFeePerGas:it.allowNull(e),gasLimit:e,to:it.allowNull(i,null),value:e,nonce:u,data:n,r:it.allowNull(this.uint256),s:it.allowNull(this.uint256),v:it.allowNull(u),creates:it.allowNull(i,null),raw:it.allowNull(n)},t.transactionRequest={from:it.allowNull(i),nonce:it.allowNull(u),gasLimit:it.allowNull(e),gasPrice:it.allowNull(e),maxPriorityFeePerGas:it.allowNull(e),maxFeePerGas:it.allowNull(e),to:it.allowNull(i),value:it.allowNull(e),data:it.allowNull(s),type:it.allowNull(u),accessList:it.allowNull(this.accessList.bind(this),null)},t.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:f,address:i,topics:it.arrayOf(f),data:n,logIndex:u,blockHash:f},t.receipt={to:it.allowNull(this.address,null),from:it.allowNull(this.address,null),contractAddress:it.allowNull(i,null),transactionIndex:u,root:it.allowNull(p),gasUsed:e,logsBloom:it.allowNull(n),blockHash:f,transactionHash:f,logs:it.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:it.allowNull(u,null),cumulativeGasUsed:e,effectiveGasPrice:it.allowNull(e),status:it.allowNull(u),type:c},t.block={hash:it.allowNull(f),parentHash:f,number:u,timestamp:u,nonce:it.allowNull(p),difficulty:this.difficulty.bind(this),gasLimit:e,gasUsed:e,miner:it.allowNull(i),extraData:n,transactions:it.allowNull(it.arrayOf(f)),baseFeePerGas:it.allowNull(e)},t.blockWithTransactions=ar(t.block),t.blockWithTransactions.transactions=it.allowNull(it.arrayOf(this.transactionResponse.bind(this))),t.filter={fromBlock:it.allowNull(o,void 0),toBlock:it.allowNull(o,void 0),blockHash:it.allowNull(f,void 0),address:it.allowNull(i,void 0),topics:it.allowNull(this.topics.bind(this),void 0)},t.filterLog={blockNumber:it.allowNull(u),blockHash:it.allowNull(f),transactionIndex:u,removed:it.allowNull(this.boolean.bind(this)),address:i,data:it.allowFalsish(n,"0x"),topics:it.arrayOf(f),transactionHash:f,logIndex:u},t}accessList(t){return ho(t||[])}number(t){return t==="0x"?0:ot.from(t).toNumber()}type(t){return t==="0x"||t==null?0:ot.from(t).toNumber()}bigNumber(t){return ot.from(t)}boolean(t){if(typeof t=="boolean")return t;if(typeof t=="string"){if(t=t.toLowerCase(),t==="true")return!0;if(t==="false")return!1}throw new Error("invalid boolean - "+t)}hex(t,i){return typeof t=="string"&&(!i&&t.substring(0,2)!=="0x"&&(t="0x"+t),Rt(t))?t.toLowerCase():Ni.throwArgumentError("invalid hash","value",t)}data(t,i){const e=this.hex(t,i);if(e.length%2!==0)throw new Error("invalid data; odd-length - "+t);return e}address(t){return zr(t)}callAddress(t){if(!Rt(t,32))return null;const i=zr(tr(t,12));return i===Lb?null:i}contractAddress(t){return Bb(t)}blockTag(t){if(t==null)return"latest";if(t==="earliest")return"0x0";switch(t){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return t}if(typeof t=="number"||Rt(t))return Ru(t);throw new Error("invalid blockTag")}hash(t,i){const e=this.hex(t,i);return Jn(e)!==32?Ni.throwArgumentError("invalid hash","value",t):e}difficulty(t){if(t==null)return null;const i=ot.from(t);try{return i.toNumber()}catch{}return null}uint256(t){if(!Rt(t))throw new Error("invalid uint256");return Ft(t,32)}_block(t,i){t.author!=null&&t.miner==null&&(t.miner=t.author);const e=t._difficulty!=null?t._difficulty:t.difficulty,o=it.check(i,t);return o._difficulty=e==null?null:ot.from(e),o}block(t){return this._block(t,this.formats.block)}blockWithTransactions(t){return this._block(t,this.formats.blockWithTransactions)}transactionRequest(t){return it.check(this.formats.transactionRequest,t)}transactionResponse(t){t.gas!=null&&t.gasLimit==null&&(t.gasLimit=t.gas),t.to&&ot.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),t.input!=null&&t.data==null&&(t.data=t.input),t.to==null&&t.creates==null&&(t.creates=this.contractAddress(t)),(t.type===1||t.type===2)&&t.accessList==null&&(t.accessList=[]);const i=it.check(this.formats.transaction,t);if(t.chainId!=null){let e=t.chainId;Rt(e)&&(e=ot.from(e).toNumber()),i.chainId=e}else{let e=t.networkId;e==null&&i.v==null&&(e=t.chainId),Rt(e)&&(e=ot.from(e).toNumber()),typeof e!="number"&&i.v!=null&&(e=(i.v-35)/2,e<0&&(e=0),e=parseInt(e)),typeof e!="number"&&(e=0),i.chainId=e}return i.blockHash&&i.blockHash.replace(/0/g,"")==="x"&&(i.blockHash=null),i}transaction(t){return Mw(t)}receiptLog(t){return it.check(this.formats.receiptLog,t)}receipt(t){const i=it.check(this.formats.receipt,t);if(i.root!=null)if(i.root.length<=4){const e=ot.from(i.root).toNumber();e===0||e===1?(i.status!=null&&i.status!==e&&Ni.throwArgumentError("alt-root-status/status mismatch","value",{root:i.root,status:i.status}),i.status=e,delete i.root):Ni.throwArgumentError("invalid alt-root-status","value.root",i.root)}else i.root.length!==66&&Ni.throwArgumentError("invalid root hash","value.root",i.root);return i.status!=null&&(i.byzantium=!0),i}topics(t){return Array.isArray(t)?t.map(i=>this.topics(i)):t!=null?this.hash(t,!0):null}filter(t){return it.check(this.formats.filter,t)}filterLog(t){return it.check(this.formats.filterLog,t)}static check(t,i){const e={};for(const o in t)try{const n=t[o](i[o]);n!==void 0&&(e[o]=n)}catch(n){throw n.checkKey=o,n.checkValue=i[o],n}return e}static allowNull(t,i){return function(e){return e==null?i:t(e)}}static allowFalsish(t,i){return function(e){return e?t(e):i}}static arrayOf(t){return function(i){if(!Array.isArray(i))throw new Error("not an array");const e=[];return i.forEach(function(o){e.push(t(o))}),e}}}var ct=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const _t=new xe(Ms),Dw=10;function el(r){return r==null?"null":(Jn(r)!==32&&_t.throwArgumentError("invalid topic","topic",r),r.toLowerCase())}function tl(r){for(r=r.slice();r.length>0&&r[r.length-1]==null;)r.pop();return r.map(t=>{if(Array.isArray(t)){const i={};t.forEach(o=>{i[el(o)]=!0});const e=Object.keys(i);return e.sort(),e.join("|")}else return el(t)}).join("&")}function Fw(r){return r===""?[]:r.split(/&/g).map(t=>{if(t==="")return[];const i=t.split("|").map(e=>e==="null"?null:e);return i.length===1?i[0]:i})}function ei(r){if(typeof r=="string"){if(r=r.toLowerCase(),Jn(r)===32)return"tx:"+r;if(r.indexOf(":")===-1)return r}else{if(Array.isArray(r))return"filter:*:"+tl(r);if(Ey.isForkEvent(r))throw _t.warn("not implemented"),new Error("not implemented");if(r&&typeof r=="object")return"filter:"+(r.address||"*")+":"+tl(r.topics||[])}throw new Error("invalid event - "+r)}function Bi(){return new Date().getTime()}function rl(r){return new Promise(t=>{setTimeout(t,r)})}const qw=["block","network","pending","poll"];let Hw=class{constructor(t,i,e){At(this,"tag",t),At(this,"listener",i),At(this,"once",e),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const t=this.tag.split(":");return t[0]!=="tx"?null:t[1]}get filter(){const t=this.tag.split(":");if(t[0]!=="filter")return null;const i=t[1],e=Fw(t[2]),o={};return e.length>0&&(o.topics=e),i&&i!=="*"&&(o.address=i),o}pollable(){return this.tag.indexOf(":")>=0||qw.indexOf(this.tag)>=0}};const zw={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Js(r){return Ft(ot.from(r).toHexString(),32)}function nl(r){return ja.encode(Kn([r,tr(Vc(Vc(r)),0,4)]))}const Zd=new RegExp("^(ipfs)://(.*)$","i"),il=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Zd,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function No(r,t){try{return gs(so(r,t))}catch{}return null}function so(r,t){if(r==="0x")return null;const i=ot.from(tr(r,t,t+32)).toNumber(),e=ot.from(tr(r,i,i+32)).toNumber();return tr(r,i+32,i+32+e)}function Ys(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):_t.throwArgumentError("unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}function ol(r){const t=vt(r);if(t.length>32)throw new Error("internal; should not happen");const i=new Uint8Array(32);return i.set(t,32-t.length),i}function Ww(r){if(r.length%32===0)return r;const t=new Uint8Array(Math.ceil(r.length/32)*32);return t.set(r),t}function Qd(r){const t=[];let i=0;for(let e=0;e<r.length;e++)t.push(null),i+=32;for(let e=0;e<r.length;e++){const o=vt(r[e]);t[e]=ol(i),t.push(ol(o.length)),t.push(Ww(o)),i+=32+Math.ceil(o.length/32)*32}return br(t)}class sl{constructor(t,i,e,o){At(this,"provider",t),At(this,"name",e),At(this,"address",t.formatter.address(i)),At(this,"_resolvedAddress",o)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(t=>ot.from(t).eq(1)).catch(t=>{if(t.code===xe.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,t})),this._supportsEip2544}_fetch(t,i){return ct(this,void 0,void 0,function*(){const e={to:this.address,ccipReadEnabled:!0,data:br([t,Co(this.name),i||"0x"])};let o=!1;(yield this.supportsWildcard())&&(o=!0,e.data=br(["0x9061b923",Qd([py(this.name),e.data])]));try{let n=yield this.provider.call(e);return vt(n).length%32===4&&_t.throwError("resolver threw error",xe.errors.CALL_EXCEPTION,{transaction:e,data:n}),o&&(n=so(n,0)),n}catch(n){if(n.code===xe.errors.CALL_EXCEPTION)return null;throw n}})}_fetchBytes(t,i){return ct(this,void 0,void 0,function*(){const e=yield this._fetch(t,i);return e!=null?so(e,0):null})}_getAddress(t,i){const e=zw[String(t)];if(e==null&&_t.throwError(`unsupported coin type: ${t}`,xe.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`}),e.ilk==="eth")return this.provider.formatter.address(i);const o=vt(i);if(e.p2pkh!=null){const n=i.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(n){const f=parseInt(n[1],16);if(n[2].length===f*2&&f>=1&&f<=75)return nl(Kn([[e.p2pkh],"0x"+n[2]]))}}if(e.p2sh!=null){const n=i.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(n){const f=parseInt(n[1],16);if(n[2].length===f*2&&f>=1&&f<=75)return nl(Kn([[e.p2sh],"0x"+n[2]]))}}if(e.prefix!=null){const n=o[1];let f=o[0];if(f===0?n!==20&&n!==32&&(f=-1):f=-1,f>=0&&o.length===2+n&&n>=1&&n<=75){const p=Xc.toWords(o.slice(2));return p.unshift(f),Xc.encode(e.prefix,p)}}return null}getAddress(t){return ct(this,void 0,void 0,function*(){if(t==null&&(t=60),t===60)try{const o=yield this._fetch("0x3b3b57de");return o==="0x"||o===Ub?null:this.provider.formatter.callAddress(o)}catch(o){if(o.code===xe.errors.CALL_EXCEPTION)return null;throw o}const i=yield this._fetchBytes("0xf1cb7e06",Js(t));if(i==null||i==="0x")return null;const e=this._getAddress(t,i);return e==null&&_t.throwError("invalid or unsupported coin data",xe.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${t})`,coinType:t,data:i}),e})}getAvatar(){return ct(this,void 0,void 0,function*(){const t=[{type:"name",content:this.name}];try{const i=yield this.getText("avatar");if(i==null)return null;for(let e=0;e<il.length;e++){const o=i.match(il[e]);if(o==null)continue;const n=o[1].toLowerCase();switch(n){case"https":return t.push({type:"url",content:i}),{linkage:t,url:i};case"data":return t.push({type:"data",content:i}),{linkage:t,url:i};case"ipfs":return t.push({type:"ipfs",content:i}),{linkage:t,url:Ys(i)};case"erc721":case"erc1155":{const f=n==="erc721"?"0xc87b56dd":"0x0e89341c";t.push({type:n,content:i});const p=this._resolvedAddress||(yield this.getAddress()),u=(o[2]||"").split("/");if(u.length!==2)return null;const c=yield this.provider.formatter.address(u[0]),s=Ft(ot.from(u[1]).toHexString(),32);if(n==="erc721"){const y=this.provider.formatter.callAddress(yield this.provider.call({to:c,data:br(["0x6352211e",s])}));if(p!==y)return null;t.push({type:"owner",content:y})}else if(n==="erc1155"){const y=ot.from(yield this.provider.call({to:c,data:br(["0x00fdd58e",Ft(p,32),s])}));if(y.isZero())return null;t.push({type:"balance",content:y.toString()})}const l={to:this.provider.formatter.address(u[0]),data:br([f,s])};let d=No(yield this.provider.call(l),0);if(d==null)return null;t.push({type:"metadata-url-base",content:d}),n==="erc1155"&&(d=d.replace("{id}",s.substring(2)),t.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=Ys(d)),t.push({type:"metadata-url",content:d});const b=yield ju(d);if(!b)return null;t.push({type:"metadata",content:JSON.stringify(b)});let v=b.image;if(typeof v!="string")return null;if(!v.match(/^(https:\/\/|data:)/i)){if(v.match(Zd)==null)return null;t.push({type:"url-ipfs",content:v}),v=Ys(v)}return t.push({type:"url",content:v}),{linkage:t,url:v}}}}}catch{}return null})}getContentHash(){return ct(this,void 0,void 0,function*(){const t=yield this._fetchBytes("0xbc1c58d1");if(t==null||t==="0x")return null;const i=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(i){const f=parseInt(i[3],16);if(i[4].length===f*2)return"ipfs://"+ja.encode("0x"+i[1])}const e=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const f=parseInt(e[3],16);if(e[4].length===f*2)return"ipns://"+ja.encode("0x"+e[1])}const o=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(o&&o[1].length===32*2)return"bzz://"+o[1];const n=t.match(/^0x90b2c605([0-9a-f]*)$/);if(n&&n[1].length===34*2){const f={"=":"","+":"-","/":"_"};return"sia://"+dd("0x"+n[1]).replace(/[=+\/]/g,u=>f[u])}return _t.throwError("invalid or unsupported content hash data",xe.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t})})}getText(t){return ct(this,void 0,void 0,function*(){let i=gn(t);i=Kn([Js(64),Js(i.length),i]),i.length%32!==0&&(i=Kn([i,Ft("0x",32-t.length%32)]));const e=yield this._fetchBytes("0x59d1d43c",dt(i));return e==null||e==="0x"?null:gs(e)})}}let $s=null,Kw=1;class Gw extends Cu{constructor(t){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),At(this,"anyNetwork",t==="any"),this.anyNetwork&&(t=this.detectNetwork()),t instanceof Promise)this._networkPromise=t,t.catch(i=>{}),this._ready().catch(i=>{});else{const i=Ui(new.target,"getNetwork")(t);i?(At(this,"_network",i),this.emit("network",i,null)):_t.throwArgumentError("invalid network","network",t)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ct(this,void 0,void 0,function*(){if(this._network==null){let t=null;if(this._networkPromise)try{t=yield this._networkPromise}catch{}t==null&&(t=yield this.detectNetwork()),t||_t.throwError("no network detected",xe.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=t:At(this,"_network",t),this.emit("network",t,null))}return this._network})}get ready(){return Di(()=>this._ready().then(t=>t,t=>{if(!(t.code===xe.errors.NETWORK_ERROR&&t.event==="noNetwork"))throw t}))}static getFormatter(){return $s==null&&($s=new it),$s}static getNetwork(t){return Ew(t??"homestead")}ccipReadFetch(t,i,e){return ct(this,void 0,void 0,function*(){if(this.disableCcipRead||e.length===0)return null;const o=t.to.toLowerCase(),n=i.toLowerCase(),f=[];for(let p=0;p<e.length;p++){const u=e[p],c=u.replace("{sender}",o).replace("{data}",n),s=u.indexOf("{data}")>=0?null:JSON.stringify({data:n,sender:o}),l=yield ju({url:c,errorPassThrough:!0},s,(b,v)=>(b.status=v.statusCode,b));if(l.data)return l.data;const d=l.message||"unknown error";if(l.status>=400&&l.status<500)return _t.throwError(`response not found during CCIP fetch: ${d}`,xe.errors.SERVER_ERROR,{url:u,errorMessage:d});f.push(d)}return _t.throwError(`error encountered during CCIP fetch: ${f.map(p=>JSON.stringify(p)).join(", ")}`,xe.errors.SERVER_ERROR,{urls:e,errorMessages:f})})}_getInternalBlockNumber(t){return ct(this,void 0,void 0,function*(){if(yield this._ready(),t>0)for(;this._internalBlockNumber;){const o=this._internalBlockNumber;try{const n=yield o;if(Bi()-n.respTime<=t)return n.blockNumber;break}catch{if(this._internalBlockNumber===o)break}}const i=Bi(),e=Kt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(o=>null,o=>o)}).then(({blockNumber:o,networkError:n})=>{if(n)throw this._internalBlockNumber===e&&(this._internalBlockNumber=null),n;const f=Bi();return o=ot.from(o).toNumber(),o<this._maxInternalBlockNumber&&(o=this._maxInternalBlockNumber),this._maxInternalBlockNumber=o,this._setFastBlockNumber(o),{blockNumber:o,reqTime:i,respTime:f}});return this._internalBlockNumber=e,e.catch(o=>{this._internalBlockNumber===e&&(this._internalBlockNumber=null)}),(yield e).blockNumber})}poll(){return ct(this,void 0,void 0,function*(){const t=Kw++,i=[];let e=null;try{e=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(o){this.emit("error",o);return}if(this._setFastBlockNumber(e),this.emit("poll",t,e),e===this._lastBlockNumber){this.emit("didPoll",t);return}if(this._emitted.block===-2&&(this._emitted.block=e-1),Math.abs(this._emitted.block-e)>1e3)_t.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${e})`),this.emit("error",_t.makeError("network block skew detected",xe.errors.NETWORK_ERROR,{blockNumber:e,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",e);else for(let o=this._emitted.block+1;o<=e;o++)this.emit("block",o);this._emitted.block!==e&&(this._emitted.block=e,Object.keys(this._emitted).forEach(o=>{if(o==="block")return;const n=this._emitted[o];n!=="pending"&&e-n>12&&delete this._emitted[o]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=e-1),this._events.forEach(o=>{switch(o.type){case"tx":{const n=o.hash;let f=this.getTransactionReceipt(n).then(p=>(!p||p.blockNumber==null||(this._emitted["t:"+n]=p.blockNumber,this.emit(n,p)),null)).catch(p=>{this.emit("error",p)});i.push(f);break}case"filter":{if(!o._inflight){o._inflight=!0,o._lastBlockNumber===-2&&(o._lastBlockNumber=e-1);const n=o.filter;n.fromBlock=o._lastBlockNumber+1,n.toBlock=e;const f=n.toBlock-this._maxFilterBlockRange;f>n.fromBlock&&(n.fromBlock=f),n.fromBlock<0&&(n.fromBlock=0);const p=this.getLogs(n).then(u=>{o._inflight=!1,u.length!==0&&u.forEach(c=>{c.blockNumber>o._lastBlockNumber&&(o._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(n,c)})}).catch(u=>{this.emit("error",u),o._inflight=!1});i.push(p)}break}}}),this._lastBlockNumber=e,Promise.all(i).then(()=>{this.emit("didPoll",t)}).catch(o=>{this.emit("error",o)})})}resetEventsBlock(t){this._lastBlockNumber=t-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ct(this,void 0,void 0,function*(){return _t.throwError("provider does not support network detection",xe.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ct(this,void 0,void 0,function*(){const t=yield this._ready(),i=yield this.detectNetwork();if(t.chainId!==i.chainId){if(this.anyNetwork)return this._network=i,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",i,t),yield rl(0),this._network;const e=_t.makeError("underlying network changed",xe.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:i});throw this.emit("error",e),e}return t})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(t=>{this._setFastBlockNumber(t)},t=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(t){t&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!t&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(t){if(typeof t!="number"||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const t=Bi();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then(i=>((this._fastBlockNumber==null||i>this._fastBlockNumber)&&(this._fastBlockNumber=i),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(t){this._fastBlockNumber!=null&&t<this._fastBlockNumber||(this._fastQueryDate=Bi(),(this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))}waitForTransaction(t,i,e){return ct(this,void 0,void 0,function*(){return this._waitForTransaction(t,i??1,e||0,null)})}_waitForTransaction(t,i,e,o){return ct(this,void 0,void 0,function*(){const n=yield this.getTransactionReceipt(t);return(n?n.confirmations:0)>=i?n:new Promise((f,p)=>{const u=[];let c=!1;const s=function(){return c?!0:(c=!0,u.forEach(d=>{d()}),!1)},l=d=>{d.confirmations<i||s()||f(d)};if(this.on(t,l),u.push(()=>{this.removeListener(t,l)}),o){let d=o.startBlock,b=null;const v=y=>ct(this,void 0,void 0,function*(){c||(yield rl(1e3),this.getTransactionCount(o.from).then(x=>ct(this,void 0,void 0,function*(){if(!c){if(x<=o.nonce)d=y;else{{const E=yield this.getTransaction(t);if(E&&E.blockNumber!=null)return}for(b==null&&(b=d-3,b<o.startBlock&&(b=o.startBlock));b<=y;){if(c)return;const E=yield this.getBlockWithTransactions(b);for(let R=0;R<E.transactions.length;R++){const I=E.transactions[R];if(I.hash===t)return;if(I.from===o.from&&I.nonce===o.nonce){if(c)return;const O=yield this.waitForTransaction(I.hash,i);if(s())return;let A="replaced";I.data===o.data&&I.to===o.to&&I.value.eq(o.value)?A="repriced":I.data==="0x"&&I.from===I.to&&I.value.isZero()&&(A="cancelled"),p(_t.makeError("transaction was replaced",xe.errors.TRANSACTION_REPLACED,{cancelled:A==="replaced"||A==="cancelled",reason:A,replacement:this._wrapTransaction(I),hash:t,receipt:O}));return}}b++}}c||this.once("block",v)}}),x=>{c||this.once("block",v)}))});if(c)return;this.once("block",v),u.push(()=>{this.removeListener("block",v)})}if(typeof e=="number"&&e>0){const d=setTimeout(()=>{s()||p(_t.makeError("timeout exceeded",xe.errors.TIMEOUT,{timeout:e}))},e);d.unref&&d.unref(),u.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return ct(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield this.perform("getGasPrice",{});try{return ot.from(t)}catch(i){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:i})}})}getBalance(t,i){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield Kt({address:this._getAddress(t),blockTag:this._getBlockTag(i)}),o=yield this.perform("getBalance",e);try{return ot.from(o)}catch(n){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"getBalance",params:e,result:o,error:n})}})}getTransactionCount(t,i){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield Kt({address:this._getAddress(t),blockTag:this._getBlockTag(i)}),o=yield this.perform("getTransactionCount",e);try{return ot.from(o).toNumber()}catch(n){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"getTransactionCount",params:e,result:o,error:n})}})}getCode(t,i){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield Kt({address:this._getAddress(t),blockTag:this._getBlockTag(i)}),o=yield this.perform("getCode",e);try{return dt(o)}catch(n){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"getCode",params:e,result:o,error:n})}})}getStorageAt(t,i,e){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const o=yield Kt({address:this._getAddress(t),blockTag:this._getBlockTag(e),position:Promise.resolve(i).then(f=>Ru(f))}),n=yield this.perform("getStorageAt",o);try{return dt(n)}catch(f){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"getStorageAt",params:o,result:n,error:f})}})}_wrapTransaction(t,i,e){if(i!=null&&Jn(i)!==32)throw new Error("invalid response - sendTransaction");const o=t;return i!=null&&t.hash!==i&&_t.throwError("Transaction hash mismatch from Provider.sendTransaction.",xe.errors.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:i}),o.wait=(n,f)=>ct(this,void 0,void 0,function*(){n==null&&(n=1),f==null&&(f=0);let p;n!==0&&e!=null&&(p={data:t.data,from:t.from,nonce:t.nonce,to:t.to,value:t.value,startBlock:e});const u=yield this._waitForTransaction(t.hash,n,f,p);return u==null&&n===0?null:(this._emitted["t:"+t.hash]=u.blockNumber,u.status===0&&_t.throwError("transaction failed",xe.errors.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t,receipt:u}),u)}),o}sendTransaction(t){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Promise.resolve(t).then(n=>dt(n)),e=this.formatter.transaction(t);e.confirmations==null&&(e.confirmations=0);const o=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const n=yield this.perform("sendTransaction",{signedTransaction:i});return this._wrapTransaction(e,n,o)}catch(n){throw n.transaction=e,n.transactionHash=e.hash,n}})}_getTransactionRequest(t){return ct(this,void 0,void 0,function*(){const i=yield t,e={};return["from","to"].forEach(o=>{i[o]!=null&&(e[o]=Promise.resolve(i[o]).then(n=>n?this._getAddress(n):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(o=>{i[o]!=null&&(e[o]=Promise.resolve(i[o]).then(n=>n?ot.from(n):null))}),["type"].forEach(o=>{i[o]!=null&&(e[o]=Promise.resolve(i[o]).then(n=>n??null))}),i.accessList&&(e.accessList=this.formatter.accessList(i.accessList)),["data"].forEach(o=>{i[o]!=null&&(e[o]=Promise.resolve(i[o]).then(n=>n?dt(n):null))}),this.formatter.transactionRequest(yield Kt(e))})}_getFilter(t){return ct(this,void 0,void 0,function*(){t=yield t;const i={};return t.address!=null&&(i.address=this._getAddress(t.address)),["blockHash","topics"].forEach(e=>{t[e]!=null&&(i[e]=t[e])}),["fromBlock","toBlock"].forEach(e=>{t[e]!=null&&(i[e]=this._getBlockTag(t[e]))}),this.formatter.filter(yield Kt(i))})}_call(t,i,e){return ct(this,void 0,void 0,function*(){e>=Dw&&_t.throwError("CCIP read exceeded maximum redirections",xe.errors.SERVER_ERROR,{redirects:e,transaction:t});const o=t.to,n=yield this.perform("call",{transaction:t,blockTag:i});if(e>=0&&i==="latest"&&o!=null&&n.substring(0,10)==="0x556f1830"&&Jn(n)%32===4)try{const f=tr(n,4),p=tr(f,0,32);ot.from(p).eq(o)||_t.throwError("CCIP Read sender did not match",xe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:n});const u=[],c=ot.from(tr(f,32,64)).toNumber(),s=ot.from(tr(f,c,c+32)).toNumber(),l=tr(f,c+32);for(let E=0;E<s;E++){const R=No(l,E*32);R==null&&_t.throwError("CCIP Read contained corrupt URL string",xe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:n}),u.push(R)}const d=so(f,64);ot.from(tr(f,100,128)).isZero()||_t.throwError("CCIP Read callback selector included junk",xe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:n});const b=tr(f,96,100),v=so(f,128),y=yield this.ccipReadFetch(t,d,u);y==null&&_t.throwError("CCIP Read disabled or provided no URLs",xe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:t,data:n});const x={to:o,data:br([b,Qd([y,v])])};return this._call(x,i,e+1)}catch(f){if(f.code===xe.errors.SERVER_ERROR)throw f}try{return dt(n)}catch(f){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"call",params:{transaction:t,blockTag:i},result:n,error:f})}})}call(t,i){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield Kt({transaction:this._getTransactionRequest(t),blockTag:this._getBlockTag(i),ccipReadEnabled:Promise.resolve(t.ccipReadEnabled)});return this._call(e.transaction,e.blockTag,e.ccipReadEnabled?0:-1)})}estimateGas(t){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Kt({transaction:this._getTransactionRequest(t)}),e=yield this.perform("estimateGas",i);try{return ot.from(e)}catch(o){return _t.throwError("bad result from backend",xe.errors.SERVER_ERROR,{method:"estimateGas",params:i,result:e,error:o})}})}_getAddress(t){return ct(this,void 0,void 0,function*(){t=yield t,typeof t!="string"&&_t.throwArgumentError("invalid address or ENS name","name",t);const i=yield this.resolveName(t);return i==null&&_t.throwError("ENS name not configured",xe.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(t)})`}),i})}_getBlock(t,i){return ct(this,void 0,void 0,function*(){yield this.getNetwork(),t=yield t;let e=-128;const o={includeTransactions:!!i};if(Rt(t,32))o.blockHash=t;else try{o.blockTag=yield this._getBlockTag(t),Rt(o.blockTag)&&(e=parseInt(o.blockTag.substring(2),16))}catch{_t.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",t)}return Di(()=>ct(this,void 0,void 0,function*(){const n=yield this.perform("getBlock",o);if(n==null)return o.blockHash!=null&&this._emitted["b:"+o.blockHash]==null||o.blockTag!=null&&e>this._emitted.block?null:void 0;if(i){let f=null;for(let u=0;u<n.transactions.length;u++){const c=n.transactions[u];if(c.blockNumber==null)c.confirmations=0;else if(c.confirmations==null){f==null&&(f=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let s=f-c.blockNumber+1;s<=0&&(s=1),c.confirmations=s}}const p=this.formatter.blockWithTransactions(n);return p.transactions=p.transactions.map(u=>this._wrapTransaction(u)),p}return this.formatter.block(n)}),{oncePoll:this})})}getBlock(t){return this._getBlock(t,!1)}getBlockWithTransactions(t){return this._getBlock(t,!0)}getTransaction(t){return ct(this,void 0,void 0,function*(){yield this.getNetwork(),t=yield t;const i={transactionHash:this.formatter.hash(t,!0)};return Di(()=>ct(this,void 0,void 0,function*(){const e=yield this.perform("getTransaction",i);if(e==null)return this._emitted["t:"+t]==null?null:void 0;const o=this.formatter.transactionResponse(e);if(o.blockNumber==null)o.confirmations=0;else if(o.confirmations==null){let f=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-o.blockNumber+1;f<=0&&(f=1),o.confirmations=f}return this._wrapTransaction(o)}),{oncePoll:this})})}getTransactionReceipt(t){return ct(this,void 0,void 0,function*(){yield this.getNetwork(),t=yield t;const i={transactionHash:this.formatter.hash(t,!0)};return Di(()=>ct(this,void 0,void 0,function*(){const e=yield this.perform("getTransactionReceipt",i);if(e==null)return this._emitted["t:"+t]==null?null:void 0;if(e.blockHash==null)return;const o=this.formatter.receipt(e);if(o.blockNumber==null)o.confirmations=0;else if(o.confirmations==null){let f=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-o.blockNumber+1;f<=0&&(f=1),o.confirmations=f}return o}),{oncePoll:this})})}getLogs(t){return ct(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Kt({filter:this._getFilter(t)}),e=yield this.perform("getLogs",i);return e.forEach(o=>{o.removed==null&&(o.removed=!1)}),it.arrayOf(this.formatter.filterLog.bind(this.formatter))(e)})}getEtherPrice(){return ct(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(t){return ct(this,void 0,void 0,function*(){if(t=yield t,typeof t=="number"&&t<0){t%1&&_t.throwArgumentError("invalid BlockTag","blockTag",t);let i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return i+=t,i<0&&(i=0),this.formatter.blockTag(i)}return this.formatter.blockTag(t)})}getResolver(t){return ct(this,void 0,void 0,function*(){let i=t;for(;;){if(i===""||i==="."||t!=="eth"&&i==="eth")return null;const e=yield this._getResolver(i,"getResolver");if(e!=null){const o=new sl(this,e,t);return i!==t&&!(yield o.supportsWildcard())?null:o}i=i.split(".").slice(1).join(".")}})}_getResolver(t,i){return ct(this,void 0,void 0,function*(){i==null&&(i="ENS");const e=yield this.getNetwork();e.ensAddress||_t.throwError("network does not support ENS",xe.errors.UNSUPPORTED_OPERATION,{operation:i,network:e.name});try{const o=yield this.call({to:e.ensAddress,data:"0x0178b8bf"+Co(t).substring(2)});return this.formatter.callAddress(o)}catch{}return null})}resolveName(t){return ct(this,void 0,void 0,function*(){t=yield t;try{return Promise.resolve(this.formatter.address(t))}catch(e){if(Rt(t))throw e}typeof t!="string"&&_t.throwArgumentError("invalid ENS name","name",t);const i=yield this.getResolver(t);return i?yield i.getAddress():null})}lookupAddress(t){return ct(this,void 0,void 0,function*(){t=yield t,t=this.formatter.address(t);const i=t.substring(2).toLowerCase()+".addr.reverse",e=yield this._getResolver(i,"lookupAddress");if(e==null)return null;const o=No(yield this.call({to:e,data:"0x691f3431"+Co(i).substring(2)}),0);return(yield this.resolveName(o))!=t?null:o})}getAvatar(t){return ct(this,void 0,void 0,function*(){let i=null;if(Rt(t)){const n=this.formatter.address(t).substring(2).toLowerCase()+".addr.reverse",f=yield this._getResolver(n,"getAvatar");if(!f)return null;i=new sl(this,f,n);try{const p=yield i.getAvatar();if(p)return p.url}catch(p){if(p.code!==xe.errors.CALL_EXCEPTION)throw p}try{const p=No(yield this.call({to:f,data:"0x691f3431"+Co(n).substring(2)}),0);i=yield this.getResolver(p)}catch(p){if(p.code!==xe.errors.CALL_EXCEPTION)throw p;return null}}else if(i=yield this.getResolver(t),!i)return null;const e=yield i.getAvatar();return e==null?null:e.url})}perform(t,i){return _t.throwError(t+" not implemented",xe.errors.NOT_IMPLEMENTED,{operation:t})}_startEvent(t){this.polling=this._events.filter(i=>i.pollable()).length>0}_stopEvent(t){this.polling=this._events.filter(i=>i.pollable()).length>0}_addEventListener(t,i,e){const o=new Hw(ei(t),i,e);return this._events.push(o),this._startEvent(o),this}on(t,i){return this._addEventListener(t,i,!1)}once(t,i){return this._addEventListener(t,i,!0)}emit(t,...i){let e=!1,o=[],n=ei(t);return this._events=this._events.filter(f=>f.tag!==n?!0:(setTimeout(()=>{f.listener.apply(this,i)},0),e=!0,f.once?(o.push(f),!1):!0)),o.forEach(f=>{this._stopEvent(f)}),e}listenerCount(t){if(!t)return this._events.length;let i=ei(t);return this._events.filter(e=>e.tag===i).length}listeners(t){if(t==null)return this._events.map(e=>e.listener);let i=ei(t);return this._events.filter(e=>e.tag===i).map(e=>e.listener)}off(t,i){if(i==null)return this.removeAllListeners(t);const e=[];let o=!1,n=ei(t);return this._events=this._events.filter(f=>f.tag!==n||f.listener!=i||o?!0:(o=!0,e.push(f),!1)),e.forEach(f=>{this._stopEvent(f)}),this}removeAllListeners(t){let i=[];if(t==null)i=this._events,this._events=[];else{const e=ei(t);this._events=this._events.filter(o=>o.tag!==e?!0:(i.push(o),!1))}return i.forEach(e=>{this._stopEvent(e)}),this}}var dn=globalThis&&globalThis.__awaiter||function(r,t,i,e){function o(n){return n instanceof i?n:new i(function(f){f(n)})}return new(i||(i=Promise))(function(n,f){function p(s){try{c(e.next(s))}catch(l){f(l)}}function u(s){try{c(e.throw(s))}catch(l){f(l)}}function c(s){s.done?n(s.value):o(s.value).then(p,u)}c((e=e.apply(r,t||[])).next())})};const Dt=new xe(Ms),Vw=["call","estimateGas"];function Ji(r,t){if(r==null)return null;if(typeof r.message=="string"&&r.message.match("reverted")){const i=Rt(r.data)?r.data:null;if(!t||i)return{message:r.message,data:i}}if(typeof r=="object"){for(const i in r){const e=Ji(r[i],t);if(e)return e}return null}if(typeof r=="string")try{return Ji(JSON.parse(r),t)}catch{}return null}function Xd(r,t,i){const e=i.transaction||i.signedTransaction;if(r==="call"){const n=Ji(t,!0);if(n)return n.data;Dt.throwError("missing revert data in call exception; Transaction reverted without a reason string",xe.errors.CALL_EXCEPTION,{data:"0x",transaction:e,error:t})}if(r==="estimateGas"){let n=Ji(t.body,!1);n==null&&(n=Ji(t,!1)),n&&Dt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",xe.errors.UNPREDICTABLE_GAS_LIMIT,{reason:n.message,method:r,transaction:e,error:t})}let o=t.message;throw t.code===xe.errors.SERVER_ERROR&&t.error&&typeof t.error.message=="string"?o=t.error.message:typeof t.body=="string"?o=t.body:typeof t.responseText=="string"&&(o=t.responseText),o=(o||"").toLowerCase(),o.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Dt.throwError("insufficient funds for intrinsic transaction cost",xe.errors.INSUFFICIENT_FUNDS,{error:t,method:r,transaction:e}),o.match(/nonce (is )?too low/i)&&Dt.throwError("nonce has already been used",xe.errors.NONCE_EXPIRED,{error:t,method:r,transaction:e}),o.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Dt.throwError("replacement fee too low",xe.errors.REPLACEMENT_UNDERPRICED,{error:t,method:r,transaction:e}),o.match(/only replay-protected/i)&&Dt.throwError("legacy pre-eip-155 transactions not supported",xe.errors.UNSUPPORTED_OPERATION,{error:t,method:r,transaction:e}),Vw.indexOf(r)>=0&&o.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Dt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",xe.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:r,transaction:e}),t}function al(r){return new Promise(function(t){setTimeout(t,r)})}function Jw(r){if(r.error){const t=new Error(r.error.message);throw t.code=r.error.code,t.data=r.error.data,t}return r.result}function Li(r){return r&&r.toLowerCase()}const Da={};class e0 extends Pu{constructor(t,i,e){if(super(),t!==Da)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");At(this,"provider",i),e==null&&(e=0),typeof e=="string"?(At(this,"_address",this.provider.formatter.address(e)),At(this,"_index",null)):typeof e=="number"?(At(this,"_index",e),At(this,"_address",null)):Dt.throwArgumentError("invalid address or index","addressOrIndex",e)}connect(t){return Dt.throwError("cannot alter JSON-RPC Signer connection",xe.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Yw(Da,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(t=>(t.length<=this._index&&Dt.throwError("unknown account #"+this._index,xe.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(t[this._index])))}sendUncheckedTransaction(t){t=ar(t);const i=this.getAddress().then(e=>(e&&(e=e.toLowerCase()),e));if(t.gasLimit==null){const e=ar(t);e.from=i,t.gasLimit=this.provider.estimateGas(e)}return t.to!=null&&(t.to=Promise.resolve(t.to).then(e=>dn(this,void 0,void 0,function*(){if(e==null)return null;const o=yield this.provider.resolveName(e);return o==null&&Dt.throwArgumentError("provided ENS name resolves to null","tx.to",e),o}))),Kt({tx:Kt(t),sender:i}).then(({tx:e,sender:o})=>{e.from!=null?e.from.toLowerCase()!==o&&Dt.throwArgumentError("from address mismatch","transaction",t):e.from=o;const n=this.provider.constructor.hexlifyTransaction(e,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then(f=>f,f=>(typeof f.message=="string"&&f.message.match(/user denied/i)&&Dt.throwError("user rejected transaction",xe.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:e}),Xd("sendTransaction",f,n)))})}signTransaction(t){return Dt.throwError("signing transactions is unsupported",xe.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(t){return dn(this,void 0,void 0,function*(){const i=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),e=yield this.sendUncheckedTransaction(t);try{return yield Di(()=>dn(this,void 0,void 0,function*(){const o=yield this.provider.getTransaction(e);if(o!==null)return this.provider._wrapTransaction(o,e,i)}),{oncePoll:this.provider})}catch(o){throw o.transactionHash=e,o}})}signMessage(t){return dn(this,void 0,void 0,function*(){const i=typeof t=="string"?gn(t):t,e=yield this.getAddress();try{return yield this.provider.send("personal_sign",[dt(i),e.toLowerCase()])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Dt.throwError("user rejected signing",xe.errors.ACTION_REJECTED,{action:"signMessage",from:e,messageData:t}),o}})}_legacySignMessage(t){return dn(this,void 0,void 0,function*(){const i=typeof t=="string"?gn(t):t,e=yield this.getAddress();try{return yield this.provider.send("eth_sign",[e.toLowerCase(),dt(i)])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Dt.throwError("user rejected signing",xe.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:e,messageData:t}),o}})}_signTypedData(t,i,e){return dn(this,void 0,void 0,function*(){const o=yield cr.resolveNames(t,i,e,f=>this.provider.resolveName(f)),n=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[n.toLowerCase(),JSON.stringify(cr.getPayload(o.domain,i,o.value))])}catch(f){throw typeof f.message=="string"&&f.message.match(/user denied/i)&&Dt.throwError("user rejected signing",xe.errors.ACTION_REJECTED,{action:"_signTypedData",from:n,messageData:{domain:o.domain,types:i,value:o.value}}),f}})}unlock(t){return dn(this,void 0,void 0,function*(){const i=this.provider,e=yield this.getAddress();return i.send("personal_unlockAccount",[e.toLowerCase(),t,null])})}}class Yw extends e0{sendTransaction(t){return this.sendUncheckedTransaction(t).then(i=>({hash:i,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:e=>this.provider.waitForTransaction(i,e)}))}}const $w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Zw extends Gw{constructor(t,i){let e=i;e==null&&(e=new Promise((o,n)=>{setTimeout(()=>{this.detectNetwork().then(f=>{o(f)},f=>{n(f)})},0)})),super(e),t||(t=Ui(this.constructor,"defaultUrl")()),typeof t=="string"?At(this,"connection",Object.freeze({url:t})):At(this,"connection",Object.freeze(ar(t))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return dn(this,void 0,void 0,function*(){yield al(0);let t=null;try{t=yield this.send("eth_chainId",[])}catch{try{t=yield this.send("net_version",[])}catch{}}if(t!=null){const i=Ui(this.constructor,"getNetwork");try{return i(ot.from(t).toNumber())}catch(e){return Dt.throwError("could not detect network",xe.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e})}}return Dt.throwError("could not detect network",xe.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(t){return new e0(Da,this,t)}getUncheckedSigner(t){return this.getSigner(t).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(t=>t.map(i=>this.formatter.address(i)))}send(t,i){const e={method:t,params:i,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Yn(e),provider:this});const o=["eth_chainId","eth_blockNumber"].indexOf(t)>=0;if(o&&this._cache[t])return this._cache[t];const n=ju(this.connection,JSON.stringify(e),Jw).then(f=>(this.emit("debug",{action:"response",request:e,response:f,provider:this}),f),f=>{throw this.emit("debug",{action:"response",error:f,request:e,provider:this}),f});return o&&(this._cache[t]=n,setTimeout(()=>{this._cache[t]=null},0)),n}prepareRequest(t,i){switch(t){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Li(i.address),i.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Li(i.address),i.blockTag]];case"getCode":return["eth_getCode",[Li(i.address),i.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Li(i.address),Ft(i.position,32),i.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[i.signedTransaction]];case"getBlock":return i.blockTag?["eth_getBlockByNumber",[i.blockTag,!!i.includeTransactions]]:i.blockHash?["eth_getBlockByHash",[i.blockHash,!!i.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[i.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[i.transactionHash]];case"call":return["eth_call",[Ui(this.constructor,"hexlifyTransaction")(i.transaction,{from:!0}),i.blockTag]];case"estimateGas":return["eth_estimateGas",[Ui(this.constructor,"hexlifyTransaction")(i.transaction,{from:!0})]];case"getLogs":return i.filter&&i.filter.address!=null&&(i.filter.address=Li(i.filter.address)),["eth_getLogs",[i.filter]]}return null}perform(t,i){return dn(this,void 0,void 0,function*(){if(t==="call"||t==="estimateGas"){const o=i.transaction;if(o&&o.type!=null&&ot.from(o.type).isZero()&&o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null){const n=yield this.getFeeData();n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null&&(i=ar(i),i.transaction=ar(o),delete i.transaction.type)}}const e=this.prepareRequest(t,i);e==null&&Dt.throwError(t+" not implemented",xe.errors.NOT_IMPLEMENTED,{operation:t});try{return yield this.send(e[0],e[1])}catch(o){return Xd(t,o,i)}})}_startEvent(t){t.tag==="pending"&&this._startPending(),super._startEvent(t)}_startPending(){if(this._pendingFilter!=null)return;const t=this,i=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=i,i.then(function(e){function o(){t.send("eth_getFilterChanges",[e]).then(function(n){if(t._pendingFilter!=i)return null;let f=Promise.resolve();return n.forEach(function(p){t._emitted["t:"+p.toLowerCase()]="pending",f=f.then(function(){return t.getTransaction(p).then(function(u){return t.emit("pending",u),null})})}),f.then(function(){return al(1e3)})}).then(function(){if(t._pendingFilter!=i){t.send("eth_uninstallFilter",[e]);return}return setTimeout(function(){o()},0),null}).catch(n=>{})}return o(),e}).catch(e=>{})}_stopEvent(t){t.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(t)}static hexlifyTransaction(t,i){const e=ar($w);if(i)for(const n in i)i[n]&&(e[n]=!0);Ab(t,e);const o={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(n){if(t[n]==null)return;const f=Ru(ot.from(t[n]));n==="gasLimit"&&(n="gas"),o[n]=f}),["from","to","data"].forEach(function(n){t[n]!=null&&(o[n]=dt(t[n]))}),t.accessList&&(o.accessList=ho(t.accessList)),o}}const ul=new xe(Ms);let Qw=1;function fl(r,t){const i="Web3LegacyFetcher";return function(e,o){const n={method:e,params:o,id:Qw++,jsonrpc:"2.0"};return new Promise((f,p)=>{this.emit("debug",{action:"request",fetcher:i,request:Yn(n),provider:this}),t(n,(u,c)=>{if(u)return this.emit("debug",{action:"response",fetcher:i,error:u,request:n,provider:this}),p(u);if(this.emit("debug",{action:"response",fetcher:i,request:n,response:c,provider:this}),c.error){const s=new Error(c.error.message);return s.code=c.error.code,s.data=c.error.data,p(s)}f(c.result)})})}}function Xw(r){return function(t,i){i==null&&(i=[]);const e={method:t,params:i};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Yn(e),provider:this}),r.request(e).then(o=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:e,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:e,error:o,provider:this}),o})}}class e_ extends Zw{constructor(t,i){t==null&&ul.throwArgumentError("missing provider","provider",t);let e=null,o=null,n=null;typeof t=="function"?(e="unknown:",o=t):(e=t.host||t.path||"",!e&&t.isMetaMask&&(e="metamask"),n=t,t.request?(e===""&&(e="eip-1193:"),o=Xw(t)):t.sendAsync?o=fl(t,t.sendAsync.bind(t)):t.send?o=fl(t,t.send.bind(t)):ul.throwArgumentError("unsupported provider","provider",t),e||(e="unknown:")),super(e,i),At(this,"jsonRpcFetchFunc",o),At(this,"provider",n)}send(t,i){return this.jsonRpcFetchFunc(t,i)}}var Fa={},t_={get exports(){return Fa},set exports(r){Fa=r}};(function(r,t){(function(i,e){r.exports=e()})(co,function(){return function(i){var e={};function o(n){if(e[n])return e[n].exports;var f=e[n]={i:n,l:!1,exports:{}};return i[n].call(f.exports,f,f.exports,o),f.l=!0,f.exports}return o.m=i,o.c=e,o.d=function(n,f,p){o.o(n,f)||Object.defineProperty(n,f,{enumerable:!0,get:p})},o.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.t=function(n,f){if(1&f&&(n=o(n)),8&f||4&f&&typeof n=="object"&&n&&n.__esModule)return n;var p=Object.create(null);if(o.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:n}),2&f&&typeof n!="string")for(var u in n)o.d(p,u,function(c){return n[c]}.bind(null,u));return p},o.n=function(n){var f=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(f,"a",f),f},o.o=function(n,f){return Object.prototype.hasOwnProperty.call(n,f)},o.p="",o(o.s=166)}([function(i,e,o){(function(n){o.d(e,"f",function(){return s}),o.d(e,"g",function(){return l}),o.d(e,"i",function(){return d}),o.d(e,"h",function(){return b}),o.d(e,"b",function(){return v}),o.d(e,"c",function(){return y}),o.d(e,"e",function(){return x}),o.d(e,"d",function(){return E}),o.d(e,"o",function(){return R}),o.d(e,"n",function(){return I}),o.d(e,"p",function(){return O}),o.d(e,"A",function(){return A}),o.d(e,"z",function(){return P}),o.d(e,"B",function(){return N}),o.d(e,"v",function(){return L}),o.d(e,"u",function(){return H}),o.d(e,"s",function(){return z}),o.d(e,"r",function(){return S}),o.d(e,"t",function(){return a}),o.d(e,"q",function(){return w}),o.d(e,"m",function(){return h}),o.d(e,"l",function(){return m}),o.d(e,"k",function(){return g}),o.d(e,"j",function(){return _}),o.d(e,"x",function(){return M}),o.d(e,"a",function(){return B}),o.d(e,"y",function(){return Y}),o.d(e,"w",function(){return C});var f=o(77),p=o.n(f),u=o(159),c=o.n(u);function s(W){return new Uint8Array(W)}function l(W,U=!1){const q=W.toString("hex");return U?B(q):q}function d(W){return W.toString("utf8")}function b(W){return W.readUIntBE(0,W.length)}function v(W){return c()(W)}function y(W,U=!1){return l(v(W),U)}function x(W){return d(v(W))}function E(W){return b(v(W))}function R(W){return n.from(M(W),"hex")}function I(W){return s(R(W))}function O(W){return d(R(W))}function A(W){return n.from(W,"utf8")}function P(W){return s(A(W))}function N(W,U=!1){return l(A(W),U)}function L(W){return v(G(J(W)))}function H(W){return G(J(W))}function J(W){return k((W>>>0).toString(2))}function G(W){return new Uint8Array(T(W).map(U=>parseInt(U,2)))}function z(W,U){return!(typeof W!="string"||!W.match(/^0x[0-9A-Fa-f]*$/))&&(!U||W.length===2+2*U)}function S(W){return n.isBuffer(W)}function a(W){return p.a.strict(W)&&!S(W)}function w(W){return!a(W)&&!S(W)&&W.byteLength!==void 0}function h(W){return S(W)?"buffer":a(W)?"typed-array":w(W)?"array-buffer":Array.isArray(W)?"array":typeof W}function m(W){return function(U){return!(typeof U!="string"||!new RegExp(/^[01]+$/).test(U))&&U.length%8==0}(W)?"binary":z(W)?"hex":"utf8"}function g(...W){return n.concat(W)}function _(...W){let U=[];return W.forEach(q=>U=U.concat(Array.from(q))),new Uint8Array([...U])}function T(W,U=8){const q=k(W).match(new RegExp(`.{${U}}`,"gi"));return Array.from(q||[])}function k(W,U=8,q="0"){return function(j,D,F="0"){return K(j,D,!0,F)}(W,function(j,D=8){const F=j%D;return F?(j-F)/D*D+D:j}(W.length,U),q)}function M(W){return W.replace(/^0x/,"")}function B(W){return W.startsWith("0x")?W:"0x"+W}function Y(W){return(W=k(W=M(W),2))&&(W=B(W)),W}function C(W){const U=W.startsWith("0x");return W=(W=M(W)).startsWith("0")?W.substring(1):W,U?B(W):W}function K(W,U,q,j="0"){const D=U-W.length;let F=W;if(D>0){const $=j.repeat(D);F=q?$+W:W+$}return F}}).call(this,o(2).Buffer)},function(i,e,o){o.r(e);var n=o(76);const f=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],p=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],u=["eth_accounts","eth_chainId","net_version"],c={1:"mainnet",3:"ropsten",4:"rinkeby",5:"goerli",42:"kovan"};var s=o(9),l=o.n(s),d=o(0);function b(se){return d.b(new Uint8Array(se))}function v(se){return d.e(new Uint8Array(se))}function y(se,de){return d.c(new Uint8Array(se),!de)}function x(se){return d.d(new Uint8Array(se))}function E(...se){return d.n(se.map(de=>d.c(new Uint8Array(de))).join("")).buffer}function R(se){return d.f(se).buffer}function I(se){return d.i(se)}function O(se,de){return d.g(se,!de)}function A(se){return d.h(se)}function P(...se){return d.k(...se)}function N(se){return d.z(se).buffer}function L(se){return d.A(se)}function H(se,de){return d.B(se,!de)}function J(se){return new l.a(se,10).toNumber()}function G(se){return d.o(se)}function z(se){return d.n(se).buffer}function S(se){return d.p(se)}function a(se){return new l.a(d.x(se),"hex").toNumber()}function w(se){return d.v(se)}function h(se){return d.u(se).buffer}function m(se){return new l.a(se).toString()}function g(se,de){const _e=d.x(d.y(new l.a(se).toString(16)));return de?_e:d.a(_e)}var _=o(160);function T(se){return d.y(se)}function k(se){return d.a(se)}function M(se){return d.x(se)}function B(se){return d.w(d.a(se))}const Y=o(161).payloadId;function C(){return((se,de)=>{for(de=se="";se++<36;de+=51*se&52?(15^se?8^Math.random()*(20^se?16:4):4).toString(16):"-");return de})()}function K(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function W(se,de){let _e;const Ue=c[se];return Ue&&(_e=`https://${Ue}.infura.io/v3/${de}`),_e}function U(se,de){let _e;const Ue=W(se,de.infuraId);return de.custom&&de.custom[se]?_e=de.custom[se]:Ue&&(_e=Ue),_e}function q(se){return se===""||typeof se=="string"&&se.trim()===""}function j(se){return!(se&&se.length)}function D(se){return d.r(se)}function F(se){return d.t(se)}function $(se){return d.q(se)}function V(se){return d.m(se)}function Z(se){return d.l(se)}function ee(se,de){return d.s(se,de)}function re(se){return typeof se.params=="object"}function ue(se){return se.method!==void 0}function fe(se){return se.result!==void 0}function oe(se){return se.error!==void 0}function ae(se){return se.event!==void 0}function ie(se){return f.includes(se)||se.startsWith("wc_")}function te(se){return!!se.method.startsWith("wc_")||!p.includes(se.method)}function le(se){se=Object(d.x)(se.toLowerCase());const de=Object(d.x)(Object(_.keccak_256)(L(se)));let _e="";for(let Ue=0;Ue<se.length;Ue++)parseInt(de[Ue],16)>7?_e+=se[Ue].toUpperCase():_e+=se[Ue];return Object(d.a)(_e)}const ge=se=>!!se&&se.toLowerCase().substring(0,2)==="0x"&&!!/^(0x)?[0-9a-f]{40}$/i.test(se)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(se)&&!/^(0x)?[0-9A-F]{40}$/.test(se))||se===le(se));function he(se){return j(se)||ee(se[0])||(se[0]=H(se[0])),se}function ye(se){if(se.type!==void 0&&se.type!=="0")return se;if(se.from===void 0||!ge(se.from))throw new Error("Transaction object must include a valid 'from' value.");function de(me){let Be=me;return(typeof me=="number"||typeof me=="string"&&!q(me))&&(ee(me)?typeof me=="string"&&(Be=T(me)):Be=g(me)),typeof Be=="string"&&(Be=B(Be)),Be}const _e={from:T(se.from),to:se.to===void 0?void 0:T(se.to),gasPrice:se.gasPrice===void 0?"":de(se.gasPrice),gas:se.gas===void 0?se.gasLimit===void 0?"":de(se.gasLimit):de(se.gas),value:se.value===void 0?"":de(se.value),nonce:se.nonce===void 0?"":de(se.nonce),data:se.data===void 0?"":T(se.data)||"0x"},Ue=["gasPrice","gas","value","nonce"];return Object.keys(_e).forEach(me=>{(_e[me]===void 0||typeof _e[me]=="string"&&!_e[me].trim().length)&&Ue.includes(me)&&delete _e[me]}),_e}function Ie(se,de){return async(..._e)=>new Promise((Ue,me)=>{se.apply(de,[..._e,(Be,Je)=>{Be==null&&me(Be),Ue(Je)}])})}function pe(se){const de=se.message||"Failed or Rejected Request";let _e=-32e3;if(se&&!se.code)switch(de){case"Parse error":_e=-32700;break;case"Invalid request":_e=-32600;break;case"Method not found":_e=-32601;break;case"Invalid params":_e=-32602;break;case"Internal error":_e=-32603;break;default:_e=-32e3}const Ue={code:_e,message:de};return se.data&&(Ue.data=se.data),Ue}var Oe=o(78);function Ge(se){const de=se.indexOf("?")!==-1?se.indexOf("?"):void 0;return de!==void 0?se.substr(de):""}function we(se,de){let _e=Le(se);return _e=Object.assign(Object.assign({},_e),de),se=Ve(_e)}function Le(se){return Oe.parse(se)}function Ve(se){return Oe.stringify(se)}function ve(se){return se.bridge!==void 0}function Ne(se){const de=se.indexOf(":"),_e=se.indexOf("?")!==-1?se.indexOf("?"):void 0,Ue=se.substring(0,de),me=function(Je){const be=Je.split("@");return{handshakeTopic:be[0],version:parseInt(be[1],10)}}(se.substring(de+1,_e)),Be=function(Je){const be=Le(Je);return{key:be.key||"",bridge:be.bridge||""}}(_e!==void 0?se.substr(_e):"");return Object.assign(Object.assign({protocol:Ue},me),Be)}o.d(e,"detectEnv",function(){return n.detectEnv}),o.d(e,"detectOS",function(){return n.detectOS}),o.d(e,"isAndroid",function(){return n.isAndroid}),o.d(e,"isIOS",function(){return n.isIOS}),o.d(e,"isMobile",function(){return n.isMobile}),o.d(e,"isNode",function(){return n.isNode}),o.d(e,"isBrowser",function(){return n.isBrowser}),o.d(e,"getFromWindow",function(){return n.getFromWindow}),o.d(e,"getFromWindowOrThrow",function(){return n.getFromWindowOrThrow}),o.d(e,"getDocumentOrThrow",function(){return n.getDocumentOrThrow}),o.d(e,"getDocument",function(){return n.getDocument}),o.d(e,"getNavigatorOrThrow",function(){return n.getNavigatorOrThrow}),o.d(e,"getNavigator",function(){return n.getNavigator}),o.d(e,"getLocationOrThrow",function(){return n.getLocationOrThrow}),o.d(e,"getLocation",function(){return n.getLocation}),o.d(e,"getCryptoOrThrow",function(){return n.getCryptoOrThrow}),o.d(e,"getCrypto",function(){return n.getCrypto}),o.d(e,"getLocalStorageOrThrow",function(){return n.getLocalStorageOrThrow}),o.d(e,"getLocalStorage",function(){return n.getLocalStorage}),o.d(e,"getClientMeta",function(){return n.getClientMeta}),o.d(e,"safeJsonParse",function(){return n.safeJsonParse}),o.d(e,"safeJsonStringify",function(){return n.safeJsonStringify}),o.d(e,"setLocal",function(){return n.setLocal}),o.d(e,"getLocal",function(){return n.getLocal}),o.d(e,"removeLocal",function(){return n.removeLocal}),o.d(e,"mobileLinkChoiceKey",function(){return n.mobileLinkChoiceKey}),o.d(e,"formatIOSMobile",function(){return n.formatIOSMobile}),o.d(e,"saveMobileLinkInfo",function(){return n.saveMobileLinkInfo}),o.d(e,"getMobileRegistryEntry",function(){return n.getMobileRegistryEntry}),o.d(e,"getMobileLinkRegistry",function(){return n.getMobileLinkRegistry}),o.d(e,"getWalletRegistryUrl",function(){return n.getWalletRegistryUrl}),o.d(e,"getDappRegistryUrl",function(){return n.getDappRegistryUrl}),o.d(e,"formatMobileRegistryEntry",function(){return n.formatMobileRegistryEntry}),o.d(e,"formatMobileRegistry",function(){return n.formatMobileRegistry}),o.d(e,"reservedEvents",function(){return f}),o.d(e,"signingMethods",function(){return p}),o.d(e,"stateMethods",function(){return u}),o.d(e,"infuraNetworks",function(){return c}),o.d(e,"convertArrayBufferToBuffer",function(){return b}),o.d(e,"convertArrayBufferToUtf8",function(){return v}),o.d(e,"convertArrayBufferToHex",function(){return y}),o.d(e,"convertArrayBufferToNumber",function(){return x}),o.d(e,"concatArrayBuffers",function(){return E}),o.d(e,"convertBufferToArrayBuffer",function(){return R}),o.d(e,"convertBufferToUtf8",function(){return I}),o.d(e,"convertBufferToHex",function(){return O}),o.d(e,"convertBufferToNumber",function(){return A}),o.d(e,"concatBuffers",function(){return P}),o.d(e,"convertUtf8ToArrayBuffer",function(){return N}),o.d(e,"convertUtf8ToBuffer",function(){return L}),o.d(e,"convertUtf8ToHex",function(){return H}),o.d(e,"convertUtf8ToNumber",function(){return J}),o.d(e,"convertHexToBuffer",function(){return G}),o.d(e,"convertHexToArrayBuffer",function(){return z}),o.d(e,"convertHexToUtf8",function(){return S}),o.d(e,"convertHexToNumber",function(){return a}),o.d(e,"convertNumberToBuffer",function(){return w}),o.d(e,"convertNumberToArrayBuffer",function(){return h}),o.d(e,"convertNumberToUtf8",function(){return m}),o.d(e,"convertNumberToHex",function(){return g}),o.d(e,"toChecksumAddress",function(){return le}),o.d(e,"isValidAddress",function(){return ge}),o.d(e,"parsePersonalSign",function(){return he}),o.d(e,"parseTransactionData",function(){return ye}),o.d(e,"sanitizeHex",function(){return T}),o.d(e,"addHexPrefix",function(){return k}),o.d(e,"removeHexPrefix",function(){return M}),o.d(e,"removeHexLeadingZeros",function(){return B}),o.d(e,"payloadId",function(){return Y}),o.d(e,"uuid",function(){return C}),o.d(e,"logDeprecationWarning",function(){return K}),o.d(e,"getInfuraRpcUrl",function(){return W}),o.d(e,"getRpcUrl",function(){return U}),o.d(e,"promisify",function(){return Ie}),o.d(e,"formatRpcError",function(){return pe}),o.d(e,"isWalletConnectSession",function(){return ve}),o.d(e,"parseWalletConnectUri",function(){return Ne}),o.d(e,"getQueryString",function(){return Ge}),o.d(e,"appendToQueryString",function(){return we}),o.d(e,"parseQueryString",function(){return Le}),o.d(e,"formatQueryString",function(){return Ve}),o.d(e,"isEmptyString",function(){return q}),o.d(e,"isEmptyArray",function(){return j}),o.d(e,"isBuffer",function(){return D}),o.d(e,"isTypedArray",function(){return F}),o.d(e,"isArrayBuffer",function(){return $}),o.d(e,"getType",function(){return V}),o.d(e,"getEncoding",function(){return Z}),o.d(e,"isHexString",function(){return ee}),o.d(e,"isJsonRpcSubscription",function(){return re}),o.d(e,"isJsonRpcRequest",function(){return ue}),o.d(e,"isJsonRpcResponseSuccess",function(){return fe}),o.d(e,"isJsonRpcResponseError",function(){return oe}),o.d(e,"isInternalEvent",function(){return ae}),o.d(e,"isReservedEvent",function(){return ie}),o.d(e,"isSilentPayload",function(){return te})},function(i,e,o){(function(n){/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <http://feross.org>
 * @license  MIT
 */var f=o(169),p=o(170),u=o(79);function c(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(j,D){if(c()<D)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(j=new Uint8Array(D)).__proto__=l.prototype:(j===null&&(j=new l(D)),j.length=D),j}function l(j,D,F){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(j,D,F);if(typeof j=="number"){if(typeof D=="string")throw new Error("If encoding is specified then the first argument must be a string");return v(this,j)}return d(this,j,D,F)}function d(j,D,F,$){if(typeof D=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&D instanceof ArrayBuffer?function(V,Z,ee,re){if(Z.byteLength,ee<0||Z.byteLength<ee)throw new RangeError("'offset' is out of bounds");if(Z.byteLength<ee+(re||0))throw new RangeError("'length' is out of bounds");return Z=ee===void 0&&re===void 0?new Uint8Array(Z):re===void 0?new Uint8Array(Z,ee):new Uint8Array(Z,ee,re),l.TYPED_ARRAY_SUPPORT?(V=Z).__proto__=l.prototype:V=y(V,Z),V}(j,D,F,$):typeof D=="string"?function(V,Z,ee){if(typeof ee=="string"&&ee!==""||(ee="utf8"),!l.isEncoding(ee))throw new TypeError('"encoding" must be a valid string encoding');var re=0|E(Z,ee),ue=(V=s(V,re)).write(Z,ee);return ue!==re&&(V=V.slice(0,ue)),V}(j,D,F):function(V,Z){if(l.isBuffer(Z)){var ee=0|x(Z.length);return(V=s(V,ee)).length===0||Z.copy(V,0,0,ee),V}if(Z){if(typeof ArrayBuffer<"u"&&Z.buffer instanceof ArrayBuffer||"length"in Z)return typeof Z.length!="number"||(re=Z.length)!=re?s(V,0):y(V,Z);if(Z.type==="Buffer"&&u(Z.data))return y(V,Z.data)}var re;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(j,D)}function b(j){if(typeof j!="number")throw new TypeError('"size" argument must be a number');if(j<0)throw new RangeError('"size" argument must not be negative')}function v(j,D){if(b(D),j=s(j,D<0?0:0|x(D)),!l.TYPED_ARRAY_SUPPORT)for(var F=0;F<D;++F)j[F]=0;return j}function y(j,D){var F=D.length<0?0:0|x(D.length);j=s(j,F);for(var $=0;$<F;$+=1)j[$]=255&D[$];return j}function x(j){if(j>=c())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c().toString(16)+" bytes");return 0|j}function E(j,D){if(l.isBuffer(j))return j.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(j)||j instanceof ArrayBuffer))return j.byteLength;typeof j!="string"&&(j=""+j);var F=j.length;if(F===0)return 0;for(var $=!1;;)switch(D){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":case void 0:return W(j).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*F;case"hex":return F>>>1;case"base64":return U(j).length;default:if($)return W(j).length;D=(""+D).toLowerCase(),$=!0}}function R(j,D,F){var $=!1;if((D===void 0||D<0)&&(D=0),D>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0)<=(D>>>=0))return"";for(j||(j="utf8");;)switch(j){case"hex":return h(this,D,F);case"utf8":case"utf-8":return S(this,D,F);case"ascii":return a(this,D,F);case"latin1":case"binary":return w(this,D,F);case"base64":return z(this,D,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,D,F);default:if($)throw new TypeError("Unknown encoding: "+j);j=(j+"").toLowerCase(),$=!0}}function I(j,D,F){var $=j[D];j[D]=j[F],j[F]=$}function O(j,D,F,$,V){if(j.length===0)return-1;if(typeof F=="string"?($=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,isNaN(F)&&(F=V?0:j.length-1),F<0&&(F=j.length+F),F>=j.length){if(V)return-1;F=j.length-1}else if(F<0){if(!V)return-1;F=0}if(typeof D=="string"&&(D=l.from(D,$)),l.isBuffer(D))return D.length===0?-1:A(j,D,F,$,V);if(typeof D=="number")return D&=255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(j,D,F):Uint8Array.prototype.lastIndexOf.call(j,D,F):A(j,[D],F,$,V);throw new TypeError("val must be string, number or Buffer")}function A(j,D,F,$,V){var Z,ee=1,re=j.length,ue=D.length;if($!==void 0&&(($=String($).toLowerCase())==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(j.length<2||D.length<2)return-1;ee=2,re/=2,ue/=2,F/=2}function fe(te,le){return ee===1?te[le]:te.readUInt16BE(le*ee)}if(V){var oe=-1;for(Z=F;Z<re;Z++)if(fe(j,Z)===fe(D,oe===-1?0:Z-oe)){if(oe===-1&&(oe=Z),Z-oe+1===ue)return oe*ee}else oe!==-1&&(Z-=Z-oe),oe=-1}else for(F+ue>re&&(F=re-ue),Z=F;Z>=0;Z--){for(var ae=!0,ie=0;ie<ue;ie++)if(fe(j,Z+ie)!==fe(D,ie)){ae=!1;break}if(ae)return Z}return-1}function P(j,D,F,$){F=Number(F)||0;var V=j.length-F;$?($=Number($))>V&&($=V):$=V;var Z=D.length;if(Z%2!=0)throw new TypeError("Invalid hex string");$>Z/2&&($=Z/2);for(var ee=0;ee<$;++ee){var re=parseInt(D.substr(2*ee,2),16);if(isNaN(re))return ee;j[F+ee]=re}return ee}function N(j,D,F,$){return q(W(D,j.length-F),j,F,$)}function L(j,D,F,$){return q(function(V){for(var Z=[],ee=0;ee<V.length;++ee)Z.push(255&V.charCodeAt(ee));return Z}(D),j,F,$)}function H(j,D,F,$){return L(j,D,F,$)}function J(j,D,F,$){return q(U(D),j,F,$)}function G(j,D,F,$){return q(function(V,Z){for(var ee,re,ue,fe=[],oe=0;oe<V.length&&!((Z-=2)<0);++oe)ee=V.charCodeAt(oe),re=ee>>8,ue=ee%256,fe.push(ue),fe.push(re);return fe}(D,j.length-F),j,F,$)}function z(j,D,F){return D===0&&F===j.length?f.fromByteArray(j):f.fromByteArray(j.slice(D,F))}function S(j,D,F){F=Math.min(j.length,F);for(var $=[],V=D;V<F;){var Z,ee,re,ue,fe=j[V],oe=null,ae=fe>239?4:fe>223?3:fe>191?2:1;if(V+ae<=F)switch(ae){case 1:fe<128&&(oe=fe);break;case 2:(192&(Z=j[V+1]))==128&&(ue=(31&fe)<<6|63&Z)>127&&(oe=ue);break;case 3:Z=j[V+1],ee=j[V+2],(192&Z)==128&&(192&ee)==128&&(ue=(15&fe)<<12|(63&Z)<<6|63&ee)>2047&&(ue<55296||ue>57343)&&(oe=ue);break;case 4:Z=j[V+1],ee=j[V+2],re=j[V+3],(192&Z)==128&&(192&ee)==128&&(192&re)==128&&(ue=(15&fe)<<18|(63&Z)<<12|(63&ee)<<6|63&re)>65535&&ue<1114112&&(oe=ue)}oe===null?(oe=65533,ae=1):oe>65535&&(oe-=65536,$.push(oe>>>10&1023|55296),oe=56320|1023&oe),$.push(oe),V+=ae}return function(ie){var te=ie.length;if(te<=4096)return String.fromCharCode.apply(String,ie);for(var le="",ge=0;ge<te;)le+=String.fromCharCode.apply(String,ie.slice(ge,ge+=4096));return le}($)}e.Buffer=l,e.SlowBuffer=function(j){return+j!=j&&(j=0),l.alloc(+j)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=n.TYPED_ARRAY_SUPPORT!==void 0?n.TYPED_ARRAY_SUPPORT:function(){try{var j=new Uint8Array(1);return j.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},j.foo()===42&&typeof j.subarray=="function"&&j.subarray(1,1).byteLength===0}catch{return!1}}(),e.kMaxLength=c(),l.poolSize=8192,l._augment=function(j){return j.__proto__=l.prototype,j},l.from=function(j,D,F){return d(null,j,D,F)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(j,D,F){return function($,V,Z,ee){return b(V),V<=0?s($,V):Z!==void 0?typeof ee=="string"?s($,V).fill(Z,ee):s($,V).fill(Z):s($,V)}(null,j,D,F)},l.allocUnsafe=function(j){return v(null,j)},l.allocUnsafeSlow=function(j){return v(null,j)},l.isBuffer=function(j){return!(j==null||!j._isBuffer)},l.compare=function(j,D){if(!l.isBuffer(j)||!l.isBuffer(D))throw new TypeError("Arguments must be Buffers");if(j===D)return 0;for(var F=j.length,$=D.length,V=0,Z=Math.min(F,$);V<Z;++V)if(j[V]!==D[V]){F=j[V],$=D[V];break}return F<$?-1:$<F?1:0},l.isEncoding=function(j){switch(String(j).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(j,D){if(!u(j))throw new TypeError('"list" argument must be an Array of Buffers');if(j.length===0)return l.alloc(0);var F;if(D===void 0)for(D=0,F=0;F<j.length;++F)D+=j[F].length;var $=l.allocUnsafe(D),V=0;for(F=0;F<j.length;++F){var Z=j[F];if(!l.isBuffer(Z))throw new TypeError('"list" argument must be an Array of Buffers');Z.copy($,V),V+=Z.length}return $},l.byteLength=E,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var j=this.length;if(j%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var D=0;D<j;D+=2)I(this,D,D+1);return this},l.prototype.swap32=function(){var j=this.length;if(j%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var D=0;D<j;D+=4)I(this,D,D+3),I(this,D+1,D+2);return this},l.prototype.swap64=function(){var j=this.length;if(j%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var D=0;D<j;D+=8)I(this,D,D+7),I(this,D+1,D+6),I(this,D+2,D+5),I(this,D+3,D+4);return this},l.prototype.toString=function(){var j=0|this.length;return j===0?"":arguments.length===0?S(this,0,j):R.apply(this,arguments)},l.prototype.equals=function(j){if(!l.isBuffer(j))throw new TypeError("Argument must be a Buffer");return this===j||l.compare(this,j)===0},l.prototype.inspect=function(){var j="",D=e.INSPECT_MAX_BYTES;return this.length>0&&(j=this.toString("hex",0,D).match(/.{2}/g).join(" "),this.length>D&&(j+=" ... ")),"<Buffer "+j+">"},l.prototype.compare=function(j,D,F,$,V){if(!l.isBuffer(j))throw new TypeError("Argument must be a Buffer");if(D===void 0&&(D=0),F===void 0&&(F=j?j.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),D<0||F>j.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&D>=F)return 0;if($>=V)return-1;if(D>=F)return 1;if(this===j)return 0;for(var Z=(V>>>=0)-($>>>=0),ee=(F>>>=0)-(D>>>=0),re=Math.min(Z,ee),ue=this.slice($,V),fe=j.slice(D,F),oe=0;oe<re;++oe)if(ue[oe]!==fe[oe]){Z=ue[oe],ee=fe[oe];break}return Z<ee?-1:ee<Z?1:0},l.prototype.includes=function(j,D,F){return this.indexOf(j,D,F)!==-1},l.prototype.indexOf=function(j,D,F){return O(this,j,D,F,!0)},l.prototype.lastIndexOf=function(j,D,F){return O(this,j,D,F,!1)},l.prototype.write=function(j,D,F,$){if(D===void 0)$="utf8",F=this.length,D=0;else if(F===void 0&&typeof D=="string")$=D,F=this.length,D=0;else{if(!isFinite(D))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");D|=0,isFinite(F)?(F|=0,$===void 0&&($="utf8")):($=F,F=void 0)}var V=this.length-D;if((F===void 0||F>V)&&(F=V),j.length>0&&(F<0||D<0)||D>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");for(var Z=!1;;)switch($){case"hex":return P(this,j,D,F);case"utf8":case"utf-8":return N(this,j,D,F);case"ascii":return L(this,j,D,F);case"latin1":case"binary":return H(this,j,D,F);case"base64":return J(this,j,D,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,j,D,F);default:if(Z)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Z=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function a(j,D,F){var $="";F=Math.min(j.length,F);for(var V=D;V<F;++V)$+=String.fromCharCode(127&j[V]);return $}function w(j,D,F){var $="";F=Math.min(j.length,F);for(var V=D;V<F;++V)$+=String.fromCharCode(j[V]);return $}function h(j,D,F){var $=j.length;(!D||D<0)&&(D=0),(!F||F<0||F>$)&&(F=$);for(var V="",Z=D;Z<F;++Z)V+=K(j[Z]);return V}function m(j,D,F){for(var $=j.slice(D,F),V="",Z=0;Z<$.length;Z+=2)V+=String.fromCharCode($[Z]+256*$[Z+1]);return V}function g(j,D,F){if(j%1!=0||j<0)throw new RangeError("offset is not uint");if(j+D>F)throw new RangeError("Trying to access beyond buffer length")}function _(j,D,F,$,V,Z){if(!l.isBuffer(j))throw new TypeError('"buffer" argument must be a Buffer instance');if(D>V||D<Z)throw new RangeError('"value" argument is out of bounds');if(F+$>j.length)throw new RangeError("Index out of range")}function T(j,D,F,$){D<0&&(D=65535+D+1);for(var V=0,Z=Math.min(j.length-F,2);V<Z;++V)j[F+V]=(D&255<<8*($?V:1-V))>>>8*($?V:1-V)}function k(j,D,F,$){D<0&&(D=4294967295+D+1);for(var V=0,Z=Math.min(j.length-F,4);V<Z;++V)j[F+V]=D>>>8*($?V:3-V)&255}function M(j,D,F,$,V,Z){if(F+$>j.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function B(j,D,F,$,V){return V||M(j,0,F,4),p.write(j,D,F,$,23,4),F+4}function Y(j,D,F,$,V){return V||M(j,0,F,8),p.write(j,D,F,$,52,8),F+8}l.prototype.slice=function(j,D){var F,$=this.length;if((j=~~j)<0?(j+=$)<0&&(j=0):j>$&&(j=$),(D=D===void 0?$:~~D)<0?(D+=$)<0&&(D=0):D>$&&(D=$),D<j&&(D=j),l.TYPED_ARRAY_SUPPORT)(F=this.subarray(j,D)).__proto__=l.prototype;else{var V=D-j;F=new l(V,void 0);for(var Z=0;Z<V;++Z)F[Z]=this[Z+j]}return F},l.prototype.readUIntLE=function(j,D,F){j|=0,D|=0,F||g(j,D,this.length);for(var $=this[j],V=1,Z=0;++Z<D&&(V*=256);)$+=this[j+Z]*V;return $},l.prototype.readUIntBE=function(j,D,F){j|=0,D|=0,F||g(j,D,this.length);for(var $=this[j+--D],V=1;D>0&&(V*=256);)$+=this[j+--D]*V;return $},l.prototype.readUInt8=function(j,D){return D||g(j,1,this.length),this[j]},l.prototype.readUInt16LE=function(j,D){return D||g(j,2,this.length),this[j]|this[j+1]<<8},l.prototype.readUInt16BE=function(j,D){return D||g(j,2,this.length),this[j]<<8|this[j+1]},l.prototype.readUInt32LE=function(j,D){return D||g(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+16777216*this[j+3]},l.prototype.readUInt32BE=function(j,D){return D||g(j,4,this.length),16777216*this[j]+(this[j+1]<<16|this[j+2]<<8|this[j+3])},l.prototype.readIntLE=function(j,D,F){j|=0,D|=0,F||g(j,D,this.length);for(var $=this[j],V=1,Z=0;++Z<D&&(V*=256);)$+=this[j+Z]*V;return $>=(V*=128)&&($-=Math.pow(2,8*D)),$},l.prototype.readIntBE=function(j,D,F){j|=0,D|=0,F||g(j,D,this.length);for(var $=D,V=1,Z=this[j+--$];$>0&&(V*=256);)Z+=this[j+--$]*V;return Z>=(V*=128)&&(Z-=Math.pow(2,8*D)),Z},l.prototype.readInt8=function(j,D){return D||g(j,1,this.length),128&this[j]?-1*(255-this[j]+1):this[j]},l.prototype.readInt16LE=function(j,D){D||g(j,2,this.length);var F=this[j]|this[j+1]<<8;return 32768&F?4294901760|F:F},l.prototype.readInt16BE=function(j,D){D||g(j,2,this.length);var F=this[j+1]|this[j]<<8;return 32768&F?4294901760|F:F},l.prototype.readInt32LE=function(j,D){return D||g(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},l.prototype.readInt32BE=function(j,D){return D||g(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},l.prototype.readFloatLE=function(j,D){return D||g(j,4,this.length),p.read(this,j,!0,23,4)},l.prototype.readFloatBE=function(j,D){return D||g(j,4,this.length),p.read(this,j,!1,23,4)},l.prototype.readDoubleLE=function(j,D){return D||g(j,8,this.length),p.read(this,j,!0,52,8)},l.prototype.readDoubleBE=function(j,D){return D||g(j,8,this.length),p.read(this,j,!1,52,8)},l.prototype.writeUIntLE=function(j,D,F,$){j=+j,D|=0,F|=0,$||_(this,j,D,F,Math.pow(2,8*F)-1,0);var V=1,Z=0;for(this[D]=255&j;++Z<F&&(V*=256);)this[D+Z]=j/V&255;return D+F},l.prototype.writeUIntBE=function(j,D,F,$){j=+j,D|=0,F|=0,$||_(this,j,D,F,Math.pow(2,8*F)-1,0);var V=F-1,Z=1;for(this[D+V]=255&j;--V>=0&&(Z*=256);)this[D+V]=j/Z&255;return D+F},l.prototype.writeUInt8=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,1,255,0),l.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),this[D]=255&j,D+1},l.prototype.writeUInt16LE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[D]=255&j,this[D+1]=j>>>8):T(this,j,D,!0),D+2},l.prototype.writeUInt16BE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[D]=j>>>8,this[D+1]=255&j):T(this,j,D,!1),D+2},l.prototype.writeUInt32LE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[D+3]=j>>>24,this[D+2]=j>>>16,this[D+1]=j>>>8,this[D]=255&j):k(this,j,D,!0),D+4},l.prototype.writeUInt32BE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[D]=j>>>24,this[D+1]=j>>>16,this[D+2]=j>>>8,this[D+3]=255&j):k(this,j,D,!1),D+4},l.prototype.writeIntLE=function(j,D,F,$){if(j=+j,D|=0,!$){var V=Math.pow(2,8*F-1);_(this,j,D,F,V-1,-V)}var Z=0,ee=1,re=0;for(this[D]=255&j;++Z<F&&(ee*=256);)j<0&&re===0&&this[D+Z-1]!==0&&(re=1),this[D+Z]=(j/ee>>0)-re&255;return D+F},l.prototype.writeIntBE=function(j,D,F,$){if(j=+j,D|=0,!$){var V=Math.pow(2,8*F-1);_(this,j,D,F,V-1,-V)}var Z=F-1,ee=1,re=0;for(this[D+Z]=255&j;--Z>=0&&(ee*=256);)j<0&&re===0&&this[D+Z+1]!==0&&(re=1),this[D+Z]=(j/ee>>0)-re&255;return D+F},l.prototype.writeInt8=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,1,127,-128),l.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),j<0&&(j=255+j+1),this[D]=255&j,D+1},l.prototype.writeInt16LE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[D]=255&j,this[D+1]=j>>>8):T(this,j,D,!0),D+2},l.prototype.writeInt16BE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[D]=j>>>8,this[D+1]=255&j):T(this,j,D,!1),D+2},l.prototype.writeInt32LE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[D]=255&j,this[D+1]=j>>>8,this[D+2]=j>>>16,this[D+3]=j>>>24):k(this,j,D,!0),D+4},l.prototype.writeInt32BE=function(j,D,F){return j=+j,D|=0,F||_(this,j,D,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),l.TYPED_ARRAY_SUPPORT?(this[D]=j>>>24,this[D+1]=j>>>16,this[D+2]=j>>>8,this[D+3]=255&j):k(this,j,D,!1),D+4},l.prototype.writeFloatLE=function(j,D,F){return B(this,j,D,!0,F)},l.prototype.writeFloatBE=function(j,D,F){return B(this,j,D,!1,F)},l.prototype.writeDoubleLE=function(j,D,F){return Y(this,j,D,!0,F)},l.prototype.writeDoubleBE=function(j,D,F){return Y(this,j,D,!1,F)},l.prototype.copy=function(j,D,F,$){if(F||(F=0),$||$===0||($=this.length),D>=j.length&&(D=j.length),D||(D=0),$>0&&$<F&&($=F),$===F||j.length===0||this.length===0)return 0;if(D<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("sourceStart out of bounds");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),j.length-D<$-F&&($=j.length-D+F);var V,Z=$-F;if(this===j&&F<D&&D<$)for(V=Z-1;V>=0;--V)j[V+D]=this[V+F];else if(Z<1e3||!l.TYPED_ARRAY_SUPPORT)for(V=0;V<Z;++V)j[V+D]=this[V+F];else Uint8Array.prototype.set.call(j,this.subarray(F,F+Z),D);return Z},l.prototype.fill=function(j,D,F,$){if(typeof j=="string"){if(typeof D=="string"?($=D,D=0,F=this.length):typeof F=="string"&&($=F,F=this.length),j.length===1){var V=j.charCodeAt(0);V<256&&(j=V)}if($!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!l.isEncoding($))throw new TypeError("Unknown encoding: "+$)}else typeof j=="number"&&(j&=255);if(D<0||this.length<D||this.length<F)throw new RangeError("Out of range index");if(F<=D)return this;var Z;if(D>>>=0,F=F===void 0?this.length:F>>>0,j||(j=0),typeof j=="number")for(Z=D;Z<F;++Z)this[Z]=j;else{var ee=l.isBuffer(j)?j:W(new l(j,$).toString()),re=ee.length;for(Z=0;Z<F-D;++Z)this[Z+D]=ee[Z%re]}return this};var C=/[^+\/0-9A-Za-z-_]/g;function K(j){return j<16?"0"+j.toString(16):j.toString(16)}function W(j,D){var F;D=D||1/0;for(var $=j.length,V=null,Z=[],ee=0;ee<$;++ee){if((F=j.charCodeAt(ee))>55295&&F<57344){if(!V){if(F>56319){(D-=3)>-1&&Z.push(239,191,189);continue}if(ee+1===$){(D-=3)>-1&&Z.push(239,191,189);continue}V=F;continue}if(F<56320){(D-=3)>-1&&Z.push(239,191,189),V=F;continue}F=65536+(V-55296<<10|F-56320)}else V&&(D-=3)>-1&&Z.push(239,191,189);if(V=null,F<128){if((D-=1)<0)break;Z.push(F)}else if(F<2048){if((D-=2)<0)break;Z.push(F>>6|192,63&F|128)}else if(F<65536){if((D-=3)<0)break;Z.push(F>>12|224,F>>6&63|128,63&F|128)}else{if(!(F<1114112))throw new Error("Invalid code point");if((D-=4)<0)break;Z.push(F>>18|240,F>>12&63|128,F>>6&63|128,63&F|128)}}return Z}function U(j){return f.toByteArray(function(D){if((D=function(F){return F.trim?F.trim():F.replace(/^\s+|\s+$/g,"")}(D).replace(C,"")).length<2)return"";for(;D.length%4!=0;)D+="=";return D}(j))}function q(j,D,F,$){for(var V=0;V<$&&!(V+F>=D.length||V>=j.length);++V)D[V+F]=j[V];return V}}).call(this,o(6))},function(i,e){typeof Object.create=="function"?i.exports=function(o,n){n&&(o.super_=n,o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:i.exports=function(o,n){if(n){o.super_=n;var f=function(){};f.prototype=n.prototype,o.prototype=new f,o.prototype.constructor=o}}},function(i,e,o){o.d(e,"b",function(){return 256}),o.d(e,"g",function(){return 256}),o.d(e,"a",function(){return"AES-CBC"}),o.d(e,"f",function(){return"SHA-256"}),o.d(e,"e",function(){return"HMAC"}),o.d(e,"i",function(){return"SHA-256"}),o.d(e,"j",function(){return"SHA-512"}),o.d(e,"h",function(){return 512}),o.d(e,"d",function(){return"encrypt"}),o.d(e,"c",function(){return"decrypt"}),o.d(e,"k",function(){return"sign"}),o.d(e,"l",function(){return"verify"})},function(i,e){var o,n,f=i.exports={};function p(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(R){if(o===setTimeout)return setTimeout(R,0);if((o===p||!o)&&setTimeout)return o=setTimeout,setTimeout(R,0);try{return o(R,0)}catch{try{return o.call(null,R,0)}catch{return o.call(this,R,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:p}catch{o=p}try{n=typeof clearTimeout=="function"?clearTimeout:u}catch{n=u}})();var s,l=[],d=!1,b=-1;function v(){d&&s&&(d=!1,s.length?l=s.concat(l):b=-1,l.length&&y())}function y(){if(!d){var R=c(v);d=!0;for(var I=l.length;I;){for(s=l,l=[];++b<I;)s&&s[b].run();b=-1,I=l.length}s=null,d=!1,function(O){if(n===clearTimeout)return clearTimeout(O);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(O);try{n(O)}catch{try{return n.call(null,O)}catch{return n.call(this,O)}}}(R)}}function x(R,I){this.fun=R,this.array=I}function E(){}f.nextTick=function(R){var I=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)I[O-1]=arguments[O];l.push(new x(R,I)),l.length!==1||d||c(y)},x.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=E,f.addListener=E,f.once=E,f.off=E,f.removeListener=E,f.removeAllListeners=E,f.emit=E,f.prependListener=E,f.prependOnceListener=E,f.listeners=function(R){return[]},f.binding=function(R){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(R){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(i,e){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}i.exports=o},function(i,e,o){o.d(e,"b",function(){return n}),o.d(e,"d",function(){return f}),o.d(e,"c",function(){return p}),o.d(e,"e",function(){return u}),o.d(e,"f",function(){return c}),o.d(e,"a",function(){return s});const n="INTERNAL_ERROR",f="SERVER_ERROR",p=[-32700,-32600,-32601,-32602,-32603],u=[-32e3,-32099],c={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[n]:{code:-32603,message:"Internal error"},[f]:{code:-32e3,message:"Server error"}},s=f},function(i,e,o){var n=this&&this.__createBinding||(Object.create?function(p,u,c,s){s===void 0&&(s=c),Object.defineProperty(p,s,{enumerable:!0,get:function(){return u[c]}})}:function(p,u,c,s){s===void 0&&(s=c),p[s]=u[c]}),f=this&&this.__exportStar||function(p,u){for(var c in p)c==="default"||u.hasOwnProperty(c)||n(u,p,c)};Object.defineProperty(e,"__esModule",{value:!0}),f(o(172),e),f(o(173),e)},function(i,e,o){(function(n){(function(f,p){function u(S,a){if(!S)throw new Error(a||"Assertion failed")}function c(S,a){S.super_=a;var w=function(){};w.prototype=a.prototype,S.prototype=new w,S.prototype.constructor=S}function s(S,a,w){if(s.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&(a!=="le"&&a!=="be"||(w=a,a=10),this._init(S||0,a||10,w||"be"))}var l;typeof f=="object"?f.exports=s:p.BN=s,s.BN=s,s.wordSize=26;try{l=o(168).Buffer}catch{}function d(S,a,w){for(var h=0,m=Math.min(S.length,w),g=a;g<m;g++){var _=S.charCodeAt(g)-48;h<<=4,h|=_>=49&&_<=54?_-49+10:_>=17&&_<=22?_-17+10:15&_}return h}function b(S,a,w,h){for(var m=0,g=Math.min(S.length,w),_=a;_<g;_++){var T=S.charCodeAt(_)-48;m*=h,m+=T>=49?T-49+10:T>=17?T-17+10:T}return m}s.isBN=function(S){return S instanceof s||S!==null&&typeof S=="object"&&S.constructor.wordSize===s.wordSize&&Array.isArray(S.words)},s.max=function(S,a){return S.cmp(a)>0?S:a},s.min=function(S,a){return S.cmp(a)<0?S:a},s.prototype._init=function(S,a,w){if(typeof S=="number")return this._initNumber(S,a,w);if(typeof S=="object")return this._initArray(S,a,w);a==="hex"&&(a=16),u(a===(0|a)&&a>=2&&a<=36);var h=0;(S=S.toString().replace(/\s+/g,""))[0]==="-"&&h++,a===16?this._parseHex(S,h):this._parseBase(S,a,h),S[0]==="-"&&(this.negative=1),this.strip(),w==="le"&&this._initArray(this.toArray(),a,w)},s.prototype._initNumber=function(S,a,w){S<0&&(this.negative=1,S=-S),S<67108864?(this.words=[67108863&S],this.length=1):S<4503599627370496?(this.words=[67108863&S,S/67108864&67108863],this.length=2):(u(S<9007199254740992),this.words=[67108863&S,S/67108864&67108863,1],this.length=3),w==="le"&&this._initArray(this.toArray(),a,w)},s.prototype._initArray=function(S,a,w){if(u(typeof S.length=="number"),S.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(S.length/3),this.words=new Array(this.length);for(var h=0;h<this.length;h++)this.words[h]=0;var m,g,_=0;if(w==="be")for(h=S.length-1,m=0;h>=0;h-=3)g=S[h]|S[h-1]<<8|S[h-2]<<16,this.words[m]|=g<<_&67108863,this.words[m+1]=g>>>26-_&67108863,(_+=24)>=26&&(_-=26,m++);else if(w==="le")for(h=0,m=0;h<S.length;h+=3)g=S[h]|S[h+1]<<8|S[h+2]<<16,this.words[m]|=g<<_&67108863,this.words[m+1]=g>>>26-_&67108863,(_+=24)>=26&&(_-=26,m++);return this.strip()},s.prototype._parseHex=function(S,a){this.length=Math.ceil((S.length-a)/6),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var h,m,g=0;for(w=S.length-6,h=0;w>=a;w-=6)m=d(S,w,w+6),this.words[h]|=m<<g&67108863,this.words[h+1]|=m>>>26-g&4194303,(g+=24)>=26&&(g-=26,h++);w+6!==a&&(m=d(S,a,w+6),this.words[h]|=m<<g&67108863,this.words[h+1]|=m>>>26-g&4194303),this.strip()},s.prototype._parseBase=function(S,a,w){this.words=[0],this.length=1;for(var h=0,m=1;m<=67108863;m*=a)h++;h--,m=m/a|0;for(var g=S.length-w,_=g%h,T=Math.min(g,g-_)+w,k=0,M=w;M<T;M+=h)k=b(S,M,M+h,a),this.imuln(m),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k);if(_!==0){var B=1;for(k=b(S,M,S.length,a),M=0;M<_;M++)B*=a;this.imuln(B),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k)}},s.prototype.copy=function(S){S.words=new Array(this.length);for(var a=0;a<this.length;a++)S.words[a]=this.words[a];S.length=this.length,S.negative=this.negative,S.red=this.red},s.prototype.clone=function(){var S=new s(null);return this.copy(S),S},s.prototype._expand=function(S){for(;this.length<S;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var v=["","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"],y=[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],x=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function E(S,a,w){w.negative=a.negative^S.negative;var h=S.length+a.length|0;w.length=h,h=h-1|0;var m=0|S.words[0],g=0|a.words[0],_=m*g,T=67108863&_,k=_/67108864|0;w.words[0]=T;for(var M=1;M<h;M++){for(var B=k>>>26,Y=67108863&k,C=Math.min(M,a.length-1),K=Math.max(0,M-S.length+1);K<=C;K++){var W=M-K|0;B+=(_=(m=0|S.words[W])*(g=0|a.words[K])+Y)/67108864|0,Y=67108863&_}w.words[M]=0|Y,k=0|B}return k!==0?w.words[M]=0|k:w.length--,w.strip()}s.prototype.toString=function(S,a){var w;if(a=0|a||1,(S=S||10)===16||S==="hex"){w="";for(var h=0,m=0,g=0;g<this.length;g++){var _=this.words[g],T=(16777215&(_<<h|m)).toString(16);w=(m=_>>>24-h&16777215)!==0||g!==this.length-1?v[6-T.length]+T+w:T+w,(h+=2)>=26&&(h-=26,g--)}for(m!==0&&(w=m.toString(16)+w);w.length%a!=0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}if(S===(0|S)&&S>=2&&S<=36){var k=y[S],M=x[S];w="";var B=this.clone();for(B.negative=0;!B.isZero();){var Y=B.modn(M).toString(S);w=(B=B.idivn(M)).isZero()?Y+w:v[k-Y.length]+Y+w}for(this.isZero()&&(w="0"+w);w.length%a!=0;)w="0"+w;return this.negative!==0&&(w="-"+w),w}u(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var S=this.words[0];return this.length===2?S+=67108864*this.words[1]:this.length===3&&this.words[2]===1?S+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-S:S},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(S,a){return u(l!==void 0),this.toArrayLike(l,S,a)},s.prototype.toArray=function(S,a){return this.toArrayLike(Array,S,a)},s.prototype.toArrayLike=function(S,a,w){var h=this.byteLength(),m=w||Math.max(1,h);u(h<=m,"byte array longer than desired length"),u(m>0,"Requested array length <= 0"),this.strip();var g,_,T=a==="le",k=new S(m),M=this.clone();if(T){for(_=0;!M.isZero();_++)g=M.andln(255),M.iushrn(8),k[_]=g;for(;_<m;_++)k[_]=0}else{for(_=0;_<m-h;_++)k[_]=0;for(_=0;!M.isZero();_++)g=M.andln(255),M.iushrn(8),k[m-_-1]=g}return k},Math.clz32?s.prototype._countBits=function(S){return 32-Math.clz32(S)}:s.prototype._countBits=function(S){var a=S,w=0;return a>=4096&&(w+=13,a>>>=13),a>=64&&(w+=7,a>>>=7),a>=8&&(w+=4,a>>>=4),a>=2&&(w+=2,a>>>=2),w+a},s.prototype._zeroBits=function(S){if(S===0)return 26;var a=S,w=0;return!(8191&a)&&(w+=13,a>>>=13),!(127&a)&&(w+=7,a>>>=7),!(15&a)&&(w+=4,a>>>=4),!(3&a)&&(w+=2,a>>>=2),!(1&a)&&w++,w},s.prototype.bitLength=function(){var S=this.words[this.length-1],a=this._countBits(S);return 26*(this.length-1)+a},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var S=0,a=0;a<this.length;a++){var w=this._zeroBits(this.words[a]);if(S+=w,w!==26)break}return S},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(S){return this.negative!==0?this.abs().inotn(S).iaddn(1):this.clone()},s.prototype.fromTwos=function(S){return this.testn(S-1)?this.notn(S).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(S){for(;this.length<S.length;)this.words[this.length++]=0;for(var a=0;a<S.length;a++)this.words[a]=this.words[a]|S.words[a];return this.strip()},s.prototype.ior=function(S){return u((this.negative|S.negative)==0),this.iuor(S)},s.prototype.or=function(S){return this.length>S.length?this.clone().ior(S):S.clone().ior(this)},s.prototype.uor=function(S){return this.length>S.length?this.clone().iuor(S):S.clone().iuor(this)},s.prototype.iuand=function(S){var a;a=this.length>S.length?S:this;for(var w=0;w<a.length;w++)this.words[w]=this.words[w]&S.words[w];return this.length=a.length,this.strip()},s.prototype.iand=function(S){return u((this.negative|S.negative)==0),this.iuand(S)},s.prototype.and=function(S){return this.length>S.length?this.clone().iand(S):S.clone().iand(this)},s.prototype.uand=function(S){return this.length>S.length?this.clone().iuand(S):S.clone().iuand(this)},s.prototype.iuxor=function(S){var a,w;this.length>S.length?(a=this,w=S):(a=S,w=this);for(var h=0;h<w.length;h++)this.words[h]=a.words[h]^w.words[h];if(this!==a)for(;h<a.length;h++)this.words[h]=a.words[h];return this.length=a.length,this.strip()},s.prototype.ixor=function(S){return u((this.negative|S.negative)==0),this.iuxor(S)},s.prototype.xor=function(S){return this.length>S.length?this.clone().ixor(S):S.clone().ixor(this)},s.prototype.uxor=function(S){return this.length>S.length?this.clone().iuxor(S):S.clone().iuxor(this)},s.prototype.inotn=function(S){u(typeof S=="number"&&S>=0);var a=0|Math.ceil(S/26),w=S%26;this._expand(a),w>0&&a--;for(var h=0;h<a;h++)this.words[h]=67108863&~this.words[h];return w>0&&(this.words[h]=~this.words[h]&67108863>>26-w),this.strip()},s.prototype.notn=function(S){return this.clone().inotn(S)},s.prototype.setn=function(S,a){u(typeof S=="number"&&S>=0);var w=S/26|0,h=S%26;return this._expand(w+1),this.words[w]=a?this.words[w]|1<<h:this.words[w]&~(1<<h),this.strip()},s.prototype.iadd=function(S){var a,w,h;if(this.negative!==0&&S.negative===0)return this.negative=0,a=this.isub(S),this.negative^=1,this._normSign();if(this.negative===0&&S.negative!==0)return S.negative=0,a=this.isub(S),S.negative=1,a._normSign();this.length>S.length?(w=this,h=S):(w=S,h=this);for(var m=0,g=0;g<h.length;g++)a=(0|w.words[g])+(0|h.words[g])+m,this.words[g]=67108863&a,m=a>>>26;for(;m!==0&&g<w.length;g++)a=(0|w.words[g])+m,this.words[g]=67108863&a,m=a>>>26;if(this.length=w.length,m!==0)this.words[this.length]=m,this.length++;else if(w!==this)for(;g<w.length;g++)this.words[g]=w.words[g];return this},s.prototype.add=function(S){var a;return S.negative!==0&&this.negative===0?(S.negative=0,a=this.sub(S),S.negative^=1,a):S.negative===0&&this.negative!==0?(this.negative=0,a=S.sub(this),this.negative=1,a):this.length>S.length?this.clone().iadd(S):S.clone().iadd(this)},s.prototype.isub=function(S){if(S.negative!==0){S.negative=0;var a=this.iadd(S);return S.negative=1,a._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(S),this.negative=1,this._normSign();var w,h,m=this.cmp(S);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,h=S):(w=S,h=this);for(var g=0,_=0;_<h.length;_++)g=(a=(0|w.words[_])-(0|h.words[_])+g)>>26,this.words[_]=67108863&a;for(;g!==0&&_<w.length;_++)g=(a=(0|w.words[_])+g)>>26,this.words[_]=67108863&a;if(g===0&&_<w.length&&w!==this)for(;_<w.length;_++)this.words[_]=w.words[_];return this.length=Math.max(this.length,_),w!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(S){return this.clone().isub(S)};var R=function(S,a,w){var h,m,g,_=S.words,T=a.words,k=w.words,M=0,B=0|_[0],Y=8191&B,C=B>>>13,K=0|_[1],W=8191&K,U=K>>>13,q=0|_[2],j=8191&q,D=q>>>13,F=0|_[3],$=8191&F,V=F>>>13,Z=0|_[4],ee=8191&Z,re=Z>>>13,ue=0|_[5],fe=8191&ue,oe=ue>>>13,ae=0|_[6],ie=8191&ae,te=ae>>>13,le=0|_[7],ge=8191&le,he=le>>>13,ye=0|_[8],Ie=8191&ye,pe=ye>>>13,Oe=0|_[9],Ge=8191&Oe,we=Oe>>>13,Le=0|T[0],Ve=8191&Le,ve=Le>>>13,Ne=0|T[1],se=8191&Ne,de=Ne>>>13,_e=0|T[2],Ue=8191&_e,me=_e>>>13,Be=0|T[3],Je=8191&Be,be=Be>>>13,He=0|T[4],tt=8191&He,Re=He>>>13,ze=0|T[5],Ze=8191&ze,Ae=ze>>>13,De=0|T[6],rt=8191&De,Ee=De>>>13,Fe=0|T[7],Qe=8191&Fe,Se=Fe>>>13,Ke=0|T[8],Xe=8191&Ke,Me=Ke>>>13,We=0|T[9],et=8191&We,ke=We>>>13;w.negative=S.negative^a.negative,w.length=19;var qe=(M+(h=Math.imul(Y,Ve))|0)+((8191&(m=(m=Math.imul(Y,ve))+Math.imul(C,Ve)|0))<<13)|0;M=((g=Math.imul(C,ve))+(m>>>13)|0)+(qe>>>26)|0,qe&=67108863,h=Math.imul(W,Ve),m=(m=Math.imul(W,ve))+Math.imul(U,Ve)|0,g=Math.imul(U,ve);var Q=(M+(h=h+Math.imul(Y,se)|0)|0)+((8191&(m=(m=m+Math.imul(Y,de)|0)+Math.imul(C,se)|0))<<13)|0;M=((g=g+Math.imul(C,de)|0)+(m>>>13)|0)+(Q>>>26)|0,Q&=67108863,h=Math.imul(j,Ve),m=(m=Math.imul(j,ve))+Math.imul(D,Ve)|0,g=Math.imul(D,ve),h=h+Math.imul(W,se)|0,m=(m=m+Math.imul(W,de)|0)+Math.imul(U,se)|0,g=g+Math.imul(U,de)|0;var X=(M+(h=h+Math.imul(Y,Ue)|0)|0)+((8191&(m=(m=m+Math.imul(Y,me)|0)+Math.imul(C,Ue)|0))<<13)|0;M=((g=g+Math.imul(C,me)|0)+(m>>>13)|0)+(X>>>26)|0,X&=67108863,h=Math.imul($,Ve),m=(m=Math.imul($,ve))+Math.imul(V,Ve)|0,g=Math.imul(V,ve),h=h+Math.imul(j,se)|0,m=(m=m+Math.imul(j,de)|0)+Math.imul(D,se)|0,g=g+Math.imul(D,de)|0,h=h+Math.imul(W,Ue)|0,m=(m=m+Math.imul(W,me)|0)+Math.imul(U,Ue)|0,g=g+Math.imul(U,me)|0;var ne=(M+(h=h+Math.imul(Y,Je)|0)|0)+((8191&(m=(m=m+Math.imul(Y,be)|0)+Math.imul(C,Je)|0))<<13)|0;M=((g=g+Math.imul(C,be)|0)+(m>>>13)|0)+(ne>>>26)|0,ne&=67108863,h=Math.imul(ee,Ve),m=(m=Math.imul(ee,ve))+Math.imul(re,Ve)|0,g=Math.imul(re,ve),h=h+Math.imul($,se)|0,m=(m=m+Math.imul($,de)|0)+Math.imul(V,se)|0,g=g+Math.imul(V,de)|0,h=h+Math.imul(j,Ue)|0,m=(m=m+Math.imul(j,me)|0)+Math.imul(D,Ue)|0,g=g+Math.imul(D,me)|0,h=h+Math.imul(W,Je)|0,m=(m=m+Math.imul(W,be)|0)+Math.imul(U,Je)|0,g=g+Math.imul(U,be)|0;var ce=(M+(h=h+Math.imul(Y,tt)|0)|0)+((8191&(m=(m=m+Math.imul(Y,Re)|0)+Math.imul(C,tt)|0))<<13)|0;M=((g=g+Math.imul(C,Re)|0)+(m>>>13)|0)+(ce>>>26)|0,ce&=67108863,h=Math.imul(fe,Ve),m=(m=Math.imul(fe,ve))+Math.imul(oe,Ve)|0,g=Math.imul(oe,ve),h=h+Math.imul(ee,se)|0,m=(m=m+Math.imul(ee,de)|0)+Math.imul(re,se)|0,g=g+Math.imul(re,de)|0,h=h+Math.imul($,Ue)|0,m=(m=m+Math.imul($,me)|0)+Math.imul(V,Ue)|0,g=g+Math.imul(V,me)|0,h=h+Math.imul(j,Je)|0,m=(m=m+Math.imul(j,be)|0)+Math.imul(D,Je)|0,g=g+Math.imul(D,be)|0,h=h+Math.imul(W,tt)|0,m=(m=m+Math.imul(W,Re)|0)+Math.imul(U,tt)|0,g=g+Math.imul(U,Re)|0;var Ce=(M+(h=h+Math.imul(Y,Ze)|0)|0)+((8191&(m=(m=m+Math.imul(Y,Ae)|0)+Math.imul(C,Ze)|0))<<13)|0;M=((g=g+Math.imul(C,Ae)|0)+(m>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,h=Math.imul(ie,Ve),m=(m=Math.imul(ie,ve))+Math.imul(te,Ve)|0,g=Math.imul(te,ve),h=h+Math.imul(fe,se)|0,m=(m=m+Math.imul(fe,de)|0)+Math.imul(oe,se)|0,g=g+Math.imul(oe,de)|0,h=h+Math.imul(ee,Ue)|0,m=(m=m+Math.imul(ee,me)|0)+Math.imul(re,Ue)|0,g=g+Math.imul(re,me)|0,h=h+Math.imul($,Je)|0,m=(m=m+Math.imul($,be)|0)+Math.imul(V,Je)|0,g=g+Math.imul(V,be)|0,h=h+Math.imul(j,tt)|0,m=(m=m+Math.imul(j,Re)|0)+Math.imul(D,tt)|0,g=g+Math.imul(D,Re)|0,h=h+Math.imul(W,Ze)|0,m=(m=m+Math.imul(W,Ae)|0)+Math.imul(U,Ze)|0,g=g+Math.imul(U,Ae)|0;var Pe=(M+(h=h+Math.imul(Y,rt)|0)|0)+((8191&(m=(m=m+Math.imul(Y,Ee)|0)+Math.imul(C,rt)|0))<<13)|0;M=((g=g+Math.imul(C,Ee)|0)+(m>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,h=Math.imul(ge,Ve),m=(m=Math.imul(ge,ve))+Math.imul(he,Ve)|0,g=Math.imul(he,ve),h=h+Math.imul(ie,se)|0,m=(m=m+Math.imul(ie,de)|0)+Math.imul(te,se)|0,g=g+Math.imul(te,de)|0,h=h+Math.imul(fe,Ue)|0,m=(m=m+Math.imul(fe,me)|0)+Math.imul(oe,Ue)|0,g=g+Math.imul(oe,me)|0,h=h+Math.imul(ee,Je)|0,m=(m=m+Math.imul(ee,be)|0)+Math.imul(re,Je)|0,g=g+Math.imul(re,be)|0,h=h+Math.imul($,tt)|0,m=(m=m+Math.imul($,Re)|0)+Math.imul(V,tt)|0,g=g+Math.imul(V,Re)|0,h=h+Math.imul(j,Ze)|0,m=(m=m+Math.imul(j,Ae)|0)+Math.imul(D,Ze)|0,g=g+Math.imul(D,Ae)|0,h=h+Math.imul(W,rt)|0,m=(m=m+Math.imul(W,Ee)|0)+Math.imul(U,rt)|0,g=g+Math.imul(U,Ee)|0;var Ye=(M+(h=h+Math.imul(Y,Qe)|0)|0)+((8191&(m=(m=m+Math.imul(Y,Se)|0)+Math.imul(C,Qe)|0))<<13)|0;M=((g=g+Math.imul(C,Se)|0)+(m>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,h=Math.imul(Ie,Ve),m=(m=Math.imul(Ie,ve))+Math.imul(pe,Ve)|0,g=Math.imul(pe,ve),h=h+Math.imul(ge,se)|0,m=(m=m+Math.imul(ge,de)|0)+Math.imul(he,se)|0,g=g+Math.imul(he,de)|0,h=h+Math.imul(ie,Ue)|0,m=(m=m+Math.imul(ie,me)|0)+Math.imul(te,Ue)|0,g=g+Math.imul(te,me)|0,h=h+Math.imul(fe,Je)|0,m=(m=m+Math.imul(fe,be)|0)+Math.imul(oe,Je)|0,g=g+Math.imul(oe,be)|0,h=h+Math.imul(ee,tt)|0,m=(m=m+Math.imul(ee,Re)|0)+Math.imul(re,tt)|0,g=g+Math.imul(re,Re)|0,h=h+Math.imul($,Ze)|0,m=(m=m+Math.imul($,Ae)|0)+Math.imul(V,Ze)|0,g=g+Math.imul(V,Ae)|0,h=h+Math.imul(j,rt)|0,m=(m=m+Math.imul(j,Ee)|0)+Math.imul(D,rt)|0,g=g+Math.imul(D,Ee)|0,h=h+Math.imul(W,Qe)|0,m=(m=m+Math.imul(W,Se)|0)+Math.imul(U,Qe)|0,g=g+Math.imul(U,Se)|0;var $e=(M+(h=h+Math.imul(Y,Xe)|0)|0)+((8191&(m=(m=m+Math.imul(Y,Me)|0)+Math.imul(C,Xe)|0))<<13)|0;M=((g=g+Math.imul(C,Me)|0)+(m>>>13)|0)+($e>>>26)|0,$e&=67108863,h=Math.imul(Ge,Ve),m=(m=Math.imul(Ge,ve))+Math.imul(we,Ve)|0,g=Math.imul(we,ve),h=h+Math.imul(Ie,se)|0,m=(m=m+Math.imul(Ie,de)|0)+Math.imul(pe,se)|0,g=g+Math.imul(pe,de)|0,h=h+Math.imul(ge,Ue)|0,m=(m=m+Math.imul(ge,me)|0)+Math.imul(he,Ue)|0,g=g+Math.imul(he,me)|0,h=h+Math.imul(ie,Je)|0,m=(m=m+Math.imul(ie,be)|0)+Math.imul(te,Je)|0,g=g+Math.imul(te,be)|0,h=h+Math.imul(fe,tt)|0,m=(m=m+Math.imul(fe,Re)|0)+Math.imul(oe,tt)|0,g=g+Math.imul(oe,Re)|0,h=h+Math.imul(ee,Ze)|0,m=(m=m+Math.imul(ee,Ae)|0)+Math.imul(re,Ze)|0,g=g+Math.imul(re,Ae)|0,h=h+Math.imul($,rt)|0,m=(m=m+Math.imul($,Ee)|0)+Math.imul(V,rt)|0,g=g+Math.imul(V,Ee)|0,h=h+Math.imul(j,Qe)|0,m=(m=m+Math.imul(j,Se)|0)+Math.imul(D,Qe)|0,g=g+Math.imul(D,Se)|0,h=h+Math.imul(W,Xe)|0,m=(m=m+Math.imul(W,Me)|0)+Math.imul(U,Xe)|0,g=g+Math.imul(U,Me)|0;var nt=(M+(h=h+Math.imul(Y,et)|0)|0)+((8191&(m=(m=m+Math.imul(Y,ke)|0)+Math.imul(C,et)|0))<<13)|0;M=((g=g+Math.imul(C,ke)|0)+(m>>>13)|0)+(nt>>>26)|0,nt&=67108863,h=Math.imul(Ge,se),m=(m=Math.imul(Ge,de))+Math.imul(we,se)|0,g=Math.imul(we,de),h=h+Math.imul(Ie,Ue)|0,m=(m=m+Math.imul(Ie,me)|0)+Math.imul(pe,Ue)|0,g=g+Math.imul(pe,me)|0,h=h+Math.imul(ge,Je)|0,m=(m=m+Math.imul(ge,be)|0)+Math.imul(he,Je)|0,g=g+Math.imul(he,be)|0,h=h+Math.imul(ie,tt)|0,m=(m=m+Math.imul(ie,Re)|0)+Math.imul(te,tt)|0,g=g+Math.imul(te,Re)|0,h=h+Math.imul(fe,Ze)|0,m=(m=m+Math.imul(fe,Ae)|0)+Math.imul(oe,Ze)|0,g=g+Math.imul(oe,Ae)|0,h=h+Math.imul(ee,rt)|0,m=(m=m+Math.imul(ee,Ee)|0)+Math.imul(re,rt)|0,g=g+Math.imul(re,Ee)|0,h=h+Math.imul($,Qe)|0,m=(m=m+Math.imul($,Se)|0)+Math.imul(V,Qe)|0,g=g+Math.imul(V,Se)|0,h=h+Math.imul(j,Xe)|0,m=(m=m+Math.imul(j,Me)|0)+Math.imul(D,Xe)|0,g=g+Math.imul(D,Me)|0;var je=(M+(h=h+Math.imul(W,et)|0)|0)+((8191&(m=(m=m+Math.imul(W,ke)|0)+Math.imul(U,et)|0))<<13)|0;M=((g=g+Math.imul(U,ke)|0)+(m>>>13)|0)+(je>>>26)|0,je&=67108863,h=Math.imul(Ge,Ue),m=(m=Math.imul(Ge,me))+Math.imul(we,Ue)|0,g=Math.imul(we,me),h=h+Math.imul(Ie,Je)|0,m=(m=m+Math.imul(Ie,be)|0)+Math.imul(pe,Je)|0,g=g+Math.imul(pe,be)|0,h=h+Math.imul(ge,tt)|0,m=(m=m+Math.imul(ge,Re)|0)+Math.imul(he,tt)|0,g=g+Math.imul(he,Re)|0,h=h+Math.imul(ie,Ze)|0,m=(m=m+Math.imul(ie,Ae)|0)+Math.imul(te,Ze)|0,g=g+Math.imul(te,Ae)|0,h=h+Math.imul(fe,rt)|0,m=(m=m+Math.imul(fe,Ee)|0)+Math.imul(oe,rt)|0,g=g+Math.imul(oe,Ee)|0,h=h+Math.imul(ee,Qe)|0,m=(m=m+Math.imul(ee,Se)|0)+Math.imul(re,Qe)|0,g=g+Math.imul(re,Se)|0,h=h+Math.imul($,Xe)|0,m=(m=m+Math.imul($,Me)|0)+Math.imul(V,Xe)|0,g=g+Math.imul(V,Me)|0;var Te=(M+(h=h+Math.imul(j,et)|0)|0)+((8191&(m=(m=m+Math.imul(j,ke)|0)+Math.imul(D,et)|0))<<13)|0;M=((g=g+Math.imul(D,ke)|0)+(m>>>13)|0)+(Te>>>26)|0,Te&=67108863,h=Math.imul(Ge,Je),m=(m=Math.imul(Ge,be))+Math.imul(we,Je)|0,g=Math.imul(we,be),h=h+Math.imul(Ie,tt)|0,m=(m=m+Math.imul(Ie,Re)|0)+Math.imul(pe,tt)|0,g=g+Math.imul(pe,Re)|0,h=h+Math.imul(ge,Ze)|0,m=(m=m+Math.imul(ge,Ae)|0)+Math.imul(he,Ze)|0,g=g+Math.imul(he,Ae)|0,h=h+Math.imul(ie,rt)|0,m=(m=m+Math.imul(ie,Ee)|0)+Math.imul(te,rt)|0,g=g+Math.imul(te,Ee)|0,h=h+Math.imul(fe,Qe)|0,m=(m=m+Math.imul(fe,Se)|0)+Math.imul(oe,Qe)|0,g=g+Math.imul(oe,Se)|0,h=h+Math.imul(ee,Xe)|0,m=(m=m+Math.imul(ee,Me)|0)+Math.imul(re,Xe)|0,g=g+Math.imul(re,Me)|0;var st=(M+(h=h+Math.imul($,et)|0)|0)+((8191&(m=(m=m+Math.imul($,ke)|0)+Math.imul(V,et)|0))<<13)|0;M=((g=g+Math.imul(V,ke)|0)+(m>>>13)|0)+(st>>>26)|0,st&=67108863,h=Math.imul(Ge,tt),m=(m=Math.imul(Ge,Re))+Math.imul(we,tt)|0,g=Math.imul(we,Re),h=h+Math.imul(Ie,Ze)|0,m=(m=m+Math.imul(Ie,Ae)|0)+Math.imul(pe,Ze)|0,g=g+Math.imul(pe,Ae)|0,h=h+Math.imul(ge,rt)|0,m=(m=m+Math.imul(ge,Ee)|0)+Math.imul(he,rt)|0,g=g+Math.imul(he,Ee)|0,h=h+Math.imul(ie,Qe)|0,m=(m=m+Math.imul(ie,Se)|0)+Math.imul(te,Qe)|0,g=g+Math.imul(te,Se)|0,h=h+Math.imul(fe,Xe)|0,m=(m=m+Math.imul(fe,Me)|0)+Math.imul(oe,Xe)|0,g=g+Math.imul(oe,Me)|0;var ft=(M+(h=h+Math.imul(ee,et)|0)|0)+((8191&(m=(m=m+Math.imul(ee,ke)|0)+Math.imul(re,et)|0))<<13)|0;M=((g=g+Math.imul(re,ke)|0)+(m>>>13)|0)+(ft>>>26)|0,ft&=67108863,h=Math.imul(Ge,Ze),m=(m=Math.imul(Ge,Ae))+Math.imul(we,Ze)|0,g=Math.imul(we,Ae),h=h+Math.imul(Ie,rt)|0,m=(m=m+Math.imul(Ie,Ee)|0)+Math.imul(pe,rt)|0,g=g+Math.imul(pe,Ee)|0,h=h+Math.imul(ge,Qe)|0,m=(m=m+Math.imul(ge,Se)|0)+Math.imul(he,Qe)|0,g=g+Math.imul(he,Se)|0,h=h+Math.imul(ie,Xe)|0,m=(m=m+Math.imul(ie,Me)|0)+Math.imul(te,Xe)|0,g=g+Math.imul(te,Me)|0;var gt=(M+(h=h+Math.imul(fe,et)|0)|0)+((8191&(m=(m=m+Math.imul(fe,ke)|0)+Math.imul(oe,et)|0))<<13)|0;M=((g=g+Math.imul(oe,ke)|0)+(m>>>13)|0)+(gt>>>26)|0,gt&=67108863,h=Math.imul(Ge,rt),m=(m=Math.imul(Ge,Ee))+Math.imul(we,rt)|0,g=Math.imul(we,Ee),h=h+Math.imul(Ie,Qe)|0,m=(m=m+Math.imul(Ie,Se)|0)+Math.imul(pe,Qe)|0,g=g+Math.imul(pe,Se)|0,h=h+Math.imul(ge,Xe)|0,m=(m=m+Math.imul(ge,Me)|0)+Math.imul(he,Xe)|0,g=g+Math.imul(he,Me)|0;var ht=(M+(h=h+Math.imul(ie,et)|0)|0)+((8191&(m=(m=m+Math.imul(ie,ke)|0)+Math.imul(te,et)|0))<<13)|0;M=((g=g+Math.imul(te,ke)|0)+(m>>>13)|0)+(ht>>>26)|0,ht&=67108863,h=Math.imul(Ge,Qe),m=(m=Math.imul(Ge,Se))+Math.imul(we,Qe)|0,g=Math.imul(we,Se),h=h+Math.imul(Ie,Xe)|0,m=(m=m+Math.imul(Ie,Me)|0)+Math.imul(pe,Xe)|0,g=g+Math.imul(pe,Me)|0;var yt=(M+(h=h+Math.imul(ge,et)|0)|0)+((8191&(m=(m=m+Math.imul(ge,ke)|0)+Math.imul(he,et)|0))<<13)|0;M=((g=g+Math.imul(he,ke)|0)+(m>>>13)|0)+(yt>>>26)|0,yt&=67108863,h=Math.imul(Ge,Xe),m=(m=Math.imul(Ge,Me))+Math.imul(we,Xe)|0,g=Math.imul(we,Me);var at=(M+(h=h+Math.imul(Ie,et)|0)|0)+((8191&(m=(m=m+Math.imul(Ie,ke)|0)+Math.imul(pe,et)|0))<<13)|0;M=((g=g+Math.imul(pe,ke)|0)+(m>>>13)|0)+(at>>>26)|0,at&=67108863;var wt=(M+(h=Math.imul(Ge,et))|0)+((8191&(m=(m=Math.imul(Ge,ke))+Math.imul(we,et)|0))<<13)|0;return M=((g=Math.imul(we,ke))+(m>>>13)|0)+(wt>>>26)|0,wt&=67108863,k[0]=qe,k[1]=Q,k[2]=X,k[3]=ne,k[4]=ce,k[5]=Ce,k[6]=Pe,k[7]=Ye,k[8]=$e,k[9]=nt,k[10]=je,k[11]=Te,k[12]=st,k[13]=ft,k[14]=gt,k[15]=ht,k[16]=yt,k[17]=at,k[18]=wt,M!==0&&(k[19]=M,w.length++),w};function I(S,a,w){return new O().mulp(S,a,w)}function O(S,a){this.x=S,this.y=a}Math.imul||(R=E),s.prototype.mulTo=function(S,a){var w=this.length+S.length;return this.length===10&&S.length===10?R(this,S,a):w<63?E(this,S,a):w<1024?function(h,m,g){g.negative=m.negative^h.negative,g.length=h.length+m.length;for(var _=0,T=0,k=0;k<g.length-1;k++){var M=T;T=0;for(var B=67108863&_,Y=Math.min(k,m.length-1),C=Math.max(0,k-h.length+1);C<=Y;C++){var K=k-C,W=(0|h.words[K])*(0|m.words[C]),U=67108863&W;B=67108863&(U=U+B|0),T+=(M=(M=M+(W/67108864|0)|0)+(U>>>26)|0)>>>26,M&=67108863}g.words[k]=B,_=M,M=T}return _!==0?g.words[k]=_:g.length--,g.strip()}(this,S,a):I(this,S,a)},O.prototype.makeRBT=function(S){for(var a=new Array(S),w=s.prototype._countBits(S)-1,h=0;h<S;h++)a[h]=this.revBin(h,w,S);return a},O.prototype.revBin=function(S,a,w){if(S===0||S===w-1)return S;for(var h=0,m=0;m<a;m++)h|=(1&S)<<a-m-1,S>>=1;return h},O.prototype.permute=function(S,a,w,h,m,g){for(var _=0;_<g;_++)h[_]=a[S[_]],m[_]=w[S[_]]},O.prototype.transform=function(S,a,w,h,m,g){this.permute(g,S,a,w,h,m);for(var _=1;_<m;_<<=1)for(var T=_<<1,k=Math.cos(2*Math.PI/T),M=Math.sin(2*Math.PI/T),B=0;B<m;B+=T)for(var Y=k,C=M,K=0;K<_;K++){var W=w[B+K],U=h[B+K],q=w[B+K+_],j=h[B+K+_],D=Y*q-C*j;j=Y*j+C*q,q=D,w[B+K]=W+q,h[B+K]=U+j,w[B+K+_]=W-q,h[B+K+_]=U-j,K!==T&&(D=k*Y-M*C,C=k*C+M*Y,Y=D)}},O.prototype.guessLen13b=function(S,a){var w=1|Math.max(a,S),h=1&w,m=0;for(w=w/2|0;w;w>>>=1)m++;return 1<<m+1+h},O.prototype.conjugate=function(S,a,w){if(!(w<=1))for(var h=0;h<w/2;h++){var m=S[h];S[h]=S[w-h-1],S[w-h-1]=m,m=a[h],a[h]=-a[w-h-1],a[w-h-1]=-m}},O.prototype.normalize13b=function(S,a){for(var w=0,h=0;h<a/2;h++){var m=8192*Math.round(S[2*h+1]/a)+Math.round(S[2*h]/a)+w;S[h]=67108863&m,w=m<67108864?0:m/67108864|0}return S},O.prototype.convert13b=function(S,a,w,h){for(var m=0,g=0;g<a;g++)m+=0|S[g],w[2*g]=8191&m,m>>>=13,w[2*g+1]=8191&m,m>>>=13;for(g=2*a;g<h;++g)w[g]=0;u(m===0),u((-8192&m)==0)},O.prototype.stub=function(S){for(var a=new Array(S),w=0;w<S;w++)a[w]=0;return a},O.prototype.mulp=function(S,a,w){var h=2*this.guessLen13b(S.length,a.length),m=this.makeRBT(h),g=this.stub(h),_=new Array(h),T=new Array(h),k=new Array(h),M=new Array(h),B=new Array(h),Y=new Array(h),C=w.words;C.length=h,this.convert13b(S.words,S.length,_,h),this.convert13b(a.words,a.length,M,h),this.transform(_,g,T,k,h,m),this.transform(M,g,B,Y,h,m);for(var K=0;K<h;K++){var W=T[K]*B[K]-k[K]*Y[K];k[K]=T[K]*Y[K]+k[K]*B[K],T[K]=W}return this.conjugate(T,k,h),this.transform(T,k,C,g,h,m),this.conjugate(C,g,h),this.normalize13b(C,h),w.negative=S.negative^a.negative,w.length=S.length+a.length,w.strip()},s.prototype.mul=function(S){var a=new s(null);return a.words=new Array(this.length+S.length),this.mulTo(S,a)},s.prototype.mulf=function(S){var a=new s(null);return a.words=new Array(this.length+S.length),I(this,S,a)},s.prototype.imul=function(S){return this.clone().mulTo(S,this)},s.prototype.imuln=function(S){u(typeof S=="number"),u(S<67108864);for(var a=0,w=0;w<this.length;w++){var h=(0|this.words[w])*S,m=(67108863&h)+(67108863&a);a>>=26,a+=h/67108864|0,a+=m>>>26,this.words[w]=67108863&m}return a!==0&&(this.words[w]=a,this.length++),this},s.prototype.muln=function(S){return this.clone().imuln(S)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(S){var a=function(g){for(var _=new Array(g.bitLength()),T=0;T<_.length;T++){var k=T/26|0,M=T%26;_[T]=(g.words[k]&1<<M)>>>M}return _}(S);if(a.length===0)return new s(1);for(var w=this,h=0;h<a.length&&a[h]===0;h++,w=w.sqr());if(++h<a.length)for(var m=w.sqr();h<a.length;h++,m=m.sqr())a[h]!==0&&(w=w.mul(m));return w},s.prototype.iushln=function(S){u(typeof S=="number"&&S>=0);var a,w=S%26,h=(S-w)/26,m=67108863>>>26-w<<26-w;if(w!==0){var g=0;for(a=0;a<this.length;a++){var _=this.words[a]&m,T=(0|this.words[a])-_<<w;this.words[a]=T|g,g=_>>>26-w}g&&(this.words[a]=g,this.length++)}if(h!==0){for(a=this.length-1;a>=0;a--)this.words[a+h]=this.words[a];for(a=0;a<h;a++)this.words[a]=0;this.length+=h}return this.strip()},s.prototype.ishln=function(S){return u(this.negative===0),this.iushln(S)},s.prototype.iushrn=function(S,a,w){var h;u(typeof S=="number"&&S>=0),h=a?(a-a%26)/26:0;var m=S%26,g=Math.min((S-m)/26,this.length),_=67108863^67108863>>>m<<m,T=w;if(h-=g,h=Math.max(0,h),T){for(var k=0;k<g;k++)T.words[k]=this.words[k];T.length=g}if(g!==0)if(this.length>g)for(this.length-=g,k=0;k<this.length;k++)this.words[k]=this.words[k+g];else this.words[0]=0,this.length=1;var M=0;for(k=this.length-1;k>=0&&(M!==0||k>=h);k--){var B=0|this.words[k];this.words[k]=M<<26-m|B>>>m,M=B&_}return T&&M!==0&&(T.words[T.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(S,a,w){return u(this.negative===0),this.iushrn(S,a,w)},s.prototype.shln=function(S){return this.clone().ishln(S)},s.prototype.ushln=function(S){return this.clone().iushln(S)},s.prototype.shrn=function(S){return this.clone().ishrn(S)},s.prototype.ushrn=function(S){return this.clone().iushrn(S)},s.prototype.testn=function(S){u(typeof S=="number"&&S>=0);var a=S%26,w=(S-a)/26,h=1<<a;return!(this.length<=w)&&!!(this.words[w]&h)},s.prototype.imaskn=function(S){u(typeof S=="number"&&S>=0);var a=S%26,w=(S-a)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=w)return this;if(a!==0&&w++,this.length=Math.min(w,this.length),a!==0){var h=67108863^67108863>>>a<<a;this.words[this.length-1]&=h}return this.strip()},s.prototype.maskn=function(S){return this.clone().imaskn(S)},s.prototype.iaddn=function(S){return u(typeof S=="number"),u(S<67108864),S<0?this.isubn(-S):this.negative!==0?this.length===1&&(0|this.words[0])<S?(this.words[0]=S-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(S),this.negative=1,this):this._iaddn(S)},s.prototype._iaddn=function(S){this.words[0]+=S;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},s.prototype.isubn=function(S){if(u(typeof S=="number"),u(S<67108864),S<0)return this.iaddn(-S);if(this.negative!==0)return this.negative=0,this.iaddn(S),this.negative=1,this;if(this.words[0]-=S,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this.strip()},s.prototype.addn=function(S){return this.clone().iaddn(S)},s.prototype.subn=function(S){return this.clone().isubn(S)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(S,a,w){var h,m,g=S.length+w;this._expand(g);var _=0;for(h=0;h<S.length;h++){m=(0|this.words[h+w])+_;var T=(0|S.words[h])*a;_=((m-=67108863&T)>>26)-(T/67108864|0),this.words[h+w]=67108863&m}for(;h<this.length-w;h++)_=(m=(0|this.words[h+w])+_)>>26,this.words[h+w]=67108863&m;if(_===0)return this.strip();for(u(_===-1),_=0,h=0;h<this.length;h++)_=(m=-(0|this.words[h])+_)>>26,this.words[h]=67108863&m;return this.negative=1,this.strip()},s.prototype._wordDiv=function(S,a){var w=(this.length,S.length),h=this.clone(),m=S,g=0|m.words[m.length-1];(w=26-this._countBits(g))!==0&&(m=m.ushln(w),h.iushln(w),g=0|m.words[m.length-1]);var _,T=h.length-m.length;if(a!=="mod"){(_=new s(null)).length=T+1,_.words=new Array(_.length);for(var k=0;k<_.length;k++)_.words[k]=0}var M=h.clone()._ishlnsubmul(m,1,T);M.negative===0&&(h=M,_&&(_.words[T]=1));for(var B=T-1;B>=0;B--){var Y=67108864*(0|h.words[m.length+B])+(0|h.words[m.length+B-1]);for(Y=Math.min(Y/g|0,67108863),h._ishlnsubmul(m,Y,B);h.negative!==0;)Y--,h.negative=0,h._ishlnsubmul(m,1,B),h.isZero()||(h.negative^=1);_&&(_.words[B]=Y)}return _&&_.strip(),h.strip(),a!=="div"&&w!==0&&h.iushrn(w),{div:_||null,mod:h}},s.prototype.divmod=function(S,a,w){return u(!S.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:this.negative!==0&&S.negative===0?(g=this.neg().divmod(S,a),a!=="mod"&&(h=g.div.neg()),a!=="div"&&(m=g.mod.neg(),w&&m.negative!==0&&m.iadd(S)),{div:h,mod:m}):this.negative===0&&S.negative!==0?(g=this.divmod(S.neg(),a),a!=="mod"&&(h=g.div.neg()),{div:h,mod:g.mod}):this.negative&S.negative?(g=this.neg().divmod(S.neg(),a),a!=="div"&&(m=g.mod.neg(),w&&m.negative!==0&&m.isub(S)),{div:g.div,mod:m}):S.length>this.length||this.cmp(S)<0?{div:new s(0),mod:this}:S.length===1?a==="div"?{div:this.divn(S.words[0]),mod:null}:a==="mod"?{div:null,mod:new s(this.modn(S.words[0]))}:{div:this.divn(S.words[0]),mod:new s(this.modn(S.words[0]))}:this._wordDiv(S,a);var h,m,g},s.prototype.div=function(S){return this.divmod(S,"div",!1).div},s.prototype.mod=function(S){return this.divmod(S,"mod",!1).mod},s.prototype.umod=function(S){return this.divmod(S,"mod",!0).mod},s.prototype.divRound=function(S){var a=this.divmod(S);if(a.mod.isZero())return a.div;var w=a.div.negative!==0?a.mod.isub(S):a.mod,h=S.ushrn(1),m=S.andln(1),g=w.cmp(h);return g<0||m===1&&g===0?a.div:a.div.negative!==0?a.div.isubn(1):a.div.iaddn(1)},s.prototype.modn=function(S){u(S<=67108863);for(var a=(1<<26)%S,w=0,h=this.length-1;h>=0;h--)w=(a*w+(0|this.words[h]))%S;return w},s.prototype.idivn=function(S){u(S<=67108863);for(var a=0,w=this.length-1;w>=0;w--){var h=(0|this.words[w])+67108864*a;this.words[w]=h/S|0,a=h%S}return this.strip()},s.prototype.divn=function(S){return this.clone().idivn(S)},s.prototype.egcd=function(S){u(S.negative===0),u(!S.isZero());var a=this,w=S.clone();a=a.negative!==0?a.umod(S):a.clone();for(var h=new s(1),m=new s(0),g=new s(0),_=new s(1),T=0;a.isEven()&&w.isEven();)a.iushrn(1),w.iushrn(1),++T;for(var k=w.clone(),M=a.clone();!a.isZero();){for(var B=0,Y=1;!(a.words[0]&Y)&&B<26;++B,Y<<=1);if(B>0)for(a.iushrn(B);B-- >0;)(h.isOdd()||m.isOdd())&&(h.iadd(k),m.isub(M)),h.iushrn(1),m.iushrn(1);for(var C=0,K=1;!(w.words[0]&K)&&C<26;++C,K<<=1);if(C>0)for(w.iushrn(C);C-- >0;)(g.isOdd()||_.isOdd())&&(g.iadd(k),_.isub(M)),g.iushrn(1),_.iushrn(1);a.cmp(w)>=0?(a.isub(w),h.isub(g),m.isub(_)):(w.isub(a),g.isub(h),_.isub(m))}return{a:g,b:_,gcd:w.iushln(T)}},s.prototype._invmp=function(S){u(S.negative===0),u(!S.isZero());var a=this,w=S.clone();a=a.negative!==0?a.umod(S):a.clone();for(var h,m=new s(1),g=new s(0),_=w.clone();a.cmpn(1)>0&&w.cmpn(1)>0;){for(var T=0,k=1;!(a.words[0]&k)&&T<26;++T,k<<=1);if(T>0)for(a.iushrn(T);T-- >0;)m.isOdd()&&m.iadd(_),m.iushrn(1);for(var M=0,B=1;!(w.words[0]&B)&&M<26;++M,B<<=1);if(M>0)for(w.iushrn(M);M-- >0;)g.isOdd()&&g.iadd(_),g.iushrn(1);a.cmp(w)>=0?(a.isub(w),m.isub(g)):(w.isub(a),g.isub(m))}return(h=a.cmpn(1)===0?m:g).cmpn(0)<0&&h.iadd(S),h},s.prototype.gcd=function(S){if(this.isZero())return S.abs();if(S.isZero())return this.abs();var a=this.clone(),w=S.clone();a.negative=0,w.negative=0;for(var h=0;a.isEven()&&w.isEven();h++)a.iushrn(1),w.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;w.isEven();)w.iushrn(1);var m=a.cmp(w);if(m<0){var g=a;a=w,w=g}else if(m===0||w.cmpn(1)===0)break;a.isub(w)}return w.iushln(h)},s.prototype.invm=function(S){return this.egcd(S).a.umod(S)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(S){return this.words[0]&S},s.prototype.bincn=function(S){u(typeof S=="number");var a=S%26,w=(S-a)/26,h=1<<a;if(this.length<=w)return this._expand(w+1),this.words[w]|=h,this;for(var m=h,g=w;m!==0&&g<this.length;g++){var _=0|this.words[g];m=(_+=m)>>>26,_&=67108863,this.words[g]=_}return m!==0&&(this.words[g]=m,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(S){var a,w=S<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;if(this.strip(),this.length>1)a=1;else{w&&(S=-S),u(S<=67108863,"Number is too big");var h=0|this.words[0];a=h===S?0:h<S?-1:1}return this.negative!==0?0|-a:a},s.prototype.cmp=function(S){if(this.negative!==0&&S.negative===0)return-1;if(this.negative===0&&S.negative!==0)return 1;var a=this.ucmp(S);return this.negative!==0?0|-a:a},s.prototype.ucmp=function(S){if(this.length>S.length)return 1;if(this.length<S.length)return-1;for(var a=0,w=this.length-1;w>=0;w--){var h=0|this.words[w],m=0|S.words[w];if(h!==m){h<m?a=-1:h>m&&(a=1);break}}return a},s.prototype.gtn=function(S){return this.cmpn(S)===1},s.prototype.gt=function(S){return this.cmp(S)===1},s.prototype.gten=function(S){return this.cmpn(S)>=0},s.prototype.gte=function(S){return this.cmp(S)>=0},s.prototype.ltn=function(S){return this.cmpn(S)===-1},s.prototype.lt=function(S){return this.cmp(S)===-1},s.prototype.lten=function(S){return this.cmpn(S)<=0},s.prototype.lte=function(S){return this.cmp(S)<=0},s.prototype.eqn=function(S){return this.cmpn(S)===0},s.prototype.eq=function(S){return this.cmp(S)===0},s.red=function(S){return new G(S)},s.prototype.toRed=function(S){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),S.convertTo(this)._forceRed(S)},s.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(S){return this.red=S,this},s.prototype.forceRed=function(S){return u(!this.red,"Already a number in reduction context"),this._forceRed(S)},s.prototype.redAdd=function(S){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,S)},s.prototype.redIAdd=function(S){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,S)},s.prototype.redSub=function(S){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,S)},s.prototype.redISub=function(S){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,S)},s.prototype.redShl=function(S){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,S)},s.prototype.redMul=function(S){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.mul(this,S)},s.prototype.redIMul=function(S){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.imul(this,S)},s.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(S){return u(this.red&&!S.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,S)};var A={k256:null,p224:null,p192:null,p25519:null};function P(S,a){this.name=S,this.p=new s(a,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function N(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function H(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function J(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function G(S){if(typeof S=="string"){var a=s._prime(S);this.m=a.p,this.prime=a}else u(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null}function z(S){G.call(this,S),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}P.prototype._tmp=function(){var S=new s(null);return S.words=new Array(Math.ceil(this.n/13)),S},P.prototype.ireduce=function(S){var a,w=S;do this.split(w,this.tmp),a=(w=(w=this.imulK(w)).iadd(this.tmp)).bitLength();while(a>this.n);var h=a<this.n?-1:w.ucmp(this.p);return h===0?(w.words[0]=0,w.length=1):h>0?w.isub(this.p):w.strip(),w},P.prototype.split=function(S,a){S.iushrn(this.n,0,a)},P.prototype.imulK=function(S){return S.imul(this.k)},c(N,P),N.prototype.split=function(S,a){for(var w=Math.min(S.length,9),h=0;h<w;h++)a.words[h]=S.words[h];if(a.length=w,S.length<=9)return S.words[0]=0,void(S.length=1);var m=S.words[9];for(a.words[a.length++]=4194303&m,h=10;h<S.length;h++){var g=0|S.words[h];S.words[h-10]=(4194303&g)<<4|m>>>22,m=g}m>>>=22,S.words[h-10]=m,m===0&&S.length>10?S.length-=10:S.length-=9},N.prototype.imulK=function(S){S.words[S.length]=0,S.words[S.length+1]=0,S.length+=2;for(var a=0,w=0;w<S.length;w++){var h=0|S.words[w];a+=977*h,S.words[w]=67108863&a,a=64*h+(a/67108864|0)}return S.words[S.length-1]===0&&(S.length--,S.words[S.length-1]===0&&S.length--),S},c(L,P),c(H,P),c(J,P),J.prototype.imulK=function(S){for(var a=0,w=0;w<S.length;w++){var h=19*(0|S.words[w])+a,m=67108863&h;h>>>=26,S.words[w]=m,a=h}return a!==0&&(S.words[S.length++]=a),S},s._prime=function(S){if(A[S])return A[S];var a;if(S==="k256")a=new N;else if(S==="p224")a=new L;else if(S==="p192")a=new H;else{if(S!=="p25519")throw new Error("Unknown prime "+S);a=new J}return A[S]=a,a},G.prototype._verify1=function(S){u(S.negative===0,"red works only with positives"),u(S.red,"red works only with red numbers")},G.prototype._verify2=function(S,a){u((S.negative|a.negative)==0,"red works only with positives"),u(S.red&&S.red===a.red,"red works only with red numbers")},G.prototype.imod=function(S){return this.prime?this.prime.ireduce(S)._forceRed(this):S.umod(this.m)._forceRed(this)},G.prototype.neg=function(S){return S.isZero()?S.clone():this.m.sub(S)._forceRed(this)},G.prototype.add=function(S,a){this._verify2(S,a);var w=S.add(a);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},G.prototype.iadd=function(S,a){this._verify2(S,a);var w=S.iadd(a);return w.cmp(this.m)>=0&&w.isub(this.m),w},G.prototype.sub=function(S,a){this._verify2(S,a);var w=S.sub(a);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},G.prototype.isub=function(S,a){this._verify2(S,a);var w=S.isub(a);return w.cmpn(0)<0&&w.iadd(this.m),w},G.prototype.shl=function(S,a){return this._verify1(S),this.imod(S.ushln(a))},G.prototype.imul=function(S,a){return this._verify2(S,a),this.imod(S.imul(a))},G.prototype.mul=function(S,a){return this._verify2(S,a),this.imod(S.mul(a))},G.prototype.isqr=function(S){return this.imul(S,S.clone())},G.prototype.sqr=function(S){return this.mul(S,S)},G.prototype.sqrt=function(S){if(S.isZero())return S.clone();var a=this.m.andln(3);if(u(a%2==1),a===3){var w=this.m.add(new s(1)).iushrn(2);return this.pow(S,w)}for(var h=this.m.subn(1),m=0;!h.isZero()&&h.andln(1)===0;)m++,h.iushrn(1);u(!h.isZero());var g=new s(1).toRed(this),_=g.redNeg(),T=this.m.subn(1).iushrn(1),k=this.m.bitLength();for(k=new s(2*k*k).toRed(this);this.pow(k,T).cmp(_)!==0;)k.redIAdd(_);for(var M=this.pow(k,h),B=this.pow(S,h.addn(1).iushrn(1)),Y=this.pow(S,h),C=m;Y.cmp(g)!==0;){for(var K=Y,W=0;K.cmp(g)!==0;W++)K=K.redSqr();u(W<C);var U=this.pow(M,new s(1).iushln(C-W-1));B=B.redMul(U),M=U.redSqr(),Y=Y.redMul(M),C=W}return B},G.prototype.invm=function(S){var a=S._invmp(this.m);return a.negative!==0?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},G.prototype.pow=function(S,a){if(a.isZero())return new s(1).toRed(this);if(a.cmpn(1)===0)return S.clone();var w=new Array(16);w[0]=new s(1).toRed(this),w[1]=S;for(var h=2;h<w.length;h++)w[h]=this.mul(w[h-1],S);var m=w[0],g=0,_=0,T=a.bitLength()%26;for(T===0&&(T=26),h=a.length-1;h>=0;h--){for(var k=a.words[h],M=T-1;M>=0;M--){var B=k>>M&1;m!==w[0]&&(m=this.sqr(m)),B!==0||g!==0?(g<<=1,g|=B,(++_===4||h===0&&M===0)&&(m=this.mul(m,w[g]),_=0,g=0)):_=0}T=26}return m},G.prototype.convertTo=function(S){var a=S.umod(this.m);return a===S?a.clone():a},G.prototype.convertFrom=function(S){var a=S.clone();return a.red=null,a},s.mont=function(S){return new z(S)},c(z,G),z.prototype.convertTo=function(S){return this.imod(S.ushln(this.shift))},z.prototype.convertFrom=function(S){var a=this.imod(S.mul(this.rinv));return a.red=null,a},z.prototype.imul=function(S,a){if(S.isZero()||a.isZero())return S.words[0]=0,S.length=1,S;var w=S.imul(a),h=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=w.isub(h).iushrn(this.shift),g=m;return m.cmp(this.m)>=0?g=m.isub(this.m):m.cmpn(0)<0&&(g=m.iadd(this.m)),g._forceRed(this)},z.prototype.mul=function(S,a){if(S.isZero()||a.isZero())return new s(0)._forceRed(this);var w=S.mul(a),h=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),m=w.isub(h).iushrn(this.shift),g=m;return m.cmp(this.m)>=0?g=m.isub(this.m):m.cmpn(0)<0&&(g=m.iadd(this.m)),g._forceRed(this)},z.prototype.invm=function(S){return this.imod(S._invmp(this.m).mul(this.r2))._forceRed(this)}})(n,this)}).call(this,o(25)(i))},function(i,e,o){function n(p){let u;return typeof window<"u"&&window[p]!==void 0&&(u=window[p]),u}function f(p){const u=n(p);if(!u)throw new Error(p+" is not defined in Window");return u}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=n,e.getFromWindowOrThrow=f,e.getDocumentOrThrow=function(){return f("document")},e.getDocument=function(){return n("document")},e.getNavigatorOrThrow=function(){return f("navigator")},e.getNavigator=function(){return n("navigator")},e.getLocationOrThrow=function(){return f("location")},e.getLocation=function(){return n("location")},e.getCryptoOrThrow=function(){return f("crypto")},e.getCrypto=function(){return n("crypto")},e.getLocalStorageOrThrow=function(){return f("localStorage")},e.getLocalStorage=function(){return n("localStorage")}},function(i,e,o){var n=e,f=o(16),p=o(22),u=o(120);n.assert=p,n.toArray=u.toArray,n.zero2=u.zero2,n.toHex=u.toHex,n.encode=u.encode,n.getNAF=function(c,s,l){var d=new Array(Math.max(c.bitLength(),l)+1);d.fill(0);for(var b=1<<s+1,v=c.clone(),y=0;y<d.length;y++){var x,E=v.andln(b-1);v.isOdd()?(x=E>(b>>1)-1?(b>>1)-E:E,v.isubn(x)):x=0,d[y]=x,v.iushrn(1)}return d},n.getJSF=function(c,s){var l=[[],[]];c=c.clone(),s=s.clone();for(var d,b=0,v=0;c.cmpn(-b)>0||s.cmpn(-v)>0;){var y,x,E=c.andln(3)+b&3,R=s.andln(3)+v&3;E===3&&(E=-1),R===3&&(R=-1),y=1&E?(d=c.andln(7)+b&7)!==3&&d!==5||R!==2?E:-E:0,l[0].push(y),x=1&R?(d=s.andln(7)+v&7)!==3&&d!==5||E!==2?R:-R:0,l[1].push(x),2*b===y+1&&(b=1-b),2*v===x+1&&(v=1-v),c.iushrn(1),s.iushrn(1)}return l},n.cachedProperty=function(c,s,l){var d="_"+s;c.prototype[s]=function(){return this[d]!==void 0?this[d]:this[d]=l.call(this)}},n.parseBytes=function(c){return typeof c=="string"?n.toArray(c,"hex"):c},n.intFromLE=function(c){return new f(c,"hex","le")}},function(i,e,o){var n,f=typeof Reflect=="object"?Reflect:null,p=f&&typeof f.apply=="function"?f.apply:function(O,A,P){return Function.prototype.apply.call(O,A,P)};n=f&&typeof f.ownKeys=="function"?f.ownKeys:Object.getOwnPropertySymbols?function(O){return Object.getOwnPropertyNames(O).concat(Object.getOwnPropertySymbols(O))}:function(O){return Object.getOwnPropertyNames(O)};var u=Number.isNaN||function(O){return O!=O};function c(){c.init.call(this)}i.exports=c,i.exports.once=function(O,A){return new Promise(function(P,N){function L(J){O.removeListener(A,H),N(J)}function H(){typeof O.removeListener=="function"&&O.removeListener("error",L),P([].slice.call(arguments))}I(O,A,H,{once:!0}),A!=="error"&&function(J,G,z){typeof J.on=="function"&&I(J,"error",G,z)}(O,L,{once:!0})})},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var s=10;function l(O){if(typeof O!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof O)}function d(O){return O._maxListeners===void 0?c.defaultMaxListeners:O._maxListeners}function b(O,A,P,N){var L,H,J,G;if(l(P),(H=O._events)===void 0?(H=O._events=Object.create(null),O._eventsCount=0):(H.newListener!==void 0&&(O.emit("newListener",A,P.listener?P.listener:P),H=O._events),J=H[A]),J===void 0)J=H[A]=P,++O._eventsCount;else if(typeof J=="function"?J=H[A]=N?[P,J]:[J,P]:N?J.unshift(P):J.push(P),(L=d(O))>0&&J.length>L&&!J.warned){J.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(A)+" listeners added. Use emitter.setMaxListeners() to increase limit");z.name="MaxListenersExceededWarning",z.emitter=O,z.type=A,z.count=J.length,G=z,console&&console.warn&&console.warn(G)}return O}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(O,A,P){var N={fired:!1,wrapFn:void 0,target:O,type:A,listener:P},L=v.bind(N);return L.listener=P,N.wrapFn=L,L}function x(O,A,P){var N=O._events;if(N===void 0)return[];var L=N[A];return L===void 0?[]:typeof L=="function"?P?[L.listener||L]:[L]:P?function(H){for(var J=new Array(H.length),G=0;G<J.length;++G)J[G]=H[G].listener||H[G];return J}(L):R(L,L.length)}function E(O){var A=this._events;if(A!==void 0){var P=A[O];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}function R(O,A){for(var P=new Array(A),N=0;N<A;++N)P[N]=O[N];return P}function I(O,A,P,N){if(typeof O.on=="function")N.once?O.once(A,P):O.on(A,P);else{if(typeof O.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof O);O.addEventListener(A,function L(H){N.once&&O.removeEventListener(A,L),P(H)})}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(O){if(typeof O!="number"||O<0||u(O))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+O+".");s=O}}),c.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(O){if(typeof O!="number"||O<0||u(O))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+O+".");return this._maxListeners=O,this},c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(O){for(var A=[],P=1;P<arguments.length;P++)A.push(arguments[P]);var N=O==="error",L=this._events;if(L!==void 0)N=N&&L.error===void 0;else if(!N)return!1;if(N){var H;if(A.length>0&&(H=A[0]),H instanceof Error)throw H;var J=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw J.context=H,J}var G=L[O];if(G===void 0)return!1;if(typeof G=="function")p(G,this,A);else{var z=G.length,S=R(G,z);for(P=0;P<z;++P)p(S[P],this,A)}return!0},c.prototype.addListener=function(O,A){return b(this,O,A,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(O,A){return b(this,O,A,!0)},c.prototype.once=function(O,A){return l(A),this.on(O,y(this,O,A)),this},c.prototype.prependOnceListener=function(O,A){return l(A),this.prependListener(O,y(this,O,A)),this},c.prototype.removeListener=function(O,A){var P,N,L,H,J;if(l(A),(N=this._events)===void 0)return this;if((P=N[O])===void 0)return this;if(P===A||P.listener===A)--this._eventsCount==0?this._events=Object.create(null):(delete N[O],N.removeListener&&this.emit("removeListener",O,P.listener||A));else if(typeof P!="function"){for(L=-1,H=P.length-1;H>=0;H--)if(P[H]===A||P[H].listener===A){J=P[H].listener,L=H;break}if(L<0)return this;L===0?P.shift():function(G,z){for(;z+1<G.length;z++)G[z]=G[z+1];G.pop()}(P,L),P.length===1&&(N[O]=P[0]),N.removeListener!==void 0&&this.emit("removeListener",O,J||A)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(O){var A,P,N;if((P=this._events)===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[O]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete P[O]),this;if(arguments.length===0){var L,H=Object.keys(P);for(N=0;N<H.length;++N)(L=H[N])!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(A=P[O])=="function")this.removeListener(O,A);else if(A!==void 0)for(N=A.length-1;N>=0;N--)this.removeListener(O,A[N]);return this},c.prototype.listeners=function(O){return x(this,O,!0)},c.prototype.rawListeners=function(O){return x(this,O,!1)},c.listenerCount=function(O,A){return typeof O.listenerCount=="function"?O.listenerCount(A):E.call(O,A)},c.prototype.listenerCount=E,c.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(i,e,o){var n=o(2),f=n.Buffer;function p(c,s){for(var l in c)s[l]=c[l]}function u(c,s,l){return f(c,s,l)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?i.exports=n:(p(n,e),e.Buffer=u),u.prototype=Object.create(f.prototype),p(f,u),u.from=function(c,s,l){if(typeof c=="number")throw new TypeError("Argument must not be a number");return f(c,s,l)},u.alloc=function(c,s,l){if(typeof c!="number")throw new TypeError("Argument must be a number");var d=f(c);return s!==void 0?typeof l=="string"?d.fill(s,l):d.fill(s):d.fill(0),d},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return f(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}},function(i,e,o){o.d(e,"b",function(){return u}),o.d(e,"a",function(){return c}),o.d(e,"c",function(){return s}),o.d(e,"d",function(){return l}),o.d(e,"e",function(){return d}),o.d(e,"f",function(){return b});var n=o(8),f=o(4);async function p(v,y=f.a){return n.getSubtleCrypto().importKey("raw",v,function(x){return x===f.a?{length:f.b,name:f.a}:{hash:{name:f.f},name:f.e}}(y),!0,function(x){return x===f.a?[f.d,f.c]:[f.k,f.l]}(y))}async function u(v,y,x){const E=n.getSubtleCrypto(),R=await p(y,f.a),I=await E.encrypt({iv:v,name:f.a},R,x);return new Uint8Array(I)}async function c(v,y,x){const E=n.getSubtleCrypto(),R=await p(y,f.a),I=await E.decrypt({iv:v,name:f.a},R,x);return new Uint8Array(I)}async function s(v,y){const x=n.getSubtleCrypto(),E=await p(v,f.e),R=await x.sign({length:f.g,name:f.e},E,y);return new Uint8Array(R)}async function l(v,y){const x=n.getSubtleCrypto(),E=await p(v,f.e),R=await x.sign({length:f.h,name:f.e},E,y);return new Uint8Array(R)}async function d(v){const y=n.getSubtleCrypto(),x=await y.digest({name:f.i},v);return new Uint8Array(x)}async function b(v){const y=n.getSubtleCrypto(),x=await y.digest({name:f.j},v);return new Uint8Array(x)}},function(i,e,o){var n=o(22),f=o(3);function p(l,d){return(64512&l.charCodeAt(d))==55296&&!(d<0||d+1>=l.length)&&(64512&l.charCodeAt(d+1))==56320}function u(l){return(l>>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24)>>>0}function c(l){return l.length===1?"0"+l:l}function s(l){return l.length===7?"0"+l:l.length===6?"00"+l:l.length===5?"000"+l:l.length===4?"0000"+l:l.length===3?"00000"+l:l.length===2?"000000"+l:l.length===1?"0000000"+l:l}e.inherits=f,e.toArray=function(l,d){if(Array.isArray(l))return l.slice();if(!l)return[];var b=[];if(typeof l=="string")if(d){if(d==="hex")for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),y=0;y<l.length;y+=2)b.push(parseInt(l[y]+l[y+1],16))}else for(var v=0,y=0;y<l.length;y++){var x=l.charCodeAt(y);x<128?b[v++]=x:x<2048?(b[v++]=x>>6|192,b[v++]=63&x|128):p(l,y)?(x=65536+((1023&x)<<10)+(1023&l.charCodeAt(++y)),b[v++]=x>>18|240,b[v++]=x>>12&63|128,b[v++]=x>>6&63|128,b[v++]=63&x|128):(b[v++]=x>>12|224,b[v++]=x>>6&63|128,b[v++]=63&x|128)}else for(y=0;y<l.length;y++)b[y]=0|l[y];return b},e.toHex=function(l){for(var d="",b=0;b<l.length;b++)d+=c(l[b].toString(16));return d},e.htonl=u,e.toHex32=function(l,d){for(var b="",v=0;v<l.length;v++){var y=l[v];d==="little"&&(y=u(y)),b+=s(y.toString(16))}return b},e.zero2=c,e.zero8=s,e.join32=function(l,d,b,v){var y=b-d;n(y%4==0);for(var x=new Array(y/4),E=0,R=d;E<x.length;E++,R+=4){var I;I=v==="big"?l[R]<<24|l[R+1]<<16|l[R+2]<<8|l[R+3]:l[R+3]<<24|l[R+2]<<16|l[R+1]<<8|l[R],x[E]=I>>>0}return x},e.split32=function(l,d){for(var b=new Array(4*l.length),v=0,y=0;v<l.length;v++,y+=4){var x=l[v];d==="big"?(b[y]=x>>>24,b[y+1]=x>>>16&255,b[y+2]=x>>>8&255,b[y+3]=255&x):(b[y+3]=x>>>24,b[y+2]=x>>>16&255,b[y+1]=x>>>8&255,b[y]=255&x)}return b},e.rotr32=function(l,d){return l>>>d|l<<32-d},e.rotl32=function(l,d){return l<<d|l>>>32-d},e.sum32=function(l,d){return l+d>>>0},e.sum32_3=function(l,d,b){return l+d+b>>>0},e.sum32_4=function(l,d,b,v){return l+d+b+v>>>0},e.sum32_5=function(l,d,b,v,y){return l+d+b+v+y>>>0},e.sum64=function(l,d,b,v){var y=l[d],x=v+l[d+1]>>>0,E=(x<v?1:0)+b+y;l[d]=E>>>0,l[d+1]=x},e.sum64_hi=function(l,d,b,v){return(d+v>>>0<d?1:0)+l+b>>>0},e.sum64_lo=function(l,d,b,v){return d+v>>>0},e.sum64_4_hi=function(l,d,b,v,y,x,E,R){var I=0,O=d;return I+=(O=O+v>>>0)<d?1:0,I+=(O=O+x>>>0)<x?1:0,l+b+y+E+(I+=(O=O+R>>>0)<R?1:0)>>>0},e.sum64_4_lo=function(l,d,b,v,y,x,E,R){return d+v+x+R>>>0},e.sum64_5_hi=function(l,d,b,v,y,x,E,R,I,O){var A=0,P=d;return A+=(P=P+v>>>0)<d?1:0,A+=(P=P+x>>>0)<x?1:0,A+=(P=P+R>>>0)<R?1:0,l+b+y+E+I+(A+=(P=P+O>>>0)<O?1:0)>>>0},e.sum64_5_lo=function(l,d,b,v,y,x,E,R,I,O){return d+v+x+R+O>>>0},e.rotr64_hi=function(l,d,b){return(d<<32-b|l>>>b)>>>0},e.rotr64_lo=function(l,d,b){return(l<<32-b|d>>>b)>>>0},e.shr64_hi=function(l,d,b){return l>>>b},e.shr64_lo=function(l,d,b){return(l<<32-b|d>>>b)>>>0}},function(i,e,o){(function(n){(function(f,p){function u(a,w){if(!a)throw new Error(w||"Assertion failed")}function c(a,w){a.super_=w;var h=function(){};h.prototype=w.prototype,a.prototype=new h,a.prototype.constructor=a}function s(a,w,h){if(s.isBN(a))return a;this.negative=0,this.words=null,this.length=0,this.red=null,a!==null&&(w!=="le"&&w!=="be"||(h=w,w=10),this._init(a||0,w||10,h||"be"))}var l;typeof f=="object"?f.exports=s:p.BN=s,s.BN=s,s.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:o(245).Buffer}catch{}function d(a,w){var h=a.charCodeAt(w);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function b(a,w,h){var m=d(a,h);return h-1>=w&&(m|=d(a,h-1)<<4),m}function v(a,w,h,m){for(var g=0,_=Math.min(a.length,h),T=w;T<_;T++){var k=a.charCodeAt(T)-48;g*=m,g+=k>=49?k-49+10:k>=17?k-17+10:k}return g}s.isBN=function(a){return a instanceof s||a!==null&&typeof a=="object"&&a.constructor.wordSize===s.wordSize&&Array.isArray(a.words)},s.max=function(a,w){return a.cmp(w)>0?a:w},s.min=function(a,w){return a.cmp(w)<0?a:w},s.prototype._init=function(a,w,h){if(typeof a=="number")return this._initNumber(a,w,h);if(typeof a=="object")return this._initArray(a,w,h);w==="hex"&&(w=16),u(w===(0|w)&&w>=2&&w<=36);var m=0;(a=a.toString().replace(/\s+/g,""))[0]==="-"&&(m++,this.negative=1),m<a.length&&(w===16?this._parseHex(a,m,h):(this._parseBase(a,w,m),h==="le"&&this._initArray(this.toArray(),w,h)))},s.prototype._initNumber=function(a,w,h){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[67108863&a],this.length=1):a<4503599627370496?(this.words=[67108863&a,a/67108864&67108863],this.length=2):(u(a<9007199254740992),this.words=[67108863&a,a/67108864&67108863,1],this.length=3),h==="le"&&this._initArray(this.toArray(),w,h)},s.prototype._initArray=function(a,w,h){if(u(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g,_,T=0;if(h==="be")for(m=a.length-1,g=0;m>=0;m-=3)_=a[m]|a[m-1]<<8|a[m-2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,(T+=24)>=26&&(T-=26,g++);else if(h==="le")for(m=0,g=0;m<a.length;m+=3)_=a[m]|a[m+1]<<8|a[m+2]<<16,this.words[g]|=_<<T&67108863,this.words[g+1]=_>>>26-T&67108863,(T+=24)>=26&&(T-=26,g++);return this.strip()},s.prototype._parseHex=function(a,w,h){this.length=Math.ceil((a.length-w)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var g,_=0,T=0;if(h==="be")for(m=a.length-1;m>=w;m-=2)g=b(a,w,m)<<_,this.words[T]|=67108863&g,_>=18?(_-=18,T+=1,this.words[T]|=g>>>26):_+=8;else for(m=(a.length-w)%2==0?w+1:w;m<a.length;m+=2)g=b(a,w,m)<<_,this.words[T]|=67108863&g,_>=18?(_-=18,T+=1,this.words[T]|=g>>>26):_+=8;this.strip()},s.prototype._parseBase=function(a,w,h){this.words=[0],this.length=1;for(var m=0,g=1;g<=67108863;g*=w)m++;m--,g=g/w|0;for(var _=a.length-h,T=_%m,k=Math.min(_,_-T)+h,M=0,B=h;B<k;B+=m)M=v(a,B,B+m,w),this.imuln(g),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M);if(T!==0){var Y=1;for(M=v(a,B,a.length,w),B=0;B<T;B++)Y*=w;this.imuln(Y),this.words[0]+M<67108864?this.words[0]+=M:this._iaddn(M)}this.strip()},s.prototype.copy=function(a){a.words=new Array(this.length);for(var w=0;w<this.length;w++)a.words[w]=this.words[w];a.length=this.length,a.negative=this.negative,a.red=this.red},s.prototype.clone=function(){var a=new s(null);return this.copy(a),a},s.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){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"],x=[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],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function R(a,w,h){h.negative=w.negative^a.negative;var m=a.length+w.length|0;h.length=m,m=m-1|0;var g=0|a.words[0],_=0|w.words[0],T=g*_,k=67108863&T,M=T/67108864|0;h.words[0]=k;for(var B=1;B<m;B++){for(var Y=M>>>26,C=67108863&M,K=Math.min(B,w.length-1),W=Math.max(0,B-a.length+1);W<=K;W++){var U=B-W|0;Y+=(T=(g=0|a.words[U])*(_=0|w.words[W])+C)/67108864|0,C=67108863&T}h.words[B]=0|C,M=0|Y}return M!==0?h.words[B]=0|M:h.length--,h.strip()}s.prototype.toString=function(a,w){var h;if(w=0|w||1,(a=a||10)===16||a==="hex"){h="";for(var m=0,g=0,_=0;_<this.length;_++){var T=this.words[_],k=(16777215&(T<<m|g)).toString(16);h=(g=T>>>24-m&16777215)!==0||_!==this.length-1?y[6-k.length]+k+h:k+h,(m+=2)>=26&&(m-=26,_--)}for(g!==0&&(h=g.toString(16)+h);h.length%w!=0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}if(a===(0|a)&&a>=2&&a<=36){var M=x[a],B=E[a];h="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var C=Y.modn(B).toString(a);h=(Y=Y.idivn(B)).isZero()?C+h:y[M-C.length]+C+h}for(this.isZero()&&(h="0"+h);h.length%w!=0;)h="0"+h;return this.negative!==0&&(h="-"+h),h}u(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=67108864*this.words[1]:this.length===3&&this.words[2]===1?a+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(a,w){return u(l!==void 0),this.toArrayLike(l,a,w)},s.prototype.toArray=function(a,w){return this.toArrayLike(Array,a,w)},s.prototype.toArrayLike=function(a,w,h){var m=this.byteLength(),g=h||Math.max(1,m);u(m<=g,"byte array longer than desired length"),u(g>0,"Requested array length <= 0"),this.strip();var _,T,k=w==="le",M=new a(g),B=this.clone();if(k){for(T=0;!B.isZero();T++)_=B.andln(255),B.iushrn(8),M[T]=_;for(;T<g;T++)M[T]=0}else{for(T=0;T<g-m;T++)M[T]=0;for(T=0;!B.isZero();T++)_=B.andln(255),B.iushrn(8),M[g-T-1]=_}return M},Math.clz32?s.prototype._countBits=function(a){return 32-Math.clz32(a)}:s.prototype._countBits=function(a){var w=a,h=0;return w>=4096&&(h+=13,w>>>=13),w>=64&&(h+=7,w>>>=7),w>=8&&(h+=4,w>>>=4),w>=2&&(h+=2,w>>>=2),h+w},s.prototype._zeroBits=function(a){if(a===0)return 26;var w=a,h=0;return!(8191&w)&&(h+=13,w>>>=13),!(127&w)&&(h+=7,w>>>=7),!(15&w)&&(h+=4,w>>>=4),!(3&w)&&(h+=2,w>>>=2),!(1&w)&&h++,h},s.prototype.bitLength=function(){var a=this.words[this.length-1],w=this._countBits(a);return 26*(this.length-1)+w},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,w=0;w<this.length;w++){var h=this._zeroBits(this.words[w]);if(a+=h,h!==26)break}return a},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(a){return this.negative!==0?this.abs().inotn(a).iaddn(1):this.clone()},s.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var w=0;w<a.length;w++)this.words[w]=this.words[w]|a.words[w];return this.strip()},s.prototype.ior=function(a){return u((this.negative|a.negative)==0),this.iuor(a)},s.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},s.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},s.prototype.iuand=function(a){var w;w=this.length>a.length?a:this;for(var h=0;h<w.length;h++)this.words[h]=this.words[h]&a.words[h];return this.length=w.length,this.strip()},s.prototype.iand=function(a){return u((this.negative|a.negative)==0),this.iuand(a)},s.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},s.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},s.prototype.iuxor=function(a){var w,h;this.length>a.length?(w=this,h=a):(w=a,h=this);for(var m=0;m<h.length;m++)this.words[m]=w.words[m]^h.words[m];if(this!==w)for(;m<w.length;m++)this.words[m]=w.words[m];return this.length=w.length,this.strip()},s.prototype.ixor=function(a){return u((this.negative|a.negative)==0),this.iuxor(a)},s.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},s.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},s.prototype.inotn=function(a){u(typeof a=="number"&&a>=0);var w=0|Math.ceil(a/26),h=a%26;this._expand(w),h>0&&w--;for(var m=0;m<w;m++)this.words[m]=67108863&~this.words[m];return h>0&&(this.words[m]=~this.words[m]&67108863>>26-h),this.strip()},s.prototype.notn=function(a){return this.clone().inotn(a)},s.prototype.setn=function(a,w){u(typeof a=="number"&&a>=0);var h=a/26|0,m=a%26;return this._expand(h+1),this.words[h]=w?this.words[h]|1<<m:this.words[h]&~(1<<m),this.strip()},s.prototype.iadd=function(a){var w,h,m;if(this.negative!==0&&a.negative===0)return this.negative=0,w=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,w=this.isub(a),a.negative=1,w._normSign();this.length>a.length?(h=this,m=a):(h=a,m=this);for(var g=0,_=0;_<m.length;_++)w=(0|h.words[_])+(0|m.words[_])+g,this.words[_]=67108863&w,g=w>>>26;for(;g!==0&&_<h.length;_++)w=(0|h.words[_])+g,this.words[_]=67108863&w,g=w>>>26;if(this.length=h.length,g!==0)this.words[this.length]=g,this.length++;else if(h!==this)for(;_<h.length;_++)this.words[_]=h.words[_];return this},s.prototype.add=function(a){var w;return a.negative!==0&&this.negative===0?(a.negative=0,w=this.sub(a),a.negative^=1,w):a.negative===0&&this.negative!==0?(this.negative=0,w=a.sub(this),this.negative=1,w):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},s.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var w=this.iadd(a);return a.negative=1,w._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var h,m,g=this.cmp(a);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;g>0?(h=this,m=a):(h=a,m=this);for(var _=0,T=0;T<m.length;T++)_=(w=(0|h.words[T])-(0|m.words[T])+_)>>26,this.words[T]=67108863&w;for(;_!==0&&T<h.length;T++)_=(w=(0|h.words[T])+_)>>26,this.words[T]=67108863&w;if(_===0&&T<h.length&&h!==this)for(;T<h.length;T++)this.words[T]=h.words[T];return this.length=Math.max(this.length,T),h!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(a){return this.clone().isub(a)};var I=function(a,w,h){var m,g,_,T=a.words,k=w.words,M=h.words,B=0,Y=0|T[0],C=8191&Y,K=Y>>>13,W=0|T[1],U=8191&W,q=W>>>13,j=0|T[2],D=8191&j,F=j>>>13,$=0|T[3],V=8191&$,Z=$>>>13,ee=0|T[4],re=8191&ee,ue=ee>>>13,fe=0|T[5],oe=8191&fe,ae=fe>>>13,ie=0|T[6],te=8191&ie,le=ie>>>13,ge=0|T[7],he=8191&ge,ye=ge>>>13,Ie=0|T[8],pe=8191&Ie,Oe=Ie>>>13,Ge=0|T[9],we=8191&Ge,Le=Ge>>>13,Ve=0|k[0],ve=8191&Ve,Ne=Ve>>>13,se=0|k[1],de=8191&se,_e=se>>>13,Ue=0|k[2],me=8191&Ue,Be=Ue>>>13,Je=0|k[3],be=8191&Je,He=Je>>>13,tt=0|k[4],Re=8191&tt,ze=tt>>>13,Ze=0|k[5],Ae=8191&Ze,De=Ze>>>13,rt=0|k[6],Ee=8191&rt,Fe=rt>>>13,Qe=0|k[7],Se=8191&Qe,Ke=Qe>>>13,Xe=0|k[8],Me=8191&Xe,We=Xe>>>13,et=0|k[9],ke=8191&et,qe=et>>>13;h.negative=a.negative^w.negative,h.length=19;var Q=(B+(m=Math.imul(C,ve))|0)+((8191&(g=(g=Math.imul(C,Ne))+Math.imul(K,ve)|0))<<13)|0;B=((_=Math.imul(K,Ne))+(g>>>13)|0)+(Q>>>26)|0,Q&=67108863,m=Math.imul(U,ve),g=(g=Math.imul(U,Ne))+Math.imul(q,ve)|0,_=Math.imul(q,Ne);var X=(B+(m=m+Math.imul(C,de)|0)|0)+((8191&(g=(g=g+Math.imul(C,_e)|0)+Math.imul(K,de)|0))<<13)|0;B=((_=_+Math.imul(K,_e)|0)+(g>>>13)|0)+(X>>>26)|0,X&=67108863,m=Math.imul(D,ve),g=(g=Math.imul(D,Ne))+Math.imul(F,ve)|0,_=Math.imul(F,Ne),m=m+Math.imul(U,de)|0,g=(g=g+Math.imul(U,_e)|0)+Math.imul(q,de)|0,_=_+Math.imul(q,_e)|0;var ne=(B+(m=m+Math.imul(C,me)|0)|0)+((8191&(g=(g=g+Math.imul(C,Be)|0)+Math.imul(K,me)|0))<<13)|0;B=((_=_+Math.imul(K,Be)|0)+(g>>>13)|0)+(ne>>>26)|0,ne&=67108863,m=Math.imul(V,ve),g=(g=Math.imul(V,Ne))+Math.imul(Z,ve)|0,_=Math.imul(Z,Ne),m=m+Math.imul(D,de)|0,g=(g=g+Math.imul(D,_e)|0)+Math.imul(F,de)|0,_=_+Math.imul(F,_e)|0,m=m+Math.imul(U,me)|0,g=(g=g+Math.imul(U,Be)|0)+Math.imul(q,me)|0,_=_+Math.imul(q,Be)|0;var ce=(B+(m=m+Math.imul(C,be)|0)|0)+((8191&(g=(g=g+Math.imul(C,He)|0)+Math.imul(K,be)|0))<<13)|0;B=((_=_+Math.imul(K,He)|0)+(g>>>13)|0)+(ce>>>26)|0,ce&=67108863,m=Math.imul(re,ve),g=(g=Math.imul(re,Ne))+Math.imul(ue,ve)|0,_=Math.imul(ue,Ne),m=m+Math.imul(V,de)|0,g=(g=g+Math.imul(V,_e)|0)+Math.imul(Z,de)|0,_=_+Math.imul(Z,_e)|0,m=m+Math.imul(D,me)|0,g=(g=g+Math.imul(D,Be)|0)+Math.imul(F,me)|0,_=_+Math.imul(F,Be)|0,m=m+Math.imul(U,be)|0,g=(g=g+Math.imul(U,He)|0)+Math.imul(q,be)|0,_=_+Math.imul(q,He)|0;var Ce=(B+(m=m+Math.imul(C,Re)|0)|0)+((8191&(g=(g=g+Math.imul(C,ze)|0)+Math.imul(K,Re)|0))<<13)|0;B=((_=_+Math.imul(K,ze)|0)+(g>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,m=Math.imul(oe,ve),g=(g=Math.imul(oe,Ne))+Math.imul(ae,ve)|0,_=Math.imul(ae,Ne),m=m+Math.imul(re,de)|0,g=(g=g+Math.imul(re,_e)|0)+Math.imul(ue,de)|0,_=_+Math.imul(ue,_e)|0,m=m+Math.imul(V,me)|0,g=(g=g+Math.imul(V,Be)|0)+Math.imul(Z,me)|0,_=_+Math.imul(Z,Be)|0,m=m+Math.imul(D,be)|0,g=(g=g+Math.imul(D,He)|0)+Math.imul(F,be)|0,_=_+Math.imul(F,He)|0,m=m+Math.imul(U,Re)|0,g=(g=g+Math.imul(U,ze)|0)+Math.imul(q,Re)|0,_=_+Math.imul(q,ze)|0;var Pe=(B+(m=m+Math.imul(C,Ae)|0)|0)+((8191&(g=(g=g+Math.imul(C,De)|0)+Math.imul(K,Ae)|0))<<13)|0;B=((_=_+Math.imul(K,De)|0)+(g>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,m=Math.imul(te,ve),g=(g=Math.imul(te,Ne))+Math.imul(le,ve)|0,_=Math.imul(le,Ne),m=m+Math.imul(oe,de)|0,g=(g=g+Math.imul(oe,_e)|0)+Math.imul(ae,de)|0,_=_+Math.imul(ae,_e)|0,m=m+Math.imul(re,me)|0,g=(g=g+Math.imul(re,Be)|0)+Math.imul(ue,me)|0,_=_+Math.imul(ue,Be)|0,m=m+Math.imul(V,be)|0,g=(g=g+Math.imul(V,He)|0)+Math.imul(Z,be)|0,_=_+Math.imul(Z,He)|0,m=m+Math.imul(D,Re)|0,g=(g=g+Math.imul(D,ze)|0)+Math.imul(F,Re)|0,_=_+Math.imul(F,ze)|0,m=m+Math.imul(U,Ae)|0,g=(g=g+Math.imul(U,De)|0)+Math.imul(q,Ae)|0,_=_+Math.imul(q,De)|0;var Ye=(B+(m=m+Math.imul(C,Ee)|0)|0)+((8191&(g=(g=g+Math.imul(C,Fe)|0)+Math.imul(K,Ee)|0))<<13)|0;B=((_=_+Math.imul(K,Fe)|0)+(g>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,m=Math.imul(he,ve),g=(g=Math.imul(he,Ne))+Math.imul(ye,ve)|0,_=Math.imul(ye,Ne),m=m+Math.imul(te,de)|0,g=(g=g+Math.imul(te,_e)|0)+Math.imul(le,de)|0,_=_+Math.imul(le,_e)|0,m=m+Math.imul(oe,me)|0,g=(g=g+Math.imul(oe,Be)|0)+Math.imul(ae,me)|0,_=_+Math.imul(ae,Be)|0,m=m+Math.imul(re,be)|0,g=(g=g+Math.imul(re,He)|0)+Math.imul(ue,be)|0,_=_+Math.imul(ue,He)|0,m=m+Math.imul(V,Re)|0,g=(g=g+Math.imul(V,ze)|0)+Math.imul(Z,Re)|0,_=_+Math.imul(Z,ze)|0,m=m+Math.imul(D,Ae)|0,g=(g=g+Math.imul(D,De)|0)+Math.imul(F,Ae)|0,_=_+Math.imul(F,De)|0,m=m+Math.imul(U,Ee)|0,g=(g=g+Math.imul(U,Fe)|0)+Math.imul(q,Ee)|0,_=_+Math.imul(q,Fe)|0;var $e=(B+(m=m+Math.imul(C,Se)|0)|0)+((8191&(g=(g=g+Math.imul(C,Ke)|0)+Math.imul(K,Se)|0))<<13)|0;B=((_=_+Math.imul(K,Ke)|0)+(g>>>13)|0)+($e>>>26)|0,$e&=67108863,m=Math.imul(pe,ve),g=(g=Math.imul(pe,Ne))+Math.imul(Oe,ve)|0,_=Math.imul(Oe,Ne),m=m+Math.imul(he,de)|0,g=(g=g+Math.imul(he,_e)|0)+Math.imul(ye,de)|0,_=_+Math.imul(ye,_e)|0,m=m+Math.imul(te,me)|0,g=(g=g+Math.imul(te,Be)|0)+Math.imul(le,me)|0,_=_+Math.imul(le,Be)|0,m=m+Math.imul(oe,be)|0,g=(g=g+Math.imul(oe,He)|0)+Math.imul(ae,be)|0,_=_+Math.imul(ae,He)|0,m=m+Math.imul(re,Re)|0,g=(g=g+Math.imul(re,ze)|0)+Math.imul(ue,Re)|0,_=_+Math.imul(ue,ze)|0,m=m+Math.imul(V,Ae)|0,g=(g=g+Math.imul(V,De)|0)+Math.imul(Z,Ae)|0,_=_+Math.imul(Z,De)|0,m=m+Math.imul(D,Ee)|0,g=(g=g+Math.imul(D,Fe)|0)+Math.imul(F,Ee)|0,_=_+Math.imul(F,Fe)|0,m=m+Math.imul(U,Se)|0,g=(g=g+Math.imul(U,Ke)|0)+Math.imul(q,Se)|0,_=_+Math.imul(q,Ke)|0;var nt=(B+(m=m+Math.imul(C,Me)|0)|0)+((8191&(g=(g=g+Math.imul(C,We)|0)+Math.imul(K,Me)|0))<<13)|0;B=((_=_+Math.imul(K,We)|0)+(g>>>13)|0)+(nt>>>26)|0,nt&=67108863,m=Math.imul(we,ve),g=(g=Math.imul(we,Ne))+Math.imul(Le,ve)|0,_=Math.imul(Le,Ne),m=m+Math.imul(pe,de)|0,g=(g=g+Math.imul(pe,_e)|0)+Math.imul(Oe,de)|0,_=_+Math.imul(Oe,_e)|0,m=m+Math.imul(he,me)|0,g=(g=g+Math.imul(he,Be)|0)+Math.imul(ye,me)|0,_=_+Math.imul(ye,Be)|0,m=m+Math.imul(te,be)|0,g=(g=g+Math.imul(te,He)|0)+Math.imul(le,be)|0,_=_+Math.imul(le,He)|0,m=m+Math.imul(oe,Re)|0,g=(g=g+Math.imul(oe,ze)|0)+Math.imul(ae,Re)|0,_=_+Math.imul(ae,ze)|0,m=m+Math.imul(re,Ae)|0,g=(g=g+Math.imul(re,De)|0)+Math.imul(ue,Ae)|0,_=_+Math.imul(ue,De)|0,m=m+Math.imul(V,Ee)|0,g=(g=g+Math.imul(V,Fe)|0)+Math.imul(Z,Ee)|0,_=_+Math.imul(Z,Fe)|0,m=m+Math.imul(D,Se)|0,g=(g=g+Math.imul(D,Ke)|0)+Math.imul(F,Se)|0,_=_+Math.imul(F,Ke)|0,m=m+Math.imul(U,Me)|0,g=(g=g+Math.imul(U,We)|0)+Math.imul(q,Me)|0,_=_+Math.imul(q,We)|0;var je=(B+(m=m+Math.imul(C,ke)|0)|0)+((8191&(g=(g=g+Math.imul(C,qe)|0)+Math.imul(K,ke)|0))<<13)|0;B=((_=_+Math.imul(K,qe)|0)+(g>>>13)|0)+(je>>>26)|0,je&=67108863,m=Math.imul(we,de),g=(g=Math.imul(we,_e))+Math.imul(Le,de)|0,_=Math.imul(Le,_e),m=m+Math.imul(pe,me)|0,g=(g=g+Math.imul(pe,Be)|0)+Math.imul(Oe,me)|0,_=_+Math.imul(Oe,Be)|0,m=m+Math.imul(he,be)|0,g=(g=g+Math.imul(he,He)|0)+Math.imul(ye,be)|0,_=_+Math.imul(ye,He)|0,m=m+Math.imul(te,Re)|0,g=(g=g+Math.imul(te,ze)|0)+Math.imul(le,Re)|0,_=_+Math.imul(le,ze)|0,m=m+Math.imul(oe,Ae)|0,g=(g=g+Math.imul(oe,De)|0)+Math.imul(ae,Ae)|0,_=_+Math.imul(ae,De)|0,m=m+Math.imul(re,Ee)|0,g=(g=g+Math.imul(re,Fe)|0)+Math.imul(ue,Ee)|0,_=_+Math.imul(ue,Fe)|0,m=m+Math.imul(V,Se)|0,g=(g=g+Math.imul(V,Ke)|0)+Math.imul(Z,Se)|0,_=_+Math.imul(Z,Ke)|0,m=m+Math.imul(D,Me)|0,g=(g=g+Math.imul(D,We)|0)+Math.imul(F,Me)|0,_=_+Math.imul(F,We)|0;var Te=(B+(m=m+Math.imul(U,ke)|0)|0)+((8191&(g=(g=g+Math.imul(U,qe)|0)+Math.imul(q,ke)|0))<<13)|0;B=((_=_+Math.imul(q,qe)|0)+(g>>>13)|0)+(Te>>>26)|0,Te&=67108863,m=Math.imul(we,me),g=(g=Math.imul(we,Be))+Math.imul(Le,me)|0,_=Math.imul(Le,Be),m=m+Math.imul(pe,be)|0,g=(g=g+Math.imul(pe,He)|0)+Math.imul(Oe,be)|0,_=_+Math.imul(Oe,He)|0,m=m+Math.imul(he,Re)|0,g=(g=g+Math.imul(he,ze)|0)+Math.imul(ye,Re)|0,_=_+Math.imul(ye,ze)|0,m=m+Math.imul(te,Ae)|0,g=(g=g+Math.imul(te,De)|0)+Math.imul(le,Ae)|0,_=_+Math.imul(le,De)|0,m=m+Math.imul(oe,Ee)|0,g=(g=g+Math.imul(oe,Fe)|0)+Math.imul(ae,Ee)|0,_=_+Math.imul(ae,Fe)|0,m=m+Math.imul(re,Se)|0,g=(g=g+Math.imul(re,Ke)|0)+Math.imul(ue,Se)|0,_=_+Math.imul(ue,Ke)|0,m=m+Math.imul(V,Me)|0,g=(g=g+Math.imul(V,We)|0)+Math.imul(Z,Me)|0,_=_+Math.imul(Z,We)|0;var st=(B+(m=m+Math.imul(D,ke)|0)|0)+((8191&(g=(g=g+Math.imul(D,qe)|0)+Math.imul(F,ke)|0))<<13)|0;B=((_=_+Math.imul(F,qe)|0)+(g>>>13)|0)+(st>>>26)|0,st&=67108863,m=Math.imul(we,be),g=(g=Math.imul(we,He))+Math.imul(Le,be)|0,_=Math.imul(Le,He),m=m+Math.imul(pe,Re)|0,g=(g=g+Math.imul(pe,ze)|0)+Math.imul(Oe,Re)|0,_=_+Math.imul(Oe,ze)|0,m=m+Math.imul(he,Ae)|0,g=(g=g+Math.imul(he,De)|0)+Math.imul(ye,Ae)|0,_=_+Math.imul(ye,De)|0,m=m+Math.imul(te,Ee)|0,g=(g=g+Math.imul(te,Fe)|0)+Math.imul(le,Ee)|0,_=_+Math.imul(le,Fe)|0,m=m+Math.imul(oe,Se)|0,g=(g=g+Math.imul(oe,Ke)|0)+Math.imul(ae,Se)|0,_=_+Math.imul(ae,Ke)|0,m=m+Math.imul(re,Me)|0,g=(g=g+Math.imul(re,We)|0)+Math.imul(ue,Me)|0,_=_+Math.imul(ue,We)|0;var ft=(B+(m=m+Math.imul(V,ke)|0)|0)+((8191&(g=(g=g+Math.imul(V,qe)|0)+Math.imul(Z,ke)|0))<<13)|0;B=((_=_+Math.imul(Z,qe)|0)+(g>>>13)|0)+(ft>>>26)|0,ft&=67108863,m=Math.imul(we,Re),g=(g=Math.imul(we,ze))+Math.imul(Le,Re)|0,_=Math.imul(Le,ze),m=m+Math.imul(pe,Ae)|0,g=(g=g+Math.imul(pe,De)|0)+Math.imul(Oe,Ae)|0,_=_+Math.imul(Oe,De)|0,m=m+Math.imul(he,Ee)|0,g=(g=g+Math.imul(he,Fe)|0)+Math.imul(ye,Ee)|0,_=_+Math.imul(ye,Fe)|0,m=m+Math.imul(te,Se)|0,g=(g=g+Math.imul(te,Ke)|0)+Math.imul(le,Se)|0,_=_+Math.imul(le,Ke)|0,m=m+Math.imul(oe,Me)|0,g=(g=g+Math.imul(oe,We)|0)+Math.imul(ae,Me)|0,_=_+Math.imul(ae,We)|0;var gt=(B+(m=m+Math.imul(re,ke)|0)|0)+((8191&(g=(g=g+Math.imul(re,qe)|0)+Math.imul(ue,ke)|0))<<13)|0;B=((_=_+Math.imul(ue,qe)|0)+(g>>>13)|0)+(gt>>>26)|0,gt&=67108863,m=Math.imul(we,Ae),g=(g=Math.imul(we,De))+Math.imul(Le,Ae)|0,_=Math.imul(Le,De),m=m+Math.imul(pe,Ee)|0,g=(g=g+Math.imul(pe,Fe)|0)+Math.imul(Oe,Ee)|0,_=_+Math.imul(Oe,Fe)|0,m=m+Math.imul(he,Se)|0,g=(g=g+Math.imul(he,Ke)|0)+Math.imul(ye,Se)|0,_=_+Math.imul(ye,Ke)|0,m=m+Math.imul(te,Me)|0,g=(g=g+Math.imul(te,We)|0)+Math.imul(le,Me)|0,_=_+Math.imul(le,We)|0;var ht=(B+(m=m+Math.imul(oe,ke)|0)|0)+((8191&(g=(g=g+Math.imul(oe,qe)|0)+Math.imul(ae,ke)|0))<<13)|0;B=((_=_+Math.imul(ae,qe)|0)+(g>>>13)|0)+(ht>>>26)|0,ht&=67108863,m=Math.imul(we,Ee),g=(g=Math.imul(we,Fe))+Math.imul(Le,Ee)|0,_=Math.imul(Le,Fe),m=m+Math.imul(pe,Se)|0,g=(g=g+Math.imul(pe,Ke)|0)+Math.imul(Oe,Se)|0,_=_+Math.imul(Oe,Ke)|0,m=m+Math.imul(he,Me)|0,g=(g=g+Math.imul(he,We)|0)+Math.imul(ye,Me)|0,_=_+Math.imul(ye,We)|0;var yt=(B+(m=m+Math.imul(te,ke)|0)|0)+((8191&(g=(g=g+Math.imul(te,qe)|0)+Math.imul(le,ke)|0))<<13)|0;B=((_=_+Math.imul(le,qe)|0)+(g>>>13)|0)+(yt>>>26)|0,yt&=67108863,m=Math.imul(we,Se),g=(g=Math.imul(we,Ke))+Math.imul(Le,Se)|0,_=Math.imul(Le,Ke),m=m+Math.imul(pe,Me)|0,g=(g=g+Math.imul(pe,We)|0)+Math.imul(Oe,Me)|0,_=_+Math.imul(Oe,We)|0;var at=(B+(m=m+Math.imul(he,ke)|0)|0)+((8191&(g=(g=g+Math.imul(he,qe)|0)+Math.imul(ye,ke)|0))<<13)|0;B=((_=_+Math.imul(ye,qe)|0)+(g>>>13)|0)+(at>>>26)|0,at&=67108863,m=Math.imul(we,Me),g=(g=Math.imul(we,We))+Math.imul(Le,Me)|0,_=Math.imul(Le,We);var wt=(B+(m=m+Math.imul(pe,ke)|0)|0)+((8191&(g=(g=g+Math.imul(pe,qe)|0)+Math.imul(Oe,ke)|0))<<13)|0;B=((_=_+Math.imul(Oe,qe)|0)+(g>>>13)|0)+(wt>>>26)|0,wt&=67108863;var ut=(B+(m=Math.imul(we,ke))|0)+((8191&(g=(g=Math.imul(we,qe))+Math.imul(Le,ke)|0))<<13)|0;return B=((_=Math.imul(Le,qe))+(g>>>13)|0)+(ut>>>26)|0,ut&=67108863,M[0]=Q,M[1]=X,M[2]=ne,M[3]=ce,M[4]=Ce,M[5]=Pe,M[6]=Ye,M[7]=$e,M[8]=nt,M[9]=je,M[10]=Te,M[11]=st,M[12]=ft,M[13]=gt,M[14]=ht,M[15]=yt,M[16]=at,M[17]=wt,M[18]=ut,B!==0&&(M[19]=B,h.length++),h};function O(a,w,h){return new A().mulp(a,w,h)}function A(a,w){this.x=a,this.y=w}Math.imul||(I=R),s.prototype.mulTo=function(a,w){var h=this.length+a.length;return this.length===10&&a.length===10?I(this,a,w):h<63?R(this,a,w):h<1024?function(m,g,_){_.negative=g.negative^m.negative,_.length=m.length+g.length;for(var T=0,k=0,M=0;M<_.length-1;M++){var B=k;k=0;for(var Y=67108863&T,C=Math.min(M,g.length-1),K=Math.max(0,M-m.length+1);K<=C;K++){var W=M-K,U=(0|m.words[W])*(0|g.words[K]),q=67108863&U;Y=67108863&(q=q+Y|0),k+=(B=(B=B+(U/67108864|0)|0)+(q>>>26)|0)>>>26,B&=67108863}_.words[M]=Y,T=B,B=k}return T!==0?_.words[M]=T:_.length--,_.strip()}(this,a,w):O(this,a,w)},A.prototype.makeRBT=function(a){for(var w=new Array(a),h=s.prototype._countBits(a)-1,m=0;m<a;m++)w[m]=this.revBin(m,h,a);return w},A.prototype.revBin=function(a,w,h){if(a===0||a===h-1)return a;for(var m=0,g=0;g<w;g++)m|=(1&a)<<w-g-1,a>>=1;return m},A.prototype.permute=function(a,w,h,m,g,_){for(var T=0;T<_;T++)m[T]=w[a[T]],g[T]=h[a[T]]},A.prototype.transform=function(a,w,h,m,g,_){this.permute(_,a,w,h,m,g);for(var T=1;T<g;T<<=1)for(var k=T<<1,M=Math.cos(2*Math.PI/k),B=Math.sin(2*Math.PI/k),Y=0;Y<g;Y+=k)for(var C=M,K=B,W=0;W<T;W++){var U=h[Y+W],q=m[Y+W],j=h[Y+W+T],D=m[Y+W+T],F=C*j-K*D;D=C*D+K*j,j=F,h[Y+W]=U+j,m[Y+W]=q+D,h[Y+W+T]=U-j,m[Y+W+T]=q-D,W!==k&&(F=M*C-B*K,K=M*K+B*C,C=F)}},A.prototype.guessLen13b=function(a,w){var h=1|Math.max(w,a),m=1&h,g=0;for(h=h/2|0;h;h>>>=1)g++;return 1<<g+1+m},A.prototype.conjugate=function(a,w,h){if(!(h<=1))for(var m=0;m<h/2;m++){var g=a[m];a[m]=a[h-m-1],a[h-m-1]=g,g=w[m],w[m]=-w[h-m-1],w[h-m-1]=-g}},A.prototype.normalize13b=function(a,w){for(var h=0,m=0;m<w/2;m++){var g=8192*Math.round(a[2*m+1]/w)+Math.round(a[2*m]/w)+h;a[m]=67108863&g,h=g<67108864?0:g/67108864|0}return a},A.prototype.convert13b=function(a,w,h,m){for(var g=0,_=0;_<w;_++)g+=0|a[_],h[2*_]=8191&g,g>>>=13,h[2*_+1]=8191&g,g>>>=13;for(_=2*w;_<m;++_)h[_]=0;u(g===0),u((-8192&g)==0)},A.prototype.stub=function(a){for(var w=new Array(a),h=0;h<a;h++)w[h]=0;return w},A.prototype.mulp=function(a,w,h){var m=2*this.guessLen13b(a.length,w.length),g=this.makeRBT(m),_=this.stub(m),T=new Array(m),k=new Array(m),M=new Array(m),B=new Array(m),Y=new Array(m),C=new Array(m),K=h.words;K.length=m,this.convert13b(a.words,a.length,T,m),this.convert13b(w.words,w.length,B,m),this.transform(T,_,k,M,m,g),this.transform(B,_,Y,C,m,g);for(var W=0;W<m;W++){var U=k[W]*Y[W]-M[W]*C[W];M[W]=k[W]*C[W]+M[W]*Y[W],k[W]=U}return this.conjugate(k,M,m),this.transform(k,M,K,_,m,g),this.conjugate(K,_,m),this.normalize13b(K,m),h.negative=a.negative^w.negative,h.length=a.length+w.length,h.strip()},s.prototype.mul=function(a){var w=new s(null);return w.words=new Array(this.length+a.length),this.mulTo(a,w)},s.prototype.mulf=function(a){var w=new s(null);return w.words=new Array(this.length+a.length),O(this,a,w)},s.prototype.imul=function(a){return this.clone().mulTo(a,this)},s.prototype.imuln=function(a){u(typeof a=="number"),u(a<67108864);for(var w=0,h=0;h<this.length;h++){var m=(0|this.words[h])*a,g=(67108863&m)+(67108863&w);w>>=26,w+=m/67108864|0,w+=g>>>26,this.words[h]=67108863&g}return w!==0&&(this.words[h]=w,this.length++),this},s.prototype.muln=function(a){return this.clone().imuln(a)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(a){var w=function(_){for(var T=new Array(_.bitLength()),k=0;k<T.length;k++){var M=k/26|0,B=k%26;T[k]=(_.words[M]&1<<B)>>>B}return T}(a);if(w.length===0)return new s(1);for(var h=this,m=0;m<w.length&&w[m]===0;m++,h=h.sqr());if(++m<w.length)for(var g=h.sqr();m<w.length;m++,g=g.sqr())w[m]!==0&&(h=h.mul(g));return h},s.prototype.iushln=function(a){u(typeof a=="number"&&a>=0);var w,h=a%26,m=(a-h)/26,g=67108863>>>26-h<<26-h;if(h!==0){var _=0;for(w=0;w<this.length;w++){var T=this.words[w]&g,k=(0|this.words[w])-T<<h;this.words[w]=k|_,_=T>>>26-h}_&&(this.words[w]=_,this.length++)}if(m!==0){for(w=this.length-1;w>=0;w--)this.words[w+m]=this.words[w];for(w=0;w<m;w++)this.words[w]=0;this.length+=m}return this.strip()},s.prototype.ishln=function(a){return u(this.negative===0),this.iushln(a)},s.prototype.iushrn=function(a,w,h){var m;u(typeof a=="number"&&a>=0),m=w?(w-w%26)/26:0;var g=a%26,_=Math.min((a-g)/26,this.length),T=67108863^67108863>>>g<<g,k=h;if(m-=_,m=Math.max(0,m),k){for(var M=0;M<_;M++)k.words[M]=this.words[M];k.length=_}if(_!==0)if(this.length>_)for(this.length-=_,M=0;M<this.length;M++)this.words[M]=this.words[M+_];else this.words[0]=0,this.length=1;var B=0;for(M=this.length-1;M>=0&&(B!==0||M>=m);M--){var Y=0|this.words[M];this.words[M]=B<<26-g|Y>>>g,B=Y&T}return k&&B!==0&&(k.words[k.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(a,w,h){return u(this.negative===0),this.iushrn(a,w,h)},s.prototype.shln=function(a){return this.clone().ishln(a)},s.prototype.ushln=function(a){return this.clone().iushln(a)},s.prototype.shrn=function(a){return this.clone().ishrn(a)},s.prototype.ushrn=function(a){return this.clone().iushrn(a)},s.prototype.testn=function(a){u(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26,m=1<<w;return!(this.length<=h)&&!!(this.words[h]&m)},s.prototype.imaskn=function(a){u(typeof a=="number"&&a>=0);var w=a%26,h=(a-w)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=h)return this;if(w!==0&&h++,this.length=Math.min(h,this.length),w!==0){var m=67108863^67108863>>>w<<w;this.words[this.length-1]&=m}return this.strip()},s.prototype.maskn=function(a){return this.clone().imaskn(a)},s.prototype.iaddn=function(a){return u(typeof a=="number"),u(a<67108864),a<0?this.isubn(-a):this.negative!==0?this.length===1&&(0|this.words[0])<a?(this.words[0]=a-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},s.prototype._iaddn=function(a){this.words[0]+=a;for(var w=0;w<this.length&&this.words[w]>=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},s.prototype.isubn=function(a){if(u(typeof a=="number"),u(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w<this.length&&this.words[w]<0;w++)this.words[w]+=67108864,this.words[w+1]-=1;return this.strip()},s.prototype.addn=function(a){return this.clone().iaddn(a)},s.prototype.subn=function(a){return this.clone().isubn(a)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(a,w,h){var m,g,_=a.length+h;this._expand(_);var T=0;for(m=0;m<a.length;m++){g=(0|this.words[m+h])+T;var k=(0|a.words[m])*w;T=((g-=67108863&k)>>26)-(k/67108864|0),this.words[m+h]=67108863&g}for(;m<this.length-h;m++)T=(g=(0|this.words[m+h])+T)>>26,this.words[m+h]=67108863&g;if(T===0)return this.strip();for(u(T===-1),T=0,m=0;m<this.length;m++)T=(g=-(0|this.words[m])+T)>>26,this.words[m]=67108863&g;return this.negative=1,this.strip()},s.prototype._wordDiv=function(a,w){var h=(this.length,a.length),m=this.clone(),g=a,_=0|g.words[g.length-1];(h=26-this._countBits(_))!==0&&(g=g.ushln(h),m.iushln(h),_=0|g.words[g.length-1]);var T,k=m.length-g.length;if(w!=="mod"){(T=new s(null)).length=k+1,T.words=new Array(T.length);for(var M=0;M<T.length;M++)T.words[M]=0}var B=m.clone()._ishlnsubmul(g,1,k);B.negative===0&&(m=B,T&&(T.words[k]=1));for(var Y=k-1;Y>=0;Y--){var C=67108864*(0|m.words[g.length+Y])+(0|m.words[g.length+Y-1]);for(C=Math.min(C/_|0,67108863),m._ishlnsubmul(g,C,Y);m.negative!==0;)C--,m.negative=0,m._ishlnsubmul(g,1,Y),m.isZero()||(m.negative^=1);T&&(T.words[Y]=C)}return T&&T.strip(),m.strip(),w!=="div"&&h!==0&&m.iushrn(h),{div:T||null,mod:m}},s.prototype.divmod=function(a,w,h){return u(!a.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:this.negative!==0&&a.negative===0?(_=this.neg().divmod(a,w),w!=="mod"&&(m=_.div.neg()),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.iadd(a)),{div:m,mod:g}):this.negative===0&&a.negative!==0?(_=this.divmod(a.neg(),w),w!=="mod"&&(m=_.div.neg()),{div:m,mod:_.mod}):this.negative&a.negative?(_=this.neg().divmod(a.neg(),w),w!=="div"&&(g=_.mod.neg(),h&&g.negative!==0&&g.isub(a)),{div:_.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:new s(0),mod:this}:a.length===1?w==="div"?{div:this.divn(a.words[0]),mod:null}:w==="mod"?{div:null,mod:new s(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new s(this.modn(a.words[0]))}:this._wordDiv(a,w);var m,g,_},s.prototype.div=function(a){return this.divmod(a,"div",!1).div},s.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},s.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},s.prototype.divRound=function(a){var w=this.divmod(a);if(w.mod.isZero())return w.div;var h=w.div.negative!==0?w.mod.isub(a):w.mod,m=a.ushrn(1),g=a.andln(1),_=h.cmp(m);return _<0||g===1&&_===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},s.prototype.modn=function(a){u(a<=67108863);for(var w=(1<<26)%a,h=0,m=this.length-1;m>=0;m--)h=(w*h+(0|this.words[m]))%a;return h},s.prototype.idivn=function(a){u(a<=67108863);for(var w=0,h=this.length-1;h>=0;h--){var m=(0|this.words[h])+67108864*w;this.words[h]=m/a|0,w=m%a}return this.strip()},s.prototype.divn=function(a){return this.clone().idivn(a)},s.prototype.egcd=function(a){u(a.negative===0),u(!a.isZero());var w=this,h=a.clone();w=w.negative!==0?w.umod(a):w.clone();for(var m=new s(1),g=new s(0),_=new s(0),T=new s(1),k=0;w.isEven()&&h.isEven();)w.iushrn(1),h.iushrn(1),++k;for(var M=h.clone(),B=w.clone();!w.isZero();){for(var Y=0,C=1;!(w.words[0]&C)&&Y<26;++Y,C<<=1);if(Y>0)for(w.iushrn(Y);Y-- >0;)(m.isOdd()||g.isOdd())&&(m.iadd(M),g.isub(B)),m.iushrn(1),g.iushrn(1);for(var K=0,W=1;!(h.words[0]&W)&&K<26;++K,W<<=1);if(K>0)for(h.iushrn(K);K-- >0;)(_.isOdd()||T.isOdd())&&(_.iadd(M),T.isub(B)),_.iushrn(1),T.iushrn(1);w.cmp(h)>=0?(w.isub(h),m.isub(_),g.isub(T)):(h.isub(w),_.isub(m),T.isub(g))}return{a:_,b:T,gcd:h.iushln(k)}},s.prototype._invmp=function(a){u(a.negative===0),u(!a.isZero());var w=this,h=a.clone();w=w.negative!==0?w.umod(a):w.clone();for(var m,g=new s(1),_=new s(0),T=h.clone();w.cmpn(1)>0&&h.cmpn(1)>0;){for(var k=0,M=1;!(w.words[0]&M)&&k<26;++k,M<<=1);if(k>0)for(w.iushrn(k);k-- >0;)g.isOdd()&&g.iadd(T),g.iushrn(1);for(var B=0,Y=1;!(h.words[0]&Y)&&B<26;++B,Y<<=1);if(B>0)for(h.iushrn(B);B-- >0;)_.isOdd()&&_.iadd(T),_.iushrn(1);w.cmp(h)>=0?(w.isub(h),g.isub(_)):(h.isub(w),_.isub(g))}return(m=w.cmpn(1)===0?g:_).cmpn(0)<0&&m.iadd(a),m},s.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var w=this.clone(),h=a.clone();w.negative=0,h.negative=0;for(var m=0;w.isEven()&&h.isEven();m++)w.iushrn(1),h.iushrn(1);for(;;){for(;w.isEven();)w.iushrn(1);for(;h.isEven();)h.iushrn(1);var g=w.cmp(h);if(g<0){var _=w;w=h,h=_}else if(g===0||h.cmpn(1)===0)break;w.isub(h)}return h.iushln(m)},s.prototype.invm=function(a){return this.egcd(a).a.umod(a)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(a){return this.words[0]&a},s.prototype.bincn=function(a){u(typeof a=="number");var w=a%26,h=(a-w)/26,m=1<<w;if(this.length<=h)return this._expand(h+1),this.words[h]|=m,this;for(var g=m,_=h;g!==0&&_<this.length;_++){var T=0|this.words[_];g=(T+=g)>>>26,T&=67108863,this.words[_]=T}return g!==0&&(this.words[_]=g,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(a){var w,h=a<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(a=-a),u(a<=67108863,"Number is too big");var m=0|this.words[0];w=m===a?0:m<a?-1:1}return this.negative!==0?0|-w:w},s.prototype.cmp=function(a){if(this.negative!==0&&a.negative===0)return-1;if(this.negative===0&&a.negative!==0)return 1;var w=this.ucmp(a);return this.negative!==0?0|-w:w},s.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var w=0,h=this.length-1;h>=0;h--){var m=0|this.words[h],g=0|a.words[h];if(m!==g){m<g?w=-1:m>g&&(w=1);break}}return w},s.prototype.gtn=function(a){return this.cmpn(a)===1},s.prototype.gt=function(a){return this.cmp(a)===1},s.prototype.gten=function(a){return this.cmpn(a)>=0},s.prototype.gte=function(a){return this.cmp(a)>=0},s.prototype.ltn=function(a){return this.cmpn(a)===-1},s.prototype.lt=function(a){return this.cmp(a)===-1},s.prototype.lten=function(a){return this.cmpn(a)<=0},s.prototype.lte=function(a){return this.cmp(a)<=0},s.prototype.eqn=function(a){return this.cmpn(a)===0},s.prototype.eq=function(a){return this.cmp(a)===0},s.red=function(a){return new z(a)},s.prototype.toRed=function(a){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},s.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(a){return this.red=a,this},s.prototype.forceRed=function(a){return u(!this.red,"Already a number in reduction context"),this._forceRed(a)},s.prototype.redAdd=function(a){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},s.prototype.redIAdd=function(a){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},s.prototype.redSub=function(a){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},s.prototype.redISub=function(a){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},s.prototype.redShl=function(a){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},s.prototype.redMul=function(a){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},s.prototype.redIMul=function(a){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},s.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(a){return u(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var P={k256:null,p224:null,p192:null,p25519:null};function N(a,w){this.name=a,this.p=new s(w,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function L(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function H(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function J(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function G(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function z(a){if(typeof a=="string"){var w=s._prime(a);this.m=w.p,this.prime=w}else u(a.gtn(1),"modulus must be greater than 1"),this.m=a,this.prime=null}function S(a){z.call(this,a),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N.prototype._tmp=function(){var a=new s(null);return a.words=new Array(Math.ceil(this.n/13)),a},N.prototype.ireduce=function(a){var w,h=a;do this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength();while(w>this.n);var m=w<this.n?-1:h.ucmp(this.p);return m===0?(h.words[0]=0,h.length=1):m>0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},N.prototype.split=function(a,w){a.iushrn(this.n,0,w)},N.prototype.imulK=function(a){return a.imul(this.k)},c(L,N),L.prototype.split=function(a,w){for(var h=Math.min(a.length,9),m=0;m<h;m++)w.words[m]=a.words[m];if(w.length=h,a.length<=9)return a.words[0]=0,void(a.length=1);var g=a.words[9];for(w.words[w.length++]=4194303&g,m=10;m<a.length;m++){var _=0|a.words[m];a.words[m-10]=(4194303&_)<<4|g>>>22,g=_}g>>>=22,a.words[m-10]=g,g===0&&a.length>10?a.length-=10:a.length-=9},L.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var w=0,h=0;h<a.length;h++){var m=0|a.words[h];w+=977*m,a.words[h]=67108863&w,w=64*m+(w/67108864|0)}return a.words[a.length-1]===0&&(a.length--,a.words[a.length-1]===0&&a.length--),a},c(H,N),c(J,N),c(G,N),G.prototype.imulK=function(a){for(var w=0,h=0;h<a.length;h++){var m=19*(0|a.words[h])+w,g=67108863&m;m>>>=26,a.words[h]=g,w=m}return w!==0&&(a.words[a.length++]=w),a},s._prime=function(a){if(P[a])return P[a];var w;if(a==="k256")w=new L;else if(a==="p224")w=new H;else if(a==="p192")w=new J;else{if(a!=="p25519")throw new Error("Unknown prime "+a);w=new G}return P[a]=w,w},z.prototype._verify1=function(a){u(a.negative===0,"red works only with positives"),u(a.red,"red works only with red numbers")},z.prototype._verify2=function(a,w){u((a.negative|w.negative)==0,"red works only with positives"),u(a.red&&a.red===w.red,"red works only with red numbers")},z.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},z.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},z.prototype.add=function(a,w){this._verify2(a,w);var h=a.add(w);return h.cmp(this.m)>=0&&h.isub(this.m),h._forceRed(this)},z.prototype.iadd=function(a,w){this._verify2(a,w);var h=a.iadd(w);return h.cmp(this.m)>=0&&h.isub(this.m),h},z.prototype.sub=function(a,w){this._verify2(a,w);var h=a.sub(w);return h.cmpn(0)<0&&h.iadd(this.m),h._forceRed(this)},z.prototype.isub=function(a,w){this._verify2(a,w);var h=a.isub(w);return h.cmpn(0)<0&&h.iadd(this.m),h},z.prototype.shl=function(a,w){return this._verify1(a),this.imod(a.ushln(w))},z.prototype.imul=function(a,w){return this._verify2(a,w),this.imod(a.imul(w))},z.prototype.mul=function(a,w){return this._verify2(a,w),this.imod(a.mul(w))},z.prototype.isqr=function(a){return this.imul(a,a.clone())},z.prototype.sqr=function(a){return this.mul(a,a)},z.prototype.sqrt=function(a){if(a.isZero())return a.clone();var w=this.m.andln(3);if(u(w%2==1),w===3){var h=this.m.add(new s(1)).iushrn(2);return this.pow(a,h)}for(var m=this.m.subn(1),g=0;!m.isZero()&&m.andln(1)===0;)g++,m.iushrn(1);u(!m.isZero());var _=new s(1).toRed(this),T=_.redNeg(),k=this.m.subn(1).iushrn(1),M=this.m.bitLength();for(M=new s(2*M*M).toRed(this);this.pow(M,k).cmp(T)!==0;)M.redIAdd(T);for(var B=this.pow(M,m),Y=this.pow(a,m.addn(1).iushrn(1)),C=this.pow(a,m),K=g;C.cmp(_)!==0;){for(var W=C,U=0;W.cmp(_)!==0;U++)W=W.redSqr();u(U<K);var q=this.pow(B,new s(1).iushln(K-U-1));Y=Y.redMul(q),B=q.redSqr(),C=C.redMul(B),K=U}return Y},z.prototype.invm=function(a){var w=a._invmp(this.m);return w.negative!==0?(w.negative=0,this.imod(w).redNeg()):this.imod(w)},z.prototype.pow=function(a,w){if(w.isZero())return new s(1).toRed(this);if(w.cmpn(1)===0)return a.clone();var h=new Array(16);h[0]=new s(1).toRed(this),h[1]=a;for(var m=2;m<h.length;m++)h[m]=this.mul(h[m-1],a);var g=h[0],_=0,T=0,k=w.bitLength()%26;for(k===0&&(k=26),m=w.length-1;m>=0;m--){for(var M=w.words[m],B=k-1;B>=0;B--){var Y=M>>B&1;g!==h[0]&&(g=this.sqr(g)),Y!==0||_!==0?(_<<=1,_|=Y,(++T===4||m===0&&B===0)&&(g=this.mul(g,h[_]),T=0,_=0)):T=0}k=26}return g},z.prototype.convertTo=function(a){var w=a.umod(this.m);return w===a?w.clone():w},z.prototype.convertFrom=function(a){var w=a.clone();return w.red=null,w},s.mont=function(a){return new S(a)},c(S,z),S.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},S.prototype.convertFrom=function(a){var w=this.imod(a.mul(this.rinv));return w.red=null,w},S.prototype.imul=function(a,w){if(a.isZero()||w.isZero())return a.words[0]=0,a.length=1,a;var h=a.imul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},S.prototype.mul=function(a,w){if(a.isZero()||w.isZero())return new s(0)._forceRed(this);var h=a.mul(w),m=h.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=h.isub(m).iushrn(this.shift),_=g;return g.cmp(this.m)>=0?_=g.isub(this.m):g.cmpn(0)<0&&(_=g.iadd(this.m)),_._forceRed(this)},S.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}})(n,this)}).call(this,o(25)(i))},function(i,e){var o,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(f){if(!f)throw new Error('"version" cannot be null or undefined');if(f<1||f>40)throw new Error('"version" should be in range from 1 to 40');return 4*f+17},e.getSymbolTotalCodewords=function(f){return n[f]},e.getBCHDigit=function(f){for(var p=0;f!==0;)p++,f>>>=1;return p},e.setToSJISFunction=function(f){if(typeof f!="function")throw new Error('"toSJISFunc" is not a valid function.');o=f},e.isKanjiModeEnabled=function(){return o!==void 0},e.toSJIS=function(f){return o(f)}},function(i,e,o){var n=o(99),f=o(100);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(p,u){if(!p.ccBits)throw new Error("Invalid mode: "+p);if(!n.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?p.ccBits[0]:u<27?p.ccBits[1]:p.ccBits[2]},e.getBestModeForData=function(p){return f.testNumeric(p)?e.NUMERIC:f.testAlphanumeric(p)?e.ALPHANUMERIC:f.testKanji(p)?e.KANJI:e.BYTE},e.toString=function(p){if(p&&p.id)return p.id;throw new Error("Invalid mode")},e.isValid=function(p){return p&&p.bit&&p.ccBits},e.from=function(p,u){if(e.isValid(p))return p;try{return function(c){if(typeof c!="string")throw new Error("Param is not a string");switch(c.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+c)}}(p)}catch{return u}}},function(i,e,o){var n=o(43),f=Object.keys||function(x){var E=[];for(var R in x)E.push(R);return E};i.exports=b;var p=Object.create(o(35));p.inherits=o(3);var u=o(105),c=o(53);p.inherits(b,u);for(var s=f(c.prototype),l=0;l<s.length;l++){var d=s[l];b.prototype[d]||(b.prototype[d]=c.prototype[d])}function b(x){if(!(this instanceof b))return new b(x);u.call(this,x),c.call(this,x),x&&x.readable===!1&&(this.readable=!1),x&&x.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,x&&x.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||n.nextTick(y,this)}function y(x){x.end()}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(x){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=x,this._writableState.destroyed=x)}}),b.prototype._destroy=function(x,E){this.push(null),this.end(),n.nextTick(E,x)}},function(i,e,o){var n=o(209).Buffer,f=n.isEncoding||function(x){switch((x=""+x)&&x.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 p(x){var E;switch(this.encoding=function(R){var I=function(O){if(!O)return"utf8";for(var A;;)switch(O){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 O;default:if(A)return;O=(""+O).toLowerCase(),A=!0}}(R);if(typeof I!="string"&&(n.isEncoding===f||!f(R)))throw new Error("Unknown encoding: "+R);return I||R}(x),this.encoding){case"utf16le":this.text=s,this.end=l,E=4;break;case"utf8":this.fillLast=c,E=4;break;case"base64":this.text=d,this.end=b,E=3;break;default:return this.write=v,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(E)}function u(x){return x<=127?0:x>>5==6?2:x>>4==14?3:x>>3==30?4:x>>6==2?-1:-2}function c(x){var E=this.lastTotal-this.lastNeed,R=function(I,O,A){if((192&O[0])!=128)return I.lastNeed=0,"�";if(I.lastNeed>1&&O.length>1){if((192&O[1])!=128)return I.lastNeed=1,"�";if(I.lastNeed>2&&O.length>2&&(192&O[2])!=128)return I.lastNeed=2,"�"}}(this,x);return R!==void 0?R:this.lastNeed<=x.length?(x.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(x.copy(this.lastChar,E,0,x.length),void(this.lastNeed-=x.length))}function s(x,E){if((x.length-E)%2==0){var R=x.toString("utf16le",E);if(R){var I=R.charCodeAt(R.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=x[x.length-1],x.toString("utf16le",E,x.length-1)}function l(x){var E=x&&x.length?this.write(x):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,R)}return E}function d(x,E){var R=(x.length-E)%3;return R===0?x.toString("base64",E):(this.lastNeed=3-R,this.lastTotal=3,R===1?this.lastChar[0]=x[x.length-1]:(this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1]),x.toString("base64",E,x.length-R))}function b(x){var E=x&&x.length?this.write(x):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function v(x){return x.toString(this.encoding)}function y(x){return x&&x.length?this.write(x):""}e.StringDecoder=p,p.prototype.write=function(x){if(x.length===0)return"";var E,R;if(this.lastNeed){if((E=this.fillLast(x))===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R<x.length?E?E+this.text(x,R):this.text(x,R):E||""},p.prototype.end=function(x){var E=x&&x.length?this.write(x):"";return this.lastNeed?E+"�":E},p.prototype.text=function(x,E){var R=function(O,A,P){var N=A.length-1;if(N<P)return 0;var L=u(A[N]);return L>=0?(L>0&&(O.lastNeed=L-1),L):--N<P||L===-2?0:(L=u(A[N]))>=0?(L>0&&(O.lastNeed=L-2),L):--N<P||L===-2?0:(L=u(A[N]))>=0?(L>0&&(L===2?L=0:O.lastNeed=L-3),L):0}(this,x,E);if(!this.lastNeed)return x.toString("utf8",E);this.lastTotal=R;var I=x.length-(R-this.lastNeed);return x.copy(this.lastChar,0,I),x.toString("utf8",E,I)},p.prototype.fillLast=function(x){if(this.lastNeed<=x.length)return x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,x.length),this.lastNeed-=x.length}},function(i,e,o){(function(n){var f=Object.getOwnPropertyDescriptors||function(g){for(var _=Object.keys(g),T={},k=0;k<_.length;k++)T[_[k]]=Object.getOwnPropertyDescriptor(g,_[k]);return T},p=/%[sdj%]/g;e.format=function(g){if(!O(g)){for(var _=[],T=0;T<arguments.length;T++)_.push(s(arguments[T]));return _.join(" ")}T=1;for(var k=arguments,M=k.length,B=String(g).replace(p,function(C){if(C==="%%")return"%";if(T>=M)return C;switch(C){case"%s":return String(k[T++]);case"%d":return Number(k[T++]);case"%j":try{return JSON.stringify(k[T++])}catch{return"[Circular]"}default:return C}}),Y=k[T];T<M;Y=k[++T])R(Y)||!N(Y)?B+=" "+Y:B+=" "+s(Y);return B},e.deprecate=function(g,_){if(n!==void 0&&n.noDeprecation===!0)return g;if(n===void 0)return function(){return e.deprecate(g,_).apply(this,arguments)};var T=!1;return function(){if(!T){if(n.throwDeprecation)throw new Error(_);n.traceDeprecation?console.trace(_):console.error(_),T=!0}return g.apply(this,arguments)}};var u,c={};function s(g,_){var T={seen:[],stylize:d};return arguments.length>=3&&(T.depth=arguments[2]),arguments.length>=4&&(T.colors=arguments[3]),E(_)?T.showHidden=_:_&&e._extend(T,_),A(T.showHidden)&&(T.showHidden=!1),A(T.depth)&&(T.depth=2),A(T.colors)&&(T.colors=!1),A(T.customInspect)&&(T.customInspect=!0),T.colors&&(T.stylize=l),b(T,g,T.depth)}function l(g,_){var T=s.styles[_];return T?"\x1B["+s.colors[T][0]+"m"+g+"\x1B["+s.colors[T][1]+"m":g}function d(g,_){return g}function b(g,_,T){if(g.customInspect&&_&&J(_.inspect)&&_.inspect!==e.inspect&&(!_.constructor||_.constructor.prototype!==_)){var k=_.inspect(T,g);return O(k)||(k=b(g,k,T)),k}var M=function(j,D){if(A(D))return j.stylize("undefined","undefined");if(O(D)){var F="'"+JSON.stringify(D).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(F,"string")}if(I(D))return j.stylize(""+D,"number");if(E(D))return j.stylize(""+D,"boolean");if(R(D))return j.stylize("null","null")}(g,_);if(M)return M;var B=Object.keys(_),Y=function(j){var D={};return j.forEach(function(F,$){D[F]=!0}),D}(B);if(g.showHidden&&(B=Object.getOwnPropertyNames(_)),H(_)&&(B.indexOf("message")>=0||B.indexOf("description")>=0))return v(_);if(B.length===0){if(J(_)){var C=_.name?": "+_.name:"";return g.stylize("[Function"+C+"]","special")}if(P(_))return g.stylize(RegExp.prototype.toString.call(_),"regexp");if(L(_))return g.stylize(Date.prototype.toString.call(_),"date");if(H(_))return v(_)}var K,W="",U=!1,q=["{","}"];return x(_)&&(U=!0,q=["[","]"]),J(_)&&(W=" [Function"+(_.name?": "+_.name:"")+"]"),P(_)&&(W=" "+RegExp.prototype.toString.call(_)),L(_)&&(W=" "+Date.prototype.toUTCString.call(_)),H(_)&&(W=" "+v(_)),B.length!==0||U&&_.length!=0?T<0?P(_)?g.stylize(RegExp.prototype.toString.call(_),"regexp"):g.stylize("[Object]","special"):(g.seen.push(_),K=U?function(j,D,F,$,V){for(var Z=[],ee=0,re=D.length;ee<re;++ee)w(D,String(ee))?Z.push(y(j,D,F,$,String(ee),!0)):Z.push("");return V.forEach(function(ue){ue.match(/^\d+$/)||Z.push(y(j,D,F,$,ue,!0))}),Z}(g,_,T,Y,B):B.map(function(j){return y(g,_,T,Y,j,U)}),g.seen.pop(),function(j,D,F){return j.reduce(function($,V){return V.indexOf(`
`)>=0,$+V.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?F[0]+(D===""?"":D+`
 `)+" "+j.join(`,
  `)+" "+F[1]:F[0]+D+" "+j.join(", ")+" "+F[1]}(K,W,q)):q[0]+W+q[1]}function v(g){return"["+Error.prototype.toString.call(g)+"]"}function y(g,_,T,k,M,B){var Y,C,K;if((K=Object.getOwnPropertyDescriptor(_,M)||{value:_[M]}).get?C=K.set?g.stylize("[Getter/Setter]","special"):g.stylize("[Getter]","special"):K.set&&(C=g.stylize("[Setter]","special")),w(k,M)||(Y="["+M+"]"),C||(g.seen.indexOf(K.value)<0?(C=R(T)?b(g,K.value,null):b(g,K.value,T-1)).indexOf(`
`)>-1&&(C=B?C.split(`
`).map(function(W){return"  "+W}).join(`
`).substr(2):`
`+C.split(`
`).map(function(W){return"   "+W}).join(`
`)):C=g.stylize("[Circular]","special")),A(Y)){if(B&&M.match(/^\d+$/))return C;(Y=JSON.stringify(""+M)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.substr(1,Y.length-2),Y=g.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=g.stylize(Y,"string"))}return Y+": "+C}function x(g){return Array.isArray(g)}function E(g){return typeof g=="boolean"}function R(g){return g===null}function I(g){return typeof g=="number"}function O(g){return typeof g=="string"}function A(g){return g===void 0}function P(g){return N(g)&&G(g)==="[object RegExp]"}function N(g){return typeof g=="object"&&g!==null}function L(g){return N(g)&&G(g)==="[object Date]"}function H(g){return N(g)&&(G(g)==="[object Error]"||g instanceof Error)}function J(g){return typeof g=="function"}function G(g){return Object.prototype.toString.call(g)}function z(g){return g<10?"0"+g.toString(10):g.toString(10)}e.debuglog=function(g){if(A(u)&&(u=n.env.NODE_DEBUG||""),g=g.toUpperCase(),!c[g])if(new RegExp("\\b"+g+"\\b","i").test(u)){var _=n.pid;c[g]=function(){var T=e.format.apply(e,arguments);console.error("%s %d: %s",g,_,T)}}else c[g]=function(){};return c[g]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=x,e.isBoolean=E,e.isNull=R,e.isNullOrUndefined=function(g){return g==null},e.isNumber=I,e.isString=O,e.isSymbol=function(g){return typeof g=="symbol"},e.isUndefined=A,e.isRegExp=P,e.isObject=N,e.isDate=L,e.isError=H,e.isFunction=J,e.isPrimitive=function(g){return g===null||typeof g=="boolean"||typeof g=="number"||typeof g=="string"||typeof g=="symbol"||g===void 0},e.isBuffer=o(225);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function a(){var g=new Date,_=[z(g.getHours()),z(g.getMinutes()),z(g.getSeconds())].join(":");return[g.getDate(),S[g.getMonth()],_].join(" ")}function w(g,_){return Object.prototype.hasOwnProperty.call(g,_)}e.log=function(){console.log("%s - %s",a(),e.format.apply(e,arguments))},e.inherits=o(226),e._extend=function(g,_){if(!_||!N(_))return g;for(var T=Object.keys(_),k=T.length;k--;)g[T[k]]=_[T[k]];return g};var h=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function m(g,_){if(!g){var T=new Error("Promise was rejected with a falsy value");T.reason=g,g=T}return _(g)}e.promisify=function(g){if(typeof g!="function")throw new TypeError('The "original" argument must be of type Function');if(h&&g[h]){var _;if(typeof(_=g[h])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,h,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var T,k,M=new Promise(function(C,K){T=C,k=K}),B=[],Y=0;Y<arguments.length;Y++)B.push(arguments[Y]);B.push(function(C,K){C?k(C):T(K)});try{g.apply(this,B)}catch(C){k(C)}return M}return Object.setPrototypeOf(_,Object.getPrototypeOf(g)),h&&Object.defineProperty(_,h,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,f(g))},e.promisify.custom=h,e.callbackify=function(g){if(typeof g!="function")throw new TypeError('The "original" argument must be of type Function');function _(){for(var T=[],k=0;k<arguments.length;k++)T.push(arguments[k]);var M=T.pop();if(typeof M!="function")throw new TypeError("The last argument must be of type Function");var B=this,Y=function(){return M.apply(B,arguments)};g.apply(this,T).then(function(C){n.nextTick(Y,null,C)},function(C){n.nextTick(m,C,Y)})}return Object.setPrototypeOf(_,Object.getPrototypeOf(g)),Object.defineProperties(_,f(g)),_}}).call(this,o(5))},function(i,e){function o(n,f){if(!n)throw new Error(f||"Assertion failed")}i.exports=o,o.equal=function(n,f,p){if(n!=f)throw new Error(p||"Assertion failed: "+n+" != "+f)}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsync=void 0;var n,f=o(322),p=(n=f)&&n.__esModule?n:{default:n},u=typeof Symbol=="function";function c(s){return u&&s[Symbol.toStringTag]==="AsyncFunction"}e.default=function(s){return c(s)?(0,p.default)(s):s},e.isAsync=c},function(i,e,o){o.d(e,"c",function(){return f}),o.d(e,"a",function(){return p}),o.d(e,"b",function(){return u});var n=o(7);function f(c){return n.c.includes(c)}function p(c){return Object.keys(n.f).includes(c)?n.f[c]:n.f[n.a]}function u(c){return Object.values(n.f).find(l=>l.code===c)||n.f[n.a]}},function(i,e){i.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},function(i,e,o){var n=o(50);p.TYPED_ARRAY_SUPPORT=function(){try{var v=new Uint8Array(1);return v.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},v.foo()===42}catch{return!1}}();var f=p.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function p(v,y,x){return p.TYPED_ARRAY_SUPPORT||this instanceof p?typeof v=="number"?s(this,v):function(E,R,I,O){if(typeof R=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&R instanceof ArrayBuffer?function(A,P,N,L){if(N<0||P.byteLength<N)throw new RangeError("'offset' is out of bounds");if(P.byteLength<N+(L||0))throw new RangeError("'length' is out of bounds");var H;return H=N===void 0&&L===void 0?new Uint8Array(P):L===void 0?new Uint8Array(P,N):new Uint8Array(P,N,L),p.TYPED_ARRAY_SUPPORT?H.__proto__=p.prototype:H=l(A,H),H}(E,R,I,O):typeof R=="string"?function(A,P){var N=0|b(P),L=c(A,N),H=L.write(P);return H!==N&&(L=L.slice(0,H)),L}(E,R):function(A,P){if(p.isBuffer(P)){var N=0|u(P.length),L=c(A,N);return L.length===0||P.copy(L,0,0,N),L}if(P){if(typeof ArrayBuffer<"u"&&P.buffer instanceof ArrayBuffer||"length"in P)return typeof P.length!="number"||(H=P.length)!=H?c(A,0):l(A,P);if(P.type==="Buffer"&&Array.isArray(P.data))return l(A,P.data)}var H;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(E,R)}(this,v,y,x):new p(v,y,x)}function u(v){if(v>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|v}function c(v,y){var x;return p.TYPED_ARRAY_SUPPORT?(x=new Uint8Array(y)).__proto__=p.prototype:((x=v)===null&&(x=new p(y)),x.length=y),x}function s(v,y){var x=c(v,y<0?0:0|u(y));if(!p.TYPED_ARRAY_SUPPORT)for(var E=0;E<y;++E)x[E]=0;return x}function l(v,y){for(var x=y.length<0?0:0|u(y.length),E=c(v,x),R=0;R<x;R+=1)E[R]=255&y[R];return E}function d(v,y){var x;y=y||1/0;for(var E=v.length,R=null,I=[],O=0;O<E;++O){if((x=v.charCodeAt(O))>55295&&x<57344){if(!R){if(x>56319){(y-=3)>-1&&I.push(239,191,189);continue}if(O+1===E){(y-=3)>-1&&I.push(239,191,189);continue}R=x;continue}if(x<56320){(y-=3)>-1&&I.push(239,191,189),R=x;continue}x=65536+(R-55296<<10|x-56320)}else R&&(y-=3)>-1&&I.push(239,191,189);if(R=null,x<128){if((y-=1)<0)break;I.push(x)}else if(x<2048){if((y-=2)<0)break;I.push(x>>6|192,63&x|128)}else if(x<65536){if((y-=3)<0)break;I.push(x>>12|224,x>>6&63|128,63&x|128)}else{if(!(x<1114112))throw new Error("Invalid code point");if((y-=4)<0)break;I.push(x>>18|240,x>>12&63|128,x>>6&63|128,63&x|128)}}return I}function b(v){return p.isBuffer(v)?v.length:typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(v)||v instanceof ArrayBuffer)?v.byteLength:(typeof v!="string"&&(v=""+v),v.length===0?0:d(v).length)}p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),p.prototype.write=function(v,y,x){y===void 0||x===void 0&&typeof y=="string"?(x=this.length,y=0):isFinite(y)&&(y|=0,isFinite(x)?x|=0:x=void 0);var E=this.length-y;if((x===void 0||x>E)&&(x=E),v.length>0&&(x<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(R,I,O,A){return function(P,N,L,H){for(var J=0;J<H&&!(J+L>=N.length||J>=P.length);++J)N[J+L]=P[J];return J}(d(I,R.length-O),R,O,A)}(this,v,y,x)},p.prototype.slice=function(v,y){var x,E=this.length;if((v=~~v)<0?(v+=E)<0&&(v=0):v>E&&(v=E),(y=y===void 0?E:~~y)<0?(y+=E)<0&&(y=0):y>E&&(y=E),y<v&&(y=v),p.TYPED_ARRAY_SUPPORT)(x=this.subarray(v,y)).__proto__=p.prototype;else{var R=y-v;x=new p(R,void 0);for(var I=0;I<R;++I)x[I]=this[I+v]}return x},p.prototype.copy=function(v,y,x,E){if(x||(x=0),E||E===0||(E=this.length),y>=v.length&&(y=v.length),y||(y=0),E>0&&E<x&&(E=x),E===x||v.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("sourceStart out of bounds");if(E<0)throw new RangeError("sourceEnd out of bounds");E>this.length&&(E=this.length),v.length-y<E-x&&(E=v.length-y+x);var R,I=E-x;if(this===v&&x<y&&y<E)for(R=I-1;R>=0;--R)v[R+y]=this[R+x];else if(I<1e3||!p.TYPED_ARRAY_SUPPORT)for(R=0;R<I;++R)v[R+y]=this[R+x];else Uint8Array.prototype.set.call(v,this.subarray(x,x+I),y);return I},p.prototype.fill=function(v,y,x){if(typeof v=="string"){if(typeof y=="string"?(y=0,x=this.length):typeof x=="string"&&(x=this.length),v.length===1){var E=v.charCodeAt(0);E<256&&(v=E)}}else typeof v=="number"&&(v&=255);if(y<0||this.length<y||this.length<x)throw new RangeError("Out of range index");if(x<=y)return this;var R;if(y>>>=0,x=x===void 0?this.length:x>>>0,v||(v=0),typeof v=="number")for(R=y;R<x;++R)this[R]=v;else{var I=p.isBuffer(v)?v:new p(v),O=I.length;for(R=0;R<x-y;++R)this[R+y]=I[R%O]}return this},p.concat=function(v,y){if(!n(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return c(null,0);var x;if(y===void 0)for(y=0,x=0;x<v.length;++x)y+=v[x].length;var E=s(null,y),R=0;for(x=0;x<v.length;++x){var I=v[x];if(!p.isBuffer(I))throw new TypeError('"list" argument must be an Array of Buffers');I.copy(E,R),R+=I.length}return E},p.byteLength=b,p.prototype._isBuffer=!0,p.isBuffer=function(v){return!(v==null||!v._isBuffer)},i.exports.alloc=function(v){var y=new p(v);return y.fill(0),y},i.exports.from=function(v){return new p(v)}},function(i,e,o){var n={};function f(u,c,s){s||(s=Error);var l=function(d){var b,v;function y(x,E,R){return d.call(this,function(I,O,A){return typeof c=="string"?c:c(I,O,A)}(x,E,R))||this}return v=d,(b=y).prototype=Object.create(v.prototype),b.prototype.constructor=b,b.__proto__=v,y}(s);l.prototype.name=s.name,l.prototype.code=u,n[u]=l}function p(u,c){if(Array.isArray(u)){var s=u.length;return u=u.map(function(l){return String(l)}),s>2?"one of ".concat(c," ").concat(u.slice(0,s-1).join(", "),", or ")+u[s-1]:s===2?"one of ".concat(c," ").concat(u[0]," or ").concat(u[1]):"of ".concat(c," ").concat(u[0])}return"of ".concat(c," ").concat(String(u))}f("ERR_INVALID_OPT_VALUE",function(u,c){return'The value "'+c+'" is invalid for option "'+u+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(u,c,s){var l,d,b;if(typeof c=="string"&&(d="not ",c.substr(0,d.length)===d)?(l="must not be",c=c.replace(/^not /,"")):l="must be",function(y,x,E){return(E===void 0||E>y.length)&&(E=y.length),y.substring(E-x.length,E)===x}(u," argument"))b="The ".concat(u," ").concat(l," ").concat(p(c,"type"));else{var v=function(y,x,E){return typeof E!="number"&&(E=0),!(E+x.length>y.length)&&y.indexOf(x,E)!==-1}(u,".")?"property":"argument";b='The "'.concat(u,'" ').concat(v," ").concat(l," ").concat(p(c,"type"))}return b+=". Received type ".concat(typeof s)},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=n},function(i,e,o){(function(n){var f=Object.keys||function(y){var x=[];for(var E in y)x.push(E);return x};i.exports=d;var p=o(112),u=o(116);o(3)(d,p);for(var c=f(u.prototype),s=0;s<c.length;s++){var l=c[s];d.prototype[l]||(d.prototype[l]=u.prototype[l])}function d(y){if(!(this instanceof d))return new d(y);p.call(this,y),u.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",b)))}function b(){this._writableState.ended||n.nextTick(v,this)}function v(y){y.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(y){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=y,this._writableState.destroyed=y)}})}).call(this,o(5))},function(i,e,o){var n={};function f(u,c,s){s||(s=Error);var l=function(d){var b,v;function y(x,E,R){return d.call(this,function(I,O,A){return typeof c=="string"?c:c(I,O,A)}(x,E,R))||this}return v=d,(b=y).prototype=Object.create(v.prototype),b.prototype.constructor=b,b.__proto__=v,y}(s);l.prototype.name=s.name,l.prototype.code=u,n[u]=l}function p(u,c){if(Array.isArray(u)){var s=u.length;return u=u.map(function(l){return String(l)}),s>2?"one of ".concat(c," ").concat(u.slice(0,s-1).join(", "),", or ")+u[s-1]:s===2?"one of ".concat(c," ").concat(u[0]," or ").concat(u[1]):"of ".concat(c," ").concat(u[0])}return"of ".concat(c," ").concat(String(u))}f("ERR_INVALID_OPT_VALUE",function(u,c){return'The value "'+c+'" is invalid for option "'+u+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(u,c,s){var l,d,b;if(typeof c=="string"&&(d="not ",c.substr(0,d.length)===d)?(l="must not be",c=c.replace(/^not /,"")):l="must be",function(y,x,E){return(E===void 0||E>y.length)&&(E=y.length),y.substring(E-x.length,E)===x}(u," argument"))b="The ".concat(u," ").concat(l," ").concat(p(c,"type"));else{var v=function(y,x,E){return typeof E!="number"&&(E=0),!(E+x.length>y.length)&&y.indexOf(x,E)!==-1}(u,".")?"property":"argument";b='The "'.concat(u,'" ').concat(v," ").concat(l," ").concat(p(c,"type"))}return b+=". Received type ".concat(typeof s)},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=n},function(i,e,o){(function(n){var f=Object.keys||function(y){var x=[];for(var E in y)x.push(E);return x};i.exports=d;var p=o(128),u=o(132);o(3)(d,p);for(var c=f(u.prototype),s=0;s<c.length;s++){var l=c[s];d.prototype[l]||(d.prototype[l]=u.prototype[l])}function d(y){if(!(this instanceof d))return new d(y);p.call(this,y),u.call(this,y),this.allowHalfOpen=!0,y&&(y.readable===!1&&(this.readable=!1),y.writable===!1&&(this.writable=!1),y.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",b)))}function b(){this._writableState.ended||n.nextTick(v,this)}function v(y){y.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(y){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=y,this._writableState.destroyed=y)}})}).call(this,o(5))},function(i,e,o){var n=o(13).Buffer;function f(p,u){this._block=n.alloc(p),this._finalSize=u,this._blockSize=p,this._len=0}f.prototype.update=function(p,u){typeof p=="string"&&(u=u||"utf8",p=n.from(p,u));for(var c=this._block,s=this._blockSize,l=p.length,d=this._len,b=0;b<l;){for(var v=d%s,y=Math.min(l-b,s-v),x=0;x<y;x++)c[v+x]=p[b+x];b+=y,(d+=y)%s==0&&this._update(c)}return this._len+=l,this},f.prototype.digest=function(p){var u=this._len%this._blockSize;this._block[u]=128,this._block.fill(0,u+1),u>=this._finalSize&&(this._update(this._block),this._block.fill(0));var c=8*this._len;if(c<=4294967295)this._block.writeUInt32BE(c,this._blockSize-4);else{var s=(4294967295&c)>>>0,l=(c-s)/4294967296;this._block.writeUInt32BE(l,this._blockSize-8),this._block.writeUInt32BE(s,this._blockSize-4)}this._update(this._block);var d=this._hash();return p?d.toString(p):d},f.prototype._update=function(){throw new Error("_update must be implemented by subclass")},i.exports=f},function(i,e,o){(function(n){var f=o(136),p=o(293);function u(s){var l=s;if(typeof l!="string")throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof l+", while padToEven.");return l.length%2&&(l="0"+l),l}function c(s){return"0x"+s.toString(16)}i.exports={arrayContainsArray:function(s,l,d){if(Array.isArray(s)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof s+"'");if(Array.isArray(l)!==!0)throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof l+"'");return l[Boolean(d)?"some":"every"](function(b){return s.indexOf(b)>=0})},intToBuffer:function(s){var l=c(s);return new n(u(l.slice(2)),"hex")},getBinarySize:function(s){if(typeof s!="string")throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof s+"'.");return n.byteLength(s,"utf8")},isHexPrefixed:f,stripHexPrefix:p,padToEven:u,intToHex:c,fromAscii:function(s){for(var l="",d=0;d<s.length;d++){var b=s.charCodeAt(d).toString(16);l+=b.length<2?"0"+b:b}return"0x"+l},fromUtf8:function(s){return"0x"+u(new n(s,"utf8").toString("hex")).replace(/^0+|0+$/g,"")},toAscii:function(s){var l="",d=0,b=s.length;for(s.substring(0,2)==="0x"&&(d=2);d<b;d+=2){var v=parseInt(s.substr(d,2),16);l+=String.fromCharCode(v)}return l},toUtf8:function(s){return new n(u(p(s).replace(/^0+|0+$/g,"")),"hex").toString("utf8")},getKeys:function(s,l,d){if(!Array.isArray(s))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof s+"'");if(typeof l!="string")throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof l+"'.");for(var b=[],v=0;v<s.length;v++){var y=s[v][l];if(d&&!y)y="";else if(typeof y!="string")throw new Error("invalid abi");b.push(y)}return b},isHexString:function(s,l){return!(typeof s!="string"||!s.match(/^0x[0-9A-Fa-f]*$/))&&(!l||s.length===2+2*l)}}}).call(this,o(2).Buffer)},function(i,e,o){var n=o(90);o.d(e,"randomBytes",function(){return n.a});var f=o(91);o.d(e,"aesCbcDecrypt",function(){return f.a}),o.d(e,"aesCbcEncrypt",function(){return f.b});var p=o(92);o.d(e,"hmacSha256Sign",function(){return p.a}),o(97),o(42),o(4)},function(i,e,o){(e=i.exports=o(105)).Stream=e,e.Readable=e,e.Writable=o(53),e.Duplex=o(19),e.Transform=o(109),e.PassThrough=o(210)},function(i,e,o){(function(n){function f(p){return Object.prototype.toString.call(p)}e.isArray=function(p){return Array.isArray?Array.isArray(p):f(p)==="[object Array]"},e.isBoolean=function(p){return typeof p=="boolean"},e.isNull=function(p){return p===null},e.isNullOrUndefined=function(p){return p==null},e.isNumber=function(p){return typeof p=="number"},e.isString=function(p){return typeof p=="string"},e.isSymbol=function(p){return typeof p=="symbol"},e.isUndefined=function(p){return p===void 0},e.isRegExp=function(p){return f(p)==="[object RegExp]"},e.isObject=function(p){return typeof p=="object"&&p!==null},e.isDate=function(p){return f(p)==="[object Date]"},e.isError=function(p){return f(p)==="[object Error]"||p instanceof Error},e.isFunction=function(p){return typeof p=="function"},e.isPrimitive=function(p){return p===null||typeof p=="boolean"||typeof p=="number"||typeof p=="string"||typeof p=="symbol"||p===void 0},e.isBuffer=n.isBuffer}).call(this,o(2).Buffer)},function(i,e,o){var n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},f=o(110),p=f.keccak224,u=f.keccak384,c=f.keccak256,s=f.keccak512,l=o(241),d=o(61),b=o(46),v=o(9),y=o(126),x=o(292).Buffer;Object.assign(e,o(32)),e.MAX_INTEGER=new v("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new v("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.SHA3_NULL_S=e.KECCAK256_NULL_S,e.KECCAK256_NULL=x.from(e.KECCAK256_NULL_S,"hex"),e.SHA3_NULL=e.KECCAK256_NULL,e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.SHA3_RLP_ARRAY_S=e.KECCAK256_RLP_ARRAY_S,e.KECCAK256_RLP_ARRAY=x.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.SHA3_RLP_ARRAY=e.KECCAK256_RLP_ARRAY,e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.SHA3_RLP_S=e.KECCAK256_RLP_S,e.KECCAK256_RLP=x.from(e.KECCAK256_RLP_S,"hex"),e.SHA3_RLP=e.KECCAK256_RLP,e.BN=v,e.rlp=b,e.secp256k1=l,e.zeros=function(R){return x.allocUnsafe(R).fill(0)},e.zeroAddress=function(){var R=e.zeros(20);return e.bufferToHex(R)},e.setLengthLeft=e.setLength=function(R,I,O){var A=e.zeros(I);return R=e.toBuffer(R),O?R.length<I?(R.copy(A),A):R.slice(0,I):R.length<I?(R.copy(A,I-R.length),A):R.slice(-I)},e.setLengthRight=function(R,I){return e.setLength(R,I,!0)},e.unpad=e.stripZeros=function(R){for(var I=(R=e.stripHexPrefix(R))[0];R.length>0&&I.toString()==="0";)I=(R=R.slice(1))[0];return R},e.toBuffer=function(R){if(!x.isBuffer(R))if(Array.isArray(R))R=x.from(R);else if(typeof R=="string")R=e.isHexString(R)?x.from(e.padToEven(e.stripHexPrefix(R)),"hex"):x.from(R);else if(typeof R=="number")R=e.intToBuffer(R);else if(R==null)R=x.allocUnsafe(0);else if(v.isBN(R))R=R.toArrayLike(x);else{if(!R.toArray)throw new Error("invalid type");R=x.from(R.toArray())}return R},e.bufferToInt=function(R){return new v(e.toBuffer(R)).toNumber()},e.bufferToHex=function(R){return"0x"+(R=e.toBuffer(R)).toString("hex")},e.fromSigned=function(R){return new v(R).fromTwos(256)},e.toUnsigned=function(R){return x.from(R.toTwos(256).toArray())},e.keccak=function(R,I){switch(R=e.toBuffer(R),I||(I=256),I){case 224:return p(R);case 256:return c(R);case 384:return u(R);case 512:return s(R);default:throw new Error("Invald algorithm: keccak"+I)}},e.keccak256=function(R){return e.keccak(R)},e.sha3=e.keccak,e.sha256=function(R){return R=e.toBuffer(R),y("sha256").update(R).digest()},e.ripemd160=function(R,I){R=e.toBuffer(R);var O=y("rmd160").update(R).digest();return I===!0?e.setLength(O,32):O},e.rlphash=function(R){return e.keccak(b.encode(R))},e.isValidPrivate=function(R){return l.privateKeyVerify(R)},e.isValidPublic=function(R,I){return R.length===64?l.publicKeyVerify(x.concat([x.from([4]),R])):!!I&&l.publicKeyVerify(R)},e.pubToAddress=e.publicToAddress=function(R,I){return R=e.toBuffer(R),I&&R.length!==64&&(R=l.publicKeyConvert(R,!1).slice(1)),d(R.length===64),e.keccak(R).slice(-20)};var E=e.privateToPublic=function(R){return R=e.toBuffer(R),l.publicKeyCreate(R,!1).slice(1)};e.importPublic=function(R){return(R=e.toBuffer(R)).length!==64&&(R=l.publicKeyConvert(R,!1).slice(1)),R},e.ecsign=function(R,I){var O=l.sign(R,I),A={};return A.r=O.signature.slice(0,32),A.s=O.signature.slice(32,64),A.v=O.recovery+27,A},e.hashPersonalMessage=function(R){var I=e.toBuffer(`Ethereum Signed Message:
`+R.length.toString());return e.keccak(x.concat([I,R]))},e.ecrecover=function(R,I,O,A){var P=x.concat([e.setLength(O,32),e.setLength(A,32)],64),N=I-27;if(N!==0&&N!==1)throw new Error("Invalid signature v value");var L=l.recover(R,P,N);return l.publicKeyConvert(L,!1).slice(1)},e.toRpcSig=function(R,I,O){if(R!==27&&R!==28)throw new Error("Invalid recovery id");return e.bufferToHex(x.concat([e.setLengthLeft(I,32),e.setLengthLeft(O,32),e.toBuffer(R-27)]))},e.fromRpcSig=function(R){if((R=e.toBuffer(R)).length!==65)throw new Error("Invalid signature length");var I=R[64];return I<27&&(I+=27),{v:I,r:R.slice(0,32),s:R.slice(32,64)}},e.privateToAddress=function(R){return e.publicToAddress(E(R))},e.isValidAddress=function(R){return/^0x[0-9a-fA-F]{40}$/.test(R)},e.isZeroAddress=function(R){return e.zeroAddress()===e.addHexPrefix(R)},e.toChecksumAddress=function(R){R=e.stripHexPrefix(R).toLowerCase();for(var I=e.keccak(R).toString("hex"),O="0x",A=0;A<R.length;A++)parseInt(I[A],16)>=8?O+=R[A].toUpperCase():O+=R[A];return O},e.isValidChecksumAddress=function(R){return e.isValidAddress(R)&&e.toChecksumAddress(R)===R},e.generateAddress=function(R,I){return R=e.toBuffer(R),I=(I=new v(I)).isZero()?null:x.from(I.toArray()),e.rlphash([R,I]).slice(-20)},e.isPrecompiled=function(R){var I=e.unpad(R);return I.length===1&&I[0]>=1&&I[0]<=8},e.addHexPrefix=function(R){return typeof R!="string"||e.isHexPrefixed(R)?R:"0x"+R},e.isValidSignature=function(R,I,O,A){var P=new v("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),N=new v("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return I.length===32&&O.length===32&&(R===27||R===28)&&(I=new v(I),O=new v(O),!(I.isZero()||I.gt(N)||O.isZero()||O.gt(N))&&(A!==!1||new v(O).cmp(P)!==1))},e.baToJSON=function(R){if(x.isBuffer(R))return"0x"+R.toString("hex");if(R instanceof Array){for(var I=[],O=0;O<R.length;O++)I.push(e.baToJSON(R[O]));return I}},e.defineProperties=function(R,I,O){if(R.raw=[],R._fields=[],R.toJSON=function(P){if(P){var N={};return R._fields.forEach(function(L){N[L]="0x"+R[L].toString("hex")}),N}return e.baToJSON(this.raw)},R.serialize=function(){return b.encode(R.raw)},I.forEach(function(P,N){function L(){return R.raw[N]}function H(J){(J=e.toBuffer(J)).toString("hex")!=="00"||P.allowZero||(J=x.allocUnsafe(0)),P.allowLess&&P.length?(J=e.stripZeros(J),d(P.length>=J.length,"The field "+P.name+" must not have more "+P.length+" bytes")):P.allowZero&&J.length===0||!P.length||d(P.length===J.length,"The field "+P.name+" must have byte length of "+P.length),R.raw[N]=J}R._fields.push(P.name),Object.defineProperty(R,P.name,{enumerable:!0,configurable:!0,get:L,set:H}),P.default&&(R[P.name]=P.default),P.alias&&Object.defineProperty(R,P.alias,{enumerable:!1,configurable:!0,set:H,get:L})}),O)if(typeof O=="string"&&(O=x.from(e.stripHexPrefix(O),"hex")),x.isBuffer(O)&&(O=b.decode(O)),Array.isArray(O)){if(O.length>R._fields.length)throw new Error("wrong number of fields in data");O.forEach(function(P,N){R[R._fields[N]]=e.toBuffer(P)})}else{if((O===void 0?"undefined":n(O))!=="object")throw new Error("invalid data");var A=Object.keys(O);I.forEach(function(P){A.indexOf(P.name)!==-1&&(R[P.name]=O[P.name]),A.indexOf(P.alias)!==-1&&(R[P.alias]=O[P.alias])})}}},function(i,e,o){var n=o(15),f=o(22);function p(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=p,p.prototype.update=function(u,c){if(u=n.toArray(u,c),this.pending?this.pending=this.pending.concat(u):this.pending=u,this.pendingTotal+=u.length,this.pending.length>=this._delta8){var s=(u=this.pending).length%this._delta8;this.pending=u.slice(u.length-s,u.length),this.pending.length===0&&(this.pending=null),u=n.join32(u,0,u.length-s,this.endian);for(var l=0;l<u.length;l+=this._delta32)this._update(u,l,l+this._delta32)}return this},p.prototype.digest=function(u){return this.update(this._pad()),f(this.pending===null),this._digest(u)},p.prototype._pad=function(){var u=this.pendingTotal,c=this._delta8,s=c-(u+this.padLength)%c,l=new Array(s+this.padLength);l[0]=128;for(var d=1;d<s;d++)l[d]=0;if(u<<=3,this.endian==="big"){for(var b=8;b<this.padLength;b++)l[d++]=0;l[d++]=0,l[d++]=0,l[d++]=0,l[d++]=0,l[d++]=u>>>24&255,l[d++]=u>>>16&255,l[d++]=u>>>8&255,l[d++]=255&u}else for(l[d++]=255&u,l[d++]=u>>>8&255,l[d++]=u>>>16&255,l[d++]=u>>>24&255,l[d++]=0,l[d++]=0,l[d++]=0,l[d++]=0,b=8;b<this.padLength;b++)l[d++]=0;return l}},function(i,e){i.exports=function(){}},function(i,e){function o(u){return u.sort((c,s)=>c==="latest"||s==="earliest"?1:s==="latest"||c==="earliest"?-1:n(c)-n(s))}function n(u){return u==null?u:Number.parseInt(u,16)}function f(u){if(u==null)return u;let c=u.toString(16);return c.length%2&&(c="0"+c),"0x"+c}function p(){return Math.floor(16*Math.random()).toString(16)}i.exports={minBlockRef:function(...u){return o(u)[0]},maxBlockRef:function(...u){const c=o(u);return c[c.length-1]},sortBlockRefs:o,bnToHex:function(u){return"0x"+u.toString(16)},blockRefIsNumber:function(u){return u&&!["earliest","latest","pending"].includes(u)},hexToInt:n,incrementHexInt:function(u){return u==null?u:f(n(u)+1)},intToHex:f,unsafeRandomBytes:function(u){let c="0x";for(let s=0;s<u;s++)c+=p(),c+=p();return c}}},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.baToJSON=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.stripZeros=e.unpad=e.setLengthRight=e.setLength=e.setLengthLeft=e.zeros=void 0;var f=o(32),p=o(9);e.zeros=function(u){return n.allocUnsafe(u).fill(0)},e.setLengthLeft=function(u,c,s){s===void 0&&(s=!1);var l=e.zeros(c);return u=e.toBuffer(u),s?u.length<c?(u.copy(l),l):u.slice(0,c):u.length<c?(u.copy(l,c-u.length),l):u.slice(-c)},e.setLength=e.setLengthLeft,e.setLengthRight=function(u,c){return e.setLength(u,c,!0)},e.unpad=function(u){for(var c=(u=f.stripHexPrefix(u))[0];u.length>0&&c.toString()==="0";)c=(u=u.slice(1))[0];return u},e.stripZeros=e.unpad,e.toBuffer=function(u){if(!n.isBuffer(u))if(Array.isArray(u))u=n.from(u);else if(typeof u=="string"){if(!f.isHexString(u))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+u);u=n.from(f.padToEven(f.stripHexPrefix(u)),"hex")}else if(typeof u=="number")u=f.intToBuffer(u);else if(u==null)u=n.allocUnsafe(0);else if(p.isBN(u))u=u.toArrayLike(n);else{if(!u.toArray)throw new Error("invalid type");u=n.from(u.toArray())}return u},e.bufferToInt=function(u){return new p(e.toBuffer(u)).toNumber()},e.bufferToHex=function(u){return"0x"+(u=e.toBuffer(u)).toString("hex")},e.fromSigned=function(u){return new p(u).fromTwos(256)},e.toUnsigned=function(u){return n.from(u.toTwos(256).toArray())},e.addHexPrefix=function(u){return typeof u!="string"||f.isHexPrefixed(u)?u:"0x"+u},e.baToJSON=function(u){if(n.isBuffer(u))return"0x"+u.toString("hex");if(u instanceof Array){for(var c=[],s=0;s<u.length;s++)c.push(e.baToJSON(u[s]));return c}}}).call(this,o(2).Buffer)},function(i,e,o){o.d(e,"a",function(){return n});class n{}},function(i,e,o){var n=o(93);o.o(n,"isConstantTime")&&o.d(e,"isConstantTime",function(){return n.isConstantTime}),o(94);var f=o(95);o.o(f,"isConstantTime")&&o.d(e,"isConstantTime",function(){return f.isConstantTime});var p=o(96);o.d(e,"isConstantTime",function(){return p.a})},function(i,e,o){(function(n){n===void 0||!n.version||n.version.indexOf("v0.")===0||n.version.indexOf("v1.")===0&&n.version.indexOf("v1.8.")!==0?i.exports={nextTick:function(f,p,u,c){if(typeof f!="function")throw new TypeError('"callback" argument must be a function');var s,l,d=arguments.length;switch(d){case 0:case 1:return n.nextTick(f);case 2:return n.nextTick(function(){f.call(null,p)});case 3:return n.nextTick(function(){f.call(null,p,u)});case 4:return n.nextTick(function(){f.call(null,p,u,c)});default:for(s=new Array(d-1),l=0;l<s.length;)s[l++]=arguments[l];return n.nextTick(function(){f.apply(null,s)})}}}:i.exports=n}).call(this,o(5))},function(i,e){i.exports=function(){for(var n={},f=0;f<arguments.length;f++){var p=arguments[f];for(var u in p)o.call(p,u)&&(n[u]=p[u])}return n};var o=Object.prototype.hasOwnProperty},function(i,e,o){var n=o(16),f=o(11),p=f.getNAF,u=f.getJSF,c=f.assert;function s(d,b){this.type=d,this.p=new n(b.p,16),this.red=b.prime?n.red(b.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=b.n&&new n(b.n,16),this.g=b.g&&this.pointFromJSON(b.g,b.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var v=this.n&&this.p.div(this.n);!v||v.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(d,b){this.curve=d,this.type=b,this.precomputed=null}i.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(d,b){c(d.precomputed);var v=d._getDoubles(),y=p(b,1,this._bitLength),x=(1<<v.step+1)-(v.step%2==0?2:1);x/=3;var E,R,I=[];for(E=0;E<y.length;E+=v.step){R=0;for(var O=E+v.step-1;O>=E;O--)R=(R<<1)+y[O];I.push(R)}for(var A=this.jpoint(null,null,null),P=this.jpoint(null,null,null),N=x;N>0;N--){for(E=0;E<I.length;E++)(R=I[E])===N?P=P.mixedAdd(v.points[E]):R===-N&&(P=P.mixedAdd(v.points[E].neg()));A=A.add(P)}return A.toP()},s.prototype._wnafMul=function(d,b){var v=4,y=d._getNAFPoints(v);v=y.wnd;for(var x=y.points,E=p(b,v,this._bitLength),R=this.jpoint(null,null,null),I=E.length-1;I>=0;I--){for(var O=0;I>=0&&E[I]===0;I--)O++;if(I>=0&&O++,R=R.dblp(O),I<0)break;var A=E[I];c(A!==0),R=d.type==="affine"?A>0?R.mixedAdd(x[A-1>>1]):R.mixedAdd(x[-A-1>>1].neg()):A>0?R.add(x[A-1>>1]):R.add(x[-A-1>>1].neg())}return d.type==="affine"?R.toP():R},s.prototype._wnafMulAdd=function(d,b,v,y,x){var E,R,I,O=this._wnafT1,A=this._wnafT2,P=this._wnafT3,N=0;for(E=0;E<y;E++){var L=(I=b[E])._getNAFPoints(d);O[E]=L.wnd,A[E]=L.points}for(E=y-1;E>=1;E-=2){var H=E-1,J=E;if(O[H]===1&&O[J]===1){var G=[b[H],null,null,b[J]];b[H].y.cmp(b[J].y)===0?(G[1]=b[H].add(b[J]),G[2]=b[H].toJ().mixedAdd(b[J].neg())):b[H].y.cmp(b[J].y.redNeg())===0?(G[1]=b[H].toJ().mixedAdd(b[J]),G[2]=b[H].add(b[J].neg())):(G[1]=b[H].toJ().mixedAdd(b[J]),G[2]=b[H].toJ().mixedAdd(b[J].neg()));var z=[-3,-1,-5,-7,0,7,5,1,3],S=u(v[H],v[J]);for(N=Math.max(S[0].length,N),P[H]=new Array(N),P[J]=new Array(N),R=0;R<N;R++){var a=0|S[0][R],w=0|S[1][R];P[H][R]=z[3*(a+1)+(w+1)],P[J][R]=0,A[H]=G}}else P[H]=p(v[H],O[H],this._bitLength),P[J]=p(v[J],O[J],this._bitLength),N=Math.max(P[H].length,N),N=Math.max(P[J].length,N)}var h=this.jpoint(null,null,null),m=this._wnafT4;for(E=N;E>=0;E--){for(var g=0;E>=0;){var _=!0;for(R=0;R<y;R++)m[R]=0|P[R][E],m[R]!==0&&(_=!1);if(!_)break;g++,E--}if(E>=0&&g++,h=h.dblp(g),E<0)break;for(R=0;R<y;R++){var T=m[R];T!==0&&(T>0?I=A[R][T-1>>1]:T<0&&(I=A[R][-T-1>>1].neg()),h=I.type==="affine"?h.mixedAdd(I):h.add(I))}}for(E=0;E<y;E++)A[E]=null;return x?h:h.toP()},s.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(d,b){d=f.toArray(d,b);var v=this.p.byteLength();if((d[0]===4||d[0]===6||d[0]===7)&&d.length-1==2*v)return d[0]===6?c(d[d.length-1]%2==0):d[0]===7&&c(d[d.length-1]%2==1),this.point(d.slice(1,1+v),d.slice(1+v,1+2*v));if((d[0]===2||d[0]===3)&&d.length-1===v)return this.pointFromX(d.slice(1,1+v),d[0]===3);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(d){return this.encode(d,!0)},l.prototype._encode=function(d){var b=this.curve.p.byteLength(),v=this.getX().toArray("be",b);return d?[this.getY().isEven()?2:3].concat(v):[4].concat(v,this.getY().toArray("be",b))},l.prototype.encode=function(d,b){return f.encode(this._encode(b),d)},l.prototype.precompute=function(d){if(this.precomputed)return this;var b={doubles:null,naf:null,beta:null};return b.naf=this._getNAFPoints(8),b.doubles=this._getDoubles(4,d),b.beta=this._getBeta(),this.precomputed=b,this},l.prototype._hasDoubles=function(d){if(!this.precomputed)return!1;var b=this.precomputed.doubles;return!!b&&b.points.length>=Math.ceil((d.bitLength()+1)/b.step)},l.prototype._getDoubles=function(d,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var v=[this],y=this,x=0;x<b;x+=d){for(var E=0;E<d;E++)y=y.dbl();v.push(y)}return{step:d,points:v}},l.prototype._getNAFPoints=function(d){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var b=[this],v=(1<<d)-1,y=v===1?null:this.dbl(),x=1;x<v;x++)b[x]=b[x-1].add(y);return{wnd:d,points:b}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(d){for(var b=this,v=0;v<d;v++)b=b.dbl();return b}},function(i,e,o){(function(n){var f=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0}),e.getLength=e.decode=e.encode=void 0;var p=f(o(269));function u(b,v){if(b[0]==="0"&&b[1]==="0")throw new Error("invalid RLP: extra zeros");return parseInt(b,v)}function c(b,v){if(b<56)return n.from([b+v]);var y=l(b),x=l(v+55+y.length/2);return n.from(x+y,"hex")}function s(b){return b.slice(0,2)==="0x"}function l(b){if(b<0)throw new Error("Invalid integer as argument, must be unsigned!");var v=b.toString(16);return v.length%2?"0"+v:v}function d(b){if(!n.isBuffer(b)){if(typeof b=="string")return s(b)?n.from((y=typeof(x=b)!="string"?x:s(x)?x.slice(2):x).length%2?"0"+y:y,"hex"):n.from(b);if(typeof b=="number"||typeof b=="bigint")return b?(v=l(b),n.from(v,"hex")):n.from([]);if(b==null)return n.from([]);if(b instanceof Uint8Array)return n.from(b);if(p.default.isBN(b))return n.from(b.toArray());throw new Error("invalid type")}var v,y,x;return b}e.encode=function b(v){if(Array.isArray(v)){for(var y=[],x=0;x<v.length;x++)y.push(b(v[x]));var E=n.concat(y);return n.concat([c(E.length,192),E])}var R=d(v);return R.length===1&&R[0]<128?R:n.concat([c(R.length,128),R])},e.decode=function(b,v){if(v===void 0&&(v=!1),!b||b.length===0)return n.from([]);var y=function x(E){var R,I,O,A,P,N=[],L=E[0];if(L<=127)return{data:E.slice(0,1),remainder:E.slice(1)};if(L<=183){if(R=L-127,O=L===128?n.from([]):E.slice(1,R),R===2&&O[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:O,remainder:E.slice(R)}}if(L<=191){if(I=L-182,E.length-1<I)throw new Error("invalid RLP: not enough bytes for string length");if((R=u(E.slice(1,I).toString("hex"),16))<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if((O=E.slice(I,R+I)).length<R)throw new Error("invalid RLP: not enough bytes for string");return{data:O,remainder:E.slice(R+I)}}if(L<=247){for(R=L-191,A=E.slice(1,R);A.length;)P=x(A),N.push(P.data),A=P.remainder;return{data:N,remainder:E.slice(R)}}I=L-246,R=u(E.slice(1,I).toString("hex"),16);var H=I+R;if(H>E.length)throw new Error("invalid rlp: total length is larger than the data");if((A=E.slice(I,H)).length===0)throw new Error("invalid rlp, List has a invalid length");for(;A.length;)P=x(A),N.push(P.data),A=P.remainder;return{data:N,remainder:E.slice(H)}}(d(b));if(v)return y;if(y.remainder.length!==0)throw new Error("invalid remainder");return y.data},e.getLength=function(b){if(!b||b.length===0)return n.from([]);var v=d(b),y=v[0];if(y<=127)return v.length;if(y<=183)return y-127;if(y<=191)return y-182;if(y<=247)return y-191;var x=y-246;return x+u(v.slice(1,x).toString("hex"),16)}}).call(this,o(2).Buffer)},function(i,e,o){var n=o(300),f=o(144);i.exports=function(p){return p!=null&&f(p.length)&&!n(p)}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n,f){f|=0;for(var p=Math.max(n.length-f,0),u=Array(p),c=0;c<p;c++)u[c]=n[f+c];return u},i.exports=e.default},function(i,e,o){const n=o(67);function f(){}i.exports=f,f.prototype.setEngine=function(p){const u=this;u.engine||(u.engine=p,p.on("block",function(c){u.currentBlock=c}),p.on("start",function(){u.start()}),p.on("stop",function(){u.stop()}))},f.prototype.handleRequest=function(p,u,c){throw new Error("Subproviders should override `handleRequest`.")},f.prototype.emitPayload=function(p,u){this.engine.sendAsync(n(p),u)},f.prototype.stop=function(){},f.prototype.start=function(){}},function(i,e){var o={}.toString;i.exports=Array.isArray||function(n){return o.call(n)=="[object Array]"}},function(i,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(o){return o&&o.bit!==void 0&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return function(f){if(typeof f!="string")throw new Error("Param is not a string");switch(f.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+f)}}(o)}catch{return n}}},function(i,e,o){var n=o(2),f=n.Buffer;function p(c,s){for(var l in c)s[l]=c[l]}function u(c,s,l){return f(c,s,l)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?i.exports=n:(p(n,e),e.Buffer=u),p(f,u),u.from=function(c,s,l){if(typeof c=="number")throw new TypeError("Argument must not be a number");return f(c,s,l)},u.alloc=function(c,s,l){if(typeof c!="number")throw new TypeError("Argument must be a number");var d=f(c);return s!==void 0?typeof l=="string"?d.fill(s,l):d.fill(s):d.fill(0),d},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return f(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}},function(i,e,o){(function(n,f,p){var u=o(43);function c(z){var S=this;this.next=null,this.entry=null,this.finish=function(){(function(a,w,h){var m=a.entry;for(a.entry=null;m;){var g=m.callback;w.pendingcb--,g(h),m=m.next}w.corkedRequestsFree?w.corkedRequestsFree.next=a:w.corkedRequestsFree=a})(S,z)}}i.exports=A;var s,l=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?f:u.nextTick;A.WritableState=O;var d=Object.create(o(35));d.inherits=o(3);var b={deprecate:o(54)},v=o(106),y=o(52).Buffer,x=p.Uint8Array||function(){},E,R=o(107);function I(){}function O(z,S){s=s||o(19),z=z||{};var a=S instanceof s;this.objectMode=!!z.objectMode,a&&(this.objectMode=this.objectMode||!!z.writableObjectMode);var w=z.highWaterMark,h=z.writableHighWaterMark,m=this.objectMode?16:16384;this.highWaterMark=w||w===0?w:a&&(h||h===0)?h:m,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var g=z.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_){(function(T,k){var M=T._writableState,B=M.sync,Y=M.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(M),k)(function(K,W,U,q,j){--W.pendingcb,U?(u.nextTick(j,q),u.nextTick(G,K,W),K._writableState.errorEmitted=!0,K.emit("error",q)):(j(q),K._writableState.errorEmitted=!0,K.emit("error",q),G(K,W))})(T,M,B,k,Y);else{var C=H(M);C||M.corked||M.bufferProcessing||!M.bufferedRequest||L(T,M),B?l(N,T,M,C,Y):N(T,M,C,Y)}})(S,_)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function A(z){if(s=s||o(19),!(E.call(A,this)||this instanceof s))return new A(z);this._writableState=new O(z,this),this.writable=!0,z&&(typeof z.write=="function"&&(this._write=z.write),typeof z.writev=="function"&&(this._writev=z.writev),typeof z.destroy=="function"&&(this._destroy=z.destroy),typeof z.final=="function"&&(this._final=z.final)),v.call(this)}function P(z,S,a,w,h,m,g){S.writelen=w,S.writecb=g,S.writing=!0,S.sync=!0,a?z._writev(h,S.onwrite):z._write(h,m,S.onwrite),S.sync=!1}function N(z,S,a,w){a||function(h,m){m.length===0&&m.needDrain&&(m.needDrain=!1,h.emit("drain"))}(z,S),S.pendingcb--,w(),G(z,S)}function L(z,S){S.bufferProcessing=!0;var a=S.bufferedRequest;if(z._writev&&a&&a.next){var w=S.bufferedRequestCount,h=new Array(w),m=S.corkedRequestsFree;m.entry=a;for(var g=0,_=!0;a;)h[g]=a,a.isBuf||(_=!1),a=a.next,g+=1;h.allBuffers=_,P(z,S,!0,S.length,h,"",m.finish),S.pendingcb++,S.lastBufferedRequest=null,m.next?(S.corkedRequestsFree=m.next,m.next=null):S.corkedRequestsFree=new c(S),S.bufferedRequestCount=0}else{for(;a;){var T=a.chunk,k=a.encoding,M=a.callback;if(P(z,S,!1,S.objectMode?1:T.length,T,k,M),a=a.next,S.bufferedRequestCount--,S.writing)break}a===null&&(S.lastBufferedRequest=null)}S.bufferedRequest=a,S.bufferProcessing=!1}function H(z){return z.ending&&z.length===0&&z.bufferedRequest===null&&!z.finished&&!z.writing}function J(z,S){z._final(function(a){S.pendingcb--,a&&z.emit("error",a),S.prefinished=!0,z.emit("prefinish"),G(z,S)})}function G(z,S){var a=H(S);return a&&(function(w,h){h.prefinished||h.finalCalled||(typeof w._final=="function"?(h.pendingcb++,h.finalCalled=!0,u.nextTick(J,w,h)):(h.prefinished=!0,w.emit("prefinish")))}(z,S),S.pendingcb===0&&(S.finished=!0,z.emit("finish"))),a}d.inherits(A,v),O.prototype.getBuffer=function(){for(var z=this.bufferedRequest,S=[];z;)S.push(z),z=z.next;return S},function(){try{Object.defineProperty(O.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(E=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(z){return!!E.call(this,z)||this===A&&z&&z._writableState instanceof O}})):E=function(z){return z instanceof this},A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},A.prototype.write=function(z,S,a){var w,h=this._writableState,m=!1,g=!h.objectMode&&(w=z,y.isBuffer(w)||w instanceof x);return g&&!y.isBuffer(z)&&(z=function(_){return y.from(_)}(z)),typeof S=="function"&&(a=S,S=null),g?S="buffer":S||(S=h.defaultEncoding),typeof a!="function"&&(a=I),h.ended?function(_,T){var k=new Error("write after end");_.emit("error",k),u.nextTick(T,k)}(this,a):(g||function(_,T,k,M){var B=!0,Y=!1;return k===null?Y=new TypeError("May not write null values to stream"):typeof k=="string"||k===void 0||T.objectMode||(Y=new TypeError("Invalid non-string/buffer chunk")),Y&&(_.emit("error",Y),u.nextTick(M,Y),B=!1),B}(this,h,z,a))&&(h.pendingcb++,m=function(_,T,k,M,B,Y){if(!k){var C=function(q,j,D){return q.objectMode||q.decodeStrings===!1||typeof j!="string"||(j=y.from(j,D)),j}(T,M,B);M!==C&&(k=!0,B="buffer",M=C)}var K=T.objectMode?1:M.length;T.length+=K;var W=T.length<T.highWaterMark;if(W||(T.needDrain=!0),T.writing||T.corked){var U=T.lastBufferedRequest;T.lastBufferedRequest={chunk:M,encoding:B,isBuf:k,callback:Y,next:null},U?U.next=T.lastBufferedRequest:T.bufferedRequest=T.lastBufferedRequest,T.bufferedRequestCount+=1}else P(_,T,!1,K,M,B,Y);return W}(this,h,g,z,S,a)),m},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var z=this._writableState;z.corked&&(z.corked--,z.writing||z.corked||z.finished||z.bufferProcessing||!z.bufferedRequest||L(this,z))},A.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(z,S,a){a(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(z,S,a){var w=this._writableState;typeof z=="function"?(a=z,z=null,S=null):typeof S=="function"&&(a=S,S=null),z!=null&&this.write(z,S),w.corked&&(w.corked=1,this.uncork()),w.ending||w.finished||function(h,m,g){m.ending=!0,G(h,m),g&&(m.finished?u.nextTick(g):h.once("finish",g)),m.ended=!0,h.writable=!1}(this,w,a)},Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),A.prototype.destroy=R.destroy,A.prototype._undestroy=R.undestroy,A.prototype._destroy=function(z,S){this.end(),S(z)}}).call(this,o(5),o(108).setImmediate,o(6))},function(i,e,o){(function(n){function f(p){try{if(!n.localStorage)return!1}catch{return!1}var u=n.localStorage[p];return u!=null&&String(u).toLowerCase()==="true"}i.exports=function(p,u){if(f("noDeprecation"))return p;var c=!1;return function(){if(!c){if(f("throwDeprecation"))throw new Error(u);f("traceDeprecation")?console.trace(u):console.warn(u),c=!0}return p.apply(this,arguments)}}}).call(this,o(6))},function(i,e,o){var n=o(213),f=o(214);function p(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=A,e.resolve=function(P,N){return A(P,!1,!0).resolve(N)},e.resolveObject=function(P,N){return P?A(P,!1,!0).resolveObject(N):N},e.format=function(P){return f.isString(P)&&(P=A(P)),P instanceof p?P.format():p.prototype.format.call(P)},e.Url=p;var u=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
`,"	"]),d=["'"].concat(l),b=["%","/","?",";","#"].concat(d),v=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=o(215);function A(P,N,L){if(P&&f.isObject(P)&&P instanceof p)return P;var H=new p;return H.parse(P,N,L),H}p.prototype.parse=function(P,N,L){if(!f.isString(P))throw new TypeError("Parameter 'url' must be a string, not "+typeof P);var H=P.indexOf("?"),J=H!==-1&&H<P.indexOf("#")?"?":"#",G=P.split(J);G[0]=G[0].replace(/\\/g,"/");var z=P=G.join(J);if(z=z.trim(),!L&&P.split("#").length===1){var S=s.exec(z);if(S)return this.path=z,this.href=z,this.pathname=S[1],S[2]?(this.search=S[2],this.query=N?O.parse(this.search.substr(1)):this.search.substr(1)):N&&(this.search="",this.query={}),this}var a=u.exec(z);if(a){var w=(a=a[0]).toLowerCase();this.protocol=w,z=z.substr(a.length)}if(L||a||z.match(/^\/\/[^@\/]+@[^@\/]+/)){var h=z.substr(0,2)==="//";!h||a&&R[a]||(z=z.substr(2),this.slashes=!0)}if(!R[a]&&(h||a&&!I[a])){for(var m,g,_=-1,T=0;T<v.length;T++)(k=z.indexOf(v[T]))!==-1&&(_===-1||k<_)&&(_=k);for((g=_===-1?z.lastIndexOf("@"):z.lastIndexOf("@",_))!==-1&&(m=z.slice(0,g),z=z.slice(g+1),this.auth=decodeURIComponent(m)),_=-1,T=0;T<b.length;T++){var k;(k=z.indexOf(b[T]))!==-1&&(_===-1||k<_)&&(_=k)}_===-1&&(_=z.length),this.host=z.slice(0,_),z=z.slice(_),this.parseHost(),this.hostname=this.hostname||"";var M=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!M)for(var B=this.hostname.split(/\./),Y=(T=0,B.length);T<Y;T++){var C=B[T];if(C&&!C.match(y)){for(var K="",W=0,U=C.length;W<U;W++)C.charCodeAt(W)>127?K+="x":K+=C[W];if(!K.match(y)){var q=B.slice(0,T),j=B.slice(T+1),D=C.match(x);D&&(q.push(D[1]),j.unshift(D[2])),j.length&&(z="/"+j.join(".")+z),this.hostname=q.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+F,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),z[0]!=="/"&&(z="/"+z))}if(!E[w])for(T=0,Y=d.length;T<Y;T++){var V=d[T];if(z.indexOf(V)!==-1){var Z=encodeURIComponent(V);Z===V&&(Z=escape(V)),z=z.split(V).join(Z)}}var ee=z.indexOf("#");ee!==-1&&(this.hash=z.substr(ee),z=z.slice(0,ee));var re=z.indexOf("?");if(re!==-1?(this.search=z.substr(re),this.query=z.substr(re+1),N&&(this.query=O.parse(this.query)),z=z.slice(0,re)):N&&(this.search="",this.query={}),z&&(this.pathname=z),I[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var ue=this.search||"";this.path=F+ue}return this.href=this.format(),this},p.prototype.format=function(){var P=this.auth||"";P&&(P=(P=encodeURIComponent(P)).replace(/%3A/i,":"),P+="@");var N=this.protocol||"",L=this.pathname||"",H=this.hash||"",J=!1,G="";this.host?J=P+this.host:this.hostname&&(J=P+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(J+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(G=O.stringify(this.query));var z=this.search||G&&"?"+G||"";return N&&N.substr(-1)!==":"&&(N+=":"),this.slashes||(!N||I[N])&&J!==!1?(J="//"+(J||""),L&&L.charAt(0)!=="/"&&(L="/"+L)):J||(J=""),H&&H.charAt(0)!=="#"&&(H="#"+H),z&&z.charAt(0)!=="?"&&(z="?"+z),N+J+(L=L.replace(/[?#]/g,function(S){return encodeURIComponent(S)}))+(z=z.replace("#","%23"))+H},p.prototype.resolve=function(P){return this.resolveObject(A(P,!1,!0)).format()},p.prototype.resolveObject=function(P){if(f.isString(P)){var N=new p;N.parse(P,!1,!0),P=N}for(var L=new p,H=Object.keys(this),J=0;J<H.length;J++){var G=H[J];L[G]=this[G]}if(L.hash=P.hash,P.href==="")return L.href=L.format(),L;if(P.slashes&&!P.protocol){for(var z=Object.keys(P),S=0;S<z.length;S++){var a=z[S];a!=="protocol"&&(L[a]=P[a])}return I[L.protocol]&&L.hostname&&!L.pathname&&(L.path=L.pathname="/"),L.href=L.format(),L}if(P.protocol&&P.protocol!==L.protocol){if(!I[P.protocol]){for(var w=Object.keys(P),h=0;h<w.length;h++){var m=w[h];L[m]=P[m]}return L.href=L.format(),L}if(L.protocol=P.protocol,P.host||R[P.protocol])L.pathname=P.pathname;else{for(var g=(P.pathname||"").split("/");g.length&&!(P.host=g.shift()););P.host||(P.host=""),P.hostname||(P.hostname=""),g[0]!==""&&g.unshift(""),g.length<2&&g.unshift(""),L.pathname=g.join("/")}if(L.search=P.search,L.query=P.query,L.host=P.host||"",L.auth=P.auth,L.hostname=P.hostname||P.host,L.port=P.port,L.pathname||L.search){var _=L.pathname||"",T=L.search||"";L.path=_+T}return L.slashes=L.slashes||P.slashes,L.href=L.format(),L}var k=L.pathname&&L.pathname.charAt(0)==="/",M=P.host||P.pathname&&P.pathname.charAt(0)==="/",B=M||k||L.host&&P.pathname,Y=B,C=L.pathname&&L.pathname.split("/")||[],K=(g=P.pathname&&P.pathname.split("/")||[],L.protocol&&!I[L.protocol]);if(K&&(L.hostname="",L.port=null,L.host&&(C[0]===""?C[0]=L.host:C.unshift(L.host)),L.host="",P.protocol&&(P.hostname=null,P.port=null,P.host&&(g[0]===""?g[0]=P.host:g.unshift(P.host)),P.host=null),B=B&&(g[0]===""||C[0]==="")),M)L.host=P.host||P.host===""?P.host:L.host,L.hostname=P.hostname||P.hostname===""?P.hostname:L.hostname,L.search=P.search,L.query=P.query,C=g;else if(g.length)C||(C=[]),C.pop(),C=C.concat(g),L.search=P.search,L.query=P.query;else if(!f.isNullOrUndefined(P.search))return K&&(L.hostname=L.host=C.shift(),(D=!!(L.host&&L.host.indexOf("@")>0)&&L.host.split("@"))&&(L.auth=D.shift(),L.host=L.hostname=D.shift())),L.search=P.search,L.query=P.query,f.isNull(L.pathname)&&f.isNull(L.search)||(L.path=(L.pathname?L.pathname:"")+(L.search?L.search:"")),L.href=L.format(),L;if(!C.length)return L.pathname=null,L.search?L.path="/"+L.search:L.path=null,L.href=L.format(),L;for(var W=C.slice(-1)[0],U=(L.host||P.host||C.length>1)&&(W==="."||W==="..")||W==="",q=0,j=C.length;j>=0;j--)(W=C[j])==="."?C.splice(j,1):W===".."?(C.splice(j,1),q++):q&&(C.splice(j,1),q--);if(!B&&!Y)for(;q--;q)C.unshift("..");!B||C[0]===""||C[0]&&C[0].charAt(0)==="/"||C.unshift(""),U&&C.join("/").substr(-1)!=="/"&&C.push("");var D,F=C[0]===""||C[0]&&C[0].charAt(0)==="/";return K&&(L.hostname=L.host=F?"":C.length?C.shift():"",(D=!!(L.host&&L.host.indexOf("@")>0)&&L.host.split("@"))&&(L.auth=D.shift(),L.host=L.hostname=D.shift())),(B=B||L.host&&C.length)&&!F&&C.unshift(""),C.length?L.pathname=C.join("/"):(L.pathname=null,L.path=null),f.isNull(L.pathname)&&f.isNull(L.search)||(L.path=(L.pathname?L.pathname:"")+(L.search?L.search:"")),L.auth=P.auth||L.auth,L.slashes=L.slashes||P.slashes,L.href=L.format(),L},p.prototype.parseHost=function(){var P=this.host,N=c.exec(P);N&&((N=N[0])!==":"&&(this.port=N.substr(1)),P=P.substr(0,P.length-N.length)),P&&(this.hostname=P)}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function f(){this.listeners={}}return f.prototype.addEventListener=function(p,u){p=p.toLowerCase(),this.listeners[p]=this.listeners[p]||[],this.listeners[p].push(u.handleEvent||u)},f.prototype.removeEventListener=function(p,u){if(p=p.toLowerCase(),this.listeners[p]){var c=this.listeners[p].indexOf(u.handleEvent||u);c<0||this.listeners[p].splice(c,1)}},f.prototype.dispatchEvent=function(p){var u=p.type.toLowerCase();if(p.target=this,this.listeners[u])for(var c=0,s=this.listeners[u];c<s.length;c++)s[c].call(this,p);var l=this["on"+u];return l&&l.call(this,p),!0},f}();e.XMLHttpRequestEventTarget=n},function(i,e,o){var n=o(27).codes.ERR_STREAM_PREMATURE_CLOSE;function f(){}i.exports=function p(u,c,s){if(typeof c=="function")return p(u,null,c);c||(c={}),s=function(A){var P=!1;return function(){if(!P){P=!0;for(var N=arguments.length,L=new Array(N),H=0;H<N;H++)L[H]=arguments[H];A.apply(this,L)}}}(s||f);var l=c.readable||c.readable!==!1&&u.readable,d=c.writable||c.writable!==!1&&u.writable,b=function(){u.writable||y()},v=u._writableState&&u._writableState.finished,y=function(){d=!1,v=!0,l||s.call(u)},x=u._readableState&&u._readableState.endEmitted,E=function(){l=!1,x=!0,d||s.call(u)},R=function(A){s.call(u,A)},I=function(){var A;return l&&!x?(u._readableState&&u._readableState.ended||(A=new n),s.call(u,A)):d&&!v?(u._writableState&&u._writableState.ended||(A=new n),s.call(u,A)):void 0},O=function(){u.req.on("finish",y)};return function(A){return A.setHeader&&typeof A.abort=="function"}(u)?(u.on("complete",y),u.on("abort",I),u.req?O():u.on("request",O)):d&&!u._writableState&&(u.on("end",b),u.on("close",b)),u.on("end",E),u.on("finish",y),c.error!==!1&&u.on("error",R),u.on("close",I),function(){u.removeListener("complete",y),u.removeListener("abort",I),u.removeListener("request",O),u.req&&u.req.removeListener("finish",y),u.removeListener("end",b),u.removeListener("close",b),u.removeListener("finish",y),u.removeListener("end",E),u.removeListener("error",R),u.removeListener("close",I)}}},function(i,e,o){var n=e;n.version=o(244).version,n.utils=o(11),n.rand=o(121),n.curve=o(122),n.curves=o(59),n.ec=o(257),n.eddsa=o(261)},function(i,e,o){var n,f=e,p=o(60),u=o(122),c=o(11).assert;function s(d){d.type==="short"?this.curve=new u.short(d):d.type==="edwards"?this.curve=new u.edwards(d):this.curve=new u.mont(d),this.g=this.curve.g,this.n=this.curve.n,this.hash=d.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(d,b){Object.defineProperty(f,d,{configurable:!0,enumerable:!0,get:function(){var v=new s(b);return Object.defineProperty(f,d,{configurable:!0,enumerable:!0,value:v}),v}})}f.PresetCurve=s,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:p.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:p.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:p.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:p.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:p.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:p.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:p.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=o(256)}catch{n=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:p.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(i,e,o){var n=e;n.utils=o(15),n.common=o(37),n.sha=o(250),n.ripemd=o(254),n.hmac=o(255),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(i,e,o){(function(n){var f=o(268);/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */function p(G,z){if(G===z)return 0;for(var S=G.length,a=z.length,w=0,h=Math.min(S,a);w<h;++w)if(G[w]!==z[w]){S=G[w],a=z[w];break}return S<a?-1:a<S?1:0}function u(G){return n.Buffer&&typeof n.Buffer.isBuffer=="function"?n.Buffer.isBuffer(G):!(G==null||!G._isBuffer)}var c=o(21),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,d=function(){}.name==="foo";function b(G){return Object.prototype.toString.call(G)}function v(G){return!u(G)&&typeof n.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(G):!!G&&(G instanceof DataView||!!(G.buffer&&G.buffer instanceof ArrayBuffer)))}var y=i.exports=A,x=/\s*function\s+([^\(\s]*)\s*/;function E(G){if(c.isFunction(G)){if(d)return G.name;var z=G.toString().match(x);return z&&z[1]}}function R(G,z){return typeof G=="string"?G.length<z?G:G.slice(0,z):G}function I(G){if(d||!c.isFunction(G))return c.inspect(G);var z=E(G);return"[Function"+(z?": "+z:"")+"]"}function O(G,z,S,a,w){throw new y.AssertionError({message:S,actual:G,expected:z,operator:a,stackStartFunction:w})}function A(G,z){G||O(G,!0,z,"==",y.ok)}function P(G,z,S,a){if(G===z)return!0;if(u(G)&&u(z))return p(G,z)===0;if(c.isDate(G)&&c.isDate(z))return G.getTime()===z.getTime();if(c.isRegExp(G)&&c.isRegExp(z))return G.source===z.source&&G.global===z.global&&G.multiline===z.multiline&&G.lastIndex===z.lastIndex&&G.ignoreCase===z.ignoreCase;if(G!==null&&typeof G=="object"||z!==null&&typeof z=="object"){if(v(G)&&v(z)&&b(G)===b(z)&&!(G instanceof Float32Array||G instanceof Float64Array))return p(new Uint8Array(G.buffer),new Uint8Array(z.buffer))===0;if(u(G)!==u(z))return!1;var w=(a=a||{actual:[],expected:[]}).actual.indexOf(G);return w!==-1&&w===a.expected.indexOf(z)||(a.actual.push(G),a.expected.push(z),function(h,m,g,_){if(h==null||m==null)return!1;if(c.isPrimitive(h)||c.isPrimitive(m))return h===m;if(g&&Object.getPrototypeOf(h)!==Object.getPrototypeOf(m))return!1;var T=N(h),k=N(m);if(T&&!k||!T&&k)return!1;if(T)return h=l.call(h),m=l.call(m),P(h,m,g);var M,B,Y=J(h),C=J(m);if(Y.length!==C.length)return!1;for(Y.sort(),C.sort(),B=Y.length-1;B>=0;B--)if(Y[B]!==C[B])return!1;for(B=Y.length-1;B>=0;B--)if(M=Y[B],!P(h[M],m[M],g,_))return!1;return!0}(G,z,S,a))}return S?G===z:G==z}function N(G){return Object.prototype.toString.call(G)=="[object Arguments]"}function L(G,z){if(!G||!z)return!1;if(Object.prototype.toString.call(z)=="[object RegExp]")return z.test(G);try{if(G instanceof z)return!0}catch{}return!Error.isPrototypeOf(z)&&z.call({},G)===!0}function H(G,z,S,a){var w;if(typeof z!="function")throw new TypeError('"block" argument must be a function');typeof S=="string"&&(a=S,S=null),w=function(g){var _;try{g()}catch(T){_=T}return _}(z),a=(S&&S.name?" ("+S.name+").":".")+(a?" "+a:"."),G&&!w&&O(w,S,"Missing expected exception"+a);var h=typeof a=="string",m=!G&&w&&!S;if((!G&&c.isError(w)&&h&&L(w,S)||m)&&O(w,S,"Got unwanted exception"+a),G&&w&&S&&!L(w,S)||!G&&w)throw w}y.AssertionError=function(G){this.name="AssertionError",this.actual=G.actual,this.expected=G.expected,this.operator=G.operator,G.message?(this.message=G.message,this.generatedMessage=!1):(this.message=function(g){return R(I(g.actual),128)+" "+g.operator+" "+R(I(g.expected),128)}(this),this.generatedMessage=!0);var z=G.stackStartFunction||O;if(Error.captureStackTrace)Error.captureStackTrace(this,z);else{var S=new Error;if(S.stack){var a=S.stack,w=E(z),h=a.indexOf(`
`+w);if(h>=0){var m=a.indexOf(`
`,h+1);a=a.substring(m+1)}this.stack=a}}},c.inherits(y.AssertionError,Error),y.fail=O,y.ok=A,y.equal=function(G,z,S){G!=z&&O(G,z,S,"==",y.equal)},y.notEqual=function(G,z,S){G==z&&O(G,z,S,"!=",y.notEqual)},y.deepEqual=function(G,z,S){P(G,z,!1)||O(G,z,S,"deepEqual",y.deepEqual)},y.deepStrictEqual=function(G,z,S){P(G,z,!0)||O(G,z,S,"deepStrictEqual",y.deepStrictEqual)},y.notDeepEqual=function(G,z,S){P(G,z,!1)&&O(G,z,S,"notDeepEqual",y.notDeepEqual)},y.notDeepStrictEqual=function G(z,S,a){P(z,S,!0)&&O(z,S,a,"notDeepStrictEqual",G)},y.strictEqual=function(G,z,S){G!==z&&O(G,z,S,"===",y.strictEqual)},y.notStrictEqual=function(G,z,S){G===z&&O(G,z,S,"!==",y.notStrictEqual)},y.throws=function(G,z,S){H(!0,G,z,S)},y.doesNotThrow=function(G,z,S){H(!1,G,z,S)},y.ifError=function(G){if(G)throw G},y.strict=f(function G(z,S){z||O(z,!0,S,"==",G)},y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict;var J=Object.keys||function(G){var z=[];for(var S in G)s.call(G,S)&&z.push(S);return z}}).call(this,o(6))},function(i,e,o){var n=o(29).codes.ERR_STREAM_PREMATURE_CLOSE;function f(){}i.exports=function p(u,c,s){if(typeof c=="function")return p(u,null,c);c||(c={}),s=function(A){var P=!1;return function(){if(!P){P=!0;for(var N=arguments.length,L=new Array(N),H=0;H<N;H++)L[H]=arguments[H];A.apply(this,L)}}}(s||f);var l=c.readable||c.readable!==!1&&u.readable,d=c.writable||c.writable!==!1&&u.writable,b=function(){u.writable||y()},v=u._writableState&&u._writableState.finished,y=function(){d=!1,v=!0,l||s.call(u)},x=u._readableState&&u._readableState.endEmitted,E=function(){l=!1,x=!0,d||s.call(u)},R=function(A){s.call(u,A)},I=function(){var A;return l&&!x?(u._readableState&&u._readableState.ended||(A=new n),s.call(u,A)):d&&!v?(u._writableState&&u._writableState.ended||(A=new n),s.call(u,A)):void 0},O=function(){u.req.on("finish",y)};return function(A){return A.setHeader&&typeof A.abort=="function"}(u)?(u.on("complete",y),u.on("abort",I),u.req?O():u.on("request",O)):d&&!u._writableState&&(u.on("end",b),u.on("close",b)),u.on("end",E),u.on("finish",y),c.error!==!1&&u.on("error",R),u.on("close",I),function(){u.removeListener("complete",y),u.removeListener("abort",I),u.removeListener("request",O),u.req&&u.req.removeListener("finish",y),u.removeListener("end",b),u.removeListener("close",b),u.removeListener("finish",y),u.removeListener("end",E),u.removeListener("error",R),u.removeListener("close",I)}}},function(i,e,o){var n=o(140),f=o(301),p=o(302),u=n?n.toStringTag:void 0;i.exports=function(c){return c==null?c===void 0?"[object Undefined]":"[object Null]":u&&u in Object(c)?f(c):p(c)}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){return function(){if(n!==null){var f=n;n=null,f.apply(this,arguments)}}},i.exports=e.default},function(i,e){i.exports=function(o){return o!=null&&typeof o=="object"}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){return function(){if(n===null)throw new Error("Callback was already called.");var f=n;n=null,f.apply(this,arguments)}},i.exports=e.default},function(i,e,o){const n=o(333),f=o(44);i.exports=function(p){return f({id:n(),jsonrpc:"2.0",params:[]},p)}},function(i,e,o){const n=o(49);i.exports=class extends n{constructor(f){if(super(),!f)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=f}setEngine(f){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const p=f._blockTracker,u=this._constructorFn({engine:f,provider:f,blockTracker:p});if(!u)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if(typeof u!="function")throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=u}handleRequest(f,p,u){const c={id:f.id};this.middleware(f,c,function(s){p((l,d,b)=>{l?(delete c.result,c.error={message:l.message||l}):c.result=d,s?s(b):b()})},function(s){if(s)return u(s);u(null,c.result)})}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});const n=o(12);function f(u,c,s){try{Reflect.apply(u,c,s)}catch(l){setTimeout(()=>{throw l})}}class p extends n.EventEmitter{emit(c,...s){let l=c==="error";const d=this._events;if(d!==void 0)l=l&&d.error===void 0;else if(!l)return!1;if(l){let v;if(s.length>0&&([v]=s),v instanceof Error)throw v;const y=new Error("Unhandled error."+(v?` (${v.message})`:""));throw y.context=v,y}const b=d[c];if(b===void 0)return!1;if(typeof b=="function")f(b,this,s);else{const v=b.length,y=function(x){const E=x.length,R=new Array(E);for(let I=0;I<E;I+=1)R[I]=x[I];return R}(b);for(let x=0;x<v;x+=1)f(y[x],this,s)}return!0}}e.default=p},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const n=o(344);class f extends Error{constructor(c,s,l){if(!Number.isInteger(c))throw new Error('"code" must be an integer.');if(!s||typeof s!="string")throw new Error('"message" must be a nonempty string.');super(s),this.code=c,l!==void 0&&(this.data=l)}serialize(){const c={code:this.code,message:this.message};return this.data!==void 0&&(c.data=this.data),this.stack&&(c.stack=this.stack),c}toString(){return n.default(this.serialize(),p,2)}}e.EthereumRpcError=f;function p(u,c){if(c!=="[Circular]")return c}e.EthereumProviderError=class extends f{constructor(u,c,s){if(!function(l){return Number.isInteger(l)&&l>=1e3&&l<=4999}(u))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(u,c,s)}}},function(i,e,o){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."}}},function(i,e,o){const n=o(69).default;i.exports=class extends n{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(f){this.updates=this.updates.concat(f),f.forEach(p=>this.emit("update",p))}addInitialResults(f){}getChangesAndClear(){const f=this.updates;return this.updates=[],f}}},function(i,e){function o(f){return f==null?f:Number.parseInt(f,16)}function n(f){return f==null?f:"0x"+f.toString(16)}i.exports=async function({provider:f,fromBlock:p,toBlock:u}){p||(p=u);const c=o(p),s=o(u),l=Array(s-c+1).fill().map((d,b)=>c+b).map(n);return await Promise.all(l.map(d=>function(b,v,y){return new Promise((x,E)=>{b.sendAsync({id:1,jsonrpc:"2.0",method:v,params:y},(R,I)=>{if(R)return E(R);x(I.result)})})}(f,"eth_getBlockByNumber",[d,!1])))}},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.ecdhUnsafe=e.ecdh=e.recover=e.verify=e.sign=e.signatureImportLax=e.signatureImport=e.signatureExport=e.signatureNormalize=e.publicKeyCombine=e.publicKeyTweakMul=e.publicKeyTweakAdd=e.publicKeyVerify=e.publicKeyConvert=e.publicKeyCreate=e.privateKeyTweakMul=e.privateKeyTweakAdd=e.privateKeyModInverse=e.privateKeyNegate=e.privateKeyImport=e.privateKeyExport=e.privateKeyVerify=void 0;var f=o(118),p=o(361),u=o(362);e.privateKeyVerify=function(c){return c.length===32&&f.privateKeyVerify(Uint8Array.from(c))},e.privateKeyExport=function(c,s){if(c.length!==32)throw new RangeError("private key length is invalid");var l=p.privateKeyExport(c,s);return u.privateKeyExport(c,l,s)},e.privateKeyImport=function(c){if((c=u.privateKeyImport(c))!==null&&c.length===32&&e.privateKeyVerify(c))return c;throw new Error("couldn't import from DER format")},e.privateKeyNegate=function(c){return n.from(f.privateKeyNegate(Uint8Array.from(c)))},e.privateKeyModInverse=function(c){if(c.length!==32)throw new Error("private key length is invalid");return n.from(p.privateKeyModInverse(Uint8Array.from(c)))},e.privateKeyTweakAdd=function(c,s){return n.from(f.privateKeyTweakAdd(Uint8Array.from(c),s))},e.privateKeyTweakMul=function(c,s){return n.from(f.privateKeyTweakMul(Uint8Array.from(c),Uint8Array.from(s)))},e.publicKeyCreate=function(c,s){return n.from(f.publicKeyCreate(Uint8Array.from(c),s))},e.publicKeyConvert=function(c,s){return n.from(f.publicKeyConvert(Uint8Array.from(c),s))},e.publicKeyVerify=function(c){return(c.length===33||c.length===65)&&f.publicKeyVerify(Uint8Array.from(c))},e.publicKeyTweakAdd=function(c,s,l){return n.from(f.publicKeyTweakAdd(Uint8Array.from(c),Uint8Array.from(s),l))},e.publicKeyTweakMul=function(c,s,l){return n.from(f.publicKeyTweakMul(Uint8Array.from(c),Uint8Array.from(s),l))},e.publicKeyCombine=function(c,s){var l=[];return c.forEach(function(d){l.push(Uint8Array.from(d))}),n.from(f.publicKeyCombine(l,s))},e.signatureNormalize=function(c){return n.from(f.signatureNormalize(Uint8Array.from(c)))},e.signatureExport=function(c){return n.from(f.signatureExport(Uint8Array.from(c)))},e.signatureImport=function(c){return n.from(f.signatureImport(Uint8Array.from(c)))},e.signatureImportLax=function(c){if(c.length===0)throw new RangeError("signature length is invalid");var s=u.signatureImportLax(c);if(s===null)throw new Error("couldn't parse DER signature");return p.signatureImport(s)},e.sign=function(c,s,l){if(l===null)throw new TypeError("options should be an Object");var d=void 0;if(l){if(d={},l.data===null)throw new TypeError("options.data should be a Buffer");if(l.data){if(l.data.length!=32)throw new RangeError("options.data length is invalid");d.data=new Uint8Array(l.data)}if(l.noncefn===null)throw new TypeError("options.noncefn should be a Function");l.noncefn&&(d.noncefn=function(v,y,x,E,R){var I=x!=null?n.from(x):null,O=E!=null?n.from(E):null,A=n.from("");return l.noncefn&&(A=l.noncefn(n.from(v),n.from(y),I,O,R)),new Uint8Array(A)})}var b=f.ecdsaSign(Uint8Array.from(c),Uint8Array.from(s),d);return{signature:n.from(b.signature),recovery:b.recid}},e.verify=function(c,s,l){return f.ecdsaVerify(Uint8Array.from(s),Uint8Array.from(c),l)},e.recover=function(c,s,l,d){return n.from(f.ecdsaRecover(Uint8Array.from(s),l,Uint8Array.from(c),d))},e.ecdh=function(c,s){return n.from(f.ecdh(Uint8Array.from(c),Uint8Array.from(s),{}))},e.ecdhUnsafe=function(c,s,l){if(c.length!==33&&c.length!==65)throw new RangeError("public key length is invalid");if(s.length!==32)throw new RangeError("private key length is invalid");return n.from(p.ecdhUnsafe(Uint8Array.from(c),Uint8Array.from(s),l))}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160=e.sha256=e.keccak256=e.keccak=void 0;var f=o(110),p=f.keccak224,u=f.keccak384,c=f.keccak256,s=f.keccak512,l=o(126),d=o(32),b=o(46),v=o(40);e.keccak=function(y,x){switch(x===void 0&&(x=256),y=typeof y!="string"||d.isHexString(y)?v.toBuffer(y):n.from(y,"utf8"),x||(x=256),x){case 224:return p(y);case 256:return c(y);case 384:return u(y);case 512:return s(y);default:throw new Error("Invald algorithm: keccak"+x)}},e.keccak256=function(y){return e.keccak(y)},e.sha256=function(y){return y=v.toBuffer(y),l("sha256").update(y).digest()},e.ripemd160=function(y,x){y=v.toBuffer(y);var E=l("rmd160").update(y).digest();return x===!0?v.setLength(E,32):E},e.rlphash=function(y){return e.keccak(b.encode(y))}}).call(this,o(2).Buffer)},function(i,e,o){o.r(e);var n=o(157),f=o(10),p=o(158);function u(K){return Object(p.a)(K)}function c(){const K=u();return K&&K.os?K.os:void 0}function s(){const K=c();return!!K&&K.toLowerCase().includes("android")}function l(){const K=c();return!!K&&(K.toLowerCase().includes("ios")||K.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function d(){return!!c()&&(s()||l())}function b(){const K=u();return!(!K||!K.name)&&K.name.toLowerCase()==="node"}function v(){return!b()&&!!O()}const y=f.getFromWindow,x=f.getFromWindowOrThrow,E=f.getDocumentOrThrow,R=f.getDocument,I=f.getNavigatorOrThrow,O=f.getNavigator,A=f.getLocationOrThrow,P=f.getLocation,N=f.getCryptoOrThrow,L=f.getCrypto,H=f.getLocalStorageOrThrow,J=f.getLocalStorage;function G(){return n.getWindowMetadata()}const z=function(K){if(typeof K!="string")throw new Error("Cannot safe json parse value of type "+typeof K);try{return JSON.parse(K)}catch{return K}},S=function(K){return typeof K=="string"?K:JSON.stringify(K)};function a(K,W){const U=S(W),q=J();q&&q.setItem(K,U)}function w(K){let W=null,U=null;const q=J();return q&&(U=q.getItem(K)),W=U&&z(U),W}function h(K){const W=J();W&&W.removeItem(K)}function m(K,W){const U=encodeURIComponent(K);return W.universalLink?`${W.universalLink}/wc?uri=${U}`:W.deepLink?`${W.deepLink}${W.deepLink.endsWith(":")?"//":"/"}wc?uri=${U}`:""}function g(K){const W=K.href.split("?")[0];a("WALLETCONNECT_DEEPLINK_CHOICE",Object.assign(Object.assign({},K),{href:W}))}function _(K,W){return K.filter(U=>U.name.toLowerCase().includes(W.toLowerCase()))[0]}function T(K,W){let U=K;return W&&(U=W.map(q=>_(K,q)).filter(Boolean)),U}const k="https://registry.walletconnect.com";function M(){return k+"/api/v2/wallets"}function B(){return k+"/api/v2/dapps"}function Y(K,W="mobile"){var U;return{name:K.name||"",shortName:K.metadata.shortName||"",color:K.metadata.colors.primary||"",logo:(U=K.image_url.sm)!==null&&U!==void 0?U:"",universalLink:K[W].universal||"",deepLink:K[W].native||""}}function C(K,W="mobile"){return Object.values(K).filter(U=>!!U[W].universal||!!U[W].native).map(U=>Y(U,W))}o.d(e,"detectEnv",function(){return u}),o.d(e,"detectOS",function(){return c}),o.d(e,"isAndroid",function(){return s}),o.d(e,"isIOS",function(){return l}),o.d(e,"isMobile",function(){return d}),o.d(e,"isNode",function(){return b}),o.d(e,"isBrowser",function(){return v}),o.d(e,"getFromWindow",function(){return y}),o.d(e,"getFromWindowOrThrow",function(){return x}),o.d(e,"getDocumentOrThrow",function(){return E}),o.d(e,"getDocument",function(){return R}),o.d(e,"getNavigatorOrThrow",function(){return I}),o.d(e,"getNavigator",function(){return O}),o.d(e,"getLocationOrThrow",function(){return A}),o.d(e,"getLocation",function(){return P}),o.d(e,"getCryptoOrThrow",function(){return N}),o.d(e,"getCrypto",function(){return L}),o.d(e,"getLocalStorageOrThrow",function(){return H}),o.d(e,"getLocalStorage",function(){return J}),o.d(e,"getClientMeta",function(){return G}),o.d(e,"safeJsonParse",function(){return z}),o.d(e,"safeJsonStringify",function(){return S}),o.d(e,"setLocal",function(){return a}),o.d(e,"getLocal",function(){return w}),o.d(e,"removeLocal",function(){return h}),o.d(e,"mobileLinkChoiceKey",function(){return"WALLETCONNECT_DEEPLINK_CHOICE"}),o.d(e,"formatIOSMobile",function(){return m}),o.d(e,"saveMobileLinkInfo",function(){return g}),o.d(e,"getMobileRegistryEntry",function(){return _}),o.d(e,"getMobileLinkRegistry",function(){return T}),o.d(e,"getWalletRegistryUrl",function(){return M}),o.d(e,"getDappRegistryUrl",function(){return B}),o.d(e,"formatMobileRegistryEntry",function(){return Y}),o.d(e,"formatMobileRegistry",function(){return C})},function(i,e){i.exports=f,f.strict=p,f.loose=u;var o=Object.prototype.toString,n={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function f(c){return p(c)||u(c)}function p(c){return c instanceof Int8Array||c instanceof Int16Array||c instanceof Int32Array||c instanceof Uint8Array||c instanceof Uint8ClampedArray||c instanceof Uint16Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array}function u(c){return n[o.call(c)]}},function(i,e,o){const n=o(174),f=o(175),p=o(176);function u(y){if(typeof y!="string"||y.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(y,x){return x.encode?x.strict?n(y):encodeURIComponent(y):y}function s(y,x){return x.decode?f(y):y}function l(y){const x=y.indexOf("#");return x!==-1&&(y=y.slice(0,x)),y}function d(y){const x=(y=l(y)).indexOf("?");return x===-1?"":y.slice(x+1)}function b(y,x){return x.parseNumbers&&!Number.isNaN(Number(y))&&typeof y=="string"&&y.trim()!==""?y=Number(y):!x.parseBooleans||y===null||y.toLowerCase()!=="true"&&y.toLowerCase()!=="false"||(y=y.toLowerCase()==="true"),y}function v(y,x){u((x=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},x)).arrayFormatSeparator);const E=function(I){let O;switch(I.arrayFormat){case"index":return(A,P,N)=>{O=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),O?(N[A]===void 0&&(N[A]={}),N[A][O[1]]=P):N[A]=P};case"bracket":return(A,P,N)=>{O=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),O?N[A]!==void 0?N[A]=[].concat(N[A],P):N[A]=[P]:N[A]=P};case"comma":case"separator":return(A,P,N)=>{const L=typeof P=="string"&&P.split("").indexOf(I.arrayFormatSeparator)>-1?P.split(I.arrayFormatSeparator).map(H=>s(H,I)):P===null?P:s(P,I);N[A]=L};default:return(A,P,N)=>{N[A]!==void 0?N[A]=[].concat(N[A],P):N[A]=P}}}(x),R=Object.create(null);if(typeof y!="string"||!(y=y.trim().replace(/^[?#&]/,"")))return R;for(const I of y.split("&")){let[O,A]=p(x.decode?I.replace(/\+/g," "):I,"=");A=A===void 0?null:["comma","separator"].includes(x.arrayFormat)?A:s(A,x),E(s(O,x),A,R)}for(const I of Object.keys(R)){const O=R[I];if(typeof O=="object"&&O!==null)for(const A of Object.keys(O))O[A]=b(O[A],x);else R[I]=b(O,x)}return x.sort===!1?R:(x.sort===!0?Object.keys(R).sort():Object.keys(R).sort(x.sort)).reduce((I,O)=>{const A=R[O];return Boolean(A)&&typeof A=="object"&&!Array.isArray(A)?I[O]=function P(N){return Array.isArray(N)?N.sort():typeof N=="object"?P(Object.keys(N)).sort((L,H)=>Number(L)-Number(H)).map(L=>N[L]):N}(A):I[O]=A,I},Object.create(null))}e.extract=d,e.parse=v,e.stringify=(y,x)=>{if(!y)return"";u((x=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},x)).arrayFormatSeparator);const E=A=>x.skipNull&&y[A]==null||x.skipEmptyString&&y[A]==="",R=function(A){switch(A.arrayFormat){case"index":return P=>(N,L)=>{const H=N.length;return L===void 0||A.skipNull&&L===null||A.skipEmptyString&&L===""?N:L===null?[...N,[c(P,A),"[",H,"]"].join("")]:[...N,[c(P,A),"[",c(H,A),"]=",c(L,A)].join("")]};case"bracket":return P=>(N,L)=>L===void 0||A.skipNull&&L===null||A.skipEmptyString&&L===""?N:L===null?[...N,[c(P,A),"[]"].join("")]:[...N,[c(P,A),"[]=",c(L,A)].join("")];case"comma":case"separator":return P=>(N,L)=>L==null||L.length===0?N:N.length===0?[[c(P,A),"=",c(L,A)].join("")]:[[N,c(L,A)].join(A.arrayFormatSeparator)];default:return P=>(N,L)=>L===void 0||A.skipNull&&L===null||A.skipEmptyString&&L===""?N:L===null?[...N,c(P,A)]:[...N,[c(P,A),"=",c(L,A)].join("")]}}(x),I={};for(const A of Object.keys(y))E(A)||(I[A]=y[A]);const O=Object.keys(I);return x.sort!==!1&&O.sort(x.sort),O.map(A=>{const P=y[A];return P===void 0?"":P===null?c(A,x):Array.isArray(P)?P.reduce(R(A),[]).join("&"):c(A,x)+"="+c(P,x)}).filter(A=>A.length>0).join("&")},e.parseUrl=(y,x)=>{x=Object.assign({decode:!0},x);const[E,R]=p(y,"#");return Object.assign({url:E.split("?")[0]||"",query:v(d(y),x)},x&&x.parseFragmentIdentifier&&R?{fragmentIdentifier:s(R,x)}:{})},e.stringifyUrl=(y,x)=>{x=Object.assign({encode:!0,strict:!0},x);const E=l(y.url).split("?")[0]||"",R=e.extract(y.url),I=e.parse(R,{sort:!1}),O=Object.assign(I,y.query);let A=e.stringify(O,x);A&&(A="?"+A);let P=function(N){let L="";const H=N.indexOf("#");return H!==-1&&(L=N.slice(H)),L}(y.url);return y.fragmentIdentifier&&(P="#"+c(y.fragmentIdentifier,x)),`${E}${A}${P}`}},function(i,e){var o={}.toString;i.exports=Array.isArray||function(n){return o.call(n)=="[object Array]"}},function(i,e,o){var n=o(8);o.o(n,"payloadId")&&o.d(e,"payloadId",function(){return n.payloadId}),n.isNode},function(i,e,o){o.d(e,"a",function(){return n}),o(24),o(7);function n(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},function(i,e,o){},function(i,e,o){o(84)},function(i,e,o){o(85),o(41),o(86),o(87)},function(i,e){},function(i,e,o){var n=o(41);n.a,n.a},function(i,e){},function(i,e,o){},function(i,e,o){},function(i,e,o){o.d(e,"a",function(){return f});var n=o(8);function f(p){return n.getBrowerCrypto().getRandomValues(new Uint8Array(p))}},function(i,e,o){o.d(e,"b",function(){return f}),o.d(e,"a",function(){return p});var n=o(14);function f(u,c,s){return Object(n.b)(u,c,s)}function p(u,c,s){return Object(n.a)(u,c,s)}},function(i,e,o){o.d(e,"a",function(){return f});var n=o(14);o(42);async function f(p,u){return await Object(n.c)(p,u)}},function(i,e,o){var n=o(8);o.o(n,"isConstantTime")&&o.d(e,"isConstantTime",function(){return n.isConstantTime})},function(i,e,o){},function(i,e){},function(i,e,o){function n(f,p){if(f.length!==p.length)return!1;let u=0;for(let c=0;c<f.length;c++)u|=f[c]^p[c];return u===0}o.d(e,"a",function(){return n})},function(i,e,o){o(14)},function(i,e,o){var n=o(51),f=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],p=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(u,c){switch(c){case n.L:return f[4*(u-1)+0];case n.M:return f[4*(u-1)+1];case n.Q:return f[4*(u-1)+2];case n.H:return f[4*(u-1)+3];default:return}},e.getTotalCodewordsCount=function(u,c){switch(c){case n.L:return p[4*(u-1)+0];case n.M:return p[4*(u-1)+1];case n.Q:return p[4*(u-1)+2];case n.H:return p[4*(u-1)+3];default:return}}},function(i,e){e.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}},function(i,e){var o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(o=o.replace(/u/g,"\\u"))+`)(?:.|[\r
]))+`;e.KANJI=new RegExp(o,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(n,"g"),e.NUMERIC=new RegExp("[0-9]+","g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var f=new RegExp("^"+o+"$"),p=new RegExp("^[0-9]+$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(c){return f.test(c)},e.testNumeric=function(c){return p.test(c)},e.testAlphanumeric=function(c){return u.test(c)}},function(i,e){function o(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");var f=n.slice().replace("#","").split("");if(f.length<3||f.length===5||f.length>8)throw new Error("Invalid hex color: "+n);f.length!==3&&f.length!==4||(f=Array.prototype.concat.apply([],f.map(function(u){return[u,u]}))),f.length===6&&f.push("F","F");var p=parseInt(f.join(""),16);return{r:p>>24&255,g:p>>16&255,b:p>>8&255,a:255&p,hex:"#"+f.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});var f=n.margin===void 0||n.margin===null||n.margin<0?4:n.margin,p=n.width&&n.width>=21?n.width:void 0,u=n.scale||4;return{width:p,scale:p?4:u,margin:f,color:{dark:o(n.color.dark||"#000000ff"),light:o(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,f){return f.width&&f.width>=n+2*f.margin?f.width/(n+2*f.margin):f.scale},e.getImageWidth=function(n,f){var p=e.getScale(n,f);return Math.floor((n+2*f.margin)*p)},e.qrToImageData=function(n,f,p){for(var u=f.modules.size,c=f.modules.data,s=e.getScale(u,p),l=Math.floor((u+2*p.margin)*s),d=p.margin*s,b=[p.color.light,p.color.dark],v=0;v<l;v++)for(var y=0;y<l;y++){var x=4*(v*l+y),E=p.color.light;v>=d&&y>=d&&v<l-d&&y<l-d&&(E=b[c[Math.floor((v-d)/s)*u+Math.floor((y-d)/s)]?1:0]),n[x++]=E.r,n[x++]=E.g,n[x++]=E.b,n[x]=E.a}}},function(i,e,o){(function(n){var f=o(204),p=o(104),u=o(44),c=o(212),s=o(55),l=e;l.request=function(d,b){d=typeof d=="string"?s.parse(d):u(d);var v=n.location.protocol.search(/^https?:$/)===-1?"http:":"",y=d.protocol||v,x=d.hostname||d.host,E=d.port,R=d.path||"/";x&&x.indexOf(":")!==-1&&(x="["+x+"]"),d.url=(x?y+"//"+x:"")+(E?":"+E:"")+R,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var I=new f(d);return b&&I.on("response",b),I},l.get=function(d,b){var v=l.request(d,b);return v.end(),v},l.ClientRequest=f,l.IncomingMessage=p.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=c,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,o(6))},function(i,e,o){(function(n){e.fetch=l(n.fetch)&&l(n.ReadableStream),e.writableStream=l(n.WritableStream),e.abortController=l(n.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch{}var f;function p(){if(f!==void 0)return f;if(n.XMLHttpRequest){f=new n.XMLHttpRequest;try{f.open("GET",n.XDomainRequest?"/":"https://example.com")}catch{f=null}}else f=null;return f}function u(d){var b=p();if(!b)return!1;try{return b.responseType=d,b.responseType===d}catch{}return!1}var c=n.ArrayBuffer!==void 0,s=c&&l(n.ArrayBuffer.prototype.slice);function l(d){return typeof d=="function"}e.arraybuffer=e.fetch||c&&u("arraybuffer"),e.msstream=!e.fetch&&s&&u("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&c&&u("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!p()&&l(p().overrideMimeType),e.vbArray=l(n.VBArray),f=null}).call(this,o(6))},function(i,e,o){(function(n,f,p){var u=o(103),c=o(3),s=o(34),l=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=e.IncomingMessage=function(b,v,y,x){var E=this;if(s.Readable.call(E),E._mode=y,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){n.nextTick(function(){E.emit("close")})}),y==="fetch"){if(E._fetchResponse=v,E.url=v.url,E.statusCode=v.status,E.statusMessage=v.statusText,v.headers.forEach(function(P,N){E.headers[N.toLowerCase()]=P,E.rawHeaders.push(N,P)}),u.writableStream){var R=new WritableStream({write:function(P){return new Promise(function(N,L){E._destroyed?L():E.push(new f(P))?N():E._resumeFetch=N})},close:function(){p.clearTimeout(x),E._destroyed||E.push(null)},abort:function(P){E._destroyed||E.emit("error",P)}});try{return void v.body.pipeTo(R).catch(function(P){p.clearTimeout(x),E._destroyed||E.emit("error",P)})}catch{}}var I=v.body.getReader();(function P(){I.read().then(function(N){if(!E._destroyed){if(N.done)return p.clearTimeout(x),void E.push(null);E.push(new f(N.value)),P()}}).catch(function(N){p.clearTimeout(x),E._destroyed||E.emit("error",N)})})()}else if(E._xhr=b,E._pos=0,E.url=b.responseURL,E.statusCode=b.status,E.statusMessage=b.statusText,b.getAllResponseHeaders().split(/\r?\n/).forEach(function(P){var N=P.match(/^([^:]+):\s*(.*)/);if(N){var L=N[1].toLowerCase();L==="set-cookie"?(E.headers[L]===void 0&&(E.headers[L]=[]),E.headers[L].push(N[2])):E.headers[L]!==void 0?E.headers[L]+=", "+N[2]:E.headers[L]=N[2],E.rawHeaders.push(N[1],N[2])}}),E._charset="x-user-defined",!u.overrideMimeType){var O=E.rawHeaders["mime-type"];if(O){var A=O.match(/;\s*charset=([^;])(;|$)/);A&&(E._charset=A[1].toLowerCase())}E._charset||(E._charset="utf-8")}};c(d,s.Readable),d.prototype._read=function(){var b=this._resumeFetch;b&&(this._resumeFetch=null,b())},d.prototype._onXHRProgress=function(){var b=this,v=b._xhr,y=null;switch(b._mode){case"text:vbarray":if(v.readyState!==l.DONE)break;try{y=new p.VBArray(v.responseBody).toArray()}catch{}if(y!==null){b.push(new f(y));break}case"text":try{y=v.responseText}catch{b._mode="text:vbarray";break}if(y.length>b._pos){var x=y.substr(b._pos);if(b._charset==="x-user-defined"){for(var E=new f(x.length),R=0;R<x.length;R++)E[R]=255&x.charCodeAt(R);b.push(E)}else b.push(x,b._charset);b._pos=y.length}break;case"arraybuffer":if(v.readyState!==l.DONE||!v.response)break;y=v.response,b.push(new f(new Uint8Array(y)));break;case"moz-chunked-arraybuffer":if(y=v.response,v.readyState!==l.LOADING||!y)break;b.push(new f(new Uint8Array(y)));break;case"ms-stream":if(y=v.response,v.readyState!==l.LOADING)break;var I=new p.MSStreamReader;I.onprogress=function(){I.result.byteLength>b._pos&&(b.push(new f(new Uint8Array(I.result.slice(b._pos)))),b._pos=I.result.byteLength)},I.onload=function(){b.push(null)},I.readAsArrayBuffer(y)}b._xhr.readyState===l.DONE&&b._mode!=="ms-stream"&&b.push(null)}}).call(this,o(5),o(2).Buffer,o(6))},function(i,e,o){(function(n,f){var p=o(43);i.exports=P;var u,c=o(79);P.ReadableState=A,o(12).EventEmitter;var s=function(k,M){return k.listeners(M).length},l=o(106),d=o(52).Buffer,b=n.Uint8Array||function(){},v=Object.create(o(35));v.inherits=o(3);var y=o(205),x=void 0;x=y&&y.debuglog?y.debuglog("stream"):function(){};var E,R=o(206),I=o(107);v.inherits(P,l);var O=["error","close","destroy","pause","resume"];function A(k,M){k=k||{};var B=M instanceof(u=u||o(19));this.objectMode=!!k.objectMode,B&&(this.objectMode=this.objectMode||!!k.readableObjectMode);var Y=k.highWaterMark,C=k.readableHighWaterMark,K=this.objectMode?16:16384;this.highWaterMark=Y||Y===0?Y:B&&(C||C===0)?C:K,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,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.destroyed=!1,this.defaultEncoding=k.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,k.encoding&&(E||(E=o(20).StringDecoder),this.decoder=new E(k.encoding),this.encoding=k.encoding)}function P(k){if(u=u||o(19),!(this instanceof P))return new P(k);this._readableState=new A(k,this),this.readable=!0,k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy)),l.call(this)}function N(k,M,B,Y,C){var K,W=k._readableState;return M===null?(W.reading=!1,function(U,q){if(!q.ended){if(q.decoder){var j=q.decoder.end();j&&j.length&&(q.buffer.push(j),q.length+=q.objectMode?1:j.length)}q.ended=!0,J(U)}}(k,W)):(C||(K=function(U,q){var j;D=q,d.isBuffer(D)||D instanceof b||typeof q=="string"||q===void 0||U.objectMode||(j=new TypeError("Invalid non-string/buffer chunk"));var D;return j}(W,M)),K?k.emit("error",K):W.objectMode||M&&M.length>0?(typeof M=="string"||W.objectMode||Object.getPrototypeOf(M)===d.prototype||(M=function(U){return d.from(U)}(M)),Y?W.endEmitted?k.emit("error",new Error("stream.unshift() after end event")):L(k,W,M,!0):W.ended?k.emit("error",new Error("stream.push() after EOF")):(W.reading=!1,W.decoder&&!B?(M=W.decoder.write(M),W.objectMode||M.length!==0?L(k,W,M,!1):z(k,W)):L(k,W,M,!1))):Y||(W.reading=!1)),function(U){return!U.ended&&(U.needReadable||U.length<U.highWaterMark||U.length===0)}(W)}function L(k,M,B,Y){M.flowing&&M.length===0&&!M.sync?(k.emit("data",B),k.read(0)):(M.length+=M.objectMode?1:B.length,Y?M.buffer.unshift(B):M.buffer.push(B),M.needReadable&&J(k)),z(k,M)}Object.defineProperty(P.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(k){this._readableState&&(this._readableState.destroyed=k)}}),P.prototype.destroy=I.destroy,P.prototype._undestroy=I.undestroy,P.prototype._destroy=function(k,M){this.push(null),M(k)},P.prototype.push=function(k,M){var B,Y=this._readableState;return Y.objectMode?B=!0:typeof k=="string"&&((M=M||Y.defaultEncoding)!==Y.encoding&&(k=d.from(k,M),M=""),B=!0),N(this,k,M,!1,B)},P.prototype.unshift=function(k){return N(this,k,null,!0,!1)},P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(k){return E||(E=o(20).StringDecoder),this._readableState.decoder=new E(k),this._readableState.encoding=k,this};function H(k,M){return k<=0||M.length===0&&M.ended?0:M.objectMode?1:k!=k?M.flowing&&M.length?M.buffer.head.data.length:M.length:(k>M.highWaterMark&&(M.highWaterMark=function(B){return B>=8388608?B=8388608:(B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++),B}(k)),k<=M.length?k:M.ended?M.length:(M.needReadable=!0,0))}function J(k){var M=k._readableState;M.needReadable=!1,M.emittedReadable||(x("emitReadable",M.flowing),M.emittedReadable=!0,M.sync?p.nextTick(G,k):G(k))}function G(k){x("emit readable"),k.emit("readable"),h(k)}function z(k,M){M.readingMore||(M.readingMore=!0,p.nextTick(S,k,M))}function S(k,M){for(var B=M.length;!M.reading&&!M.flowing&&!M.ended&&M.length<M.highWaterMark&&(x("maybeReadMore read 0"),k.read(0),B!==M.length);)B=M.length;M.readingMore=!1}function a(k){x("readable nexttick read 0"),k.read(0)}function w(k,M){M.reading||(x("resume read 0"),k.read(0)),M.resumeScheduled=!1,M.awaitDrain=0,k.emit("resume"),h(k),M.flowing&&!M.reading&&k.read(0)}function h(k){var M=k._readableState;for(x("flow",M.flowing);M.flowing&&k.read()!==null;);}function m(k,M){return M.length===0?null:(M.objectMode?B=M.buffer.shift():!k||k>=M.length?(B=M.decoder?M.buffer.join(""):M.buffer.length===1?M.buffer.head.data:M.buffer.concat(M.length),M.buffer.clear()):B=function(Y,C,K){var W;return Y<C.head.data.length?(W=C.head.data.slice(0,Y),C.head.data=C.head.data.slice(Y)):W=Y===C.head.data.length?C.shift():K?function(U,q){var j=q.head,D=1,F=j.data;for(U-=F.length;j=j.next;){var $=j.data,V=U>$.length?$.length:U;if(V===$.length?F+=$:F+=$.slice(0,U),(U-=V)===0){V===$.length?(++D,j.next?q.head=j.next:q.head=q.tail=null):(q.head=j,j.data=$.slice(V));break}++D}return q.length-=D,F}(Y,C):function(U,q){var j=d.allocUnsafe(U),D=q.head,F=1;for(D.data.copy(j),U-=D.data.length;D=D.next;){var $=D.data,V=U>$.length?$.length:U;if($.copy(j,j.length-U,0,V),(U-=V)===0){V===$.length?(++F,D.next?q.head=D.next:q.head=q.tail=null):(q.head=D,D.data=$.slice(V));break}++F}return q.length-=F,j}(Y,C),W}(k,M.buffer,M.decoder),B);var B}function g(k){var M=k._readableState;if(M.length>0)throw new Error('"endReadable()" called on non-empty stream');M.endEmitted||(M.ended=!0,p.nextTick(_,M,k))}function _(k,M){k.endEmitted||k.length!==0||(k.endEmitted=!0,M.readable=!1,M.emit("end"))}function T(k,M){for(var B=0,Y=k.length;B<Y;B++)if(k[B]===M)return B;return-1}P.prototype.read=function(k){x("read",k),k=parseInt(k,10);var M=this._readableState,B=k;if(k!==0&&(M.emittedReadable=!1),k===0&&M.needReadable&&(M.length>=M.highWaterMark||M.ended))return x("read: emitReadable",M.length,M.ended),M.length===0&&M.ended?g(this):J(this),null;if((k=H(k,M))===0&&M.ended)return M.length===0&&g(this),null;var Y,C=M.needReadable;return x("need readable",C),(M.length===0||M.length-k<M.highWaterMark)&&x("length less than watermark",C=!0),M.ended||M.reading?x("reading or ended",C=!1):C&&(x("do read"),M.reading=!0,M.sync=!0,M.length===0&&(M.needReadable=!0),this._read(M.highWaterMark),M.sync=!1,M.reading||(k=H(B,M))),(Y=k>0?m(k,M):null)===null?(M.needReadable=!0,k=0):M.length-=k,M.length===0&&(M.ended||(M.needReadable=!0),B!==k&&M.ended&&g(this)),Y!==null&&this.emit("data",Y),Y},P.prototype._read=function(k){this.emit("error",new Error("_read() is not implemented"))},P.prototype.pipe=function(k,M){var B=this,Y=this._readableState;switch(Y.pipesCount){case 0:Y.pipes=k;break;case 1:Y.pipes=[Y.pipes,k];break;default:Y.pipes.push(k)}Y.pipesCount+=1,x("pipe count=%d opts=%j",Y.pipesCount,M);var C=(!M||M.end!==!1)&&k!==f.stdout&&k!==f.stderr?W:Z;function K(ee,re){x("onunpipe"),ee===B&&re&&re.hasUnpiped===!1&&(re.hasUnpiped=!0,x("cleanup"),k.removeListener("close",$),k.removeListener("finish",V),k.removeListener("drain",U),k.removeListener("error",F),k.removeListener("unpipe",K),B.removeListener("end",W),B.removeListener("end",Z),B.removeListener("data",D),q=!0,!Y.awaitDrain||k._writableState&&!k._writableState.needDrain||U())}function W(){x("onend"),k.end()}Y.endEmitted?p.nextTick(C):B.once("end",C),k.on("unpipe",K);var U=function(ee){return function(){var re=ee._readableState;x("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&s(ee,"data")&&(re.flowing=!0,h(ee))}}(B);k.on("drain",U);var q=!1,j=!1;function D(ee){x("ondata"),j=!1,k.write(ee)!==!1||j||((Y.pipesCount===1&&Y.pipes===k||Y.pipesCount>1&&T(Y.pipes,k)!==-1)&&!q&&(x("false write response, pause",B._readableState.awaitDrain),B._readableState.awaitDrain++,j=!0),B.pause())}function F(ee){x("onerror",ee),Z(),k.removeListener("error",F),s(k,"error")===0&&k.emit("error",ee)}function $(){k.removeListener("finish",V),Z()}function V(){x("onfinish"),k.removeListener("close",$),Z()}function Z(){x("unpipe"),B.unpipe(k)}return B.on("data",D),function(ee,re,ue){if(typeof ee.prependListener=="function")return ee.prependListener(re,ue);ee._events&&ee._events[re]?c(ee._events[re])?ee._events[re].unshift(ue):ee._events[re]=[ue,ee._events[re]]:ee.on(re,ue)}(k,"error",F),k.once("close",$),k.once("finish",V),k.emit("pipe",B),Y.flowing||(x("pipe resume"),B.resume()),k},P.prototype.unpipe=function(k){var M=this._readableState,B={hasUnpiped:!1};if(M.pipesCount===0)return this;if(M.pipesCount===1)return k&&k!==M.pipes||(k||(k=M.pipes),M.pipes=null,M.pipesCount=0,M.flowing=!1,k&&k.emit("unpipe",this,B)),this;if(!k){var Y=M.pipes,C=M.pipesCount;M.pipes=null,M.pipesCount=0,M.flowing=!1;for(var K=0;K<C;K++)Y[K].emit("unpipe",this,B);return this}var W=T(M.pipes,k);return W===-1||(M.pipes.splice(W,1),M.pipesCount-=1,M.pipesCount===1&&(M.pipes=M.pipes[0]),k.emit("unpipe",this,B)),this},P.prototype.on=function(k,M){var B=l.prototype.on.call(this,k,M);if(k==="data")this._readableState.flowing!==!1&&this.resume();else if(k==="readable"){var Y=this._readableState;Y.endEmitted||Y.readableListening||(Y.readableListening=Y.needReadable=!0,Y.emittedReadable=!1,Y.reading?Y.length&&J(this):p.nextTick(a,this))}return B},P.prototype.addListener=P.prototype.on,P.prototype.resume=function(){var k=this._readableState;return k.flowing||(x("resume"),k.flowing=!0,function(M,B){B.resumeScheduled||(B.resumeScheduled=!0,p.nextTick(w,M,B))}(this,k)),this},P.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this},P.prototype.wrap=function(k){var M=this,B=this._readableState,Y=!1;for(var C in k.on("end",function(){if(x("wrapped end"),B.decoder&&!B.ended){var W=B.decoder.end();W&&W.length&&M.push(W)}M.push(null)}),k.on("data",function(W){x("wrapped data"),B.decoder&&(W=B.decoder.write(W)),B.objectMode&&W==null||(B.objectMode||W&&W.length)&&(M.push(W)||(Y=!0,k.pause()))}),k)this[C]===void 0&&typeof k[C]=="function"&&(this[C]=function(W){return function(){return k[W].apply(k,arguments)}}(C));for(var K=0;K<O.length;K++)k.on(O[K],this.emit.bind(this,O[K]));return this._read=function(W){x("wrapped _read",W),Y&&(Y=!1,k.resume())},this},Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),P._fromList=m}).call(this,o(6),o(5))},function(i,e,o){i.exports=o(12).EventEmitter},function(i,e,o){var n=o(43);function f(p,u){p.emit("error",u)}i.exports={destroy:function(p,u){var c=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(u?u(p):!p||this._writableState&&this._writableState.errorEmitted||n.nextTick(f,this,p),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(d){!u&&d?(n.nextTick(f,c,d),c._writableState&&(c._writableState.errorEmitted=!0)):u&&u(d)}),this)},undestroy:function(){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.finished=!1,this._writableState.errorEmitted=!1)}}},function(i,e,o){(function(n){var f=n!==void 0&&n||typeof self<"u"&&self||window,p=Function.prototype.apply;function u(c,s){this._id=c,this._clearFn=s}e.setTimeout=function(){return new u(p.call(setTimeout,f,arguments),clearTimeout)},e.setInterval=function(){return new u(p.call(setInterval,f,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(c){c&&c.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(f,this._id)},e.enroll=function(c,s){clearTimeout(c._idleTimeoutId),c._idleTimeout=s},e.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},e._unrefActive=e.active=function(c){clearTimeout(c._idleTimeoutId);var s=c._idleTimeout;s>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},s))},o(208),e.setImmediate=typeof self<"u"&&self.setImmediate||n!==void 0&&n.setImmediate||this&&this.setImmediate,e.clearImmediate=typeof self<"u"&&self.clearImmediate||n!==void 0&&n.clearImmediate||this&&this.clearImmediate}).call(this,o(6))},function(i,e,o){i.exports=u;var n=o(19),f=Object.create(o(35));function p(l,d){var b=this._transformState;b.transforming=!1;var v=b.writecb;if(!v)return this.emit("error",new Error("write callback called multiple times"));b.writechunk=null,b.writecb=null,d!=null&&this.push(d),v(l);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function u(l){if(!(this instanceof u))return new u(l);n.call(this,l),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",c)}function c(){var l=this;typeof this._flush=="function"?this._flush(function(d,b){s(l,d,b)}):s(this,null,null)}function s(l,d,b){if(d)return l.emit("error",d);if(b!=null&&l.push(b),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}f.inherits=o(3),f.inherits(u,n),u.prototype.push=function(l,d){return this._transformState.needTransform=!1,n.prototype.push.call(this,l,d)},u.prototype._transform=function(l,d,b){throw new Error("_transform() is not implemented")},u.prototype._write=function(l,d,b){var v=this._transformState;if(v.writecb=b,v.writechunk=l,v.writeencoding=d,!v.transforming){var y=this._readableState;(v.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},u.prototype._read=function(l){var d=this._transformState;d.writechunk!==null&&d.writecb&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},u.prototype._destroy=function(l,d){var b=this;n.prototype._destroy.call(this,l,function(v){d(v),b.emit("close")})}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=o(227),f=o(228);e.keccak224=n.createHashFunction(function(){return f("keccak224")}),e.keccak256=n.createHashFunction(function(){return f("keccak256")}),e.keccak384=n.createHashFunction(function(){return f("keccak384")}),e.keccak512=n.createHashFunction(function(){return f("keccak512")})},function(i,e,o){(e=i.exports=o(112)).Stream=e,e.Readable=e,e.Writable=o(116),e.Duplex=o(28),e.Transform=o(117),e.PassThrough=o(236),e.finished=o(57),e.pipeline=o(237)},function(i,e,o){(function(n,f){var p;i.exports=z,z.ReadableState=G,o(12).EventEmitter;var u=function(U,q){return U.listeners(q).length},c=o(113),s=o(2).Buffer,l=n.Uint8Array||function(){},d,b=o(231);d=b&&b.debuglog?b.debuglog("stream"):function(){};var v,y,x,E=o(232),R=o(114),I=o(115).getHighWaterMark,O=o(27).codes,A=O.ERR_INVALID_ARG_TYPE,P=O.ERR_STREAM_PUSH_AFTER_EOF,N=O.ERR_METHOD_NOT_IMPLEMENTED,L=O.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;o(3)(z,c);var H=R.errorOrDestroy,J=["error","close","destroy","pause","resume"];function G(U,q,j){p=p||o(28),U=U||{},typeof j!="boolean"&&(j=q instanceof p),this.objectMode=!!U.objectMode,j&&(this.objectMode=this.objectMode||!!U.readableObjectMode),this.highWaterMark=I(this,U,"readableHighWaterMark",j),this.buffer=new E,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=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.destroyed=!1,this.defaultEncoding=U.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,U.encoding&&(v||(v=o(20).StringDecoder),this.decoder=new v(U.encoding),this.encoding=U.encoding)}function z(U){if(p=p||o(28),!(this instanceof z))return new z(U);var q=this instanceof p;this._readableState=new G(U,this,q),this.readable=!0,U&&(typeof U.read=="function"&&(this._read=U.read),typeof U.destroy=="function"&&(this._destroy=U.destroy)),c.call(this)}function S(U,q,j,D,F){d("readableAddChunk",q);var $,V=U._readableState;if(q===null)V.reading=!1,function(Z,ee){if(d("onEofChunk"),!ee.ended){if(ee.decoder){var re=ee.decoder.end();re&&re.length&&(ee.buffer.push(re),ee.length+=ee.objectMode?1:re.length)}ee.ended=!0,ee.sync?h(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,m(Z)))}}(U,V);else if(F||($=function(Z,ee){var re;ue=ee,s.isBuffer(ue)||ue instanceof l||typeof ee=="string"||ee===void 0||Z.objectMode||(re=new A("chunk",["string","Buffer","Uint8Array"],ee));var ue;return re}(V,q)),$)H(U,$);else if(V.objectMode||q&&q.length>0)if(typeof q=="string"||V.objectMode||Object.getPrototypeOf(q)===s.prototype||(q=function(Z){return s.from(Z)}(q)),D)V.endEmitted?H(U,new L):a(U,V,q,!0);else if(V.ended)H(U,new P);else{if(V.destroyed)return!1;V.reading=!1,V.decoder&&!j?(q=V.decoder.write(q),V.objectMode||q.length!==0?a(U,V,q,!1):g(U,V)):a(U,V,q,!1)}else D||(V.reading=!1,g(U,V));return!V.ended&&(V.length<V.highWaterMark||V.length===0)}function a(U,q,j,D){q.flowing&&q.length===0&&!q.sync?(q.awaitDrain=0,U.emit("data",j)):(q.length+=q.objectMode?1:j.length,D?q.buffer.unshift(j):q.buffer.push(j),q.needReadable&&h(U)),g(U,q)}Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),z.prototype.destroy=R.destroy,z.prototype._undestroy=R.undestroy,z.prototype._destroy=function(U,q){q(U)},z.prototype.push=function(U,q){var j,D=this._readableState;return D.objectMode?j=!0:typeof U=="string"&&((q=q||D.defaultEncoding)!==D.encoding&&(U=s.from(U,q),q=""),j=!0),S(this,U,q,!1,j)},z.prototype.unshift=function(U){return S(this,U,null,!0,!1)},z.prototype.isPaused=function(){return this._readableState.flowing===!1},z.prototype.setEncoding=function(U){v||(v=o(20).StringDecoder);var q=new v(U);this._readableState.decoder=q,this._readableState.encoding=this._readableState.decoder.encoding;for(var j=this._readableState.buffer.head,D="";j!==null;)D+=q.write(j.data),j=j.next;return this._readableState.buffer.clear(),D!==""&&this._readableState.buffer.push(D),this._readableState.length=D.length,this};function w(U,q){return U<=0||q.length===0&&q.ended?0:q.objectMode?1:U!=U?q.flowing&&q.length?q.buffer.head.data.length:q.length:(U>q.highWaterMark&&(q.highWaterMark=function(j){return j>=1073741824?j=1073741824:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}(U)),U<=q.length?U:q.ended?q.length:(q.needReadable=!0,0))}function h(U){var q=U._readableState;d("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(d("emitReadable",q.flowing),q.emittedReadable=!0,f.nextTick(m,U))}function m(U){var q=U._readableState;d("emitReadable_",q.destroyed,q.length,q.ended),q.destroyed||!q.length&&!q.ended||(U.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,B(U)}function g(U,q){q.readingMore||(q.readingMore=!0,f.nextTick(_,U,q))}function _(U,q){for(;!q.reading&&!q.ended&&(q.length<q.highWaterMark||q.flowing&&q.length===0);){var j=q.length;if(d("maybeReadMore read 0"),U.read(0),j===q.length)break}q.readingMore=!1}function T(U){var q=U._readableState;q.readableListening=U.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:U.listenerCount("data")>0&&U.resume()}function k(U){d("readable nexttick read 0"),U.read(0)}function M(U,q){d("resume",q.reading),q.reading||U.read(0),q.resumeScheduled=!1,U.emit("resume"),B(U),q.flowing&&!q.reading&&U.read(0)}function B(U){var q=U._readableState;for(d("flow",q.flowing);q.flowing&&U.read()!==null;);}function Y(U,q){return q.length===0?null:(q.objectMode?j=q.buffer.shift():!U||U>=q.length?(j=q.decoder?q.buffer.join(""):q.buffer.length===1?q.buffer.first():q.buffer.concat(q.length),q.buffer.clear()):j=q.buffer.consume(U,q.decoder),j);var j}function C(U){var q=U._readableState;d("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,f.nextTick(K,q,U))}function K(U,q){if(d("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,q.readable=!1,q.emit("end"),U.autoDestroy)){var j=q._writableState;(!j||j.autoDestroy&&j.finished)&&q.destroy()}}function W(U,q){for(var j=0,D=U.length;j<D;j++)if(U[j]===q)return j;return-1}z.prototype.read=function(U){d("read",U),U=parseInt(U,10);var q=this._readableState,j=U;if(U!==0&&(q.emittedReadable=!1),U===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return d("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?C(this):h(this),null;if((U=w(U,q))===0&&q.ended)return q.length===0&&C(this),null;var D,F=q.needReadable;return d("need readable",F),(q.length===0||q.length-U<q.highWaterMark)&&d("length less than watermark",F=!0),q.ended||q.reading?d("reading or ended",F=!1):F&&(d("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(U=w(j,q))),(D=U>0?Y(U,q):null)===null?(q.needReadable=q.length<=q.highWaterMark,U=0):(q.length-=U,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),j!==U&&q.ended&&C(this)),D!==null&&this.emit("data",D),D},z.prototype._read=function(U){H(this,new N("_read()"))},z.prototype.pipe=function(U,q){var j=this,D=this._readableState;switch(D.pipesCount){case 0:D.pipes=U;break;case 1:D.pipes=[D.pipes,U];break;default:D.pipes.push(U)}D.pipesCount+=1,d("pipe count=%d opts=%j",D.pipesCount,q);var F=(!q||q.end!==!1)&&U!==f.stdout&&U!==f.stderr?V:ae;function $(ie,te){d("onunpipe"),ie===j&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,d("cleanup"),U.removeListener("close",fe),U.removeListener("finish",oe),U.removeListener("drain",Z),U.removeListener("error",ue),U.removeListener("unpipe",$),j.removeListener("end",V),j.removeListener("end",ae),j.removeListener("data",re),ee=!0,!D.awaitDrain||U._writableState&&!U._writableState.needDrain||Z())}function V(){d("onend"),U.end()}D.endEmitted?f.nextTick(F):j.once("end",F),U.on("unpipe",$);var Z=function(ie){return function(){var te=ie._readableState;d("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&u(ie,"data")&&(te.flowing=!0,B(ie))}}(j);U.on("drain",Z);var ee=!1;function re(ie){d("ondata");var te=U.write(ie);d("dest.write",te),te===!1&&((D.pipesCount===1&&D.pipes===U||D.pipesCount>1&&W(D.pipes,U)!==-1)&&!ee&&(d("false write response, pause",D.awaitDrain),D.awaitDrain++),j.pause())}function ue(ie){d("onerror",ie),ae(),U.removeListener("error",ue),u(U,"error")===0&&H(U,ie)}function fe(){U.removeListener("finish",oe),ae()}function oe(){d("onfinish"),U.removeListener("close",fe),ae()}function ae(){d("unpipe"),j.unpipe(U)}return j.on("data",re),function(ie,te,le){if(typeof ie.prependListener=="function")return ie.prependListener(te,le);ie._events&&ie._events[te]?Array.isArray(ie._events[te])?ie._events[te].unshift(le):ie._events[te]=[le,ie._events[te]]:ie.on(te,le)}(U,"error",ue),U.once("close",fe),U.once("finish",oe),U.emit("pipe",j),D.flowing||(d("pipe resume"),j.resume()),U},z.prototype.unpipe=function(U){var q=this._readableState,j={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return U&&U!==q.pipes||(U||(U=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,U&&U.emit("unpipe",this,j)),this;if(!U){var D=q.pipes,F=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var $=0;$<F;$++)D[$].emit("unpipe",this,{hasUnpiped:!1});return this}var V=W(q.pipes,U);return V===-1||(q.pipes.splice(V,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),U.emit("unpipe",this,j)),this},z.prototype.on=function(U,q){var j=c.prototype.on.call(this,U,q),D=this._readableState;return U==="data"?(D.readableListening=this.listenerCount("readable")>0,D.flowing!==!1&&this.resume()):U==="readable"&&(D.endEmitted||D.readableListening||(D.readableListening=D.needReadable=!0,D.flowing=!1,D.emittedReadable=!1,d("on readable",D.length,D.reading),D.length?h(this):D.reading||f.nextTick(k,this))),j},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(U,q){var j=c.prototype.removeListener.call(this,U,q);return U==="readable"&&f.nextTick(T,this),j},z.prototype.removeAllListeners=function(U){var q=c.prototype.removeAllListeners.apply(this,arguments);return U!=="readable"&&U!==void 0||f.nextTick(T,this),q},z.prototype.resume=function(){var U=this._readableState;return U.flowing||(d("resume"),U.flowing=!U.readableListening,function(q,j){j.resumeScheduled||(j.resumeScheduled=!0,f.nextTick(M,q,j))}(this,U)),U.paused=!1,this},z.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},z.prototype.wrap=function(U){var q=this,j=this._readableState,D=!1;for(var F in U.on("end",function(){if(d("wrapped end"),j.decoder&&!j.ended){var V=j.decoder.end();V&&V.length&&q.push(V)}q.push(null)}),U.on("data",function(V){d("wrapped data"),j.decoder&&(V=j.decoder.write(V)),j.objectMode&&V==null||(j.objectMode||V&&V.length)&&(q.push(V)||(D=!0,U.pause()))}),U)this[F]===void 0&&typeof U[F]=="function"&&(this[F]=function(V){return function(){return U[V].apply(U,arguments)}}(F));for(var $=0;$<J.length;$++)U.on(J[$],this.emit.bind(this,J[$]));return this._read=function(V){d("wrapped _read",V),D&&(D=!1,U.resume())},this},typeof Symbol=="function"&&(z.prototype[Symbol.asyncIterator]=function(){return y===void 0&&(y=o(234)),y(this)}),Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(z.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(z.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),z._fromList=Y,Object.defineProperty(z.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(z.from=function(U,q){return x===void 0&&(x=o(235)),x(z,U,q)})}).call(this,o(6),o(5))},function(i,e,o){i.exports=o(12).EventEmitter},function(i,e,o){(function(n){function f(c,s){u(c,s),p(c)}function p(c){c._writableState&&!c._writableState.emitClose||c._readableState&&!c._readableState.emitClose||c.emit("close")}function u(c,s){c.emit("error",s)}i.exports={destroy:function(c,s){var l=this,d=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return d||b?(s?s(c):c&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(u,this,c)):n.nextTick(u,this,c)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(v){!s&&v?l._writableState?l._writableState.errorEmitted?n.nextTick(p,l):(l._writableState.errorEmitted=!0,n.nextTick(f,l,v)):n.nextTick(f,l,v):s?(n.nextTick(p,l),s(v)):n.nextTick(p,l)}),this)},undestroy:function(){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)},errorOrDestroy:function(c,s){var l=c._readableState,d=c._writableState;l&&l.autoDestroy||d&&d.autoDestroy?c.destroy(s):c.emit("error",s)}}}).call(this,o(5))},function(i,e,o){var n=o(27).codes.ERR_INVALID_OPT_VALUE;i.exports={getHighWaterMark:function(f,p,u,c){var s=function(l,d,b){return l.highWaterMark!=null?l.highWaterMark:d?l[b]:null}(p,c,u);if(s!=null){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(c?u:"highWaterMark",s);return Math.floor(s)}return f.objectMode?16:16384}}},function(i,e,o){(function(n,f){function p(_){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(k,M,B){var Y=k.entry;for(k.entry=null;Y;){var C=Y.callback;M.pendingcb--,C(B),Y=Y.next}M.corkedRequestsFree.next=k})(T,_)}}var u;i.exports=z,z.WritableState=G;var c={deprecate:o(54)},s=o(113),l=o(2).Buffer,d=n.Uint8Array||function(){},b,v=o(114),y=o(115).getHighWaterMark,x=o(27).codes,E=x.ERR_INVALID_ARG_TYPE,R=x.ERR_METHOD_NOT_IMPLEMENTED,I=x.ERR_MULTIPLE_CALLBACK,O=x.ERR_STREAM_CANNOT_PIPE,A=x.ERR_STREAM_DESTROYED,P=x.ERR_STREAM_NULL_VALUES,N=x.ERR_STREAM_WRITE_AFTER_END,L=x.ERR_UNKNOWN_ENCODING,H=v.errorOrDestroy;function J(){}function G(_,T,k){u=u||o(28),_=_||{},typeof k!="boolean"&&(k=T instanceof u),this.objectMode=!!_.objectMode,k&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=y(this,_,"writableHighWaterMark",k),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var M=_.decodeStrings===!1;this.decodeStrings=!M,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(B){(function(Y,C){var K=Y._writableState,W=K.sync,U=K.writecb;if(typeof U!="function")throw new I;if(function(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}(K),C)(function(j,D,F,$,V){--D.pendingcb,F?(f.nextTick(V,$),f.nextTick(g,j,D),j._writableState.errorEmitted=!0,H(j,$)):(V($),j._writableState.errorEmitted=!0,H(j,$),g(j,D))})(Y,K,W,C,U);else{var q=h(K)||Y.destroyed;q||K.corked||K.bufferProcessing||!K.bufferedRequest||w(Y,K),W?f.nextTick(a,Y,K,q,U):a(Y,K,q,U)}})(T,B)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}function z(_){var T=this instanceof(u=u||o(28));if(!T&&!b.call(z,this))return new z(_);this._writableState=new G(_,this,T),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),s.call(this)}function S(_,T,k,M,B,Y,C){T.writelen=M,T.writecb=C,T.writing=!0,T.sync=!0,T.destroyed?T.onwrite(new A("write")):k?_._writev(B,T.onwrite):_._write(B,Y,T.onwrite),T.sync=!1}function a(_,T,k,M){k||function(B,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,B.emit("drain"))}(_,T),T.pendingcb--,M(),g(_,T)}function w(_,T){T.bufferProcessing=!0;var k=T.bufferedRequest;if(_._writev&&k&&k.next){var M=T.bufferedRequestCount,B=new Array(M),Y=T.corkedRequestsFree;Y.entry=k;for(var C=0,K=!0;k;)B[C]=k,k.isBuf||(K=!1),k=k.next,C+=1;B.allBuffers=K,S(_,T,!0,T.length,B,"",Y.finish),T.pendingcb++,T.lastBufferedRequest=null,Y.next?(T.corkedRequestsFree=Y.next,Y.next=null):T.corkedRequestsFree=new p(T),T.bufferedRequestCount=0}else{for(;k;){var W=k.chunk,U=k.encoding,q=k.callback;if(S(_,T,!1,T.objectMode?1:W.length,W,U,q),k=k.next,T.bufferedRequestCount--,T.writing)break}k===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=k,T.bufferProcessing=!1}function h(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function m(_,T){_._final(function(k){T.pendingcb--,k&&H(_,k),T.prefinished=!0,_.emit("prefinish"),g(_,T)})}function g(_,T){var k=h(T);if(k&&(function(B,Y){Y.prefinished||Y.finalCalled||(typeof B._final!="function"||Y.destroyed?(Y.prefinished=!0,B.emit("prefinish")):(Y.pendingcb++,Y.finalCalled=!0,f.nextTick(m,B,Y)))}(_,T),T.pendingcb===0&&(T.finished=!0,_.emit("finish"),T.autoDestroy))){var M=_._readableState;(!M||M.autoDestroy&&M.endEmitted)&&_.destroy()}return k}o(3)(z,s),G.prototype.getBuffer=function(){for(var _=this.bufferedRequest,T=[];_;)T.push(_),_=_.next;return T},function(){try{Object.defineProperty(G.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(_){return!!b.call(this,_)||this===z&&_&&_._writableState instanceof G}})):b=function(_){return _ instanceof this},z.prototype.pipe=function(){H(this,new O)},z.prototype.write=function(_,T,k){var M,B=this._writableState,Y=!1,C=!B.objectMode&&(M=_,l.isBuffer(M)||M instanceof d);return C&&!l.isBuffer(_)&&(_=function(K){return l.from(K)}(_)),typeof T=="function"&&(k=T,T=null),C?T="buffer":T||(T=B.defaultEncoding),typeof k!="function"&&(k=J),B.ending?function(K,W){var U=new N;H(K,U),f.nextTick(W,U)}(this,k):(C||function(K,W,U,q){var j;return U===null?j=new P:typeof U=="string"||W.objectMode||(j=new E("chunk",["string","Buffer"],U)),!j||(H(K,j),f.nextTick(q,j),!1)}(this,B,_,k))&&(B.pendingcb++,Y=function(K,W,U,q,j,D){if(!U){var F=function(ee,re,ue){return ee.objectMode||ee.decodeStrings===!1||typeof re!="string"||(re=l.from(re,ue)),re}(W,q,j);q!==F&&(U=!0,j="buffer",q=F)}var $=W.objectMode?1:q.length;W.length+=$;var V=W.length<W.highWaterMark;if(V||(W.needDrain=!0),W.writing||W.corked){var Z=W.lastBufferedRequest;W.lastBufferedRequest={chunk:q,encoding:j,isBuf:U,callback:D,next:null},Z?Z.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else S(K,W,!1,$,q,j,D);return V}(this,B,C,_,T,k)),Y},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||w(this,_))},z.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new L(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),z.prototype._write=function(_,T,k){k(new R("_write()"))},z.prototype._writev=null,z.prototype.end=function(_,T,k){var M=this._writableState;return typeof _=="function"?(k=_,_=null,T=null):typeof T=="function"&&(k=T,T=null),_!=null&&this.write(_,T),M.corked&&(M.corked=1,this.uncork()),M.ending||function(B,Y,C){Y.ending=!0,g(B,Y),C&&(Y.finished?f.nextTick(C):B.once("finish",C)),Y.ended=!0,B.writable=!1}(this,M,k),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),z.prototype.destroy=v.destroy,z.prototype._undestroy=v.undestroy,z.prototype._destroy=function(_,T){T(_)}}).call(this,o(6),o(5))},function(i,e,o){i.exports=d;var n=o(27).codes,f=n.ERR_METHOD_NOT_IMPLEMENTED,p=n.ERR_MULTIPLE_CALLBACK,u=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,c=n.ERR_TRANSFORM_WITH_LENGTH_0,s=o(28);function l(y,x){var E=this._transformState;E.transforming=!1;var R=E.writecb;if(R===null)return this.emit("error",new p);E.writechunk=null,E.writecb=null,x!=null&&this.push(x),R(y);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function d(y){if(!(this instanceof d))return new d(y);s.call(this,y),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",b)}function b(){var y=this;typeof this._flush!="function"||this._readableState.destroyed?v(this,null,null):this._flush(function(x,E){v(y,x,E)})}function v(y,x,E){if(x)return y.emit("error",x);if(E!=null&&y.push(E),y._writableState.length)throw new c;if(y._transformState.transforming)throw new u;return y.push(null)}o(3)(d,s),d.prototype.push=function(y,x){return this._transformState.needTransform=!1,s.prototype.push.call(this,y,x)},d.prototype._transform=function(y,x,E){E(new f("_transform()"))},d.prototype._write=function(y,x,E){var R=this._transformState;if(R.writecb=E,R.writechunk=y,R.writeencoding=x,!R.transforming){var I=this._readableState;(R.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},d.prototype._read=function(y){var x=this._transformState;x.writechunk===null||x.transforming?x.needTransform=!0:(x.transforming=!0,this._transform(x.writechunk,x.writeencoding,x.afterTransform))},d.prototype._destroy=function(y,x){s.prototype._destroy.call(this,y,function(E){x(E)})}},function(i,e,o){var n=this&&this.__awaiter||function(c,s,l,d){return new(l||(l=Promise))(function(b,v){function y(R){try{E(d.next(R))}catch(I){v(I)}}function x(R){try{E(d.throw(R))}catch(I){v(I)}}function E(R){var I;R.done?b(R.value):(I=R.value,I instanceof l?I:new l(function(O){O(I)})).then(y,x)}E((d=d.apply(c,s||[])).next())})},f=this&&this.__generator||function(c,s){var l,d,b,v,y={label:0,sent:function(){if(1&b[0])throw b[1];return b[1]},trys:[],ops:[]};return v={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function x(E){return function(R){return function(I){if(l)throw new TypeError("Generator is already executing.");for(;y;)try{if(l=1,d&&(b=2&I[0]?d.return:I[0]?d.throw||((b=d.return)&&b.call(d),0):d.next)&&!(b=b.call(d,I[1])).done)return b;switch(d=0,b&&(I=[2&I[0],b.value]),I[0]){case 0:case 1:b=I;break;case 4:return y.label++,{value:I[1],done:!1};case 5:y.label++,d=I[1],I=[0];continue;case 7:I=y.ops.pop(),y.trys.pop();continue;default:if(b=y.trys,!((b=b.length>0&&b[b.length-1])||I[0]!==6&&I[0]!==2)){y=0;continue}if(I[0]===3&&(!b||I[1]>b[0]&&I[1]<b[3])){y.label=I[1];break}if(I[0]===6&&y.label<b[1]){y.label=b[1],b=I;break}if(b&&y.label<b[2]){y.label=b[2],y.ops.push(I);break}b[2]&&y.ops.pop(),y.trys.pop();continue}I=s.call(c,y)}catch(O){I=[6,O],d=0}finally{l=b=0}if(5&I[0])throw I[1];return{value:I[0]?I[1]:void 0,done:!0}}([E,R])}}};Object.defineProperty(e,"__esModule",{value:!0});var p=o(119),u=o(264);e.createPrivateKey=function(){return n(this,void 0,void 0,function(){var c;return f(this,function(s){switch(s.label){case 0:return[4,u.getRandomBytes(32)];case 1:return c=s.sent(),p.privateKeyVerify(c)?[2,c]:[3,0];case 2:return[2]}})})},e.createPrivateKeySync=function(){for(;;){var c=u.getRandomBytesSync(32);if(p.privateKeyVerify(c))return c}},function(c){for(var s in c)e.hasOwnProperty(s)||(e[s]=c[s])}(o(119))},function(i,e,o){i.exports=o(242)(o(243))},function(i,e,o){var n=e;function f(u){return u.length===1?"0"+u:u}function p(u){for(var c="",s=0;s<u.length;s++)c+=f(u[s].toString(16));return c}n.toArray=function(u,c){if(Array.isArray(u))return u.slice();if(!u)return[];var s=[];if(typeof u!="string"){for(var l=0;l<u.length;l++)s[l]=0|u[l];return s}if(c==="hex")for((u=u.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(u="0"+u),l=0;l<u.length;l+=2)s.push(parseInt(u[l]+u[l+1],16));else for(l=0;l<u.length;l++){var d=u.charCodeAt(l),b=d>>8,v=255&d;b?s.push(b,v):s.push(v)}return s},n.zero2=f,n.toHex=p,n.encode=function(u,c){return c==="hex"?p(u):u}},function(i,e,o){var n;function f(u){this.rand=u}if(i.exports=function(u){return n||(n=new f(null)),n.generate(u)},i.exports.Rand=f,f.prototype.generate=function(u){return this._rand(u)},f.prototype._rand=function(u){if(this.rand.getBytes)return this.rand.getBytes(u);for(var c=new Uint8Array(u),s=0;s<c.length;s++)c[s]=this.rand.getByte();return c},typeof self=="object")self.crypto&&self.crypto.getRandomValues?f.prototype._rand=function(u){var c=new Uint8Array(u);return self.crypto.getRandomValues(c),c}:self.msCrypto&&self.msCrypto.getRandomValues?f.prototype._rand=function(u){var c=new Uint8Array(u);return self.msCrypto.getRandomValues(c),c}:typeof window=="object"&&(f.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var p=o(246);if(typeof p.randomBytes!="function")throw new Error("Not supported");f.prototype._rand=function(u){return p.randomBytes(u)}}catch{}},function(i,e,o){var n=e;n.base=o(45),n.short=o(247),n.mont=o(248),n.edwards=o(249)},function(i,e,o){var n=o(15).rotr32;function f(c,s,l){return c&s^~c&l}function p(c,s,l){return c&s^c&l^s&l}function u(c,s,l){return c^s^l}e.ft_1=function(c,s,l,d){return c===0?f(s,l,d):c===1||c===3?u(s,l,d):c===2?p(s,l,d):void 0},e.ch32=f,e.maj32=p,e.p32=u,e.s0_256=function(c){return n(c,2)^n(c,13)^n(c,22)},e.s1_256=function(c){return n(c,6)^n(c,11)^n(c,25)},e.g0_256=function(c){return n(c,7)^n(c,18)^c>>>3},e.g1_256=function(c){return n(c,17)^n(c,19)^c>>>10}},function(i,e,o){var n=o(15),f=o(37),p=o(123),u=o(22),c=n.sum32,s=n.sum32_4,l=n.sum32_5,d=p.ch32,b=p.maj32,v=p.s0_256,y=p.s1_256,x=p.g0_256,E=p.g1_256,R=f.BlockHash,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];function O(){if(!(this instanceof O))return new O;R.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=I,this.W=new Array(64)}n.inherits(O,R),i.exports=O,O.blockSize=512,O.outSize=256,O.hmacStrength=192,O.padLength=64,O.prototype._update=function(A,P){for(var N=this.W,L=0;L<16;L++)N[L]=A[P+L];for(;L<N.length;L++)N[L]=s(E(N[L-2]),N[L-7],x(N[L-15]),N[L-16]);var H=this.h[0],J=this.h[1],G=this.h[2],z=this.h[3],S=this.h[4],a=this.h[5],w=this.h[6],h=this.h[7];for(u(this.k.length===N.length),L=0;L<N.length;L++){var m=l(h,y(S),d(S,a,w),this.k[L],N[L]),g=c(v(H),b(H,J,G));h=w,w=a,a=S,S=c(z,m),z=G,G=J,J=H,H=c(m,g)}this.h[0]=c(this.h[0],H),this.h[1]=c(this.h[1],J),this.h[2]=c(this.h[2],G),this.h[3]=c(this.h[3],z),this.h[4]=c(this.h[4],S),this.h[5]=c(this.h[5],a),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],h)},O.prototype._digest=function(A){return A==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(i,e,o){var n=o(15),f=o(37),p=o(22),u=n.rotr64_hi,c=n.rotr64_lo,s=n.shr64_hi,l=n.shr64_lo,d=n.sum64,b=n.sum64_hi,v=n.sum64_lo,y=n.sum64_4_hi,x=n.sum64_4_lo,E=n.sum64_5_hi,R=n.sum64_5_lo,I=f.BlockHash,O=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function A(){if(!(this instanceof A))return new A;I.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=O,this.W=new Array(160)}function P(g,_,T,k,M){var B=g&T^~g&M;return B<0&&(B+=4294967296),B}function N(g,_,T,k,M,B){var Y=_&k^~_&B;return Y<0&&(Y+=4294967296),Y}function L(g,_,T,k,M){var B=g&T^g&M^T&M;return B<0&&(B+=4294967296),B}function H(g,_,T,k,M,B){var Y=_&k^_&B^k&B;return Y<0&&(Y+=4294967296),Y}function J(g,_){var T=u(g,_,28)^u(_,g,2)^u(_,g,7);return T<0&&(T+=4294967296),T}function G(g,_){var T=c(g,_,28)^c(_,g,2)^c(_,g,7);return T<0&&(T+=4294967296),T}function z(g,_){var T=u(g,_,14)^u(g,_,18)^u(_,g,9);return T<0&&(T+=4294967296),T}function S(g,_){var T=c(g,_,14)^c(g,_,18)^c(_,g,9);return T<0&&(T+=4294967296),T}function a(g,_){var T=u(g,_,1)^u(g,_,8)^s(g,_,7);return T<0&&(T+=4294967296),T}function w(g,_){var T=c(g,_,1)^c(g,_,8)^l(g,_,7);return T<0&&(T+=4294967296),T}function h(g,_){var T=u(g,_,19)^u(_,g,29)^s(g,_,6);return T<0&&(T+=4294967296),T}function m(g,_){var T=c(g,_,19)^c(_,g,29)^l(g,_,6);return T<0&&(T+=4294967296),T}n.inherits(A,I),i.exports=A,A.blockSize=1024,A.outSize=512,A.hmacStrength=192,A.padLength=128,A.prototype._prepareBlock=function(g,_){for(var T=this.W,k=0;k<32;k++)T[k]=g[_+k];for(;k<T.length;k+=2){var M=h(T[k-4],T[k-3]),B=m(T[k-4],T[k-3]),Y=T[k-14],C=T[k-13],K=a(T[k-30],T[k-29]),W=w(T[k-30],T[k-29]),U=T[k-32],q=T[k-31];T[k]=y(M,B,Y,C,K,W,U,q),T[k+1]=x(M,B,Y,C,K,W,U,q)}},A.prototype._update=function(g,_){this._prepareBlock(g,_);var T=this.W,k=this.h[0],M=this.h[1],B=this.h[2],Y=this.h[3],C=this.h[4],K=this.h[5],W=this.h[6],U=this.h[7],q=this.h[8],j=this.h[9],D=this.h[10],F=this.h[11],$=this.h[12],V=this.h[13],Z=this.h[14],ee=this.h[15];p(this.k.length===T.length);for(var re=0;re<T.length;re+=2){var ue=Z,fe=ee,oe=z(q,j),ae=S(q,j),ie=P(q,j,D,F,$),te=N(q,j,D,F,$,V),le=this.k[re],ge=this.k[re+1],he=T[re],ye=T[re+1],Ie=E(ue,fe,oe,ae,ie,te,le,ge,he,ye),pe=R(ue,fe,oe,ae,ie,te,le,ge,he,ye);ue=J(k,M),fe=G(k,M),oe=L(k,M,B,Y,C),ae=H(k,M,B,Y,C,K);var Oe=b(ue,fe,oe,ae),Ge=v(ue,fe,oe,ae);Z=$,ee=V,$=D,V=F,D=q,F=j,q=b(W,U,Ie,pe),j=v(U,U,Ie,pe),W=C,U=K,C=B,K=Y,B=k,Y=M,k=b(Ie,pe,Oe,Ge),M=v(Ie,pe,Oe,Ge)}d(this.h,0,k,M),d(this.h,2,B,Y),d(this.h,4,C,K),d(this.h,6,W,U),d(this.h,8,q,j),d(this.h,10,D,F),d(this.h,12,$,V),d(this.h,14,Z,ee)},A.prototype._digest=function(g){return g==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(i,e,o){var n=o(3),f=o(271),p=o(280),u=o(281),c=o(286);function s(l){c.call(this,"digest"),this._hash=l}n(s,c),s.prototype._update=function(l){this._hash.update(l)},s.prototype._final=function(){return this._hash.digest()},i.exports=function(l){return(l=l.toLowerCase())==="md5"?new f:l==="rmd160"||l==="ripemd160"?new p:new s(u(l))}},function(i,e,o){var n=o(13).Buffer,f=o(272).Transform;function p(u){f.call(this),this._block=n.allocUnsafe(u),this._blockSize=u,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}o(3)(p,f),p.prototype._transform=function(u,c,s){var l=null;try{this.update(u,c)}catch(d){l=d}s(l)},p.prototype._flush=function(u){var c=null;try{this.push(this.digest())}catch(s){c=s}u(c)},p.prototype.update=function(u,c){if(function(y,x){if(!n.isBuffer(y)&&typeof y!="string")throw new TypeError(x+" must be a string or a buffer")}(u,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(u)||(u=n.from(u,c));for(var s=this._block,l=0;this._blockOffset+u.length-l>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)s[d++]=u[l++];this._update(),this._blockOffset=0}for(;l<u.length;)s[this._blockOffset++]=u[l++];for(var b=0,v=8*u.length;v>0;++b)this._length[b]+=v,(v=this._length[b]/4294967296|0)>0&&(this._length[b]-=4294967296*v);return this},p.prototype._update=function(){throw new Error("_update is not implemented")},p.prototype.digest=function(u){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var c=this._digest();u!==void 0&&(c=c.toString(u)),this._block.fill(0),this._blockOffset=0;for(var s=0;s<4;++s)this._length[s]=0;return c},p.prototype._digest=function(){throw new Error("_digest is not implemented")},i.exports=p},function(i,e,o){(function(n,f){var p;i.exports=z,z.ReadableState=G,o(12).EventEmitter;var u=function(U,q){return U.listeners(q).length},c=o(129),s=o(2).Buffer,l=n.Uint8Array||function(){},d,b=o(273);d=b&&b.debuglog?b.debuglog("stream"):function(){};var v,y,x,E=o(274),R=o(130),I=o(131).getHighWaterMark,O=o(29).codes,A=O.ERR_INVALID_ARG_TYPE,P=O.ERR_STREAM_PUSH_AFTER_EOF,N=O.ERR_METHOD_NOT_IMPLEMENTED,L=O.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;o(3)(z,c);var H=R.errorOrDestroy,J=["error","close","destroy","pause","resume"];function G(U,q,j){p=p||o(30),U=U||{},typeof j!="boolean"&&(j=q instanceof p),this.objectMode=!!U.objectMode,j&&(this.objectMode=this.objectMode||!!U.readableObjectMode),this.highWaterMark=I(this,U,"readableHighWaterMark",j),this.buffer=new E,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=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.destroyed=!1,this.defaultEncoding=U.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,U.encoding&&(v||(v=o(20).StringDecoder),this.decoder=new v(U.encoding),this.encoding=U.encoding)}function z(U){if(p=p||o(30),!(this instanceof z))return new z(U);var q=this instanceof p;this._readableState=new G(U,this,q),this.readable=!0,U&&(typeof U.read=="function"&&(this._read=U.read),typeof U.destroy=="function"&&(this._destroy=U.destroy)),c.call(this)}function S(U,q,j,D,F){d("readableAddChunk",q);var $,V=U._readableState;if(q===null)V.reading=!1,function(Z,ee){if(d("onEofChunk"),!ee.ended){if(ee.decoder){var re=ee.decoder.end();re&&re.length&&(ee.buffer.push(re),ee.length+=ee.objectMode?1:re.length)}ee.ended=!0,ee.sync?h(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,m(Z)))}}(U,V);else if(F||($=function(Z,ee){var re;ue=ee,s.isBuffer(ue)||ue instanceof l||typeof ee=="string"||ee===void 0||Z.objectMode||(re=new A("chunk",["string","Buffer","Uint8Array"],ee));var ue;return re}(V,q)),$)H(U,$);else if(V.objectMode||q&&q.length>0)if(typeof q=="string"||V.objectMode||Object.getPrototypeOf(q)===s.prototype||(q=function(Z){return s.from(Z)}(q)),D)V.endEmitted?H(U,new L):a(U,V,q,!0);else if(V.ended)H(U,new P);else{if(V.destroyed)return!1;V.reading=!1,V.decoder&&!j?(q=V.decoder.write(q),V.objectMode||q.length!==0?a(U,V,q,!1):g(U,V)):a(U,V,q,!1)}else D||(V.reading=!1,g(U,V));return!V.ended&&(V.length<V.highWaterMark||V.length===0)}function a(U,q,j,D){q.flowing&&q.length===0&&!q.sync?(q.awaitDrain=0,U.emit("data",j)):(q.length+=q.objectMode?1:j.length,D?q.buffer.unshift(j):q.buffer.push(j),q.needReadable&&h(U)),g(U,q)}Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),z.prototype.destroy=R.destroy,z.prototype._undestroy=R.undestroy,z.prototype._destroy=function(U,q){q(U)},z.prototype.push=function(U,q){var j,D=this._readableState;return D.objectMode?j=!0:typeof U=="string"&&((q=q||D.defaultEncoding)!==D.encoding&&(U=s.from(U,q),q=""),j=!0),S(this,U,q,!1,j)},z.prototype.unshift=function(U){return S(this,U,null,!0,!1)},z.prototype.isPaused=function(){return this._readableState.flowing===!1},z.prototype.setEncoding=function(U){v||(v=o(20).StringDecoder);var q=new v(U);this._readableState.decoder=q,this._readableState.encoding=this._readableState.decoder.encoding;for(var j=this._readableState.buffer.head,D="";j!==null;)D+=q.write(j.data),j=j.next;return this._readableState.buffer.clear(),D!==""&&this._readableState.buffer.push(D),this._readableState.length=D.length,this};function w(U,q){return U<=0||q.length===0&&q.ended?0:q.objectMode?1:U!=U?q.flowing&&q.length?q.buffer.head.data.length:q.length:(U>q.highWaterMark&&(q.highWaterMark=function(j){return j>=1073741824?j=1073741824:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}(U)),U<=q.length?U:q.ended?q.length:(q.needReadable=!0,0))}function h(U){var q=U._readableState;d("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(d("emitReadable",q.flowing),q.emittedReadable=!0,f.nextTick(m,U))}function m(U){var q=U._readableState;d("emitReadable_",q.destroyed,q.length,q.ended),q.destroyed||!q.length&&!q.ended||(U.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,B(U)}function g(U,q){q.readingMore||(q.readingMore=!0,f.nextTick(_,U,q))}function _(U,q){for(;!q.reading&&!q.ended&&(q.length<q.highWaterMark||q.flowing&&q.length===0);){var j=q.length;if(d("maybeReadMore read 0"),U.read(0),j===q.length)break}q.readingMore=!1}function T(U){var q=U._readableState;q.readableListening=U.listenerCount("readable")>0,q.resumeScheduled&&!q.paused?q.flowing=!0:U.listenerCount("data")>0&&U.resume()}function k(U){d("readable nexttick read 0"),U.read(0)}function M(U,q){d("resume",q.reading),q.reading||U.read(0),q.resumeScheduled=!1,U.emit("resume"),B(U),q.flowing&&!q.reading&&U.read(0)}function B(U){var q=U._readableState;for(d("flow",q.flowing);q.flowing&&U.read()!==null;);}function Y(U,q){return q.length===0?null:(q.objectMode?j=q.buffer.shift():!U||U>=q.length?(j=q.decoder?q.buffer.join(""):q.buffer.length===1?q.buffer.first():q.buffer.concat(q.length),q.buffer.clear()):j=q.buffer.consume(U,q.decoder),j);var j}function C(U){var q=U._readableState;d("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,f.nextTick(K,q,U))}function K(U,q){if(d("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,q.readable=!1,q.emit("end"),U.autoDestroy)){var j=q._writableState;(!j||j.autoDestroy&&j.finished)&&q.destroy()}}function W(U,q){for(var j=0,D=U.length;j<D;j++)if(U[j]===q)return j;return-1}z.prototype.read=function(U){d("read",U),U=parseInt(U,10);var q=this._readableState,j=U;if(U!==0&&(q.emittedReadable=!1),U===0&&q.needReadable&&((q.highWaterMark!==0?q.length>=q.highWaterMark:q.length>0)||q.ended))return d("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?C(this):h(this),null;if((U=w(U,q))===0&&q.ended)return q.length===0&&C(this),null;var D,F=q.needReadable;return d("need readable",F),(q.length===0||q.length-U<q.highWaterMark)&&d("length less than watermark",F=!0),q.ended||q.reading?d("reading or ended",F=!1):F&&(d("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(U=w(j,q))),(D=U>0?Y(U,q):null)===null?(q.needReadable=q.length<=q.highWaterMark,U=0):(q.length-=U,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),j!==U&&q.ended&&C(this)),D!==null&&this.emit("data",D),D},z.prototype._read=function(U){H(this,new N("_read()"))},z.prototype.pipe=function(U,q){var j=this,D=this._readableState;switch(D.pipesCount){case 0:D.pipes=U;break;case 1:D.pipes=[D.pipes,U];break;default:D.pipes.push(U)}D.pipesCount+=1,d("pipe count=%d opts=%j",D.pipesCount,q);var F=(!q||q.end!==!1)&&U!==f.stdout&&U!==f.stderr?V:ae;function $(ie,te){d("onunpipe"),ie===j&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,d("cleanup"),U.removeListener("close",fe),U.removeListener("finish",oe),U.removeListener("drain",Z),U.removeListener("error",ue),U.removeListener("unpipe",$),j.removeListener("end",V),j.removeListener("end",ae),j.removeListener("data",re),ee=!0,!D.awaitDrain||U._writableState&&!U._writableState.needDrain||Z())}function V(){d("onend"),U.end()}D.endEmitted?f.nextTick(F):j.once("end",F),U.on("unpipe",$);var Z=function(ie){return function(){var te=ie._readableState;d("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&u(ie,"data")&&(te.flowing=!0,B(ie))}}(j);U.on("drain",Z);var ee=!1;function re(ie){d("ondata");var te=U.write(ie);d("dest.write",te),te===!1&&((D.pipesCount===1&&D.pipes===U||D.pipesCount>1&&W(D.pipes,U)!==-1)&&!ee&&(d("false write response, pause",D.awaitDrain),D.awaitDrain++),j.pause())}function ue(ie){d("onerror",ie),ae(),U.removeListener("error",ue),u(U,"error")===0&&H(U,ie)}function fe(){U.removeListener("finish",oe),ae()}function oe(){d("onfinish"),U.removeListener("close",fe),ae()}function ae(){d("unpipe"),j.unpipe(U)}return j.on("data",re),function(ie,te,le){if(typeof ie.prependListener=="function")return ie.prependListener(te,le);ie._events&&ie._events[te]?Array.isArray(ie._events[te])?ie._events[te].unshift(le):ie._events[te]=[le,ie._events[te]]:ie.on(te,le)}(U,"error",ue),U.once("close",fe),U.once("finish",oe),U.emit("pipe",j),D.flowing||(d("pipe resume"),j.resume()),U},z.prototype.unpipe=function(U){var q=this._readableState,j={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return U&&U!==q.pipes||(U||(U=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,U&&U.emit("unpipe",this,j)),this;if(!U){var D=q.pipes,F=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var $=0;$<F;$++)D[$].emit("unpipe",this,{hasUnpiped:!1});return this}var V=W(q.pipes,U);return V===-1||(q.pipes.splice(V,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),U.emit("unpipe",this,j)),this},z.prototype.on=function(U,q){var j=c.prototype.on.call(this,U,q),D=this._readableState;return U==="data"?(D.readableListening=this.listenerCount("readable")>0,D.flowing!==!1&&this.resume()):U==="readable"&&(D.endEmitted||D.readableListening||(D.readableListening=D.needReadable=!0,D.flowing=!1,D.emittedReadable=!1,d("on readable",D.length,D.reading),D.length?h(this):D.reading||f.nextTick(k,this))),j},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(U,q){var j=c.prototype.removeListener.call(this,U,q);return U==="readable"&&f.nextTick(T,this),j},z.prototype.removeAllListeners=function(U){var q=c.prototype.removeAllListeners.apply(this,arguments);return U!=="readable"&&U!==void 0||f.nextTick(T,this),q},z.prototype.resume=function(){var U=this._readableState;return U.flowing||(d("resume"),U.flowing=!U.readableListening,function(q,j){j.resumeScheduled||(j.resumeScheduled=!0,f.nextTick(M,q,j))}(this,U)),U.paused=!1,this},z.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},z.prototype.wrap=function(U){var q=this,j=this._readableState,D=!1;for(var F in U.on("end",function(){if(d("wrapped end"),j.decoder&&!j.ended){var V=j.decoder.end();V&&V.length&&q.push(V)}q.push(null)}),U.on("data",function(V){d("wrapped data"),j.decoder&&(V=j.decoder.write(V)),j.objectMode&&V==null||(j.objectMode||V&&V.length)&&(q.push(V)||(D=!0,U.pause()))}),U)this[F]===void 0&&typeof U[F]=="function"&&(this[F]=function(V){return function(){return U[V].apply(U,arguments)}}(F));for(var $=0;$<J.length;$++)U.on(J[$],this.emit.bind(this,J[$]));return this._read=function(V){d("wrapped _read",V),D&&(D=!1,U.resume())},this},typeof Symbol=="function"&&(z.prototype[Symbol.asyncIterator]=function(){return y===void 0&&(y=o(276)),y(this)}),Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(z.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(z.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),z._fromList=Y,Object.defineProperty(z.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(z.from=function(U,q){return x===void 0&&(x=o(277)),x(z,U,q)})}).call(this,o(6),o(5))},function(i,e,o){i.exports=o(12).EventEmitter},function(i,e,o){(function(n){function f(c,s){u(c,s),p(c)}function p(c){c._writableState&&!c._writableState.emitClose||c._readableState&&!c._readableState.emitClose||c.emit("close")}function u(c,s){c.emit("error",s)}i.exports={destroy:function(c,s){var l=this,d=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return d||b?(s?s(c):c&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(u,this,c)):n.nextTick(u,this,c)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(v){!s&&v?l._writableState?l._writableState.errorEmitted?n.nextTick(p,l):(l._writableState.errorEmitted=!0,n.nextTick(f,l,v)):n.nextTick(f,l,v):s?(n.nextTick(p,l),s(v)):n.nextTick(p,l)}),this)},undestroy:function(){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)},errorOrDestroy:function(c,s){var l=c._readableState,d=c._writableState;l&&l.autoDestroy||d&&d.autoDestroy?c.destroy(s):c.emit("error",s)}}}).call(this,o(5))},function(i,e,o){var n=o(29).codes.ERR_INVALID_OPT_VALUE;i.exports={getHighWaterMark:function(f,p,u,c){var s=function(l,d,b){return l.highWaterMark!=null?l.highWaterMark:d?l[b]:null}(p,c,u);if(s!=null){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(c?u:"highWaterMark",s);return Math.floor(s)}return f.objectMode?16:16384}}},function(i,e,o){(function(n,f){function p(_){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(k,M,B){var Y=k.entry;for(k.entry=null;Y;){var C=Y.callback;M.pendingcb--,C(B),Y=Y.next}M.corkedRequestsFree.next=k})(T,_)}}var u;i.exports=z,z.WritableState=G;var c={deprecate:o(54)},s=o(129),l=o(2).Buffer,d=n.Uint8Array||function(){},b,v=o(130),y=o(131).getHighWaterMark,x=o(29).codes,E=x.ERR_INVALID_ARG_TYPE,R=x.ERR_METHOD_NOT_IMPLEMENTED,I=x.ERR_MULTIPLE_CALLBACK,O=x.ERR_STREAM_CANNOT_PIPE,A=x.ERR_STREAM_DESTROYED,P=x.ERR_STREAM_NULL_VALUES,N=x.ERR_STREAM_WRITE_AFTER_END,L=x.ERR_UNKNOWN_ENCODING,H=v.errorOrDestroy;function J(){}function G(_,T,k){u=u||o(30),_=_||{},typeof k!="boolean"&&(k=T instanceof u),this.objectMode=!!_.objectMode,k&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=y(this,_,"writableHighWaterMark",k),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var M=_.decodeStrings===!1;this.decodeStrings=!M,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(B){(function(Y,C){var K=Y._writableState,W=K.sync,U=K.writecb;if(typeof U!="function")throw new I;if(function(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}(K),C)(function(j,D,F,$,V){--D.pendingcb,F?(f.nextTick(V,$),f.nextTick(g,j,D),j._writableState.errorEmitted=!0,H(j,$)):(V($),j._writableState.errorEmitted=!0,H(j,$),g(j,D))})(Y,K,W,C,U);else{var q=h(K)||Y.destroyed;q||K.corked||K.bufferProcessing||!K.bufferedRequest||w(Y,K),W?f.nextTick(a,Y,K,q,U):a(Y,K,q,U)}})(T,B)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}function z(_){var T=this instanceof(u=u||o(30));if(!T&&!b.call(z,this))return new z(_);this._writableState=new G(_,this,T),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),s.call(this)}function S(_,T,k,M,B,Y,C){T.writelen=M,T.writecb=C,T.writing=!0,T.sync=!0,T.destroyed?T.onwrite(new A("write")):k?_._writev(B,T.onwrite):_._write(B,Y,T.onwrite),T.sync=!1}function a(_,T,k,M){k||function(B,Y){Y.length===0&&Y.needDrain&&(Y.needDrain=!1,B.emit("drain"))}(_,T),T.pendingcb--,M(),g(_,T)}function w(_,T){T.bufferProcessing=!0;var k=T.bufferedRequest;if(_._writev&&k&&k.next){var M=T.bufferedRequestCount,B=new Array(M),Y=T.corkedRequestsFree;Y.entry=k;for(var C=0,K=!0;k;)B[C]=k,k.isBuf||(K=!1),k=k.next,C+=1;B.allBuffers=K,S(_,T,!0,T.length,B,"",Y.finish),T.pendingcb++,T.lastBufferedRequest=null,Y.next?(T.corkedRequestsFree=Y.next,Y.next=null):T.corkedRequestsFree=new p(T),T.bufferedRequestCount=0}else{for(;k;){var W=k.chunk,U=k.encoding,q=k.callback;if(S(_,T,!1,T.objectMode?1:W.length,W,U,q),k=k.next,T.bufferedRequestCount--,T.writing)break}k===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=k,T.bufferProcessing=!1}function h(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function m(_,T){_._final(function(k){T.pendingcb--,k&&H(_,k),T.prefinished=!0,_.emit("prefinish"),g(_,T)})}function g(_,T){var k=h(T);if(k&&(function(B,Y){Y.prefinished||Y.finalCalled||(typeof B._final!="function"||Y.destroyed?(Y.prefinished=!0,B.emit("prefinish")):(Y.pendingcb++,Y.finalCalled=!0,f.nextTick(m,B,Y)))}(_,T),T.pendingcb===0&&(T.finished=!0,_.emit("finish"),T.autoDestroy))){var M=_._readableState;(!M||M.autoDestroy&&M.endEmitted)&&_.destroy()}return k}o(3)(z,s),G.prototype.getBuffer=function(){for(var _=this.bufferedRequest,T=[];_;)T.push(_),_=_.next;return T},function(){try{Object.defineProperty(G.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(_){return!!b.call(this,_)||this===z&&_&&_._writableState instanceof G}})):b=function(_){return _ instanceof this},z.prototype.pipe=function(){H(this,new O)},z.prototype.write=function(_,T,k){var M,B=this._writableState,Y=!1,C=!B.objectMode&&(M=_,l.isBuffer(M)||M instanceof d);return C&&!l.isBuffer(_)&&(_=function(K){return l.from(K)}(_)),typeof T=="function"&&(k=T,T=null),C?T="buffer":T||(T=B.defaultEncoding),typeof k!="function"&&(k=J),B.ending?function(K,W){var U=new N;H(K,U),f.nextTick(W,U)}(this,k):(C||function(K,W,U,q){var j;return U===null?j=new P:typeof U=="string"||W.objectMode||(j=new E("chunk",["string","Buffer"],U)),!j||(H(K,j),f.nextTick(q,j),!1)}(this,B,_,k))&&(B.pendingcb++,Y=function(K,W,U,q,j,D){if(!U){var F=function(ee,re,ue){return ee.objectMode||ee.decodeStrings===!1||typeof re!="string"||(re=l.from(re,ue)),re}(W,q,j);q!==F&&(U=!0,j="buffer",q=F)}var $=W.objectMode?1:q.length;W.length+=$;var V=W.length<W.highWaterMark;if(V||(W.needDrain=!0),W.writing||W.corked){var Z=W.lastBufferedRequest;W.lastBufferedRequest={chunk:q,encoding:j,isBuf:U,callback:D,next:null},Z?Z.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else S(K,W,!1,$,q,j,D);return V}(this,B,C,_,T,k)),Y},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||w(this,_))},z.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new L(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),z.prototype._write=function(_,T,k){k(new R("_write()"))},z.prototype._writev=null,z.prototype.end=function(_,T,k){var M=this._writableState;return typeof _=="function"?(k=_,_=null,T=null):typeof T=="function"&&(k=T,T=null),_!=null&&this.write(_,T),M.corked&&(M.corked=1,this.uncork()),M.ending||function(B,Y,C){Y.ending=!0,g(B,Y),C&&(Y.finished?f.nextTick(C):B.once("finish",C)),Y.ended=!0,B.writable=!1}(this,M,k),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),z.prototype.destroy=v.destroy,z.prototype._undestroy=v.undestroy,z.prototype._destroy=function(_,T){T(_)}}).call(this,o(6),o(5))},function(i,e,o){i.exports=d;var n=o(29).codes,f=n.ERR_METHOD_NOT_IMPLEMENTED,p=n.ERR_MULTIPLE_CALLBACK,u=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,c=n.ERR_TRANSFORM_WITH_LENGTH_0,s=o(30);function l(y,x){var E=this._transformState;E.transforming=!1;var R=E.writecb;if(R===null)return this.emit("error",new p);E.writechunk=null,E.writecb=null,x!=null&&this.push(x),R(y);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function d(y){if(!(this instanceof d))return new d(y);s.call(this,y),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",b)}function b(){var y=this;typeof this._flush!="function"||this._readableState.destroyed?v(this,null,null):this._flush(function(x,E){v(y,x,E)})}function v(y,x,E){if(x)return y.emit("error",x);if(E!=null&&y.push(E),y._writableState.length)throw new c;if(y._transformState.transforming)throw new u;return y.push(null)}o(3)(d,s),d.prototype.push=function(y,x){return this._transformState.needTransform=!1,s.prototype.push.call(this,y,x)},d.prototype._transform=function(y,x,E){E(new f("_transform()"))},d.prototype._write=function(y,x,E){var R=this._transformState;if(R.writecb=E,R.writechunk=y,R.writeencoding=x,!R.transforming){var I=this._readableState;(R.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},d.prototype._read=function(y){var x=this._transformState;x.writechunk===null||x.transforming?x.needTransform=!0:(x.transforming=!0,this._transform(x.writechunk,x.writeencoding,x.afterTransform))},d.prototype._destroy=function(y,x){s.prototype._destroy.call(this,y,function(E){x(E)})}},function(i,e,o){var n=o(3),f=o(31),p=o(13).Buffer,u=[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],c=new Array(64);function s(){this.init(),this._w=c,f.call(this,64,56)}function l(x,E,R){return R^x&(E^R)}function d(x,E,R){return x&E|R&(x|E)}function b(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function v(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function y(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}n(s,f),s.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},s.prototype._update=function(x){for(var E,R=this._w,I=0|this._a,O=0|this._b,A=0|this._c,P=0|this._d,N=0|this._e,L=0|this._f,H=0|this._g,J=0|this._h,G=0;G<16;++G)R[G]=x.readInt32BE(4*G);for(;G<64;++G)R[G]=0|(((E=R[G-2])>>>17|E<<15)^(E>>>19|E<<13)^E>>>10)+R[G-7]+y(R[G-15])+R[G-16];for(var z=0;z<64;++z){var S=J+v(N)+l(N,L,H)+u[z]+R[z]|0,a=b(I)+d(I,O,A)|0;J=H,H=L,L=N,N=P+S|0,P=A,A=O,O=I,I=S+a|0}this._a=I+this._a|0,this._b=O+this._b|0,this._c=A+this._c|0,this._d=P+this._d|0,this._e=N+this._e|0,this._f=L+this._f|0,this._g=H+this._g|0,this._h=J+this._h|0},s.prototype._hash=function(){var x=p.allocUnsafe(32);return x.writeInt32BE(this._a,0),x.writeInt32BE(this._b,4),x.writeInt32BE(this._c,8),x.writeInt32BE(this._d,12),x.writeInt32BE(this._e,16),x.writeInt32BE(this._f,20),x.writeInt32BE(this._g,24),x.writeInt32BE(this._h,28),x},i.exports=s},function(i,e,o){var n=o(3),f=o(31),p=o(13).Buffer,u=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],c=new Array(160);function s(){this.init(),this._w=c,f.call(this,128,112)}function l(O,A,P){return P^O&(A^P)}function d(O,A,P){return O&A|P&(O|A)}function b(O,A){return(O>>>28|A<<4)^(A>>>2|O<<30)^(A>>>7|O<<25)}function v(O,A){return(O>>>14|A<<18)^(O>>>18|A<<14)^(A>>>9|O<<23)}function y(O,A){return(O>>>1|A<<31)^(O>>>8|A<<24)^O>>>7}function x(O,A){return(O>>>1|A<<31)^(O>>>8|A<<24)^(O>>>7|A<<25)}function E(O,A){return(O>>>19|A<<13)^(A>>>29|O<<3)^O>>>6}function R(O,A){return(O>>>19|A<<13)^(A>>>29|O<<3)^(O>>>6|A<<26)}function I(O,A){return O>>>0<A>>>0?1:0}n(s,f),s.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},s.prototype._update=function(O){for(var A=this._w,P=0|this._ah,N=0|this._bh,L=0|this._ch,H=0|this._dh,J=0|this._eh,G=0|this._fh,z=0|this._gh,S=0|this._hh,a=0|this._al,w=0|this._bl,h=0|this._cl,m=0|this._dl,g=0|this._el,_=0|this._fl,T=0|this._gl,k=0|this._hl,M=0;M<32;M+=2)A[M]=O.readInt32BE(4*M),A[M+1]=O.readInt32BE(4*M+4);for(;M<160;M+=2){var B=A[M-30],Y=A[M-30+1],C=y(B,Y),K=x(Y,B),W=E(B=A[M-4],Y=A[M-4+1]),U=R(Y,B),q=A[M-14],j=A[M-14+1],D=A[M-32],F=A[M-32+1],$=K+j|0,V=C+q+I($,K)|0;V=(V=V+W+I($=$+U|0,U)|0)+D+I($=$+F|0,F)|0,A[M]=V,A[M+1]=$}for(var Z=0;Z<160;Z+=2){V=A[Z],$=A[Z+1];var ee=d(P,N,L),re=d(a,w,h),ue=b(P,a),fe=b(a,P),oe=v(J,g),ae=v(g,J),ie=u[Z],te=u[Z+1],le=l(J,G,z),ge=l(g,_,T),he=k+ae|0,ye=S+oe+I(he,k)|0;ye=(ye=(ye=ye+le+I(he=he+ge|0,ge)|0)+ie+I(he=he+te|0,te)|0)+V+I(he=he+$|0,$)|0;var Ie=fe+re|0,pe=ue+ee+I(Ie,fe)|0;S=z,k=T,z=G,T=_,G=J,_=g,J=H+ye+I(g=m+he|0,m)|0,H=L,m=h,L=N,h=w,N=P,w=a,P=ye+pe+I(a=he+Ie|0,he)|0}this._al=this._al+a|0,this._bl=this._bl+w|0,this._cl=this._cl+h|0,this._dl=this._dl+m|0,this._el=this._el+g|0,this._fl=this._fl+_|0,this._gl=this._gl+T|0,this._hl=this._hl+k|0,this._ah=this._ah+P+I(this._al,a)|0,this._bh=this._bh+N+I(this._bl,w)|0,this._ch=this._ch+L+I(this._cl,h)|0,this._dh=this._dh+H+I(this._dl,m)|0,this._eh=this._eh+J+I(this._el,g)|0,this._fh=this._fh+G+I(this._fl,_)|0,this._gh=this._gh+z+I(this._gl,T)|0,this._hh=this._hh+S+I(this._hl,k)|0},s.prototype._hash=function(){var O=p.allocUnsafe(64);function A(P,N,L){O.writeInt32BE(P,L),O.writeInt32BE(N,L+4)}return A(this._ah,this._al,0),A(this._bh,this._bl,8),A(this._ch,this._cl,16),A(this._dh,this._dl,24),A(this._eh,this._el,32),A(this._fh,this._fl,40),A(this._gh,this._gl,48),A(this._hh,this._hl,56),O},i.exports=s},function(i,e){i.exports=function(o){if(typeof o!="string")throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof o+", while checking isHexPrefixed.");return o.slice(0,2)==="0x"}},function(i,e,o){const n=(f,p)=>function(){const u=p.promiseModule,c=new Array(arguments.length);for(let s=0;s<arguments.length;s++)c[s]=arguments[s];return new u((s,l)=>{p.errorFirst?c.push(function(d,b){if(p.multiArgs){const v=new Array(arguments.length-1);for(let y=1;y<arguments.length;y++)v[y-1]=arguments[y];d?(v.unshift(d),l(v)):s(v)}else d?l(d):s(b)}):c.push(function(d){if(p.multiArgs){const b=new Array(arguments.length-1);for(let v=0;v<arguments.length;v++)b[v]=arguments[v];s(b)}else s(d)}),f.apply(this,c)})};i.exports=(f,p)=>{p=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},p);const u=s=>{const l=d=>typeof d=="string"?s===d:d.test(s);return p.include?p.include.some(l):!p.exclude.some(l)};let c;c=typeof f=="function"?function(){return p.excludeMain?f.apply(this,arguments):n(f,p).apply(this,arguments)}:Object.create(Object.getPrototypeOf(f));for(const s in f){const l=f[s];c[s]=typeof l=="function"&&u(s)?n(l,p):l}return c}},function(i,e,o){const n=o(44),f=o(296)();function p(s){this.currentProvider=s}function u(s){return function(){const l=this;var d=[].slice.call(arguments),b=d.pop();l.sendAsync({method:s,params:d},b)}}function c(s,l){return function(){const d=this;var b=[].slice.call(arguments),v=b.pop();b.length<s&&b.push("latest"),d.sendAsync({method:l,params:b},v)}}i.exports=p,p.prototype.getBalance=c(2,"eth_getBalance"),p.prototype.getCode=c(2,"eth_getCode"),p.prototype.getTransactionCount=c(2,"eth_getTransactionCount"),p.prototype.getStorageAt=c(3,"eth_getStorageAt"),p.prototype.call=c(2,"eth_call"),p.prototype.protocolVersion=u("eth_protocolVersion"),p.prototype.syncing=u("eth_syncing"),p.prototype.coinbase=u("eth_coinbase"),p.prototype.mining=u("eth_mining"),p.prototype.hashrate=u("eth_hashrate"),p.prototype.gasPrice=u("eth_gasPrice"),p.prototype.accounts=u("eth_accounts"),p.prototype.blockNumber=u("eth_blockNumber"),p.prototype.getBlockTransactionCountByHash=u("eth_getBlockTransactionCountByHash"),p.prototype.getBlockTransactionCountByNumber=u("eth_getBlockTransactionCountByNumber"),p.prototype.getUncleCountByBlockHash=u("eth_getUncleCountByBlockHash"),p.prototype.getUncleCountByBlockNumber=u("eth_getUncleCountByBlockNumber"),p.prototype.sign=u("eth_sign"),p.prototype.sendTransaction=u("eth_sendTransaction"),p.prototype.sendRawTransaction=u("eth_sendRawTransaction"),p.prototype.estimateGas=u("eth_estimateGas"),p.prototype.getBlockByHash=u("eth_getBlockByHash"),p.prototype.getBlockByNumber=u("eth_getBlockByNumber"),p.prototype.getTransactionByHash=u("eth_getTransactionByHash"),p.prototype.getTransactionByBlockHashAndIndex=u("eth_getTransactionByBlockHashAndIndex"),p.prototype.getTransactionByBlockNumberAndIndex=u("eth_getTransactionByBlockNumberAndIndex"),p.prototype.getTransactionReceipt=u("eth_getTransactionReceipt"),p.prototype.getUncleByBlockHashAndIndex=u("eth_getUncleByBlockHashAndIndex"),p.prototype.getUncleByBlockNumberAndIndex=u("eth_getUncleByBlockNumberAndIndex"),p.prototype.getCompilers=u("eth_getCompilers"),p.prototype.compileLLL=u("eth_compileLLL"),p.prototype.compileSolidity=u("eth_compileSolidity"),p.prototype.compileSerpent=u("eth_compileSerpent"),p.prototype.newFilter=u("eth_newFilter"),p.prototype.newBlockFilter=u("eth_newBlockFilter"),p.prototype.newPendingTransactionFilter=u("eth_newPendingTransactionFilter"),p.prototype.uninstallFilter=u("eth_uninstallFilter"),p.prototype.getFilterChanges=u("eth_getFilterChanges"),p.prototype.getFilterLogs=u("eth_getFilterLogs"),p.prototype.getLogs=u("eth_getLogs"),p.prototype.getWork=u("eth_getWork"),p.prototype.submitWork=u("eth_submitWork"),p.prototype.submitHashrate=u("eth_submitHashrate"),p.prototype.sendAsync=function(s,l){var d;this.currentProvider.sendAsync((d=s,n({id:f(),jsonrpc:"2.0",params:[]},d)),function(b,v){if(!b&&v.error&&(b=new Error("EthQuery - RPC Error - "+v.error.message)),b)return l(b);l(null,v.result)})}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(x,E,R){((0,n.default)(x)?v:y)(x,(0,d.default)(E),R)};var n=b(o(47)),f=b(o(145)),p=b(o(303)),u=b(o(148)),c=b(o(38)),s=b(o(64)),l=b(o(66)),d=b(o(23));function b(x){return x&&x.__esModule?x:{default:x}}function v(x,E,R){R=(0,s.default)(R||c.default);var I=0,O=0,A=x.length;function P(N,L){N?R(N):++O!==A&&L!==f.default||R(null)}for(A===0&&R(null);I<A;I++)E(x[I],I,(0,l.default)(P))}var y=(0,u.default)(p.default,1/0);i.exports=e.default},function(i,e,o){var n=o(141).Symbol;i.exports=n},function(i,e,o){var n=o(142),f=typeof self=="object"&&self&&self.Object===Object&&self,p=n||f||Function("return this")();i.exports=p},function(i,e,o){(function(n){var f=typeof n=="object"&&n&&n.Object===Object&&n;i.exports=f}).call(this,o(6))},function(i,e){i.exports=function(o){var n=typeof o;return o!=null&&(n=="object"||n=="function")}},function(i,e){i.exports=function(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=9007199254740991}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default={},i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(l){return function(d,b,v){if(v=(0,f.default)(v||n.default),l<=0||!d)return v(null);var y=(0,p.default)(d),x=!1,E=0,R=!1;function I(A,P){if(E-=1,A)x=!0,v(A);else{if(P===c.default||x&&E<=0)return x=!0,v(null);R||O()}}function O(){for(R=!0;E<l&&!x;){var A=y();if(A===null)return x=!0,void(E<=0&&v(null));E+=1,b(A.value,A.key,(0,u.default)(I))}R=!1}O()}};var n=s(o(38)),f=s(o(64)),p=s(o(304)),u=s(o(66)),c=s(o(145));function s(l){return l&&l.__esModule?l:{default:l}}i.exports=e.default},function(i,e){var o=Array.isArray;i.exports=o},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n,f){return function(p,u,c){return n(p,f,u,c)}},i.exports=e.default},function(i,e,o){const n=o(150);function f(s){return c(s)!=="never"}function p(s){var l=u(s);return l>=s.params.length?s.params:s.method==="eth_getBlockByNumber"?s.params.slice(1):s.params.slice(0,l)}function u(s){switch(s.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function c(s){switch(s.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}i.exports={cacheIdentifierForPayload:function(s,l={}){if(!f(s))return null;const{includeBlockRef:d}=l,b=d?s.params:p(s);return s.method+":"+n(b)},canCache:f,blockTagForPayload:function(s){var l=u(s);return l>=s.params.length?null:s.params[l]},paramsWithoutBlockTag:p,blockTagParamIndex:u,cacheTypeForPayload:c}},function(i,e,o){var n=typeof JSON<"u"?JSON:o(330);i.exports=function(u,c){c||(c={}),typeof c=="function"&&(c={cmp:c});var s=c.space||"";typeof s=="number"&&(s=Array(s+1).join(" "));var l,d=typeof c.cycles=="boolean"&&c.cycles,b=c.replacer||function(x,E){return E},v=c.cmp&&(l=c.cmp,function(x){return function(E,R){var I={key:E,value:x[E]},O={key:R,value:x[R]};return l(I,O)}}),y=[];return function x(E,R,I,O){var A=s?`
`+new Array(O+1).join(s):"",P=s?": ":":";if(I&&I.toJSON&&typeof I.toJSON=="function"&&(I=I.toJSON()),(I=b.call(E,R,I))!==void 0){if(typeof I!="object"||I===null)return n.stringify(I);if(f(I)){for(var N=[],L=0;L<I.length;L++){var H=x(I,L,I[L],O+1)||n.stringify(null);N.push(A+s+H)}return"["+N.join(",")+A+"]"}if(y.indexOf(I)!==-1){if(d)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}y.push(I);var J=p(I).sort(v&&v(I));for(N=[],L=0;L<J.length;L++){var G=x(I,R=J[L],I[R],O+1);if(G){var z=n.stringify(R)+P+G;N.push(A+s+z)}}return y.splice(y.indexOf(I),1),"{"+N.join(",")+A+"}"}}({"":u},"",u,0)};var f=Array.isArray||function(u){return{}.toString.call(u)==="[object Array]"},p=Object.keys||function(u){var c=Object.prototype.hasOwnProperty||function(){return!0},s=[];for(var l in u)c.call(u,l)&&s.push(l);return s}},function(i,e,o){const n=o(375).Mutex,{createAsyncMiddleware:f}=o(152),p=o(156),u=o(348),c=o(351),s=o(352),{intToHex:l,hexToInt:d}=o(39);function b(x){return v(async(...E)=>{const R=await x(...E);return l(R.id)})}function v(x){return f(async(E,R)=>{const I=await x.apply(null,E.params);R.result=I})}function y(x,E){const R=[];for(let I in x)R.push(x[I]);return R}i.exports=function({blockTracker:x,provider:E}){let R=0,I={};const O=new n,A=function({mutex:h}){return m=>async(g,_,T,k)=>{(await h.acquire())(),m(g,_,T,k)}}({mutex:O}),P=p({eth_newFilter:A(b(L)),eth_newBlockFilter:A(b(H)),eth_newPendingTransactionFilter:A(b(J)),eth_uninstallFilter:A(v(S)),eth_getFilterChanges:A(v(G)),eth_getFilterLogs:A(v(z))}),N=async({oldBlock:h,newBlock:m})=>{if(I.length===0)return;const g=await O.acquire();try{await Promise.all(y(I).map(async _=>{try{await _.update({oldBlock:h,newBlock:m})}catch(T){console.error(T)}}))}catch(_){console.error(_)}g()};return P.newLogFilter=L,P.newBlockFilter=H,P.newPendingTransactionFilter=J,P.uninstallFilter=S,P.getFilterChanges=G,P.getFilterLogs=z,P.destroy=()=>{(async function(){const h=y(I).length;I={},w({prevFilterCount:h,newFilterCount:0})})()},P;async function L(h){const m=new u({provider:E,params:h});return await a(m),m}async function H(){const h=new c({provider:E});return await a(h),h}async function J(){const h=new s({provider:E});return await a(h),h}async function G(h){const m=d(h),g=I[m];if(!g)throw new Error(`No filter for index "${m}"`);return g.getChangesAndClear()}async function z(h){const m=d(h),g=I[m];if(!g)throw new Error(`No filter for index "${m}"`);return g.type==="log"?results=g.getAllResults():results=[],results}async function S(h){const m=d(h),g=I[m],_=Boolean(g);return _&&await async function(T){const k=y(I).length;delete I[T];const M=y(I).length;w({prevFilterCount:k,newFilterCount:M})}(m),_}async function a(h){const m=y(I).length,g=await x.getLatestBlock();return await h.initialize({currentBlock:g}),R++,I[R]=h,h.id=R,h.idHex=l(R),w({prevFilterCount:m,newFilterCount:y(I).length}),R}function w({prevFilterCount:h,newFilterCount:m}){h===0&&m>0?x.on("sync",N):h>0&&m===0&&x.removeListener("sync",N)}}},function(i,e,o){var n=this&&this.__createBinding||(Object.create?function(p,u,c,s){s===void 0&&(s=c),Object.defineProperty(p,s,{enumerable:!0,get:function(){return u[c]}})}:function(p,u,c,s){s===void 0&&(s=c),p[s]=u[c]}),f=this&&this.__exportStar||function(p,u){for(var c in p)c==="default"||Object.prototype.hasOwnProperty.call(u,c)||n(u,p,c)};Object.defineProperty(e,"__esModule",{value:!0}),f(o(340),e),f(o(341),e),f(o(342),e),f(o(153),e),f(o(154),e),f(o(346),e)},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;let n=Math.floor(4294967295*Math.random());e.getUniqueId=function(){return n=(n+1)%4294967295,n}},function(i,e,o){var n=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const f=n(o(69)),p=o(343);class u extends f.default{constructor(){super(),this._middleware=[]}push(l){this._middleware.push(l)}handle(l,d){if(d&&typeof d!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(l)?d?this._handleBatch(l,d):this._handleBatch(l):d?this._handle(l,d):this._promiseHandle(l)}asMiddleware(){return async(l,d,b,v)=>{try{const[y,x,E]=await u._runAllMiddleware(l,d,this._middleware);return x?(await u._runReturnHandlers(E),v(y)):b(async R=>{try{await u._runReturnHandlers(E)}catch(I){return R(I)}return R()})}catch(y){return v(y)}}}async _handleBatch(l,d){try{const b=await Promise.all(l.map(this._promiseHandle.bind(this)));return d?d(null,b):b}catch(b){if(d)return d(b);throw b}}_promiseHandle(l){return new Promise(d=>{this._handle(l,(b,v)=>{d(v)})})}async _handle(l,d){if(!l||Array.isArray(l)||typeof l!="object"){const x=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof l,{request:l});return d(x,{id:void 0,jsonrpc:"2.0",error:x})}if(typeof l.method!="string"){const x=new p.EthereumRpcError(p.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof l.method,{request:l});return d(x,{id:l.id,jsonrpc:"2.0",error:x})}const b=Object.assign({},l),v={id:b.id,jsonrpc:b.jsonrpc};let y=null;try{await this._processRequest(b,v)}catch(x){y=x}return y&&(delete v.result,v.error||(v.error=p.serializeError(y))),d(y,v)}async _processRequest(l,d){const[b,v,y]=await u._runAllMiddleware(l,d,this._middleware);if(u._checkForCompletion(l,d,v),await u._runReturnHandlers(y),b)throw b}static async _runAllMiddleware(l,d,b){const v=[];let y=null,x=!1;for(const E of b)if([y,x]=await u._runMiddleware(l,d,E,v),x)break;return[y,x,v.reverse()]}static _runMiddleware(l,d,b,v){return new Promise(y=>{const x=R=>{const I=R||d.error;I&&(d.error=p.serializeError(I)),y([I,!0])},E=R=>{d.error?x(d.error):(R&&(typeof R!="function"&&x(new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof R}" for request:
${c(l)}`,{request:l})),v.push(R)),y([null,!1]))};try{b(l,d,E,x)}catch(R){x(R)}})}static async _runReturnHandlers(l){for(const d of l)await new Promise((b,v)=>{d(y=>y?v(y):b())})}static _checkForCompletion(l,d,b){if(!("result"in d)&&!("error"in d))throw new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
`+c(l),{request:l});if(!b)throw new p.EthereumRpcError(p.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
`+c(l),{request:l})}}function c(s){return JSON.stringify(s,null,2)}e.JsonRpcEngine=u},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=o(71),f=o(70),p=n.errorCodes.rpc.internal,u={code:p,message:c(p)};function c(v,y="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(v)){const x=v.toString();if(b(n.errorValues,x))return n.errorValues[x].message;if(l(v))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return y}function s(v){if(!Number.isInteger(v))return!1;const y=v.toString();return!!n.errorValues[y]||!!l(v)}function l(v){return v>=-32099&&v<=-32e3}function d(v){return v&&typeof v=="object"&&!Array.isArray(v)?Object.assign({},v):v}function b(v,y){return Object.prototype.hasOwnProperty.call(v,y)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=c,e.isValidCode=s,e.serializeError=function(v,{fallbackError:y=u,shouldIncludeStack:x=!1}={}){var E,R;if(!y||!Number.isInteger(y.code)||typeof y.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(v instanceof f.EthereumRpcError)return v.serialize();const I={};if(v&&typeof v=="object"&&!Array.isArray(v)&&b(v,"code")&&s(v.code)){const A=v;I.code=A.code,A.message&&typeof A.message=="string"?(I.message=A.message,b(A,"data")&&(I.data=A.data)):(I.message=c(I.code),I.data={originalError:d(v)})}else{I.code=y.code;const A=(E=v)===null||E===void 0?void 0:E.message;I.message=A&&typeof A=="string"?A:y.message,I.data={originalError:d(v)}}const O=(R=v)===null||R===void 0?void 0:R.stack;return x&&v&&O&&typeof O=="string"&&(I.stack=O),I}},function(i,e,o){i.exports=o(347)},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowMetadata=void 0;const n=o(10);e.getWindowMetadata=function(){let f,p;try{f=n.getDocumentOrThrow(),p=n.getLocationOrThrow()}catch{return null}function u(...s){const l=f.getElementsByTagName("meta");for(let d=0;d<l.length;d++){const b=l[d],v=["itemprop","property","name"].map(y=>b.getAttribute(y)).filter(y=>!!y&&s.includes(y));if(v.length&&v){const y=b.getAttribute("content");if(y)return y}}return""}const c=function(){let s=u("name","og:site_name","og:title","twitter:title");return s||(s=f.title),s}();return{description:u("description","og:description","twitter:description","keywords"),url:p.origin,icons:function(){const s=f.getElementsByTagName("link"),l=[];for(let d=0;d<s.length;d++){const b=s[d],v=b.getAttribute("rel");if(v&&v.toLowerCase().indexOf("icon")>-1){const y=b.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let x=p.protocol+"//"+p.host;if(y.indexOf("/")===0)x+=y;else{const E=p.pathname.split("/");E.pop(),x+=E.join("/")+"/"+y}l.push(x)}else if(y.indexOf("//")===0){const x=p.protocol+y;l.push(x)}else l.push(y)}}return l}(),name:c}}},function(i,e,o){(function(n){o.d(e,"a",function(){return y});var f=function(){for(var R=0,I=0,O=arguments.length;I<O;I++)R+=arguments[I].length;var A=Array(R),P=0;for(I=0;I<O;I++)for(var N=arguments[I],L=0,H=N.length;L<H;L++,P++)A[P]=N[L];return A},p=function(R,I,O){this.name=R,this.version=I,this.os=O,this.type="browser"},u=function(R){this.version=R,this.type="node",this.name="node",this.os=n.platform},c=function(R,I,O,A){this.name=R,this.version=I,this.os=O,this.bot=A,this.type="bot-device"},s=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},l=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},d=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,b=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],v=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function y(R){return R?E(R):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new l:typeof navigator<"u"?E(navigator.userAgent):n!==void 0&&n.version?new u(n.version.slice(1)):null}function x(R){return R!==""&&b.reduce(function(I,O){var A=O[0],P=O[1];if(I)return I;var N=P.exec(R);return!!N&&[A,N]},!1)}function E(R){var I=x(R);if(!I)return null;var O=I[0],A=I[1];if(O==="searchbot")return new s;var P=A[1]&&A[1].split(/[._]/).slice(0,3);P?P.length<3&&(P=f(P,function(J){for(var G=[],z=0;z<J;z++)G.push("0");return G}(3-P.length))):P=[];var N=P.join("."),L=function(J){for(var G=0,z=v.length;G<z;G++){var S=v[G],a=S[0];if(S[1].exec(J))return a}return null}(R),H=d.exec(R);return H&&H[1]?new c(O,N,L,H[1]):new p(O,N,L)}}).call(this,o(5))},function(i,e,o){(function(n){var f=o(77).strict;i.exports=function(p){if(f(p)){var u=n.from(p.buffer);return p.byteLength!==p.buffer.byteLength&&(u=u.slice(p.byteOffset,p.byteOffset+p.byteLength)),u}return n.from(p)}}).call(this,o(2).Buffer)},function(i,e,o){(function(n,f){var p;/**
 * [js-sha3]{@link https://github.com/emn178/js-sha3}
 *
 * @version 0.8.0
 * @author Chen, Yi-Cyuan [emn178@gmail.com]
 * @copyright Chen, Yi-Cyuan 2015-2018
 * @license MIT
 */(function(){var u="input is invalid type",c=typeof window=="object",s=c?window:{};s.JS_SHA3_NO_WINDOW&&(c=!1);var l=!c&&typeof self=="object";!s.JS_SHA3_NO_NODE_JS&&typeof n=="object"&&n.versions&&n.versions.node?s=f:l&&(s=self);var d=!s.JS_SHA3_NO_COMMON_JS&&typeof i=="object"&&i.exports,b=o(171),v=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",y="0123456789abcdef".split(""),x=[4,1024,262144,67108864],E=[0,8,16,24],R=[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],I=[224,256,384,512],O=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],P={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),!v||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var N=function(C,K,W){return function(U){return new M(C,K,C).update(U)[W]()}},L=function(C,K,W){return function(U,q){return new M(C,K,q).update(U)[W]()}},H=function(C,K,W){return function(U,q,j,D){return a["cshake"+C].update(U,q,j,D)[W]()}},J=function(C,K,W){return function(U,q,j,D){return a["kmac"+C].update(U,q,j,D)[W]()}},G=function(C,K,W,U){for(var q=0;q<A.length;++q){var j=A[q];C[j]=K(W,U,j)}return C},z=function(C,K){var W=N(C,K,"hex");return W.create=function(){return new M(C,K,C)},W.update=function(U){return W.create().update(U)},G(W,N,C,K)},S=[{name:"keccak",padding:[1,256,65536,16777216],bits:I,createMethod:z},{name:"sha3",padding:[6,1536,393216,100663296],bits:I,createMethod:z},{name:"shake",padding:[31,7936,2031616,520093696],bits:O,createMethod:function(C,K){var W=L(C,K,"hex");return W.create=function(U){return new M(C,K,U)},W.update=function(U,q){return W.create(q).update(U)},G(W,L,C,K)}},{name:"cshake",padding:x,bits:O,createMethod:function(C,K){var W=P[C],U=H(C,0,"hex");return U.create=function(q,j,D){return j||D?new M(C,K,q).bytepad([j,D],W):a["shake"+C].create(q)},U.update=function(q,j,D,F){return U.create(j,D,F).update(q)},G(U,H,C,K)}},{name:"kmac",padding:x,bits:O,createMethod:function(C,K){var W=P[C],U=J(C,0,"hex");return U.create=function(q,j,D){return new B(C,K,j).bytepad(["KMAC",D],W).bytepad([q],W)},U.update=function(q,j,D,F){return U.create(q,D,F).update(j)},G(U,J,C,K)}}],a={},w=[],h=0;h<S.length;++h)for(var m=S[h],g=m.bits,_=0;_<g.length;++_){var T=m.name+"_"+g[_];if(w.push(T),a[T]=m.createMethod(g[_],m.padding),m.name!=="sha3"){var k=m.name+g[_];w.push(k),a[k]=a[T]}}function M(C,K,W){this.blocks=[],this.s=[],this.padding=K,this.outputBits=W,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(C<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=W>>5,this.extraBytes=(31&W)>>3;for(var U=0;U<50;++U)this.s[U]=0}function B(C,K,W){M.call(this,C,K,W)}M.prototype.update=function(C){if(this.finalized)throw new Error("finalize already called");var K,W=typeof C;if(W!=="string"){if(W!=="object")throw new Error(u);if(C===null)throw new Error(u);if(v&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!(Array.isArray(C)||v&&ArrayBuffer.isView(C)))throw new Error(u);K=!0}for(var U,q,j=this.blocks,D=this.byteCount,F=C.length,$=this.blockCount,V=0,Z=this.s;V<F;){if(this.reset)for(this.reset=!1,j[0]=this.block,U=1;U<$+1;++U)j[U]=0;if(K)for(U=this.start;V<F&&U<D;++V)j[U>>2]|=C[V]<<E[3&U++];else for(U=this.start;V<F&&U<D;++V)(q=C.charCodeAt(V))<128?j[U>>2]|=q<<E[3&U++]:q<2048?(j[U>>2]|=(192|q>>6)<<E[3&U++],j[U>>2]|=(128|63&q)<<E[3&U++]):q<55296||q>=57344?(j[U>>2]|=(224|q>>12)<<E[3&U++],j[U>>2]|=(128|q>>6&63)<<E[3&U++],j[U>>2]|=(128|63&q)<<E[3&U++]):(q=65536+((1023&q)<<10|1023&C.charCodeAt(++V)),j[U>>2]|=(240|q>>18)<<E[3&U++],j[U>>2]|=(128|q>>12&63)<<E[3&U++],j[U>>2]|=(128|q>>6&63)<<E[3&U++],j[U>>2]|=(128|63&q)<<E[3&U++]);if(this.lastByteIndex=U,U>=D){for(this.start=U-D,this.block=j[$],U=0;U<$;++U)Z[U]^=j[U];Y(Z),this.reset=!0}else this.start=U}return this},M.prototype.encode=function(C,K){var W=255&C,U=1,q=[W];for(W=255&(C>>=8);W>0;)q.unshift(W),W=255&(C>>=8),++U;return K?q.push(U):q.unshift(U),this.update(q),q.length},M.prototype.encodeString=function(C){var K,W=typeof C;if(W!=="string"){if(W!=="object")throw new Error(u);if(C===null)throw new Error(u);if(v&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!(Array.isArray(C)||v&&ArrayBuffer.isView(C)))throw new Error(u);K=!0}var U=0,q=C.length;if(K)U=q;else for(var j=0;j<C.length;++j){var D=C.charCodeAt(j);D<128?U+=1:D<2048?U+=2:D<55296||D>=57344?U+=3:(D=65536+((1023&D)<<10|1023&C.charCodeAt(++j)),U+=4)}return U+=this.encode(8*U),this.update(C),U},M.prototype.bytepad=function(C,K){for(var W=this.encode(K),U=0;U<C.length;++U)W+=this.encodeString(C[U]);var q=K-W%K,j=[];return j.length=q,this.update(j),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var C=this.blocks,K=this.lastByteIndex,W=this.blockCount,U=this.s;if(C[K>>2]|=this.padding[3&K],this.lastByteIndex===this.byteCount)for(C[0]=C[W],K=1;K<W+1;++K)C[K]=0;for(C[W-1]|=2147483648,K=0;K<W;++K)U[K]^=C[K];Y(U)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var C,K=this.blockCount,W=this.s,U=this.outputBlocks,q=this.extraBytes,j=0,D=0,F="";D<U;){for(j=0;j<K&&D<U;++j,++D)C=W[j],F+=y[C>>4&15]+y[15&C]+y[C>>12&15]+y[C>>8&15]+y[C>>20&15]+y[C>>16&15]+y[C>>28&15]+y[C>>24&15];D%K==0&&(Y(W),j=0)}return q&&(C=W[j],F+=y[C>>4&15]+y[15&C],q>1&&(F+=y[C>>12&15]+y[C>>8&15]),q>2&&(F+=y[C>>20&15]+y[C>>16&15])),F},M.prototype.arrayBuffer=function(){this.finalize();var C,K=this.blockCount,W=this.s,U=this.outputBlocks,q=this.extraBytes,j=0,D=0,F=this.outputBits>>3;C=q?new ArrayBuffer(U+1<<2):new ArrayBuffer(F);for(var $=new Uint32Array(C);D<U;){for(j=0;j<K&&D<U;++j,++D)$[D]=W[j];D%K==0&&Y(W)}return q&&($[j]=W[j],C=C.slice(0,F)),C},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var C,K,W=this.blockCount,U=this.s,q=this.outputBlocks,j=this.extraBytes,D=0,F=0,$=[];F<q;){for(D=0;D<W&&F<q;++D,++F)C=F<<2,K=U[D],$[C]=255&K,$[C+1]=K>>8&255,$[C+2]=K>>16&255,$[C+3]=K>>24&255;F%W==0&&Y(U)}return j&&(C=F<<2,K=U[D],$[C]=255&K,j>1&&($[C+1]=K>>8&255),j>2&&($[C+2]=K>>16&255)),$},B.prototype=new M,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var Y=function(C){var K,W,U,q,j,D,F,$,V,Z,ee,re,ue,fe,oe,ae,ie,te,le,ge,he,ye,Ie,pe,Oe,Ge,we,Le,Ve,ve,Ne,se,de,_e,Ue,me,Be,Je,be,He,tt,Re,ze,Ze,Ae,De,rt,Ee,Fe,Qe,Se,Ke,Xe,Me,We,et,ke,qe,Q,X,ne,ce,Ce;for(U=0;U<48;U+=2)q=C[0]^C[10]^C[20]^C[30]^C[40],j=C[1]^C[11]^C[21]^C[31]^C[41],D=C[2]^C[12]^C[22]^C[32]^C[42],F=C[3]^C[13]^C[23]^C[33]^C[43],$=C[4]^C[14]^C[24]^C[34]^C[44],V=C[5]^C[15]^C[25]^C[35]^C[45],Z=C[6]^C[16]^C[26]^C[36]^C[46],ee=C[7]^C[17]^C[27]^C[37]^C[47],K=(re=C[8]^C[18]^C[28]^C[38]^C[48])^(D<<1|F>>>31),W=(ue=C[9]^C[19]^C[29]^C[39]^C[49])^(F<<1|D>>>31),C[0]^=K,C[1]^=W,C[10]^=K,C[11]^=W,C[20]^=K,C[21]^=W,C[30]^=K,C[31]^=W,C[40]^=K,C[41]^=W,K=q^($<<1|V>>>31),W=j^(V<<1|$>>>31),C[2]^=K,C[3]^=W,C[12]^=K,C[13]^=W,C[22]^=K,C[23]^=W,C[32]^=K,C[33]^=W,C[42]^=K,C[43]^=W,K=D^(Z<<1|ee>>>31),W=F^(ee<<1|Z>>>31),C[4]^=K,C[5]^=W,C[14]^=K,C[15]^=W,C[24]^=K,C[25]^=W,C[34]^=K,C[35]^=W,C[44]^=K,C[45]^=W,K=$^(re<<1|ue>>>31),W=V^(ue<<1|re>>>31),C[6]^=K,C[7]^=W,C[16]^=K,C[17]^=W,C[26]^=K,C[27]^=W,C[36]^=K,C[37]^=W,C[46]^=K,C[47]^=W,K=Z^(q<<1|j>>>31),W=ee^(j<<1|q>>>31),C[8]^=K,C[9]^=W,C[18]^=K,C[19]^=W,C[28]^=K,C[29]^=W,C[38]^=K,C[39]^=W,C[48]^=K,C[49]^=W,fe=C[0],oe=C[1],De=C[11]<<4|C[10]>>>28,rt=C[10]<<4|C[11]>>>28,Le=C[20]<<3|C[21]>>>29,Ve=C[21]<<3|C[20]>>>29,X=C[31]<<9|C[30]>>>23,ne=C[30]<<9|C[31]>>>23,Re=C[40]<<18|C[41]>>>14,ze=C[41]<<18|C[40]>>>14,_e=C[2]<<1|C[3]>>>31,Ue=C[3]<<1|C[2]>>>31,ae=C[13]<<12|C[12]>>>20,ie=C[12]<<12|C[13]>>>20,Ee=C[22]<<10|C[23]>>>22,Fe=C[23]<<10|C[22]>>>22,ve=C[33]<<13|C[32]>>>19,Ne=C[32]<<13|C[33]>>>19,ce=C[42]<<2|C[43]>>>30,Ce=C[43]<<2|C[42]>>>30,Me=C[5]<<30|C[4]>>>2,We=C[4]<<30|C[5]>>>2,me=C[14]<<6|C[15]>>>26,Be=C[15]<<6|C[14]>>>26,te=C[25]<<11|C[24]>>>21,le=C[24]<<11|C[25]>>>21,Qe=C[34]<<15|C[35]>>>17,Se=C[35]<<15|C[34]>>>17,se=C[45]<<29|C[44]>>>3,de=C[44]<<29|C[45]>>>3,pe=C[6]<<28|C[7]>>>4,Oe=C[7]<<28|C[6]>>>4,et=C[17]<<23|C[16]>>>9,ke=C[16]<<23|C[17]>>>9,Je=C[26]<<25|C[27]>>>7,be=C[27]<<25|C[26]>>>7,ge=C[36]<<21|C[37]>>>11,he=C[37]<<21|C[36]>>>11,Ke=C[47]<<24|C[46]>>>8,Xe=C[46]<<24|C[47]>>>8,Ze=C[8]<<27|C[9]>>>5,Ae=C[9]<<27|C[8]>>>5,Ge=C[18]<<20|C[19]>>>12,we=C[19]<<20|C[18]>>>12,qe=C[29]<<7|C[28]>>>25,Q=C[28]<<7|C[29]>>>25,He=C[38]<<8|C[39]>>>24,tt=C[39]<<8|C[38]>>>24,ye=C[48]<<14|C[49]>>>18,Ie=C[49]<<14|C[48]>>>18,C[0]=fe^~ae&te,C[1]=oe^~ie&le,C[10]=pe^~Ge&Le,C[11]=Oe^~we&Ve,C[20]=_e^~me&Je,C[21]=Ue^~Be&be,C[30]=Ze^~De&Ee,C[31]=Ae^~rt&Fe,C[40]=Me^~et&qe,C[41]=We^~ke&Q,C[2]=ae^~te&ge,C[3]=ie^~le&he,C[12]=Ge^~Le&ve,C[13]=we^~Ve&Ne,C[22]=me^~Je&He,C[23]=Be^~be&tt,C[32]=De^~Ee&Qe,C[33]=rt^~Fe&Se,C[42]=et^~qe&X,C[43]=ke^~Q&ne,C[4]=te^~ge&ye,C[5]=le^~he&Ie,C[14]=Le^~ve&se,C[15]=Ve^~Ne&de,C[24]=Je^~He&Re,C[25]=be^~tt&ze,C[34]=Ee^~Qe&Ke,C[35]=Fe^~Se&Xe,C[44]=qe^~X&ce,C[45]=Q^~ne&Ce,C[6]=ge^~ye&fe,C[7]=he^~Ie&oe,C[16]=ve^~se&pe,C[17]=Ne^~de&Oe,C[26]=He^~Re&_e,C[27]=tt^~ze&Ue,C[36]=Qe^~Ke&Ze,C[37]=Se^~Xe&Ae,C[46]=X^~ce&Me,C[47]=ne^~Ce&We,C[8]=ye^~fe&ae,C[9]=Ie^~oe&ie,C[18]=se^~pe&Ge,C[19]=de^~Oe&we,C[28]=Re^~_e&me,C[29]=ze^~Ue&Be,C[38]=Ke^~Ze&De,C[39]=Xe^~Ae&rt,C[48]=ce^~Me&et,C[49]=Ce^~We&ke,C[0]^=R[U],C[1]^=R[U+1]};if(d)i.exports=a;else{for(h=0;h<w.length;++h)s[w[h]]=a[w[h]];b&&((p=function(){return a}.call(e,o,e,i))===void 0||(i.exports=p))}})()}).call(this,o(5),o(6))},function(i,e,o){o(7),o(24);var n=o(80);o.o(n,"payloadId")&&o.d(e,"payloadId",function(){return n.payloadId});var f=o(81);o.d(e,"payloadId",function(){return f.a}),o(82),o(83),o(88),o(89)},function(i,e,o){(function(n){var f=o(1),p=o(163);const u=n.WebSocket!==void 0?n.WebSocket:o(177);e.a=class{constructor(c){if(this.opts=c,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=c.protocol,this._version=c.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=c.subscriptions||[],this._netMonitor=c.netMonitor||new p.a,!c.url||typeof c.url!="string")throw new Error("Missing or invalid WebSocket url");this._url=c.url,this._netMonitor.on("online",()=>this._socketCreate())}set readyState(c){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(c){}get connecting(){return this.readyState===0}set connected(c){}get connected(){return this.readyState===1}set closing(c){}get closing(){return this.readyState===2}set closed(c){}get closed(){return this.readyState===3}open(){this._socketCreate()}close(){this._socketClose()}send(c,s,l){if(!s||typeof s!="string")throw new Error("Missing or invalid topic field");this._socketSend({topic:s,type:"pub",payload:c,silent:!!l})}subscribe(c){this._socketSend({topic:c,type:"sub",payload:"",silent:!0})}on(c,s){this._events.push({event:c,callback:s})}_socketCreate(){if(this._nextSocket)return;const c=function(s,l,d){var b,v;const y=(s.startsWith("https")?s.replace("https","wss"):s.startsWith("http")?s.replace("http","ws"):s).split("?"),x=Object(f.isBrowser)()?{protocol:l,version:d,env:"browser",host:((b=Object(f.getLocation)())===null||b===void 0?void 0:b.host)||""}:{protocol:l,version:d,env:((v=Object(f.detectEnv)())===null||v===void 0?void 0:v.name)||""},E=Object(f.appendToQueryString)(Object(f.getQueryString)(y[1]||""),x);return y[0]+"?"+E}(this._url,this._protocol,this._version);if(this._nextSocket=new u(c),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=s=>this._socketReceive(s),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=s=>this._socketError(s),this._nextSocket.onclose=()=>{setTimeout(()=>{this._nextSocket=null,this._socketCreate()},1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(c){const s=JSON.stringify(c);this._socket&&this._socket.readyState===1?this._socket.send(s):(this._setToQueue(c),this._socketCreate())}async _socketReceive(c){let s;try{s=JSON.parse(c.data)}catch{return}if(this._socketSend({topic:s.topic,type:"ack",payload:"",silent:!0}),this._socket&&this._socket.readyState===1){const l=this._events.filter(d=>d.event==="message");l&&l.length&&l.forEach(d=>d.callback(s))}}_socketError(c){const s=this._events.filter(l=>l.event==="error");s&&s.length&&s.forEach(l=>l.callback(c))}_queueSubscriptions(){this._subscriptions.forEach(c=>this._queue.push({topic:c,type:"sub",payload:"",silent:!0})),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(c){this._queue.push(c)}_pushQueue(){this._queue.forEach(c=>this._socketSend(c)),this._queue=[]}}}).call(this,o(6))},function(i,e,o){e.a=class{constructor(){this._eventEmitters=[],typeof window<"u"&&window.addEventListener!==void 0&&(window.addEventListener("online",()=>this.trigger("online")),window.addEventListener("offline",()=>this.trigger("offline")))}on(n,f){this._eventEmitters.push({event:n,callback:f})}trigger(n){let f=[];n&&(f=this._eventEmitters.filter(p=>p.event===n)),f.forEach(p=>{p.callback()})}}},function(i,e,o){var n=Object.prototype.hasOwnProperty,f="~";function p(){}function u(d,b,v){this.fn=d,this.context=b,this.once=v||!1}function c(d,b,v,y,x){if(typeof v!="function")throw new TypeError("The listener must be a function");var E=new u(v,y||d,x),R=f?f+b:b;return d._events[R]?d._events[R].fn?d._events[R]=[d._events[R],E]:d._events[R].push(E):(d._events[R]=E,d._eventsCount++),d}function s(d,b){--d._eventsCount==0?d._events=new p:delete d._events[b]}function l(){this._events=new p,this._eventsCount=0}Object.create&&(p.prototype=Object.create(null),new p().__proto__||(f=!1)),l.prototype.eventNames=function(){var d,b,v=[];if(this._eventsCount===0)return v;for(b in d=this._events)n.call(d,b)&&v.push(f?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(d)):v},l.prototype.listeners=function(d){var b=f?f+d:d,v=this._events[b];if(!v)return[];if(v.fn)return[v.fn];for(var y=0,x=v.length,E=new Array(x);y<x;y++)E[y]=v[y].fn;return E},l.prototype.listenerCount=function(d){var b=f?f+d:d,v=this._events[b];return v?v.fn?1:v.length:0},l.prototype.emit=function(d,b,v,y,x,E){var R=f?f+d:d;if(!this._events[R])return!1;var I,O,A=this._events[R],P=arguments.length;if(A.fn){switch(A.once&&this.removeListener(d,A.fn,void 0,!0),P){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,b),!0;case 3:return A.fn.call(A.context,b,v),!0;case 4:return A.fn.call(A.context,b,v,y),!0;case 5:return A.fn.call(A.context,b,v,y,x),!0;case 6:return A.fn.call(A.context,b,v,y,x,E),!0}for(O=1,I=new Array(P-1);O<P;O++)I[O-1]=arguments[O];A.fn.apply(A.context,I)}else{var N,L=A.length;for(O=0;O<L;O++)switch(A[O].once&&this.removeListener(d,A[O].fn,void 0,!0),P){case 1:A[O].fn.call(A[O].context);break;case 2:A[O].fn.call(A[O].context,b);break;case 3:A[O].fn.call(A[O].context,b,v);break;case 4:A[O].fn.call(A[O].context,b,v,y);break;default:if(!I)for(N=1,I=new Array(P-1);N<P;N++)I[N-1]=arguments[N];A[O].fn.apply(A[O].context,I)}}return!0},l.prototype.on=function(d,b,v){return c(this,d,b,v,!1)},l.prototype.once=function(d,b,v){return c(this,d,b,v,!0)},l.prototype.removeListener=function(d,b,v,y){var x=f?f+d:d;if(!this._events[x])return this;if(!b)return s(this,x),this;var E=this._events[x];if(E.fn)E.fn!==b||y&&!E.once||v&&E.context!==v||s(this,x);else{for(var R=0,I=[],O=E.length;R<O;R++)(E[R].fn!==b||y&&!E[R].once||v&&E[R].context!==v)&&I.push(E[R]);I.length?this._events[x]=I.length===1?I[0]:I:s(this,x)}return this},l.prototype.removeAllListeners=function(d){var b;return d?(b=f?f+d:d,this._events[b]&&s(this,b)):(this._events=new p,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=f,l.EventEmitter=l,i.exports=l},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),function(f){for(var p in f)e.hasOwnProperty(p)||(e[p]=f[p])}(o(203));var n=o(56);e.XMLHttpRequestEventTarget=n.XMLHttpRequestEventTarget},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});const n=o(167),f=n.__importDefault(o(374)),p=n.__importDefault(o(178)),u=n.__importDefault(o(202)),c=o(1),s=o(224),l=o(334),d=o(338),b=o(339),v=o(353),y=o(369),x=o(372);e.default=class extends s{constructor(E){if(super({pollingInterval:E.pollingInterval||8e3}),this.bridge="https://bridge.walletconnect.org",this.qrcode=!0,this.qrcodeModal=p.default,this.qrcodeModalOptions=void 0,this.rpc=null,this.infuraId="",this.http=null,this.isConnecting=!1,this.connected=!1,this.connectCallbacks=[],this.accounts=[],this.chainId=1,this.rpcUrl="",this.enable=()=>n.__awaiter(this,void 0,void 0,function*(){const R=yield this.getWalletConnector();if(R)return this.start(),this.subscribeWalletConnector(),R.accounts;throw new Error("Failed to connect to WalleConnect")}),this.request=R=>n.__awaiter(this,void 0,void 0,function*(){return this.send(R)}),this.send=(R,I)=>n.__awaiter(this,void 0,void 0,function*(){var O;if(typeof R=="string"){const A=R;let P=I;return A==="personal_sign"&&(P=(0,c.parsePersonalSign)(P)),this.sendAsyncPromise(A,P)}if((R=Object.assign({id:(0,c.payloadId)(),jsonrpc:"2.0"},R)).method==="personal_sign"&&(R.params=(0,c.parsePersonalSign)(R.params)),!I){if(R.method==="eth_signTypedData_v4"&&((O=this.walletMeta)===null||O===void 0?void 0:O.name)==="MetaMask"){const{result:A}=yield this.handleOtherRequests(R);return A}return this.sendAsyncPromise(R.method,R.params)}this.sendAsync(R,I)}),this.onConnect=R=>{this.connectCallbacks.push(R)},this.triggerConnect=R=>{this.connectCallbacks&&this.connectCallbacks.length&&this.connectCallbacks.forEach(I=>I(R))},this.bridge=E.connector?E.connector.bridge:E.bridge||"https://bridge.walletconnect.org",this.qrcode=E.qrcode===void 0||E.qrcode!==!1,this.qrcodeModal=E.qrcodeModal||this.qrcodeModal,this.qrcodeModalOptions=E.qrcodeModalOptions,this.wc=E.connector||new f.default({bridge:this.bridge,qrcodeModal:this.qrcode?this.qrcodeModal:void 0,qrcodeModalOptions:this.qrcodeModalOptions,storageId:E==null?void 0:E.storageId,signingMethods:E==null?void 0:E.signingMethods,clientMeta:E==null?void 0:E.clientMeta}),this.rpc=E.rpc||null,!(this.rpc||E.infuraId&&typeof E.infuraId=="string"&&E.infuraId.trim()))throw new Error("Missing one of the required parameters: rpc or infuraId");this.infuraId=E.infuraId||"",this.chainId=(E==null?void 0:E.chainId)||this.chainId,this.initialize()}get isWalletConnect(){return!0}get connector(){return this.wc}get walletMeta(){return this.wc.peerMeta}disconnect(){return n.__awaiter(this,void 0,void 0,function*(){this.close()})}close(){return n.__awaiter(this,void 0,void 0,function*(){yield(yield this.getWalletConnector({disableSessionCreation:!0})).killSession(),yield this.onDisconnect()})}handleRequest(E){return n.__awaiter(this,void 0,void 0,function*(){try{let R,I=null;const O=yield this.getWalletConnector();switch(E.method){case"wc_killSession":yield this.close(),I=null;break;case"eth_accounts":I=O.accounts;break;case"eth_coinbase":I=O.accounts[0];break;case"eth_chainId":case"net_version":I=O.chainId;break;case"eth_uninstallFilter":this.sendAsync(E,A=>A),I=!0;break;default:R=yield this.handleOtherRequests(E)}return R||this.formatResponse(E,I)}catch(R){throw this.emit("error",R),R}})}handleOtherRequests(E){return n.__awaiter(this,void 0,void 0,function*(){if(!c.signingMethods.includes(E.method)&&E.method.startsWith("eth_"))return this.handleReadRequests(E);const R=yield this.getWalletConnector(),I=yield R.sendCustomRequest(E);return this.formatResponse(E,I)})}handleReadRequests(E){return n.__awaiter(this,void 0,void 0,function*(){if(!this.http){const R=new Error("HTTP Connection not available");throw this.emit("error",R),R}return this.http.send(E)})}formatResponse(E,R){return{id:E.id,jsonrpc:E.jsonrpc,result:R}}getWalletConnector(E={}){const{disableSessionCreation:R=!1}=E;return new Promise((I,O)=>{const A=this.wc;this.isConnecting?this.onConnect(P=>I(P)):A.connected||R?(this.connected||(this.connected=!0,this.updateState(A.session)),I(A)):(this.isConnecting=!0,A.on("modal_closed",()=>{O(new Error("User closed modal"))}),A.createSession({chainId:this.chainId}).then(()=>{A.on("connect",(P,N)=>{if(P)return this.isConnecting=!1,O(P);this.isConnecting=!1,this.connected=!0,N&&this.updateState(N.params[0]),this.emit("connect"),this.triggerConnect(A),I(A)})}).catch(P=>{this.isConnecting=!1,O(P)}))})}subscribeWalletConnector(){return n.__awaiter(this,void 0,void 0,function*(){const E=yield this.getWalletConnector();E.on("disconnect",R=>{R?this.emit("error",R):this.onDisconnect()}),E.on("session_update",(R,I)=>{R?this.emit("error",R):this.updateState(I.params[0])})})}onDisconnect(){return n.__awaiter(this,void 0,void 0,function*(){yield this.stop(),this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1})}updateState(E){return n.__awaiter(this,void 0,void 0,function*(){const{accounts:R,chainId:I,networkId:O,rpcUrl:A}=E;(!this.accounts||R&&this.accounts!==R)&&(this.accounts=R,this.emit("accountsChanged",R)),(!this.chainId||I&&this.chainId!==I)&&(this.chainId=I,this.emit("chainChanged",I)),(!this.networkId||O&&this.networkId!==O)&&(this.networkId=O,this.emit("networkChanged",O)),this.updateRpcUrl(this.chainId,A||"")})}updateRpcUrl(E,R=""){const I={infuraId:this.infuraId,custom:this.rpc||void 0};(R=R||(0,c.getRpcUrl)(E,I))?(this.rpcUrl=R,this.updateHttpConnection()):this.emit("error",new Error("No RPC Url available for chainId: "+E))}updateHttpConnection(){this.rpcUrl&&(this.http=new u.default(this.rpcUrl),this.http.on("payload",E=>this.emit("payload",E)),this.http.on("error",E=>this.emit("error",E)))}sendAsyncPromise(E,R){return new Promise((I,O)=>{this.sendAsync({id:(0,c.payloadId)(),jsonrpc:"2.0",method:E,params:R||[]},(A,P)=>{A?O(A):I(P.result)})})}initialize(){this.updateRpcUrl(this.chainId),this.addProvider(new d({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new l),this.addProvider(new x),this.addProvider(new b),this.addProvider(new y),this.addProvider(new v(this.configWallet())),this.addProvider({handleRequest:(E,R,I)=>n.__awaiter(this,void 0,void 0,function*(){try{const{error:O,result:A}=yield this.handleRequest(E);I(O,A)}catch(O){I(O)}}),setEngine:E=>E})}configWallet(){return{getAccounts:E=>n.__awaiter(this,void 0,void 0,function*(){try{const R=(yield this.getWalletConnector()).accounts;R&&R.length?E(null,R):E(new Error("Failed to get accounts"))}catch(R){E(R)}}),processMessage:(E,R)=>n.__awaiter(this,void 0,void 0,function*(){try{const I=yield this.getWalletConnector(),O=yield I.signMessage([E.from,E.data]);R(null,O)}catch(I){R(I)}}),processPersonalMessage:(E,R)=>n.__awaiter(this,void 0,void 0,function*(){try{const I=yield this.getWalletConnector(),O=yield I.signPersonalMessage([E.data,E.from]);R(null,O)}catch(I){R(I)}}),processSignTransaction:(E,R)=>n.__awaiter(this,void 0,void 0,function*(){try{const I=yield this.getWalletConnector(),O=yield I.signTransaction(E);R(null,O)}catch(I){R(I)}}),processTransaction:(E,R)=>n.__awaiter(this,void 0,void 0,function*(){try{const I=yield this.getWalletConnector(),O=yield I.sendTransaction(E);R(null,O)}catch(I){R(I)}}),processTypedMessage:(E,R)=>n.__awaiter(this,void 0,void 0,function*(){try{const I=yield this.getWalletConnector(),O=yield I.signTypedData([E.from,E.data]);R(null,O)}catch(I){R(I)}})}}}},function(i,e,o){o.r(e),o.d(e,"__extends",function(){return f}),o.d(e,"__assign",function(){return p}),o.d(e,"__rest",function(){return u}),o.d(e,"__decorate",function(){return c}),o.d(e,"__param",function(){return s}),o.d(e,"__metadata",function(){return l}),o.d(e,"__awaiter",function(){return d}),o.d(e,"__generator",function(){return b}),o.d(e,"__exportStar",function(){return v}),o.d(e,"__values",function(){return y}),o.d(e,"__read",function(){return x}),o.d(e,"__spread",function(){return E}),o.d(e,"__await",function(){return R}),o.d(e,"__asyncGenerator",function(){return I}),o.d(e,"__asyncDelegator",function(){return O}),o.d(e,"__asyncValues",function(){return A}),o.d(e,"__makeTemplateObject",function(){return P}),o.d(e,"__importStar",function(){return N}),o.d(e,"__importDefault",function(){return L});/*! *****************************************************************************
	Copyright (c) Microsoft Corporation. All rights reserved.
	Licensed under the Apache License, Version 2.0 (the "License"); you may not use
	this file except in compliance with the License. You may obtain a copy of the
	License at http://www.apache.org/licenses/LICENSE-2.0

	THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
	KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
	WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
	MERCHANTABLITY OR NON-INFRINGEMENT.

	See the Apache Version 2.0 License for specific language governing permissions
	and limitations under the License.
	***************************************************************************** */var n=function(H,J){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,z){G.__proto__=z}||function(G,z){for(var S in z)z.hasOwnProperty(S)&&(G[S]=z[S])})(H,J)};function f(H,J){function G(){this.constructor=H}n(H,J),H.prototype=J===null?Object.create(J):(G.prototype=J.prototype,new G)}var p=function(){return(p=Object.assign||function(H){for(var J,G=1,z=arguments.length;G<z;G++)for(var S in J=arguments[G])Object.prototype.hasOwnProperty.call(J,S)&&(H[S]=J[S]);return H}).apply(this,arguments)};function u(H,J){var G={};for(var z in H)Object.prototype.hasOwnProperty.call(H,z)&&J.indexOf(z)<0&&(G[z]=H[z]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function"){var S=0;for(z=Object.getOwnPropertySymbols(H);S<z.length;S++)J.indexOf(z[S])<0&&(G[z[S]]=H[z[S]])}return G}function c(H,J,G,z){var S,a=arguments.length,w=a<3?J:z===null?z=Object.getOwnPropertyDescriptor(J,G):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(H,J,G,z);else for(var h=H.length-1;h>=0;h--)(S=H[h])&&(w=(a<3?S(w):a>3?S(J,G,w):S(J,G))||w);return a>3&&w&&Object.defineProperty(J,G,w),w}function s(H,J){return function(G,z){J(G,z,H)}}function l(H,J){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(H,J)}function d(H,J,G,z){return new(G||(G=Promise))(function(S,a){function w(g){try{m(z.next(g))}catch(_){a(_)}}function h(g){try{m(z.throw(g))}catch(_){a(_)}}function m(g){g.done?S(g.value):new G(function(_){_(g.value)}).then(w,h)}m((z=z.apply(H,J||[])).next())})}function b(H,J){var G,z,S,a,w={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return a={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function h(m){return function(g){return function(_){if(G)throw new TypeError("Generator is already executing.");for(;w;)try{if(G=1,z&&(S=2&_[0]?z.return:_[0]?z.throw||((S=z.return)&&S.call(z),0):z.next)&&!(S=S.call(z,_[1])).done)return S;switch(z=0,S&&(_=[2&_[0],S.value]),_[0]){case 0:case 1:S=_;break;case 4:return w.label++,{value:_[1],done:!1};case 5:w.label++,z=_[1],_=[0];continue;case 7:_=w.ops.pop(),w.trys.pop();continue;default:if(S=w.trys,!((S=S.length>0&&S[S.length-1])||_[0]!==6&&_[0]!==2)){w=0;continue}if(_[0]===3&&(!S||_[1]>S[0]&&_[1]<S[3])){w.label=_[1];break}if(_[0]===6&&w.label<S[1]){w.label=S[1],S=_;break}if(S&&w.label<S[2]){w.label=S[2],w.ops.push(_);break}S[2]&&w.ops.pop(),w.trys.pop();continue}_=J.call(H,w)}catch(T){_=[6,T],z=0}finally{G=S=0}if(5&_[0])throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}([m,g])}}}function v(H,J){for(var G in H)J.hasOwnProperty(G)||(J[G]=H[G])}function y(H){var J=typeof Symbol=="function"&&H[Symbol.iterator],G=0;return J?J.call(H):{next:function(){return H&&G>=H.length&&(H=void 0),{value:H&&H[G++],done:!H}}}}function x(H,J){var G=typeof Symbol=="function"&&H[Symbol.iterator];if(!G)return H;var z,S,a=G.call(H),w=[];try{for(;(J===void 0||J-- >0)&&!(z=a.next()).done;)w.push(z.value)}catch(h){S={error:h}}finally{try{z&&!z.done&&(G=a.return)&&G.call(a)}finally{if(S)throw S.error}}return w}function E(){for(var H=[],J=0;J<arguments.length;J++)H=H.concat(x(arguments[J]));return H}function R(H){return this instanceof R?(this.v=H,this):new R(H)}function I(H,J,G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var z,S=G.apply(H,J||[]),a=[];return z={},w("next"),w("throw"),w("return"),z[Symbol.asyncIterator]=function(){return this},z;function w(T){S[T]&&(z[T]=function(k){return new Promise(function(M,B){a.push([T,k,M,B])>1||h(T,k)})})}function h(T,k){try{(M=S[T](k)).value instanceof R?Promise.resolve(M.value.v).then(m,g):_(a[0][2],M)}catch(B){_(a[0][3],B)}var M}function m(T){h("next",T)}function g(T){h("throw",T)}function _(T,k){T(k),a.shift(),a.length&&h(a[0][0],a[0][1])}}function O(H){var J,G;return J={},z("next"),z("throw",function(S){throw S}),z("return"),J[Symbol.iterator]=function(){return this},J;function z(S,a){J[S]=H[S]?function(w){return(G=!G)?{value:R(H[S](w)),done:S==="return"}:a?a(w):w}:a}}function A(H){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var J,G=H[Symbol.asyncIterator];return G?G.call(H):(H=y(H),J={},z("next"),z("throw"),z("return"),J[Symbol.asyncIterator]=function(){return this},J);function z(S){J[S]=H[S]&&function(a){return new Promise(function(w,h){(function(m,g,_,T){Promise.resolve(T).then(function(k){m({value:k,done:_})},g)})(w,h,(a=H[S](a)).done,a.value)})}}}function P(H,J){return Object.defineProperty?Object.defineProperty(H,"raw",{value:J}):H.raw=J,H}function N(H){if(H&&H.__esModule)return H;var J={};if(H!=null)for(var G in H)Object.hasOwnProperty.call(H,G)&&(J[G]=H[G]);return J.default=H,J}function L(H){return H&&H.__esModule?H:{default:H}}},function(i,e){},function(i,e,o){e.byteLength=function(b){var v=l(b),y=v[0],x=v[1];return 3*(y+x)/4-x},e.toByteArray=function(b){var v,y,x=l(b),E=x[0],R=x[1],I=new p(function(P,N,L){return 3*(N+L)/4-L}(0,E,R)),O=0,A=R>0?E-4:E;for(y=0;y<A;y+=4)v=f[b.charCodeAt(y)]<<18|f[b.charCodeAt(y+1)]<<12|f[b.charCodeAt(y+2)]<<6|f[b.charCodeAt(y+3)],I[O++]=v>>16&255,I[O++]=v>>8&255,I[O++]=255&v;return R===2&&(v=f[b.charCodeAt(y)]<<2|f[b.charCodeAt(y+1)]>>4,I[O++]=255&v),R===1&&(v=f[b.charCodeAt(y)]<<10|f[b.charCodeAt(y+1)]<<4|f[b.charCodeAt(y+2)]>>2,I[O++]=v>>8&255,I[O++]=255&v),I},e.fromByteArray=function(b){for(var v,y=b.length,x=y%3,E=[],R=0,I=y-x;R<I;R+=16383)E.push(d(b,R,R+16383>I?I:R+16383));return x===1?(v=b[y-1],E.push(n[v>>2]+n[v<<4&63]+"==")):x===2&&(v=(b[y-2]<<8)+b[y-1],E.push(n[v>>10]+n[v>>4&63]+n[v<<2&63]+"=")),E.join("")};for(var n=[],f=[],p=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,s=u.length;c<s;++c)n[c]=u[c],f[u.charCodeAt(c)]=c;function l(b){var v=b.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=b.indexOf("=");return y===-1&&(y=v),[y,y===v?0:4-y%4]}function d(b,v,y){for(var x,E,R=[],I=v;I<y;I+=3)x=(b[I]<<16&16711680)+(b[I+1]<<8&65280)+(255&b[I+2]),R.push(n[(E=x)>>18&63]+n[E>>12&63]+n[E>>6&63]+n[63&E]);return R.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(i,e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */e.read=function(o,n,f,p,u){var c,s,l=8*u-p-1,d=(1<<l)-1,b=d>>1,v=-7,y=f?u-1:0,x=f?-1:1,E=o[n+y];for(y+=x,c=E&(1<<-v)-1,E>>=-v,v+=l;v>0;c=256*c+o[n+y],y+=x,v-=8);for(s=c&(1<<-v)-1,c>>=-v,v+=p;v>0;s=256*s+o[n+y],y+=x,v-=8);if(c===0)c=1-b;else{if(c===d)return s?NaN:1/0*(E?-1:1);s+=Math.pow(2,p),c-=b}return(E?-1:1)*s*Math.pow(2,c-p)},e.write=function(o,n,f,p,u,c){var s,l,d,b=8*c-u-1,v=(1<<b)-1,y=v>>1,x=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=p?0:c-1,R=p?1:-1,I=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(l=isNaN(n)?1:0,s=v):(s=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-s))<1&&(s--,d*=2),(n+=s+y>=1?x/d:x*Math.pow(2,1-y))*d>=2&&(s++,d/=2),s+y>=v?(l=0,s=v):s+y>=1?(l=(n*d-1)*Math.pow(2,u),s+=y):(l=n*Math.pow(2,y-1)*Math.pow(2,u),s=0));u>=8;o[f+E]=255&l,E+=R,l/=256,u-=8);for(s=s<<u|l,b+=u;b>0;o[f+E]=255&s,E+=R,s/=256,b-=8);o[f+E-R]|=128*I}},function(i,e){(function(o){i.exports=o}).call(this,{})},function(i,e,o){(function(n){function f(){return(n==null?void 0:n.crypto)||(n==null?void 0:n.msCrypto)||{}}function p(){const u=f();return u.subtle||u.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=f,e.getSubtleCrypto=p,e.isBrowserCryptoAvailable=function(){return!!f()&&!!p()}}).call(this,o(6))},function(i,e,o){(function(n){function f(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}function p(){return n!==void 0&&n.versions!==void 0&&n.versions.node!==void 0}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=f,e.isNode=p,e.isBrowser=function(){return!f()&&!p()}}).call(this,o(5))},function(i,e,o){i.exports=n=>encodeURIComponent(n).replace(/[!'()*]/g,f=>"%"+f.charCodeAt(0).toString(16).toUpperCase())},function(i,e,o){var n=new RegExp("%[a-f0-9]{2}","gi"),f=new RegExp("(%[a-f0-9]{2})+","gi");function p(c,s){try{return decodeURIComponent(c.join(""))}catch{}if(c.length===1)return c;s=s||1;var l=c.slice(0,s),d=c.slice(s);return Array.prototype.concat.call([],p(l),p(d))}function u(c){try{return decodeURIComponent(c)}catch{for(var s=c.match(n),l=1;l<s.length;l++)s=(c=p(s,l).join("")).match(n);return c}}i.exports=function(c){if(typeof c!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof c+"`");try{return c=c.replace(/\+/g," "),decodeURIComponent(c)}catch{return function(l){for(var d={"%FE%FF":"��","%FF%FE":"��"},b=f.exec(l);b;){try{d[b[0]]=decodeURIComponent(b[0])}catch{var v=u(b[0]);v!==b[0]&&(d[b[0]]=v)}b=f.exec(l)}d["%C2"]="�";for(var y=Object.keys(d),x=0;x<y.length;x++){var E=y[x];l=l.replace(new RegExp(E,"g"),d[E])}return l}(c)}}},function(i,e,o){i.exports=(n,f)=>{if(typeof n!="string"||typeof f!="string")throw new TypeError("Expected the arguments to be of type `string`");if(f==="")return[n];const p=n.indexOf(f);return p===-1?[n]:[n.slice(0,p),n.slice(p+f.length)]}},function(i,e,o){i.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(i,e,o){(function(n){function f(H){return H&&typeof H=="object"&&"default"in H?H.default:H}var p=o(76),u=f(o(179)),c=f(o(200)),s=o(376);typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function l(H){return s.createElement("div",{className:"walletconnect-modal__header"},s.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),s.createElement("p",null,"WalletConnect"),s.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:H.onClose},s.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},s.createElement("div",{className:"walletconnect-modal__close__line1"}),s.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function d(H){return s.createElement("a",{className:"walletconnect-connect__button",href:H.href,id:"walletconnect-connect-button-"+H.name,onClick:H.onClick,rel:"noopener noreferrer",style:{backgroundColor:H.color},target:"_blank"},H.name)}function b(H){var J=H.color,G=H.href,z=H.name,S=H.logo,a=H.onClick;return s.createElement("a",{className:"walletconnect-modal__base__row",href:G,onClick:a,rel:"noopener noreferrer",target:"_blank"},s.createElement("h3",{className:"walletconnect-modal__base__row__h3"},z),s.createElement("div",{className:"walletconnect-modal__base__row__right"},s.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+S+"') "+J,backgroundSize:"100%"}}),s.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function v(H){var J=H.color,G=H.href,z=H.name,S=H.logo,a=H.onClick,w=window.innerWidth<768?(z.length>8?2.5:2.7)+"vw":"inherit";return s.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:G,onClick:a,rel:"noopener noreferrer",target:"_blank"},s.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+S+"') "+J,backgroundSize:"100%"}}),s.createElement("div",{style:{fontSize:w},className:"walletconnect-connect__button__text"},z))}function y(H){var J=p.isAndroid(),G=s.useState(""),z=G[0],S=G[1],a=s.useState(""),w=a[0],h=a[1],m=s.useState(1),g=m[0],_=m[1],T=w?H.links.filter(function(U){return U.name.toLowerCase().includes(w.toLowerCase())}):H.links,k=H.errorMessage,M=w||T.length>5,B=Math.ceil(T.length/12),Y=[12*(g-1)+1,12*g],C=T.length?T.filter(function(U,q){return q+1>=Y[0]&&q+1<=Y[1]}):[],K=!(J||!(B>1)),W=void 0;return s.createElement("div",null,s.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},J?H.text.connect_mobile_wallet:H.text.choose_preferred_wallet),!J&&s.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:z,onChange:function(U){S(U.target.value),clearTimeout(W),U.target.value?W=setTimeout(function(){h(U.target.value),_(1)},1e3):(S(""),h(""),_(1))}}),s.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(J?"__android":M&&T.length?"__wrap":"")},J?s.createElement(d,{name:H.text.connect,color:"rgb(64, 153, 255)",href:H.uri,onClick:s.useCallback(function(){p.saveMobileLinkInfo({name:"Unknown",href:H.uri})},[])}):C.length?C.map(function(U){var q=U.color,j=U.name,D=U.shortName,F=U.logo,$=p.formatIOSMobile(H.uri,U),V=s.useCallback(function(){p.saveMobileLinkInfo({name:j,href:$})},[C]);return M?s.createElement(v,{color:q,href:$,name:D||j,logo:F,onClick:V}):s.createElement(b,{color:q,href:$,name:j,logo:F,onClick:V})}):s.createElement(s.Fragment,null,s.createElement("p",null,k.length?H.errorMessage:H.links.length&&!T.length?H.text.no_wallets_found:H.text.loading))),K&&s.createElement("div",{className:"walletconnect-modal__footer"},Array(B).fill(0).map(function(U,q){var j=q+1,D=g===j;return s.createElement("a",{style:{margin:"auto 10px",fontWeight:D?"bold":"normal"},onClick:function(){return _(j)}},j)})))}function x(H){var J=!!H.message.trim();return s.createElement("div",{className:"walletconnect-qrcode__notification"+(J?" notification__show":"")},H.message)}function E(H){var J=s.useState(""),G=J[0],z=J[1],S=s.useState(""),a=S[0],w=S[1];return s.useEffect(function(){try{return Promise.resolve(function(h){try{var m="";return Promise.resolve(u.toString(h,{margin:0,type:"svg"})).then(function(g){return typeof g=="string"&&(m=g.replace("<svg",'<svg class="walletconnect-qrcode__image"')),m})}catch(g){return Promise.reject(g)}}(H.uri)).then(function(h){w(h)})}catch(h){Promise.reject(h)}},[]),s.createElement("div",null,s.createElement("p",{id:"walletconnect-qrcode-text",className:"walletconnect-qrcode__text"},H.text.scan_qrcode_with_wallet),s.createElement("div",{dangerouslySetInnerHTML:{__html:a}}),s.createElement("div",{className:"walletconnect-modal__footer"},s.createElement("a",{onClick:function(){c(H.uri)?(z(H.text.copied_to_clipboard),setInterval(function(){return z("")},1200)):(z("Error"),setInterval(function(){return z("")},1200))}},H.text.copy_to_clipboard)),s.createElement(x,{message:G}))}function R(H){var J=p.isAndroid(),G=p.isMobile(),z=G?H.qrcodeModalOptions&&H.qrcodeModalOptions.mobileLinks?H.qrcodeModalOptions.mobileLinks:void 0:H.qrcodeModalOptions&&H.qrcodeModalOptions.desktopLinks?H.qrcodeModalOptions.desktopLinks:void 0,S=s.useState(!1),a=S[0],w=S[1],h=s.useState(!1),m=h[0],g=h[1],_=s.useState(!G),T=_[0],k=_[1],M={mobile:G,text:H.text,uri:H.uri,qrcodeModalOptions:H.qrcodeModalOptions},B=s.useState(""),Y=B[0],C=B[1],K=s.useState(!1),W=K[0],U=K[1],q=s.useState([]),j=q[0],D=q[1],F=s.useState(""),$=F[0],V=F[1],Z=function(){m||a||z&&!z.length||j.length>0||s.useEffect(function(){(function(){try{if(J)return Promise.resolve();w(!0);var re=function(ue,fe){try{var oe=ue()}catch(ae){return fe(ae)}return oe&&oe.then?oe.then(void 0,fe):oe}(function(){var ue=H.qrcodeModalOptions&&H.qrcodeModalOptions.registryUrl?H.qrcodeModalOptions.registryUrl:p.getWalletRegistryUrl();return Promise.resolve(fetch(ue)).then(function(fe){return Promise.resolve(fe.json()).then(function(oe){var ae=oe.listings,ie=G?"mobile":"desktop",te=p.getMobileLinkRegistry(p.formatMobileRegistry(ae,ie),z);w(!1),g(!0),V(te.length?"":H.text.no_supported_wallets),D(te);var le=te.length===1;le&&(C(p.formatIOSMobile(H.uri,te[0])),k(!0)),U(le)})})},function(ue){w(!1),g(!0),V(H.text.something_went_wrong),console.error(ue)});Promise.resolve(re&&re.then?re.then(function(){}):void 0)}catch(ue){return Promise.reject(ue)}})()})};Z();var ee=G?T:!T;return s.createElement("div",{id:"walletconnect-qrcode-modal",className:"walletconnect-qrcode__base animated fadeIn"},s.createElement("div",{className:"walletconnect-modal__base"},s.createElement(l,{onClose:H.onClose}),W&&T?s.createElement("div",{className:"walletconnect-modal__single_wallet"},s.createElement("a",{onClick:function(){return p.saveMobileLinkInfo({name:j[0].name,href:Y})},href:Y,rel:"noopener noreferrer",target:"_blank"},H.text.connect_with+" "+(W?j[0].name:"")+" ›")):J||a||!a&&j.length?s.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(ee?" right__selected":"")},s.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),G?s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return k(!1),Z()}},H.text.mobile),s.createElement("a",{onClick:function(){return k(!0)}},H.text.qrcode)):s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return k(!0)}},H.text.qrcode),s.createElement("a",{onClick:function(){return k(!1),Z()}},H.text.desktop))):null,s.createElement("div",null,T||!J&&!a&&!j.length?s.createElement(E,Object.assign({},M)):s.createElement(y,Object.assign({},M,{links:j,errorMessage:$})))))}var I={de:{choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},ko:{choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},fa:{choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"}};function O(){var H=p.getDocumentOrThrow(),J=H.getElementById("walletconnect-qrcode-modal");J&&(J.className=J.className.replace("fadeIn","fadeOut"),setTimeout(function(){var G=H.getElementById("walletconnect-wrapper");G&&H.body.removeChild(G)},300))}function A(H){return function(){O(),H&&H()}}function P(H,J,G){(function(){var a=p.getDocumentOrThrow(),w=a.getElementById("walletconnect-style-sheet");w&&a.head.removeChild(w);var h=a.createElement("style");h.setAttribute("id","walletconnect-style-sheet"),h.innerText=`:root {
  --animation-duration: 300ms;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.animated {
  animation-duration: var(--animation-duration);
  animation-fill-mode: both;
}

.fadeIn {
  animation-name: fadeIn;
}

.fadeOut {
  animation-name: fadeOut;
}

#walletconnect-wrapper {
  -webkit-user-select: none;
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  user-select: none;
  width: 100%;
  z-index: 99999999999999;
}

.walletconnect-modal__headerLogo {
  height: 21px;
}

.walletconnect-modal__header p {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  align-items: flex-start;
  display: flex;
  flex: 1;
  margin-left: 5px;
}

.walletconnect-modal__close__wrapper {
  position: absolute;
  top: 0px;
  right: 0px;
  z-index: 10000;
  background: white;
  border-radius: 26px;
  padding: 6px;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

.walletconnect-modal__close__icon {
  position: relative;
  top: 7px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
}

.walletconnect-modal__close__line1 {
  position: absolute;
  width: 100%;
  border: 1px solid rgb(48, 52, 59);
}

.walletconnect-modal__close__line2 {
  position: absolute;
  width: 100%;
  border: 1px solid rgb(48, 52, 59);
  transform: rotate(90deg);
}

.walletconnect-qrcode__base {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  background: rgba(37, 41, 46, 0.95);
  height: 100%;
  left: 0;
  pointer-events: auto;
  position: fixed;
  top: 0;
  transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  width: 100%;
  will-change: opacity;
  padding: 40px;
  box-sizing: border-box;
}

.walletconnect-qrcode__text {
  color: rgba(60, 66, 82, 0.6);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1875em;
  margin: 10px 0 20px 0;
  text-align: center;
  width: 100%;
}

@media only screen and (max-width: 768px) {
  .walletconnect-qrcode__text {
    font-size: 4vw;
  }
}

@media only screen and (max-width: 320px) {
  .walletconnect-qrcode__text {
    font-size: 14px;
  }
}

.walletconnect-qrcode__image {
  width: calc(100% - 30px);
  box-sizing: border-box;
  cursor: none;
  margin: 0 auto;
}

.walletconnect-qrcode__notification {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.1s ease-in-out;
  background: white;
  color: black;
  margin-bottom: -60px;
  opacity: 0;
}

.walletconnect-qrcode__notification.notification__show {
  opacity: 1;
}

@media only screen and (max-width: 768px) {
  .walletconnect-modal__header {
    height: 130px;
  }
  .walletconnect-modal__base {
    overflow: auto;
  }
}

@media only screen and (min-device-width: 415px) and (max-width: 768px) {
  #content {
    max-width: 768px;
    box-sizing: border-box;
  }
}

@media only screen and (min-width: 375px) and (max-width: 415px) {
  #content {
    max-width: 414px;
    box-sizing: border-box;
  }
}

@media only screen and (min-width: 320px) and (max-width: 375px) {
  #content {
    max-width: 375px;
    box-sizing: border-box;
  }
}

@media only screen and (max-width: 320px) {
  #content {
    max-width: 320px;
    box-sizing: border-box;
  }
}

.walletconnect-modal__base {
  -webkit-font-smoothing: antialiased;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);
  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,
    -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
  margin-top: 41px;
  padding: 24px 24px 22px;
  pointer-events: auto;
  position: relative;
  text-align: center;
  transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
  overflow: visible;
  transform: translateY(-50%);
  top: 50%;
  max-width: 500px;
  margin: auto;
}

@media only screen and (max-width: 320px) {
  .walletconnect-modal__base {
    padding: 24px 12px;
  }
}

.walletconnect-modal__base .hidden {
  transform: translateY(150%);
  transition: 0.125s cubic-bezier(0.4, 0, 1, 1);
}

.walletconnect-modal__header {
  align-items: center;
  display: flex;
  height: 26px;
  left: 0;
  justify-content: space-between;
  position: absolute;
  top: -42px;
  width: 100%;
}

.walletconnect-modal__base .wc-logo {
  align-items: center;
  display: flex;
  height: 26px;
  margin-top: 15px;
  padding-bottom: 15px;
  pointer-events: auto;
}

.walletconnect-modal__base .wc-logo div {
  background-color: #3399ff;
  height: 21px;
  margin-right: 5px;
  mask-image: url("images/wc-logo.svg") center no-repeat;
  width: 32px;
}

.walletconnect-modal__base .wc-logo p {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.walletconnect-modal__base h2 {
  color: rgba(60, 66, 82, 0.6);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1875em;
  margin: 0 0 19px 0;
  text-align: center;
  width: 100%;
}

.walletconnect-modal__base__row {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  align-items: center;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  height: 56px;
  justify-content: space-between;
  padding: 0 15px;
  position: relative;
  margin: 0px 0px 8px;
  text-align: left;
  transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  text-decoration: none;
}

.walletconnect-modal__base__row:hover {
  background: rgba(60, 66, 82, 0.06);
}

.walletconnect-modal__base__row:active {
  background: rgba(60, 66, 82, 0.06);
  transform: scale(0.975);
  transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.walletconnect-modal__base__row__h3 {
  color: #25292e;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  padding-bottom: 3px;
}

.walletconnect-modal__base__row__right {
  align-items: center;
  display: flex;
  justify-content: center;
}

.walletconnect-modal__base__row__right__app-icon {
  border-radius: 8px;
  height: 34px;
  margin: 0 11px 2px 0;
  width: 34px;
  background-size: 100%;
  box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);
}

.walletconnect-modal__base__row__right__caret {
  height: 18px;
  opacity: 0.3;
  transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 8px;
  will-change: opacity;
}

.walletconnect-modal__base__row:hover .caret,
.walletconnect-modal__base__row:active .caret {
  opacity: 0.6;
}

.walletconnect-modal__mobile__toggle {
  width: 80%;
  display: flex;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 18px;
  background: #d4d5d9;
}

.walletconnect-modal__single_wallet {
  display: flex;
  justify-content: center;
  margin-top: 7px;
  margin-bottom: 18px;
}

.walletconnect-modal__single_wallet a {
  cursor: pointer;
  color: rgb(64, 153, 255);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none !important;
  margin: 0 auto;
}

.walletconnect-modal__mobile__toggle_selector {
  width: calc(50% - 8px);
  background: white;
  position: absolute;
  border-radius: 5px;
  height: calc(100% - 8px);
  top: 4px;
  transition: all 0.2s ease-in-out;
  transform: translate3d(4px, 0, 0);
}

.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {
  transform: translate3d(calc(100% + 12px), 0, 0);
}

.walletconnect-modal__mobile__toggle a {
  font-size: 12px;
  width: 50%;
  text-align: center;
  padding: 8px;
  margin: 0;
  font-weight: 600;
  z-index: 1;
}

.walletconnect-modal__footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

@media only screen and (max-width: 768px) {
  .walletconnect-modal__footer {
    margin-top: 5vw;
  }
}

.walletconnect-modal__footer a {
  cursor: pointer;
  color: #898d97;
  font-size: 15px;
  margin: 0 auto;
}

@media only screen and (max-width: 320px) {
  .walletconnect-modal__footer a {
    font-size: 14px;
  }
}

.walletconnect-connect__buttons__wrapper {
  max-height: 44vh;
}

.walletconnect-connect__buttons__wrapper__android {
  margin: 50% 0;
}

.walletconnect-connect__buttons__wrapper__wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 10px 0;
}

@media only screen and (min-width: 768px) {
  .walletconnect-connect__buttons__wrapper__wrap {
    margin-top: 40px;
  }
}

.walletconnect-connect__button {
  background-color: rgb(64, 153, 255);
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgb(255, 255, 255);
  font-weight: 500;
}

.walletconnect-connect__button__icon_anchor {
  cursor: pointer;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 8px;
  width: 42px;
  justify-self: center;
  flex-direction: column;
  text-decoration: none !important;
}

@media only screen and (max-width: 320px) {
  .walletconnect-connect__button__icon_anchor {
    margin: 4px;
  }
}

.walletconnect-connect__button__icon {
  border-radius: 10px;
  height: 42px;
  margin: 0;
  width: 42px;
  background-size: cover !important;
  box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);
}

.walletconnect-connect__button__text {
  color: #424952;
  font-size: 2.7vw;
  text-decoration: none !important;
  padding: 0;
  margin-top: 1.8vw;
  font-weight: 600;
}

@media only screen and (min-width: 768px) {
  .walletconnect-connect__button__text {
    font-size: 16px;
    margin-top: 12px;
  }
}

.walletconnect-search__input {
  border: none;
  background: #d4d5d9;
  border-style: none;
  padding: 8px 16px;
  outline: none;
  font-style: normal;
  font-stretch: normal;
  font-size: 16px;
  font-style: normal;
  font-stretch: normal;
  line-height: normal;
  letter-spacing: normal;
  text-align: left;
  border-radius: 8px;
  width: calc(100% - 16px);
  margin: 0;
  margin-bottom: 8px;
}
`,a.head.appendChild(h)})();var z,S=function(){var a=p.getDocumentOrThrow(),w=a.createElement("div");return w.setAttribute("id","walletconnect-wrapper"),a.body.appendChild(w),w}();s.render(s.createElement(R,{text:(z=p.getNavigatorOrThrow().language.split("-")[0]||"en",I[z]||I.en),uri:H,onClose:A(J),qrcodeModalOptions:G}),S)}var N=function(){return n!==void 0&&n.versions!==void 0&&n.versions.node!==void 0},L={open:function(H,J,G){console.log(H),N()?function(z){u.toString(z,{type:"terminal"}).then(console.log)}(H):P(H,J,G)},close:function(){N()||O()}};i.exports=L}).call(this,o(5))},function(i,e,o){var n=o(180),f=o(181),p=o(198),u=o(199);function c(s,l,d,b,v){var y=[].slice.call(arguments,1),x=y.length,E=typeof y[x-1]=="function";if(!E&&!n())throw new Error("Callback required as last argument");if(!E){if(x<1)throw new Error("Too few arguments provided");return x===1?(d=l,l=b=void 0):x!==2||l.getContext||(b=d,d=l,l=void 0),new Promise(function(I,O){try{var A=f.create(d,b);I(s(A,l,b))}catch(P){O(P)}})}if(x<2)throw new Error("Too few arguments provided");x===2?(v=d,d=l,l=b=void 0):x===3&&(l.getContext&&v===void 0?(v=b,b=void 0):(v=b,b=d,d=l,l=void 0));try{var R=f.create(d,b);v(null,s(R,l,b))}catch(I){v(I)}}e.create=f.create,e.toCanvas=c.bind(null,p.render),e.toDataURL=c.bind(null,p.renderToDataURL),e.toString=c.bind(null,function(s,l,d){return u.render(s,d)})},function(i,e){i.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}},function(i,e,o){var n=o(26),f=o(17),p=o(51),u=o(182),c=o(183),s=o(184),l=o(185),d=o(186),b=o(98),v=o(187),y=o(190),x=o(191),E=o(18),R=o(192),I=o(50);function O(N,L,H){var J,G,z=N.size,S=x.getEncodedBits(L,H);for(J=0;J<15;J++)G=(S>>J&1)==1,J<6?N.set(J,8,G,!0):J<8?N.set(J+1,8,G,!0):N.set(z-15+J,8,G,!0),J<8?N.set(8,z-J-1,G,!0):J<9?N.set(8,15-J-1+1,G,!0):N.set(8,15-J-1,G,!0);N.set(z-8,8,1,!0)}function A(N,L,H){var J=new u;H.forEach(function(a){J.put(a.mode.bit,4),J.put(a.getLength(),E.getCharCountIndicator(a.mode,N)),a.write(J)});var G=8*(f.getSymbolTotalCodewords(N)-b.getTotalCodewordsCount(N,L));for(J.getLengthInBits()+4<=G&&J.put(0,4);J.getLengthInBits()%8!=0;)J.putBit(0);for(var z=(G-J.getLengthInBits())/8,S=0;S<z;S++)J.put(S%2?17:236,8);return function(a,w,h){for(var m=f.getSymbolTotalCodewords(w),g=b.getTotalCodewordsCount(w,h),_=m-g,T=b.getBlocksCount(w,h),k=T-m%T,M=Math.floor(m/T),B=Math.floor(_/T),Y=B+1,C=M-B,K=new v(C),W=0,U=new Array(T),q=new Array(T),j=0,D=n.from(a.buffer),F=0;F<T;F++){var $=F<k?B:Y;U[F]=D.slice(W,W+$),q[F]=K.encode(U[F]),W+=$,j=Math.max(j,$)}var V,Z,ee=n.alloc(m),re=0;for(V=0;V<j;V++)for(Z=0;Z<T;Z++)V<U[Z].length&&(ee[re++]=U[Z][V]);for(V=0;V<C;V++)for(Z=0;Z<T;Z++)ee[re++]=q[Z][V];return ee}(J,N,L)}function P(N,L,H,J){var G;if(I(N))G=R.fromArray(N);else{if(typeof N!="string")throw new Error("Invalid data");var z=L;if(!z){var S=R.rawSplit(N);z=y.getBestVersionForData(S,H)}G=R.fromString(N,z||40)}var a=y.getBestVersionForData(G,H);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(L){if(L<a)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+a+`.
`)}else L=a;var w=A(L,H,G),h=f.getSymbolSize(L),m=new c(h);return function(g,_){for(var T=g.size,k=l.getPositions(_),M=0;M<k.length;M++)for(var B=k[M][0],Y=k[M][1],C=-1;C<=7;C++)if(!(B+C<=-1||T<=B+C))for(var K=-1;K<=7;K++)Y+K<=-1||T<=Y+K||(C>=0&&C<=6&&(K===0||K===6)||K>=0&&K<=6&&(C===0||C===6)||C>=2&&C<=4&&K>=2&&K<=4?g.set(B+C,Y+K,!0,!0):g.set(B+C,Y+K,!1,!0))}(m,L),function(g){for(var _=g.size,T=8;T<_-8;T++){var k=T%2==0;g.set(T,6,k,!0),g.set(6,T,k,!0)}}(m),function(g,_){for(var T=s.getPositions(_),k=0;k<T.length;k++)for(var M=T[k][0],B=T[k][1],Y=-2;Y<=2;Y++)for(var C=-2;C<=2;C++)Y===-2||Y===2||C===-2||C===2||Y===0&&C===0?g.set(M+Y,B+C,!0,!0):g.set(M+Y,B+C,!1,!0)}(m,L),O(m,H,0),L>=7&&function(g,_){for(var T,k,M,B=g.size,Y=y.getEncodedBits(_),C=0;C<18;C++)T=Math.floor(C/3),k=C%3+B-8-3,M=(Y>>C&1)==1,g.set(T,k,M,!0),g.set(k,T,M,!0)}(m,L),function(g,_){for(var T=g.size,k=-1,M=T-1,B=7,Y=0,C=T-1;C>0;C-=2)for(C===6&&C--;;){for(var K=0;K<2;K++)if(!g.isReserved(M,C-K)){var W=!1;Y<_.length&&(W=(_[Y]>>>B&1)==1),g.set(M,C-K,W),--B===-1&&(Y++,B=7)}if((M+=k)<0||T<=M){M-=k,k=-k;break}}}(m,w),isNaN(J)&&(J=d.getBestMask(m,O.bind(null,m,H))),d.applyMask(J,m),O(m,H,J),{modules:m,version:L,errorCorrectionLevel:H,maskPattern:J,segments:G}}e.create=function(N,L){if(N===void 0||N==="")throw new Error("No input text");var H,J,G=p.M;return L!==void 0&&(G=p.from(L.errorCorrectionLevel,p.M),H=y.from(L.version),J=d.from(L.maskPattern),L.toSJISFunc&&f.setToSJISFunction(L.toSJISFunc)),P(N,H,G,J)}},function(i,e){function o(){this.buffer=[],this.length=0}o.prototype={get:function(n){var f=Math.floor(n/8);return(this.buffer[f]>>>7-n%8&1)==1},put:function(n,f){for(var p=0;p<f;p++)this.putBit((n>>>f-p-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(n){var f=Math.floor(this.length/8);this.buffer.length<=f&&this.buffer.push(0),n&&(this.buffer[f]|=128>>>this.length%8),this.length++}},i.exports=o},function(i,e,o){var n=o(26);function f(p){if(!p||p<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=p,this.data=n.alloc(p*p),this.reservedBit=n.alloc(p*p)}f.prototype.set=function(p,u,c,s){var l=p*this.size+u;this.data[l]=c,s&&(this.reservedBit[l]=!0)},f.prototype.get=function(p,u){return this.data[p*this.size+u]},f.prototype.xor=function(p,u,c){this.data[p*this.size+u]^=c},f.prototype.isReserved=function(p,u){return this.reservedBit[p*this.size+u]},i.exports=f},function(i,e,o){var n=o(17).getSymbolSize;e.getRowColCoords=function(f){if(f===1)return[];for(var p=Math.floor(f/7)+2,u=n(f),c=u===145?26:2*Math.ceil((u-13)/(2*p-2)),s=[u-7],l=1;l<p-1;l++)s[l]=s[l-1]-c;return s.push(6),s.reverse()},e.getPositions=function(f){for(var p=[],u=e.getRowColCoords(f),c=u.length,s=0;s<c;s++)for(var l=0;l<c;l++)s===0&&l===0||s===0&&l===c-1||s===c-1&&l===0||p.push([u[s],u[l]]);return p}},function(i,e,o){var n=o(17).getSymbolSize;e.getPositions=function(f){var p=n(f);return[[0,0],[p-7,0],[0,p-7]]}},function(i,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var o=3,n=3,f=40,p=10;function u(c,s,l){switch(c){case e.Patterns.PATTERN000:return(s+l)%2==0;case e.Patterns.PATTERN001:return s%2==0;case e.Patterns.PATTERN010:return l%3==0;case e.Patterns.PATTERN011:return(s+l)%3==0;case e.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(l/3))%2==0;case e.Patterns.PATTERN101:return s*l%2+s*l%3==0;case e.Patterns.PATTERN110:return(s*l%2+s*l%3)%2==0;case e.Patterns.PATTERN111:return(s*l%3+(s+l)%2)%2==0;default:throw new Error("bad maskPattern:"+c)}}e.isValid=function(c){return c!=null&&c!==""&&!isNaN(c)&&c>=0&&c<=7},e.from=function(c){return e.isValid(c)?parseInt(c,10):void 0},e.getPenaltyN1=function(c){for(var s=c.size,l=0,d=0,b=0,v=null,y=null,x=0;x<s;x++){d=b=0,v=y=null;for(var E=0;E<s;E++){var R=c.get(x,E);R===v?d++:(d>=5&&(l+=o+(d-5)),v=R,d=1),(R=c.get(E,x))===y?b++:(b>=5&&(l+=o+(b-5)),y=R,b=1)}d>=5&&(l+=o+(d-5)),b>=5&&(l+=o+(b-5))}return l},e.getPenaltyN2=function(c){for(var s=c.size,l=0,d=0;d<s-1;d++)for(var b=0;b<s-1;b++){var v=c.get(d,b)+c.get(d,b+1)+c.get(d+1,b)+c.get(d+1,b+1);v!==4&&v!==0||l++}return l*n},e.getPenaltyN3=function(c){for(var s=c.size,l=0,d=0,b=0,v=0;v<s;v++){d=b=0;for(var y=0;y<s;y++)d=d<<1&2047|c.get(v,y),y>=10&&(d===1488||d===93)&&l++,b=b<<1&2047|c.get(y,v),y>=10&&(b===1488||b===93)&&l++}return l*f},e.getPenaltyN4=function(c){for(var s=0,l=c.data.length,d=0;d<l;d++)s+=c.data[d];return Math.abs(Math.ceil(100*s/l/5)-10)*p},e.applyMask=function(c,s){for(var l=s.size,d=0;d<l;d++)for(var b=0;b<l;b++)s.isReserved(b,d)||s.xor(b,d,u(c,b,d))},e.getBestMask=function(c,s){for(var l=Object.keys(e.Patterns).length,d=0,b=1/0,v=0;v<l;v++){s(v),e.applyMask(v,c);var y=e.getPenaltyN1(c)+e.getPenaltyN2(c)+e.getPenaltyN3(c)+e.getPenaltyN4(c);e.applyMask(v,c),y<b&&(b=y,d=v)}return d}},function(i,e,o){var n=o(26),f=o(188),p=o(2).Buffer;function u(c){this.genPoly=void 0,this.degree=c,this.degree&&this.initialize(this.degree)}u.prototype.initialize=function(c){this.degree=c,this.genPoly=f.generateECPolynomial(this.degree)},u.prototype.encode=function(c){if(!this.genPoly)throw new Error("Encoder not initialized");var s=n.alloc(this.degree),l=p.concat([c,s],c.length+this.degree),d=f.mod(l,this.genPoly),b=this.degree-d.length;if(b>0){var v=n.alloc(this.degree);return d.copy(v,b),v}return d},i.exports=u},function(i,e,o){var n=o(26),f=o(189);e.mul=function(p,u){for(var c=n.alloc(p.length+u.length-1),s=0;s<p.length;s++)for(var l=0;l<u.length;l++)c[s+l]^=f.mul(p[s],u[l]);return c},e.mod=function(p,u){for(var c=n.from(p);c.length-u.length>=0;){for(var s=c[0],l=0;l<u.length;l++)c[l]^=f.mul(u[l],s);for(var d=0;d<c.length&&c[d]===0;)d++;c=c.slice(d)}return c},e.generateECPolynomial=function(p){for(var u=n.from([1]),c=0;c<p;c++)u=e.mul(u,[1,f.exp(c)]);return u}},function(i,e,o){var n=o(26),f=n.alloc(512),p=n.alloc(256);(function(){for(var u=1,c=0;c<255;c++)f[c]=u,p[u]=c,256&(u<<=1)&&(u^=285);for(c=255;c<512;c++)f[c]=f[c-255]})(),e.log=function(u){if(u<1)throw new Error("log("+u+")");return p[u]},e.exp=function(u){return f[u]},e.mul=function(u,c){return u===0||c===0?0:f[p[u]+p[c]]}},function(i,e,o){var n=o(17),f=o(98),p=o(51),u=o(18),c=o(99),s=o(50),l=n.getBCHDigit(7973);function d(v,y){return u.getCharCountIndicator(v,y)+4}function b(v,y){var x=0;return v.forEach(function(E){var R=d(E.mode,y);x+=R+E.getBitsLength()}),x}e.from=function(v,y){return c.isValid(v)?parseInt(v,10):y},e.getCapacity=function(v,y,x){if(!c.isValid(v))throw new Error("Invalid QR Code version");x===void 0&&(x=u.BYTE);var E=8*(n.getSymbolTotalCodewords(v)-f.getTotalCodewordsCount(v,y));if(x===u.MIXED)return E;var R=E-d(x,v);switch(x){case u.NUMERIC:return Math.floor(R/10*3);case u.ALPHANUMERIC:return Math.floor(R/11*2);case u.KANJI:return Math.floor(R/13);case u.BYTE:default:return Math.floor(R/8)}},e.getBestVersionForData=function(v,y){var x,E=p.from(y,p.M);if(s(v)){if(v.length>1)return function(R,I){for(var O=1;O<=40;O++)if(b(R,O)<=e.getCapacity(O,I,u.MIXED))return O}(v,E);if(v.length===0)return 1;x=v[0]}else x=v;return function(R,I,O){for(var A=1;A<=40;A++)if(I<=e.getCapacity(A,O,R))return A}(x.mode,x.getLength(),E)},e.getEncodedBits=function(v){if(!c.isValid(v)||v<7)throw new Error("Invalid QR Code version");for(var y=v<<12;n.getBCHDigit(y)-l>=0;)y^=7973<<n.getBCHDigit(y)-l;return v<<12|y}},function(i,e,o){var n=o(17),f=n.getBCHDigit(1335);e.getEncodedBits=function(p,u){for(var c=p.bit<<3|u,s=c<<10;n.getBCHDigit(s)-f>=0;)s^=1335<<n.getBCHDigit(s)-f;return 21522^(c<<10|s)}},function(i,e,o){var n=o(18),f=o(193),p=o(194),u=o(195),c=o(196),s=o(100),l=o(17),d=o(197);function b(R){return unescape(encodeURIComponent(R)).length}function v(R,I,O){for(var A,P=[];(A=R.exec(O))!==null;)P.push({data:A[0],index:A.index,mode:I,length:A[0].length});return P}function y(R){var I,O,A=v(s.NUMERIC,n.NUMERIC,R),P=v(s.ALPHANUMERIC,n.ALPHANUMERIC,R);return l.isKanjiModeEnabled()?(I=v(s.BYTE,n.BYTE,R),O=v(s.KANJI,n.KANJI,R)):(I=v(s.BYTE_KANJI,n.BYTE,R),O=[]),A.concat(P,I,O).sort(function(N,L){return N.index-L.index}).map(function(N){return{data:N.data,mode:N.mode,length:N.length}})}function x(R,I){switch(I){case n.NUMERIC:return f.getBitsLength(R);case n.ALPHANUMERIC:return p.getBitsLength(R);case n.KANJI:return c.getBitsLength(R);case n.BYTE:return u.getBitsLength(R)}}function E(R,I){var O,A=n.getBestModeForData(R);if((O=n.from(I,A))!==n.BYTE&&O.bit<A.bit)throw new Error('"'+R+'" cannot be encoded with mode '+n.toString(O)+`.
 Suggested mode is: `+n.toString(A));switch(O!==n.KANJI||l.isKanjiModeEnabled()||(O=n.BYTE),O){case n.NUMERIC:return new f(R);case n.ALPHANUMERIC:return new p(R);case n.KANJI:return new c(R);case n.BYTE:return new u(R)}}e.fromArray=function(R){return R.reduce(function(I,O){return typeof O=="string"?I.push(E(O,null)):O.data&&I.push(E(O.data,O.mode)),I},[])},e.fromString=function(R,I){for(var O=function(L,H){for(var J={},G={start:{}},z=["start"],S=0;S<L.length;S++){for(var a=L[S],w=[],h=0;h<a.length;h++){var m=a[h],g=""+S+h;w.push(g),J[g]={node:m,lastCount:0},G[g]={};for(var _=0;_<z.length;_++){var T=z[_];J[T]&&J[T].node.mode===m.mode?(G[T][g]=x(J[T].lastCount+m.length,m.mode)-x(J[T].lastCount,m.mode),J[T].lastCount+=m.length):(J[T]&&(J[T].lastCount=m.length),G[T][g]=x(m.length,m.mode)+4+n.getCharCountIndicator(m.mode,H))}}z=w}for(_=0;_<z.length;_++)G[z[_]].end=0;return{map:G,table:J}}(function(L){for(var H=[],J=0;J<L.length;J++){var G=L[J];switch(G.mode){case n.NUMERIC:H.push([G,{data:G.data,mode:n.ALPHANUMERIC,length:G.length},{data:G.data,mode:n.BYTE,length:G.length}]);break;case n.ALPHANUMERIC:H.push([G,{data:G.data,mode:n.BYTE,length:G.length}]);break;case n.KANJI:H.push([G,{data:G.data,mode:n.BYTE,length:b(G.data)}]);break;case n.BYTE:H.push([{data:G.data,mode:n.BYTE,length:b(G.data)}])}}return H}(y(R,l.isKanjiModeEnabled())),I),A=d.find_path(O.map,"start","end"),P=[],N=1;N<A.length-1;N++)P.push(O.table[A[N]].node);return e.fromArray(function(L){return L.reduce(function(H,J){var G=H.length-1>=0?H[H.length-1]:null;return G&&G.mode===J.mode?(H[H.length-1].data+=J.data,H):(H.push(J),H)},[])}(P))},e.rawSplit=function(R){return e.fromArray(y(R,l.isKanjiModeEnabled()))}},function(i,e,o){var n=o(18);function f(p){this.mode=n.NUMERIC,this.data=p.toString()}f.getBitsLength=function(p){return 10*Math.floor(p/3)+(p%3?p%3*3+1:0)},f.prototype.getLength=function(){return this.data.length},f.prototype.getBitsLength=function(){return f.getBitsLength(this.data.length)},f.prototype.write=function(p){var u,c,s;for(u=0;u+3<=this.data.length;u+=3)c=this.data.substr(u,3),s=parseInt(c,10),p.put(s,10);var l=this.data.length-u;l>0&&(c=this.data.substr(u),s=parseInt(c,10),p.put(s,3*l+1))},i.exports=f},function(i,e,o){var n=o(18),f=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function p(u){this.mode=n.ALPHANUMERIC,this.data=u}p.getBitsLength=function(u){return 11*Math.floor(u/2)+u%2*6},p.prototype.getLength=function(){return this.data.length},p.prototype.getBitsLength=function(){return p.getBitsLength(this.data.length)},p.prototype.write=function(u){var c;for(c=0;c+2<=this.data.length;c+=2){var s=45*f.indexOf(this.data[c]);s+=f.indexOf(this.data[c+1]),u.put(s,11)}this.data.length%2&&u.put(f.indexOf(this.data[c]),6)},i.exports=p},function(i,e,o){var n=o(26),f=o(18);function p(u){this.mode=f.BYTE,this.data=n.from(u)}p.getBitsLength=function(u){return 8*u},p.prototype.getLength=function(){return this.data.length},p.prototype.getBitsLength=function(){return p.getBitsLength(this.data.length)},p.prototype.write=function(u){for(var c=0,s=this.data.length;c<s;c++)u.put(this.data[c],8)},i.exports=p},function(i,e,o){var n=o(18),f=o(17);function p(u){this.mode=n.KANJI,this.data=u}p.getBitsLength=function(u){return 13*u},p.prototype.getLength=function(){return this.data.length},p.prototype.getBitsLength=function(){return p.getBitsLength(this.data.length)},p.prototype.write=function(u){var c;for(c=0;c<this.data.length;c++){var s=f.toSJIS(this.data[c]);if(s>=33088&&s<=40956)s-=33088;else{if(!(s>=57408&&s<=60351))throw new Error("Invalid SJIS character: "+this.data[c]+`
Make sure your charset is UTF-8`);s-=49472}s=192*(s>>>8&255)+(255&s),u.put(s,13)}},i.exports=p},function(i,e,o){var n={single_source_shortest_paths:function(f,p,u){var c={},s={};s[p]=0;var l,d,b,v,y,x,E,R=n.PriorityQueue.make();for(R.push(p,0);!R.empty();)for(b in d=(l=R.pop()).value,v=l.cost,y=f[d]||{})y.hasOwnProperty(b)&&(x=v+y[b],E=s[b],(s[b]===void 0||E>x)&&(s[b]=x,R.push(b,x),c[b]=d));if(u!==void 0&&s[u]===void 0){var I=["Could not find a path from ",p," to ",u,"."].join("");throw new Error(I)}return c},extract_shortest_path_from_predecessor_list:function(f,p){for(var u=[],c=p;c;)u.push(c),f[c],c=f[c];return u.reverse(),u},find_path:function(f,p,u){var c=n.single_source_shortest_paths(f,p,u);return n.extract_shortest_path_from_predecessor_list(c,u)},PriorityQueue:{make:function(f){var p,u=n.PriorityQueue,c={};for(p in f=f||{},u)u.hasOwnProperty(p)&&(c[p]=u[p]);return c.queue=[],c.sorter=f.sorter||u.default_sorter,c},default_sorter:function(f,p){return f.cost-p.cost},push:function(f,p){var u={value:f,cost:p};this.queue.push(u),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};i.exports=n},function(i,e,o){var n=o(101);e.render=function(f,p,u){var c=u,s=p;c!==void 0||p&&p.getContext||(c=p,p=void 0),p||(s=function(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),c=n.getOptions(c);var l=n.getImageWidth(f.modules.size,c),d=s.getContext("2d"),b=d.createImageData(l,l);return n.qrToImageData(b.data,f,c),function(v,y,x){v.clearRect(0,0,y.width,y.height),y.style||(y.style={}),y.height=x,y.width=x,y.style.height=x+"px",y.style.width=x+"px"}(d,s,l),d.putImageData(b,0,0),s},e.renderToDataURL=function(f,p,u){var c=u;c!==void 0||p&&p.getContext||(c=p,p=void 0),c||(c={});var s=e.render(f,p,c),l=c.type||"image/png",d=c.rendererOpts||{};return s.toDataURL(l,d.quality)}},function(i,e,o){var n=o(101);function f(u,c){var s=u.a/255,l=c+'="'+u.hex+'"';return s<1?l+" "+c+'-opacity="'+s.toFixed(2).slice(1)+'"':l}function p(u,c,s){var l=u+c;return s!==void 0&&(l+=" "+s),l}e.render=function(u,c,s){var l=n.getOptions(c),d=u.modules.size,b=u.modules.data,v=d+2*l.margin,y=l.color.light.a?"<path "+f(l.color.light,"fill")+' d="M0 0h'+v+"v"+v+'H0z"/>':"",x="<path "+f(l.color.dark,"stroke")+' d="'+function(I,O,A){for(var P="",N=0,L=!1,H=0,J=0;J<I.length;J++){var G=Math.floor(J%O),z=Math.floor(J/O);G||L||(L=!0),I[J]?(H++,J>0&&G>0&&I[J-1]||(P+=L?p("M",G+A,.5+z+A):p("m",N,0),N=0,L=!1),G+1<O&&I[J+1]||(P+=p("h",H),H=0)):N++}return P}(b,d,l.margin)+'"/>',E='viewBox="0 0 '+v+" "+v+'"',R='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+E+' shape-rendering="crispEdges">'+y+x+`</svg>
`;return typeof s=="function"&&s(null,R),R}},function(i,e,o){var n=o(201),f={"text/plain":"Text","text/html":"Url",default:"Text"};i.exports=function(p,u){var c,s,l,d,b,v,y=!1;u||(u={}),c=u.debug||!1;try{if(l=n(),d=document.createRange(),b=document.getSelection(),(v=document.createElement("span")).textContent=p,v.style.all="unset",v.style.position="fixed",v.style.top=0,v.style.clip="rect(0, 0, 0, 0)",v.style.whiteSpace="pre",v.style.webkitUserSelect="text",v.style.MozUserSelect="text",v.style.msUserSelect="text",v.style.userSelect="text",v.addEventListener("copy",function(x){if(x.stopPropagation(),u.format)if(x.preventDefault(),x.clipboardData===void 0){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var E=f[u.format]||f.default;window.clipboardData.setData(E,p)}else x.clipboardData.clearData(),x.clipboardData.setData(u.format,p);u.onCopy&&(x.preventDefault(),u.onCopy(x.clipboardData))}),document.body.appendChild(v),d.selectNodeContents(v),b.addRange(d),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");y=!0}catch(x){c&&console.error("unable to copy using execCommand: ",x),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(u.format||"text",p),u.onCopy&&u.onCopy(window.clipboardData),y=!0}catch(E){c&&console.error("unable to copy using clipboardData: ",E),c&&console.error("falling back to prompt"),s=function(R){var I=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return R.replace(/#{\s*key\s*}/g,I)}("message"in u?u.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,p)}}finally{b&&(typeof b.removeRange=="function"?b.removeRange(d):b.removeAllRanges()),v&&document.body.removeChild(v),l()}return y}},function(i,e){i.exports=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var n=document.activeElement,f=[],p=0;p<o.rangeCount;p++)f.push(o.getRangeAt(p));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||f.forEach(function(u){o.addRange(u)}),n&&n.focus()}}},function(i,e,o){o.r(e);var n=o(164),f=o.n(n),p=o(165),u=o(1);const c=Object(u.getFromWindow)("XMLHttpRequest")||p.XMLHttpRequest;class s extends f.a{constructor(d){super(),this.url=d}formatError(d,b,v=-1){return{error:{message:b,code:v},id:d.id,jsonrpc:d.jsonrpc}}send(d,b){return new Promise(v=>{if(d.method==="eth_subscribe"){const R=this.formatError(d,"Subscriptions are not supported by this HTTP endpoint");return this.emit("error",R),v(R)}const y=new c;let x=!1;const E=(R,I)=>{if(!x)if(y.abort(),x=!0,b)b(R,I);else{const{id:O,jsonrpc:A}=d,P=R?{id:O,jsonrpc:A,error:{message:R.message,code:R.code}}:{id:O,jsonrpc:A,result:I};this.emit("payload",P),v(P)}};y.open("POST",this.url,!0),y.setRequestHeader("Content-Type","application/json"),y.timeout=6e4,y.onerror=E,y.ontimeout=E,y.onreadystatechange=()=>{if(y.readyState===4)try{const R=JSON.parse(y.responseText);E(R.error,R.result)}catch(R){E(R)}},y.send(JSON.stringify(d))})}}e.default=s},function(i,e,o){(function(n,f){var p,u=this&&this.__extends||(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,A){O.__proto__=A}||function(O,A){for(var P in A)A.hasOwnProperty(P)&&(O[P]=A[P])},function(O,A){function P(){this.constructor=O}p(O,A),O.prototype=A===null?Object.create(A):(P.prototype=A.prototype,new P)}),c=this&&this.__assign||Object.assign||function(O){for(var A,P=1,N=arguments.length;P<N;P++)for(var L in A=arguments[P])Object.prototype.hasOwnProperty.call(A,L)&&(O[L]=A[L]);return O};Object.defineProperty(e,"__esModule",{value:!0});var s=o(102),l=o(218),d=o(219),b=o(55),v=o(220),y=o(221),x=o(56),E=o(222),R=o(223),I=function(O){function A(P){P===void 0&&(P={});var N=O.call(this)||this;return N.UNSENT=A.UNSENT,N.OPENED=A.OPENED,N.HEADERS_RECEIVED=A.HEADERS_RECEIVED,N.LOADING=A.LOADING,N.DONE=A.DONE,N.onreadystatechange=null,N.readyState=A.UNSENT,N.response=null,N.responseText="",N.responseType="",N.status=0,N.statusText="",N.timeout=0,N.upload=new E.XMLHttpRequestUpload,N.responseUrl="",N.withCredentials=!1,N._method=null,N._url=null,N._sync=!1,N._headers={},N._loweredHeaders={},N._mimeOverride=null,N._request=null,N._response=null,N._responseParts=null,N._responseHeaders=null,N._aborting=null,N._error=null,N._loadedBytes=0,N._totalBytes=0,N._lengthComputable=!1,N._restrictedMethods={CONNECT:!0,TRACE:!0,TRACK:!0},N._restrictedHeaders={"accept-charset":!0,"accept-encoding":!0,"access-control-request-headers":!0,"access-control-request-method":!0,connection:!0,"content-length":!0,cookie:!0,cookie2:!0,date:!0,dnt:!0,expect:!0,host:!0,"keep-alive":!0,origin:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,via:!0},N._privateHeaders={"set-cookie":!0,"set-cookie2":!0},N._userAgent="Mozilla/5.0 ("+d.type()+" "+d.arch()+") node.js/"+n.versions.node+" v8/"+n.versions.v8,N._anonymous=P.anon||!1,N}return u(A,O),A.prototype.open=function(P,N,L,H,J){if(L===void 0&&(L=!0),P=P.toUpperCase(),this._restrictedMethods[P])throw new A.SecurityError("HTTP method "+P+" is not allowed in XHR");var G=this._parseUrl(N,H,J);this.readyState===A.HEADERS_RECEIVED||(this.readyState,A.LOADING),this._method=P,this._url=G,this._sync=!L,this._headers={},this._loweredHeaders={},this._mimeOverride=null,this._setReadyState(A.OPENED),this._request=null,this._response=null,this.status=0,this.statusText="",this._responseParts=[],this._responseHeaders=null,this._loadedBytes=0,this._totalBytes=0,this._lengthComputable=!1},A.prototype.setRequestHeader=function(P,N){if(this.readyState!==A.OPENED)throw new A.InvalidStateError("XHR readyState must be OPENED");var L=P.toLowerCase();this._restrictedHeaders[L]||/^sec-/.test(L)||/^proxy-/.test(L)?console.warn('Refused to set unsafe header "'+P+'"'):(N=N.toString(),this._loweredHeaders[L]!=null?(P=this._loweredHeaders[L],this._headers[P]=this._headers[P]+", "+N):(this._loweredHeaders[L]=P,this._headers[P]=N))},A.prototype.send=function(P){if(this.readyState!==A.OPENED)throw new A.InvalidStateError("XHR readyState must be OPENED");if(this._request)throw new A.InvalidStateError("send() already called");switch(this._url.protocol){case"file:":return this._sendFile(P);case"http:":case"https:":return this._sendHttp(P);default:throw new A.NetworkError("Unsupported protocol "+this._url.protocol)}},A.prototype.abort=function(){this._request!=null&&(this._request.abort(),this._setError(),this._dispatchProgress("abort"),this._dispatchProgress("loadend"))},A.prototype.getResponseHeader=function(P){if(this._responseHeaders==null||P==null)return null;var N=P.toLowerCase();return this._responseHeaders.hasOwnProperty(N)?this._responseHeaders[P.toLowerCase()]:null},A.prototype.getAllResponseHeaders=function(){var P=this;return this._responseHeaders==null?"":Object.keys(this._responseHeaders).map(function(N){return N+": "+P._responseHeaders[N]}).join(`\r
`)},A.prototype.overrideMimeType=function(P){if(this.readyState===A.LOADING||this.readyState===A.DONE)throw new A.InvalidStateError("overrideMimeType() not allowed in LOADING or DONE");this._mimeOverride=P.toLowerCase()},A.prototype.nodejsSet=function(P){if(this.nodejsHttpAgent=P.httpAgent||this.nodejsHttpAgent,this.nodejsHttpsAgent=P.httpsAgent||this.nodejsHttpsAgent,P.hasOwnProperty("baseUrl")){if(P.baseUrl!=null&&!b.parse(P.baseUrl,!1,!0).protocol)throw new A.SyntaxError("baseUrl must be an absolute URL");this.nodejsBaseUrl=P.baseUrl}},A.nodejsSet=function(P){A.prototype.nodejsSet(P)},A.prototype._setReadyState=function(P){this.readyState=P,this.dispatchEvent(new v.ProgressEvent("readystatechange"))},A.prototype._sendFile=function(P){throw new Error("Protocol file: not implemented")},A.prototype._sendHttp=function(P){if(this._sync)throw new Error("Synchronous XHR processing not implemented");!P||this._method!=="GET"&&this._method!=="HEAD"?P=P||"":(console.warn("Discarding entity body for "+this._method+" requests"),P=null),this.upload._setData(P),this._finalizeHeaders(),this._sendHxxpRequest()},A.prototype._sendHxxpRequest=function(){var P=this;if(this.withCredentials){var N=A.cookieJar.getCookies(R.CookieAccessInfo(this._url.hostname,this._url.pathname,this._url.protocol==="https:")).toValueString();this._headers.cookie=this._headers.cookie2=N}var L=this._url.protocol==="http:"?[s,this.nodejsHttpAgent]:[l,this.nodejsHttpsAgent],H=L[0],J=L[1],G=H.request.bind(H)({hostname:this._url.hostname,port:+this._url.port,path:this._url.path,auth:this._url.auth,method:this._method,headers:this._headers,agent:J});this._request=G,this.timeout&&G.setTimeout(this.timeout,function(){return P._onHttpTimeout(G)}),G.on("response",function(z){return P._onHttpResponse(G,z)}),G.on("error",function(z){return P._onHttpRequestError(G,z)}),this.upload._startUpload(G),this._request===G&&this._dispatchProgress("loadstart")},A.prototype._finalizeHeaders=function(){this._headers=c({},this._headers,{Connection:"keep-alive",Host:this._url.host,"User-Agent":this._userAgent},this._anonymous?{Referer:"about:blank"}:{}),this.upload._finalizeHeaders(this._headers,this._loweredHeaders)},A.prototype._onHttpResponse=function(P,N){var L=this;if(this._request===P){if(this.withCredentials&&(N.headers["set-cookie"]||N.headers["set-cookie2"])&&A.cookieJar.setCookies(N.headers["set-cookie"]||N.headers["set-cookie2"]),[301,302,303,307,308].indexOf(N.statusCode)>=0)return this._url=this._parseUrl(N.headers.location),this._method="GET",this._loweredHeaders["content-type"]&&(delete this._headers[this._loweredHeaders["content-type"]],delete this._loweredHeaders["content-type"]),this._headers["Content-Type"]!=null&&delete this._headers["Content-Type"],delete this._headers["Content-Length"],this.upload._reset(),this._finalizeHeaders(),void this._sendHxxpRequest();this._response=N,this._response.on("data",function(J){return L._onHttpResponseData(N,J)}),this._response.on("end",function(){return L._onHttpResponseEnd(N)}),this._response.on("close",function(){return L._onHttpResponseClose(N)}),this.responseUrl=this._url.href.split("#")[0],this.status=N.statusCode,this.statusText=s.STATUS_CODES[this.status],this._parseResponseHeaders(N);var H=this._responseHeaders["content-length"]||"";this._totalBytes=+H,this._lengthComputable=!!H,this._setReadyState(A.HEADERS_RECEIVED)}},A.prototype._onHttpResponseData=function(P,N){this._response===P&&(this._responseParts.push(new f(N)),this._loadedBytes+=N.length,this.readyState!==A.LOADING&&this._setReadyState(A.LOADING),this._dispatchProgress("progress"))},A.prototype._onHttpResponseEnd=function(P){this._response===P&&(this._parseResponse(),this._request=null,this._response=null,this._setReadyState(A.DONE),this._dispatchProgress("load"),this._dispatchProgress("loadend"))},A.prototype._onHttpResponseClose=function(P){if(this._response===P){var N=this._request;this._setError(),N.abort(),this._setReadyState(A.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend")}},A.prototype._onHttpTimeout=function(P){this._request===P&&(this._setError(),P.abort(),this._setReadyState(A.DONE),this._dispatchProgress("timeout"),this._dispatchProgress("loadend"))},A.prototype._onHttpRequestError=function(P,N){this._request===P&&(this._setError(),P.abort(),this._setReadyState(A.DONE),this._dispatchProgress("error"),this._dispatchProgress("loadend"))},A.prototype._dispatchProgress=function(P){var N=new A.ProgressEvent(P);N.lengthComputable=this._lengthComputable,N.loaded=this._loadedBytes,N.total=this._totalBytes,this.dispatchEvent(N)},A.prototype._setError=function(){this._request=null,this._response=null,this._responseHeaders=null,this._responseParts=null},A.prototype._parseUrl=function(P,N,L){var H=this.nodejsBaseUrl==null?P:b.resolve(this.nodejsBaseUrl,P),J=b.parse(H,!1,!0);J.hash=null;var G=(J.auth||"").split(":"),z=G[0],S=G[1];return(z||S||N||L)&&(J.auth=(N||z||"")+":"+(L||S||"")),J},A.prototype._parseResponseHeaders=function(P){for(var N in this._responseHeaders={},P.headers){var L=N.toLowerCase();this._privateHeaders[L]||(this._responseHeaders[L]=P.headers[N])}this._mimeOverride!=null&&(this._responseHeaders["content-type"]=this._mimeOverride)},A.prototype._parseResponse=function(){var P=f.concat(this._responseParts);switch(this._responseParts=null,this.responseType){case"json":this.responseText=null;try{this.response=JSON.parse(P.toString("utf-8"))}catch{this.response=null}return;case"buffer":return this.responseText=null,void(this.response=P);case"arraybuffer":this.responseText=null;for(var N=new ArrayBuffer(P.length),L=new Uint8Array(N),H=0;H<P.length;H++)L[H]=P[H];return void(this.response=N);case"text":default:try{this.responseText=P.toString(this._parseResponseEncoding())}catch{this.responseText=P.toString("binary")}this.response=this.responseText}},A.prototype._parseResponseEncoding=function(){return/;\s*charset=(.*)$/.exec(this._responseHeaders["content-type"]||"")[1]||"utf-8"},A.ProgressEvent=v.ProgressEvent,A.InvalidStateError=y.InvalidStateError,A.NetworkError=y.NetworkError,A.SecurityError=y.SecurityError,A.SyntaxError=y.SyntaxError,A.XMLHttpRequestUpload=E.XMLHttpRequestUpload,A.UNSENT=0,A.OPENED=1,A.HEADERS_RECEIVED=2,A.LOADING=3,A.DONE=4,A.cookieJar=R.CookieJar(),A}(x.XMLHttpRequestEventTarget);e.XMLHttpRequest=I,I.prototype.nodejsHttpAgent=s.globalAgent,I.prototype.nodejsHttpsAgent=l.globalAgent,I.prototype.nodejsBaseUrl=null}).call(this,o(5),o(2).Buffer)},function(i,e,o){(function(n,f,p){var u=o(103),c=o(3),s=o(104),l=o(34),d=o(211),b=s.IncomingMessage,v=s.readyStates,y=i.exports=function(E){var R,I=this;l.Writable.call(I),I._opts=E,I._body=[],I._headers={},E.auth&&I.setHeader("Authorization","Basic "+new n(E.auth).toString("base64")),Object.keys(E.headers).forEach(function(A){I.setHeader(A,E.headers[A])});var O=!0;if(E.mode==="disable-fetch"||"requestTimeout"in E&&!u.abortController)O=!1,R=!0;else if(E.mode==="prefer-streaming")R=!1;else if(E.mode==="allow-wrong-content-type")R=!u.overrideMimeType;else{if(E.mode&&E.mode!=="default"&&E.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");R=!0}I._mode=function(A,P){return u.fetch&&P?"fetch":u.mozchunkedarraybuffer?"moz-chunked-arraybuffer":u.msstream?"ms-stream":u.arraybuffer&&A?"arraybuffer":u.vbArray&&A?"text:vbarray":"text"}(R,O),I._fetchTimer=null,I.on("finish",function(){I._onFinish()})};c(y,l.Writable),y.prototype.setHeader=function(E,R){var I=E.toLowerCase();x.indexOf(I)===-1&&(this._headers[I]={name:E,value:R})},y.prototype.getHeader=function(E){var R=this._headers[E.toLowerCase()];return R?R.value:null},y.prototype.removeHeader=function(E){delete this._headers[E.toLowerCase()]},y.prototype._onFinish=function(){var E=this;if(!E._destroyed){var R=E._opts,I=E._headers,O=null;R.method!=="GET"&&R.method!=="HEAD"&&(O=u.arraybuffer?d(n.concat(E._body)):u.blobConstructor?new f.Blob(E._body.map(function(H){return d(H)}),{type:(I["content-type"]||{}).value||""}):n.concat(E._body).toString());var A=[];if(Object.keys(I).forEach(function(H){var J=I[H].name,G=I[H].value;Array.isArray(G)?G.forEach(function(z){A.push([J,z])}):A.push([J,G])}),E._mode==="fetch"){var P=null;if(u.abortController){var N=new AbortController;P=N.signal,E._fetchAbortController=N,"requestTimeout"in R&&R.requestTimeout!==0&&(E._fetchTimer=f.setTimeout(function(){E.emit("requestTimeout"),E._fetchAbortController&&E._fetchAbortController.abort()},R.requestTimeout))}f.fetch(E._opts.url,{method:E._opts.method,headers:A,body:O||void 0,mode:"cors",credentials:R.withCredentials?"include":"same-origin",signal:P}).then(function(H){E._fetchResponse=H,E._connect()},function(H){f.clearTimeout(E._fetchTimer),E._destroyed||E.emit("error",H)})}else{var L=E._xhr=new f.XMLHttpRequest;try{L.open(E._opts.method,E._opts.url,!0)}catch(H){return void p.nextTick(function(){E.emit("error",H)})}"responseType"in L&&(L.responseType=E._mode.split(":")[0]),"withCredentials"in L&&(L.withCredentials=!!R.withCredentials),E._mode==="text"&&"overrideMimeType"in L&&L.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in R&&(L.timeout=R.requestTimeout,L.ontimeout=function(){E.emit("requestTimeout")}),A.forEach(function(H){L.setRequestHeader(H[0],H[1])}),E._response=null,L.onreadystatechange=function(){switch(L.readyState){case v.LOADING:case v.DONE:E._onXHRProgress()}},E._mode==="moz-chunked-arraybuffer"&&(L.onprogress=function(){E._onXHRProgress()}),L.onerror=function(){E._destroyed||E.emit("error",new Error("XHR error"))};try{L.send(O)}catch(H){return void p.nextTick(function(){E.emit("error",H)})}}}},y.prototype._onXHRProgress=function(){(function(E){try{var R=E.status;return R!==null&&R!==0}catch{return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},y.prototype._connect=function(){var E=this;E._destroyed||(E._response=new b(E._xhr,E._fetchResponse,E._mode,E._fetchTimer),E._response.on("error",function(R){E.emit("error",R)}),E.emit("response",E._response))},y.prototype._write=function(E,R,I){this._body.push(E),I()},y.prototype.abort=y.prototype.destroy=function(){this._destroyed=!0,f.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},y.prototype.end=function(E,R,I){typeof E=="function"&&(I=E,E=void 0),l.Writable.prototype.end.call(this,E,R,I)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var x=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,o(2).Buffer,o(6),o(5))},function(i,e){},function(i,e,o){var n=o(52).Buffer,f=o(207);i.exports=function(){function p(){(function(u,c){if(!(u instanceof c))throw new TypeError("Cannot call a class as a function")})(this,p),this.head=null,this.tail=null,this.length=0}return p.prototype.push=function(u){var c={data:u,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length},p.prototype.unshift=function(u){var c={data:u,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length},p.prototype.shift=function(){if(this.length!==0){var u=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,u}},p.prototype.clear=function(){this.head=this.tail=null,this.length=0},p.prototype.join=function(u){if(this.length===0)return"";for(var c=this.head,s=""+c.data;c=c.next;)s+=u+c.data;return s},p.prototype.concat=function(u){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;for(var c,s,l,d=n.allocUnsafe(u>>>0),b=this.head,v=0;b;)c=b.data,s=d,l=v,c.copy(s,l),v+=b.data.length,b=b.next;return d},p}(),f&&f.inspect&&f.inspect.custom&&(i.exports.prototype[f.inspect.custom]=function(){var p=f.inspect({length:this.length});return this.constructor.name+" "+p})},function(i,e){},function(i,e,o){(function(n,f){(function(p,u){if(!p.setImmediate){var c,s,l,d,b,v=1,y={},x=!1,E=p.document,R=Object.getPrototypeOf&&Object.getPrototypeOf(p);R=R&&R.setTimeout?R:p,{}.toString.call(p.process)==="[object process]"?c=function(A){f.nextTick(function(){O(A)})}:function(){if(p.postMessage&&!p.importScripts){var A=!0,P=p.onmessage;return p.onmessage=function(){A=!1},p.postMessage("","*"),p.onmessage=P,A}}()?(d="setImmediate$"+Math.random()+"$",b=function(A){A.source===p&&typeof A.data=="string"&&A.data.indexOf(d)===0&&O(+A.data.slice(d.length))},p.addEventListener?p.addEventListener("message",b,!1):p.attachEvent("onmessage",b),c=function(A){p.postMessage(d+A,"*")}):p.MessageChannel?((l=new MessageChannel).port1.onmessage=function(A){O(A.data)},c=function(A){l.port2.postMessage(A)}):E&&"onreadystatechange"in E.createElement("script")?(s=E.documentElement,c=function(A){var P=E.createElement("script");P.onreadystatechange=function(){O(A),P.onreadystatechange=null,s.removeChild(P),P=null},s.appendChild(P)}):c=function(A){setTimeout(O,0,A)},R.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var P=new Array(arguments.length-1),N=0;N<P.length;N++)P[N]=arguments[N+1];var L={callback:A,args:P};return y[v]=L,c(v),v++},R.clearImmediate=I}function I(A){delete y[A]}function O(A){if(x)setTimeout(O,0,A);else{var P=y[A];if(P){x=!0;try{(function(N){var L=N.callback,H=N.args;switch(H.length){case 0:L();break;case 1:L(H[0]);break;case 2:L(H[0],H[1]);break;case 3:L(H[0],H[1],H[2]);break;default:L.apply(void 0,H)}})(P)}finally{I(A),x=!1}}}}})(typeof self>"u"?n===void 0?this:n:self)}).call(this,o(6),o(5))},function(i,e,o){var n=o(2),f=n.Buffer;function p(c,s){for(var l in c)s[l]=c[l]}function u(c,s,l){return f(c,s,l)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?i.exports=n:(p(n,e),e.Buffer=u),p(f,u),u.from=function(c,s,l){if(typeof c=="number")throw new TypeError("Argument must not be a number");return f(c,s,l)},u.alloc=function(c,s,l){if(typeof c!="number")throw new TypeError("Argument must be a number");var d=f(c);return s!==void 0?typeof l=="string"?d.fill(s,l):d.fill(s):d.fill(0),d},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return f(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}},function(i,e,o){i.exports=p;var n=o(109),f=Object.create(o(35));function p(u){if(!(this instanceof p))return new p(u);n.call(this,u)}f.inherits=o(3),f.inherits(p,n),p.prototype._transform=function(u,c,s){s(null,u)}},function(i,e,o){var n=o(2).Buffer;i.exports=function(f){if(f instanceof Uint8Array){if(f.byteOffset===0&&f.byteLength===f.buffer.byteLength)return f.buffer;if(typeof f.buffer.slice=="function")return f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength)}if(n.isBuffer(f)){for(var p=new Uint8Array(f.length),u=f.length,c=0;c<u;c++)p[c]=f[c];return p.buffer}throw new Error("Argument must be a Buffer")}},function(i,e){i.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(i,e,o){(function(n,f){var p;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(u){e&&e.nodeType,n&&n.nodeType;var c=typeof f=="object"&&f;c.global!==c&&c.window!==c&&c.self;var s,l=2147483647,d=/^xn--/,b=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=Math.floor,E=String.fromCharCode;function R(G){throw new RangeError(y[G])}function I(G,z){for(var S=G.length,a=[];S--;)a[S]=z(G[S]);return a}function O(G,z){var S=G.split("@"),a="";return S.length>1&&(a=S[0]+"@",G=S[1]),a+I((G=G.replace(v,".")).split("."),z).join(".")}function A(G){for(var z,S,a=[],w=0,h=G.length;w<h;)(z=G.charCodeAt(w++))>=55296&&z<=56319&&w<h?(64512&(S=G.charCodeAt(w++)))==56320?a.push(((1023&z)<<10)+(1023&S)+65536):(a.push(z),w--):a.push(z);return a}function P(G){return I(G,function(z){var S="";return z>65535&&(S+=E((z-=65536)>>>10&1023|55296),z=56320|1023&z),S+=E(z)}).join("")}function N(G,z){return G+22+75*(G<26)-((z!=0)<<5)}function L(G,z,S){var a=0;for(G=S?x(G/700):G>>1,G+=x(G/z);G>455;a+=36)G=x(G/35);return x(a+36*G/(G+38))}function H(G){var z,S,a,w,h,m,g,_,T,k,M,B=[],Y=G.length,C=0,K=128,W=72;for((S=G.lastIndexOf("-"))<0&&(S=0),a=0;a<S;++a)G.charCodeAt(a)>=128&&R("not-basic"),B.push(G.charCodeAt(a));for(w=S>0?S+1:0;w<Y;){for(h=C,m=1,g=36;w>=Y&&R("invalid-input"),((_=(M=G.charCodeAt(w++))-48<10?M-22:M-65<26?M-65:M-97<26?M-97:36)>=36||_>x((l-C)/m))&&R("overflow"),C+=_*m,!(_<(T=g<=W?1:g>=W+26?26:g-W));g+=36)m>x(l/(k=36-T))&&R("overflow"),m*=k;W=L(C-h,z=B.length+1,h==0),x(C/z)>l-K&&R("overflow"),K+=x(C/z),C%=z,B.splice(C++,0,K)}return P(B)}function J(G){var z,S,a,w,h,m,g,_,T,k,M,B,Y,C,K,W=[];for(B=(G=A(G)).length,z=128,S=0,h=72,m=0;m<B;++m)(M=G[m])<128&&W.push(E(M));for(a=w=W.length,w&&W.push("-");a<B;){for(g=l,m=0;m<B;++m)(M=G[m])>=z&&M<g&&(g=M);for(g-z>x((l-S)/(Y=a+1))&&R("overflow"),S+=(g-z)*Y,z=g,m=0;m<B;++m)if((M=G[m])<z&&++S>l&&R("overflow"),M==z){for(_=S,T=36;!(_<(k=T<=h?1:T>=h+26?26:T-h));T+=36)K=_-k,C=36-k,W.push(E(N(k+K%C,0))),_=x(K/C);W.push(E(N(_,0))),h=L(S,Y,a==w),S=0,++a}++S,++z}return W.join("")}s={version:"1.4.1",ucs2:{decode:A,encode:P},decode:H,encode:J,toASCII:function(G){return O(G,function(z){return b.test(z)?"xn--"+J(z):z})},toUnicode:function(G){return O(G,function(z){return d.test(z)?H(z.slice(4).toLowerCase()):z})}},(p=function(){return s}.call(e,o,e,n))===void 0||(n.exports=p)})()}).call(this,o(25)(i),o(6))},function(i,e,o){i.exports={isString:function(n){return typeof n=="string"},isObject:function(n){return typeof n=="object"&&n!==null},isNull:function(n){return n===null},isNullOrUndefined:function(n){return n==null}}},function(i,e,o){e.decode=e.parse=o(216),e.encode=e.stringify=o(217)},function(i,e,o){function n(p,u){return Object.prototype.hasOwnProperty.call(p,u)}i.exports=function(p,u,c,s){u=u||"&",c=c||"=";var l={};if(typeof p!="string"||p.length===0)return l;var d=/\+/g;p=p.split(u);var b=1e3;s&&typeof s.maxKeys=="number"&&(b=s.maxKeys);var v=p.length;b>0&&v>b&&(v=b);for(var y=0;y<v;++y){var x,E,R,I,O=p[y].replace(d,"%20"),A=O.indexOf(c);A>=0?(x=O.substr(0,A),E=O.substr(A+1)):(x=O,E=""),R=decodeURIComponent(x),I=decodeURIComponent(E),n(l,R)?f(l[R])?l[R].push(I):l[R]=[l[R],I]:l[R]=I}return l};var f=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"}},function(i,e,o){var n=function(c){switch(typeof c){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};i.exports=function(c,s,l,d){return s=s||"&",l=l||"=",c===null&&(c=void 0),typeof c=="object"?p(u(c),function(b){var v=encodeURIComponent(n(b))+l;return f(c[b])?p(c[b],function(y){return v+encodeURIComponent(n(y))}).join(s):v+encodeURIComponent(n(c[b]))}).join(s):d?encodeURIComponent(n(d))+l+encodeURIComponent(n(c)):""};var f=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function p(c,s){if(c.map)return c.map(s);for(var l=[],d=0;d<c.length;d++)l.push(s(c[d],d));return l}var u=Object.keys||function(c){var s=[];for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&s.push(l);return s}},function(i,e,o){var n=o(102),f=o(55),p=i.exports;for(var u in n)n.hasOwnProperty(u)&&(p[u]=n[u]);function c(s){if(typeof s=="string"&&(s=f.parse(s)),s.protocol||(s.protocol="https:"),s.protocol!=="https:")throw new Error('Protocol "'+s.protocol+'" not supported. Expected "https:"');return s}p.request=function(s,l){return s=c(s),n.request.call(this,s,l)},p.get=function(s,l){return s=c(s),n.get.call(this,s,l)}},function(i,e){e.endianness=function(){return"LE"},e.hostname=function(){return typeof location<"u"?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return typeof navigator<"u"?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL=`
`,e.homedir=function(){return"/"}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=function(f){this.type=f,this.bubbles=!1,this.cancelable=!1,this.loaded=0,this.lengthComputable=!1,this.total=0};e.ProgressEvent=n},function(i,e,o){var n,f=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var b in d)d.hasOwnProperty(b)&&(l[b]=d[b])},function(l,d){function b(){this.constructor=l}n(l,d),l.prototype=d===null?Object.create(d):(b.prototype=d.prototype,new b)});Object.defineProperty(e,"__esModule",{value:!0});var p=function(l){function d(){return l!==null&&l.apply(this,arguments)||this}return f(d,l),d}(Error);e.SecurityError=p;var u=function(l){function d(){return l!==null&&l.apply(this,arguments)||this}return f(d,l),d}(Error);e.InvalidStateError=u;var c=function(l){function d(){return l!==null&&l.apply(this,arguments)||this}return f(d,l),d}(Error);e.NetworkError=c;var s=function(l){function d(){return l!==null&&l.apply(this,arguments)||this}return f(d,l),d}(Error);e.SyntaxError=s},function(i,e,o){(function(n){var f,p=this&&this.__extends||(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var l in s)s.hasOwnProperty(l)&&(c[l]=s[l])},function(c,s){function l(){this.constructor=c}f(c,s),c.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)});Object.defineProperty(e,"__esModule",{value:!0});var u=function(c){function s(){var l=c.call(this)||this;return l._contentType=null,l._body=null,l._reset(),l}return p(s,c),s.prototype._reset=function(){this._contentType=null,this._body=null},s.prototype._setData=function(l){if(l!=null)if(typeof l=="string")l.length!==0&&(this._contentType="text/plain;charset=UTF-8"),this._body=new n(l,"utf-8");else if(n.isBuffer(l))this._body=l;else if(l instanceof ArrayBuffer){for(var d=new n(l.byteLength),b=new Uint8Array(l),v=0;v<l.byteLength;v++)d[v]=b[v];this._body=d}else{if(!(l.buffer&&l.buffer instanceof ArrayBuffer))throw new Error("Unsupported send() data "+l);d=new n(l.byteLength);var y=l.byteOffset;for(b=new Uint8Array(l.buffer),v=0;v<l.byteLength;v++)d[v]=b[v+y];this._body=d}},s.prototype._finalizeHeaders=function(l,d){this._contentType&&!d["content-type"]&&(l["Content-Type"]=this._contentType),this._body&&(l["Content-Length"]=this._body.length.toString())},s.prototype._startUpload=function(l){this._body&&l.write(this._body),l.end()},s}(o(56).XMLHttpRequestEventTarget);e.XMLHttpRequestUpload=u}).call(this,o(2).Buffer)},function(i,e){(function(){function o(u,c,s,l){return this instanceof o?(this.domain=u||void 0,this.path=c||"/",this.secure=!!s,this.script=!!l,this):new o(u,c,s,l)}function n(u,c,s){return u instanceof n?u:this instanceof n?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(s||"/"),this.explicit_path=!1,this.domain=c||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,u&&this.parse(u,c,s),this):new n(u,c,s)}o.All=Object.freeze(Object.create(null)),e.CookieAccessInfo=o,e.Cookie=n,n.prototype.toString=function(){var u=[this.name+"="+this.value];return this.expiration_date!==1/0&&u.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&u.push("domain="+this.domain),this.path&&u.push("path="+this.path),this.secure&&u.push("secure"),this.noscript&&u.push("httponly"),u.join("; ")},n.prototype.toValueString=function(){return this.name+"="+this.value};var f=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;function p(){var u,c;return this instanceof p?(u=Object.create(null),this.setCookie=function(s,l,d){var b,v;if(b=(s=new n(s,l,d)).expiration_date<=Date.now(),u[s.name]!==void 0){for(c=u[s.name],v=0;v<c.length;v+=1)if(c[v].collidesWith(s))return b?(c.splice(v,1),c.length===0&&delete u[s.name],!1):(c[v]=s,s);return!b&&(c.push(s),s)}return!b&&(u[s.name]=[s],u[s.name])},this.getCookie=function(s,l){var d,b;if(c=u[s]){for(b=0;b<c.length;b+=1)if((d=c[b]).expiration_date<=Date.now())c.length===0&&delete u[d.name];else if(d.matches(l))return d}},this.getCookies=function(s){var l,d,b=[];for(l in u)(d=this.getCookie(l,s))&&b.push(d);return b.toString=function(){return b.join(":")},b.toValueString=function(){return b.map(function(v){return v.toValueString()}).join("; ")},b},this):new p}n.prototype.parse=function(u,c,s){if(this instanceof n){var l,d=u.split(";").filter(function(x){return!!x}),b=d[0].match(/([^=]+)=([\s\S]*)/);if(!b)return void console.warn("Invalid cookie header encountered. Header: '"+u+"'");var v=b[1],y=b[2];if(typeof v!="string"||v.length===0||typeof y!="string")return void console.warn("Unable to extract values from cookie header. Cookie: '"+u+"'");for(this.name=v,this.value=y,l=1;l<d.length;l+=1)switch(v=(b=d[l].match(/([^=]+)(?:=([\s\S]*))?/))[1].trim().toLowerCase(),y=b[2],v){case"httponly":this.noscript=!0;break;case"expires":this.expiration_date=y?Number(Date.parse(y)):1/0;break;case"path":this.path=y?y.trim():"",this.explicit_path=!0;break;case"domain":this.domain=y?y.trim():"",this.explicit_domain=!!this.domain;break;case"secure":this.secure=!0}return this.explicit_path||(this.path=s||"/"),this.explicit_domain||(this.domain=c),this}return new n().parse(u,c,s)},n.prototype.matches=function(u){return u===o.All||!(this.noscript&&u.script||this.secure&&!u.secure||!this.collidesWith(u))},n.prototype.collidesWith=function(u){if(this.path&&!u.path||this.domain&&!u.domain||this.path&&u.path.indexOf(this.path)!==0||this.explicit_path&&u.path.indexOf(this.path)!==0)return!1;var c=u.domain&&u.domain.replace(/^[\.]/,""),s=this.domain&&this.domain.replace(/^[\.]/,"");if(s===c)return!0;if(s){if(!this.explicit_domain)return!1;var l=c.indexOf(s);return l!==-1&&l===c.length-s.length}return!0},e.CookieJar=p,p.prototype.setCookies=function(u,c,s){var l,d,b=[];for(u=(u=Array.isArray(u)?u:u.split(f)).map(function(v){return new n(v,c,s)}),l=0;l<u.length;l+=1)d=u[l],this.setCookie(d,c,s)&&b.push(d);return b}})()},function(i,e,o){const n=o(12).EventEmitter,f=o(21).inherits,p=o(36),u=o(294),c=o(298),s=o(326),l=o(329),d=(o(149),o(67)),b=function(){};function v(y){n.call(this),this.setMaxListeners(30),y=y||{};const x={sendAsync:this._handleAsync.bind(this)},E=y.blockTrackerProvider||x;this._blockTracker=y.blockTracker||new u({provider:E,pollingInterval:y.pollingInterval||4e3,setSkipCacheFlag:!0}),this._ready=new l,this.currentBlock=null,this._providers=[]}i.exports=v,f(v,n),v.prototype.start=function(y=b){const x=this;x._ready.go(),x._blockTracker.on("latest",E=>{x._getBlockByNumberWithRetry(E,(R,I)=>{if(R)return void this.emit("error",R);if(!I)return console.log(I),void this.emit("error",new Error("Could not find block"));const O=(A=I,{number:p.toBuffer(A.number),hash:p.toBuffer(A.hash),parentHash:p.toBuffer(A.parentHash),nonce:p.toBuffer(A.nonce),mixHash:p.toBuffer(A.mixHash),sha3Uncles:p.toBuffer(A.sha3Uncles),logsBloom:p.toBuffer(A.logsBloom),transactionsRoot:p.toBuffer(A.transactionsRoot),stateRoot:p.toBuffer(A.stateRoot),receiptsRoot:p.toBuffer(A.receiptRoot||A.receiptsRoot),miner:p.toBuffer(A.miner),difficulty:p.toBuffer(A.difficulty),totalDifficulty:p.toBuffer(A.totalDifficulty),size:p.toBuffer(A.size),extraData:p.toBuffer(A.extraData),gasLimit:p.toBuffer(A.gasLimit),gasUsed:p.toBuffer(A.gasUsed),timestamp:p.toBuffer(A.timestamp),transactions:A.transactions});var A;x._setCurrentBlock(O),x.emit("rawBlock",I),x.emit("latest",I)})}),x._blockTracker.on("sync",x.emit.bind(x,"sync")),x._blockTracker.on("error",x.emit.bind(x,"error")),x._running=!0,x.emit("start")},v.prototype.stop=function(){this._blockTracker.removeAllListeners(),this._running=!1,this.emit("stop")},v.prototype.isRunning=function(){return this._running},v.prototype.addProvider=function(y,x){const E=this;typeof x=="number"?E._providers.splice(x,0,y):E._providers.push(y),y.setEngine(this)},v.prototype.removeProvider=function(y){const x=this._providers.indexOf(y);if(x<0)throw new Error("Provider not found.");this._providers.splice(x,1)},v.prototype.send=function(y){throw new Error("Web3ProviderEngine does not support synchronous requests.")},v.prototype.sendAsync=function(y,x){const E=this;E._ready.await(function(){Array.isArray(y)?c(y,E._handleAsync.bind(E),x):E._handleAsync(y,x)})},v.prototype._getBlockByNumberWithRetry=function(y,x){const E=this;let R=5;return void I();function I(){E._getBlockByNumber(y,O)}function O(A,P){return A?x(A):P?void x(null,P):R>0?(R--,void setTimeout(function(){I()},1e3)):void x(null,null)}},v.prototype._getBlockByNumber=function(y,x){const E=d({method:"eth_getBlockByNumber",params:[y,!1],skipCache:!0});this._handleAsync(E,(R,I)=>R?x(R):x(null,I.result))},v.prototype._handleAsync=function(y,x){var E=this,R=-1,I=null,O=null,A=[];function P(N,L){O=N,I=L,s(A,function(H,J){H?H(O,I,J):J()},function(){var H={id:y.id,jsonrpc:y.jsonrpc,result:I};O!=null?(H.error={message:O.stack||O.message||O,code:-32e3},x(O,H)):x(null,H)})}(function N(L){if(R+=1,A.unshift(L),R>=E._providers.length)P(new Error('Request for method "'+y.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{E._providers[R].handleRequest(y,N,P)}catch(H){P(H)}})()},v.prototype._setCurrentBlock=function(y){this.currentBlock=y,this.emit("block",y)}},function(i,e){i.exports=function(o){return o&&typeof o=="object"&&typeof o.copy=="function"&&typeof o.fill=="function"&&typeof o.readUInt8=="function"}},function(i,e){typeof Object.create=="function"?i.exports=function(o,n){o.super_=n,o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})}:i.exports=function(o,n){o.super_=n;var f=function(){};f.prototype=n.prototype,o.prototype=new f,o.prototype.constructor=o}},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.createHashFunction=function(f){return function(p){var u=f();return u.update(p),n.from(u.digest())}}}).call(this,o(2).Buffer)},function(i,e,o){i.exports=o(229)(o(239))},function(i,e,o){const n=o(230),f=o(238);i.exports=function(p){const u=n(p),c=f(p);return function(s,l){switch(typeof s=="string"?s.toLowerCase():s){case"keccak224":return new u(1152,448,null,224,l);case"keccak256":return new u(1088,512,null,256,l);case"keccak384":return new u(832,768,null,384,l);case"keccak512":return new u(576,1024,null,512,l);case"sha3-224":return new u(1152,448,6,224,l);case"sha3-256":return new u(1088,512,6,256,l);case"sha3-384":return new u(832,768,6,384,l);case"sha3-512":return new u(576,1024,6,512,l);case"shake128":return new c(1344,256,31,l);case"shake256":return new c(1088,512,31,l);default:throw new Error("Invald algorithm: "+s)}}}},function(i,e,o){(function(n){const{Transform:f}=o(111);i.exports=p=>class t0 extends f{constructor(c,s,l,d,b){super(b),this._rate=c,this._capacity=s,this._delimitedSuffix=l,this._hashBitLength=d,this._options=b,this._state=new p,this._state.initialize(c,s),this._finalized=!1}_transform(c,s,l){let d=null;try{this.update(c,s)}catch(b){d=b}l(d)}_flush(c){let s=null;try{this.push(this.digest())}catch(l){s=l}c(s)}update(c,s){if(!n.isBuffer(c)&&typeof c!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return n.isBuffer(c)||(c=n.from(c,s)),this._state.absorb(c),this}digest(c){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let s=this._state.squeeze(this._hashBitLength/8);return c!==void 0&&(s=s.toString(c)),this._resetState(),s}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const c=new t0(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(c._state),c._finalized=this._finalized,c}}}).call(this,o(2).Buffer)},function(i,e){},function(i,e,o){function n(l,d){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(l);d&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(l,y).enumerable})),b.push.apply(b,v)}return b}function f(l,d,b){return d in l?Object.defineProperty(l,d,{value:b,enumerable:!0,configurable:!0,writable:!0}):l[d]=b,l}function p(l,d){for(var b=0;b<d.length;b++){var v=d[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}var u=o(2).Buffer,c=o(233).inspect,s=c&&c.custom||"inspect";i.exports=function(){function l(){(function(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}var d,b;return d=l,(b=[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,x=""+y.data;y=y.next;)x+=v+y.data;return x}},{key:"concat",value:function(v){if(this.length===0)return u.alloc(0);for(var y,x,E,R=u.allocUnsafe(v>>>0),I=this.head,O=0;I;)y=I.data,x=R,E=O,u.prototype.copy.call(y,x,E),O+=I.data.length,I=I.next;return R}},{key:"consume",value:function(v,y){var x;return v<this.head.data.length?(x=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):x=v===this.head.data.length?this.shift():y?this._getString(v):this._getBuffer(v),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,x=1,E=y.data;for(v-=E.length;y=y.next;){var R=y.data,I=v>R.length?R.length:v;if(I===R.length?E+=R:E+=R.slice(0,v),(v-=I)==0){I===R.length?(++x,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=R.slice(I));break}++x}return this.length-=x,E}},{key:"_getBuffer",value:function(v){var y=u.allocUnsafe(v),x=this.head,E=1;for(x.data.copy(y),v-=x.data.length;x=x.next;){var R=x.data,I=v>R.length?R.length:v;if(R.copy(y,y.length-v,0,I),(v-=I)==0){I===R.length?(++E,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=R.slice(I));break}++E}return this.length-=E,y}},{key:s,value:function(v,y){return c(this,function(x){for(var E=1;E<arguments.length;E++){var R=arguments[E]!=null?arguments[E]:{};E%2?n(Object(R),!0).forEach(function(I){f(x,I,R[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(R)):n(Object(R)).forEach(function(I){Object.defineProperty(x,I,Object.getOwnPropertyDescriptor(R,I))})}return x}({},y,{depth:0,customInspect:!1}))}}])&&p(d.prototype,b),l}()},function(i,e){},function(i,e,o){(function(n){var f;function p(A,P,N){return P in A?Object.defineProperty(A,P,{value:N,enumerable:!0,configurable:!0,writable:!0}):A[P]=N,A}var u=o(57),c=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),b=Symbol("lastPromise"),v=Symbol("handlePromise"),y=Symbol("stream");function x(A,P){return{value:A,done:P}}function E(A){var P=A[c];if(P!==null){var N=A[y].read();N!==null&&(A[b]=null,A[c]=null,A[s]=null,P(x(N,!1)))}}function R(A){n.nextTick(E,A)}var I=Object.getPrototypeOf(function(){}),O=Object.setPrototypeOf((p(f={get stream(){return this[y]},next:function(){var A=this,P=this[l];if(P!==null)return Promise.reject(P);if(this[d])return Promise.resolve(x(void 0,!0));if(this[y].destroyed)return new Promise(function(J,G){n.nextTick(function(){A[l]?G(A[l]):J(x(void 0,!0))})});var N,L=this[b];if(L)N=new Promise(function(J,G){return function(z,S){J.then(function(){G[d]?z(x(void 0,!0)):G[v](z,S)},S)}}(L,this));else{var H=this[y].read();if(H!==null)return Promise.resolve(x(H,!1));N=new Promise(this[v])}return this[b]=N,N}},Symbol.asyncIterator,function(){return this}),p(f,"return",function(){var A=this;return new Promise(function(P,N){A[y].destroy(null,function(L){L?N(L):P(x(void 0,!0))})})}),f),I);i.exports=function(A){var P,N=Object.create(O,(p(P={},y,{value:A,writable:!0}),p(P,c,{value:null,writable:!0}),p(P,s,{value:null,writable:!0}),p(P,l,{value:null,writable:!0}),p(P,d,{value:A._readableState.endEmitted,writable:!0}),p(P,v,{value:function(L,H){var J=N[y].read();J?(N[b]=null,N[c]=null,N[s]=null,L(x(J,!1))):(N[c]=L,N[s]=H)},writable:!0}),P));return N[b]=null,u(A,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var H=N[s];return H!==null&&(N[b]=null,N[c]=null,N[s]=null,H(L)),void(N[l]=L)}var J=N[c];J!==null&&(N[b]=null,N[c]=null,N[s]=null,J(x(void 0,!0))),N[d]=!0}),A.on("readable",R.bind(null,N)),N}}).call(this,o(5))},function(i,e){i.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(i,e,o){i.exports=f;var n=o(117);function f(p){if(!(this instanceof f))return new f(p);n.call(this,p)}o(3)(f,n),f.prototype._transform=function(p,u,c){c(null,p)}},function(i,e,o){var n,f=o(27).codes,p=f.ERR_MISSING_ARGS,u=f.ERR_STREAM_DESTROYED;function c(v){if(v)throw v}function s(v,y,x,E){E=function(O){var A=!1;return function(){A||(A=!0,O.apply(void 0,arguments))}}(E);var R=!1;v.on("close",function(){R=!0}),n===void 0&&(n=o(57)),n(v,{readable:y,writable:x},function(O){if(O)return E(O);R=!0,E()});var I=!1;return function(O){if(!R&&!I)return I=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(v)?v.abort():typeof v.destroy=="function"?v.destroy():void E(O||new u("pipe"))}}function l(v){v()}function d(v,y){return v.pipe(y)}function b(v){return v.length?typeof v[v.length-1]!="function"?c:v.pop():c}i.exports=function(){for(var v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];var E,R=b(y);if(Array.isArray(y[0])&&(y=y[0]),y.length<2)throw new p("streams");var I=y.map(function(O,A){var P=A<y.length-1;return s(O,P,A>0,function(N){E||(E=N),N&&I.forEach(l),P||(I.forEach(l),R(E))})});return y.reduce(d)}},function(i,e,o){(function(n){const{Transform:f}=o(111);i.exports=p=>class r0 extends f{constructor(c,s,l,d){super(d),this._rate=c,this._capacity=s,this._delimitedSuffix=l,this._options=d,this._state=new p,this._state.initialize(c,s),this._finalized=!1}_transform(c,s,l){let d=null;try{this.update(c,s)}catch(b){d=b}l(d)}_flush(){}_read(c){this.push(this.squeeze(c))}update(c,s){if(!n.isBuffer(c)&&typeof c!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return n.isBuffer(c)||(c=n.from(c,s)),this._state.absorb(c),this}squeeze(c,s){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let l=this._state.squeeze(c);return s!==void 0&&(l=l.toString(s)),l}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const c=new r0(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(c._state),c._finalized=this._finalized,c}}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){const f=o(240);function p(){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}p.prototype.initialize=function(u,c){for(let s=0;s<50;++s)this.state[s]=0;this.blockSize=u/8,this.count=0,this.squeezing=!1},p.prototype.absorb=function(u){for(let c=0;c<u.length;++c)this.state[~~(this.count/4)]^=u[c]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(f.p1600(this.state),this.count=0)},p.prototype.absorbLastFewBits=function(u){this.state[~~(this.count/4)]^=u<<this.count%4*8,128&u&&this.count===this.blockSize-1&&f.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,f.p1600(this.state),this.count=0,this.squeezing=!0},p.prototype.squeeze=function(u){this.squeezing||this.absorbLastFewBits(1);const c=n.alloc(u);for(let s=0;s<u;++s)c[s]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(f.p1600(this.state),this.count=0);return c},p.prototype.copy=function(u){for(let c=0;c<50;++c)u.state[c]=this.state[c];u.blockSize=this.blockSize,u.count=this.count,u.squeezing=this.squeezing},i.exports=p}).call(this,o(2).Buffer)},function(i,e){const o=[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(n){for(let f=0;f<24;++f){const p=n[0]^n[10]^n[20]^n[30]^n[40],u=n[1]^n[11]^n[21]^n[31]^n[41],c=n[2]^n[12]^n[22]^n[32]^n[42],s=n[3]^n[13]^n[23]^n[33]^n[43],l=n[4]^n[14]^n[24]^n[34]^n[44],d=n[5]^n[15]^n[25]^n[35]^n[45],b=n[6]^n[16]^n[26]^n[36]^n[46],v=n[7]^n[17]^n[27]^n[37]^n[47],y=n[8]^n[18]^n[28]^n[38]^n[48],x=n[9]^n[19]^n[29]^n[39]^n[49];let E=y^(c<<1|s>>>31),R=x^(s<<1|c>>>31);const I=n[0]^E,O=n[1]^R,A=n[10]^E,P=n[11]^R,N=n[20]^E,L=n[21]^R,H=n[30]^E,J=n[31]^R,G=n[40]^E,z=n[41]^R;E=p^(l<<1|d>>>31),R=u^(d<<1|l>>>31);const S=n[2]^E,a=n[3]^R,w=n[12]^E,h=n[13]^R,m=n[22]^E,g=n[23]^R,_=n[32]^E,T=n[33]^R,k=n[42]^E,M=n[43]^R;E=c^(b<<1|v>>>31),R=s^(v<<1|b>>>31);const B=n[4]^E,Y=n[5]^R,C=n[14]^E,K=n[15]^R,W=n[24]^E,U=n[25]^R,q=n[34]^E,j=n[35]^R,D=n[44]^E,F=n[45]^R;E=l^(y<<1|x>>>31),R=d^(x<<1|y>>>31);const $=n[6]^E,V=n[7]^R,Z=n[16]^E,ee=n[17]^R,re=n[26]^E,ue=n[27]^R,fe=n[36]^E,oe=n[37]^R,ae=n[46]^E,ie=n[47]^R;E=b^(p<<1|u>>>31),R=v^(u<<1|p>>>31);const te=n[8]^E,le=n[9]^R,ge=n[18]^E,he=n[19]^R,ye=n[28]^E,Ie=n[29]^R,pe=n[38]^E,Oe=n[39]^R,Ge=n[48]^E,we=n[49]^R,Le=I,Ve=O,ve=P<<4|A>>>28,Ne=A<<4|P>>>28,se=N<<3|L>>>29,de=L<<3|N>>>29,_e=J<<9|H>>>23,Ue=H<<9|J>>>23,me=G<<18|z>>>14,Be=z<<18|G>>>14,Je=S<<1|a>>>31,be=a<<1|S>>>31,He=h<<12|w>>>20,tt=w<<12|h>>>20,Re=m<<10|g>>>22,ze=g<<10|m>>>22,Ze=T<<13|_>>>19,Ae=_<<13|T>>>19,De=k<<2|M>>>30,rt=M<<2|k>>>30,Ee=Y<<30|B>>>2,Fe=B<<30|Y>>>2,Qe=C<<6|K>>>26,Se=K<<6|C>>>26,Ke=U<<11|W>>>21,Xe=W<<11|U>>>21,Me=q<<15|j>>>17,We=j<<15|q>>>17,et=F<<29|D>>>3,ke=D<<29|F>>>3,qe=$<<28|V>>>4,Q=V<<28|$>>>4,X=ee<<23|Z>>>9,ne=Z<<23|ee>>>9,ce=re<<25|ue>>>7,Ce=ue<<25|re>>>7,Pe=fe<<21|oe>>>11,Ye=oe<<21|fe>>>11,$e=ie<<24|ae>>>8,nt=ae<<24|ie>>>8,je=te<<27|le>>>5,Te=le<<27|te>>>5,st=ge<<20|he>>>12,ft=he<<20|ge>>>12,gt=Ie<<7|ye>>>25,ht=ye<<7|Ie>>>25,yt=pe<<8|Oe>>>24,at=Oe<<8|pe>>>24,wt=Ge<<14|we>>>18,ut=we<<14|Ge>>>18;n[0]=Le^~He&Ke,n[1]=Ve^~tt&Xe,n[10]=qe^~st&se,n[11]=Q^~ft&de,n[20]=Je^~Qe&ce,n[21]=be^~Se&Ce,n[30]=je^~ve&Re,n[31]=Te^~Ne&ze,n[40]=Ee^~X&gt,n[41]=Fe^~ne&ht,n[2]=He^~Ke&Pe,n[3]=tt^~Xe&Ye,n[12]=st^~se&Ze,n[13]=ft^~de&Ae,n[22]=Qe^~ce&yt,n[23]=Se^~Ce&at,n[32]=ve^~Re&Me,n[33]=Ne^~ze&We,n[42]=X^~gt&_e,n[43]=ne^~ht&Ue,n[4]=Ke^~Pe&wt,n[5]=Xe^~Ye&ut,n[14]=se^~Ze&et,n[15]=de^~Ae&ke,n[24]=ce^~yt&me,n[25]=Ce^~at&Be,n[34]=Re^~Me&$e,n[35]=ze^~We&nt,n[44]=gt^~_e&De,n[45]=ht^~Ue&rt,n[6]=Pe^~wt&Le,n[7]=Ye^~ut&Ve,n[16]=Ze^~et&qe,n[17]=Ae^~ke&Q,n[26]=yt^~me&Je,n[27]=at^~Be&be,n[36]=Me^~$e&je,n[37]=We^~nt&Te,n[46]=_e^~De&Ee,n[47]=Ue^~rt&Fe,n[8]=wt^~Le&He,n[9]=ut^~Ve&tt,n[18]=et^~qe&st,n[19]=ke^~Q&ft,n[28]=me^~Je&Qe,n[29]=Be^~be&Se,n[38]=$e^~je&ve,n[39]=nt^~Te&Ne,n[48]=De^~Ee&X,n[49]=rt^~Fe&ne,n[0]^=o[2*f],n[1]^=o[2*f+1]}}},function(i,e,o){(function(n){var f=o(118),p=o(266),u=o(267),c=function(s){return s.length===32&&f.privateKeyVerify(Uint8Array.from(s))};i.exports={privateKeyVerify:c,privateKeyExport:function(s,l){if(s.length!==32)throw new RangeError("private key length is invalid");var d=p.privateKeyExport(s,l);return u.privateKeyExport(s,d,l)},privateKeyImport:function(s){if((s=u.privateKeyImport(s))!==null&&s.length===32&&c(s))return s;throw new Error("couldn't import from DER format")},privateKeyNegate:function(s){return n.from(f.privateKeyNegate(Uint8Array.from(s)))},privateKeyModInverse:function(s){if(s.length!==32)throw new Error("private key length is invalid");return n.from(p.privateKeyModInverse(Uint8Array.from(s)))},privateKeyTweakAdd:function(s,l){return n.from(f.privateKeyTweakAdd(Uint8Array.from(s),l))},privateKeyTweakMul:function(s,l){return n.from(f.privateKeyTweakMul(Uint8Array.from(s),Uint8Array.from(l)))},publicKeyCreate:function(s,l){return n.from(f.publicKeyCreate(Uint8Array.from(s),l))},publicKeyConvert:function(s,l){return n.from(f.publicKeyConvert(Uint8Array.from(s),l))},publicKeyVerify:function(s){return(s.length===33||s.length===65)&&f.publicKeyVerify(Uint8Array.from(s))},publicKeyTweakAdd:function(s,l,d){return n.from(f.publicKeyTweakAdd(Uint8Array.from(s),Uint8Array.from(l),d))},publicKeyTweakMul:function(s,l,d){return n.from(f.publicKeyTweakMul(Uint8Array.from(s),Uint8Array.from(l),d))},publicKeyCombine:function(s,l){var d=[];return s.forEach(function(b){d.push(Uint8Array.from(b))}),n.from(f.publicKeyCombine(d,l))},signatureNormalize:function(s){return n.from(f.signatureNormalize(Uint8Array.from(s)))},signatureExport:function(s){return n.from(f.signatureExport(Uint8Array.from(s)))},signatureImport:function(s){return n.from(f.signatureImport(Uint8Array.from(s)))},signatureImportLax:function(s){if(s.length===0)throw new RangeError("signature length is invalid");var l=u.signatureImportLax(s);if(l===null)throw new Error("couldn't parse DER signature");return p.signatureImport(l)},sign:function(s,l,d){if(d===null)throw new TypeError("options should be an Object");var b=void 0;if(d){if(b={},d.data===null)throw new TypeError("options.data should be a Buffer");if(d.data){if(d.data.length!==32)throw new RangeError("options.data length is invalid");b.data=new Uint8Array(d.data)}if(d.noncefn===null)throw new TypeError("options.noncefn should be a Function");d.noncefn&&(b.noncefn=function(y,x,E,R,I){var O=E!=null?n.from(E):null,A=R!=null?n.from(R):null,P=n.from("");return d.noncefn&&(P=d.noncefn(n.from(y),n.from(x),O,A,I)),Uint8Array.from(P)})}var v=f.ecdsaSign(Uint8Array.from(s),Uint8Array.from(l),b);return{signature:n.from(v.signature),recovery:v.recid}},verify:function(s,l,d){return f.ecdsaVerify(Uint8Array.from(l),Uint8Array.from(s),d)},recover:function(s,l,d,b){return n.from(f.ecdsaRecover(Uint8Array.from(l),d,Uint8Array.from(s),b))},ecdh:function(s,l){return n.from(f.ecdh(Uint8Array.from(s),Uint8Array.from(l),{}))},ecdhUnsafe:function(s,l,d){if(s.length!==33&&s.length!==65)throw new RangeError("public key length is invalid");if(l.length!==32)throw new RangeError("private key length is invalid");return n.from(p.ecdhUnsafe(Uint8Array.from(s),Uint8Array.from(l),d))}}}).call(this,o(2).Buffer)},function(i,e){const o="Impossible case. Please create issue.",n="The tweak was out of range or the resulted private key is invalid",f="The tweak was out of range or equal to zero",p="Unknow error on context randomization",u="Private Key is invalid",c="Public Key could not be parsed",s="Public Key serialization error",l="The sum of the public keys is not valid",d="Signature could not be parsed",b="The nonce generation function failed, or the private key was invalid",v="Public key could not be recover",y="Scalar was invalid (zero or overflow)";function x(A,P){if(!A)throw new Error(P)}function E(A,P,N){if(x(P instanceof Uint8Array,`Expected ${A} to be an Uint8Array`),N!==void 0)if(Array.isArray(N)){const L=`Expected ${A} to be an Uint8Array with length [${N.join(", ")}]`;x(N.includes(P.length),L)}else{const L=`Expected ${A} to be an Uint8Array with length ${N}`;x(P.length===N,L)}}function R(A){x(O(A)==="Boolean","Expected compressed to be a Boolean")}function I(A=N=>new Uint8Array(N),P){return typeof A=="function"&&(A=A(P)),E("output",A,P),A}function O(A){return Object.prototype.toString.call(A).slice(8,-1)}i.exports=A=>({contextRandomize(P){switch(x(P===null||P instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),P!==null&&E("seed",P,32),A.contextRandomize(P)){case 1:throw new Error(p)}},privateKeyVerify:P=>(E("private key",P,32),A.privateKeyVerify(P)===0),privateKeyNegate(P){switch(E("private key",P,32),A.privateKeyNegate(P)){case 0:return P;case 1:throw new Error(o)}},privateKeyTweakAdd(P,N){switch(E("private key",P,32),E("tweak",N,32),A.privateKeyTweakAdd(P,N)){case 0:return P;case 1:throw new Error(n)}},privateKeyTweakMul(P,N){switch(E("private key",P,32),E("tweak",N,32),A.privateKeyTweakMul(P,N)){case 0:return P;case 1:throw new Error(f)}},publicKeyVerify:P=>(E("public key",P,[33,65]),A.publicKeyVerify(P)===0),publicKeyCreate(P,N=!0,L){switch(E("private key",P,32),R(N),L=I(L,N?33:65),A.publicKeyCreate(L,P)){case 0:return L;case 1:throw new Error(u);case 2:throw new Error(s)}},publicKeyConvert(P,N=!0,L){switch(E("public key",P,[33,65]),R(N),L=I(L,N?33:65),A.publicKeyConvert(L,P)){case 0:return L;case 1:throw new Error(c);case 2:throw new Error(s)}},publicKeyNegate(P,N=!0,L){switch(E("public key",P,[33,65]),R(N),L=I(L,N?33:65),A.publicKeyNegate(L,P)){case 0:return L;case 1:throw new Error(c);case 2:throw new Error(o);case 3:throw new Error(s)}},publicKeyCombine(P,N=!0,L){x(Array.isArray(P),"Expected public keys to be an Array"),x(P.length>0,"Expected public keys array will have more than zero items");for(const H of P)E("public key",H,[33,65]);switch(R(N),L=I(L,N?33:65),A.publicKeyCombine(L,P)){case 0:return L;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(s)}},publicKeyTweakAdd(P,N,L=!0,H){switch(E("public key",P,[33,65]),E("tweak",N,32),R(L),H=I(H,L?33:65),A.publicKeyTweakAdd(H,P,N)){case 0:return H;case 1:throw new Error(c);case 2:throw new Error(n)}},publicKeyTweakMul(P,N,L=!0,H){switch(E("public key",P,[33,65]),E("tweak",N,32),R(L),H=I(H,L?33:65),A.publicKeyTweakMul(H,P,N)){case 0:return H;case 1:throw new Error(c);case 2:throw new Error(f)}},signatureNormalize(P){switch(E("signature",P,64),A.signatureNormalize(P)){case 0:return P;case 1:throw new Error(d)}},signatureExport(P,N){E("signature",P,64);const L={output:N=I(N,72),outputlen:72};switch(A.signatureExport(L,P)){case 0:return N.slice(0,L.outputlen);case 1:throw new Error(d);case 2:throw new Error(o)}},signatureImport(P,N){switch(E("signature",P),N=I(N,64),A.signatureImport(N,P)){case 0:return N;case 1:throw new Error(d);case 2:throw new Error(o)}},ecdsaSign(P,N,L={},H){E("message",P,32),E("private key",N,32),x(O(L)==="Object","Expected options to be an Object"),L.data!==void 0&&E("options.data",L.data),L.noncefn!==void 0&&x(O(L.noncefn)==="Function","Expected options.noncefn to be a Function");const J={signature:H=I(H,64),recid:null};switch(A.ecdsaSign(J,P,N,L.data,L.noncefn)){case 0:return J;case 1:throw new Error(b);case 2:throw new Error(o)}},ecdsaVerify(P,N,L){switch(E("signature",P,64),E("message",N,32),E("public key",L,[33,65]),A.ecdsaVerify(P,N,L)){case 0:return!0;case 3:return!1;case 1:throw new Error(d);case 2:throw new Error(c)}},ecdsaRecover(P,N,L,H=!0,J){switch(E("signature",P,64),x(O(N)==="Number"&&N>=0&&N<=3,"Expected recovery id to be a Number within interval [0, 3]"),E("message",L,32),R(H),J=I(J,H?33:65),A.ecdsaRecover(J,P,N,L)){case 0:return J;case 1:throw new Error(d);case 2:throw new Error(v);case 3:throw new Error(o)}},ecdh(P,N,L={},H){switch(E("public key",P,[33,65]),E("private key",N,32),x(O(L)==="Object","Expected options to be an Object"),L.data!==void 0&&E("options.data",L.data),L.hashfn!==void 0?(x(O(L.hashfn)==="Function","Expected options.hashfn to be a Function"),L.xbuf!==void 0&&E("options.xbuf",L.xbuf,32),L.ybuf!==void 0&&E("options.ybuf",L.ybuf,32),E("output",H)):H=I(H,32),A.ecdh(H,P,N,L.data,L.hashfn,L.xbuf,L.ybuf)){case 0:return H;case 1:throw new Error(c);case 2:throw new Error(y)}}})},function(i,e,o){const n=new(o(58)).ec("secp256k1"),f=n.curve,p=f.n.constructor;function u(s){const l=s[0];switch(l){case 2:case 3:return s.length!==33?null:function(d,b){let v=new p(b);if(v.cmp(f.p)>=0)return null;v=v.toRed(f.red);let y=v.redSqr().redIMul(v).redIAdd(f.b).redSqrt();return d===3!==y.isOdd()&&(y=y.redNeg()),n.keyPair({pub:{x:v,y}})}(l,s.subarray(1,33));case 4:case 6:case 7:return s.length!==65?null:function(d,b,v){let y=new p(b),x=new p(v);if(y.cmp(f.p)>=0||x.cmp(f.p)>=0||(y=y.toRed(f.red),x=x.toRed(f.red),(d===6||d===7)&&x.isOdd()!==(d===7)))return null;const E=y.redSqr().redIMul(y);return x.redSqr().redISub(E.redIAdd(f.b)).isZero()?n.keyPair({pub:{x:y,y:x}}):null}(l,s.subarray(1,33),s.subarray(33,65));default:return null}}function c(s,l){const d=l.encode(null,s.length===33);for(let b=0;b<s.length;++b)s[b]=d[b]}i.exports={contextRandomize:()=>0,privateKeyVerify(s){const l=new p(s);return l.cmp(f.n)<0&&!l.isZero()?0:1},privateKeyNegate(s){const l=new p(s),d=f.n.sub(l).umod(f.n).toArrayLike(Uint8Array,"be",32);return s.set(d),0},privateKeyTweakAdd(s,l){const d=new p(l);if(d.cmp(f.n)>=0||(d.iadd(new p(s)),d.cmp(f.n)>=0&&d.isub(f.n),d.isZero()))return 1;const b=d.toArrayLike(Uint8Array,"be",32);return s.set(b),0},privateKeyTweakMul(s,l){let d=new p(l);if(d.cmp(f.n)>=0||d.isZero())return 1;d.imul(new p(s)),d.cmp(f.n)>=0&&(d=d.umod(f.n));const b=d.toArrayLike(Uint8Array,"be",32);return s.set(b),0},publicKeyVerify:s=>u(s)===null?1:0,publicKeyCreate(s,l){const d=new p(l);return d.cmp(f.n)>=0||d.isZero()?1:(c(s,n.keyFromPrivate(l).getPublic()),0)},publicKeyConvert(s,l){const d=u(l);return d===null?1:(c(s,d.getPublic()),0)},publicKeyNegate(s,l){const d=u(l);if(d===null)return 1;const b=d.getPublic();return b.y=b.y.redNeg(),c(s,b),0},publicKeyCombine(s,l){const d=new Array(l.length);for(let v=0;v<l.length;++v)if(d[v]=u(l[v]),d[v]===null)return 1;let b=d[0].getPublic();for(let v=1;v<d.length;++v)b=b.add(d[v].pub);return b.isInfinity()?2:(c(s,b),0)},publicKeyTweakAdd(s,l,d){const b=u(l);if(b===null)return 1;if((d=new p(d)).cmp(f.n)>=0)return 2;const v=b.getPublic().add(f.g.mul(d));return v.isInfinity()?2:(c(s,v),0)},publicKeyTweakMul(s,l,d){const b=u(l);return b===null?1:(d=new p(d)).cmp(f.n)>=0||d.isZero()?2:(c(s,b.getPublic().mul(d)),0)},signatureNormalize(s){const l=new p(s.subarray(0,32)),d=new p(s.subarray(32,64));return l.cmp(f.n)>=0||d.cmp(f.n)>=0?1:(d.cmp(n.nh)===1&&s.set(f.n.sub(d).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(s,l){const d=l.subarray(0,32),b=l.subarray(32,64);if(new p(d).cmp(f.n)>=0||new p(b).cmp(f.n)>=0)return 1;const{output:v}=s;let y=v.subarray(4,37);y[0]=0,y.set(d,1);let x=33,E=0;for(;x>1&&y[E]===0&&!(128&y[E+1]);--x,++E);if(y=y.subarray(E),128&y[0]||x>1&&y[0]===0&&!(128&y[1]))return 1;let R=v.subarray(39,72);R[0]=0,R.set(b,1);let I=33,O=0;for(;I>1&&R[O]===0&&!(128&R[O+1]);--I,++O);return R=R.subarray(O),128&R[0]||I>1&&R[0]===0&&!(128&R[1])?1:(s.outputlen=6+x+I,v[0]=48,v[1]=s.outputlen-2,v[2]=2,v[3]=y.length,v.set(y,4),v[4+x]=2,v[5+x]=R.length,v.set(R,6+x),0)},signatureImport(s,l){if(l.length<8||l.length>72||l[0]!==48||l[1]!==l.length-2||l[2]!==2)return 1;const d=l[3];if(d===0||5+d>=l.length||l[4+d]!==2)return 1;const b=l[5+d];if(b===0||6+d+b!==l.length||128&l[4]||d>1&&l[4]===0&&!(128&l[5])||128&l[d+6]||b>1&&l[d+6]===0&&!(128&l[d+7]))return 1;let v=l.subarray(4,4+d);if(v.length===33&&v[0]===0&&(v=v.subarray(1)),v.length>32)return 1;let y=l.subarray(6+d);if(y.length===33&&y[0]===0&&(y=y.slice(1)),y.length>32)throw new Error("S length is too long");let x=new p(v);x.cmp(f.n)>=0&&(x=new p(0));let E=new p(l.subarray(6+d));return E.cmp(f.n)>=0&&(E=new p(0)),s.set(x.toArrayLike(Uint8Array,"be",32),0),s.set(E.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(s,l,d,b,v){if(v){const E=v;v=R=>{const I=E(l,d,null,b,R);if(!(I instanceof Uint8Array&&I.length===32))throw new Error("This is the way");return new p(I)}}const y=new p(d);if(y.cmp(f.n)>=0||y.isZero())return 1;let x;try{x=n.sign(l,d,{canonical:!0,k:v,pers:b})}catch{return 1}return s.signature.set(x.r.toArrayLike(Uint8Array,"be",32),0),s.signature.set(x.s.toArrayLike(Uint8Array,"be",32),32),s.recid=x.recoveryParam,0},ecdsaVerify(s,l,d){const b={r:s.subarray(0,32),s:s.subarray(32,64)},v=new p(b.r),y=new p(b.s);if(v.cmp(f.n)>=0||y.cmp(f.n)>=0)return 1;if(y.cmp(n.nh)===1||v.isZero()||y.isZero())return 3;const x=u(d);if(x===null)return 2;const E=x.getPublic();return n.verify(l,b,E)?0:3},ecdsaRecover(s,l,d,b){const v={r:l.slice(0,32),s:l.slice(32,64)},y=new p(v.r),x=new p(v.s);if(y.cmp(f.n)>=0||x.cmp(f.n)>=0)return 1;if(y.isZero()||x.isZero())return 2;let E;try{E=n.recoverPubKey(b,v,d)}catch{return 2}return c(s,E),0},ecdh(s,l,d,b,v,y,x){const E=u(l);if(E===null)return 1;const R=new p(d);if(R.cmp(f.n)>=0||R.isZero())return 2;const I=E.getPublic().mul(R);if(v===void 0){const O=I.encode(null,!0),A=n.hash().update(O).digest();for(let P=0;P<32;++P)s[P]=A[P]}else{y||(y=new Uint8Array(32));const O=I.getX().toArray("be",32);for(let N=0;N<32;++N)y[N]=O[N];x||(x=new Uint8Array(32));const A=I.getY().toArray("be",32);for(let N=0;N<32;++N)x[N]=A[N];const P=v(y,x,b);if(!(P instanceof Uint8Array&&P.length===s.length))return 2;s.set(P)}return 0}}},function(i){i.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(i,e){},function(i,e){},function(i,e,o){var n=o(11),f=o(16),p=o(3),u=o(45),c=n.assert;function s(b){u.call(this,"short",b),this.a=new f(b.a,16).toRed(this.red),this.b=new f(b.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(b),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(b,v,y,x){u.BasePoint.call(this,b,"affine"),v===null&&y===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(v,16),this.y=new f(y,16),x&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(b,v,y,x){u.BasePoint.call(this,b,"jacobian"),v===null&&y===null&&x===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(v,16),this.y=new f(y,16),this.z=new f(x,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}p(s,u),i.exports=s,s.prototype._getEndomorphism=function(b){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var v,y;if(b.beta)v=new f(b.beta,16).toRed(this.red);else{var x=this._getEndoRoots(this.p);v=(v=x[0].cmp(x[1])<0?x[0]:x[1]).toRed(this.red)}if(b.lambda)y=new f(b.lambda,16);else{var E=this._getEndoRoots(this.n);this.g.mul(E[0]).x.cmp(this.g.x.redMul(v))===0?y=E[0]:(y=E[1],c(this.g.mul(y).x.cmp(this.g.x.redMul(v))===0))}return{beta:v,lambda:y,basis:b.basis?b.basis.map(function(R){return{a:new f(R.a,16),b:new f(R.b,16)}}):this._getEndoBasis(y)}}},s.prototype._getEndoRoots=function(b){var v=b===this.p?this.red:f.mont(b),y=new f(2).toRed(v).redInvm(),x=y.redNeg(),E=new f(3).toRed(v).redNeg().redSqrt().redMul(y);return[x.redAdd(E).fromRed(),x.redSub(E).fromRed()]},s.prototype._getEndoBasis=function(b){for(var v,y,x,E,R,I,O,A,P,N=this.n.ushrn(Math.floor(this.n.bitLength()/2)),L=b,H=this.n.clone(),J=new f(1),G=new f(0),z=new f(0),S=new f(1),a=0;L.cmpn(0)!==0;){var w=H.div(L);A=H.sub(w.mul(L)),P=z.sub(w.mul(J));var h=S.sub(w.mul(G));if(!x&&A.cmp(N)<0)v=O.neg(),y=J,x=A.neg(),E=P;else if(x&&++a==2)break;O=A,H=L,L=A,z=J,J=P,S=G,G=h}R=A.neg(),I=P;var m=x.sqr().add(E.sqr());return R.sqr().add(I.sqr()).cmp(m)>=0&&(R=v,I=y),x.negative&&(x=x.neg(),E=E.neg()),R.negative&&(R=R.neg(),I=I.neg()),[{a:x,b:E},{a:R,b:I}]},s.prototype._endoSplit=function(b){var v=this.endo.basis,y=v[0],x=v[1],E=x.b.mul(b).divRound(this.n),R=y.b.neg().mul(b).divRound(this.n),I=E.mul(y.a),O=R.mul(x.a),A=E.mul(y.b),P=R.mul(x.b);return{k1:b.sub(I).sub(O),k2:A.add(P).neg()}},s.prototype.pointFromX=function(b,v){(b=new f(b,16)).red||(b=b.toRed(this.red));var y=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),x=y.redSqrt();if(x.redSqr().redSub(y).cmp(this.zero)!==0)throw new Error("invalid point");var E=x.fromRed().isOdd();return(v&&!E||!v&&E)&&(x=x.redNeg()),this.point(b,x)},s.prototype.validate=function(b){if(b.inf)return!0;var v=b.x,y=b.y,x=this.a.redMul(v),E=v.redSqr().redMul(v).redIAdd(x).redIAdd(this.b);return y.redSqr().redISub(E).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(b,v,y){for(var x=this._endoWnafT1,E=this._endoWnafT2,R=0;R<b.length;R++){var I=this._endoSplit(v[R]),O=b[R],A=O._getBeta();I.k1.negative&&(I.k1.ineg(),O=O.neg(!0)),I.k2.negative&&(I.k2.ineg(),A=A.neg(!0)),x[2*R]=O,x[2*R+1]=A,E[2*R]=I.k1,E[2*R+1]=I.k2}for(var P=this._wnafMulAdd(1,x,E,2*R,y),N=0;N<2*R;N++)x[N]=null,E[N]=null;return P},p(l,u.BasePoint),s.prototype.point=function(b,v,y){return new l(this,b,v,y)},s.prototype.pointFromJSON=function(b,v){return l.fromJSON(this,b,v)},l.prototype._getBeta=function(){if(this.curve.endo){var b=this.precomputed;if(b&&b.beta)return b.beta;var v=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(b){var y=this.curve,x=function(E){return y.point(E.x.redMul(y.endo.beta),E.y)};b.beta=v,v.precomputed={beta:null,naf:b.naf&&{wnd:b.naf.wnd,points:b.naf.points.map(x)},doubles:b.doubles&&{step:b.doubles.step,points:b.doubles.points.map(x)}}}return v}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(b,v,y){typeof v=="string"&&(v=JSON.parse(v));var x=b.point(v[0],v[1],y);if(!v[2])return x;function E(I){return b.point(I[0],I[1],y)}var R=v[2];return x.precomputed={beta:null,doubles:R.doubles&&{step:R.doubles.step,points:[x].concat(R.doubles.points.map(E))},naf:R.naf&&{wnd:R.naf.wnd,points:[x].concat(R.naf.points.map(E))}},x},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(this.x.cmp(b.x)===0)return this.curve.point(null,null);var v=this.y.redSub(b.y);v.cmpn(0)!==0&&(v=v.redMul(this.x.redSub(b.x).redInvm()));var y=v.redSqr().redISub(this.x).redISub(b.x),x=v.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,x)},l.prototype.dbl=function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(b.cmpn(0)===0)return this.curve.point(null,null);var v=this.curve.a,y=this.x.redSqr(),x=b.redInvm(),E=y.redAdd(y).redIAdd(y).redIAdd(v).redMul(x),R=E.redSqr().redISub(this.x.redAdd(this.x)),I=E.redMul(this.x.redSub(R)).redISub(this.y);return this.curve.point(R,I)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(b){return b=new f(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},l.prototype.mulAdd=function(b,v,y){var x=[this,v],E=[b,y];return this.curve.endo?this.curve._endoWnafMulAdd(x,E):this.curve._wnafMulAdd(1,x,E,2)},l.prototype.jmulAdd=function(b,v,y){var x=[this,v],E=[b,y];return this.curve.endo?this.curve._endoWnafMulAdd(x,E,!0):this.curve._wnafMulAdd(1,x,E,2,!0)},l.prototype.eq=function(b){return this===b||this.inf===b.inf&&(this.inf||this.x.cmp(b.x)===0&&this.y.cmp(b.y)===0)},l.prototype.neg=function(b){if(this.inf)return this;var v=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var y=this.precomputed,x=function(E){return E.neg()};v.precomputed={naf:y.naf&&{wnd:y.naf.wnd,points:y.naf.points.map(x)},doubles:y.doubles&&{step:y.doubles.step,points:y.doubles.points.map(x)}}}return v},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},p(d,u.BasePoint),s.prototype.jpoint=function(b,v,y){return new d(this,b,v,y)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),v=b.redSqr(),y=this.x.redMul(v),x=this.y.redMul(v).redMul(b);return this.curve.point(y,x)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var v=b.z.redSqr(),y=this.z.redSqr(),x=this.x.redMul(v),E=b.x.redMul(y),R=this.y.redMul(v.redMul(b.z)),I=b.y.redMul(y.redMul(this.z)),O=x.redSub(E),A=R.redSub(I);if(O.cmpn(0)===0)return A.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var P=O.redSqr(),N=P.redMul(O),L=x.redMul(P),H=A.redSqr().redIAdd(N).redISub(L).redISub(L),J=A.redMul(L.redISub(H)).redISub(R.redMul(N)),G=this.z.redMul(b.z).redMul(O);return this.curve.jpoint(H,J,G)},d.prototype.mixedAdd=function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var v=this.z.redSqr(),y=this.x,x=b.x.redMul(v),E=this.y,R=b.y.redMul(v).redMul(this.z),I=y.redSub(x),O=E.redSub(R);if(I.cmpn(0)===0)return O.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var A=I.redSqr(),P=A.redMul(I),N=y.redMul(A),L=O.redSqr().redIAdd(P).redISub(N).redISub(N),H=O.redMul(N.redISub(L)).redISub(E.redMul(P)),J=this.z.redMul(I);return this.curve.jpoint(L,H,J)},d.prototype.dblp=function(b){if(b===0)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var v;if(this.curve.zeroA||this.curve.threeA){var y=this;for(v=0;v<b;v++)y=y.dbl();return y}var x=this.curve.a,E=this.curve.tinv,R=this.x,I=this.y,O=this.z,A=O.redSqr().redSqr(),P=I.redAdd(I);for(v=0;v<b;v++){var N=R.redSqr(),L=P.redSqr(),H=L.redSqr(),J=N.redAdd(N).redIAdd(N).redIAdd(x.redMul(A)),G=R.redMul(L),z=J.redSqr().redISub(G.redAdd(G)),S=G.redISub(z),a=J.redMul(S);a=a.redIAdd(a).redISub(H);var w=P.redMul(O);v+1<b&&(A=A.redMul(H)),R=z,O=w,P=a}return this.curve.jpoint(R,P.redMul(E),O)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},d.prototype._zeroDbl=function(){var b,v,y;if(this.zOne){var x=this.x.redSqr(),E=this.y.redSqr(),R=E.redSqr(),I=this.x.redAdd(E).redSqr().redISub(x).redISub(R);I=I.redIAdd(I);var O=x.redAdd(x).redIAdd(x),A=O.redSqr().redISub(I).redISub(I),P=R.redIAdd(R);P=(P=P.redIAdd(P)).redIAdd(P),b=A,v=O.redMul(I.redISub(A)).redISub(P),y=this.y.redAdd(this.y)}else{var N=this.x.redSqr(),L=this.y.redSqr(),H=L.redSqr(),J=this.x.redAdd(L).redSqr().redISub(N).redISub(H);J=J.redIAdd(J);var G=N.redAdd(N).redIAdd(N),z=G.redSqr(),S=H.redIAdd(H);S=(S=S.redIAdd(S)).redIAdd(S),b=z.redISub(J).redISub(J),v=G.redMul(J.redISub(b)).redISub(S),y=(y=this.y.redMul(this.z)).redIAdd(y)}return this.curve.jpoint(b,v,y)},d.prototype._threeDbl=function(){var b,v,y;if(this.zOne){var x=this.x.redSqr(),E=this.y.redSqr(),R=E.redSqr(),I=this.x.redAdd(E).redSqr().redISub(x).redISub(R);I=I.redIAdd(I);var O=x.redAdd(x).redIAdd(x).redIAdd(this.curve.a),A=O.redSqr().redISub(I).redISub(I);b=A;var P=R.redIAdd(R);P=(P=P.redIAdd(P)).redIAdd(P),v=O.redMul(I.redISub(A)).redISub(P),y=this.y.redAdd(this.y)}else{var N=this.z.redSqr(),L=this.y.redSqr(),H=this.x.redMul(L),J=this.x.redSub(N).redMul(this.x.redAdd(N));J=J.redAdd(J).redIAdd(J);var G=H.redIAdd(H),z=(G=G.redIAdd(G)).redAdd(G);b=J.redSqr().redISub(z),y=this.y.redAdd(this.z).redSqr().redISub(L).redISub(N);var S=L.redSqr();S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S),v=J.redMul(G.redISub(b)).redISub(S)}return this.curve.jpoint(b,v,y)},d.prototype._dbl=function(){var b=this.curve.a,v=this.x,y=this.y,x=this.z,E=x.redSqr().redSqr(),R=v.redSqr(),I=y.redSqr(),O=R.redAdd(R).redIAdd(R).redIAdd(b.redMul(E)),A=v.redAdd(v),P=(A=A.redIAdd(A)).redMul(I),N=O.redSqr().redISub(P.redAdd(P)),L=P.redISub(N),H=I.redSqr();H=(H=(H=H.redIAdd(H)).redIAdd(H)).redIAdd(H);var J=O.redMul(L).redISub(H),G=y.redAdd(y).redMul(x);return this.curve.jpoint(N,J,G)},d.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var b=this.x.redSqr(),v=this.y.redSqr(),y=this.z.redSqr(),x=v.redSqr(),E=b.redAdd(b).redIAdd(b),R=E.redSqr(),I=this.x.redAdd(v).redSqr().redISub(b).redISub(x),O=(I=(I=(I=I.redIAdd(I)).redAdd(I).redIAdd(I)).redISub(R)).redSqr(),A=x.redIAdd(x);A=(A=(A=A.redIAdd(A)).redIAdd(A)).redIAdd(A);var P=E.redIAdd(I).redSqr().redISub(R).redISub(O).redISub(A),N=v.redMul(P);N=(N=N.redIAdd(N)).redIAdd(N);var L=this.x.redMul(O).redISub(N);L=(L=L.redIAdd(L)).redIAdd(L);var H=this.y.redMul(P.redMul(A.redISub(P)).redISub(I.redMul(O)));H=(H=(H=H.redIAdd(H)).redIAdd(H)).redIAdd(H);var J=this.z.redAdd(I).redSqr().redISub(y).redISub(O);return this.curve.jpoint(L,H,J)},d.prototype.mul=function(b,v){return b=new f(b,v),this.curve._wnafMul(this,b)},d.prototype.eq=function(b){if(b.type==="affine")return this.eq(b.toJ());if(this===b)return!0;var v=this.z.redSqr(),y=b.z.redSqr();if(this.x.redMul(y).redISub(b.x.redMul(v)).cmpn(0)!==0)return!1;var x=v.redMul(this.z),E=y.redMul(b.z);return this.y.redMul(E).redISub(b.y.redMul(x)).cmpn(0)===0},d.prototype.eqXToP=function(b){var v=this.z.redSqr(),y=b.toRed(this.curve.red).redMul(v);if(this.x.cmp(y)===0)return!0;for(var x=b.clone(),E=this.curve.redN.redMul(v);;){if(x.iadd(this.curve.n),x.cmp(this.curve.p)>=0)return!1;if(y.redIAdd(E),this.x.cmp(y)===0)return!0}},d.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},d.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},function(i,e,o){var n=o(16),f=o(3),p=o(45),u=o(11);function c(l){p.call(this,"mont",l),this.a=new n(l.a,16).toRed(this.red),this.b=new n(l.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(l,d,b){p.BasePoint.call(this,l,"projective"),d===null&&b===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(d,16),this.z=new n(b,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}f(c,p),i.exports=c,c.prototype.validate=function(l){var d=l.normalize().x,b=d.redSqr(),v=b.redMul(d).redAdd(b.redMul(this.a)).redAdd(d);return v.redSqrt().redSqr().cmp(v)===0},f(s,p.BasePoint),c.prototype.decodePoint=function(l,d){return this.point(u.toArray(l,d),1)},c.prototype.point=function(l,d){return new s(this,l,d)},c.prototype.pointFromJSON=function(l){return s.fromJSON(this,l)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(l,d){return new s(l,d[0],d[1]||l.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var l=this.x.redAdd(this.z).redSqr(),d=this.x.redSub(this.z).redSqr(),b=l.redSub(d),v=l.redMul(d),y=b.redMul(d.redAdd(this.curve.a24.redMul(b)));return this.curve.point(v,y)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(l,d){var b=this.x.redAdd(this.z),v=this.x.redSub(this.z),y=l.x.redAdd(l.z),x=l.x.redSub(l.z).redMul(b),E=y.redMul(v),R=d.z.redMul(x.redAdd(E).redSqr()),I=d.x.redMul(x.redISub(E).redSqr());return this.curve.point(R,I)},s.prototype.mul=function(l){for(var d=l.clone(),b=this,v=this.curve.point(null,null),y=[];d.cmpn(0)!==0;d.iushrn(1))y.push(d.andln(1));for(var x=y.length-1;x>=0;x--)y[x]===0?(b=b.diffAdd(v,this),v=v.dbl()):(v=b.diffAdd(v,this),b=b.dbl());return v},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(l){return this.getX().cmp(l.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(i,e,o){var n=o(11),f=o(16),p=o(3),u=o(45),c=n.assert;function s(d){this.twisted=(0|d.a)!=1,this.mOneA=this.twisted&&(0|d.a)==-1,this.extended=this.mOneA,u.call(this,"edwards",d),this.a=new f(d.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new f(d.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new f(d.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|d.c)==1}function l(d,b,v,y,x){u.BasePoint.call(this,d,"projective"),b===null&&v===null&&y===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new f(b,16),this.y=new f(v,16),this.z=y?new f(y,16):this.curve.one,this.t=x&&new f(x,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}p(s,u),i.exports=s,s.prototype._mulA=function(d){return this.mOneA?d.redNeg():this.a.redMul(d)},s.prototype._mulC=function(d){return this.oneC?d:this.c.redMul(d)},s.prototype.jpoint=function(d,b,v,y){return this.point(d,b,v,y)},s.prototype.pointFromX=function(d,b){(d=new f(d,16)).red||(d=d.toRed(this.red));var v=d.redSqr(),y=this.c2.redSub(this.a.redMul(v)),x=this.one.redSub(this.c2.redMul(this.d).redMul(v)),E=y.redMul(x.redInvm()),R=E.redSqrt();if(R.redSqr().redSub(E).cmp(this.zero)!==0)throw new Error("invalid point");var I=R.fromRed().isOdd();return(b&&!I||!b&&I)&&(R=R.redNeg()),this.point(d,R)},s.prototype.pointFromY=function(d,b){(d=new f(d,16)).red||(d=d.toRed(this.red));var v=d.redSqr(),y=v.redSub(this.c2),x=v.redMul(this.d).redMul(this.c2).redSub(this.a),E=y.redMul(x.redInvm());if(E.cmp(this.zero)===0){if(b)throw new Error("invalid point");return this.point(this.zero,d)}var R=E.redSqrt();if(R.redSqr().redSub(E).cmp(this.zero)!==0)throw new Error("invalid point");return R.fromRed().isOdd()!==b&&(R=R.redNeg()),this.point(R,d)},s.prototype.validate=function(d){if(d.isInfinity())return!0;d.normalize();var b=d.x.redSqr(),v=d.y.redSqr(),y=b.redMul(this.a).redAdd(v),x=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(v)));return y.cmp(x)===0},p(l,u.BasePoint),s.prototype.pointFromJSON=function(d){return l.fromJSON(this,d)},s.prototype.point=function(d,b,v,y){return new l(this,d,b,v,y)},l.fromJSON=function(d,b){return new l(d,b[0],b[1],b[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},l.prototype._extDbl=function(){var d=this.x.redSqr(),b=this.y.redSqr(),v=this.z.redSqr();v=v.redIAdd(v);var y=this.curve._mulA(d),x=this.x.redAdd(this.y).redSqr().redISub(d).redISub(b),E=y.redAdd(b),R=E.redSub(v),I=y.redSub(b),O=x.redMul(R),A=E.redMul(I),P=x.redMul(I),N=R.redMul(E);return this.curve.point(O,A,N,P)},l.prototype._projDbl=function(){var d,b,v,y,x,E,R=this.x.redAdd(this.y).redSqr(),I=this.x.redSqr(),O=this.y.redSqr();if(this.curve.twisted){var A=(y=this.curve._mulA(I)).redAdd(O);this.zOne?(d=R.redSub(I).redSub(O).redMul(A.redSub(this.curve.two)),b=A.redMul(y.redSub(O)),v=A.redSqr().redSub(A).redSub(A)):(x=this.z.redSqr(),E=A.redSub(x).redISub(x),d=R.redSub(I).redISub(O).redMul(E),b=A.redMul(y.redSub(O)),v=A.redMul(E))}else y=I.redAdd(O),x=this.curve._mulC(this.z).redSqr(),E=y.redSub(x).redSub(x),d=this.curve._mulC(R.redISub(y)).redMul(E),b=this.curve._mulC(y).redMul(I.redISub(O)),v=y.redMul(E);return this.curve.point(d,b,v)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(d){var b=this.y.redSub(this.x).redMul(d.y.redSub(d.x)),v=this.y.redAdd(this.x).redMul(d.y.redAdd(d.x)),y=this.t.redMul(this.curve.dd).redMul(d.t),x=this.z.redMul(d.z.redAdd(d.z)),E=v.redSub(b),R=x.redSub(y),I=x.redAdd(y),O=v.redAdd(b),A=E.redMul(R),P=I.redMul(O),N=E.redMul(O),L=R.redMul(I);return this.curve.point(A,P,L,N)},l.prototype._projAdd=function(d){var b,v,y=this.z.redMul(d.z),x=y.redSqr(),E=this.x.redMul(d.x),R=this.y.redMul(d.y),I=this.curve.d.redMul(E).redMul(R),O=x.redSub(I),A=x.redAdd(I),P=this.x.redAdd(this.y).redMul(d.x.redAdd(d.y)).redISub(E).redISub(R),N=y.redMul(O).redMul(P);return this.curve.twisted?(b=y.redMul(A).redMul(R.redSub(this.curve._mulA(E))),v=O.redMul(A)):(b=y.redMul(A).redMul(R.redSub(E)),v=this.curve._mulC(O).redMul(A)),this.curve.point(N,b,v)},l.prototype.add=function(d){return this.isInfinity()?d:d.isInfinity()?this:this.curve.extended?this._extAdd(d):this._projAdd(d)},l.prototype.mul=function(d){return this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve._wnafMul(this,d)},l.prototype.mulAdd=function(d,b,v){return this.curve._wnafMulAdd(1,[this,b],[d,v],2,!1)},l.prototype.jmulAdd=function(d,b,v){return this.curve._wnafMulAdd(1,[this,b],[d,v],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var d=this.z.redInvm();return this.x=this.x.redMul(d),this.y=this.y.redMul(d),this.t&&(this.t=this.t.redMul(d)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(d){return this===d||this.getX().cmp(d.getX())===0&&this.getY().cmp(d.getY())===0},l.prototype.eqXToP=function(d){var b=d.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(b)===0)return!0;for(var v=d.clone(),y=this.curve.redN.redMul(this.z);;){if(v.iadd(this.curve.n),v.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(y),this.x.cmp(b)===0)return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},function(i,e,o){e.sha1=o(251),e.sha224=o(252),e.sha256=o(124),e.sha384=o(253),e.sha512=o(125)},function(i,e,o){var n=o(15),f=o(37),p=o(123),u=n.rotl32,c=n.sum32,s=n.sum32_5,l=p.ft_1,d=f.BlockHash,b=[1518500249,1859775393,2400959708,3395469782];function v(){if(!(this instanceof v))return new v;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(v,d),i.exports=v,v.blockSize=512,v.outSize=160,v.hmacStrength=80,v.padLength=64,v.prototype._update=function(y,x){for(var E=this.W,R=0;R<16;R++)E[R]=y[x+R];for(;R<E.length;R++)E[R]=u(E[R-3]^E[R-8]^E[R-14]^E[R-16],1);var I=this.h[0],O=this.h[1],A=this.h[2],P=this.h[3],N=this.h[4];for(R=0;R<E.length;R++){var L=~~(R/20),H=s(u(I,5),l(L,O,A,P),N,E[R],b[L]);N=P,P=A,A=u(O,30),O=I,I=H}this.h[0]=c(this.h[0],I),this.h[1]=c(this.h[1],O),this.h[2]=c(this.h[2],A),this.h[3]=c(this.h[3],P),this.h[4]=c(this.h[4],N)},v.prototype._digest=function(y){return y==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(i,e,o){var n=o(15),f=o(124);function p(){if(!(this instanceof p))return new p;f.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(p,f),i.exports=p,p.blockSize=512,p.outSize=224,p.hmacStrength=192,p.padLength=64,p.prototype._digest=function(u){return u==="hex"?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(i,e,o){var n=o(15),f=o(125);function p(){if(!(this instanceof p))return new p;f.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(p,f),i.exports=p,p.blockSize=1024,p.outSize=384,p.hmacStrength=192,p.padLength=128,p.prototype._digest=function(u){return u==="hex"?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(i,e,o){var n=o(15),f=o(37),p=n.rotl32,u=n.sum32,c=n.sum32_3,s=n.sum32_4,l=f.BlockHash;function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function b(O,A,P,N){return O<=15?A^P^N:O<=31?A&P|~A&N:O<=47?(A|~P)^N:O<=63?A&N|P&~N:A^(P|~N)}function v(O){return O<=15?0:O<=31?1518500249:O<=47?1859775393:O<=63?2400959708:2840853838}function y(O){return O<=15?1352829926:O<=31?1548603684:O<=47?1836072691:O<=63?2053994217:0}n.inherits(d,l),e.ripemd160=d,d.blockSize=512,d.outSize=160,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(O,A){for(var P=this.h[0],N=this.h[1],L=this.h[2],H=this.h[3],J=this.h[4],G=P,z=N,S=L,a=H,w=J,h=0;h<80;h++){var m=u(p(s(P,b(h,N,L,H),O[x[h]+A],v(h)),R[h]),J);P=J,J=H,H=p(L,10),L=N,N=m,m=u(p(s(G,b(79-h,z,S,a),O[E[h]+A],y(h)),I[h]),w),G=w,w=a,a=p(S,10),S=z,z=m}m=c(this.h[1],L,a),this.h[1]=c(this.h[2],H,w),this.h[2]=c(this.h[3],J,G),this.h[3]=c(this.h[4],P,z),this.h[4]=c(this.h[0],N,S),this.h[0]=m},d.prototype._digest=function(O){return O==="hex"?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],E=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],R=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(i,e,o){var n=o(15),f=o(22);function p(u,c,s){if(!(this instanceof p))return new p(u,c,s);this.Hash=u,this.blockSize=u.blockSize/8,this.outSize=u.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(c,s))}i.exports=p,p.prototype._init=function(u){u.length>this.blockSize&&(u=new this.Hash().update(u).digest()),f(u.length<=this.blockSize);for(var c=u.length;c<this.blockSize;c++)u.push(0);for(c=0;c<u.length;c++)u[c]^=54;for(this.inner=new this.Hash().update(u),c=0;c<u.length;c++)u[c]^=106;this.outer=new this.Hash().update(u)},p.prototype.update=function(u,c){return this.inner.update(u,c),this},p.prototype.digest=function(u){return this.outer.update(this.inner.digest()),this.outer.digest(u)}},function(i,e){i.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(i,e,o){var n=o(16),f=o(258),p=o(11),u=o(59),c=o(121),s=p.assert,l=o(259),d=o(260);function b(v){if(!(this instanceof b))return new b(v);typeof v=="string"&&(s(Object.prototype.hasOwnProperty.call(u,v),"Unknown curve "+v),v=u[v]),v instanceof u.PresetCurve&&(v={curve:v}),this.curve=v.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=v.curve.g,this.g.precompute(v.curve.n.bitLength()+1),this.hash=v.hash||v.curve.hash}i.exports=b,b.prototype.keyPair=function(v){return new l(this,v)},b.prototype.keyFromPrivate=function(v,y){return l.fromPrivate(this,v,y)},b.prototype.keyFromPublic=function(v,y){return l.fromPublic(this,v,y)},b.prototype.genKeyPair=function(v){v||(v={});for(var y=new f({hash:this.hash,pers:v.pers,persEnc:v.persEnc||"utf8",entropy:v.entropy||c(this.hash.hmacStrength),entropyEnc:v.entropy&&v.entropyEnc||"utf8",nonce:this.n.toArray()}),x=this.n.byteLength(),E=this.n.sub(new n(2));;){var R=new n(y.generate(x));if(!(R.cmp(E)>0))return R.iaddn(1),this.keyFromPrivate(R)}},b.prototype._truncateToN=function(v,y){var x=8*v.byteLength()-this.n.bitLength();return x>0&&(v=v.ushrn(x)),!y&&v.cmp(this.n)>=0?v.sub(this.n):v},b.prototype.sign=function(v,y,x,E){typeof x=="object"&&(E=x,x=null),E||(E={}),y=this.keyFromPrivate(y,x),v=this._truncateToN(new n(v,16));for(var R=this.n.byteLength(),I=y.getPrivate().toArray("be",R),O=v.toArray("be",R),A=new f({hash:this.hash,entropy:I,nonce:O,pers:E.pers,persEnc:E.persEnc||"utf8"}),P=this.n.sub(new n(1)),N=0;;N++){var L=E.k?E.k(N):new n(A.generate(this.n.byteLength()));if(!((L=this._truncateToN(L,!0)).cmpn(1)<=0||L.cmp(P)>=0)){var H=this.g.mul(L);if(!H.isInfinity()){var J=H.getX(),G=J.umod(this.n);if(G.cmpn(0)!==0){var z=L.invm(this.n).mul(G.mul(y.getPrivate()).iadd(v));if((z=z.umod(this.n)).cmpn(0)!==0){var S=(H.getY().isOdd()?1:0)|(J.cmp(G)!==0?2:0);return E.canonical&&z.cmp(this.nh)>0&&(z=this.n.sub(z),S^=1),new d({r:G,s:z,recoveryParam:S})}}}}}},b.prototype.verify=function(v,y,x,E){v=this._truncateToN(new n(v,16)),x=this.keyFromPublic(x,E);var R=(y=new d(y,"hex")).r,I=y.s;if(R.cmpn(1)<0||R.cmp(this.n)>=0||I.cmpn(1)<0||I.cmp(this.n)>=0)return!1;var O,A=I.invm(this.n),P=A.mul(v).umod(this.n),N=A.mul(R).umod(this.n);return this.curve._maxwellTrick?!(O=this.g.jmulAdd(P,x.getPublic(),N)).isInfinity()&&O.eqXToP(R):!(O=this.g.mulAdd(P,x.getPublic(),N)).isInfinity()&&O.getX().umod(this.n).cmp(R)===0},b.prototype.recoverPubKey=function(v,y,x,E){s((3&x)===x,"The recovery param is more than two bits"),y=new d(y,E);var R=this.n,I=new n(v),O=y.r,A=y.s,P=1&x,N=x>>1;if(O.cmp(this.curve.p.umod(this.curve.n))>=0&&N)throw new Error("Unable to find sencond key candinate");O=N?this.curve.pointFromX(O.add(this.curve.n),P):this.curve.pointFromX(O,P);var L=y.r.invm(R),H=R.sub(I).mul(L).umod(R),J=A.mul(L).umod(R);return this.g.mulAdd(H,O,J)},b.prototype.getKeyRecoveryParam=function(v,y,x,E){if((y=new d(y,E)).recoveryParam!==null)return y.recoveryParam;for(var R=0;R<4;R++){var I;try{I=this.recoverPubKey(v,y,R)}catch{continue}if(I.eq(x))return R}throw new Error("Unable to find valid recovery factor")}},function(i,e,o){var n=o(60),f=o(120),p=o(22);function u(c){if(!(this instanceof u))return new u(c);this.hash=c.hash,this.predResist=!!c.predResist,this.outLen=this.hash.outSize,this.minEntropy=c.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var s=f.toArray(c.entropy,c.entropyEnc||"hex"),l=f.toArray(c.nonce,c.nonceEnc||"hex"),d=f.toArray(c.pers,c.persEnc||"hex");p(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,l,d)}i.exports=u,u.prototype._init=function(c,s,l){var d=c.concat(s).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b<this.V.length;b++)this.K[b]=0,this.V[b]=1;this._update(d),this._reseed=1,this.reseedInterval=281474976710656},u.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},u.prototype._update=function(c){var s=this._hmac().update(this.V).update([0]);c&&(s=s.update(c)),this.K=s.digest(),this.V=this._hmac().update(this.V).digest(),c&&(this.K=this._hmac().update(this.V).update([1]).update(c).digest(),this.V=this._hmac().update(this.V).digest())},u.prototype.reseed=function(c,s,l,d){typeof s!="string"&&(d=l,l=s,s=null),c=f.toArray(c,s),l=f.toArray(l,d),p(c.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(c.concat(l||[])),this._reseed=1},u.prototype.generate=function(c,s,l,d){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof s!="string"&&(d=l,l=s,s=null),l&&(l=f.toArray(l,d||"hex"),this._update(l));for(var b=[];b.length<c;)this.V=this._hmac().update(this.V).digest(),b=b.concat(this.V);var v=b.slice(0,c);return this._update(l),this._reseed++,f.encode(v,s)}},function(i,e,o){var n=o(16),f=o(11).assert;function p(u,c){this.ec=u,this.priv=null,this.pub=null,c.priv&&this._importPrivate(c.priv,c.privEnc),c.pub&&this._importPublic(c.pub,c.pubEnc)}i.exports=p,p.fromPublic=function(u,c,s){return c instanceof p?c:new p(u,{pub:c,pubEnc:s})},p.fromPrivate=function(u,c,s){return c instanceof p?c:new p(u,{priv:c,privEnc:s})},p.prototype.validate=function(){var u=this.getPublic();return u.isInfinity()?{result:!1,reason:"Invalid public key"}:u.validate()?u.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},p.prototype.getPublic=function(u,c){return typeof u=="string"&&(c=u,u=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),c?this.pub.encode(c,u):this.pub},p.prototype.getPrivate=function(u){return u==="hex"?this.priv.toString(16,2):this.priv},p.prototype._importPrivate=function(u,c){this.priv=new n(u,c||16),this.priv=this.priv.umod(this.ec.curve.n)},p.prototype._importPublic=function(u,c){if(u.x||u.y)return this.ec.curve.type==="mont"?f(u.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||f(u.x&&u.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(u.x,u.y));this.pub=this.ec.curve.decodePoint(u,c)},p.prototype.derive=function(u){return u.validate()||f(u.validate(),"public point not validated"),u.mul(this.priv).getX()},p.prototype.sign=function(u,c,s){return this.ec.sign(u,this,c,s)},p.prototype.verify=function(u,c){return this.ec.verify(u,c,this)},p.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(i,e,o){var n=o(16),f=o(11),p=f.assert;function u(b,v){if(b instanceof u)return b;this._importDER(b,v)||(p(b.r&&b.s,"Signature without r or s"),this.r=new n(b.r,16),this.s=new n(b.s,16),b.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=b.recoveryParam)}function c(){this.place=0}function s(b,v){var y=b[v.place++];if(!(128&y))return y;var x=15&y;if(x===0||x>4)return!1;for(var E=0,R=0,I=v.place;R<x;R++,I++)E<<=8,E|=b[I],E>>>=0;return!(E<=127)&&(v.place=I,E)}function l(b){for(var v=0,y=b.length-1;!b[v]&&!(128&b[v+1])&&v<y;)v++;return v===0?b:b.slice(v)}function d(b,v){if(v<128)b.push(v);else{var y=1+(Math.log(v)/Math.LN2>>>3);for(b.push(128|y);--y;)b.push(v>>>(y<<3)&255);b.push(v)}}i.exports=u,u.prototype._importDER=function(b,v){b=f.toArray(b,v);var y=new c;if(b[y.place++]!==48)return!1;var x=s(b,y);if(x===!1||x+y.place!==b.length||b[y.place++]!==2)return!1;var E=s(b,y);if(E===!1)return!1;var R=b.slice(y.place,E+y.place);if(y.place+=E,b[y.place++]!==2)return!1;var I=s(b,y);if(I===!1||b.length!==I+y.place)return!1;var O=b.slice(y.place,I+y.place);if(R[0]===0){if(!(128&R[1]))return!1;R=R.slice(1)}if(O[0]===0){if(!(128&O[1]))return!1;O=O.slice(1)}return this.r=new n(R),this.s=new n(O),this.recoveryParam=null,!0},u.prototype.toDER=function(b){var v=this.r.toArray(),y=this.s.toArray();for(128&v[0]&&(v=[0].concat(v)),128&y[0]&&(y=[0].concat(y)),v=l(v),y=l(y);!(y[0]||128&y[1]);)y=y.slice(1);var x=[2];d(x,v.length),(x=x.concat(v)).push(2),d(x,y.length);var E=x.concat(y),R=[48];return d(R,E.length),R=R.concat(E),f.encode(R,b)}},function(i,e,o){var n=o(60),f=o(59),p=o(11),u=p.assert,c=p.parseBytes,s=o(262),l=o(263);function d(b){if(u(b==="ed25519","only tested with ed25519 so far"),!(this instanceof d))return new d(b);b=f[b].curve,this.curve=b,this.g=b.g,this.g.precompute(b.n.bitLength()+1),this.pointClass=b.point().constructor,this.encodingLength=Math.ceil(b.n.bitLength()/8),this.hash=n.sha512}i.exports=d,d.prototype.sign=function(b,v){b=c(b);var y=this.keyFromSecret(v),x=this.hashInt(y.messagePrefix(),b),E=this.g.mul(x),R=this.encodePoint(E),I=this.hashInt(R,y.pubBytes(),b).mul(y.priv()),O=x.add(I).umod(this.curve.n);return this.makeSignature({R:E,S:O,Rencoded:R})},d.prototype.verify=function(b,v,y){b=c(b),v=this.makeSignature(v);var x=this.keyFromPublic(y),E=this.hashInt(v.Rencoded(),x.pubBytes(),b),R=this.g.mul(v.S());return v.R().add(x.pub().mul(E)).eq(R)},d.prototype.hashInt=function(){for(var b=this.hash(),v=0;v<arguments.length;v++)b.update(arguments[v]);return p.intFromLE(b.digest()).umod(this.curve.n)},d.prototype.keyFromPublic=function(b){return s.fromPublic(this,b)},d.prototype.keyFromSecret=function(b){return s.fromSecret(this,b)},d.prototype.makeSignature=function(b){return b instanceof l?b:new l(this,b)},d.prototype.encodePoint=function(b){var v=b.getY().toArray("le",this.encodingLength);return v[this.encodingLength-1]|=b.getX().isOdd()?128:0,v},d.prototype.decodePoint=function(b){var v=(b=p.parseBytes(b)).length-1,y=b.slice(0,v).concat(-129&b[v]),x=(128&b[v])!=0,E=p.intFromLE(y);return this.curve.pointFromY(E,x)},d.prototype.encodeInt=function(b){return b.toArray("le",this.encodingLength)},d.prototype.decodeInt=function(b){return p.intFromLE(b)},d.prototype.isPoint=function(b){return b instanceof this.pointClass}},function(i,e,o){var n=o(11),f=n.assert,p=n.parseBytes,u=n.cachedProperty;function c(s,l){this.eddsa=s,this._secret=p(l.secret),s.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=p(l.pub)}c.fromPublic=function(s,l){return l instanceof c?l:new c(s,{pub:l})},c.fromSecret=function(s,l){return l instanceof c?l:new c(s,{secret:l})},c.prototype.secret=function(){return this._secret},u(c,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),u(c,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),u(c,"privBytes",function(){var s=this.eddsa,l=this.hash(),d=s.encodingLength-1,b=l.slice(0,s.encodingLength);return b[0]&=248,b[d]&=127,b[d]|=64,b}),u(c,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),u(c,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),u(c,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),c.prototype.sign=function(s){return f(this._secret,"KeyPair can only verify"),this.eddsa.sign(s,this)},c.prototype.verify=function(s,l){return this.eddsa.verify(s,l,this)},c.prototype.getSecret=function(s){return f(this._secret,"KeyPair is public only"),n.encode(this.secret(),s)},c.prototype.getPublic=function(s){return n.encode(this.pubBytes(),s)},i.exports=c},function(i,e,o){var n=o(16),f=o(11),p=f.assert,u=f.cachedProperty,c=f.parseBytes;function s(l,d){this.eddsa=l,typeof d!="object"&&(d=c(d)),Array.isArray(d)&&(d={R:d.slice(0,l.encodingLength),S:d.slice(l.encodingLength)}),p(d.R&&d.S,"Signature without R or S"),l.isPoint(d.R)&&(this._R=d.R),d.S instanceof n&&(this._S=d.S),this._Rencoded=Array.isArray(d.R)?d.R:d.Rencoded,this._Sencoded=Array.isArray(d.S)?d.S:d.Sencoded}u(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),u(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),u(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),u(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return f.encode(this.toBytes(),"hex").toUpperCase()},i.exports=s},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=o(265);e.getRandomBytes=function(f){return new Promise(function(p,u){n(f,function(c,s){c?u(c):p(s)})})},e.getRandomBytesSync=function(f){return n(f)}},function(i,e,o){(function(n,f){var p=o(13).Buffer,u=n.crypto||n.msCrypto;u&&u.getRandomValues?i.exports=function(c,s){if(c>4294967295)throw new RangeError("requested too many random bytes");var l=p.allocUnsafe(c);if(c>0)if(c>65536)for(var d=0;d<c;d+=65536)u.getRandomValues(l.slice(d,d+65536));else u.getRandomValues(l);return typeof s=="function"?f.nextTick(function(){s(null,l)}):l}:i.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this,o(6),o(5))},function(i,e,o){(function(n){var f=o(9),p=new(o(58)).ec("secp256k1"),u=p.curve;e.privateKeyExport=function(s,l){var d=new f(s);if(d.ucmp(u.n)>=0)throw new Error("couldn't export to DER format");var b=p.g.mul(d);return c(b.getX(),b.getY(),l)},e.privateKeyModInverse=function(s){var l=new f(s);if(l.ucmp(u.n)>=0||l.isZero())throw new Error("private key range is invalid");return l.invm(u.n).toArrayLike(n,"be",32)},e.signatureImport=function(s){var l=new f(s.r);l.ucmp(u.n)>=0&&(l=new f(0));var d=new f(s.s);return d.ucmp(u.n)>=0&&(d=new f(0)),n.concat([l.toArrayLike(n,"be",32),d.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(s,l,d){var b=p.keyFromPublic(s),v=new f(l);if(v.ucmp(u.n)>=0||v.isZero())throw new Error("scalar was invalid (zero or overflow)");var y=b.pub.mul(v);return c(y.getX(),y.getY(),d)};var c=function(s,l,d){var b=void 0;return d?((b=n.alloc(33))[0]=l.isOdd()?3:2,s.toArrayLike(n,"be",32).copy(b,1)):((b=n.alloc(65))[0]=4,s.toArrayLike(n,"be",32).copy(b,1),l.toArrayLike(n,"be",32).copy(b,33)),b}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){var f=n.from([48,129,211,2,1,1,4,32,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,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,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,0,0,0,0,0,0,0,0,0]),p=n.from([48,130,1,19,2,1,1,4,32,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,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(u,c,s){var l=n.from(s?f:p);return u.copy(l,s?8:9),c.copy(l,s?181:214),l},e.privateKeyImport=function(u){var c=u.length,s=0;if(c<s+1||u[s]!==48||c<(s+=1)+1||!(128&u[s]))return null;var l=127&u[s];if(l<1||l>2||c<(s+=1)+l)return null;var d=u[s+l-1]|(l>1?u[s+l-2]<<8:0);return c<(s+=l)+d||c<s+3||u[s]!==2||u[s+1]!==1||u[s+2]!==1||c<(s+=3)+2||u[s]!==4||u[s+1]>32||c<s+2+u[s+1]?null:u.slice(s+2,s+2+u[s+1])},e.signatureImportLax=function(u){var c=n.alloc(32,0),s=n.alloc(32,0),l=u.length,d=0;if(u[d++]!==48)return null;var b=u[d++];if(128&b&&(d+=b-128)>l||u[d++]!==2)return null;var v=u[d++];if(128&v){if(d+(b=v-128)>l)return null;for(;b>0&&u[d]===0;d+=1,b-=1);for(v=0;b>0;d+=1,b-=1)v=(v<<8)+u[d]}if(v>l-d)return null;var y=d;if(d+=v,u[d++]!==2)return null;var x=u[d++];if(128&x){if(d+(b=x-128)>l)return null;for(;b>0&&u[d]===0;d+=1,b-=1);for(x=0;b>0;d+=1,b-=1)x=(x<<8)+u[d]}if(x>l-d)return null;var E=d;for(d+=x;v>0&&u[y]===0;v-=1,y+=1);if(v>32)return null;var R=u.slice(y,y+v);for(R.copy(c,32-R.length);x>0&&u[E]===0;x-=1,E+=1);if(x>32)return null;var I=u.slice(E,E+x);return I.copy(s,32-I.length),{r:c,s}}}).call(this,o(2).Buffer)},function(i,e,o){/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;function u(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}i.exports=function(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;if(Object.getOwnPropertyNames(s).map(function(b){return s[b]}).join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(b){d[b]=b}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(c,s){for(var l,d,b=u(c),v=1;v<arguments.length;v++){for(var y in l=Object(arguments[v]))f.call(l,y)&&(b[y]=l[y]);if(n){d=n(l);for(var x=0;x<d.length;x++)p.call(l,d[x])&&(b[d[x]]=l[d[x]])}}return b}},function(i,e,o){(function(n){(function(f,p){function u(h,m){if(!h)throw new Error(m||"Assertion failed")}function c(h,m){h.super_=m;var g=function(){};g.prototype=m.prototype,h.prototype=new g,h.prototype.constructor=h}function s(h,m,g){if(s.isBN(h))return h;this.negative=0,this.words=null,this.length=0,this.red=null,h!==null&&(m!=="le"&&m!=="be"||(g=m,m=10),this._init(h||0,m||10,g||"be"))}var l;typeof f=="object"?f.exports=s:p.BN=s,s.BN=s,s.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:o(270).Buffer}catch{}function d(h,m){var g=h.charCodeAt(m);return g>=48&&g<=57?g-48:g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:void u(!1,"Invalid character in "+h)}function b(h,m,g){var _=d(h,g);return g-1>=m&&(_|=d(h,g-1)<<4),_}function v(h,m,g,_){for(var T=0,k=0,M=Math.min(h.length,g),B=m;B<M;B++){var Y=h.charCodeAt(B)-48;T*=_,k=Y>=49?Y-49+10:Y>=17?Y-17+10:Y,u(Y>=0&&k<_,"Invalid character"),T+=k}return T}function y(h,m){h.words=m.words,h.length=m.length,h.negative=m.negative,h.red=m.red}if(s.isBN=function(h){return h instanceof s||h!==null&&typeof h=="object"&&h.constructor.wordSize===s.wordSize&&Array.isArray(h.words)},s.max=function(h,m){return h.cmp(m)>0?h:m},s.min=function(h,m){return h.cmp(m)<0?h:m},s.prototype._init=function(h,m,g){if(typeof h=="number")return this._initNumber(h,m,g);if(typeof h=="object")return this._initArray(h,m,g);m==="hex"&&(m=16),u(m===(0|m)&&m>=2&&m<=36);var _=0;(h=h.toString().replace(/\s+/g,""))[0]==="-"&&(_++,this.negative=1),_<h.length&&(m===16?this._parseHex(h,_,g):(this._parseBase(h,m,_),g==="le"&&this._initArray(this.toArray(),m,g)))},s.prototype._initNumber=function(h,m,g){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[67108863&h],this.length=1):h<4503599627370496?(this.words=[67108863&h,h/67108864&67108863],this.length=2):(u(h<9007199254740992),this.words=[67108863&h,h/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),m,g)},s.prototype._initArray=function(h,m,g){if(u(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var T,k,M=0;if(g==="be")for(_=h.length-1,T=0;_>=0;_-=3)k=h[_]|h[_-1]<<8|h[_-2]<<16,this.words[T]|=k<<M&67108863,this.words[T+1]=k>>>26-M&67108863,(M+=24)>=26&&(M-=26,T++);else if(g==="le")for(_=0,T=0;_<h.length;_+=3)k=h[_]|h[_+1]<<8|h[_+2]<<16,this.words[T]|=k<<M&67108863,this.words[T+1]=k>>>26-M&67108863,(M+=24)>=26&&(M-=26,T++);return this._strip()},s.prototype._parseHex=function(h,m,g){this.length=Math.ceil((h.length-m)/6),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var T,k=0,M=0;if(g==="be")for(_=h.length-1;_>=m;_-=2)T=b(h,m,_)<<k,this.words[M]|=67108863&T,k>=18?(k-=18,M+=1,this.words[M]|=T>>>26):k+=8;else for(_=(h.length-m)%2==0?m+1:m;_<h.length;_+=2)T=b(h,m,_)<<k,this.words[M]|=67108863&T,k>=18?(k-=18,M+=1,this.words[M]|=T>>>26):k+=8;this._strip()},s.prototype._parseBase=function(h,m,g){this.words=[0],this.length=1;for(var _=0,T=1;T<=67108863;T*=m)_++;_--,T=T/m|0;for(var k=h.length-g,M=k%_,B=Math.min(k,k-M)+g,Y=0,C=g;C<B;C+=_)Y=v(h,C,C+_,m),this.imuln(T),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y);if(M!==0){var K=1;for(Y=v(h,C,h.length,m),C=0;C<M;C++)K*=m;this.imuln(K),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y)}this._strip()},s.prototype.copy=function(h){h.words=new Array(this.length);for(var m=0;m<this.length;m++)h.words[m]=this.words[m];h.length=this.length,h.negative=this.negative,h.red=this.red},s.prototype._move=function(h){y(h,this)},s.prototype.clone=function(){var h=new s(null);return this.copy(h),h},s.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=x}catch{s.prototype.inspect=x}else s.prototype.inspect=x;function x(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var E=["","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"],R=[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],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(h,m){var g;if(m=0|m||1,(h=h||10)===16||h==="hex"){g="";for(var _=0,T=0,k=0;k<this.length;k++){var M=this.words[k],B=(16777215&(M<<_|T)).toString(16);T=M>>>24-_&16777215,(_+=2)>=26&&(_-=26,k--),g=T!==0||k!==this.length-1?E[6-B.length]+B+g:B+g}for(T!==0&&(g=T.toString(16)+g);g.length%m!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(h===(0|h)&&h>=2&&h<=36){var Y=R[h],C=I[h];g="";var K=this.clone();for(K.negative=0;!K.isZero();){var W=K.modrn(C).toString(h);g=(K=K.idivn(C)).isZero()?W+g:E[Y-W.length]+W+g}for(this.isZero()&&(g="0"+g);g.length%m!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}u(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=67108864*this.words[1]:this.length===3&&this.words[2]===1?h+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},s.prototype.toJSON=function(){return this.toString(16,2)},l&&(s.prototype.toBuffer=function(h,m){return this.toArrayLike(l,h,m)}),s.prototype.toArray=function(h,m){return this.toArrayLike(Array,h,m)};function O(h,m,g){g.negative=m.negative^h.negative;var _=h.length+m.length|0;g.length=_,_=_-1|0;var T=0|h.words[0],k=0|m.words[0],M=T*k,B=67108863&M,Y=M/67108864|0;g.words[0]=B;for(var C=1;C<_;C++){for(var K=Y>>>26,W=67108863&Y,U=Math.min(C,m.length-1),q=Math.max(0,C-h.length+1);q<=U;q++){var j=C-q|0;K+=(M=(T=0|h.words[j])*(k=0|m.words[q])+W)/67108864|0,W=67108863&M}g.words[C]=0|W,Y=0|K}return Y!==0?g.words[C]=0|Y:g.length--,g._strip()}s.prototype.toArrayLike=function(h,m,g){this._strip();var _=this.byteLength(),T=g||Math.max(1,_);u(_<=T,"byte array longer than desired length"),u(T>0,"Requested array length <= 0");var k=function(M,B){return M.allocUnsafe?M.allocUnsafe(B):new M(B)}(h,T);return this["_toArrayLike"+(m==="le"?"LE":"BE")](k,_),k},s.prototype._toArrayLikeLE=function(h,m){for(var g=0,_=0,T=0,k=0;T<this.length;T++){var M=this.words[T]<<k|_;h[g++]=255&M,g<h.length&&(h[g++]=M>>8&255),g<h.length&&(h[g++]=M>>16&255),k===6?(g<h.length&&(h[g++]=M>>24&255),_=0,k=0):(_=M>>>24,k+=2)}if(g<h.length)for(h[g++]=_;g<h.length;)h[g++]=0},s.prototype._toArrayLikeBE=function(h,m){for(var g=h.length-1,_=0,T=0,k=0;T<this.length;T++){var M=this.words[T]<<k|_;h[g--]=255&M,g>=0&&(h[g--]=M>>8&255),g>=0&&(h[g--]=M>>16&255),k===6?(g>=0&&(h[g--]=M>>24&255),_=0,k=0):(_=M>>>24,k+=2)}if(g>=0)for(h[g--]=_;g>=0;)h[g--]=0},Math.clz32?s.prototype._countBits=function(h){return 32-Math.clz32(h)}:s.prototype._countBits=function(h){var m=h,g=0;return m>=4096&&(g+=13,m>>>=13),m>=64&&(g+=7,m>>>=7),m>=8&&(g+=4,m>>>=4),m>=2&&(g+=2,m>>>=2),g+m},s.prototype._zeroBits=function(h){if(h===0)return 26;var m=h,g=0;return!(8191&m)&&(g+=13,m>>>=13),!(127&m)&&(g+=7,m>>>=7),!(15&m)&&(g+=4,m>>>=4),!(3&m)&&(g+=2,m>>>=2),!(1&m)&&g++,g},s.prototype.bitLength=function(){var h=this.words[this.length-1],m=this._countBits(h);return 26*(this.length-1)+m},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,m=0;m<this.length;m++){var g=this._zeroBits(this.words[m]);if(h+=g,g!==26)break}return h},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},s.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var m=0;m<h.length;m++)this.words[m]=this.words[m]|h.words[m];return this._strip()},s.prototype.ior=function(h){return u((this.negative|h.negative)==0),this.iuor(h)},s.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},s.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},s.prototype.iuand=function(h){var m;m=this.length>h.length?h:this;for(var g=0;g<m.length;g++)this.words[g]=this.words[g]&h.words[g];return this.length=m.length,this._strip()},s.prototype.iand=function(h){return u((this.negative|h.negative)==0),this.iuand(h)},s.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},s.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},s.prototype.iuxor=function(h){var m,g;this.length>h.length?(m=this,g=h):(m=h,g=this);for(var _=0;_<g.length;_++)this.words[_]=m.words[_]^g.words[_];if(this!==m)for(;_<m.length;_++)this.words[_]=m.words[_];return this.length=m.length,this._strip()},s.prototype.ixor=function(h){return u((this.negative|h.negative)==0),this.iuxor(h)},s.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},s.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},s.prototype.inotn=function(h){u(typeof h=="number"&&h>=0);var m=0|Math.ceil(h/26),g=h%26;this._expand(m),g>0&&m--;for(var _=0;_<m;_++)this.words[_]=67108863&~this.words[_];return g>0&&(this.words[_]=~this.words[_]&67108863>>26-g),this._strip()},s.prototype.notn=function(h){return this.clone().inotn(h)},s.prototype.setn=function(h,m){u(typeof h=="number"&&h>=0);var g=h/26|0,_=h%26;return this._expand(g+1),this.words[g]=m?this.words[g]|1<<_:this.words[g]&~(1<<_),this._strip()},s.prototype.iadd=function(h){var m,g,_;if(this.negative!==0&&h.negative===0)return this.negative=0,m=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,m=this.isub(h),h.negative=1,m._normSign();this.length>h.length?(g=this,_=h):(g=h,_=this);for(var T=0,k=0;k<_.length;k++)m=(0|g.words[k])+(0|_.words[k])+T,this.words[k]=67108863&m,T=m>>>26;for(;T!==0&&k<g.length;k++)m=(0|g.words[k])+T,this.words[k]=67108863&m,T=m>>>26;if(this.length=g.length,T!==0)this.words[this.length]=T,this.length++;else if(g!==this)for(;k<g.length;k++)this.words[k]=g.words[k];return this},s.prototype.add=function(h){var m;return h.negative!==0&&this.negative===0?(h.negative=0,m=this.sub(h),h.negative^=1,m):h.negative===0&&this.negative!==0?(this.negative=0,m=h.sub(this),this.negative=1,m):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},s.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var m=this.iadd(h);return h.negative=1,m._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var g,_,T=this.cmp(h);if(T===0)return this.negative=0,this.length=1,this.words[0]=0,this;T>0?(g=this,_=h):(g=h,_=this);for(var k=0,M=0;M<_.length;M++)k=(m=(0|g.words[M])-(0|_.words[M])+k)>>26,this.words[M]=67108863&m;for(;k!==0&&M<g.length;M++)k=(m=(0|g.words[M])+k)>>26,this.words[M]=67108863&m;if(k===0&&M<g.length&&g!==this)for(;M<g.length;M++)this.words[M]=g.words[M];return this.length=Math.max(this.length,M),g!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(h){return this.clone().isub(h)};var A=function(h,m,g){var _,T,k,M=h.words,B=m.words,Y=g.words,C=0,K=0|M[0],W=8191&K,U=K>>>13,q=0|M[1],j=8191&q,D=q>>>13,F=0|M[2],$=8191&F,V=F>>>13,Z=0|M[3],ee=8191&Z,re=Z>>>13,ue=0|M[4],fe=8191&ue,oe=ue>>>13,ae=0|M[5],ie=8191&ae,te=ae>>>13,le=0|M[6],ge=8191&le,he=le>>>13,ye=0|M[7],Ie=8191&ye,pe=ye>>>13,Oe=0|M[8],Ge=8191&Oe,we=Oe>>>13,Le=0|M[9],Ve=8191&Le,ve=Le>>>13,Ne=0|B[0],se=8191&Ne,de=Ne>>>13,_e=0|B[1],Ue=8191&_e,me=_e>>>13,Be=0|B[2],Je=8191&Be,be=Be>>>13,He=0|B[3],tt=8191&He,Re=He>>>13,ze=0|B[4],Ze=8191&ze,Ae=ze>>>13,De=0|B[5],rt=8191&De,Ee=De>>>13,Fe=0|B[6],Qe=8191&Fe,Se=Fe>>>13,Ke=0|B[7],Xe=8191&Ke,Me=Ke>>>13,We=0|B[8],et=8191&We,ke=We>>>13,qe=0|B[9],Q=8191&qe,X=qe>>>13;g.negative=h.negative^m.negative,g.length=19;var ne=(C+(_=Math.imul(W,se))|0)+((8191&(T=(T=Math.imul(W,de))+Math.imul(U,se)|0))<<13)|0;C=((k=Math.imul(U,de))+(T>>>13)|0)+(ne>>>26)|0,ne&=67108863,_=Math.imul(j,se),T=(T=Math.imul(j,de))+Math.imul(D,se)|0,k=Math.imul(D,de);var ce=(C+(_=_+Math.imul(W,Ue)|0)|0)+((8191&(T=(T=T+Math.imul(W,me)|0)+Math.imul(U,Ue)|0))<<13)|0;C=((k=k+Math.imul(U,me)|0)+(T>>>13)|0)+(ce>>>26)|0,ce&=67108863,_=Math.imul($,se),T=(T=Math.imul($,de))+Math.imul(V,se)|0,k=Math.imul(V,de),_=_+Math.imul(j,Ue)|0,T=(T=T+Math.imul(j,me)|0)+Math.imul(D,Ue)|0,k=k+Math.imul(D,me)|0;var Ce=(C+(_=_+Math.imul(W,Je)|0)|0)+((8191&(T=(T=T+Math.imul(W,be)|0)+Math.imul(U,Je)|0))<<13)|0;C=((k=k+Math.imul(U,be)|0)+(T>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,_=Math.imul(ee,se),T=(T=Math.imul(ee,de))+Math.imul(re,se)|0,k=Math.imul(re,de),_=_+Math.imul($,Ue)|0,T=(T=T+Math.imul($,me)|0)+Math.imul(V,Ue)|0,k=k+Math.imul(V,me)|0,_=_+Math.imul(j,Je)|0,T=(T=T+Math.imul(j,be)|0)+Math.imul(D,Je)|0,k=k+Math.imul(D,be)|0;var Pe=(C+(_=_+Math.imul(W,tt)|0)|0)+((8191&(T=(T=T+Math.imul(W,Re)|0)+Math.imul(U,tt)|0))<<13)|0;C=((k=k+Math.imul(U,Re)|0)+(T>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,_=Math.imul(fe,se),T=(T=Math.imul(fe,de))+Math.imul(oe,se)|0,k=Math.imul(oe,de),_=_+Math.imul(ee,Ue)|0,T=(T=T+Math.imul(ee,me)|0)+Math.imul(re,Ue)|0,k=k+Math.imul(re,me)|0,_=_+Math.imul($,Je)|0,T=(T=T+Math.imul($,be)|0)+Math.imul(V,Je)|0,k=k+Math.imul(V,be)|0,_=_+Math.imul(j,tt)|0,T=(T=T+Math.imul(j,Re)|0)+Math.imul(D,tt)|0,k=k+Math.imul(D,Re)|0;var Ye=(C+(_=_+Math.imul(W,Ze)|0)|0)+((8191&(T=(T=T+Math.imul(W,Ae)|0)+Math.imul(U,Ze)|0))<<13)|0;C=((k=k+Math.imul(U,Ae)|0)+(T>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,_=Math.imul(ie,se),T=(T=Math.imul(ie,de))+Math.imul(te,se)|0,k=Math.imul(te,de),_=_+Math.imul(fe,Ue)|0,T=(T=T+Math.imul(fe,me)|0)+Math.imul(oe,Ue)|0,k=k+Math.imul(oe,me)|0,_=_+Math.imul(ee,Je)|0,T=(T=T+Math.imul(ee,be)|0)+Math.imul(re,Je)|0,k=k+Math.imul(re,be)|0,_=_+Math.imul($,tt)|0,T=(T=T+Math.imul($,Re)|0)+Math.imul(V,tt)|0,k=k+Math.imul(V,Re)|0,_=_+Math.imul(j,Ze)|0,T=(T=T+Math.imul(j,Ae)|0)+Math.imul(D,Ze)|0,k=k+Math.imul(D,Ae)|0;var $e=(C+(_=_+Math.imul(W,rt)|0)|0)+((8191&(T=(T=T+Math.imul(W,Ee)|0)+Math.imul(U,rt)|0))<<13)|0;C=((k=k+Math.imul(U,Ee)|0)+(T>>>13)|0)+($e>>>26)|0,$e&=67108863,_=Math.imul(ge,se),T=(T=Math.imul(ge,de))+Math.imul(he,se)|0,k=Math.imul(he,de),_=_+Math.imul(ie,Ue)|0,T=(T=T+Math.imul(ie,me)|0)+Math.imul(te,Ue)|0,k=k+Math.imul(te,me)|0,_=_+Math.imul(fe,Je)|0,T=(T=T+Math.imul(fe,be)|0)+Math.imul(oe,Je)|0,k=k+Math.imul(oe,be)|0,_=_+Math.imul(ee,tt)|0,T=(T=T+Math.imul(ee,Re)|0)+Math.imul(re,tt)|0,k=k+Math.imul(re,Re)|0,_=_+Math.imul($,Ze)|0,T=(T=T+Math.imul($,Ae)|0)+Math.imul(V,Ze)|0,k=k+Math.imul(V,Ae)|0,_=_+Math.imul(j,rt)|0,T=(T=T+Math.imul(j,Ee)|0)+Math.imul(D,rt)|0,k=k+Math.imul(D,Ee)|0;var nt=(C+(_=_+Math.imul(W,Qe)|0)|0)+((8191&(T=(T=T+Math.imul(W,Se)|0)+Math.imul(U,Qe)|0))<<13)|0;C=((k=k+Math.imul(U,Se)|0)+(T>>>13)|0)+(nt>>>26)|0,nt&=67108863,_=Math.imul(Ie,se),T=(T=Math.imul(Ie,de))+Math.imul(pe,se)|0,k=Math.imul(pe,de),_=_+Math.imul(ge,Ue)|0,T=(T=T+Math.imul(ge,me)|0)+Math.imul(he,Ue)|0,k=k+Math.imul(he,me)|0,_=_+Math.imul(ie,Je)|0,T=(T=T+Math.imul(ie,be)|0)+Math.imul(te,Je)|0,k=k+Math.imul(te,be)|0,_=_+Math.imul(fe,tt)|0,T=(T=T+Math.imul(fe,Re)|0)+Math.imul(oe,tt)|0,k=k+Math.imul(oe,Re)|0,_=_+Math.imul(ee,Ze)|0,T=(T=T+Math.imul(ee,Ae)|0)+Math.imul(re,Ze)|0,k=k+Math.imul(re,Ae)|0,_=_+Math.imul($,rt)|0,T=(T=T+Math.imul($,Ee)|0)+Math.imul(V,rt)|0,k=k+Math.imul(V,Ee)|0,_=_+Math.imul(j,Qe)|0,T=(T=T+Math.imul(j,Se)|0)+Math.imul(D,Qe)|0,k=k+Math.imul(D,Se)|0;var je=(C+(_=_+Math.imul(W,Xe)|0)|0)+((8191&(T=(T=T+Math.imul(W,Me)|0)+Math.imul(U,Xe)|0))<<13)|0;C=((k=k+Math.imul(U,Me)|0)+(T>>>13)|0)+(je>>>26)|0,je&=67108863,_=Math.imul(Ge,se),T=(T=Math.imul(Ge,de))+Math.imul(we,se)|0,k=Math.imul(we,de),_=_+Math.imul(Ie,Ue)|0,T=(T=T+Math.imul(Ie,me)|0)+Math.imul(pe,Ue)|0,k=k+Math.imul(pe,me)|0,_=_+Math.imul(ge,Je)|0,T=(T=T+Math.imul(ge,be)|0)+Math.imul(he,Je)|0,k=k+Math.imul(he,be)|0,_=_+Math.imul(ie,tt)|0,T=(T=T+Math.imul(ie,Re)|0)+Math.imul(te,tt)|0,k=k+Math.imul(te,Re)|0,_=_+Math.imul(fe,Ze)|0,T=(T=T+Math.imul(fe,Ae)|0)+Math.imul(oe,Ze)|0,k=k+Math.imul(oe,Ae)|0,_=_+Math.imul(ee,rt)|0,T=(T=T+Math.imul(ee,Ee)|0)+Math.imul(re,rt)|0,k=k+Math.imul(re,Ee)|0,_=_+Math.imul($,Qe)|0,T=(T=T+Math.imul($,Se)|0)+Math.imul(V,Qe)|0,k=k+Math.imul(V,Se)|0,_=_+Math.imul(j,Xe)|0,T=(T=T+Math.imul(j,Me)|0)+Math.imul(D,Xe)|0,k=k+Math.imul(D,Me)|0;var Te=(C+(_=_+Math.imul(W,et)|0)|0)+((8191&(T=(T=T+Math.imul(W,ke)|0)+Math.imul(U,et)|0))<<13)|0;C=((k=k+Math.imul(U,ke)|0)+(T>>>13)|0)+(Te>>>26)|0,Te&=67108863,_=Math.imul(Ve,se),T=(T=Math.imul(Ve,de))+Math.imul(ve,se)|0,k=Math.imul(ve,de),_=_+Math.imul(Ge,Ue)|0,T=(T=T+Math.imul(Ge,me)|0)+Math.imul(we,Ue)|0,k=k+Math.imul(we,me)|0,_=_+Math.imul(Ie,Je)|0,T=(T=T+Math.imul(Ie,be)|0)+Math.imul(pe,Je)|0,k=k+Math.imul(pe,be)|0,_=_+Math.imul(ge,tt)|0,T=(T=T+Math.imul(ge,Re)|0)+Math.imul(he,tt)|0,k=k+Math.imul(he,Re)|0,_=_+Math.imul(ie,Ze)|0,T=(T=T+Math.imul(ie,Ae)|0)+Math.imul(te,Ze)|0,k=k+Math.imul(te,Ae)|0,_=_+Math.imul(fe,rt)|0,T=(T=T+Math.imul(fe,Ee)|0)+Math.imul(oe,rt)|0,k=k+Math.imul(oe,Ee)|0,_=_+Math.imul(ee,Qe)|0,T=(T=T+Math.imul(ee,Se)|0)+Math.imul(re,Qe)|0,k=k+Math.imul(re,Se)|0,_=_+Math.imul($,Xe)|0,T=(T=T+Math.imul($,Me)|0)+Math.imul(V,Xe)|0,k=k+Math.imul(V,Me)|0,_=_+Math.imul(j,et)|0,T=(T=T+Math.imul(j,ke)|0)+Math.imul(D,et)|0,k=k+Math.imul(D,ke)|0;var st=(C+(_=_+Math.imul(W,Q)|0)|0)+((8191&(T=(T=T+Math.imul(W,X)|0)+Math.imul(U,Q)|0))<<13)|0;C=((k=k+Math.imul(U,X)|0)+(T>>>13)|0)+(st>>>26)|0,st&=67108863,_=Math.imul(Ve,Ue),T=(T=Math.imul(Ve,me))+Math.imul(ve,Ue)|0,k=Math.imul(ve,me),_=_+Math.imul(Ge,Je)|0,T=(T=T+Math.imul(Ge,be)|0)+Math.imul(we,Je)|0,k=k+Math.imul(we,be)|0,_=_+Math.imul(Ie,tt)|0,T=(T=T+Math.imul(Ie,Re)|0)+Math.imul(pe,tt)|0,k=k+Math.imul(pe,Re)|0,_=_+Math.imul(ge,Ze)|0,T=(T=T+Math.imul(ge,Ae)|0)+Math.imul(he,Ze)|0,k=k+Math.imul(he,Ae)|0,_=_+Math.imul(ie,rt)|0,T=(T=T+Math.imul(ie,Ee)|0)+Math.imul(te,rt)|0,k=k+Math.imul(te,Ee)|0,_=_+Math.imul(fe,Qe)|0,T=(T=T+Math.imul(fe,Se)|0)+Math.imul(oe,Qe)|0,k=k+Math.imul(oe,Se)|0,_=_+Math.imul(ee,Xe)|0,T=(T=T+Math.imul(ee,Me)|0)+Math.imul(re,Xe)|0,k=k+Math.imul(re,Me)|0,_=_+Math.imul($,et)|0,T=(T=T+Math.imul($,ke)|0)+Math.imul(V,et)|0,k=k+Math.imul(V,ke)|0;var ft=(C+(_=_+Math.imul(j,Q)|0)|0)+((8191&(T=(T=T+Math.imul(j,X)|0)+Math.imul(D,Q)|0))<<13)|0;C=((k=k+Math.imul(D,X)|0)+(T>>>13)|0)+(ft>>>26)|0,ft&=67108863,_=Math.imul(Ve,Je),T=(T=Math.imul(Ve,be))+Math.imul(ve,Je)|0,k=Math.imul(ve,be),_=_+Math.imul(Ge,tt)|0,T=(T=T+Math.imul(Ge,Re)|0)+Math.imul(we,tt)|0,k=k+Math.imul(we,Re)|0,_=_+Math.imul(Ie,Ze)|0,T=(T=T+Math.imul(Ie,Ae)|0)+Math.imul(pe,Ze)|0,k=k+Math.imul(pe,Ae)|0,_=_+Math.imul(ge,rt)|0,T=(T=T+Math.imul(ge,Ee)|0)+Math.imul(he,rt)|0,k=k+Math.imul(he,Ee)|0,_=_+Math.imul(ie,Qe)|0,T=(T=T+Math.imul(ie,Se)|0)+Math.imul(te,Qe)|0,k=k+Math.imul(te,Se)|0,_=_+Math.imul(fe,Xe)|0,T=(T=T+Math.imul(fe,Me)|0)+Math.imul(oe,Xe)|0,k=k+Math.imul(oe,Me)|0,_=_+Math.imul(ee,et)|0,T=(T=T+Math.imul(ee,ke)|0)+Math.imul(re,et)|0,k=k+Math.imul(re,ke)|0;var gt=(C+(_=_+Math.imul($,Q)|0)|0)+((8191&(T=(T=T+Math.imul($,X)|0)+Math.imul(V,Q)|0))<<13)|0;C=((k=k+Math.imul(V,X)|0)+(T>>>13)|0)+(gt>>>26)|0,gt&=67108863,_=Math.imul(Ve,tt),T=(T=Math.imul(Ve,Re))+Math.imul(ve,tt)|0,k=Math.imul(ve,Re),_=_+Math.imul(Ge,Ze)|0,T=(T=T+Math.imul(Ge,Ae)|0)+Math.imul(we,Ze)|0,k=k+Math.imul(we,Ae)|0,_=_+Math.imul(Ie,rt)|0,T=(T=T+Math.imul(Ie,Ee)|0)+Math.imul(pe,rt)|0,k=k+Math.imul(pe,Ee)|0,_=_+Math.imul(ge,Qe)|0,T=(T=T+Math.imul(ge,Se)|0)+Math.imul(he,Qe)|0,k=k+Math.imul(he,Se)|0,_=_+Math.imul(ie,Xe)|0,T=(T=T+Math.imul(ie,Me)|0)+Math.imul(te,Xe)|0,k=k+Math.imul(te,Me)|0,_=_+Math.imul(fe,et)|0,T=(T=T+Math.imul(fe,ke)|0)+Math.imul(oe,et)|0,k=k+Math.imul(oe,ke)|0;var ht=(C+(_=_+Math.imul(ee,Q)|0)|0)+((8191&(T=(T=T+Math.imul(ee,X)|0)+Math.imul(re,Q)|0))<<13)|0;C=((k=k+Math.imul(re,X)|0)+(T>>>13)|0)+(ht>>>26)|0,ht&=67108863,_=Math.imul(Ve,Ze),T=(T=Math.imul(Ve,Ae))+Math.imul(ve,Ze)|0,k=Math.imul(ve,Ae),_=_+Math.imul(Ge,rt)|0,T=(T=T+Math.imul(Ge,Ee)|0)+Math.imul(we,rt)|0,k=k+Math.imul(we,Ee)|0,_=_+Math.imul(Ie,Qe)|0,T=(T=T+Math.imul(Ie,Se)|0)+Math.imul(pe,Qe)|0,k=k+Math.imul(pe,Se)|0,_=_+Math.imul(ge,Xe)|0,T=(T=T+Math.imul(ge,Me)|0)+Math.imul(he,Xe)|0,k=k+Math.imul(he,Me)|0,_=_+Math.imul(ie,et)|0,T=(T=T+Math.imul(ie,ke)|0)+Math.imul(te,et)|0,k=k+Math.imul(te,ke)|0;var yt=(C+(_=_+Math.imul(fe,Q)|0)|0)+((8191&(T=(T=T+Math.imul(fe,X)|0)+Math.imul(oe,Q)|0))<<13)|0;C=((k=k+Math.imul(oe,X)|0)+(T>>>13)|0)+(yt>>>26)|0,yt&=67108863,_=Math.imul(Ve,rt),T=(T=Math.imul(Ve,Ee))+Math.imul(ve,rt)|0,k=Math.imul(ve,Ee),_=_+Math.imul(Ge,Qe)|0,T=(T=T+Math.imul(Ge,Se)|0)+Math.imul(we,Qe)|0,k=k+Math.imul(we,Se)|0,_=_+Math.imul(Ie,Xe)|0,T=(T=T+Math.imul(Ie,Me)|0)+Math.imul(pe,Xe)|0,k=k+Math.imul(pe,Me)|0,_=_+Math.imul(ge,et)|0,T=(T=T+Math.imul(ge,ke)|0)+Math.imul(he,et)|0,k=k+Math.imul(he,ke)|0;var at=(C+(_=_+Math.imul(ie,Q)|0)|0)+((8191&(T=(T=T+Math.imul(ie,X)|0)+Math.imul(te,Q)|0))<<13)|0;C=((k=k+Math.imul(te,X)|0)+(T>>>13)|0)+(at>>>26)|0,at&=67108863,_=Math.imul(Ve,Qe),T=(T=Math.imul(Ve,Se))+Math.imul(ve,Qe)|0,k=Math.imul(ve,Se),_=_+Math.imul(Ge,Xe)|0,T=(T=T+Math.imul(Ge,Me)|0)+Math.imul(we,Xe)|0,k=k+Math.imul(we,Me)|0,_=_+Math.imul(Ie,et)|0,T=(T=T+Math.imul(Ie,ke)|0)+Math.imul(pe,et)|0,k=k+Math.imul(pe,ke)|0;var wt=(C+(_=_+Math.imul(ge,Q)|0)|0)+((8191&(T=(T=T+Math.imul(ge,X)|0)+Math.imul(he,Q)|0))<<13)|0;C=((k=k+Math.imul(he,X)|0)+(T>>>13)|0)+(wt>>>26)|0,wt&=67108863,_=Math.imul(Ve,Xe),T=(T=Math.imul(Ve,Me))+Math.imul(ve,Xe)|0,k=Math.imul(ve,Me),_=_+Math.imul(Ge,et)|0,T=(T=T+Math.imul(Ge,ke)|0)+Math.imul(we,et)|0,k=k+Math.imul(we,ke)|0;var ut=(C+(_=_+Math.imul(Ie,Q)|0)|0)+((8191&(T=(T=T+Math.imul(Ie,X)|0)+Math.imul(pe,Q)|0))<<13)|0;C=((k=k+Math.imul(pe,X)|0)+(T>>>13)|0)+(ut>>>26)|0,ut&=67108863,_=Math.imul(Ve,et),T=(T=Math.imul(Ve,ke))+Math.imul(ve,et)|0,k=Math.imul(ve,ke);var Nt=(C+(_=_+Math.imul(Ge,Q)|0)|0)+((8191&(T=(T=T+Math.imul(Ge,X)|0)+Math.imul(we,Q)|0))<<13)|0;C=((k=k+Math.imul(we,X)|0)+(T>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var Pt=(C+(_=Math.imul(Ve,Q))|0)+((8191&(T=(T=Math.imul(Ve,X))+Math.imul(ve,Q)|0))<<13)|0;return C=((k=Math.imul(ve,X))+(T>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,Y[0]=ne,Y[1]=ce,Y[2]=Ce,Y[3]=Pe,Y[4]=Ye,Y[5]=$e,Y[6]=nt,Y[7]=je,Y[8]=Te,Y[9]=st,Y[10]=ft,Y[11]=gt,Y[12]=ht,Y[13]=yt,Y[14]=at,Y[15]=wt,Y[16]=ut,Y[17]=Nt,Y[18]=Pt,C!==0&&(Y[19]=C,g.length++),g};function P(h,m,g){g.negative=m.negative^h.negative,g.length=h.length+m.length;for(var _=0,T=0,k=0;k<g.length-1;k++){var M=T;T=0;for(var B=67108863&_,Y=Math.min(k,m.length-1),C=Math.max(0,k-h.length+1);C<=Y;C++){var K=k-C,W=(0|h.words[K])*(0|m.words[C]),U=67108863&W;B=67108863&(U=U+B|0),T+=(M=(M=M+(W/67108864|0)|0)+(U>>>26)|0)>>>26,M&=67108863}g.words[k]=B,_=M,M=T}return _!==0?g.words[k]=_:g.length--,g._strip()}function N(h,m,g){return P(h,m,g)}Math.imul||(A=O),s.prototype.mulTo=function(h,m){var g=this.length+h.length;return this.length===10&&h.length===10?A(this,h,m):g<63?O(this,h,m):g<1024?P(this,h,m):N(this,h,m)},s.prototype.mul=function(h){var m=new s(null);return m.words=new Array(this.length+h.length),this.mulTo(h,m)},s.prototype.mulf=function(h){var m=new s(null);return m.words=new Array(this.length+h.length),N(this,h,m)},s.prototype.imul=function(h){return this.clone().mulTo(h,this)},s.prototype.imuln=function(h){var m=h<0;m&&(h=-h),u(typeof h=="number"),u(h<67108864);for(var g=0,_=0;_<this.length;_++){var T=(0|this.words[_])*h,k=(67108863&T)+(67108863&g);g>>=26,g+=T/67108864|0,g+=k>>>26,this.words[_]=67108863&k}return g!==0&&(this.words[_]=g,this.length++),m?this.ineg():this},s.prototype.muln=function(h){return this.clone().imuln(h)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(h){var m=function(k){for(var M=new Array(k.bitLength()),B=0;B<M.length;B++){var Y=B/26|0,C=B%26;M[B]=k.words[Y]>>>C&1}return M}(h);if(m.length===0)return new s(1);for(var g=this,_=0;_<m.length&&m[_]===0;_++,g=g.sqr());if(++_<m.length)for(var T=g.sqr();_<m.length;_++,T=T.sqr())m[_]!==0&&(g=g.mul(T));return g},s.prototype.iushln=function(h){u(typeof h=="number"&&h>=0);var m,g=h%26,_=(h-g)/26,T=67108863>>>26-g<<26-g;if(g!==0){var k=0;for(m=0;m<this.length;m++){var M=this.words[m]&T,B=(0|this.words[m])-M<<g;this.words[m]=B|k,k=M>>>26-g}k&&(this.words[m]=k,this.length++)}if(_!==0){for(m=this.length-1;m>=0;m--)this.words[m+_]=this.words[m];for(m=0;m<_;m++)this.words[m]=0;this.length+=_}return this._strip()},s.prototype.ishln=function(h){return u(this.negative===0),this.iushln(h)},s.prototype.iushrn=function(h,m,g){var _;u(typeof h=="number"&&h>=0),_=m?(m-m%26)/26:0;var T=h%26,k=Math.min((h-T)/26,this.length),M=67108863^67108863>>>T<<T,B=g;if(_-=k,_=Math.max(0,_),B){for(var Y=0;Y<k;Y++)B.words[Y]=this.words[Y];B.length=k}if(k!==0)if(this.length>k)for(this.length-=k,Y=0;Y<this.length;Y++)this.words[Y]=this.words[Y+k];else this.words[0]=0,this.length=1;var C=0;for(Y=this.length-1;Y>=0&&(C!==0||Y>=_);Y--){var K=0|this.words[Y];this.words[Y]=C<<26-T|K>>>T,C=K&M}return B&&C!==0&&(B.words[B.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(h,m,g){return u(this.negative===0),this.iushrn(h,m,g)},s.prototype.shln=function(h){return this.clone().ishln(h)},s.prototype.ushln=function(h){return this.clone().iushln(h)},s.prototype.shrn=function(h){return this.clone().ishrn(h)},s.prototype.ushrn=function(h){return this.clone().iushrn(h)},s.prototype.testn=function(h){u(typeof h=="number"&&h>=0);var m=h%26,g=(h-m)/26,_=1<<m;return!(this.length<=g)&&!!(this.words[g]&_)},s.prototype.imaskn=function(h){u(typeof h=="number"&&h>=0);var m=h%26,g=(h-m)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(m!==0&&g++,this.length=Math.min(g,this.length),m!==0){var _=67108863^67108863>>>m<<m;this.words[this.length-1]&=_}return this._strip()},s.prototype.maskn=function(h){return this.clone().imaskn(h)},s.prototype.iaddn=function(h){return u(typeof h=="number"),u(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(0|this.words[0])<=h?(this.words[0]=h-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},s.prototype._iaddn=function(h){this.words[0]+=h;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},s.prototype.isubn=function(h){if(u(typeof h=="number"),u(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},s.prototype.addn=function(h){return this.clone().iaddn(h)},s.prototype.subn=function(h){return this.clone().isubn(h)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(h,m,g){var _,T,k=h.length+g;this._expand(k);var M=0;for(_=0;_<h.length;_++){T=(0|this.words[_+g])+M;var B=(0|h.words[_])*m;M=((T-=67108863&B)>>26)-(B/67108864|0),this.words[_+g]=67108863&T}for(;_<this.length-g;_++)M=(T=(0|this.words[_+g])+M)>>26,this.words[_+g]=67108863&T;if(M===0)return this._strip();for(u(M===-1),M=0,_=0;_<this.length;_++)M=(T=-(0|this.words[_])+M)>>26,this.words[_]=67108863&T;return this.negative=1,this._strip()},s.prototype._wordDiv=function(h,m){var g=(this.length,h.length),_=this.clone(),T=h,k=0|T.words[T.length-1];(g=26-this._countBits(k))!==0&&(T=T.ushln(g),_.iushln(g),k=0|T.words[T.length-1]);var M,B=_.length-T.length;if(m!=="mod"){(M=new s(null)).length=B+1,M.words=new Array(M.length);for(var Y=0;Y<M.length;Y++)M.words[Y]=0}var C=_.clone()._ishlnsubmul(T,1,B);C.negative===0&&(_=C,M&&(M.words[B]=1));for(var K=B-1;K>=0;K--){var W=67108864*(0|_.words[T.length+K])+(0|_.words[T.length+K-1]);for(W=Math.min(W/k|0,67108863),_._ishlnsubmul(T,W,K);_.negative!==0;)W--,_.negative=0,_._ishlnsubmul(T,1,K),_.isZero()||(_.negative^=1);M&&(M.words[K]=W)}return M&&M._strip(),_._strip(),m!=="div"&&g!==0&&_.iushrn(g),{div:M||null,mod:_}},s.prototype.divmod=function(h,m,g){return u(!h.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:this.negative!==0&&h.negative===0?(k=this.neg().divmod(h,m),m!=="mod"&&(_=k.div.neg()),m!=="div"&&(T=k.mod.neg(),g&&T.negative!==0&&T.iadd(h)),{div:_,mod:T}):this.negative===0&&h.negative!==0?(k=this.divmod(h.neg(),m),m!=="mod"&&(_=k.div.neg()),{div:_,mod:k.mod}):this.negative&h.negative?(k=this.neg().divmod(h.neg(),m),m!=="div"&&(T=k.mod.neg(),g&&T.negative!==0&&T.isub(h)),{div:k.div,mod:T}):h.length>this.length||this.cmp(h)<0?{div:new s(0),mod:this}:h.length===1?m==="div"?{div:this.divn(h.words[0]),mod:null}:m==="mod"?{div:null,mod:new s(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new s(this.modrn(h.words[0]))}:this._wordDiv(h,m);var _,T,k},s.prototype.div=function(h){return this.divmod(h,"div",!1).div},s.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},s.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},s.prototype.divRound=function(h){var m=this.divmod(h);if(m.mod.isZero())return m.div;var g=m.div.negative!==0?m.mod.isub(h):m.mod,_=h.ushrn(1),T=h.andln(1),k=g.cmp(_);return k<0||T===1&&k===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},s.prototype.modrn=function(h){var m=h<0;m&&(h=-h),u(h<=67108863);for(var g=(1<<26)%h,_=0,T=this.length-1;T>=0;T--)_=(g*_+(0|this.words[T]))%h;return m?-_:_},s.prototype.modn=function(h){return this.modrn(h)},s.prototype.idivn=function(h){var m=h<0;m&&(h=-h),u(h<=67108863);for(var g=0,_=this.length-1;_>=0;_--){var T=(0|this.words[_])+67108864*g;this.words[_]=T/h|0,g=T%h}return this._strip(),m?this.ineg():this},s.prototype.divn=function(h){return this.clone().idivn(h)},s.prototype.egcd=function(h){u(h.negative===0),u(!h.isZero());var m=this,g=h.clone();m=m.negative!==0?m.umod(h):m.clone();for(var _=new s(1),T=new s(0),k=new s(0),M=new s(1),B=0;m.isEven()&&g.isEven();)m.iushrn(1),g.iushrn(1),++B;for(var Y=g.clone(),C=m.clone();!m.isZero();){for(var K=0,W=1;!(m.words[0]&W)&&K<26;++K,W<<=1);if(K>0)for(m.iushrn(K);K-- >0;)(_.isOdd()||T.isOdd())&&(_.iadd(Y),T.isub(C)),_.iushrn(1),T.iushrn(1);for(var U=0,q=1;!(g.words[0]&q)&&U<26;++U,q<<=1);if(U>0)for(g.iushrn(U);U-- >0;)(k.isOdd()||M.isOdd())&&(k.iadd(Y),M.isub(C)),k.iushrn(1),M.iushrn(1);m.cmp(g)>=0?(m.isub(g),_.isub(k),T.isub(M)):(g.isub(m),k.isub(_),M.isub(T))}return{a:k,b:M,gcd:g.iushln(B)}},s.prototype._invmp=function(h){u(h.negative===0),u(!h.isZero());var m=this,g=h.clone();m=m.negative!==0?m.umod(h):m.clone();for(var _,T=new s(1),k=new s(0),M=g.clone();m.cmpn(1)>0&&g.cmpn(1)>0;){for(var B=0,Y=1;!(m.words[0]&Y)&&B<26;++B,Y<<=1);if(B>0)for(m.iushrn(B);B-- >0;)T.isOdd()&&T.iadd(M),T.iushrn(1);for(var C=0,K=1;!(g.words[0]&K)&&C<26;++C,K<<=1);if(C>0)for(g.iushrn(C);C-- >0;)k.isOdd()&&k.iadd(M),k.iushrn(1);m.cmp(g)>=0?(m.isub(g),T.isub(k)):(g.isub(m),k.isub(T))}return(_=m.cmpn(1)===0?T:k).cmpn(0)<0&&_.iadd(h),_},s.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var m=this.clone(),g=h.clone();m.negative=0,g.negative=0;for(var _=0;m.isEven()&&g.isEven();_++)m.iushrn(1),g.iushrn(1);for(;;){for(;m.isEven();)m.iushrn(1);for(;g.isEven();)g.iushrn(1);var T=m.cmp(g);if(T<0){var k=m;m=g,g=k}else if(T===0||g.cmpn(1)===0)break;m.isub(g)}return g.iushln(_)},s.prototype.invm=function(h){return this.egcd(h).a.umod(h)},s.prototype.isEven=function(){return(1&this.words[0])==0},s.prototype.isOdd=function(){return(1&this.words[0])==1},s.prototype.andln=function(h){return this.words[0]&h},s.prototype.bincn=function(h){u(typeof h=="number");var m=h%26,g=(h-m)/26,_=1<<m;if(this.length<=g)return this._expand(g+1),this.words[g]|=_,this;for(var T=_,k=g;T!==0&&k<this.length;k++){var M=0|this.words[k];T=(M+=T)>>>26,M&=67108863,this.words[k]=M}return T!==0&&(this.words[k]=T,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(h){var m,g=h<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;if(this._strip(),this.length>1)m=1;else{g&&(h=-h),u(h<=67108863,"Number is too big");var _=0|this.words[0];m=_===h?0:_<h?-1:1}return this.negative!==0?0|-m:m},s.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var m=this.ucmp(h);return this.negative!==0?0|-m:m},s.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var m=0,g=this.length-1;g>=0;g--){var _=0|this.words[g],T=0|h.words[g];if(_!==T){_<T?m=-1:_>T&&(m=1);break}}return m},s.prototype.gtn=function(h){return this.cmpn(h)===1},s.prototype.gt=function(h){return this.cmp(h)===1},s.prototype.gten=function(h){return this.cmpn(h)>=0},s.prototype.gte=function(h){return this.cmp(h)>=0},s.prototype.ltn=function(h){return this.cmpn(h)===-1},s.prototype.lt=function(h){return this.cmp(h)===-1},s.prototype.lten=function(h){return this.cmpn(h)<=0},s.prototype.lte=function(h){return this.cmp(h)<=0},s.prototype.eqn=function(h){return this.cmpn(h)===0},s.prototype.eq=function(h){return this.cmp(h)===0},s.red=function(h){return new a(h)},s.prototype.toRed=function(h){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},s.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(h){return this.red=h,this},s.prototype.forceRed=function(h){return u(!this.red,"Already a number in reduction context"),this._forceRed(h)},s.prototype.redAdd=function(h){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},s.prototype.redIAdd=function(h){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},s.prototype.redSub=function(h){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},s.prototype.redISub=function(h){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},s.prototype.redShl=function(h){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},s.prototype.redMul=function(h){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},s.prototype.redIMul=function(h){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},s.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(h){return u(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var L={k256:null,p224:null,p192:null,p25519:null};function H(h,m){this.name=h,this.p=new s(m,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function J(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function G(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function z(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function a(h){if(typeof h=="string"){var m=s._prime(h);this.m=m.p,this.prime=m}else u(h.gtn(1),"modulus must be greater than 1"),this.m=h,this.prime=null}function w(h){a.call(this,h),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}H.prototype._tmp=function(){var h=new s(null);return h.words=new Array(Math.ceil(this.n/13)),h},H.prototype.ireduce=function(h){var m,g=h;do this.split(g,this.tmp),m=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength();while(m>this.n);var _=m<this.n?-1:g.ucmp(this.p);return _===0?(g.words[0]=0,g.length=1):_>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},H.prototype.split=function(h,m){h.iushrn(this.n,0,m)},H.prototype.imulK=function(h){return h.imul(this.k)},c(J,H),J.prototype.split=function(h,m){for(var g=Math.min(h.length,9),_=0;_<g;_++)m.words[_]=h.words[_];if(m.length=g,h.length<=9)return h.words[0]=0,void(h.length=1);var T=h.words[9];for(m.words[m.length++]=4194303&T,_=10;_<h.length;_++){var k=0|h.words[_];h.words[_-10]=(4194303&k)<<4|T>>>22,T=k}T>>>=22,h.words[_-10]=T,T===0&&h.length>10?h.length-=10:h.length-=9},J.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var m=0,g=0;g<h.length;g++){var _=0|h.words[g];m+=977*_,h.words[g]=67108863&m,m=64*_+(m/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h},c(G,H),c(z,H),c(S,H),S.prototype.imulK=function(h){for(var m=0,g=0;g<h.length;g++){var _=19*(0|h.words[g])+m,T=67108863&_;_>>>=26,h.words[g]=T,m=_}return m!==0&&(h.words[h.length++]=m),h},s._prime=function(h){if(L[h])return L[h];var m;if(h==="k256")m=new J;else if(h==="p224")m=new G;else if(h==="p192")m=new z;else{if(h!=="p25519")throw new Error("Unknown prime "+h);m=new S}return L[h]=m,m},a.prototype._verify1=function(h){u(h.negative===0,"red works only with positives"),u(h.red,"red works only with red numbers")},a.prototype._verify2=function(h,m){u((h.negative|m.negative)==0,"red works only with positives"),u(h.red&&h.red===m.red,"red works only with red numbers")},a.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(y(h,h.umod(this.m)._forceRed(this)),h)},a.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},a.prototype.add=function(h,m){this._verify2(h,m);var g=h.add(m);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},a.prototype.iadd=function(h,m){this._verify2(h,m);var g=h.iadd(m);return g.cmp(this.m)>=0&&g.isub(this.m),g},a.prototype.sub=function(h,m){this._verify2(h,m);var g=h.sub(m);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},a.prototype.isub=function(h,m){this._verify2(h,m);var g=h.isub(m);return g.cmpn(0)<0&&g.iadd(this.m),g},a.prototype.shl=function(h,m){return this._verify1(h),this.imod(h.ushln(m))},a.prototype.imul=function(h,m){return this._verify2(h,m),this.imod(h.imul(m))},a.prototype.mul=function(h,m){return this._verify2(h,m),this.imod(h.mul(m))},a.prototype.isqr=function(h){return this.imul(h,h.clone())},a.prototype.sqr=function(h){return this.mul(h,h)},a.prototype.sqrt=function(h){if(h.isZero())return h.clone();var m=this.m.andln(3);if(u(m%2==1),m===3){var g=this.m.add(new s(1)).iushrn(2);return this.pow(h,g)}for(var _=this.m.subn(1),T=0;!_.isZero()&&_.andln(1)===0;)T++,_.iushrn(1);u(!_.isZero());var k=new s(1).toRed(this),M=k.redNeg(),B=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new s(2*Y*Y).toRed(this);this.pow(Y,B).cmp(M)!==0;)Y.redIAdd(M);for(var C=this.pow(Y,_),K=this.pow(h,_.addn(1).iushrn(1)),W=this.pow(h,_),U=T;W.cmp(k)!==0;){for(var q=W,j=0;q.cmp(k)!==0;j++)q=q.redSqr();u(j<U);var D=this.pow(C,new s(1).iushln(U-j-1));K=K.redMul(D),C=D.redSqr(),W=W.redMul(C),U=j}return K},a.prototype.invm=function(h){var m=h._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},a.prototype.pow=function(h,m){if(m.isZero())return new s(1).toRed(this);if(m.cmpn(1)===0)return h.clone();var g=new Array(16);g[0]=new s(1).toRed(this),g[1]=h;for(var _=2;_<g.length;_++)g[_]=this.mul(g[_-1],h);var T=g[0],k=0,M=0,B=m.bitLength()%26;for(B===0&&(B=26),_=m.length-1;_>=0;_--){for(var Y=m.words[_],C=B-1;C>=0;C--){var K=Y>>C&1;T!==g[0]&&(T=this.sqr(T)),K!==0||k!==0?(k<<=1,k|=K,(++M===4||_===0&&C===0)&&(T=this.mul(T,g[k]),M=0,k=0)):M=0}B=26}return T},a.prototype.convertTo=function(h){var m=h.umod(this.m);return m===h?m.clone():m},a.prototype.convertFrom=function(h){var m=h.clone();return m.red=null,m},s.mont=function(h){return new w(h)},c(w,a),w.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},w.prototype.convertFrom=function(h){var m=this.imod(h.mul(this.rinv));return m.red=null,m},w.prototype.imul=function(h,m){if(h.isZero()||m.isZero())return h.words[0]=0,h.length=1,h;var g=h.imul(m),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=g.isub(_).iushrn(this.shift),k=T;return T.cmp(this.m)>=0?k=T.isub(this.m):T.cmpn(0)<0&&(k=T.iadd(this.m)),k._forceRed(this)},w.prototype.mul=function(h,m){if(h.isZero()||m.isZero())return new s(0)._forceRed(this);var g=h.mul(m),_=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=g.isub(_).iushrn(this.shift),k=T;return T.cmp(this.m)>=0?k=T.isub(this.m):T.cmpn(0)<0&&(k=T.iadd(this.m)),k._forceRed(this)},w.prototype.invm=function(h){return this.imod(h._invmp(this.m).mul(this.r2))._forceRed(this)}})(n,this)}).call(this,o(25)(i))},function(i,e){},function(i,e,o){var n=o(3),f=o(127),p=o(13).Buffer,u=new Array(16);function c(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(y,x){return y<<x|y>>>32-x}function l(y,x,E,R,I,O,A){return s(y+(x&E|~x&R)+I+O|0,A)+x|0}function d(y,x,E,R,I,O,A){return s(y+(x&R|E&~R)+I+O|0,A)+x|0}function b(y,x,E,R,I,O,A){return s(y+(x^E^R)+I+O|0,A)+x|0}function v(y,x,E,R,I,O,A){return s(y+(E^(x|~R))+I+O|0,A)+x|0}n(c,f),c.prototype._update=function(){for(var y=u,x=0;x<16;++x)y[x]=this._block.readInt32LE(4*x);var E=this._a,R=this._b,I=this._c,O=this._d;E=l(E,R,I,O,y[0],3614090360,7),O=l(O,E,R,I,y[1],3905402710,12),I=l(I,O,E,R,y[2],606105819,17),R=l(R,I,O,E,y[3],3250441966,22),E=l(E,R,I,O,y[4],4118548399,7),O=l(O,E,R,I,y[5],1200080426,12),I=l(I,O,E,R,y[6],2821735955,17),R=l(R,I,O,E,y[7],4249261313,22),E=l(E,R,I,O,y[8],1770035416,7),O=l(O,E,R,I,y[9],2336552879,12),I=l(I,O,E,R,y[10],4294925233,17),R=l(R,I,O,E,y[11],2304563134,22),E=l(E,R,I,O,y[12],1804603682,7),O=l(O,E,R,I,y[13],4254626195,12),I=l(I,O,E,R,y[14],2792965006,17),E=d(E,R=l(R,I,O,E,y[15],1236535329,22),I,O,y[1],4129170786,5),O=d(O,E,R,I,y[6],3225465664,9),I=d(I,O,E,R,y[11],643717713,14),R=d(R,I,O,E,y[0],3921069994,20),E=d(E,R,I,O,y[5],3593408605,5),O=d(O,E,R,I,y[10],38016083,9),I=d(I,O,E,R,y[15],3634488961,14),R=d(R,I,O,E,y[4],3889429448,20),E=d(E,R,I,O,y[9],568446438,5),O=d(O,E,R,I,y[14],3275163606,9),I=d(I,O,E,R,y[3],4107603335,14),R=d(R,I,O,E,y[8],1163531501,20),E=d(E,R,I,O,y[13],2850285829,5),O=d(O,E,R,I,y[2],4243563512,9),I=d(I,O,E,R,y[7],1735328473,14),E=b(E,R=d(R,I,O,E,y[12],2368359562,20),I,O,y[5],4294588738,4),O=b(O,E,R,I,y[8],2272392833,11),I=b(I,O,E,R,y[11],1839030562,16),R=b(R,I,O,E,y[14],4259657740,23),E=b(E,R,I,O,y[1],2763975236,4),O=b(O,E,R,I,y[4],1272893353,11),I=b(I,O,E,R,y[7],4139469664,16),R=b(R,I,O,E,y[10],3200236656,23),E=b(E,R,I,O,y[13],681279174,4),O=b(O,E,R,I,y[0],3936430074,11),I=b(I,O,E,R,y[3],3572445317,16),R=b(R,I,O,E,y[6],76029189,23),E=b(E,R,I,O,y[9],3654602809,4),O=b(O,E,R,I,y[12],3873151461,11),I=b(I,O,E,R,y[15],530742520,16),E=v(E,R=b(R,I,O,E,y[2],3299628645,23),I,O,y[0],4096336452,6),O=v(O,E,R,I,y[7],1126891415,10),I=v(I,O,E,R,y[14],2878612391,15),R=v(R,I,O,E,y[5],4237533241,21),E=v(E,R,I,O,y[12],1700485571,6),O=v(O,E,R,I,y[3],2399980690,10),I=v(I,O,E,R,y[10],4293915773,15),R=v(R,I,O,E,y[1],2240044497,21),E=v(E,R,I,O,y[8],1873313359,6),O=v(O,E,R,I,y[15],4264355552,10),I=v(I,O,E,R,y[6],2734768916,15),R=v(R,I,O,E,y[13],1309151649,21),E=v(E,R,I,O,y[4],4149444226,6),O=v(O,E,R,I,y[11],3174756917,10),I=v(I,O,E,R,y[2],718787259,15),R=v(R,I,O,E,y[9],3951481745,21),this._a=this._a+E|0,this._b=this._b+R|0,this._c=this._c+I|0,this._d=this._d+O|0},c.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var y=p.allocUnsafe(16);return y.writeInt32LE(this._a,0),y.writeInt32LE(this._b,4),y.writeInt32LE(this._c,8),y.writeInt32LE(this._d,12),y},i.exports=c},function(i,e,o){(e=i.exports=o(128)).Stream=e,e.Readable=e,e.Writable=o(132),e.Duplex=o(30),e.Transform=o(133),e.PassThrough=o(278),e.finished=o(62),e.pipeline=o(279)},function(i,e){},function(i,e,o){function n(l,d){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(l);d&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(l,y).enumerable})),b.push.apply(b,v)}return b}function f(l,d,b){return d in l?Object.defineProperty(l,d,{value:b,enumerable:!0,configurable:!0,writable:!0}):l[d]=b,l}function p(l,d){for(var b=0;b<d.length;b++){var v=d[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(l,v.key,v)}}var u=o(2).Buffer,c=o(275).inspect,s=c&&c.custom||"inspect";i.exports=function(){function l(){(function(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}var d,b;return d=l,(b=[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,x=""+y.data;y=y.next;)x+=v+y.data;return x}},{key:"concat",value:function(v){if(this.length===0)return u.alloc(0);for(var y,x,E,R=u.allocUnsafe(v>>>0),I=this.head,O=0;I;)y=I.data,x=R,E=O,u.prototype.copy.call(y,x,E),O+=I.data.length,I=I.next;return R}},{key:"consume",value:function(v,y){var x;return v<this.head.data.length?(x=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):x=v===this.head.data.length?this.shift():y?this._getString(v):this._getBuffer(v),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,x=1,E=y.data;for(v-=E.length;y=y.next;){var R=y.data,I=v>R.length?R.length:v;if(I===R.length?E+=R:E+=R.slice(0,v),(v-=I)==0){I===R.length?(++x,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=R.slice(I));break}++x}return this.length-=x,E}},{key:"_getBuffer",value:function(v){var y=u.allocUnsafe(v),x=this.head,E=1;for(x.data.copy(y),v-=x.data.length;x=x.next;){var R=x.data,I=v>R.length?R.length:v;if(R.copy(y,y.length-v,0,I),(v-=I)==0){I===R.length?(++E,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=R.slice(I));break}++E}return this.length-=E,y}},{key:s,value:function(v,y){return c(this,function(x){for(var E=1;E<arguments.length;E++){var R=arguments[E]!=null?arguments[E]:{};E%2?n(Object(R),!0).forEach(function(I){f(x,I,R[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(R)):n(Object(R)).forEach(function(I){Object.defineProperty(x,I,Object.getOwnPropertyDescriptor(R,I))})}return x}({},y,{depth:0,customInspect:!1}))}}])&&p(d.prototype,b),l}()},function(i,e){},function(i,e,o){(function(n){var f;function p(A,P,N){return P in A?Object.defineProperty(A,P,{value:N,enumerable:!0,configurable:!0,writable:!0}):A[P]=N,A}var u=o(62),c=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),d=Symbol("ended"),b=Symbol("lastPromise"),v=Symbol("handlePromise"),y=Symbol("stream");function x(A,P){return{value:A,done:P}}function E(A){var P=A[c];if(P!==null){var N=A[y].read();N!==null&&(A[b]=null,A[c]=null,A[s]=null,P(x(N,!1)))}}function R(A){n.nextTick(E,A)}var I=Object.getPrototypeOf(function(){}),O=Object.setPrototypeOf((p(f={get stream(){return this[y]},next:function(){var A=this,P=this[l];if(P!==null)return Promise.reject(P);if(this[d])return Promise.resolve(x(void 0,!0));if(this[y].destroyed)return new Promise(function(J,G){n.nextTick(function(){A[l]?G(A[l]):J(x(void 0,!0))})});var N,L=this[b];if(L)N=new Promise(function(J,G){return function(z,S){J.then(function(){G[d]?z(x(void 0,!0)):G[v](z,S)},S)}}(L,this));else{var H=this[y].read();if(H!==null)return Promise.resolve(x(H,!1));N=new Promise(this[v])}return this[b]=N,N}},Symbol.asyncIterator,function(){return this}),p(f,"return",function(){var A=this;return new Promise(function(P,N){A[y].destroy(null,function(L){L?N(L):P(x(void 0,!0))})})}),f),I);i.exports=function(A){var P,N=Object.create(O,(p(P={},y,{value:A,writable:!0}),p(P,c,{value:null,writable:!0}),p(P,s,{value:null,writable:!0}),p(P,l,{value:null,writable:!0}),p(P,d,{value:A._readableState.endEmitted,writable:!0}),p(P,v,{value:function(L,H){var J=N[y].read();J?(N[b]=null,N[c]=null,N[s]=null,L(x(J,!1))):(N[c]=L,N[s]=H)},writable:!0}),P));return N[b]=null,u(A,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var H=N[s];return H!==null&&(N[b]=null,N[c]=null,N[s]=null,H(L)),void(N[l]=L)}var J=N[c];J!==null&&(N[b]=null,N[c]=null,N[s]=null,J(x(void 0,!0))),N[d]=!0}),A.on("readable",R.bind(null,N)),N}}).call(this,o(5))},function(i,e){i.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(i,e,o){i.exports=f;var n=o(133);function f(p){if(!(this instanceof f))return new f(p);n.call(this,p)}o(3)(f,n),f.prototype._transform=function(p,u,c){c(null,p)}},function(i,e,o){var n,f=o(29).codes,p=f.ERR_MISSING_ARGS,u=f.ERR_STREAM_DESTROYED;function c(v){if(v)throw v}function s(v,y,x,E){E=function(O){var A=!1;return function(){A||(A=!0,O.apply(void 0,arguments))}}(E);var R=!1;v.on("close",function(){R=!0}),n===void 0&&(n=o(62)),n(v,{readable:y,writable:x},function(O){if(O)return E(O);R=!0,E()});var I=!1;return function(O){if(!R&&!I)return I=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(v)?v.abort():typeof v.destroy=="function"?v.destroy():void E(O||new u("pipe"))}}function l(v){v()}function d(v,y){return v.pipe(y)}function b(v){return v.length?typeof v[v.length-1]!="function"?c:v.pop():c}i.exports=function(){for(var v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];var E,R=b(y);if(Array.isArray(y[0])&&(y=y[0]),y.length<2)throw new p("streams");var I=y.map(function(O,A){var P=A<y.length-1;return s(O,P,A>0,function(N){E||(E=N),N&&I.forEach(l),P||(I.forEach(l),R(E))})});return y.reduce(d)}},function(i,e,o){var n=o(2).Buffer,f=o(3),p=o(127),u=new Array(16),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],b=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];function y(){p.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function x(P,N){return P<<N|P>>>32-N}function E(P,N,L,H,J,G,z,S){return x(P+(N^L^H)+G+z|0,S)+J|0}function R(P,N,L,H,J,G,z,S){return x(P+(N&L|~N&H)+G+z|0,S)+J|0}function I(P,N,L,H,J,G,z,S){return x(P+((N|~L)^H)+G+z|0,S)+J|0}function O(P,N,L,H,J,G,z,S){return x(P+(N&H|L&~H)+G+z|0,S)+J|0}function A(P,N,L,H,J,G,z,S){return x(P+(N^(L|~H))+G+z|0,S)+J|0}f(y,p),y.prototype._update=function(){for(var P=u,N=0;N<16;++N)P[N]=this._block.readInt32LE(4*N);for(var L=0|this._a,H=0|this._b,J=0|this._c,G=0|this._d,z=0|this._e,S=0|this._a,a=0|this._b,w=0|this._c,h=0|this._d,m=0|this._e,g=0;g<80;g+=1){var _,T;g<16?(_=E(L,H,J,G,z,P[c[g]],b[0],l[g]),T=A(S,a,w,h,m,P[s[g]],v[0],d[g])):g<32?(_=R(L,H,J,G,z,P[c[g]],b[1],l[g]),T=O(S,a,w,h,m,P[s[g]],v[1],d[g])):g<48?(_=I(L,H,J,G,z,P[c[g]],b[2],l[g]),T=I(S,a,w,h,m,P[s[g]],v[2],d[g])):g<64?(_=O(L,H,J,G,z,P[c[g]],b[3],l[g]),T=R(S,a,w,h,m,P[s[g]],v[3],d[g])):(_=A(L,H,J,G,z,P[c[g]],b[4],l[g]),T=E(S,a,w,h,m,P[s[g]],v[4],d[g])),L=z,z=G,G=x(J,10),J=H,H=_,S=m,m=h,h=x(w,10),w=a,a=T}var k=this._b+J+h|0;this._b=this._c+G+m|0,this._c=this._d+z+S|0,this._d=this._e+L+a|0,this._e=this._a+H+w|0,this._a=k},y.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var P=n.alloc?n.alloc(20):new n(20);return P.writeInt32LE(this._a,0),P.writeInt32LE(this._b,4),P.writeInt32LE(this._c,8),P.writeInt32LE(this._d,12),P.writeInt32LE(this._e,16),P},i.exports=y},function(i,e,o){(e=i.exports=function(n){n=n.toLowerCase();var f=e[n];if(!f)throw new Error(n+" is not supported (we accept pull requests)");return new f}).sha=o(282),e.sha1=o(283),e.sha224=o(284),e.sha256=o(134),e.sha384=o(285),e.sha512=o(135)},function(i,e,o){var n=o(3),f=o(31),p=o(13).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);function s(){this.init(),this._w=c,f.call(this,64,56)}function l(b){return b<<30|b>>>2}function d(b,v,y,x){return b===0?v&y|~v&x:b===2?v&y|v&x|y&x:v^y^x}n(s,f),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(b){for(var v,y=this._w,x=0|this._a,E=0|this._b,R=0|this._c,I=0|this._d,O=0|this._e,A=0;A<16;++A)y[A]=b.readInt32BE(4*A);for(;A<80;++A)y[A]=y[A-3]^y[A-8]^y[A-14]^y[A-16];for(var P=0;P<80;++P){var N=~~(P/20),L=0|((v=x)<<5|v>>>27)+d(N,E,R,I)+O+y[P]+u[N];O=I,I=R,R=l(E),E=x,x=L}this._a=x+this._a|0,this._b=E+this._b|0,this._c=R+this._c|0,this._d=I+this._d|0,this._e=O+this._e|0},s.prototype._hash=function(){var b=p.allocUnsafe(20);return b.writeInt32BE(0|this._a,0),b.writeInt32BE(0|this._b,4),b.writeInt32BE(0|this._c,8),b.writeInt32BE(0|this._d,12),b.writeInt32BE(0|this._e,16),b},i.exports=s},function(i,e,o){var n=o(3),f=o(31),p=o(13).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);function s(){this.init(),this._w=c,f.call(this,64,56)}function l(v){return v<<5|v>>>27}function d(v){return v<<30|v>>>2}function b(v,y,x,E){return v===0?y&x|~y&E:v===2?y&x|y&E|x&E:y^x^E}n(s,f),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(v){for(var y,x=this._w,E=0|this._a,R=0|this._b,I=0|this._c,O=0|this._d,A=0|this._e,P=0;P<16;++P)x[P]=v.readInt32BE(4*P);for(;P<80;++P)x[P]=(y=x[P-3]^x[P-8]^x[P-14]^x[P-16])<<1|y>>>31;for(var N=0;N<80;++N){var L=~~(N/20),H=l(E)+b(L,R,I,O)+A+x[N]+u[L]|0;A=O,O=I,I=d(R),R=E,E=H}this._a=E+this._a|0,this._b=R+this._b|0,this._c=I+this._c|0,this._d=O+this._d|0,this._e=A+this._e|0},s.prototype._hash=function(){var v=p.allocUnsafe(20);return v.writeInt32BE(0|this._a,0),v.writeInt32BE(0|this._b,4),v.writeInt32BE(0|this._c,8),v.writeInt32BE(0|this._d,12),v.writeInt32BE(0|this._e,16),v},i.exports=s},function(i,e,o){var n=o(3),f=o(134),p=o(31),u=o(13).Buffer,c=new Array(64);function s(){this.init(),this._w=c,p.call(this,64,56)}n(s,f),s.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},s.prototype._hash=function(){var l=u.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},i.exports=s},function(i,e,o){var n=o(3),f=o(135),p=o(31),u=o(13).Buffer,c=new Array(160);function s(){this.init(),this._w=c,p.call(this,128,112)}n(s,f),s.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},s.prototype._hash=function(){var l=u.allocUnsafe(48);function d(b,v,y){l.writeInt32BE(b,y),l.writeInt32BE(v,y+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),l},i.exports=s},function(i,e,o){var n=o(13).Buffer,f=o(287).Transform,p=o(20).StringDecoder;function u(c){f.call(this),this.hashMode=typeof c=="string",this.hashMode?this[c]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}o(3)(u,f),u.prototype.update=function(c,s,l){typeof c=="string"&&(c=n.from(c,s));var d=this._update(c);return this.hashMode?this:(l&&(d=this._toString(d,l)),d)},u.prototype.setAutoPadding=function(){},u.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},u.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},u.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},u.prototype._transform=function(c,s,l){var d;try{this.hashMode?this._update(c):this.push(this._update(c))}catch(b){d=b}finally{l(d)}},u.prototype._flush=function(c){var s;try{this.push(this.__final())}catch(l){s=l}c(s)},u.prototype._finalOrDigest=function(c){var s=this.__final()||n.alloc(0);return c&&(s=this._toString(s,c,!0)),s},u.prototype._toString=function(c,s,l){if(this._decoder||(this._decoder=new p(s),this._encoding=s),this._encoding!==s)throw new Error("can't switch encodings");var d=this._decoder.write(c);return l&&(d+=this._decoder.end()),d},i.exports=u},function(i,e,o){i.exports=f;var n=o(12).EventEmitter;function f(){n.call(this)}o(3)(f,n),f.Readable=o(34),f.Writable=o(288),f.Duplex=o(289),f.Transform=o(290),f.PassThrough=o(291),f.Stream=f,f.prototype.pipe=function(p,u){var c=this;function s(E){p.writable&&p.write(E)===!1&&c.pause&&c.pause()}function l(){c.readable&&c.resume&&c.resume()}c.on("data",s),p.on("drain",l),p._isStdio||u&&u.end===!1||(c.on("end",b),c.on("close",v));var d=!1;function b(){d||(d=!0,p.end())}function v(){d||(d=!0,typeof p.destroy=="function"&&p.destroy())}function y(E){if(x(),n.listenerCount(this,"error")===0)throw E}function x(){c.removeListener("data",s),p.removeListener("drain",l),c.removeListener("end",b),c.removeListener("close",v),c.removeListener("error",y),p.removeListener("error",y),c.removeListener("end",x),c.removeListener("close",x),p.removeListener("close",x)}return c.on("error",y),p.on("error",y),c.on("end",x),c.on("close",x),p.on("close",x),p.emit("pipe",c),p}},function(i,e,o){i.exports=o(53)},function(i,e,o){i.exports=o(19)},function(i,e,o){i.exports=o(34).Transform},function(i,e,o){i.exports=o(34).PassThrough},function(i,e,o){var n=o(2),f=n.Buffer;function p(c,s){for(var l in c)s[l]=c[l]}function u(c,s,l){return f(c,s,l)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?i.exports=n:(p(n,e),e.Buffer=u),p(f,u),u.from=function(c,s,l){if(typeof c=="number")throw new TypeError("Argument must not be a number");return f(c,s,l)},u.alloc=function(c,s,l){if(typeof c!="number")throw new TypeError("Argument must be a number");var d=f(c);return s!==void 0?typeof l=="string"?d.fill(s,l):d.fill(s):d.fill(0),d},u.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return f(c)},u.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(c)}},function(i,e,o){var n=o(136);i.exports=function(f){return typeof f!="string"?f:n(f)?f.slice(2):f}},function(i,e,o){const n=o(137),f=o(295);function p(u,c){return new Promise(s=>{const l=setTimeout(s,u);l.unref&&c&&l.unref()})}i.exports=class extends f{constructor(u={}){if(!u.provider)throw new Error("PollingBlockTracker - no provider specified.");const c=u.pollingInterval||2e4,s=u.retryTimeout||c/10,l=u.keepEventLoopActive===void 0||u.keepEventLoopActive,d=u.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:c},u)),this._provider=u.provider,this._pollingInterval=c,this._retryTimeout=s,this._keepEventLoopActive=l,this._setSkipCacheFlag=d}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch(u=>this.emit("error",u))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await p(this._pollingInterval,!this._keepEventLoopActive)}catch(u){const c=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
`+u.stack);try{this.emit("error",c)}catch{console.error(c)}await p(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const u=await this._fetchLatestBlock();this._newPotentialLatest(u)}async _fetchLatestBlock(){const u={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(u.skipCache=!0);const c=await n(s=>this._provider.sendAsync(u,s))();if(c.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
`+c.error);return c.result}}},function(i,e,o){o(138),o(137);const n=o(297),f=(c,s)=>c+s,p=["sync","latest"];function u(c){return Number.parseInt(c,16)}i.exports=class extends n{constructor(c={}){super(),this._blockResetDuration=c.blockResetDuration||2e4,this._blockResetTimeout,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()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(c=>this.once("latest",c))}removeAllListeners(c){c?super.removeAllListeners(c):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(c,s){p.includes(c)&&this._maybeStart()}_onRemoveListener(c,s){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return p.map(c=>this.listenerCount(c)).reduce(f)}_newPotentialLatest(c){const s=this._currentBlock;s&&u(c)<=u(s)||this._setCurrentBlock(c)}_setCurrentBlock(c){const s=this._currentBlock;this._currentBlock=c,this.emit("latest",c),this.emit("sync",{oldBlock:s,newBlock:c})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},function(i,e){i.exports=function(o){var n=(o=o||{}).max||Number.MAX_SAFE_INTEGER,f=o.start!==void 0?o.start:Math.floor(Math.random()*n);return function(){return f%=n,f++}}},function(i,e,o){const n=o(21),f=o(12);var p=typeof Reflect=="object"?Reflect:null,u=p&&typeof p.apply=="function"?p.apply:function(d,b,v){return Function.prototype.apply.call(d,b,v)};function c(){f.call(this)}function s(d,b,v){try{u(d,b,v)}catch(y){setTimeout(()=>{throw y})}}function l(d,b){for(var v=new Array(b),y=0;y<b;++y)v[y]=d[y];return v}i.exports=c,n.inherits(c,f),c.prototype.emit=function(d){for(var b=[],v=1;v<arguments.length;v++)b.push(arguments[v]);var y=d==="error",x=this._events;if(x!==void 0)y=y&&x.error===void 0;else if(!y)return!1;if(y){var E;if(b.length>0&&(E=b[0]),E instanceof Error)throw E;var R=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw R.context=E,R}var I=x[d];if(I===void 0)return!1;if(typeof I=="function")s(I,this,b);else{var O=I.length,A=l(I,O);for(v=0;v<O;++v)s(A[v],this,b)}return!0}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=p(o(299)),f=p(o(325));function p(u){return u&&u.__esModule?u:{default:u}}e.default=(0,n.default)(f.default),i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(u){return function(c,s,l){return u(n.default,c,(0,f.default)(s),l)}};var n=p(o(139)),f=p(o(23));function p(u){return u&&u.__esModule?u:{default:u}}i.exports=e.default},function(i,e,o){var n=o(63),f=o(143);i.exports=function(p){if(!f(p))return!1;var u=n(p);return u=="[object Function]"||u=="[object GeneratorFunction]"||u=="[object AsyncFunction]"||u=="[object Proxy]"}},function(i,e,o){var n=o(140),f=Object.prototype,p=f.hasOwnProperty,u=f.toString,c=n?n.toStringTag:void 0;i.exports=function(s){var l=p.call(s,c),d=s[c];try{s[c]=void 0;var b=!0}catch{}var v=u.call(s);return b&&(l?s[c]=d:delete s[c]),v}},function(i,e){var o=Object.prototype.toString;i.exports=function(n){return o.call(n)}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(u,c,s,l){(0,n.default)(c)(u,(0,f.default)(s),l)};var n=p(o(146)),f=p(o(23));function p(u){return u&&u.__esModule?u:{default:u}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(c){if((0,n.default)(c))return function(y){var x=-1,E=y.length;return function(){return++x<E?{value:y[x],key:x}:null}}(c);var s=(0,f.default)(c);return s?function(y){var x=-1;return function(){var E=y.next();return E.done?null:(x++,{value:E.value,key:x})}}(s):(l=c,d=(0,p.default)(l),b=-1,v=d.length,function y(){var x=d[++b];return x==="__proto__"?y():b<v?{value:l[x],key:x}:null});var l,d,b,v};var n=u(o(47)),f=u(o(305)),p=u(o(306));function u(c){return c&&c.__esModule?c:{default:c}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(f){return n&&f[n]&&f[n]()};var n=typeof Symbol=="function"&&Symbol.iterator;i.exports=e.default},function(i,e,o){var n=o(307),f=o(318),p=o(47);i.exports=function(u){return p(u)?n(u):f(u)}},function(i,e,o){var n=o(308),f=o(309),p=o(147),u=o(311),c=o(313),s=o(314),l=Object.prototype.hasOwnProperty;i.exports=function(d,b){var v=p(d),y=!v&&f(d),x=!v&&!y&&u(d),E=!v&&!y&&!x&&s(d),R=v||y||x||E,I=R?n(d.length,String):[],O=I.length;for(var A in d)!b&&!l.call(d,A)||R&&(A=="length"||x&&(A=="offset"||A=="parent")||E&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||c(A,O))||I.push(A);return I}},function(i,e){i.exports=function(o,n){for(var f=-1,p=Array(o);++f<o;)p[f]=n(f);return p}},function(i,e,o){var n=o(310),f=o(65),p=Object.prototype,u=p.hasOwnProperty,c=p.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return f(l)&&u.call(l,"callee")&&!c.call(l,"callee")};i.exports=s},function(i,e,o){var n=o(63),f=o(65);i.exports=function(p){return f(p)&&n(p)=="[object Arguments]"}},function(i,e,o){(function(n){var f=o(141),p=o(312),u=e&&!e.nodeType&&e,c=u&&typeof n=="object"&&n&&!n.nodeType&&n,s=c&&c.exports===u?f.Buffer:void 0,l=(s?s.isBuffer:void 0)||p;n.exports=l}).call(this,o(25)(i))},function(i,e){i.exports=function(){return!1}},function(i,e){var o=/^(?:0|[1-9]\d*)$/;i.exports=function(n,f){var p=typeof n;return!!(f=f??9007199254740991)&&(p=="number"||p!="symbol"&&o.test(n))&&n>-1&&n%1==0&&n<f}},function(i,e,o){var n=o(315),f=o(316),p=o(317),u=p&&p.isTypedArray,c=u?f(u):n;i.exports=c},function(i,e,o){var n=o(63),f=o(144),p=o(65),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,i.exports=function(c){return p(c)&&f(c.length)&&!!u[n(c)]}},function(i,e){i.exports=function(o){return function(n){return o(n)}}},function(i,e,o){(function(n){var f=o(142),p=e&&!e.nodeType&&e,u=p&&typeof n=="object"&&n&&!n.nodeType&&n,c=u&&u.exports===p&&f.process,s=function(){try{var l=u&&u.require&&u.require("util").types;return l||c&&c.binding&&c.binding("util")}catch{}}();n.exports=s}).call(this,o(25)(i))},function(i,e,o){var n=o(319),f=o(320),p=Object.prototype.hasOwnProperty;i.exports=function(u){if(!n(u))return f(u);var c=[];for(var s in Object(u))p.call(u,s)&&s!="constructor"&&c.push(s);return c}},function(i,e){var o=Object.prototype;i.exports=function(n){var f=n&&n.constructor;return n===(typeof f=="function"&&f.prototype||o)}},function(i,e,o){var n=o(321)(Object.keys,Object);i.exports=n},function(i,e){i.exports=function(o,n){return function(f){return o(n(f))}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(l){return(0,f.default)(function(d,b){var v;try{v=l.apply(this,d)}catch(y){return b(y)}(0,n.default)(v)&&typeof v.then=="function"?v.then(function(y){c(b,null,y)},function(y){c(b,y.message?y:new Error(y))}):b(null,v)})};var n=u(o(143)),f=u(o(323)),p=u(o(324));function u(l){return l&&l.__esModule?l:{default:l}}function c(l,d,b){try{l(d,b)}catch(v){(0,p.default)(s,v)}}function s(l){throw l}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(u){return function(){var c=(0,p.default)(arguments),s=c.pop();u.call(this,c,s)}};var n,f=o(48),p=(n=f)&&n.__esModule?n:{default:n};i.exports=e.default},function(i,e,o){(function(n,f){Object.defineProperty(e,"__esModule",{value:!0}),e.hasNextTick=e.hasSetImmediate=void 0,e.fallback=b,e.wrap=v;var p,u=o(48),c=(p=u)&&p.__esModule?p:{default:p},s,l=e.hasSetImmediate=typeof n=="function"&&n,d=e.hasNextTick=typeof f=="object"&&typeof f.nextTick=="function";function b(y){setTimeout(y,0)}function v(y){return function(x){var E=(0,c.default)(arguments,1);y(function(){x.apply(null,E)})}}s=l?n:d?f.nextTick:b,e.default=v(s)}).call(this,o(108).setImmediate,o(5))},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(u,c,s,l){l=l||n.default,c=c||[];var d=[],b=0,v=(0,f.default)(s);u(c,function(y,x,E){var R=b++;v(y,function(I,O){d[R]=O,E(I)})},function(y){l(y,d)})};var n=p(o(38)),f=p(o(23));function p(u){return u&&u.__esModule?u:{default:u}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0});var n=p(o(327)),f=p(o(148));function p(u){return u&&u.__esModule?u:{default:u}}e.default=(0,f.default)(n.default,1),i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(c,s,l,d){(0,n.default)(s)(c,(0,f.default)((0,p.default)(l)),d)};var n=u(o(146)),f=u(o(328)),p=u(o(23));function u(c){return c&&c.__esModule?c:{default:c}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){return function(f,p,u){return n(f,u)}},i.exports=e.default},function(i,e,o){const n=o(12).EventEmitter,f=o(21).inherits;function p(){n.call(this),this.isLocked=!0}i.exports=p,f(p,n),p.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},p.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},p.prototype.await=function(u){const c=this;c.isLocked?c.once("unlock",u):setTimeout(u)}},function(i,e,o){e.parse=o(331),e.stringify=o(332)},function(i,e){var o,n,f,p,u={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:"	"},c=function(v){throw{name:"SyntaxError",message:v,at:o,text:f}},s=function(v){return v&&v!==n&&c("Expected '"+v+"' instead of '"+n+"'"),n=f.charAt(o),o+=1,n},l=function(){var v,y="";for(n==="-"&&(y="-",s("-"));n>="0"&&n<="9";)y+=n,s();if(n===".")for(y+=".";s()&&n>="0"&&n<="9";)y+=n;if(n==="e"||n==="E")for(y+=n,s(),n!=="-"&&n!=="+"||(y+=n,s());n>="0"&&n<="9";)y+=n,s();if(v=+y,isFinite(v))return v;c("Bad number")},d=function(){var v,y,x,E="";if(n==='"')for(;s();){if(n==='"')return s(),E;if(n==="\\")if(s(),n==="u"){for(x=0,y=0;y<4&&(v=parseInt(s(),16),isFinite(v));y+=1)x=16*x+v;E+=String.fromCharCode(x)}else{if(typeof u[n]!="string")break;E+=u[n]}else E+=n}c("Bad string")},b=function(){for(;n&&n<=" ";)s()};p=function(){switch(b(),n){case"{":return function(){var v,y={};if(n==="{"){if(s("{"),b(),n==="}")return s("}"),y;for(;n;){if(v=d(),b(),s(":"),Object.hasOwnProperty.call(y,v)&&c('Duplicate key "'+v+'"'),y[v]=p(),b(),n==="}")return s("}"),y;s(","),b()}}c("Bad object")}();case"[":return function(){var v=[];if(n==="["){if(s("["),b(),n==="]")return s("]"),v;for(;n;){if(v.push(p()),b(),n==="]")return s("]"),v;s(","),b()}}c("Bad array")}();case'"':return d();case"-":return l();default:return n>="0"&&n<="9"?l():function(){switch(n){case"t":return s("t"),s("r"),s("u"),s("e"),!0;case"f":return s("f"),s("a"),s("l"),s("s"),s("e"),!1;case"n":return s("n"),s("u"),s("l"),s("l"),null}c("Unexpected '"+n+"'")}()}},i.exports=function(v,y){var x;return f=v,o=0,n=" ",x=p(),b(),n&&c("Syntax error"),typeof y=="function"?function E(R,I){var O,A,P=R[I];if(P&&typeof P=="object")for(O in P)Object.prototype.hasOwnProperty.call(P,O)&&((A=E(P,O))!==void 0?P[O]=A:delete P[O]);return y.call(R,I,P)}({"":x},""):x}},function(i,e){var o,n,f,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function c(s){return p.lastIndex=0,p.test(s)?'"'+s.replace(p,function(l){var d=u[l];return typeof d=="string"?d:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+s+'"'}i.exports=function(s,l,d){var b;if(o="",n="",typeof d=="number")for(b=0;b<d;b+=1)n+=" ";else typeof d=="string"&&(n=d);if(f=l,l&&typeof l!="function"&&(typeof l!="object"||typeof l.length!="number"))throw new Error("JSON.stringify");return function v(y,x){var E,R,I,O,A,P=o,N=x[y];switch(N&&typeof N=="object"&&typeof N.toJSON=="function"&&(N=N.toJSON(y)),typeof f=="function"&&(N=f.call(x,y,N)),typeof N){case"string":return c(N);case"number":return isFinite(N)?String(N):"null";case"boolean":case"null":return String(N);case"object":if(!N)return"null";if(o+=n,A=[],Object.prototype.toString.apply(N)==="[object Array]"){for(O=N.length,E=0;E<O;E+=1)A[E]=v(E,N)||"null";return I=A.length===0?"[]":o?`[
`+o+A.join(`,
`+o)+`
`+P+"]":"["+A.join(",")+"]",o=P,I}if(f&&typeof f=="object")for(O=f.length,E=0;E<O;E+=1)typeof(R=f[E])=="string"&&(I=v(R,N))&&A.push(c(R)+(o?": ":":")+I);else for(R in N)Object.prototype.hasOwnProperty.call(N,R)&&(I=v(R,N))&&A.push(c(R)+(o?": ":":")+I);return I=A.length===0?"{}":o?`{
`+o+A.join(`,
`+o)+`
`+P+"}":"{"+A.join(",")+"}",o=P,I}}("",{"":s})}},function(i,e){i.exports=function(){return Math.floor(Number.MAX_SAFE_INTEGER*Math.random())}},function(i,e,o){const n=o(68),f=o(335);i.exports=class extends n{constructor(p){super(({blockTracker:u})=>f(Object.assign({blockTracker:u},p)))}}},function(i,e,o){const n=o(336),f=o(337),p=[void 0,null,"<nil>"];i.exports=function(c={}){const{blockTracker:s}=c;if(!s)throw new Error("createBlockCacheMiddleware - No BlockTracker specified");const l=new u,d={perma:l,block:l,fork:l};return f(async(b,v,y)=>{if(b.skipCache)return y();const x=n.cacheTypeForPayload(b),E=d[x];if(!E||!E.canCacheRequest(b))return y();let R,I=n.blockTagForPayload(b);if(I||(I="latest"),I==="earliest")R="0x00";else if(I==="latest"){const A=await s.getLatestBlock();l.clearBefore(A),R=A}else R=I;const O=await E.get(b,R);O===void 0?(await y(),await E.set(b,R,v.result)):v.result=O})};class u{constructor(){this.cache={}}getBlockCacheForPayload(s,l){const d=Number.parseInt(l,16);let b=this.cache[d];if(!b){const v={};this.cache[d]=v,b=v}return b}async get(s,l){const d=this.getBlockCacheForPayload(s,l);if(d)return d[n.cacheIdentifierForPayload(s,!0)]}async set(s,l,d){this.canCacheResult(s,d)&&(this.getBlockCacheForPayload(s,l)[n.cacheIdentifierForPayload(s,!0)]=d)}canCacheRequest(s){return n.canCache(s)?n.blockTagForPayload(s)!=="pending":!1}canCacheResult(s,l){if(!p.includes(l))return!!(!["eth_getTransactionByHash","eth_getTransactionReceipt"].includes(s.method)||l&&l.blockHash&&l.blockHash!=="0x0000000000000000000000000000000000000000000000000000000000000000")}clearBefore(s){const l=this,d=Number.parseInt(s,16);Object.keys(l.cache).map(Number).filter(b=>b<d).forEach(b=>delete l.cache[b])}}},function(i,e,o){const n=o(150);function f(s){return c(s)!=="never"}function p(s){const l=u(s);return l>=s.params.length?s.params:s.method==="eth_getBlockByNumber"?s.params.slice(1):s.params.slice(0,l)}function u(s){switch(s.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":return 1;case"eth_getBlockByNumber":return 0;default:return}}function c(s){switch(s.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":case"test_permaCache":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":case"test_forkCache":return"fork";case"eth_gasPrice":case"eth_blockNumber":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"test_blockCache":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":case"test_neverCache":return"never"}}i.exports={cacheIdentifierForPayload:function(s,l){const d=l?p(s):s.params;return f(s)?s.method+":"+n(d):null},canCache:f,blockTagForPayload:function(s){let l=u(s);return l>=s.params.length?null:s.params[l]},paramsWithoutBlockTag:p,blockTagParamIndex:u,cacheTypeForPayload:c}},function(i,e){i.exports=function(o){return(n,f,p,u)=>{let c;const s=new Promise(b=>{c=b});let l,d;o(n,f,async()=>{d=!0,p(b=>{l=b,c()}),await s}).then(async()=>{d?(await s,l(null)):u(null)}).catch(b=>{l?l(b):u(b)})}}},function(i,e,o){const n=o(21).inherits,f=o(49);function p(u){u=u||{},this.staticResponses=u}i.exports=p,n(p,f),p.prototype.handleRequest=function(u,c,s){var l=this.staticResponses[u.method];typeof l=="function"?l(u,c,s):l!==void 0?setTimeout(()=>s(null,l)):c()}},function(i,e,o){const n=o(68),f=o(151);i.exports=class extends n{constructor(){super(({blockTracker:p,provider:u,engine:c})=>f({blockTracker:p,provider:u}))}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const n=o(153);e.createIdRemapMiddleware=function(){return(f,p,u,c)=>{const s=f.id,l=n.getUniqueId();f.id=l,p.id=l,u(d=>{f.id=s,p.id=s,d()})}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(n){return async(f,p,u,c)=>{let s;const l=new Promise(y=>{s=y});let d=null,b=!1;const v=async()=>{b=!0,u(y=>{d=y,s()}),await l};try{await n(f,p,v),b?(await l,d(null)):c(null)}catch(y){d?d(y):c(y)}}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(n){return(f,p,u,c)=>{const s=n[f.method];return s===void 0?u():typeof s=="function"?s(f,p,u,c):(p.result=s,c())}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const n=o(70);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const f=o(155);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return f.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return f.getMessageFromCode}});const p=o(345);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return p.ethErrors}});const u=o(71);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return u.errorCodes}})},function(i,e){i.exports=p,p.default=p,p.stable=s,p.stableStringify=s;var o=[],n=[];function f(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function p(d,b,v,y){var x;y===void 0&&(y=f()),function R(I,O,A,P,N,L,H){var J;if(L+=1,typeof I=="object"&&I!==null){for(J=0;J<P.length;J++)if(P[J]===I)return void u("[Circular]",I,O,N);if(H.depthLimit!==void 0&&L>H.depthLimit||H.edgesLimit!==void 0&&A+1>H.edgesLimit)return void u("[...]",I,O,N);if(P.push(I),Array.isArray(I))for(J=0;J<I.length;J++)R(I[J],J,J,P,I,L,H);else{var G=Object.keys(I);for(J=0;J<G.length;J++){var z=G[J];R(I[z],z,J,P,I,L,H)}}P.pop()}}(d,"",0,[],void 0,0,y);try{x=n.length===0?JSON.stringify(d,b,v):JSON.stringify(d,l(b),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;o.length!==0;){var E=o.pop();E.length===4?Object.defineProperty(E[0],E[1],E[3]):E[0][E[1]]=E[2]}}return x}function u(d,b,v,y){var x=Object.getOwnPropertyDescriptor(y,v);x.get!==void 0?x.configurable?(Object.defineProperty(y,v,{value:d}),o.push([y,v,b,x])):n.push([b,v,d]):(y[v]=d,o.push([y,v,b]))}function c(d,b){return d<b?-1:d>b?1:0}function s(d,b,v,y){y===void 0&&(y=f());var x,E=function I(O,A,P,N,L,H,J){var G;if(H+=1,typeof O=="object"&&O!==null){for(G=0;G<N.length;G++)if(N[G]===O)return void u("[Circular]",O,A,L);try{if(typeof O.toJSON=="function")return}catch{return}if(J.depthLimit!==void 0&&H>J.depthLimit||J.edgesLimit!==void 0&&P+1>J.edgesLimit)return void u("[...]",O,A,L);if(N.push(O),Array.isArray(O))for(G=0;G<O.length;G++)I(O[G],G,G,N,O,H,J);else{var z={},S=Object.keys(O).sort(c);for(G=0;G<S.length;G++){var a=S[G];I(O[a],a,G,N,O,H,J),z[a]=O[a]}if(L===void 0)return z;o.push([L,A,O]),L[A]=z}N.pop()}}(d,"",0,[],void 0,0,y)||d;try{x=n.length===0?JSON.stringify(E,b,v):JSON.stringify(E,l(b),v)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;o.length!==0;){var R=o.pop();R.length===4?Object.defineProperty(R[0],R[1],R[3]):R[0][R[1]]=R[2]}}return x}function l(d){return d=d!==void 0?d:function(b,v){return v},function(b,v){if(n.length>0)for(var y=0;y<n.length;y++){var x=n[y];if(x[1]===b&&x[0]===v){v=x[2],n.splice(y,1);break}}return d.call(this,b,v)}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const n=o(70),f=o(155),p=o(71);function u(l,d){const[b,v]=s(d);return new n.EthereumRpcError(l,b||f.getMessageFromCode(l),v)}function c(l,d){const[b,v]=s(d);return new n.EthereumProviderError(l,b||f.getMessageFromCode(l),v)}function s(l){if(l){if(typeof l=="string")return[l];if(typeof l=="object"&&!Array.isArray(l)){const{message:d,data:b}=l;if(d&&typeof d!="string")throw new Error("Must specify string message.");return[d||void 0,b]}}return[]}e.ethErrors={rpc:{parse:l=>u(p.errorCodes.rpc.parse,l),invalidRequest:l=>u(p.errorCodes.rpc.invalidRequest,l),invalidParams:l=>u(p.errorCodes.rpc.invalidParams,l),methodNotFound:l=>u(p.errorCodes.rpc.methodNotFound,l),internal:l=>u(p.errorCodes.rpc.internal,l),server:l=>{if(!l||typeof l!="object"||Array.isArray(l))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:d}=l;if(!Number.isInteger(d)||d>-32005||d<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return u(d,l)},invalidInput:l=>u(p.errorCodes.rpc.invalidInput,l),resourceNotFound:l=>u(p.errorCodes.rpc.resourceNotFound,l),resourceUnavailable:l=>u(p.errorCodes.rpc.resourceUnavailable,l),transactionRejected:l=>u(p.errorCodes.rpc.transactionRejected,l),methodNotSupported:l=>u(p.errorCodes.rpc.methodNotSupported,l),limitExceeded:l=>u(p.errorCodes.rpc.limitExceeded,l)},provider:{userRejectedRequest:l=>c(p.errorCodes.provider.userRejectedRequest,l),unauthorized:l=>c(p.errorCodes.provider.unauthorized,l),unsupportedMethod:l=>c(p.errorCodes.provider.unsupportedMethod,l),disconnected:l=>c(p.errorCodes.provider.disconnected,l),chainDisconnected:l=>c(p.errorCodes.provider.chainDisconnected,l),custom:l=>{if(!l||typeof l!="object"||Array.isArray(l))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:d,message:b,data:v}=l;if(!b||typeof b!="string")throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(d,b,v)}}}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const n=o(154);e.mergeMiddleware=function(f){const p=new n.JsonRpcEngine;return f.forEach(u=>p.push(u)),p.asMiddleware()}},function(i,e){i.exports=function(o){return(n,f,p,u)=>{const c=o[n.method];return c===void 0?p():typeof c=="function"?c(n,f,p,u):(f.result=c,u())}}},function(i,e,o){const n=o(138),f=o(349),p=o(350),{bnToHex:u,hexToInt:c,incrementHexInt:s,minBlockRef:l,blockRefIsNumber:d}=o(39);i.exports=class extends p{constructor({provider:b,params:v}){super(),this.type="log",this.ethQuery=new n(b),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},v),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:b}){let v=this.params.fromBlock;["latest","pending"].includes(v)&&(v=b),v==="earliest"&&(v="0x0"),this.params.fromBlock=v;const y=l(this.params.toBlock,b),x=Object.assign({},this.params,{toBlock:y}),E=await this._fetchLogs(x);this.addInitialResults(E)}async update({oldBlock:b,newBlock:v}){const y=v;let x;x=b?s(b):v;const E=Object.assign({},this.params,{fromBlock:x,toBlock:y}),R=(await this._fetchLogs(E)).filter(I=>this.matchLog(I));this.addResults(R)}async _fetchLogs(b){return await f(v=>this.ethQuery.getLogs(b,v))()}matchLog(b){if(c(this.params.fromBlock)>=c(b.blockNumber)||d(this.params.toBlock)&&c(this.params.toBlock)<=c(b.blockNumber))return!1;const v=b.address&&b.address.toLowerCase();return this.params.address&&v&&!this.params.address.includes(v)?!1:this.params.topics.every((y,x)=>{let E=b.topics[x];if(!E)return!1;E=E.toLowerCase();let R=Array.isArray(y)?y:[y];return R.includes(null)?!0:(R=R.map(I=>I.toLowerCase()),R.includes(E))})}}},function(i,e,o){const n=(p,u,c,s)=>function(...l){return new u.promiseModule((d,b)=>{u.multiArgs?l.push((...y)=>{u.errorFirst?y[0]?b(y):(y.shift(),d(y)):d(y)}):u.errorFirst?l.push((y,x)=>{y?b(y):d(x)}):l.push(d),Reflect.apply(p,this===c?s:this,l)})},f=new WeakMap;i.exports=(p,u)=>{u={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...u};const c=typeof p;if(p===null||c!=="object"&&c!=="function")throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${p===null?"null":c}\``);const s=new WeakMap,l=new Proxy(p,{apply(d,b,v){const y=s.get(d);if(y)return Reflect.apply(y,b,v);const x=u.excludeMain?d:n(d,u,l,d);return s.set(d,x),Reflect.apply(x,b,v)},get(d,b){const v=d[b];if(!((x,E)=>{let R=f.get(x);if(R||(R={},f.set(x,R)),E in R)return R[E];const I=N=>typeof N=="string"||typeof E=="symbol"?E===N:N.test(E),O=Reflect.getOwnPropertyDescriptor(x,E),A=O===void 0||O.writable||O.configurable,P=(u.include?u.include.some(I):!u.exclude.some(I))&&A;return R[E]=P,P})(d,b)||v===Function.prototype[b])return v;const y=s.get(v);if(y)return y;if(typeof v=="function"){const x=n(v,u,l,d);return s.set(v,x),x}return v}});return l}},function(i,e,o){const n=o(72);i.exports=class extends n{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(f){this.allResults=this.allResults.concat(f),super.addResults(f)}addInitialResults(f){this.allResults=this.allResults.concat(f),super.addInitialResults(f)}getAllResults(){return this.allResults}}},function(i,e,o){const n=o(72),f=o(73),{incrementHexInt:p}=o(39);i.exports=class extends n{constructor({provider:u,params:c}){super(),this.type="block",this.provider=u}async update({oldBlock:u,newBlock:c}){const s=c,l=p(u),d=(await f({provider:this.provider,fromBlock:l,toBlock:s})).map(b=>b.hash);this.addResults(d)}}},function(i,e,o){const n=o(72),f=o(73),{incrementHexInt:p}=o(39);i.exports=class extends n{constructor({provider:u}){super(),this.type="tx",this.provider=u}async update({oldBlock:u}){const c=u,s=p(u),l=await f({provider:this.provider,fromBlock:s,toBlock:c}),d=[];for(const b of l)d.push(...b.transactions);this.addResults(d)}}},function(i,e,o){const n=o(354),f=o(355),p=o(21).inherits,u=o(36),c=o(357),s=o(44),l=o(367),d=o(49),b=o(368),v=/^[0-9A-Fa-f]+$/g;function y(A){this.nonceLock=l(1),A.getAccounts&&(this.getAccounts=A.getAccounts),A.processTransaction&&(this.processTransaction=A.processTransaction),A.processMessage&&(this.processMessage=A.processMessage),A.processPersonalMessage&&(this.processPersonalMessage=A.processPersonalMessage),A.processTypedMessage&&(this.processTypedMessage=A.processTypedMessage),this.approveTransaction=A.approveTransaction||this.autoApprove,this.approveMessage=A.approveMessage||this.autoApprove,this.approvePersonalMessage=A.approvePersonalMessage||this.autoApprove,this.approveDecryptMessage=A.approveDecryptMessage||this.autoApprove,this.approveEncryptionPublicKey=A.approveEncryptionPublicKey||this.autoApprove,this.approveTypedMessage=A.approveTypedMessage||this.autoApprove,A.signTransaction&&(this.signTransaction=A.signTransaction||O("signTransaction")),A.signMessage&&(this.signMessage=A.signMessage||O("signMessage")),A.signPersonalMessage&&(this.signPersonalMessage=A.signPersonalMessage||O("signPersonalMessage")),A.decryptMessage&&(this.decryptMessage=A.decryptMessage||O("decryptMessage")),A.encryptionPublicKey&&(this.encryptionPublicKey=A.encryptionPublicKey||O("encryptionPublicKey")),A.signTypedMessage&&(this.signTypedMessage=A.signTypedMessage||O("signTypedMessage")),A.recoverPersonalSignature&&(this.recoverPersonalSignature=A.recoverPersonalSignature),A.publishTransaction&&(this.publishTransaction=A.publishTransaction),this.estimateGas=A.estimateGas||this.estimateGas,this.getGasPrice=A.getGasPrice||this.getGasPrice}function x(A){return A.toLowerCase()}function E(A){const P=u.addHexPrefix(A);return u.isValidAddress(P)}function R(A){const P=u.addHexPrefix(A);return!u.isValidAddress(P)&&I(A)}function I(A){return typeof A!="string"||A.slice(0,2)!=="0x"?!1:A.slice(2).match(v)}function O(A){return function(P,N){N(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+A+'" fn in constructor options'))}}i.exports=y,p(y,d),y.prototype.handleRequest=function(A,P,N){const L=this;let H,J,G,z,S;switch(L._parityRequests={},L._parityRequestCount=0,A.method){case"eth_coinbase":return void L.getAccounts(function(a,w){if(a)return N(a);let h=w[0]||null;N(null,h)});case"eth_accounts":return void L.getAccounts(function(a,w){if(a)return N(a);N(null,w)});case"eth_sendTransaction":return H=A.params[0],void n([a=>L.validateTransaction(H,a),a=>L.processTransaction(H,a)],N);case"eth_signTransaction":return H=A.params[0],void n([a=>L.validateTransaction(H,a),a=>L.processSignTransaction(H,a)],N);case"eth_sign":return S=A.params[0],z=A.params[1],G=A.params[2]||{},J=s(G,{from:S,data:z}),void n([a=>L.validateMessage(J,a),a=>L.processMessage(J,a)],N);case"personal_sign":return function(){const a=A.params[0];if(R(A.params[1])&&E(a)){let w="The eth_personalSign method requires params ordered ";w+="[message, address]. This was previously handled incorrectly, ",w+="and has been corrected automatically. ",w+="Please switch this param order for smooth behavior in the future.",console.warn(w),S=A.params[0],z=A.params[1]}else z=A.params[0],S=A.params[1];G=A.params[2]||{},J=s(G,{from:S,data:z}),n([w=>L.validatePersonalMessage(J,w),w=>L.processPersonalMessage(J,w)],N)}();case"eth_decryptMessage":return function(){const a=A.params[0];if(R(A.params[1])&&E(a)){let w="The eth_decryptMessage method requires params ordered ";w+="[message, address]. This was previously handled incorrectly, ",w+="and has been corrected automatically. ",w+="Please switch this param order for smooth behavior in the future.",console.warn(w),S=A.params[0],z=A.params[1]}else z=A.params[0],S=A.params[1];G=A.params[2]||{},J=s(G,{from:S,data:z}),n([w=>L.validateDecryptMessage(J,w),w=>L.processDecryptMessage(J,w)],N)}();case"encryption_public_key":return function(){const a=A.params[0];n([w=>L.validateEncryptionPublicKey(a,w),w=>L.processEncryptionPublicKey(a,w)],N)}();case"personal_ecRecover":return function(){z=A.params[0];let a=A.params[1];G=A.params[2]||{},J=s(G,{sig:a,data:z}),L.recoverPersonalSignature(J,N)}();case"eth_signTypedData":case"eth_signTypedData_v3":case"eth_signTypedData_v4":return function(){const a=A.params[0],w=A.params[1];E(a)?(S=a,z=w):(z=a,S=w),G=A.params[2]||{},J=s(G,{from:S,data:z}),n([h=>L.validateTypedMessage(J,h),h=>L.processTypedMessage(J,h)],N)}();case"parity_postTransaction":return H=A.params[0],void L.parityPostTransaction(H,N);case"parity_postSign":return S=A.params[0],z=A.params[1],void L.parityPostSign(S,z,N);case"parity_checkRequest":return function(){const a=A.params[0];L.parityCheckRequest(a,N)}();case"parity_defaultAccount":return void L.getAccounts(function(a,w){if(a)return N(a);const h=w[0]||null;N(null,h)});default:return void P()}},y.prototype.getAccounts=function(A){A(null,[])},y.prototype.processTransaction=function(A,P){const N=this;n([L=>N.approveTransaction(A,L),(L,H)=>N.checkApproval("transaction",L,H),L=>N.finalizeAndSubmitTx(A,L)],P)},y.prototype.processSignTransaction=function(A,P){const N=this;n([L=>N.approveTransaction(A,L),(L,H)=>N.checkApproval("transaction",L,H),L=>N.finalizeTx(A,L)],P)},y.prototype.processMessage=function(A,P){const N=this;n([L=>N.approveMessage(A,L),(L,H)=>N.checkApproval("message",L,H),L=>N.signMessage(A,L)],P)},y.prototype.processPersonalMessage=function(A,P){const N=this;n([L=>N.approvePersonalMessage(A,L),(L,H)=>N.checkApproval("message",L,H),L=>N.signPersonalMessage(A,L)],P)},y.prototype.processDecryptMessage=function(A,P){const N=this;n([L=>N.approveDecryptMessage(A,L),(L,H)=>N.checkApproval("decryptMessage",L,H),L=>N.decryptMessage(A,L)],P)},y.prototype.processEncryptionPublicKey=function(A,P){const N=this;n([L=>N.approveEncryptionPublicKey(A,L),(L,H)=>N.checkApproval("encryptionPublicKey",L,H),L=>N.encryptionPublicKey(A,L)],P)},y.prototype.processTypedMessage=function(A,P){const N=this;n([L=>N.approveTypedMessage(A,L),(L,H)=>N.checkApproval("message",L,H),L=>N.signTypedMessage(A,L)],P)},y.prototype.autoApprove=function(A,P){P(null,!0)},y.prototype.checkApproval=function(A,P,N){N(P?null:new Error("User denied "+A+" signature."))},y.prototype.parityPostTransaction=function(A,P){const N=this,L="0x"+N._parityRequestCount.toString(16);N._parityRequestCount++,N.emitPayload({method:"eth_sendTransaction",params:[A]},function(H,J){if(H)return void(N._parityRequests[L]={error:H});const G=J.result;N._parityRequests[L]=G}),P(null,L)},y.prototype.parityPostSign=function(A,P,N){const L=this,H="0x"+L._parityRequestCount.toString(16);L._parityRequestCount++,L.emitPayload({method:"eth_sign",params:[A,P]},function(J,G){if(J)return void(L._parityRequests[H]={error:J});const z=G.result;L._parityRequests[H]=z}),N(null,H)},y.prototype.parityCheckRequest=function(A,P){const N=this._parityRequests[A]||null;return N?N.error?P(N.error):void P(null,N):P(null,null)},y.prototype.recoverPersonalSignature=function(A,P){let N;try{N=c.recoverPersonalSignature(A)}catch(L){return P(L)}P(null,N)},y.prototype.validateTransaction=function(A,P){if(A.from===void 0)return P(new Error("Undefined address - from address required to sign transaction."));this.validateSender(A.from,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to sign transaction for this address: "${A.from}"`))})},y.prototype.validateMessage=function(A,P){if(A.from===void 0)return P(new Error("Undefined address - from address required to sign message."));this.validateSender(A.from,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to sign message for this address: "${A.from}"`))})},y.prototype.validatePersonalMessage=function(A,P){return A.from===void 0?P(new Error("Undefined address - from address required to sign personal message.")):A.data===void 0?P(new Error("Undefined message - message required to sign personal message.")):I(A.data)?void this.validateSender(A.from,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to sign message for this address: "${A.from}"`))}):P(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},y.prototype.validateDecryptMessage=function(A,P){return A.from===void 0?P(new Error("Undefined address - from address required to decrypt message.")):A.data===void 0?P(new Error("Undefined message - message required to decrypt message.")):I(A.data)?void this.validateSender(A.from,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to decrypt message for this address: "${A.from}"`))}):P(new Error("HookedWalletSubprovider - validateDecryptMessage - message was not encoded as hex."))},y.prototype.validateEncryptionPublicKey=function(A,P){this.validateSender(A,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to obtain encryption public key for this address: "${A}"`))})},y.prototype.validateTypedMessage=function(A,P){return A.from===void 0?P(new Error("Undefined address - from address required to sign typed data.")):A.data===void 0?P(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(A.from,function(N,L){return N?P(N):L?void P():P(new Error(`Unknown address - unable to sign message for this address: "${A.from}"`))})},y.prototype.validateSender=function(A,P){if(!A)return P(null,!1);this.getAccounts(function(N,L){if(N)return P(N);const H=L.map(x).indexOf(A.toLowerCase())!==-1;P(null,H)})},y.prototype.finalizeAndSubmitTx=function(A,P){const N=this;N.nonceLock.take(function(){n([N.fillInTxExtras.bind(N,A),N.signTransaction.bind(N),N.publishTransaction.bind(N)],function(L,H){if(N.nonceLock.leave(),L)return P(L);P(null,H)})})},y.prototype.finalizeTx=function(A,P){const N=this;N.nonceLock.take(function(){n([N.fillInTxExtras.bind(N,A),N.signTransaction.bind(N)],function(L,H){if(N.nonceLock.leave(),L)return P(L);P(null,{raw:H,tx:A})})})},y.prototype.publishTransaction=function(A,P){this.emitPayload({method:"eth_sendRawTransaction",params:[A]},function(N,L){if(N)return P(N);P(null,L.result)})},y.prototype.estimateGas=function(A,P){b(this.engine,A,P)},y.prototype.getGasPrice=function(A){this.emitPayload({method:"eth_gasPrice",params:[]},function(P,N){if(P)return A(P);A(null,N.result)})},y.prototype.fillInTxExtras=function(A,P){const N=this,L=A.from,H={};A.gasPrice===void 0&&(H.gasPrice=N.getGasPrice.bind(N)),A.nonce===void 0&&(H.nonce=N.emitPayload.bind(N,{method:"eth_getTransactionCount",params:[L,"pending"]})),A.gas===void 0&&(H.gas=N.estimateGas.bind(N,function(J){return{from:J.from,to:J.to,value:J.value,data:J.data,gas:J.gas,gasPrice:J.gasPrice,nonce:J.nonce}}(A))),f(H,function(J,G){if(J)return P(J);const z={};G.gasPrice&&(z.gasPrice=G.gasPrice),G.nonce&&(z.nonce=G.nonce.result),G.gas&&(z.gas=G.gas),P(null,s(A,z))})}},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(d,b){if(b=(0,p.default)(b||f.default),!(0,n.default)(d))return b(new Error("First argument to waterfall must be an array of functions"));if(!d.length)return b();var v=0;function y(E){var R=(0,s.default)(d[v++]);E.push((0,c.default)(x)),R.apply(null,E)}function x(E){if(E||v===d.length)return b.apply(null,arguments);y((0,u.default)(arguments,1))}y([])};var n=l(o(147)),f=l(o(38)),p=l(o(64)),u=l(o(48)),c=l(o(66)),s=l(o(23));function l(d){return d&&d.__esModule?d:{default:d}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(u,c){(0,f.default)(n.default,u,c)};var n=p(o(139)),f=p(o(356));function p(u){return u&&u.__esModule?u:{default:u}}i.exports=e.default},function(i,e,o){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(s,l,d){d=d||n.default;var b=(0,f.default)(l)?[]:{};s(l,function(v,y,x){(0,u.default)(v)(function(E,R){arguments.length>2&&(R=(0,p.default)(arguments,1)),b[y]=R,x(E)})},function(v){d(v,b)})};var n=c(o(38)),f=c(o(47)),p=c(o(48)),u=c(o(23));function c(s){return s&&s.__esModule?s:{default:s}}i.exports=e.default},function(i,e,o){const n=o(36),f=o(358);function p(l){const d=new Error("Expect argument to be non-empty array");if(typeof l!="object"||!l.length)throw d;const b=l.map(function(x){return x.type==="bytes"?n.toBuffer(x.value):x.value}),v=l.map(function(x){return x.type}),y=l.map(function(x){if(!x.name)throw d;return x.type+" "+x.name});return f.soliditySHA3(["bytes32","bytes32"],[f.soliditySHA3(new Array(l.length).fill("string"),y),f.soliditySHA3(v,b)])}function u(l,d){const b=n.toBuffer(d),v=n.fromRpcSig(b);return n.ecrecover(l,v.v,v.r,v.s)}function c(l){const d=n.toBuffer(l.data);return u(n.hashPersonalMessage(d),l.sig)}function s(l,d){for(var b=""+l;b.length<d;)b="0"+b;return b}i.exports={concatSig:function(l,d,b){const v=n.fromSigned(d),y=n.fromSigned(b),x=n.bufferToInt(l),E=s(n.toUnsigned(v).toString("hex"),64),R=s(n.toUnsigned(y).toString("hex"),64),I=n.stripHexPrefix(n.intToHex(x));return n.addHexPrefix(E.concat(R,I)).toString("hex")},normalize:function(l){if(l){if(typeof l=="number"){const b=n.toBuffer(l);l=n.bufferToHex(b)}if(typeof l!="string"){var d="eth-sig-util.normalize() requires hex string or integer input.";throw new Error(d+=" received "+typeof l+": "+l)}return n.addHexPrefix(l.toLowerCase())}},personalSign:function(l,d){var b=n.toBuffer(d.data),v=n.hashPersonalMessage(b),y=n.ecsign(v,l);return n.bufferToHex(this.concatSig(y.v,y.r,y.s))},recoverPersonalSignature:function(l){const d=c(l),b=n.publicToAddress(d);return n.bufferToHex(b)},extractPublicKey:function(l){return"0x"+c(l).toString("hex")},typedSignatureHash:function(l){const d=p(l);return n.bufferToHex(d)},signTypedData:function(l,d){const b=p(d.data),v=n.ecsign(b,l);return n.bufferToHex(this.concatSig(v.v,v.r,v.s))},recoverTypedSignature:function(l){const d=u(p(l.data),l.sig),b=n.publicToAddress(d);return n.bufferToHex(b)}}},function(i,e,o){i.exports=o(359)},function(i,e,o){(function(n){const f=o(360),p=o(9);var u=function(){};function c(A){return A.startsWith("int[")?"int256"+A.slice(3):A==="int"?"int256":A.startsWith("uint[")?"uint256"+A.slice(4):A==="uint"?"uint256":A.startsWith("fixed[")?"fixed128x128"+A.slice(5):A==="fixed"?"fixed128x128":A.startsWith("ufixed[")?"ufixed128x128"+A.slice(6):A==="ufixed"?"ufixed128x128":A}function s(A){return parseInt(/^\D+(\d+)$/.exec(A)[1],10)}function l(A){var P=/^\D+(\d+)x(\d+)$/.exec(A);return[parseInt(P[1],10),parseInt(P[2],10)]}function d(A){var P=A.match(/(.*)\[(.*?)\]$/);return P?P[2]===""?"dynamic":parseInt(P[2],10):null}function b(A){var P=typeof A;if(P==="string")return f.isHexPrefixed(A)?new p(f.stripHexPrefix(A),16):new p(A,10);if(P==="number")return new p(A);if(A.toArray)return A;throw new Error("Argument is not a number")}function v(A){var P=/^(\w+)\((.*)\)$/.exec(A);if(P.length!==3)throw new Error("Invalid method signature");var N=/^(.+)\):\((.+)$/.exec(P[2]);if(N!==null&&N.length===3)return{method:P[1],args:N[1].split(","),retargs:N[2].split(",")};var L=P[2].split(",");return L.length===1&&L[0]===""&&(L=[]),{method:P[1],args:L}}function y(A,P){var N,L,H,J;if(A==="address")return y("uint160",b(P));if(A==="bool")return y("uint8",P?1:0);if(A==="string")return y("bytes",n.from(P,"utf8"));if(I(A)){if(P.length===void 0)throw new Error("Not an array?");if((N=d(A))!=="dynamic"&&N!==0&&P.length>N)throw new Error("Elements exceed array size: "+N);for(J in H=[],A=A.slice(0,A.lastIndexOf("[")),typeof P=="string"&&(P=JSON.parse(P)),P)H.push(y(A,P[J]));if(N==="dynamic"){var G=y("uint256",P.length);H.unshift(G)}return n.concat(H)}if(A==="bytes")return P=n.from(P),H=n.concat([y("uint256",P.length),P]),P.length%32!=0&&(H=n.concat([H,f.zeros(32-P.length%32)])),H;if(A.startsWith("bytes")){if((N=s(A))<1||N>32)throw new Error("Invalid bytes<N> width: "+N);return f.setLengthRight(P,32)}if(A.startsWith("uint")){if((N=s(A))%8||N<8||N>256)throw new Error("Invalid uint<N> width: "+N);if((L=b(P)).bitLength()>N)throw new Error("Supplied uint exceeds width: "+N+" vs "+L.bitLength());if(L<0)throw new Error("Supplied uint is negative");return L.toArrayLike(n,"be",32)}if(A.startsWith("int")){if((N=s(A))%8||N<8||N>256)throw new Error("Invalid int<N> width: "+N);if((L=b(P)).bitLength()>N)throw new Error("Supplied int exceeds width: "+N+" vs "+L.bitLength());return L.toTwos(256).toArrayLike(n,"be",32)}if(A.startsWith("ufixed")){if(N=l(A),(L=b(P))<0)throw new Error("Supplied ufixed is negative");return y("uint256",L.mul(new p(2).pow(new p(N[1]))))}if(A.startsWith("fixed"))return N=l(A),y("int256",b(P).mul(new p(2).pow(new p(N[1]))));throw new Error("Unsupported or invalid type: "+A)}function x(A,P,N){var L,H,J,G;if(typeof A=="string"&&(A=E(A)),A.name==="address")return x(A.rawType,P,N).toArrayLike(n,"be",20).toString("hex");if(A.name==="bool")return x(A.rawType,P,N).toString()===new p(1).toString();if(A.name==="string"){var z=x(A.rawType,P,N);return n.from(z,"utf8").toString()}if(A.isArray){for(J=[],L=A.size,A.size==="dynamic"&&(N=x("uint256",P,N).toNumber(),L=x("uint256",P,N).toNumber(),N+=32),G=0;G<L;G++){var S=x(A.subArray,P,N);J.push(S),N+=A.subArray.memoryUsage}return J}if(A.name==="bytes")return N=x("uint256",P,N).toNumber(),L=x("uint256",P,N).toNumber(),P.slice(N+32,N+32+L);if(A.name.startsWith("bytes"))return P.slice(N,N+A.size);if(A.name.startsWith("uint")){if((H=new p(P.slice(N,N+32),16,"be")).bitLength()>A.size)throw new Error("Decoded int exceeds width: "+A.size+" vs "+H.bitLength());return H}if(A.name.startsWith("int")){if((H=new p(P.slice(N,N+32),16,"be").fromTwos(256)).bitLength()>A.size)throw new Error("Decoded uint exceeds width: "+A.size+" vs "+H.bitLength());return H}if(A.name.startsWith("ufixed")){if(L=new p(2).pow(new p(A.size[1])),!(H=x("uint256",P,N)).mod(L).isZero())throw new Error("Decimals not supported yet");return H.div(L)}if(A.name.startsWith("fixed")){if(L=new p(2).pow(new p(A.size[1])),!(H=x("int256",P,N)).mod(L).isZero())throw new Error("Decimals not supported yet");return H.div(L)}throw new Error("Unsupported or invalid type: "+A.name)}function E(A){var P,N,L;if(I(A)){P=d(A);var H=A.slice(0,A.lastIndexOf("["));return H=E(H),N={isArray:!0,name:A,size:P,memoryUsage:P==="dynamic"?32:H.memoryUsage*P,subArray:H}}switch(A){case"address":L="uint160";break;case"bool":L="uint8";break;case"string":L="bytes"}if(N={rawType:L,name:A,memoryUsage:32},A.startsWith("bytes")&&A!=="bytes"||A.startsWith("uint")||A.startsWith("int")?N.size=s(A):(A.startsWith("ufixed")||A.startsWith("fixed"))&&(N.size=l(A)),A.startsWith("bytes")&&A!=="bytes"&&(N.size<1||N.size>32))throw new Error("Invalid bytes<N> width: "+N.size);if((A.startsWith("uint")||A.startsWith("int"))&&(N.size%8||N.size<8||N.size>256))throw new Error("Invalid int/uint<N> width: "+N.size);return N}function R(A){return A==="string"||A==="bytes"||d(A)==="dynamic"}function I(A){return A.lastIndexOf("]")===A.length-1}function O(A,P){return A.startsWith("address")||A.startsWith("bytes")?"0x"+P.toString("hex"):P.toString()}u.eventID=function(A,P){var N=A+"("+P.map(c).join(",")+")";return f.keccak256(n.from(N))},u.methodID=function(A,P){return u.eventID(A,P).slice(0,4)},u.rawEncode=function(A,P){var N=[],L=[],H=0;A.forEach(function(S){if(I(S)){var a=d(S);H+=a!=="dynamic"?32*a:32}else H+=32});for(var J=0;J<A.length;J++){var G=c(A[J]),z=y(G,P[J]);R(G)?(N.push(y("uint256",H)),L.push(z),H+=z.length):N.push(z)}return n.concat(N.concat(L))},u.rawDecode=function(A,P){var N=[];P=n.from(P);for(var L=0,H=0;H<A.length;H++){var J=E(c(A[H])),G=x(J,P,L);L+=J.memoryUsage,N.push(G)}return N},u.simpleEncode=function(A){var P=Array.prototype.slice.call(arguments).slice(1),N=v(A);if(P.length!==N.args.length)throw new Error("Argument count mismatch");return n.concat([u.methodID(N.method,N.args),u.rawEncode(N.args,P)])},u.simpleDecode=function(A,P){var N=v(A);if(!N.retargs)throw new Error("No return values in method");return u.rawDecode(N.retargs,P)},u.stringify=function(A,P){var N=[];for(var L in A){var H=A[L],J=P[L];J=/^[^\[]+\[.*\]$/.test(H)?J.map(function(G){return O(H,G)}).join(", "):O(H,J),N.push(J)}return N},u.solidityHexValue=function(A,P,N){var L,H;if(I(A)){var J=A.replace(/\[.*?\]/,"");if(!I(J)){var G=d(A);if(G!=="dynamic"&&G!==0&&P.length>G)throw new Error("Elements exceed array size: "+G)}var z=P.map(function(w){return u.solidityHexValue(J,w,256)});return n.concat(z)}if(A==="bytes")return P;if(A==="string")return n.from(P,"utf8");if(A==="bool"){N=N||8;var S=Array(N/4).join("0");return n.from(P?S+"1":S+"0","hex")}if(A==="address"){var a=20;return N&&(a=N/8),f.setLengthLeft(P,a)}if(A.startsWith("bytes")){if((L=s(A))<1||L>32)throw new Error("Invalid bytes<N> width: "+L);return f.setLengthRight(P,L)}if(A.startsWith("uint")){if((L=s(A))%8||L<8||L>256)throw new Error("Invalid uint<N> width: "+L);if((H=b(P)).bitLength()>L)throw new Error("Supplied uint exceeds width: "+L+" vs "+H.bitLength());return N=N||L,H.toArrayLike(n,"be",N/8)}if(A.startsWith("int")){if((L=s(A))%8||L<8||L>256)throw new Error("Invalid int<N> width: "+L);if((H=b(P)).bitLength()>L)throw new Error("Supplied int exceeds width: "+L+" vs "+H.bitLength());return N=N||L,H.toTwos(L).toArrayLike(n,"be",N/8)}throw new Error("Unsupported or invalid type: "+A)},u.solidityPack=function(A,P){if(A.length!==P.length)throw new Error("Number of types are not matching the values");for(var N=[],L=0;L<A.length;L++){var H=c(A[L]),J=P[L];N.push(u.solidityHexValue(H,J,null))}return n.concat(N)},u.soliditySHA3=function(A,P){return f.keccak256(u.solidityPack(A,P))},u.soliditySHA256=function(A,P){return f.sha256(u.solidityPack(A,P))},u.solidityRIPEMD160=function(A,P){return f.ripemd160(u.solidityPack(A,P),!0)},u.fromSerpent=function(A){for(var P,N=[],L=0;L<A.length;L++){var H=A[L];if(H==="s")N.push("bytes");else if(H==="b"){for(var J="bytes",G=L+1;G<A.length&&(P=A[G])>="0"&&P<="9";)J+=A[G]-"0",G++;L=G-1,N.push(J)}else if(H==="i")N.push("int256");else{if(H!=="a")throw new Error("Unsupported or invalid type: "+H);N.push("int256[]")}}return N},u.toSerpent=function(A){for(var P=[],N=0;N<A.length;N++){var L=A[N];if(L==="bytes")P.push("s");else if(L.startsWith("bytes"))P.push("b"+s(L));else if(L==="int256")P.push("i");else{if(L!=="int256[]")throw new Error("Unsupported or invalid type: "+L);P.push("a")}}return P.join("")},i.exports=u}).call(this,o(2).Buffer)},function(i,e,o){var n=this&&this.__createBinding||(Object.create?function(l,d,b,v){v===void 0&&(v=b),Object.defineProperty(l,v,{enumerable:!0,get:function(){return d[b]}})}:function(l,d,b,v){v===void 0&&(v=b),l[v]=d[b]}),f=this&&this.__exportStar||function(l,d){for(var b in l)b==="default"||d.hasOwnProperty(b)||n(d,l,b)};Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=e.rlp=e.BN=void 0;var p=o(74);e.secp256k1=p;var u=o(32),c=o(9);e.BN=c;var s=o(46);e.rlp=s,Object.assign(e,u),f(o(363),e),f(o(364),e),f(o(75),e),f(o(365),e),f(o(40),e),f(o(366),e)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0});var f=o(9),p=new(o(58)).ec("secp256k1"),u=p.curve;e.privateKeyExport=function(s,l){l===void 0&&(l=!0);var d=new f(s);if(d.ucmp(u.n)>=0)throw new Error("couldn't export to DER format");var b=p.g.mul(d);return c(b.getX(),b.getY(),l)},e.privateKeyModInverse=function(s){var l=new f(s);if(l.ucmp(u.n)>=0||l.isZero())throw new Error("private key range is invalid");return l.invm(u.n).toArrayLike(n,"be",32)},e.signatureImport=function(s){var l=new f(s.r);l.ucmp(u.n)>=0&&(l=new f(0));var d=new f(s.s);return d.ucmp(u.n)>=0&&(d=new f(0)),n.concat([l.toArrayLike(n,"be",32),d.toArrayLike(n,"be",32)])},e.ecdhUnsafe=function(s,l,d){d===void 0&&(d=!0);var b=p.keyFromPublic(s),v=new f(l);if(v.ucmp(u.n)>=0||v.isZero())throw new Error("scalar was invalid (zero or overflow)");var y=b.pub.mul(v);return c(y.getX(),y.getY(),d)};var c=function(s,l,d){var b;return d?((b=n.alloc(33))[0]=l.isOdd()?3:2,s.toArrayLike(n,"be",32).copy(b,1)):((b=n.alloc(65))[0]=4,s.toArrayLike(n,"be",32).copy(b,1),l.toArrayLike(n,"be",32).copy(b,33)),b}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0});var f=n.from([48,129,211,2,1,1,4,32,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,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,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,0,0,0,0,0,0,0,0,0]),p=n.from([48,130,1,19,2,1,1,4,32,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,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(u,c,s){s===void 0&&(s=!0);var l=n.from(s?f:p);return u.copy(l,s?8:9),c.copy(l,s?181:214),l},e.privateKeyImport=function(u){var c=u.length,s=0;if(c<s+1||u[s]!==48||c<(s+=1)+1||!(128&u[s]))return null;var l=127&u[s];if(l<1||l>2||c<(s+=1)+l)return null;var d=u[s+l-1]|(l>1?u[s+l-2]<<8:0);return c<(s+=l)+d||c<s+3||u[s]!==2||u[s+1]!==1||u[s+2]!==1||c<(s+=3)+2||u[s]!==4||u[s+1]>32||c<s+2+u[s+1]?null:u.slice(s+2,s+2+u[s+1])},e.signatureImportLax=function(u){var c=n.alloc(32,0),s=n.alloc(32,0),l=u.length,d=0;if(u[d++]!==48)return null;var b=u[d++];if(128&b&&(d+=b-128)>l||u[d++]!==2)return null;var v=u[d++];if(128&v){if(d+(b=v-128)>l)return null;for(;b>0&&u[d]===0;d+=1,b-=1);for(v=0;b>0;d+=1,b-=1)v=(v<<8)+u[d]}if(v>l-d)return null;var y=d;if(d+=v,u[d++]!==2)return null;var x=u[d++];if(128&x){if(d+(b=x-128)>l)return null;for(;b>0&&u[d]===0;d+=1,b-=1);for(x=0;b>0;d+=1,b-=1)x=(x<<8)+u[d]}if(x>l-d)return null;var E=d;for(d+=x;v>0&&u[y]===0;v-=1,y+=1);if(v>32)return null;var R=u.slice(y,y+v);for(R.copy(c,32-R.length);x>0&&u[E]===0;x-=1,E+=1);if(x>32)return null;var I=u.slice(E,E+x);return I.copy(s,32-I.length),{r:c,s}}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=void 0;var f=o(9);e.MAX_INTEGER=new f("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new f("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=n.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=n.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=n.from(e.KECCAK256_RLP_S,"hex")}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.importPublic=e.privateToPublic=e.privateToAddress=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.isPrecompiled=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isZeroAddress=e.isValidAddress=e.zeroAddress=void 0;var f=o(61),p=o(32),u=o(74),c=o(9),s=o(40),l=o(75);e.zeroAddress=function(){var d=s.zeros(20);return s.bufferToHex(d)},e.isValidAddress=function(d){return/^0x[0-9a-fA-F]{40}$/.test(d)},e.isZeroAddress=function(d){return e.zeroAddress()===s.addHexPrefix(d)},e.toChecksumAddress=function(d,b){d=p.stripHexPrefix(d).toLowerCase();for(var v=b!==void 0?b.toString()+"0x":"",y=l.keccak(v+d).toString("hex"),x="0x",E=0;E<d.length;E++)parseInt(y[E],16)>=8?x+=d[E].toUpperCase():x+=d[E];return x},e.isValidChecksumAddress=function(d,b){return e.isValidAddress(d)&&e.toChecksumAddress(d,b)===d},e.generateAddress=function(d,b){d=s.toBuffer(d);var v=new c(b);return v.isZero()?l.rlphash([d,null]).slice(-20):l.rlphash([d,n.from(v.toArray())]).slice(-20)},e.generateAddress2=function(d,b,v){var y=s.toBuffer(d),x=s.toBuffer(b),E=s.toBuffer(v);return f(y.length===20),f(x.length===32),l.keccak256(n.concat([n.from("ff","hex"),y,x,l.keccak256(E)])).slice(-20)},e.isPrecompiled=function(d){var b=s.unpad(d);return b.length===1&&b[0]>=1&&b[0]<=8},e.isValidPrivate=function(d){return u.privateKeyVerify(d)},e.isValidPublic=function(d,b){return b===void 0&&(b=!1),d.length===64?u.publicKeyVerify(n.concat([n.from([4]),d])):!!b&&u.publicKeyVerify(d)},e.pubToAddress=function(d,b){return b===void 0&&(b=!1),d=s.toBuffer(d),b&&d.length!==64&&(d=u.publicKeyConvert(d,!1).slice(1)),f(d.length===64),l.keccak(d).slice(-20)},e.publicToAddress=e.pubToAddress,e.privateToAddress=function(d){return e.publicToAddress(e.privateToPublic(d))},e.privateToPublic=function(d){return d=s.toBuffer(d),u.publicKeyCreate(d,!1).slice(1)},e.importPublic=function(d){return(d=s.toBuffer(d)).length!==64&&(d=u.publicKeyConvert(d,!1).slice(1)),d}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.hashPersonalMessage=e.isValidSignature=e.fromRpcSig=e.toRpcSig=e.ecrecover=e.ecsign=void 0;var f=o(74),p=o(9),u=o(40),c=o(75);function s(d,b){return b?d-(2*b+35):d-27}function l(d){return d===0||d===1}e.ecsign=function(d,b,v){var y=f.sign(d,b),x=y.recovery;return{r:y.signature.slice(0,32),s:y.signature.slice(32,64),v:v?x+(2*v+35):x+27}},e.ecrecover=function(d,b,v,y,x){var E=n.concat([u.setLength(v,32),u.setLength(y,32)],64),R=s(b,x);if(!l(R))throw new Error("Invalid signature v value");var I=f.recover(d,E,R);return f.publicKeyConvert(I,!1).slice(1)},e.toRpcSig=function(d,b,v,y){if(!l(s(d,y)))throw new Error("Invalid signature v value");return u.bufferToHex(n.concat([u.setLengthLeft(b,32),u.setLengthLeft(v,32),u.toBuffer(d)]))},e.fromRpcSig=function(d){var b=u.toBuffer(d);if(b.length!==65)throw new Error("Invalid signature length");var v=b[64];return v<27&&(v+=27),{v,r:b.slice(0,32),s:b.slice(32,64)}},e.isValidSignature=function(d,b,v,y,x){y===void 0&&(y=!0);var E=new p("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),R=new p("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(b.length!==32||v.length!==32||!l(s(d,x)))return!1;var I=new p(b),O=new p(v);return!(I.isZero()||I.gt(R)||O.isZero()||O.gt(R))&&(!y||O.cmp(E)!==1)},e.hashPersonalMessage=function(d){var b=n.from(`Ethereum Signed Message:
`+d.length.toString(),"utf-8");return c.keccak(n.concat([b,d]))}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.defineProperties=void 0;var f=o(61),p=o(32),u=o(46),c=o(40);e.defineProperties=function(s,l,d){if(s.raw=[],s._fields=[],s.toJSON=function(v){if(v===void 0&&(v=!1),v){var y={};return s._fields.forEach(function(x){y[x]="0x"+s[x].toString("hex")}),y}return c.baToJSON(s.raw)},s.serialize=function(){return u.encode(s.raw)},l.forEach(function(v,y){function x(){return s.raw[y]}function E(R){(R=c.toBuffer(R)).toString("hex")!=="00"||v.allowZero||(R=n.allocUnsafe(0)),v.allowLess&&v.length?(R=c.stripZeros(R),f(v.length>=R.length,"The field "+v.name+" must not have more "+v.length+" bytes")):v.allowZero&&R.length===0||!v.length||f(v.length===R.length,"The field "+v.name+" must have byte length of "+v.length),s.raw[y]=R}s._fields.push(v.name),Object.defineProperty(s,v.name,{enumerable:!0,configurable:!0,get:x,set:E}),v.default&&(s[v.name]=v.default),v.alias&&Object.defineProperty(s,v.alias,{enumerable:!1,configurable:!0,set:E,get:x})}),d)if(typeof d=="string"&&(d=n.from(p.stripHexPrefix(d),"hex")),n.isBuffer(d)&&(d=u.decode(d)),Array.isArray(d)){if(d.length>s._fields.length)throw new Error("wrong number of fields in data");d.forEach(function(v,y){s[s._fields[y]]=c.toBuffer(v)})}else{if(typeof d!="object")throw new Error("invalid data");var b=Object.keys(d);l.forEach(function(v){b.indexOf(v.name)!==-1&&(s[v.name]=d[v.name]),b.indexOf(v.alias)!==-1&&(s[v.alias]=d[v.alias])})}}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){(function(f){var p=function(u){setTimeout(u,0)};n!==void 0&&n&&typeof n.nextTick=="function"&&(p=n.nextTick),i.exports=function(u){var c={capacity:u||1,current:0,queue:[],firstHere:!1,take:function(){if(c.firstHere===!1){c.current++,c.firstHere=!0;var s=1}else s=0;var l={n:1};typeof arguments[0]=="function"?l.task=arguments[0]:l.n=arguments[0],arguments.length>=2&&(typeof arguments[1]=="function"?l.task=arguments[1]:l.n=arguments[1]);var d=l.task;if(l.task=function(){d(c.leave)},c.current+l.n-s>c.capacity)return s===1&&(c.current--,c.firstHere=!1),c.queue.push(l);c.current+=l.n-s,l.task(c.leave),s===1&&(c.firstHere=!1)},leave:function(s){if(s=s||1,c.current-=s,c.queue.length){var l=c.queue[0];l.n+c.current>c.capacity||(c.queue.shift(),c.current+=l.n,p(l.task))}else if(c.current<0)throw new Error("leave called too many times.")},available:function(s){return s=s||1,c.current+s<=c.capacity}};return c}})()}).call(this,o(5))},function(i,e,o){const n=o(67);i.exports=function(f,p,u){f.sendAsync(n({method:"eth_estimateGas",params:[p]}),function(c,s){if(c)return c.message==="no contract code at given address"?u(null,"0xcf08"):u(c);u(null,s.result)})}},function(i,e,o){(function(n){const f=o(21).inherits,p=o(370),u=o(36),c=o(49),s=o(149).blockTagForPayload;function l(d){this.nonceCache={}}i.exports=l,f(l,c),l.prototype.handleRequest=function(d,b,v){const y=this;switch(d.method){case"eth_getTransactionCount":var x=s(d),E=d.params[0].toLowerCase(),R=y.nonceCache[E];return void(x==="pending"?R?v(null,R):b(function(I,O,A){if(I)return A();y.nonceCache[E]===void 0&&(y.nonceCache[E]=O),A()}):b());case"eth_sendRawTransaction":return void b(function(I,O,A){if(I)return A();var P=d.params[0],N=(u.stripHexPrefix(P),n.from(u.stripHexPrefix(P),"hex"),new p(n.from(u.stripHexPrefix(P),"hex"))),L="0x"+N.getSenderAddress().toString("hex").toLowerCase(),H=u.bufferToInt(N.nonce),J=(++H).toString(16);J.length%2&&(J="0"+J),J="0x"+J,y.nonceCache[L]=J,A()});case"evm_revert":return y.nonceCache={},void b();default:return void b()}}}).call(this,o(2).Buffer)},function(i,e,o){(function(n){var f=o(36),p=o(371),u=f.BN,c=new u("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=function(){function l(d){(function(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")})(this,l),d=d||{};var b=[{name:"nonce",length:32,allowLess:!0,default:new n([])},{name:"gasPrice",length:32,allowLess:!0,default:new n([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new n([])},{name:"to",allowZero:!0,length:20,default:new n([])},{name:"value",length:32,allowLess:!0,default:new n([])},{name:"data",alias:"input",allowZero:!0,default:new n([])},{name:"v",allowZero:!0,default:new n([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new n([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new n([])}];f.defineProperties(this,b,d),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var v=f.bufferToInt(this.v),y=Math.floor((v-35)/2);y<0&&(y=0),this._chainId=y||d.chainId||0,this._homestead=!0}return l.prototype.toCreationAddress=function(){return this.to.toString("hex")===""},l.prototype.hash=function(d){d===void 0&&(d=!0);var b=void 0;if(d)b=this.raw;else if(this._chainId>0){var v=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,b=this.raw,this.raw=v}else b=this.raw.slice(0,6);return f.rlphash(b)},l.prototype.getChainId=function(){return this._chainId},l.prototype.getSenderAddress=function(){if(this._from)return this._from;var d=this.getSenderPublicKey();return this._from=f.publicToAddress(d),this._from},l.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},l.prototype.verifySignature=function(){var d=this.hash(!1);if(this._homestead&&new u(this.s).cmp(c)===1)return!1;try{var b=f.bufferToInt(this.v);this._chainId>0&&(b-=2*this._chainId+8),this._senderPubKey=f.ecrecover(d,b,this.r,this.s)}catch{return!1}return!!this._senderPubKey},l.prototype.sign=function(d){var b=this.hash(!1),v=f.ecsign(b,d);this._chainId>0&&(v.v+=2*this._chainId+8),Object.assign(this,v)},l.prototype.getDataFee=function(){for(var d=this.raw[5],b=new u(0),v=0;v<d.length;v++)d[v]===0?b.iaddn(p.txDataZeroGas.v):b.iaddn(p.txDataNonZeroGas.v);return b},l.prototype.getBaseFee=function(){var d=this.getDataFee().iaddn(p.txGas.v);return this._homestead&&this.toCreationAddress()&&d.iaddn(p.txCreation.v),d},l.prototype.getUpfrontCost=function(){return new u(this.gasLimit).imul(new u(this.gasPrice)).iadd(new u(this.value))},l.prototype.validate=function(d){var b=[];return this.verifySignature()||b.push("Invalid Signature"),this.getBaseFee().cmp(new u(this.gasLimit))>0&&b.push(["gas limit is too low. Need at least "+this.getBaseFee()]),d===void 0||d===!1?b.length===0:b.join(" ")},l}();i.exports=s}).call(this,o(2).Buffer)},function(i){i.exports=JSON.parse(`{"genesisGasLimit":{"v":5000,"d":"Gas limit of the Genesis block."},"genesisDifficulty":{"v":17179869184,"d":"Difficulty of the Genesis block."},"genesisNonce":{"v":"0x0000000000000042","d":"the geneis nonce"},"genesisExtraData":{"v":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","d":"extra data "},"genesisHash":{"v":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","d":"genesis hash"},"genesisStateRoot":{"v":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544","d":"the genesis state root"},"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be."},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations."},"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be."},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations."},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not."},"maximumExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis."},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs."},"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed."},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack."},"tierStepGas":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them."},"expGas":{"v":10,"d":"Once per EXP instuction."},"expByteGas":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction."},"sha3Gas":{"v":30,"d":"Once per SHA3 operation."},"sha3WordGas":{"v":6,"d":"Once per word of the SHA3 operation's data."},"sloadGas":{"v":50,"d":"Once per SLOAD operation."},"sstoreSetGas":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero."},"sstoreResetGas":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero."},"sstoreRefundGas":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero."},"jumpdestGas":{"v":1,"d":"Refunded gas, once per SSTORE operation if the zeroness changes to zero."},"logGas":{"v":375,"d":"Per LOG* operation."},"logDataGas":{"v":8,"d":"Per byte in a LOG* operation's data."},"logTopicGas":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."},"createGas":{"v":32000,"d":"Once per CREATE operation & contract-creation transaction."},"callGas":{"v":40,"d":"Once per CALL operation & message call transaction."},"callStipend":{"v":2300,"d":"Free gas given at beginning of call."},"callValueTransferGas":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero."},"callNewAccountGas":{"v":25000,"d":"Paid for CALL when the destination address didn't exist prior."},"suicideRefundGas":{"v":24000,"d":"Refunded following a suicide operation."},"memoryGas":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL."},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation."},"createDataGas":{"v":200,"d":""},"txGas":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions."},"txCreation":{"v":32000,"d":"the cost of creating a contract via tx"},"txDataZeroGas":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."},"txDataNonZeroGas":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions."},"copyGas":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."},"ecrecoverGas":{"v":3000,"d":""},"sha256Gas":{"v":60,"d":""},"sha256WordGas":{"v":12,"d":""},"ripemd160Gas":{"v":600,"d":""},"ripemd160WordGas":{"v":120,"d":""},"identityGas":{"v":15,"d":""},"identityWordGas":{"v":3,"d":""},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"ommerReward":{"v":"625000000000000000","d":"The amount of wei a miner of an uncle block gets for being inculded in the blockchain"},"niblingReward":{"v":"156250000000000000","d":"the amount a miner gets for inculding a uncle"},"homeSteadForkNumber":{"v":1150000,"d":"the block that the Homestead fork started at"},"homesteadRepriceForkNumber":{"v":2463000,"d":"the block that the Homestead Reprice (EIP150) fork started at"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"freeBlockPeriod":{"v":2}}`)},function(i,e,o){const n=o(68),f=o(373);i.exports=class extends n{constructor(){super(({blockTracker:p,provider:u,engine:c})=>{const{events:s,middleware:l}=f({blockTracker:p,provider:u});return s.on("notification",d=>c.emit("data",null,d)),l})}}},function(i,e,o){const n=o(69).default,f=o(156),{createAsyncMiddleware:p}=o(152),u=o(151),{unsafeRandomBytes:c,incrementHexInt:s}=o(39),l=o(73);function d(b){return{hash:b.hash,parentHash:b.parentHash,sha3Uncles:b.sha3Uncles,miner:b.miner,stateRoot:b.stateRoot,transactionsRoot:b.transactionsRoot,receiptsRoot:b.receiptsRoot,logsBloom:b.logsBloom,difficulty:b.difficulty,number:b.number,gasLimit:b.gasLimit,gasUsed:b.gasUsed,nonce:b.nonce,mixHash:b.mixHash,timestamp:b.timestamp,extraData:b.extraData}}i.exports=function({blockTracker:b,provider:v}){const y={},x=u({blockTracker:b,provider:v});let E=!1;const R=new n,I=f({eth_subscribe:p(async function(A,P){if(E)throw new Error("SubscriptionManager - attempting to use after destroying");const N=A.params[0],L=c(16);let H;switch(N){case"newHeads":H=function({subId:z}){const S={type:N,destroy:async()=>{b.removeListener("sync",S.update)},update:async({oldBlock:a,newBlock:w})=>{const h=w,m=s(a);(await l({provider:v,fromBlock:m,toBlock:h})).map(d).forEach(g=>{O(z,g)})}};return b.on("sync",S.update),S}({subId:L});break;case"logs":const J=A.params[1],G=await x.newLogFilter(J);H=function({subId:z,filter:S}){return S.on("update",a=>O(z,a)),{type:N,destroy:async()=>await x.uninstallFilter(S.idHex)}}({subId:L,filter:G});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${N}"`)}return y[L]=H,void(P.result=L)}),eth_unsubscribe:p(async function(A,P){if(E)throw new Error("SubscriptionManager - attempting to use after destroying");const N=A.params[0],L=y[N];if(!L)return void(P.result=!1);delete y[N],await L.destroy(),P.result=!0})});return I.destroy=function(){R.removeAllListeners();for(const A in y)y[A].destroy(),delete y[A];E=!0},{events:R,middleware:I};function O(A,P){R.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:A,result:P}})}}},function(i,e,o){o.r(e);var n={};o.r(n),o.d(n,"generateKey",function(){return y}),o.d(n,"verifyHmac",function(){return x}),o.d(n,"encrypt",function(){return E}),o.d(n,"decrypt",function(){return R});var f=o(1),p=o(162),u=class{constructor(){this._eventEmitters=[]}subscribe(I){this._eventEmitters.push(I)}unsubscribe(I){this._eventEmitters=this._eventEmitters.filter(O=>O.event!==I)}trigger(I){let O,A=[];O=Object(f.isJsonRpcRequest)(I)?I.method:Object(f.isJsonRpcResponseSuccess)(I)||Object(f.isJsonRpcResponseError)(I)?"response:"+I.id:Object(f.isInternalEvent)(I)?I.event:"",O&&(A=this._eventEmitters.filter(P=>P.event===O)),A&&A.length||Object(f.isReservedEvent)(O)||Object(f.isInternalEvent)(O)||(A=this._eventEmitters.filter(P=>P.event==="call_request")),A.forEach(P=>{if(Object(f.isJsonRpcResponseError)(I)){const N=new Error(I.error.message);P.callback(N,null)}else P.callback(null,I)})}},c=class{constructor(I="walletconnect"){this.storageId=I}getSession(){let I=null;const O=Object(f.getLocal)(this.storageId);return O&&Object(f.isWalletConnectSession)(O)&&(I=O),I}setSession(I){return Object(f.setLocal)(this.storageId,I),I}removeSession(){Object(f.removeLocal)(this.storageId)}};const s="abcdefghijklmnopqrstuvwxyz0123456789".split("").map(I=>`https://${I}.bridge.walletconnect.org`);function l(){return s[Math.floor(Math.random()*s.length)]}var d=class{constructor(I){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new u,this._clientMeta=Object(f.getClientMeta)()||I.connectorOpts.clientMeta||null,this._cryptoLib=I.cryptoLib,this._sessionStorage=I.sessionStorage||new c(I.connectorOpts.storageId),this._qrcodeModal=I.connectorOpts.qrcodeModal,this._qrcodeModalOptions=I.connectorOpts.qrcodeModalOptions,this._signingMethods=[...f.signingMethods,...I.connectorOpts.signingMethods||[]],!I.connectorOpts.bridge&&!I.connectorOpts.uri&&!I.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var O;I.connectorOpts.bridge&&(this.bridge=function(P){return function(N){return function(L){let H=L.indexOf("//")>-1?L.split("/")[2]:L.split("/")[0];return H=H.split(":")[0],H=H.split("?")[0],H}(N).split(".").slice(-2).join(".")}(P)==="walletconnect.org"}(O=I.connectorOpts.bridge)?l():O),I.connectorOpts.uri&&(this.uri=I.connectorOpts.uri);const A=I.connectorOpts.session||this._getStorageSession();A&&(this.session=A),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=I.transport||new p.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),I.connectorOpts.uri&&this._subscribeToSessionRequest(),I.pushServerOpts&&this._registerPushServer(I.pushServerOpts)}set bridge(I){I&&(this._bridge=I)}get bridge(){return this._bridge}set key(I){if(!I)return;const O=Object(f.convertHexToArrayBuffer)(I);this._key=O}get key(){return this._key?Object(f.convertArrayBufferToHex)(this._key,!0):""}set clientId(I){I&&(this._clientId=I)}get clientId(){let I=this._clientId;return I||(I=this._clientId=Object(f.uuid)()),this._clientId}set peerId(I){I&&(this._peerId=I)}get peerId(){return this._peerId}set clientMeta(I){}get clientMeta(){let I=this._clientMeta;return I||(I=this._clientMeta=Object(f.getClientMeta)()),I}set peerMeta(I){this._peerMeta=I}get peerMeta(){return this._peerMeta}set handshakeTopic(I){I&&(this._handshakeTopic=I)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(I){I&&(this._handshakeId=I)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(I){if(!I)return;const{handshakeTopic:O,bridge:A,key:P}=this._parseUri(I);this.handshakeTopic=O,this.bridge=A,this.key=P}set chainId(I){this._chainId=I}get chainId(){return this._chainId}set networkId(I){this._networkId=I}get networkId(){return this._networkId}set accounts(I){this._accounts=I}get accounts(){return this._accounts}set rpcUrl(I){this._rpcUrl=I}get rpcUrl(){return this._rpcUrl}set connected(I){}get connected(){return this._connected}set pending(I){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(I){I&&(this._connected=I.connected,this.accounts=I.accounts,this.chainId=I.chainId,this.bridge=I.bridge,this.key=I.key,this.clientId=I.clientId,this.clientMeta=I.clientMeta,this.peerId=I.peerId,this.peerMeta=I.peerMeta,this.handshakeId=I.handshakeId,this.handshakeTopic=I.handshakeTopic)}on(I,O){const A={event:I,callback:O};this._eventManager.subscribe(A)}off(I){this._eventManager.unsubscribe(I)}async createInstantRequest(I){this._key=await this._generateKey();const O=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(I)}]});this.handshakeId=O.id,this.handshakeTopic=Object(f.uuid)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",()=>{throw new Error("User close QRCode Modal")});const A=()=>{this.killSession()};try{const P=await this._sendCallRequest(O);return P&&A(),P}catch(P){throw A(),P}}async connect(I){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(I),new Promise(async(O,A)=>{this.on("modal_closed",()=>A(new Error("User close QRCode Modal"))),this.on("connect",(P,N)=>{if(P)return A(P);O(N.params[0])})}))}async createSession(I){if(this._connected)throw new Error("Session currently connected");if(this.pending)return;this._key=await this._generateKey();const O=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:I&&I.chainId?I.chainId:null}]});this.handshakeId=O.id,this.handshakeTopic=Object(f.uuid)(),this._sendSessionRequest(O,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(I){if(this._connected)throw new Error("Session currently connected");this.chainId=I.chainId,this.accounts=I.accounts,this.networkId=I.networkId||0,this.rpcUrl=I.rpcUrl||"";const O={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},A={id:this.handshakeId,jsonrpc:"2.0",result:O};this._sendResponse(A),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(I){if(this._connected)throw new Error("Session currently connected");const O=I&&I.message?I.message:"Session Rejected",A=this._formatResponse({id:this.handshakeId,error:{message:O}});this._sendResponse(A),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:O}]}),this._removeStorageSession()}updateSession(I){if(!this._connected)throw new Error("Session currently disconnected");this.chainId=I.chainId,this.accounts=I.accounts,this.networkId=I.networkId||0,this.rpcUrl=I.rpcUrl||"";const O={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},A=this._formatRequest({method:"wc_sessionUpdate",params:[O]});this._sendSessionRequest(A,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(I){const O=I?I.message:"Session Disconnected",A=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(A),this._handleSessionDisconnect(O)}async sendTransaction(I){if(!this._connected)throw new Error("Session currently disconnected");const O=Object(f.parseTransactionData)(I),A=this._formatRequest({method:"eth_sendTransaction",params:[O]});return await this._sendCallRequest(A)}async signTransaction(I){if(!this._connected)throw new Error("Session currently disconnected");const O=Object(f.parseTransactionData)(I),A=this._formatRequest({method:"eth_signTransaction",params:[O]});return await this._sendCallRequest(A)}async signMessage(I){if(!this._connected)throw new Error("Session currently disconnected");const O=this._formatRequest({method:"eth_sign",params:I});return await this._sendCallRequest(O)}async signPersonalMessage(I){if(!this._connected)throw new Error("Session currently disconnected");I=Object(f.parsePersonalSign)(I);const O=this._formatRequest({method:"personal_sign",params:I});return await this._sendCallRequest(O)}async signTypedData(I){if(!this._connected)throw new Error("Session currently disconnected");const O=this._formatRequest({method:"eth_signTypedData",params:I});return await this._sendCallRequest(O)}async updateChain(I){if(!this._connected)throw new Error("Session currently disconnected");const O=this._formatRequest({method:"wallet_updateChain",params:[I]});return await this._sendCallRequest(O)}unsafeSend(I,O){return this._sendRequest(I,O),this._eventManager.trigger({event:"call_request_sent",params:[{request:I,options:O}]}),new Promise((A,P)=>{this._subscribeToResponse(I.id,(N,L)=>{if(N)P(N);else{if(!L)throw new Error("Missing JSON RPC response");A(L)}})})}async sendCustomRequest(I,O){if(!this._connected)throw new Error("Session currently disconnected");switch(I.method){case"eth_accounts":return this.accounts;case"eth_chainId":return Object(f.convertNumberToHex)(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":I.params&&(I.params[0]=Object(f.parseTransactionData)(I.params[0]));break;case"personal_sign":I.params&&(I.params=Object(f.parsePersonalSign)(I.params))}const A=this._formatRequest(I);return await this._sendCallRequest(A,O)}approveRequest(I){if(!Object(f.isJsonRpcResponseSuccess)(I))throw new Error('JSON-RPC success response must include "result" field');{const O=this._formatResponse(I);this._sendResponse(O)}}rejectRequest(I){if(!Object(f.isJsonRpcResponseError)(I))throw new Error('JSON-RPC error response must include "error" field');{const O=this._formatResponse(I);this._sendResponse(O)}}transportClose(){this._transport.close()}async _sendRequest(I,O){const A=this._formatRequest(I),P=await this._encrypt(A),N=(O==null?void 0:O.topic)!==void 0?O.topic:this.peerId,L=JSON.stringify(P),H=(O==null?void 0:O.forcePushNotification)!==void 0?!O.forcePushNotification:Object(f.isSilentPayload)(A);this._transport.send(L,N,H)}async _sendResponse(I){const O=await this._encrypt(I),A=this.peerId,P=JSON.stringify(O);this._transport.send(P,A,!0)}async _sendSessionRequest(I,O,A){this._sendRequest(I,A),this._subscribeToSessionResponse(I.id,O)}_sendCallRequest(I,O){return this._sendRequest(I,O),this._eventManager.trigger({event:"call_request_sent",params:[{request:I,options:O}]}),this._subscribeToCallResponse(I.id)}_formatRequest(I){if(I.method===void 0)throw new Error('JSON RPC request must have valid "method" value');return{id:I.id===void 0?Object(f.payloadId)():I.id,jsonrpc:"2.0",method:I.method,params:I.params===void 0?[]:I.params}}_formatResponse(I){if(I.id===void 0)throw new Error('JSON RPC request must have valid "id" value');const O={id:I.id,jsonrpc:"2.0"};if(Object(f.isJsonRpcResponseError)(I)){const A=Object(f.formatRpcError)(I.error);return Object.assign(Object.assign(Object.assign({},O),I),{error:A})}if(Object(f.isJsonRpcResponseSuccess)(I))return Object.assign(Object.assign({},O),I);throw new Error("JSON RPC response format is invalid")}_handleSessionDisconnect(I){const O=I||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(f.removeLocal)(f.mobileLinkChoiceKey)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:O}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(I,O){O&&O.approved?(this._connected?(O.chainId&&(this.chainId=O.chainId),O.accounts&&(this.accounts=O.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,O.chainId&&(this.chainId=O.chainId),O.accounts&&(this.accounts=O.accounts),O.peerId&&!this.peerId&&(this.peerId=O.peerId),O.peerMeta&&!this.peerMeta&&(this.peerMeta=O.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(I)}async _handleIncomingMessages(I){if(![this.clientId,this.handshakeTopic].includes(I.topic))return;let O;try{O=JSON.parse(I.payload)}catch{return}const A=await this._decrypt(O);A&&this._eventManager.trigger(A)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(I,O){this.on("response:"+I,O)}_subscribeToSessionResponse(I,O){this._subscribeToResponse(I,(A,P)=>{A?this._handleSessionResponse(A.message):Object(f.isJsonRpcResponseSuccess)(P)?this._handleSessionResponse(O,P.result):P.error&&P.error.message?this._handleSessionResponse(P.error.message):this._handleSessionResponse(O)})}_subscribeToCallResponse(I){return new Promise((O,A)=>{this._subscribeToResponse(I,(P,N)=>{P?A(P):Object(f.isJsonRpcResponseSuccess)(N)?O(N.result):N.error&&N.error.message?A(N.error):A(new Error("JSON RPC response format is invalid"))})})}_subscribeToInternalEvents(){this.on("display_uri",()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,()=>{this._eventManager.trigger({event:"modal_closed",params:[]})},this._qrcodeModalOptions)}),this.on("connect",()=>{this._qrcodeModal&&this._qrcodeModal.close()}),this.on("call_request_sent",(I,O)=>{const{request:A}=O.params[0];if(Object(f.isMobile)()&&this._signingMethods.includes(A.method)){const P=Object(f.getLocal)(f.mobileLinkChoiceKey);P&&(window.location.href=P.href)}}),this.on("wc_sessionRequest",(I,O)=>{I&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:I.toString()}]}),this.handshakeId=O.id,this.peerId=O.params[0].peerId,this.peerMeta=O.params[0].peerMeta;const A=Object.assign(Object.assign({},O),{method:"session_request"});this._eventManager.trigger(A)}),this.on("wc_sessionUpdate",(I,O)=>{I&&this._handleSessionResponse(I.message),this._handleSessionResponse("Session disconnected",O.params[0])})}_initTransport(){this._transport.on("message",I=>this._handleIncomingMessages(I)),this._transport.on("open",()=>this._eventManager.trigger({event:"transport_open",params:[]})),this._transport.on("close",()=>this._eventManager.trigger({event:"transport_close",params:[]})),this._transport.on("error",()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(I){const O=Object(f.parseWalletConnectUri)(I);if(O.protocol===this.protocol){if(!O.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const A=O.handshakeTopic;if(!O.bridge)throw Error("Invalid or missing bridge url parameter value");const P=decodeURIComponent(O.bridge);if(!O.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:A,bridge:P,key:O.key}}throw new Error("URI format is invalid")}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(I){const O=this._key;return this._cryptoLib&&O?await this._cryptoLib.encrypt(I,O):null}async _decrypt(I){const O=this._key;return this._cryptoLib&&O?await this._cryptoLib.decrypt(I,O):null}_getStorageSession(){let I=null;return this._sessionStorage&&(I=this._sessionStorage.getSession()),I}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(I){if(!I.url||typeof I.url!="string")throw Error("Invalid or missing pushServerOpts.url parameter value");if(!I.type||typeof I.type!="string")throw Error("Invalid or missing pushServerOpts.type parameter value");if(!I.token||typeof I.token!="string")throw Error("Invalid or missing pushServerOpts.token parameter value");const O={bridge:this.bridge,topic:this.clientId,type:I.type,token:I.token,peerName:"",language:I.language||""};this.on("connect",async(A,P)=>{if(A)throw A;if(I.peerMeta){const N=P.params[0].peerMeta.name;O.peerName=N}try{if(!(await(await fetch(I.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(O)})).json()).success)throw Error("Failed to register in Push Server")}catch{throw Error("Failed to register in Push Server")}})}},b=o(33),v=o(0);async function y(I){const O=(I||256)/8,A=b.randomBytes(O);return Object(f.convertBufferToArrayBuffer)(v.b(A))}async function x(I,O){const A=v.n(I.data),P=v.n(I.iv),N=v.n(I.hmac),L=v.c(N,!1),H=v.j(A,P),J=await b.hmacSha256Sign(O,H),G=v.c(J,!1);return v.x(L)===v.x(G)}async function E(I,O,A){const P=v.f(Object(f.convertArrayBufferToBuffer)(O)),N=A||await y(128),L=v.f(Object(f.convertArrayBufferToBuffer)(N)),H=v.c(L,!1),J=JSON.stringify(I),G=v.z(J),z=await b.aesCbcEncrypt(L,P,G),S=v.c(z,!1),a=v.j(z,L),w=await b.hmacSha256Sign(P,a);return{data:S,hmac:v.c(w,!1),iv:H}}async function R(I,O){const A=v.f(Object(f.convertArrayBufferToBuffer)(O));if(!A)throw new Error("Missing key: required for decryption");if(!await x(I,A))return null;const P=v.n(I.data),N=v.n(I.iv),L=await b.aesCbcDecrypt(N,A,P),H=v.e(L);let J;try{J=JSON.parse(H)}catch{return null}return J}e.default=class extends d{constructor(I,O){super({cryptoLib:n,connectorOpts:I,pushServerOpts:O})}}},function(i,e,o){o.r(e);function n(s,l,d,b){return new(d||(d=Promise))(function(v,y){function x(I){try{R(b.next(I))}catch(O){y(O)}}function E(I){try{R(b.throw(I))}catch(O){y(O)}}function R(I){var O;I.done?v(I.value):(O=I.value,O instanceof d?O:new d(function(A){A(O)})).then(x,E)}R((b=b.apply(s,l||[])).next())})}function f(s,l){var d,b,v,y,x={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return y={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function E(R){return function(I){return function(O){if(d)throw new TypeError("Generator is already executing.");for(;x;)try{if(d=1,b&&(v=2&O[0]?b.return:O[0]?b.throw||((v=b.return)&&v.call(b),0):b.next)&&!(v=v.call(b,O[1])).done)return v;switch(b=0,v&&(O=[2&O[0],v.value]),O[0]){case 0:case 1:v=O;break;case 4:return x.label++,{value:O[1],done:!1};case 5:x.label++,b=O[1],O=[0];continue;case 7:O=x.ops.pop(),x.trys.pop();continue;default:if(v=x.trys,!((v=v.length>0&&v[v.length-1])||O[0]!==6&&O[0]!==2)){x=0;continue}if(O[0]===3&&(!v||O[1]>v[0]&&O[1]<v[3])){x.label=O[1];break}if(O[0]===6&&x.label<v[1]){x.label=v[1],v=O;break}if(v&&x.label<v[2]){x.label=v[2],x.ops.push(O);break}v[2]&&x.ops.pop(),x.trys.pop();continue}O=l.call(s,x)}catch(A){O=[6,A],b=0}finally{d=v=0}if(5&O[0])throw O[1];return{value:O[0]?O[1]:void 0,done:!0}}([R,I])}}}var p=function(){function s(l){if(this._maxConcurrency=l,this._queue=[],l<=0)throw new Error("semaphore must be initialized to a positive value");this._value=l}return s.prototype.acquire=function(){var l=this,d=this.isLocked(),b=new Promise(function(v){return l._queue.push(v)});return d||this._dispatch(),b},s.prototype.runExclusive=function(l){return n(this,void 0,void 0,function(){var d,b,v;return f(this,function(y){switch(y.label){case 0:return[4,this.acquire()];case 1:d=y.sent(),b=d[0],v=d[1],y.label=2;case 2:return y.trys.push([2,,4,5]),[4,l(b)];case 3:return[2,y.sent()];case 4:return v(),[7];case 5:return[2]}})})},s.prototype.isLocked=function(){return this._value<=0},s.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var l=this._currentReleaser;this._currentReleaser=void 0,l()}},s.prototype._dispatch=function(){var l=this,d=this._queue.shift();if(d){var b=!1;this._currentReleaser=function(){b||(b=!0,l._value++,l._dispatch())},d([this._value--,this._currentReleaser])}},s}(),u=function(){function s(){this._semaphore=new p(1)}return s.prototype.acquire=function(){return n(this,void 0,void 0,function(){var l;return f(this,function(d){switch(d.label){case 0:return[4,this._semaphore.acquire()];case 1:return l=d.sent(),[2,l[1]]}})})},s.prototype.runExclusive=function(l){return this._semaphore.runExclusive(function(){return l()})},s.prototype.isLocked=function(){return this._semaphore.isLocked()},s.prototype.release=function(){this._semaphore.release()},s}();function c(s,l,d){var b=this;return d===void 0&&(d=new Error("timeout")),{acquire:function(){return new Promise(function(v,y){return n(b,void 0,void 0,function(){var x,E;return f(this,function(R){switch(R.label){case 0:return x=!1,setTimeout(function(){x=!0,y(d)},l),[4,s.acquire()];case 1:return E=R.sent(),x?(Array.isArray(E)?E[1]:E)():v(E),[2]}})})})},runExclusive:function(v){return n(this,void 0,void 0,function(){var y,x;return f(this,function(E){switch(E.label){case 0:y=function(){},E.label=1;case 1:return E.trys.push([1,,7,8]),[4,this.acquire()];case 2:return x=E.sent(),Array.isArray(x)?(y=x[1],[4,v(x[0])]):[3,4];case 3:return[2,E.sent()];case 4:return y=x,[4,v()];case 5:return[2,E.sent()];case 6:return[3,8];case 7:return y(),[7];case 8:return[2]}})})},release:function(){s.release()},isLocked:function(){return s.isLocked()}}}o.d(e,"Mutex",function(){return u}),o.d(e,"Semaphore",function(){return p}),o.d(e,"withTimeout",function(){return c})},function(i,e,o){o.r(e);var n,f,p,u,c,s,l,d={},b=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function y(Q,X){for(var ne in X)Q[ne]=X[ne];return Q}function x(Q){var X=Q.parentNode;X&&X.removeChild(Q)}function E(Q,X,ne){var ce,Ce=arguments,Pe={};for(ce in X)ce!=="key"&&ce!=="ref"&&(Pe[ce]=X[ce]);if(arguments.length>3)for(ne=[ne],ce=3;ce<arguments.length;ce++)ne.push(Ce[ce]);if(ne!=null&&(Pe.children=ne),typeof Q=="function"&&Q.defaultProps!=null)for(ce in Q.defaultProps)Pe[ce]===void 0&&(Pe[ce]=Q.defaultProps[ce]);return R(Q,Pe,X&&X.key,X&&X.ref,null)}function R(Q,X,ne,ce,Ce){var Pe={type:Q,props:X,key:ne,ref:ce,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:Ce};return Ce==null&&(Pe.__v=Pe),n.vnode&&n.vnode(Pe),Pe}function I(){return{}}function O(Q){return Q.children}function A(Q,X){this.props=Q,this.context=X}function P(Q,X){if(X==null)return Q.__?P(Q.__,Q.__.__k.indexOf(Q)+1):null;for(var ne;X<Q.__k.length;X++)if((ne=Q.__k[X])!=null&&ne.__e!=null)return ne.__e;return typeof Q.type=="function"?P(Q):null}function N(Q){var X,ne;if((Q=Q.__)!=null&&Q.__c!=null){for(Q.__e=Q.__c.base=null,X=0;X<Q.__k.length;X++)if((ne=Q.__k[X])!=null&&ne.__e!=null){Q.__e=Q.__c.base=ne.__e;break}return N(Q)}}function L(Q){(!Q.__d&&(Q.__d=!0)&&f.push(Q)&&!p++||c!==n.debounceRendering)&&((c=n.debounceRendering)||u)(H)}function H(){for(var Q;p=f.length;)Q=f.sort(function(X,ne){return X.__v.__b-ne.__v.__b}),f=[],Q.some(function(X){var ne,ce,Ce,Pe,Ye,$e,nt;X.__d&&($e=(Ye=(ne=X).__v).__e,(nt=ne.__P)&&(ce=[],(Ce=y({},Ye)).__v=Ce,Pe=w(nt,Ye,Ce,ne.__n,nt.ownerSVGElement!==void 0,null,ce,$e??P(Ye)),h(ce,Ye),Pe!=$e&&N(Ye)))})}function J(Q,X,ne,ce,Ce,Pe,Ye,$e,nt){var je,Te,st,ft,gt,ht,yt,at=ne&&ne.__k||b,wt=at.length;if($e==d&&($e=Pe!=null?Pe[0]:wt?P(ne,0):null),je=0,X.__k=G(X.__k,function(ut){if(ut!=null){if(ut.__=X,ut.__b=X.__b+1,(st=at[je])===null||st&&ut.key==st.key&&ut.type===st.type)at[je]=void 0;else for(Te=0;Te<wt;Te++){if((st=at[Te])&&ut.key==st.key&&ut.type===st.type){at[Te]=void 0;break}st=null}if(ft=w(Q,ut,st=st||d,ce,Ce,Pe,Ye,$e,nt),(Te=ut.ref)&&st.ref!=Te&&(yt||(yt=[]),st.ref&&yt.push(st.ref,null,ut),yt.push(Te,ut.__c||ft,ut)),ft!=null){var Nt;if(ht==null&&(ht=ft),ut.__d!==void 0)Nt=ut.__d,ut.__d=void 0;else if(Pe==st||ft!=$e||ft.parentNode==null){e:if($e==null||$e.parentNode!==Q)Q.appendChild(ft),Nt=null;else{for(gt=$e,Te=0;(gt=gt.nextSibling)&&Te<wt;Te+=2)if(gt==ft)break e;Q.insertBefore(ft,$e),Nt=$e}X.type=="option"&&(Q.value="")}$e=Nt!==void 0?Nt:ft.nextSibling,typeof X.type=="function"&&(X.__d=$e)}else $e&&st.__e==$e&&$e.parentNode!=Q&&($e=P(st))}return je++,ut}),X.__e=ht,Pe!=null&&typeof X.type!="function")for(je=Pe.length;je--;)Pe[je]!=null&&x(Pe[je]);for(je=wt;je--;)at[je]!=null&&_(at[je],at[je]);if(yt)for(je=0;je<yt.length;je++)g(yt[je],yt[++je],yt[++je])}function G(Q,X,ne){if(ne==null&&(ne=[]),Q==null||typeof Q=="boolean")X&&ne.push(X(null));else if(Array.isArray(Q))for(var ce=0;ce<Q.length;ce++)G(Q[ce],X,ne);else ne.push(X?X(typeof Q=="string"||typeof Q=="number"?R(null,Q,null,null,Q):Q.__e!=null||Q.__c!=null?R(Q.type,Q.props,Q.key,null,Q.__v):Q):Q);return ne}function z(Q,X,ne){X[0]==="-"?Q.setProperty(X,ne):Q[X]=typeof ne=="number"&&v.test(X)===!1?ne+"px":ne??""}function S(Q,X,ne,ce,Ce){var Pe,Ye,$e,nt,je;if(Ce?X==="className"&&(X="class"):X==="class"&&(X="className"),X==="style")if(Pe=Q.style,typeof ne=="string")Pe.cssText=ne;else{if(typeof ce=="string"&&(Pe.cssText="",ce=null),ce)for(nt in ce)ne&&nt in ne||z(Pe,nt,"");if(ne)for(je in ne)ce&&ne[je]===ce[je]||z(Pe,je,ne[je])}else X[0]==="o"&&X[1]==="n"?(Ye=X!==(X=X.replace(/Capture$/,"")),$e=X.toLowerCase(),X=($e in Q?$e:X).slice(2),ne?(ce||Q.addEventListener(X,a,Ye),(Q.l||(Q.l={}))[X]=ne):Q.removeEventListener(X,a,Ye)):X!=="list"&&X!=="tagName"&&X!=="form"&&X!=="type"&&X!=="size"&&!Ce&&X in Q?Q[X]=ne??"":typeof ne!="function"&&X!=="dangerouslySetInnerHTML"&&(X!==(X=X.replace(/^xlink:?/,""))?ne==null||ne===!1?Q.removeAttributeNS("http://www.w3.org/1999/xlink",X.toLowerCase()):Q.setAttributeNS("http://www.w3.org/1999/xlink",X.toLowerCase(),ne):ne==null||ne===!1&&!/^ar/.test(X)?Q.removeAttribute(X):Q.setAttribute(X,ne))}function a(Q){this.l[Q.type](n.event?n.event(Q):Q)}function w(Q,X,ne,ce,Ce,Pe,Ye,$e,nt){var je,Te,st,ft,gt,ht,yt,at,wt,ut,Nt=X.type;if(X.constructor!==void 0)return null;(je=n.__b)&&je(X);try{e:if(typeof Nt=="function"){if(at=X.props,wt=(je=Nt.contextType)&&ce[je.__c],ut=je?wt?wt.props.value:je.__:ce,ne.__c?yt=(Te=X.__c=ne.__c).__=Te.__E:("prototype"in Nt&&Nt.prototype.render?X.__c=Te=new Nt(at,ut):(X.__c=Te=new A(at,ut),Te.constructor=Nt,Te.render=T),wt&&wt.sub(Te),Te.props=at,Te.state||(Te.state={}),Te.context=ut,Te.__n=ce,st=Te.__d=!0,Te.__h=[]),Te.__s==null&&(Te.__s=Te.state),Nt.getDerivedStateFromProps!=null&&(Te.__s==Te.state&&(Te.__s=y({},Te.__s)),y(Te.__s,Nt.getDerivedStateFromProps(at,Te.__s))),ft=Te.props,gt=Te.state,st)Nt.getDerivedStateFromProps==null&&Te.componentWillMount!=null&&Te.componentWillMount(),Te.componentDidMount!=null&&Te.__h.push(Te.componentDidMount);else{if(Nt.getDerivedStateFromProps==null&&at!==ft&&Te.componentWillReceiveProps!=null&&Te.componentWillReceiveProps(at,ut),!Te.__e&&Te.shouldComponentUpdate!=null&&Te.shouldComponentUpdate(at,Te.__s,ut)===!1||X.__v===ne.__v&&!Te.__){for(Te.props=at,Te.state=Te.__s,X.__v!==ne.__v&&(Te.__d=!1),Te.__v=X,X.__e=ne.__e,X.__k=ne.__k,Te.__h.length&&Ye.push(Te),je=0;je<X.__k.length;je++)X.__k[je]&&(X.__k[je].__=X);break e}Te.componentWillUpdate!=null&&Te.componentWillUpdate(at,Te.__s,ut),Te.componentDidUpdate!=null&&Te.__h.push(function(){Te.componentDidUpdate(ft,gt,ht)})}Te.context=ut,Te.props=at,Te.state=Te.__s,(je=n.__r)&&je(X),Te.__d=!1,Te.__v=X,Te.__P=Q,je=Te.render(Te.props,Te.state,Te.context),X.__k=je!=null&&je.type==O&&je.key==null?je.props.children:Array.isArray(je)?je:[je],Te.getChildContext!=null&&(ce=y(y({},ce),Te.getChildContext())),st||Te.getSnapshotBeforeUpdate==null||(ht=Te.getSnapshotBeforeUpdate(ft,gt)),J(Q,X,ne,ce,Ce,Pe,Ye,$e,nt),Te.base=X.__e,Te.__h.length&&Ye.push(Te),yt&&(Te.__E=Te.__=null),Te.__e=!1}else Pe==null&&X.__v===ne.__v?(X.__k=ne.__k,X.__e=ne.__e):X.__e=m(ne.__e,X,ne,ce,Ce,Pe,Ye,nt);(je=n.diffed)&&je(X)}catch(Pt){X.__v=null,n.__e(Pt,X,ne)}return X.__e}function h(Q,X){n.__c&&n.__c(X,Q),Q.some(function(ne){try{Q=ne.__h,ne.__h=[],Q.some(function(ce){ce.call(ne)})}catch(ce){n.__e(ce,ne.__v)}})}function m(Q,X,ne,ce,Ce,Pe,Ye,$e){var nt,je,Te,st,ft,gt=ne.props,ht=X.props;if(Ce=X.type==="svg"||Ce,Pe!=null){for(nt=0;nt<Pe.length;nt++)if((je=Pe[nt])!=null&&((X.type===null?je.nodeType===3:je.localName===X.type)||Q==je)){Q=je,Pe[nt]=null;break}}if(Q==null){if(X.type===null)return document.createTextNode(ht);Q=Ce?document.createElementNS("http://www.w3.org/2000/svg",X.type):document.createElement(X.type,ht.is&&{is:ht.is}),Pe=null,$e=!1}if(X.type===null)gt!==ht&&Q.data!=ht&&(Q.data=ht);else{if(Pe!=null&&(Pe=b.slice.call(Q.childNodes)),Te=(gt=ne.props||d).dangerouslySetInnerHTML,st=ht.dangerouslySetInnerHTML,!$e){if(gt===d)for(gt={},ft=0;ft<Q.attributes.length;ft++)gt[Q.attributes[ft].name]=Q.attributes[ft].value;(st||Te)&&(st&&Te&&st.__html==Te.__html||(Q.innerHTML=st&&st.__html||""))}(function(yt,at,wt,ut,Nt){var Pt;for(Pt in wt)Pt==="children"||Pt==="key"||Pt in at||S(yt,Pt,null,wt[Pt],ut);for(Pt in at)Nt&&typeof at[Pt]!="function"||Pt==="children"||Pt==="key"||Pt==="value"||Pt==="checked"||wt[Pt]===at[Pt]||S(yt,Pt,at[Pt],wt[Pt],ut)})(Q,ht,gt,Ce,$e),st?X.__k=[]:(X.__k=X.props.children,J(Q,X,ne,ce,X.type!=="foreignObject"&&Ce,Pe,Ye,d,$e)),$e||("value"in ht&&(nt=ht.value)!==void 0&&nt!==Q.value&&S(Q,"value",nt,gt.value,!1),"checked"in ht&&(nt=ht.checked)!==void 0&&nt!==Q.checked&&S(Q,"checked",nt,gt.checked,!1))}return Q}function g(Q,X,ne){try{typeof Q=="function"?Q(X):Q.current=X}catch(ce){n.__e(ce,ne)}}function _(Q,X,ne){var ce,Ce,Pe;if(n.unmount&&n.unmount(Q),(ce=Q.ref)&&(ce.current&&ce.current!==Q.__e||g(ce,null,X)),ne||typeof Q.type=="function"||(ne=(Ce=Q.__e)!=null),Q.__e=Q.__d=void 0,(ce=Q.__c)!=null){if(ce.componentWillUnmount)try{ce.componentWillUnmount()}catch(Ye){n.__e(Ye,X)}ce.base=ce.__P=null}if(ce=Q.__k)for(Pe=0;Pe<ce.length;Pe++)ce[Pe]&&_(ce[Pe],X,ne);Ce!=null&&x(Ce)}function T(Q,X,ne){return this.constructor(Q,ne)}function k(Q,X,ne){var ce,Ce,Pe;n.__&&n.__(Q,X),Ce=(ce=ne===s)?null:ne&&ne.__k||X.__k,Q=E(O,null,[Q]),Pe=[],w(X,(ce?X:ne||X).__k=Q,Ce||d,d,X.ownerSVGElement!==void 0,ne&&!ce?[ne]:Ce?null:b.slice.call(X.childNodes),Pe,ne||d,ce),h(Pe,Q)}function M(Q,X){k(Q,X,s)}function B(Q,X){var ne,ce;for(ce in X=y(y({},Q.props),X),arguments.length>2&&(X.children=b.slice.call(arguments,2)),ne={},X)ce!=="key"&&ce!=="ref"&&(ne[ce]=X[ce]);return R(Q.type,ne,X.key||Q.key,X.ref||Q.ref,null)}function Y(Q){var X={},ne={__c:"__cC"+l++,__:Q,Consumer:function(ce,Ce){return ce.children(Ce)},Provider:function(ce){var Ce,Pe=this;return this.getChildContext||(Ce=[],this.getChildContext=function(){return X[ne.__c]=Pe,X},this.shouldComponentUpdate=function(Ye){Pe.props.value!==Ye.value&&Ce.some(function($e){$e.context=Ye.value,L($e)})},this.sub=function(Ye){Ce.push(Ye);var $e=Ye.componentWillUnmount;Ye.componentWillUnmount=function(){Ce.splice(Ce.indexOf(Ye),1),$e&&$e.call(Ye)}}),ce.children}};return ne.Consumer.contextType=ne,ne.Provider.__=ne,ne}n={__e:function(Q,X){for(var ne,ce;X=X.__;)if((ne=X.__c)&&!ne.__)try{if(ne.constructor&&ne.constructor.getDerivedStateFromError!=null&&(ce=!0,ne.setState(ne.constructor.getDerivedStateFromError(Q))),ne.componentDidCatch!=null&&(ce=!0,ne.componentDidCatch(Q)),ce)return L(ne.__E=ne)}catch(Ce){Q=Ce}throw Q}},A.prototype.setState=function(Q,X){var ne;ne=this.__s!==this.state?this.__s:this.__s=y({},this.state),typeof Q=="function"&&(Q=Q(ne,this.props)),Q&&y(ne,Q),Q!=null&&this.__v&&(X&&this.__h.push(X),L(this))},A.prototype.forceUpdate=function(Q){this.__v&&(this.__e=!0,Q&&this.__h.push(Q),L(this))},A.prototype.render=O,f=[],p=0,u=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=d,l=0;var C,K,W,U=0,q=[],j=n.__r,D=n.diffed,F=n.__c,$=n.unmount;function V(Q,X){n.__h&&n.__h(K,Q,U||X),U=0;var ne=K.__H||(K.__H={__:[],__h:[]});return Q>=ne.__.length&&ne.__.push({}),ne.__[Q]}function Z(Q){return U=1,ee(Oe,Q)}function ee(Q,X,ne){var ce=V(C++,2);return ce.__c||(ce.__c=K,ce.__=[ne?ne(X):Oe(void 0,X),function(Ce){var Pe=Q(ce.__[0],Ce);ce.__[0]!==Pe&&(ce.__[0]=Pe,ce.__c.setState({}))}]),ce.__}function re(Q,X){var ne=V(C++,3);!n.__s&&pe(ne.__H,X)&&(ne.__=Q,ne.__H=X,K.__H.__h.push(ne))}function ue(Q,X){var ne=V(C++,4);!n.__s&&pe(ne.__H,X)&&(ne.__=Q,ne.__H=X,K.__h.push(ne))}function fe(Q){return U=5,ae(function(){return{current:Q}},[])}function oe(Q,X,ne){U=6,ue(function(){typeof Q=="function"?Q(X()):Q&&(Q.current=X())},ne==null?ne:ne.concat(Q))}function ae(Q,X){var ne=V(C++,7);return pe(ne.__H,X)?(ne.__H=X,ne.__h=Q,ne.__=Q()):ne.__}function ie(Q,X){return U=8,ae(function(){return Q},X)}function te(Q){var X=K.context[Q.__c],ne=V(C++,9);return ne.__c=Q,X?(ne.__==null&&(ne.__=!0,X.sub(K)),X.props.value):Q.__}function le(Q,X){n.useDebugValue&&n.useDebugValue(X?X(Q):Q)}function ge(Q){var X=V(C++,10),ne=Z();return X.__=Q,K.componentDidCatch||(K.componentDidCatch=function(ce){X.__&&X.__(ce),ne[1](ce)}),[ne[0],function(){ne[1](void 0)}]}function he(){q.some(function(Q){if(Q.__P)try{Q.__H.__h.forEach(ye),Q.__H.__h.forEach(Ie),Q.__H.__h=[]}catch(X){return Q.__H.__h=[],n.__e(X,Q.__v),!0}}),q=[]}function ye(Q){Q.t&&Q.t()}function Ie(Q){var X=Q.__();typeof X=="function"&&(Q.t=X)}function pe(Q,X){return!Q||X.some(function(ne,ce){return ne!==Q[ce]})}function Oe(Q,X){return typeof X=="function"?X(Q):X}function Ge(Q,X){for(var ne in X)Q[ne]=X[ne];return Q}function we(Q,X){for(var ne in Q)if(ne!=="__source"&&!(ne in X))return!0;for(var ce in X)if(ce!=="__source"&&Q[ce]!==X[ce])return!0;return!1}n.__r=function(Q){j&&j(Q),C=0,(K=Q.__c).__H&&(K.__H.__h.forEach(ye),K.__H.__h.forEach(Ie),K.__H.__h=[])},n.diffed=function(Q){D&&D(Q);var X=Q.__c;if(X){var ne=X.__H;ne&&ne.__h.length&&(q.push(X)!==1&&W===n.requestAnimationFrame||((W=n.requestAnimationFrame)||function(ce){var Ce,Pe=function(){clearTimeout(Ye),cancelAnimationFrame(Ce),setTimeout(ce)},Ye=setTimeout(Pe,100);typeof window<"u"&&(Ce=requestAnimationFrame(Pe))})(he))}},n.__c=function(Q,X){X.some(function(ne){try{ne.__h.forEach(ye),ne.__h=ne.__h.filter(function(ce){return!ce.__||Ie(ce)})}catch(ce){X.some(function(Ce){Ce.__h&&(Ce.__h=[])}),X=[],n.__e(ce,ne.__v)}}),F&&F(Q,X)},n.unmount=function(Q){$&&$(Q);var X=Q.__c;if(X){var ne=X.__H;if(ne)try{ne.__.forEach(function(ce){return ce.t&&ce.t()})}catch(ce){n.__e(ce,X.__v)}}},o.d(e,"version",function(){return Ke}),o.d(e,"Children",function(){return de}),o.d(e,"render",function(){return De}),o.d(e,"hydrate",function(){return rt}),o.d(e,"unmountComponentAtNode",function(){return et}),o.d(e,"createPortal",function(){return ze}),o.d(e,"createFactory",function(){return Xe}),o.d(e,"cloneElement",function(){return We}),o.d(e,"isValidElement",function(){return Me}),o.d(e,"findDOMNode",function(){return ke}),o.d(e,"PureComponent",function(){return Le}),o.d(e,"memo",function(){return Ve}),o.d(e,"forwardRef",function(){return Ne}),o.d(e,"unstable_batchedUpdates",function(){return qe}),o.d(e,"Suspense",function(){return me}),o.d(e,"SuspenseList",function(){return be}),o.d(e,"lazy",function(){return Je}),o.d(e,"useState",function(){return Z}),o.d(e,"useReducer",function(){return ee}),o.d(e,"useEffect",function(){return re}),o.d(e,"useLayoutEffect",function(){return ue}),o.d(e,"useRef",function(){return fe}),o.d(e,"useImperativeHandle",function(){return oe}),o.d(e,"useMemo",function(){return ae}),o.d(e,"useCallback",function(){return ie}),o.d(e,"useContext",function(){return te}),o.d(e,"useDebugValue",function(){return le}),o.d(e,"useErrorBoundary",function(){return ge}),o.d(e,"createElement",function(){return E}),o.d(e,"createContext",function(){return Y}),o.d(e,"createRef",function(){return I}),o.d(e,"Fragment",function(){return O}),o.d(e,"Component",function(){return A});var Le=function(Q){var X,ne;function ce(Ce){var Pe;return(Pe=Q.call(this,Ce)||this).isPureReactComponent=!0,Pe}return ne=Q,(X=ce).prototype=Object.create(ne.prototype),X.prototype.constructor=X,X.__proto__=ne,ce.prototype.shouldComponentUpdate=function(Ce,Pe){return we(this.props,Ce)||we(this.state,Pe)},ce}(A);function Ve(Q,X){function ne(Ce){var Pe=this.props.ref,Ye=Pe==Ce.ref;return!Ye&&Pe&&(Pe.call?Pe(null):Pe.current=null),X?!X(this.props,Ce)||!Ye:we(this.props,Ce)}function ce(Ce){return this.shouldComponentUpdate=ne,E(Q,Ge({},Ce))}return ce.prototype.isReactComponent=!0,ce.displayName="Memo("+(Q.displayName||Q.name)+")",ce.t=!0,ce}var ve=n.__b;function Ne(Q){function X(ne){var ce=Ge({},ne);return delete ce.ref,Q(ce,ne.ref)}return X.prototype.isReactComponent=X.t=!0,X.displayName="ForwardRef("+(Q.displayName||Q.name)+")",X}n.__b=function(Q){Q.type&&Q.type.t&&Q.ref&&(Q.props.ref=Q.ref,Q.ref=null),ve&&ve(Q)};var se=function(Q,X){return Q?G(Q).reduce(function(ne,ce,Ce){return ne.concat(X(ce,Ce))},[]):null},de={map:se,forEach:se,count:function(Q){return Q?G(Q).length:0},only:function(Q){if((Q=G(Q)).length!==1)throw new Error("Children.only() expects only one child.");return Q[0]},toArray:G},_e=n.__e;function Ue(Q){return Q&&((Q=Ge({},Q)).__c=null,Q.__k=Q.__k&&Q.__k.map(Ue)),Q}function me(){this.__u=0,this.o=null,this.__b=null}function Be(Q){var X=Q.__.__c;return X&&X.u&&X.u(Q)}function Je(Q){var X,ne,ce;function Ce(Pe){if(X||(X=Q()).then(function(Ye){ne=Ye.default||Ye},function(Ye){ce=Ye}),ce)throw ce;if(!ne)throw X;return E(ne,Pe)}return Ce.displayName="Lazy",Ce.t=!0,Ce}function be(){this.i=null,this.l=null}n.__e=function(Q,X,ne){if(Q.then){for(var ce,Ce=X;Ce=Ce.__;)if((ce=Ce.__c)&&ce.__c)return ce.__c(Q,X.__c)}_e(Q,X,ne)},(me.prototype=new A).__c=function(Q,X){var ne=this;ne.o==null&&(ne.o=[]),ne.o.push(X);var ce=Be(ne.__v),Ce=!1,Pe=function(){Ce||(Ce=!0,ce?ce(Ye):Ye())};X.__c=X.componentWillUnmount,X.componentWillUnmount=function(){Pe(),X.__c&&X.__c()};var Ye=function(){var $e;if(!--ne.__u)for(ne.__v.__k[0]=ne.state.u,ne.setState({u:ne.__b=null});$e=ne.o.pop();)$e.forceUpdate()};ne.__u++||ne.setState({u:ne.__b=ne.__v.__k[0]}),Q.then(Pe,Pe)},me.prototype.render=function(Q,X){return this.__b&&(this.__v.__k[0]=Ue(this.__b),this.__b=null),[E(A,null,X.u?null:Q.children),X.u&&Q.fallback]};var He=function(Q,X,ne){if(++ne[1]===ne[0]&&Q.l.delete(X),Q.props.revealOrder&&(Q.props.revealOrder[0]!=="t"||!Q.l.size))for(ne=Q.i;ne;){for(;ne.length>3;)ne.pop()();if(ne[1]<ne[0])break;Q.i=ne=ne[2]}};(be.prototype=new A).u=function(Q){var X=this,ne=Be(X.__v),ce=X.l.get(Q);return ce[0]++,function(Ce){var Pe=function(){X.props.revealOrder?(ce.push(Ce),He(X,Q,ce)):Ce()};ne?ne(Pe):Pe()}},be.prototype.render=function(Q){this.i=null,this.l=new Map;var X=G(Q.children);Q.revealOrder&&Q.revealOrder[0]==="b"&&X.reverse();for(var ne=X.length;ne--;)this.l.set(X[ne],this.i=[1,0,this.i]);return Q.children},be.prototype.componentDidUpdate=be.prototype.componentDidMount=function(){var Q=this;Q.l.forEach(function(X,ne){He(Q,ne,X)})};var tt=function(){function Q(){}var X=Q.prototype;return X.getChildContext=function(){return this.props.context},X.render=function(ne){return ne.children},Q}();function Re(Q){var X=this,ne=Q.container,ce=E(tt,{context:X.context},Q.vnode);return X.s&&X.s!==ne&&(X.v.parentNode&&X.s.removeChild(X.v),_(X.h),X.p=!1),Q.vnode?X.p?(ne.__k=X.__k,k(ce,ne),X.__k=ne.__k):(X.v=document.createTextNode(""),M("",ne),ne.appendChild(X.v),X.p=!0,X.s=ne,k(ce,ne,X.v),X.__k=X.v.__k):X.p&&(X.v.parentNode&&X.s.removeChild(X.v),_(X.h)),X.h=ce,X.componentWillUnmount=function(){X.v.parentNode&&X.s.removeChild(X.v),_(X.h)},null}function ze(Q,X){return E(Re,{vnode:Q,container:X})}var Ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;A.prototype.isReactComponent={};var Ae=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103;function De(Q,X,ne){if(X.__k==null)for(;X.firstChild;)X.removeChild(X.firstChild);return k(Q,X),typeof ne=="function"&&ne(),Q?Q.__c:null}function rt(Q,X,ne){return M(Q,X),typeof ne=="function"&&ne(),Q?Q.__c:null}var Ee=n.event;function Fe(Q,X){Q["UNSAFE_"+X]&&!Q[X]&&Object.defineProperty(Q,X,{configurable:!1,get:function(){return this["UNSAFE_"+X]},set:function(ne){this["UNSAFE_"+X]=ne}})}n.event=function(Q){Ee&&(Q=Ee(Q)),Q.persist=function(){};var X=!1,ne=!1,ce=Q.stopPropagation;Q.stopPropagation=function(){ce.call(Q),X=!0};var Ce=Q.preventDefault;return Q.preventDefault=function(){Ce.call(Q),ne=!0},Q.isPropagationStopped=function(){return X},Q.isDefaultPrevented=function(){return ne},Q.nativeEvent=Q};var Qe={configurable:!0,get:function(){return this.class}},Se=n.vnode;n.vnode=function(Q){Q.$$typeof=Ae;var X=Q.type,ne=Q.props;if(X){if(ne.class!=ne.className&&(Qe.enumerable="className"in ne,ne.className!=null&&(ne.class=ne.className),Object.defineProperty(ne,"className",Qe)),typeof X!="function"){var ce,Ce,Pe;for(Pe in ne.defaultValue&&ne.value!==void 0&&(ne.value||ne.value===0||(ne.value=ne.defaultValue),delete ne.defaultValue),Array.isArray(ne.value)&&ne.multiple&&X==="select"&&(G(ne.children).forEach(function(Ye){ne.value.indexOf(Ye.props.value)!=-1&&(Ye.props.selected=!0)}),delete ne.value),ne)if(ce=Ze.test(Pe))break;if(ce)for(Pe in Ce=Q.props={},ne)Ce[Ze.test(Pe)?Pe.replace(/[A-Z0-9]/,"-$&").toLowerCase():Pe]=ne[Pe]}(function(Ye){var $e=Q.type,nt=Q.props;if(nt&&typeof $e=="string"){var je={};for(var Te in nt)/^on(Ani|Tra|Tou)/.test(Te)&&(nt[Te.toLowerCase()]=nt[Te],delete nt[Te]),je[Te.toLowerCase()]=Te;if(je.ondoubleclick&&(nt.ondblclick=nt[je.ondoubleclick],delete nt[je.ondoubleclick]),je.onbeforeinput&&(nt.onbeforeinput=nt[je.onbeforeinput],delete nt[je.onbeforeinput]),je.onchange&&($e==="textarea"||$e.toLowerCase()==="input"&&!/^fil|che|ra/i.test(nt.type))){var st=je.oninput||"oninput";nt[st]||(nt[st]=nt[je.onchange],delete nt[je.onchange])}}})(),typeof X=="function"&&!X.m&&X.prototype&&(Fe(X.prototype,"componentWillMount"),Fe(X.prototype,"componentWillReceiveProps"),Fe(X.prototype,"componentWillUpdate"),X.m=!0)}Se&&Se(Q)};var Ke="16.8.0";function Xe(Q){return E.bind(null,Q)}function Me(Q){return!!Q&&Q.$$typeof===Ae}function We(Q){return Me(Q)?B.apply(null,arguments):Q}function et(Q){return!!Q.__k&&(k(null,Q),!0)}function ke(Q){return Q&&(Q.base||Q.nodeType===1&&Q)||null}var qe=function(Q,X){return Q(X)};e.default={useState:Z,useReducer:ee,useEffect:re,useLayoutEffect:ue,useRef:fe,useImperativeHandle:oe,useMemo:ae,useCallback:ie,useContext:te,useDebugValue:le,version:"16.8.0",Children:de,render:De,hydrate:De,unmountComponentAtNode:et,createPortal:ze,createElement:E,createContext:Y,createFactory:Xe,cloneElement:We,createRef:I,Fragment:O,isValidElement:Me,findDOMNode:ke,Component:A,PureComponent:Le,memo:Ve,forwardRef:Ne,unstable_batchedUpdates:qe,Suspense:me,SuspenseList:be,lazy:Je}}])})})(t_);const r_=nb(Fa),n_=Rm("web3user",{state:()=>({account:"",balance:"",network:{chainId:0},loading:!1}),getters:{ethereum(){return window.ethereum},isConnected:r=>!!r.account},actions:{async initialize(){if(this.ethereum){const r=await this.ethereum.request({method:"eth_chainId"});this.network.chainId=r,this.ethereum.on("chainChanged",()=>{window.location.reload()});const t=await this.ethereum.request({method:"eth_accounts"});t.length>0?this.account=t[0]:ka.info("No auth account")}else ka.info("Metamask is not exist")},async connectWallet(r){r=="metamask"?await this.useMetamask():await this.useWalletConnect()},async useMetamask(){if(!this.ethereum){alert("Metamask is not exist");return}try{const r=await this.ethereum.request({method:"eth_requestAccounts"});if(r.length==0)return;const t=await this.ethereum.request({method:"eth_chainId"});this.network.chainId=t,this.account=r[0],this.ethereum.on("accountsChanged",i=>{i.length>0?this.account=i[0]:this.account=""}),this.ethereum.on("networkChanged",i=>{this.network.chainId=i})}catch{return}},async useWalletConnect(){try{const r=new r_({infuraId:"62f3555371db4581aba56bbe1a7b063d"});await r.enable();const e=await(await new e_(r).getSigner()).getAddress();this.account=e,this.network.chainId=await r.request({method:"eth_chainId"}),r.on("disconnect",()=>{this.account="",this.network.chainId=0}),r.on("accountsChanged",o=>{o.length>0&&(this.account=o[0])}),r.on("chainChanged",o=>{this.network.chainId=o})}catch{return}}}}),i_=au({__name:"App",setup(r){return n_().initialize(),ka.info("I'm ready!  ⸜(๑'ᵕ'๑)⸝⋆*"),(i,e)=>{const o=Cp("RouterView");return hu(),du(o)}}});typeof window.global>"u"&&(window.global=window);const xs=L1(i_),o_=Object.fromEntries(Object.entries(Object.assign({"./locales/en.json":i0,"./locales/zh-CN.json":s0})).map(([r,t])=>[r.slice(10,-5),t.default]));xs.use(Pg({legacy:!1,locale:Cn(gm("locale","zh-CN")),messages:o_}));xs.use(xm());xs.use(Su);xs.mount("#app");export{xu as A,n_ as B,p_ as C,d_ as D,a_ as E,pr as F,l_ as G,gm as H,Cp as I,f_ as T,Ut as a,uu as b,Nn as c,au as d,Er as e,Ai as f,za as g,us as h,Ar as i,hu as j,du as k,fp as l,Zt as m,ao as n,ss as o,ko as p,ih as q,sr as r,Cl as s,c_ as t,Cn as u,r1 as v,gp as w,s_ as x,h_ as y,u_ as z};